DieHard Wolfers Forum Index DieHard Wolfers
A Wolfenstein 3d Fan Community


  Hosted by: MCS & Areyep.com - Designed by: BrotherTank

Original Yahoo Forum - Die Hard Archives

AReyeP HomepageAreyep Homepage DieHard Wolfenstein BunkerDieHard Wolfenstein Bunker Log inLog in RegisterRegister Banlist FAQFAQ Search ForumsSearch

  Username:    Password:      Remember me       

Level ratios bug
Page 1 of 1
DieHard Wolfers Forum Index -> SDL Code Crackers View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page BottomView Next Topic
Post new topicReply to topic
Author Message
fraggeur
DieHard Guard
DieHard Guard


Joined: 31 Dec 2012
Last Visit: 8:26 ago.

Topics: 11
Posts: 259

blank.gif

PostPosted: Tue Feb 21, 2017 12:41 pm
   Subject: Level ratios bug
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

I am pretty sure it has happened and been discussed several times but I can't remember where.

I get sometimes ratios over 100% at the end of level, treasure at 103% for instance. Possibly happened after a "load game". Is there a permanant fix around?
Aryan_Wolf3D
I am Death Incarnate
I am Death Incarnate


Joined: 21 Jul 2011
Last Visit: 16 Dec 2017

Topics: 6
Posts: 172

blank.gif

PostPosted: Tue Feb 21, 2017 12:54 pm
   Subject: Re: Level ratios bug
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

It really depends on any changes you've made to the source. In wl_act1.cpp, every treasure item is added to "gamestate.treasuretotal", and in wl_agent.cpp, when the player picks up the treasure, it adds it to "gamestate.treasurecount". I would suggest checking the "gamestate.treasuretotal/treasurecount" lines, and make sure they're correct. I think that if an item is added to the treasure count without being added to the treasure total, you'll end up with +100% treasure ratios. And also, if you're having this happen only when loading a game, make sure you have the "if (!loadedgame)" line above every "gamestate.treasuretotal/treasurecount line, since I think it prevents the item from being added again when you load a saved game.

I hope that helps.

_________________
"Way too many #ifdefs in the code!" - John Carmack
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 0:36 ago.

Topics: 160
Posts: 8011
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Tue Feb 21, 2017 1:34 pm
   Subject: Re: Level ratios bug
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Are there any floor code errors in your maps? This will alter the checksum for your level ratios every time.
fraggeur
DieHard Guard
DieHard Guard


Joined: 31 Dec 2012
Last Visit: 8:26 ago.

Topics: 11
Posts: 259

blank.gif

PostPosted: Tue Feb 21, 2017 2:39 pm
   Subject: Re: Level ratios bug
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Hmmm interesting thanks, let me check those 2 points Smile
AlumiuN
DieHard Wolfer
DieHard Wolfer


Joined: 29 Nov 2007
Last Visit: 2:02 ago.

Topics: 37
Posts: 2401
Location: Christchurch, New Zealand
newzealand.gif

PostPosted: Tue Feb 21, 2017 2:40 pm
   Subject: Re: Level ratios bug
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Tricob wrote:
Are there any floor code errors in your maps? This will alter the checksum for your level ratios every time.


How do they do this?
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 17 Dec 2017

Topics: 55
Posts: 2116
Location: Canada
blank.gif

PostPosted: Tue Feb 21, 2017 3:10 pm
   Subject: Re: Level ratios bug
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

If you use the Mock Ammo object, it can turn your ammo into 100%+ treasure:
http://diehardwolfers.areyep.com/viewtopic.php?p=98902#98902

And you can get over 100% secret ratio with saved games like this:
http://diehardwolfers.areyep.com/viewtopic.php?p=99174#99174

And you can get over 100% kill ratio by surrounding dead guards with Dog Transformers:
http://diehardwolfers.areyep.com/viewtopic.php?p=40940#40940
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 0:36 ago.

Topics: 160
Posts: 8011
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Tue Feb 21, 2017 7:33 pm
   Subject: Re: Level ratios bug
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

AlumiuN wrote:
Tricob wrote:
Are there any floor code errors in your maps? This will alter the checksum for your level ratios every time.
How do they do this?
It only occurs with saved games. If you never enter the room that has the floorcode problems, the checksum remains correct.
fraggeur
DieHard Guard
DieHard Guard


Joined: 31 Dec 2012
Last Visit: 8:26 ago.

Topics: 11
Posts: 259

blank.gif

PostPosted: Thu Feb 23, 2017 1:18 pm
   Subject: Re: Level ratios bug
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

Thanks all.

It was simply a discrepency between treasurecount and treasuretotal...
Funny thing is that the buggy treasure items were the ones that can appear randomly with only a few odds (by breaking a crate), so I could have replayed the level hundreds of time without never reproduce the bug.
Display posts from previous:   
Post new topicReply to topic Time synchronized with the forum server time
DieHard Wolfers Forum Index -> SDL Code Crackers View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page TopView Next Topic
Page 1 of 1
Jump to:  

Related topics
 Topics   Replies   Views   Last Post 
No new posts [Help] Disabling "Full Screen" Mode
Author: WSJ
4 1026 Sat Aug 02, 2008 6:42 pm
Tricob View latest post
No new posts [IDEA] Introducing the new "Haasboy Engine"
Author: Haasboy
2 991 Fri Aug 01, 2008 10:37 am
dcbasic View latest post
No new posts [HELP] sounds crush game?
Author: Raziel
23 5447 Wed Jul 30, 2008 12:41 pm
RichterBelmont12 View latest post
No new posts [HELP] Weird Bug
Author: Raziel
6 1169 Sun Jul 20, 2008 7:22 am
Raziel View latest post
No new posts [SDL-Help] Wall patches fix
Author: insurrectionman
0 915 Tue Jul 15, 2008 11:12 am
insurrectionman View latest post
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
   You cannot delete your posts in this forum
You cannot vote in polls in this forum


Copyright ©2003-2008 DieHard Wolfers
A Modified subBunker Theme by BrotherTank
Powered by phpBB © 2001, 2005 phpBB Group