Which files apply for Ship Hulls?

The Galaxy Lives On! Distant Worlds, the critically acclaimed 4X space strategy game is back with a brand new 64-bit engine, 3D graphics and a polished interface to begin an epic new Distant Worlds series with Distant Worlds 2. Distant Worlds 2 is a vast, pausable real-time 4X space strategy game. Experience the full depth and detail of turn-based strategy, but with the simplicity and ease of real-time, and on the scale of a massively-multiplayer online game.

Moderator: MOD_DW2

Post Reply
OrnluWolfjarl
Posts: 341
Joined: Fri Oct 20, 2017 8:36 pm

Which files apply for Ship Hulls?

Post by OrnluWolfjarl »

I've noticed in the game files for Ship Hulls that there are several files:
Ship Hulls.png
Ship Hulls.png (36.81 KiB) Viewed 1346 times
The "ShipHulls" file seems to contain all the ship hulls in the game.

The other files contain the ship hulls for each specific race/faction.

The thing is, there are differences in the values for most properties of hulls between "ShipHulls" and "ShipHulls_[Specific]".

My question is, which files contain the correct information which applies in game? Am I correct to assume the specific files overwrite the "ShipHulls" general file?
User avatar
iancmtaylor
Posts: 181
Joined: Wed May 09, 2012 6:38 pm

Re: Which files apply for Ship Hulls?

Post by iancmtaylor »

I am 99% certain that shiphulls is deprecated. If you delete it and run Steam validate, it probably won't come up as missing.

They exploded the file to make it easier to mod I'm assuming. Probably easier for them to work on as well. Hopefully Research and Components get exploded too, though I'm not sure how they would chop them up.
I am /u/SharkMolester, moderator of /r/DistantWorlds and BFHKitteh, admin of https://dw2.fandom.com/wiki/Distant_Worlds_2_Wiki.
OrnluWolfjarl
Posts: 341
Joined: Fri Oct 20, 2017 8:36 pm

Re: Which files apply for Ship Hulls?

Post by OrnluWolfjarl »

Thanks. I assumed the same, but I'd like confirmation, before I can start going through it.
Sabranan
Posts: 486
Joined: Wed Feb 24, 2016 4:05 pm

Re: Which files apply for Ship Hulls?

Post by Sabranan »

The ShipHulls file is indeed deprecated, I split it up by race once that became possible because it's much easier to work with that way.

The way it works is it'll load the base ShipHulls.xml file, then override anything that has the same ID in the ShipHulls*.xml files. This effectively means everything gets overridden in ShipHulls.xml, so the race specific files should be taken as having the "correct" values.

We left the ShipHulls.xml file in place just in case any modders had edited versions of it, didn't want to automatically delete their work.

As for the Research & Component files, at present time I only plan to split them for the DLC races.

Edit: Just to be clear, unless you've done your own custom work on it, you can safely delete the ShipHulls.xml file if you like.
OrnluWolfjarl
Posts: 341
Joined: Fri Oct 20, 2017 8:36 pm

Re: Which files apply for Ship Hulls?

Post by OrnluWolfjarl »

Sabranan wrote: Fri May 05, 2023 11:55 am The ShipHulls file is indeed deprecated, I split it up by race once that became possible because it's much easier to work with that way.

The way it works is it'll load the base ShipHulls.xml file, then override anything that has the same ID in the ShipHulls*.xml files. This effectively means everything gets overridden in ShipHulls.xml, so the race specific files should be taken as having the "correct" values.

We left the ShipHulls.xml file in place just in case any modders had edited versions of it, didn't want to automatically delete their work.

As for the Research & Component files, at present time I only plan to split them for the DLC races.

Edit: Just to be clear, unless you've done your own custom work on it, you can safely delete the ShipHulls.xml file if you like.
Thank you very much. I appreciate the detailed answer!

Indeed, it's much easier to use the files this way.

While I find Components mostly fine (though perhaps a split along Component Bays could be done), Research is indeed bloated.

At any rate, you've answered my question. Thank you!
User avatar
rxnnxs
Posts: 639
Joined: Sat Jun 01, 2013 10:25 am
Location: what goes on
Contact:

Re: Which files apply for Ship Hulls?

Post by rxnnxs »

Thank you, that is very interesting indeed.
Unfortunately with this technique, it is not possible to make a translation to another language without interfering with lets say other changes that another mod does.
Since it is overwriting a whole id, if I want to change the name, the size of the ship is then standard, even if a different mod changed that.

SO there is no way to make a translation and a ship size mod that exist besides each other.

this is also happening with the orbType.xml where the planet description is inside an ID as well as for instance the orbit around the sun.

And lets say we make a change to the names and a future dlc adds or splits the research tree, we would have to copy and paste from the big files our changes to the splitted files if I understood it correct.
So it would be better if we wait for such changes? it would mean much more work for every change that is made to those xmls.

Or is there any workaround for this problem?
OrnluWolfjarl
Posts: 341
Joined: Fri Oct 20, 2017 8:36 pm

Re: Which files apply for Ship Hulls?

Post by OrnluWolfjarl »

@Sabranan: I have another question. All stations have an engine limit of -1. Some ships also have an engine limit of -1.

Does this mean that these ships don't have a limit on engines, and can fill up all their engine slots. Is this intentional or is it a bug?

I've also found one instance where a Starfighter's Engine Limit is 0. Does that also mean there's no limit, or is this also a bug?
Sabranan
Posts: 486
Joined: Wed Feb 24, 2016 4:05 pm

Re: Which files apply for Ship Hulls?

Post by Sabranan »

The <EngineLimit> value is for when a ship is supposed to have an even number of engines.

So if we have a ship hull that we want to have 4 engines, we'd actually place 5 engine component slots and set the EngineLimit to 4. We keep the total number of engine component slots odd so the designer can always make symmetrical engine layouts regardless of how many engines the player actually puts on the model.

-1 is just the default "limited only by available engine component slots" value.

It shouldn't be 0 though, at some point when I've not got lots of events and new ship hull stuff to do I'll do another pass over all the base game race ship hulls to eliminate little oddities like that!
OrnluWolfjarl
Posts: 341
Joined: Fri Oct 20, 2017 8:36 pm

Re: Which files apply for Ship Hulls?

Post by OrnluWolfjarl »

Sabranan wrote: Wed May 10, 2023 12:12 am The <EngineLimit> value is for when a ship is supposed to have an even number of engines.

So if we have a ship hull that we want to have 4 engines, we'd actually place 5 engine component slots and set the EngineLimit to 4. We keep the total number of engine component slots odd so the designer can always make symmetrical engine layouts regardless of how many engines the player actually puts on the model.

-1 is just the default "limited only by available engine component slots" value.

It shouldn't be 0 though, at some point when I've not got lots of events and new ship hull stuff to do I'll do another pass over all the base game race ship hulls to eliminate little oddities like that!
Thank you once again, very informative answer!

I've found some other oddities (weird unique weapon arcs, missing values, etc) and I'm making a list of them. I'll post it in tech support once I'm done.
OrnluWolfjarl
Posts: 341
Joined: Fri Oct 20, 2017 8:36 pm

Re: Which files apply for Ship Hulls?

Post by OrnluWolfjarl »

@Sabranan: Yet another question, if you have the time:

What is the purpose of the "ShipHulls_Art" file?

I noticed that IDs for Ship Hulls in this file do not match their counterparts in the Specific race files. Is this also a redundant file that isn't really used by the game anymore?
User avatar
frankycl
Posts: 402
Joined: Mon Mar 01, 2021 5:16 pm

Re: Which files apply for Ship Hulls?

Post by frankycl »

OrnluWolfjarl wrote: Sun May 14, 2023 12:35 pm @Sabranan: Yet another question, if you have the time:

What is the purpose of the "ShipHulls_Art" file?
This question was already answered by Erik - see here: https://steamcommunity.com/app/1531540/ ... 5490530531

;)
User avatar
rxnnxs
Posts: 639
Joined: Sat Jun 01, 2013 10:25 am
Location: what goes on
Contact:

Re: Which files apply for Ship Hulls?

Post by rxnnxs »

The answer is:
It is for those that create stories and for modders in the future.
I am looking forward.. but I can not see it clearly - it is covered in mist.. I see a nebula and very vague a second dlc coming..
Post Reply

Return to “Distant Worlds 2”