liblcf icon indicating copy to clipboard operation
liblcf copied to clipboard

rpg::MoveCommand::Code::change_graphic parameter reads as an unknown chunk

Open elsemieni opened this issue 2 years ago • 2 comments

Tested with master lcf2xml.

When trying to read the following command event: @> Set Move Route: Player, Change Graphic...

It got read in the following way:

      <EventCommand>
        <code>11330</code>
        <indent>0</indent>
        <string></string>
        <parameters>10001 8 0 0 34 6 97 110 105 109 97 108 1</parameters>
       </EventCommand>

Understanding that is a undecoded Change graphic event with it's parameter in decimal.

Obviously this does not affect file reading/writing and it re-generates without problems, but I think liblcf is also unable to read it properly (only having access to undecoded parameters, just like the XML file output of lcf2xml).

By seeing https://github.com/EasyRPG/liblcf/blob/master/src/lmu_movecommand.cpp#L47 it seems to do explicitely in this way. This is beacuse this chunk is not investigated yet? Or it's a bug indeed?

Thanks in advance.

elsemieni avatar Apr 30 '22 03:04 elsemieni

The raw data is decoded by the Player.

Problem is the data structure here: this is an event command so all the move commands are part of the parameter. Including the filename for change graphic.

Not sure if it would be possible to make the output a bit smarter when writing xml

Ghabry avatar Apr 30 '22 08:04 Ghabry

Not sure if it would be possible to make the output a bit smarter when writing xml

Somehow related: #245 If a parameter value had a specific type, could be defined in the structure for some column as in other CSVs.

Skipping these special cases chunk reads could prevent false positives and pollution once #416 gets in.

fdelapena avatar Mar 05 '23 01:03 fdelapena