Search found 10 matches

by Geheim
Wed Jul 16, 2025 10:07 am
Forum: Resolved Requests
Topic: [2.0.34] Resolve type discrepancies in the Prototype JSON Format
Replies: 4
Views: 774

Re: [2.0.34] Resolve type discrepancies in the Prototype JSON Format

Thanks a lot for taking the time to address all the points and for your notes!
Once I find some time I will catchup with all the new releases and will let you know if something new comes up.
by Geheim
Sat Feb 15, 2025 2:45 pm
Forum: Resolved Requests
Topic: Add FileName or SoundDefinition variant to Sound
Replies: 2
Views: 419

Add FileName or SoundDefinition variant to Sound

Sound is of type struct or array[ SoundDefinition ] and SoundDefinition is of type struct or FileName . However, Sound itself is sometimes used as a single SoundDefinition or FileName , e.g.

data.raw["gui-style"]["default"]["button"]["left_click_sound"] = "__core__/sound/gui-click.ogg"
(or line ...
by Geheim
Sat Feb 15, 2025 2:43 pm
Forum: Resolved Requests
Topic: Fix value of DamageTileTriggerEffectItem::type
Replies: 1
Views: 317

Fix value of DamageTileTriggerEffectItem::type

DamageTileTriggerEffectItem::type has the same value "damage" as DamageTriggerEffectItem . The description of this union member for TriggerEffect says:

Loaded when the type is "damage-tile".
Example usage:

data.raw["land-mine"]["land-mine"]["action"]["action-delivery"]["source-effects"][4 ...
by Geheim
Sat Feb 15, 2025 2:41 pm
Forum: Resolved Requests
Topic: Rename unknown union member of TriggerEffect
Replies: 1
Views: 303

Rename unknown union member of TriggerEffect

TriggerEffect contains the unknown union member DamageEntityTriggerEffectItem, which was probably meant to be named DamageTriggerEffectItem , e.g:

data.raw["tile"]["lava"]["trigger_effect"][1] = {
"type": "damage",
"damage":
{
"amount": 50,
"type": "fire"
}
}
(or see lines 142084-142091 of ...
by Geheim
Sat Feb 15, 2025 2:39 pm
Forum: Resolved Requests
Topic: Fix type of CreateTrivialSmokeEffectItem::only_when_visible
Replies: 1
Views: 304

Fix type of CreateTrivialSmokeEffectItem::only_when_visible

CreateTrivialSmokeEffectItem::only_when_visible has a type of float, but a default value of false and is only used as a bool, e.g:

data.raw["explosion"]["carbonic-asteroid-explosion-2"]["created_effect"]["action_delivery"]["target_effects"][2]["only_when_visible"] = true
(or see line 276904 of ...
by Geheim
Fri Feb 14, 2025 6:46 pm
Forum: Minor issues
Topic: [1.1.92] data.raw JSON dump serializes empty arrays wrong
Replies: 11
Views: 2695

Re: [1.1.92] data.raw JSON dump serializes empty arrays wrong

Interesting choices, thanks for the quick clarification and references.
by Geheim
Fri Feb 14, 2025 1:23 pm
Forum: Minor issues
Topic: [1.1.92] data.raw JSON dump serializes empty arrays wrong
Replies: 11
Views: 2695

Re: [1.1.92] data.raw JSON dump serializes empty arrays wrong

Ran into this as well with version 2.0.34. Just to understand the dumping process better: Is the JSON generated directly from Lua or with C++ after data.raw was parsed? How are the types from the API docs generated? Is the same type information available during the data dump?
by Geheim
Thu Feb 13, 2025 4:14 pm
Forum: Resolved Requests
Topic: [2.0.34] Resolve type discrepancies in the Prototype JSON Format
Replies: 4
Views: 774

Re: [2.0.34] Resolve type discrepancies in the Prototype JSON Format

Hello there!
Thanks for the reference and your insights. I was under the assumption that the data dump comes from the engine, but if it comes from Lua then that explains some of the points already. I will follow up on this in your thread.

I'd make several separate posts for them tho. Provides ...
by Geheim
Sat Feb 08, 2025 3:20 am
Forum: Resolved Requests
Topic: [2.0.34] Resolve type discrepancies in the Prototype JSON Format
Replies: 4
Views: 774

[2.0.34] Resolve type discrepancies in the Prototype JSON Format

When deserializing the data-raw-dump.json file (extracted via the --dump-data command line parameter ) with a type safe language, some adjustments have to be made. The following list is complete (for version 2.0.34 without additional mods) and grouped into two main categories, with no specific order ...

Go to advanced search