.Weapon, .Shipsection and .Tech File Editors

Share your mods and tricks of the trade here.
Post Reply
R2dical

.Weapon, .Shipsection and .Tech File Editors

Post by R2dical » Sat Apr 27, 2013 10:01 pm

This is a tool I made to help with adding/editing large numbers of .weapon/.shipsection files. It is written in VBA and is part of MS excel allowing you to use the spreadsheet capabilities to make many changes at the same time.

This should be quite useful for anyone looking to add many weapons/ships or techs and play with the balancing or change many/all of the characteristics of the existing data.
The beauty of this is it imports ALL possible data into a giant spreadsheet as well as export from there. You can then edit columns of data or make other sheets to add/change data.

It is quite a complex set of scripts, to handle the SOTS specific stuff, and so can be considered a beta. All features are there but there may be bugs, so give a shout if you find any :)

Weapon Database

The file is a spreadsheet with a number of macros(scripts):

- Import: to import a directory of .weapon files into a spreadsheet, MODIFIES EXISTING FILES SO BACKUP!
- Export: to write files out the spreadsheet into .weapon files
- Create _weapon.txt: Creates a weapon list for SOTS.
There is also a page listing EVERY possible code hook for weapon files, many have descriptions also.

Ships Database

Version 4 is working properly so far. Also includes a WeaponIcons.txt importer/exporter.

- Merge to database: Merge data from a source sheet to database
- Clean and Import: Import data, MODIFIES EXISTING FILES SO BACKUP!
- Export: to write files out the spreadsheet into .weapon files.
- Create _shipsection.txt: Creates a shipsection list for SOTS.
- Import WeaponIconPlacements: Import a WeaponIconPlacements.txt
- Export WeaponIconPlacements: Export to a WeaponIconPlacements.txt

There is also a page listing EVERY possible code hook for shipsection files, many have descriptions also.

Tech Database

New in version 4, can import and export MasterTechList.tech files as well as make some batch changes. It can modify all tech costs by a factor (2x, 0.5x, 0, etc) and modify race chances for a tech (0 to 100) quickly.

- Merge to database: Merge data from a source sheet to database
- Import
- Export
- Multiply Costs: Choose a factor to modify all costs by.
- Make chances X: Make all non 0 chances for a race (or all) a chosen value.

There is also a page listing EVERY possible code hook for tech files, many have descriptions also.

Update: Version 5
Adds many new features and 64 bit support.

Update: Version 6
Added a missing entry in the shipsection database.
Fixed 64 bit support.
Added stock data and some examples back in.

Update: Version 6.2
Fixed 64 bit support again x2.
Version 6.
Last edited by R2dical on Fri Sep 13, 2013 2:26 pm, edited 18 times in total.

R2dical

Re: .Weapon File Editor

Post by R2dical » Wed May 08, 2013 8:28 pm

Update V2:
- Fixed MANY major and minor bugs
- Import and export more flexible wrt variations in .weapon files and expected values.
- Included a Clean and Import feature which edits .weapon files to be correctly imported (no more Notepad++ find and replace :D ).
- Added some missing code hooks (Speed and Pd)
- Added optional import, export paths and weaponlist number user defaults.
- Included complete imported ANY 1.80 .weapons in the database sheet (delete values or copy sheet if you want only your own).

Be careful to read the readme, the new import option may corrupt .weapon files if used incorrectly.

File in first post

R2dical

Re: .Weapon File Editor

Post by R2dical » Sun May 12, 2013 12:10 pm

Version 2.1 update.

Added a .shipsection spreadsheet Alpha version.

It is still a WIP, imports and exports are not done correctly, but at least you can see all the code hooks that can be used in .shipsection files with some descriptions ;p
Last edited by R2dical on Tue Jul 09, 2013 12:52 pm, edited 3 times in total.

Alpha Centauri

Re: .Weapon File Editor

Post by Alpha Centauri » Fri May 17, 2013 6:35 pm

Very cool.

R2dical

Re: .Weapon File Editor

Post by R2dical » Sun May 19, 2013 2:16 am

Thanks.

This version has a bug with importing a few files. I'll upload the latest when I can...

Alpha Centauri

Re: .Weapon File Editor

Post by Alpha Centauri » Tue May 21, 2013 2:11 am

So far I've done my editing using python scripts, beyond compare, and textpad.

If I could ever figure out how to use blender worth a damn... and how to use the output of blender with Sots... I'd have to do a make-over mod with a new tech tree & new weapon techs. Sadly, I sucks at using Max and Blender. :(

R2dical

Re: .Weapon File Editor

Post by R2dical » Tue May 21, 2013 1:43 pm

If you have any useful tools feel free to post them here :)

The 3d stuff has a steep learning curve sure but in 7 - 10 hrs you can go from noob to intermediate I'd say. There are a few threads relating to blender stuff and I am planning to post a few, including a techtree tutorial, to wiki. Not mine mind as I use max...

If you're looking to go the modeling route feel free to post questions and ill help when I can. Like I said though most of the basics have already been covered for blender anyway.

User avatar
SpardaSon21
Posts: 1870
Joined: Mon Nov 03, 2008 6:24 am

Re: .Weapon File Editor

Post by SpardaSon21 » Tue May 21, 2013 7:39 pm

From what's happening it makes me wonder if Kerberos would ever end up releasing the source code for SotS ANY just so this game doesn't end up dying a slow lingering death like it is right now. They've clearly moved on to SotS2/The Pit and with proper licensing they could easily retain all rights to art assets and prevent commercial usage of the code like has happened with FreeSpace 2. Kerberos retaining ownership of visual assets would prevent the distribution of any art in the source, requiring people to have a full copy of the game in order to use any updated engine builds, driving future sales of Sword of the Stars, and prohibition of commercial usage would prevent people from releasing competitive commercial games.

For those who don't know what a source code release can do, Volition released the source to FreeSpace 2 in 2002 while retaining ownership of assets and prohibiting commercial usage, and the game is still going strong with both excellent sales on Gog.com (18 on their best seller list IIRC) and a very vibrant modding scene centered on the Hard Light Productions forums that is still seeing major mod releases even today. The code release and subsequent engine upgrade has even allowed a group of modders to create a freeware, commercial-quality, BSG-inspired space sim game named Diaspora: Shattered Armistice that uses the same updated engine as the rest of the FS2 modders.

User avatar
Lord Primus
Posts: 168
Joined: Thu Sep 27, 2012 7:01 pm

Re: .Weapon File Editor

Post by Lord Primus » Tue May 21, 2013 8:37 pm

Alpha,

You'll find that Warcat did a good tutorial for adding techtrees from Blender which works very well and isn't complicated.

3D models with textures for Apollo Effects Editor isn't too taxing either and you could learn it quickly.

Ship and sections and special items like mines and missiles, is a bit more advanced to model and texture but if you try your hand at say a bullet for an effect its a good learning curve. The difficulty with this last stage is getting it in game. If you check the recent post to do with Blender and adding a textured models you'll see the problems we have had with an exporter. However, I took the bullet and bought Ultimate Unwrap (£50 circa) and now I am modelling like no tomorrow.

Put you queries on here and help won't be far away.

Alpha Centauri

Re: .Weapon File Editor

Post by Alpha Centauri » Tue May 21, 2013 8:49 pm

Thanks for the feedback. I've posted the two python scripts I use in the past... but I'll update them here later (at work now).
I tried to get blender and max to work for me before - max didn't work right but that was probably due to being a shameless crack of version 9 which ultimately just didn't work right. Blender I had some success with following the online tutorials for it... but there were problems with 2.49 interface vs. 2.66 or whatever... so I learned a bit about one interface, only to have it not be the one that actually works for sots. :P

I looked at UU before... it's working for you, huh? I really am solid at writing code, but my math skills are brain-damaged, and I'm a total newb when it comes to understanding how the whole 3D thing fits together (like what to do wit the vertices, their color, how to export them, how to make UU work, what exactly it is doing for me, how to get anything useful out of it, etc).

I wish Kerberos would release their source code in some protected open-source fashion!!! But my (limited) understanding is that they're largely in the pickle they're in because they don't own their source... or rights to Sots prime. That Lighthouse did... and later, Paradox does. So .... it would be up to Paradox (not something I see them doing, given their part in the mess of sots2).

But... maybe! I could happily do coding for a mod. It would be amazing to have the symbols to be able to debug crashes! Work back to what in the mod was the issue. HUGE. Sigh...

R2dical

Re: .Weapon File Editor

Post by R2dical » Tue May 21, 2013 10:11 pm

Interesting stuff about the open source games sparta! Indead a source code release of sots would make me one happy puppy. Im fairly comfortable with c++ and would love to dig in. New races, ship, updated graphics...sigh. Doubt it would ever happen though, seems kerb is not even interested in mpnsupport.

One thing I did consider recently was reviving the fan mod project.we could definately get some wishlist stuff also. Hoping kerb would still keep their promise is risky though...maybe someday, I am still planing a human replacement so if I do it rockbug style I could use those as a shot at a fan race. This shipsection tool would speed things up. Hmm might be worth pming mecron...

Wrt 3d software, not much math skillz needed, if you can grasp apollo then you are good to go. I would highly reccomed max, there are some things you can only do in there for sots stuff...like shaders (unless you learn hlsl and write your own of course).
Max 9 is the best for sots but you can no longer buy it so a cracked version is the only option there, mine only required service pack 2 for win 7. I use 9 for export and 2012 for the actual work but that is just for convenience.

Blender 2.66 can work but yes you need to fiddle a bit. The microsoft dx sdk tools can do the same mesh transforms needed to get the models to show as uuw, and is free, but then you have to do your texturing in blender.

User avatar
Lord Primus
Posts: 168
Joined: Thu Sep 27, 2012 7:01 pm

Re: .Weapon File Editor

Post by Lord Primus » Wed May 22, 2013 6:09 am

Yes, you have to do the textures in blender but that's best, especially if you want to alter the model slightly.

In terms of Ultimate Unwrap, all I do with my models is open the fbx file and then just save it as directX 9.0. Very quick and very simple.

User avatar
SpardaSon21
Posts: 1870
Joined: Mon Nov 03, 2008 6:24 am

Re: .Weapon File Editor

Post by SpardaSon21 » Wed May 22, 2013 5:06 pm

R2dical wrote:Interesting stuff about the open source games sparta! Indead a source code release of sots would make me one happy puppy. Im fairly comfortable with c++ and would love to dig in. New races, ship, updated graphics...sigh. Doubt it would ever happen though, seems kerb is not even interested in mpnsupport.

Yeah, it really is amazing what's happened with FreeSpace 2. It actually sold extremely poorly when initially released (publisher didn't bother to do any real marketing for it), but since its been on GoG.com sales have exploded to the point where Gog.com actually increased the price from $5.99 to $9.99 due to all the demand. The fact it scores near the top of the Top 5 list of space sims doesn't hurt, plus the source code release back in 2002 has meant the engine has been upgraded to the point where the Source Code Project team is currently working on the second RC of 3.7.0! There are even experimental engine builds up for download with deferred rendering, glowpoint lighting, and shadows, not to mention the countless features and bugfixes added in the decade since the code release.

R2dical

Re: .Weapon File Editor

Post by R2dical » Wed May 22, 2013 9:36 pm

Wow, great story for freespace 2, I never knew. It would be pretty great if we had that opportunity with the sots engine. Although I do feel the community has moved on, if not to sots 2 then elsewhere. I don't know of even an open source free for all would pull in the masses with sots 2 getting close to polished. Well who knows with an uncertain sots 2 future it may be we get dev tools or even a open source for that further down the line.

R2dical

Re: .Weapon and .Shipsection File Editor

Post by R2dical » Thu Jun 20, 2013 8:55 pm

Don't know if anyone is using this, but new version (version 3) up on mediafire.
Last edited by R2dical on Tue Jul 09, 2013 12:52 pm, edited 1 time in total.

Post Reply

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 13 guests