Page 1 of 1
collection of some prototype docs issues
Posted: Mon Oct 09, 2023 7:42 am
by BrainGamer_
This is a short list of additional issues I noticed in the prototype docs while implementing my parser.
Re: collection of some prototype docs issues
Posted: Mon Oct 09, 2023 9:05 am
by Bilka
Fixed point 1 and 3 for the next version, thank you.
BrainGamer_ wrote: Mon Oct 09, 2023 7:42 am
MiningDrillGraphicsSet.shift_animation_waypoint_stop_duration should be a float/double (might also apply to CraftingMachinePrototype.shift_animation_waypoint_stop_duration?)
They are uint16, the floating point value that the base game is setting is getting truncated during loading. Unclear what is the intended behaviour here, but the docs are correct for the current loading code.
BrainGamer_ wrote: Mon Oct 09, 2023 7:42 am
the 2 loader prototypes mention belt_distance in their description but actually refer to belt_length
Those are in fact different properties with different effects, see the description on belt_length. belt_distance is hardcoded internally. I don't see a way to make this more clear, so I will move this thread to resolved anyway.
Re: collection of some prototype docs issues
Posted: Mon Oct 09, 2023 9:38 am
by BrainGamer_
Bilka wrote: Mon Oct 09, 2023 9:05 am
Those are in fact different properties with different effects, see the description on belt_length. belt_distance is hardcoded internally.
Then that appears to be wrongly documented in the abstract parent LoaderPrototype
here?
edit: hmm no that also refers to the internal variable. I just don't see how that internal value is of interest if its neither exposed nor really explained what it does / why it is hardcoded this way.
Re: collection of some prototype docs issues
Posted: Mon Oct 09, 2023 9:42 am
by BrainGamer_
Bilka wrote: Mon Oct 09, 2023 9:05 am
They are uint16, the floating point value that the base game is setting is getting truncated during loading.
Does that apply to all integer values?
Re: collection of some prototype docs issues
Posted: Mon Oct 09, 2023 10:12 am
by Bilka
BrainGamer_ wrote: Mon Oct 09, 2023 9:42 am
Bilka wrote: Mon Oct 09, 2023 9:05 am
They are uint16, the floating point value that the base game is setting is getting truncated during loading.
Does that apply to all integer values?
That Lua floating point values get silently casted to integers if they are loaded as integers? Yes.
BrainGamer_ wrote: Mon Oct 09, 2023 9:38 am
Then that appears to be wrongly documented in the abstract parent LoaderPrototype
here?
edit: hmm no that also refers to the internal variable. I just don't see how that internal value is of interest if its neither exposed nor really explained what it does / why it is hardcoded this way.
It's the only difference between the two loader prototypes and it's explained that "The belt_distance of the loader determines the distance between the position of this loader and the tile of the loader's belt target. This loader type always has a belt_distance of ..., meaning by default it is ... tiles long in total. " on the prototypes. I'll make the belt_length property description say that the explanation of belt_distance is on the linked prototypes, hopefully that helps.