Mass editing shipsection/weapon files
Moderator: Makail
Mass editing shipsection/weapon files
Hi Guys,
Just wondering if anyone has any recommendations for mass editing .section/.weapon files? Especially if it can take a csv/spreadsheet file and editing
in specific values across multiple files?
I'm using Excel to calculate my data, thought about using VBA to make an editor of somesort, but haven't figured out how to load the files through the nodes yet, as it is not a standard XML file (I think?).
Anyway, thanks for all the help!
Just wondering if anyone has any recommendations for mass editing .section/.weapon files? Especially if it can take a csv/spreadsheet file and editing
in specific values across multiple files?
I'm using Excel to calculate my data, thought about using VBA to make an editor of somesort, but haven't figured out how to load the files through the nodes yet, as it is not a standard XML file (I think?).
Anyway, thanks for all the help!
Re: Mass editing shipsection/weapon files
NVD for the excel reading the files part. it is XML, it's just my shoddy VBA skill created some improper code and couldn't load the values properly.
I'm going to see if I can load more files, lol



I'm going to see if I can load more files, lol
Re: Mass editing shipsection/weapon files
Update 2: Basic load and write structure is completed!!! It is now able to load all main factions' .section files into the worksheet, and then write the changes to them!
Downsides include:
For backing up your .section files along with directory structure:
https://drive.google.com/file/d/1CRi34p ... sp=sharing
The Excel file
https://drive.google.com/file/d/1s2Acrt ... sp=sharing
Instruction:
Is there still anyone roaming the forum at all???
Downsides include:
- UI is a mess right now. Don't have time to work on that yet
- haven't thoroughly tested it. just tried to modify some numeric value and did a full scale write. the game launches fine up to main menu
- code logic is... working... definitely not NASA standard
- no error detection, YET
- load all the single level nodes in the section files, and you can change them in a spreadsheet
- good horizontal comparison and filtering of data
- reads all stock files (890ish some files) in ~20s, writes all files in ~33s. on my comupter
For backing up your .section files along with directory structure:
https://drive.google.com/file/d/1CRi34p ... sp=sharing
The Excel file
https://drive.google.com/file/d/1s2Acrt ... sp=sharing
Instruction:
- Please download the file and use Excel to open it. Make sure Macro is enabled.
- Find your game folder location
- goto the Main Page sheet in the file, paste the full path into cell A2.
- Make sure there is no backslash in the game folder full path, otherwise the code won't work.
- Goto "Raw Data" sheet, hit load button. ignore the message about the workspace sheet, it's for future work
- change the data to whatever legit value
- hit write button and wait till complete
- launch the game and enjoy!
- give you the ability to manipulate the numbers as you like, including using spreadsheet formulas
- well, there is filter and sort now. haven't tested using formula to mass balance values
Is there still anyone roaming the forum at all???

Re: Mass editing shipsection/weapon files
There should be at least a couple of people who this would interest. Rossinna-Sama being the first among them but I guess things are just a bit busy in his personal life right now. Sorry... 

If you want a different perspective, stand on your head.
Re: Mass editing shipsection/weapon files
Yeah... I sent him the link already. I'm just sad to see there is almost no new post on most of the sections...
Re: Mass editing shipsection/weapon files
Update 2020-1017
Haven't worked on improving the UI yet. Finished prototyping the code for batch rewrite <ShipOptionGroups> into uniform options, still need to work on differentiating between special cases like shield command and single section units. Lack of uniformity in file naming pattern is really not helping to make this process easier. Maybe I will fix that first, lol.
Most of the work for this part is learning how to navigate the XML child nodes with VBA code.
Echo
Echo
Echo
Echo
Echo
Haven't worked on improving the UI yet. Finished prototyping the code for batch rewrite <ShipOptionGroups> into uniform options, still need to work on differentiating between special cases like shield command and single section units. Lack of uniformity in file naming pattern is really not helping to make this process easier. Maybe I will fix that first, lol.
Most of the work for this part is learning how to navigate the XML child nodes with VBA code.
Echo
Echo
Echo
Echo
Echo
- Rossinna-Sama
- Posts: 1816
- Joined: Sun Nov 11, 2012 5:38 am
Re: Mass editing shipsection/weapon files
My net has been about as stable as a cat hanging from a curtain which is caught in a tornado.
But knock on wood, a new connection, new ISP and barring a new house (working on that), might allow me to actually do stuff again.
Will have to see, a lot of other stuff is still going on in the background.
But knock on wood, a new connection, new ISP and barring a new house (working on that), might allow me to actually do stuff again.
Will have to see, a lot of other stuff is still going on in the background.
Sword of the Stars 2 : Project Hiver Modder
Creator of the Work-In-Progress Seimei Visual Novel series.
My dream game: Combination of Sword of the Stars 2, Angels Fall First, Conquest: Frontier Wars and Warzone 2100.
Creator of the Work-In-Progress Seimei Visual Novel series.
My dream game: Combination of Sword of the Stars 2, Angels Fall First, Conquest: Frontier Wars and Warzone 2100.
Who is online
Users browsing this forum: No registered users and 1 guest