Page 1 of 1
REQUEST: Design File Change Details
Posted: Sun Feb 11, 2024 12:04 am
by tortugapower
Hi Fredrik,
I've seen a snapshot of the upcoming ship -> nation design file change. I understand the motivation, although this will break mods.
Can you please provide a template with what line corresponds to what trait? That way we can mimic your serializer for creating/reading/modding designs.
Referring to this:
Code: Select all
ShipDesign0
Blackwater
0
DD
1
0
500
1
0
0
0
0
0
0
0
28
28
5610
1
3
0
...
Thank you,
Tortuga
Re: REQUEST: Design File Change Details
Posted: Sun Feb 11, 2024 2:24 pm
by catdriver
Seconded.
It's impressive how much this game does with simple text files, and I very much appreciate how readable and intuitive they are.
Re: REQUEST: Design File Change Details
Posted: Mon Feb 12, 2024 7:19 pm
by WilliamMiller
We are looking at ways to adjust things to make mods and saving/loading individual ships easier to handle for the game. Will post update as soon as we settle upon a course of action, thanks!
Re: REQUEST: Design File Change Details
Posted: Wed Feb 14, 2024 6:43 pm
by Tarhunnas
I can do adescription of the file format, I am just a little busy now, so it might take a little time.
Could you describe your use case? Perhaps there are easier ways to solve your rquest?
Re: REQUEST: Design File Change Details
Posted: Fri Feb 16, 2024 12:31 am
by tortugapower
WilliamMiller wrote: Mon Feb 12, 2024 7:19 pm
We are looking at ways to adjust things to make mods and saving/loading individual ships easier to handle for the game. Will post update as soon as we settle upon a course of action, thanks!
Thanks, William!
Tarhunnas wrote: Wed Feb 14, 2024 6:43 pm
I can do adescription of the file format, I am just a little busy now, so it might take a little time.
Could you describe your use case? Perhaps there are easier ways to solve your rquest?
Hi Tarhunnas,
Use case is probably the obvious: I want to read in the ship design information. For that, I need to know what a line with just "1" corresponds to: is that Range or Freeboard or InclinedBelt or...?
Previously, this was explicit:
Code: Select all
Range=1
Freeboard=0
InclinedBelt=0
So a dictionary-style file parser worked. I guess now we'll have to unfortunately use a line-based parser, which will break any time the serialization process changes.
That means I'll need a mapping of file_line_num to trait. If you can provide that, that'd be great.
Best,
Tortuga
Re: REQUEST: Design File Change Details
Posted: Mon Apr 15, 2024 5:06 pm
by Tarhunnas
Sorry it took some time to do this. The new file format is actually very similar to the old, but with some changes. I enclose a file description that is based on one of the old style files. Hope this explains it. Please ask if something is unclear.
Re: REQUEST: Design File Change Details
Posted: Wed May 08, 2024 5:37 am
by tortugapower
Tarhunnas wrote: Mon Apr 15, 2024 5:06 pm
Sorry it took some time to do this. The new file format is actually very similar to the old, but with some changes. I enclose a file description that is based on one of the old style files. Hope this explains it. Please ask if something is unclear.
Thanks for taking the time.
Best,
Tortuga