Attnam / ivan

Iter Vehemens ad Necem - a continuation of the graphical roguelike by members of http://attnam.com
GNU General Public License v2.0
297 stars 42 forks source link

unable to craft a round key (also in case is ends up broken) #582

Open AquariusPower opened 4 years ago

AquariusPower commented 4 years ago

using 30cm3 of balsa wood

error: "Undefined key configuration #2176 sought!"

stack (a screenshot as show the values from nemiver: Selection_008

the round key numeric id seems to be "ROUND_LOCK with value 2048" (instead of 2176?) on the definesvalidator.h I will try to re-generate it to check.

AquariusPower commented 4 years ago

The developer console (ctrl+`) seems broken? (I couldn't understand why it broke yet) so, on this branch https://github.com/AquariusPower/ivan/tree/SomeFixes1234 I exposed some developer commands thru command line ./ivan --defgen ./ivan --defval to generate and validate the definesvalidator.h (also updated it and updated the documentation about these new cmdline params)

about the crafting key problem but... I saw no problem (when validating defines) related to the round key item creation... anyway, now I can craft the keys (dont know why), but... it is crashing in case the key breaks during its crafting now!

red-kangaroo commented 4 years ago

I can confirm that dev console segfaults when I try any command.

BTW, @AquariusPower what can it do? :) I must confess I've never used it, and I'm curious.

AquariusPower commented 4 years ago

it was used to generate and validate the defines (but now it can be just an OS command line),

but also it could list items and NPCs/Player/Pets on the current dungeon level,

and set debug variables that could be placed anywhere in the code for more specific tests (I think I never used this tho, so not sure it is correctly working),

obs.: devcons::OpenCommandsConsole()

AquariusPower commented 4 years ago

I can confirm that dev console segfaults when I try any command.

I got a stack trace that shows strings gets messed after certain point in the code, I couldnt understand what happened, I will create another issue for this with that stack trace from nemiver.

AquariusPower commented 4 years ago

Fixed crafting keys in case it ends up broken. I saw at item.dat that there is no BROKEN config for keys (that now CanBeBroken), that was the problem. The fix begin at item.cpp:SetConfigIfPossible() at https://github.com/AquariusPower/ivan/tree/SomeFixes1234

red-kangaroo commented 4 years ago

Oh, I can see what the problem might be. Keys sometimes break, but they are destroyed when they do, they don't become broken, thus no BROKEN config. However, crafting apparently defaults to BROKEN item if the item can be broken?

AquariusPower commented 4 years ago

thats it, if it CanBeBroken it tries to use the |BROKEN config otherwise we get just a lump. btw, it would be interesting to also let keys burn as we can craft them with wood :>