Cod-Reader writes wrong gfx values in the json
Closed this issue · 6 comments
Can you search the cod file for the constant IDWOHN
and check if it was defined (and what value it hast) and how often this is used?
I checked with a NINA version of Anno 1602.
The constant IDWOHN
is defined as IDWOHN = 20601
This means that the value for IDWOHN+20
is correct (20621).
How do you calculate the value of 3064
?
Sorry, I mean the GFX value. That should be 3064. The reader writes the wrong GFX value. But it's also good to know that IDWOHN fits. What GFX do you have for the ID?
This issue is potentially fixed in siredmar/mdcii-engine@520762b
The problem was, that relative constant increments (and decrements) were not handled by the cod_parser.
Constant assignments are in this format: CONSTANT =
The "@" is a marker for a relative assignment followed by the increment (+|-)(number).
So they are completely rewriting the value of that constant. Don't know why they didn't use a variable in the first place.
Relative constant assignment:
@GFXNR = +112
Relative variable assignment:
@GFXNR: +112
Well, this should be fixed. I'd be nice if you tested this if the change has some side effects i didn't see.