Swapped Ship- and Station-Designs

Please post here for questions and discussion about data, event, art and sound modding and the game editor for Distant Worlds.

Moderator: MOD_DW2

User avatar
frankycl
Posts: 401
Joined: Mon Mar 01, 2021 5:16 pm

Swapped Ship- and Station-Designs

Post by frankycl »

Since I wasn't satisfied with the vanilla ship- and station-Designs for the different default races, but also wasn't able to alter them myself (at least not without using the complex Stride editor), I simply swapped the designs respectively races in order to make them more suitable for my taste. :mrgreen:

Here is what I changed:

RACES: -> swaped DESIGN:

Ackdarian -> Human
Human -> Ackdarian
Haakonisch -> Bosskara
Zenox -> Haakonisch
Boskara -> Mortalen
Mortalen -> Zenox

Teekan -> (unaltered)

If you want some screens of the changed design-allocation please see: https://www.matrixgames.com/forums/view ... 7#p4987537 ;)
or download:
Example-Screens1.zip
Ackdarian, Boskara and Haakonish
(4.63 MiB) Downloaded 35 times
Example-Screens2.zip
Human, Mortalen and Zenox
(5.37 MiB) Downloaded 29 times

PLEASE NOTE: The mod is compatible with ver. 1.0.4.6 of the game and I tested the designs with each race (and double-checked with Notepad++), but since I didn't mod/change anything else there might be some issues in the later game. - Use them at your own risk. (but if you want to help me and find some later issues, you can always tell me. ;))

Also: The changes will only take effect with a completely new game (and might cause some serious issues with other savegames, too - and can NOT be used with any mods that use the same ShipHulls.xml - i.e. unless you edit them manually) :!:
Additionally it will only work, untill a newly game patch will overwrite the ShipHulls.xml in the data-folder, but it also works with any savegame that was stored with the modded/fixed file in use. !

To use the file simply extract / copy (and and replace) it in the "data"-folder of the game (and don't forget to make a backup of the originally used file beforehand ;)). - Have fun. :D

Download.zip
ShipHulls.xml + README.txt
(302.75 KiB) Downloaded 13 times

------------------------------------------------------------------------------------------
Optionally you can also download the version of this mod from >Iunnrais< if you prefer to use the mod-loader (see here: https://www.matrixgames.com/forums/view ... 9#p4982629 ; thanks again, buddy ;) ).

DOWNLOAD.zip
ShipSwap.yml + README.txt
(4.71 KiB) Downloaded 11 times

I also tested this and it works perfectly, though needing a long time to load at game-start (at least on my system). :? !
However, it should also work with any savegame that had been saved with the mod in use and won't need to be updated with every new patch from the Devs. :mrgreen:
(unlike with the edited XML from above. :roll:)

You can download the mod-loader here (including instructions on how to install it): https://github.com/DW2MC/DW2ModLoader:D:
--------------------------------------------------------------------------------------------

Additionally those files are fixed, because I found some little bugs In the design-templates for some the Zenox ships that make it impossible to use the default engine-component-bays (or don't limit them at all). (see here: https://www.matrixgames.com/forums/view ... 8#p4992268)

I'd guess that there are several more, but I haven't tested this further more. Those are only the ones I've come across, so far.

This not only makes it impossible to use their full engine-potential (in cases where the limit is below the number of given component-bays - see above), but also cripples them optically.
Last edited by frankycl on Sat May 21, 2022 5:41 pm, edited 24 times in total.
User avatar
frankycl
Posts: 401
Joined: Mon Mar 01, 2021 5:16 pm

Update for game-version 1.0.2.1 (works also with 1.0.2.8)

Post by frankycl »

It was a lot of work, but finally it's done:

updated the files for game-version 1.0.2.1 - and this works with old savegames, that had my old >ShipHulls.xml<, too ! :mrgreen:
(Also: In the game-updates 1.0.2.2-1.0.2.8 the >ShipHulls.xml< wasn't altered - so it should work with these versions, too. ;-))
Last edited by frankycl on Sat Apr 02, 2022 11:55 am, edited 3 times in total.
User avatar
Iunnrais
Posts: 28
Joined: Sat Mar 12, 2022 3:00 am

Re: Swapped Ship- and Station-Designs

Post by Iunnrais »

You know, I think I like this change. Especially since humans have the unique fighters, and now get to use them more.
User avatar
frankycl
Posts: 401
Joined: Mon Mar 01, 2021 5:16 pm

Re: Swapped Ship- and Station-Designs

Post by frankycl »

Iunnrais wrote: Tue Mar 22, 2022 10:32 am You know, I think I like this change. Especially since humans have the unique fighters, and now get to use them more.
Thanks :) - but if you prefer even more changes in ship-roles or ship-categories (and not only the more visual approach I pursued with this mod) you could even change them between the diferent races very easily (although there aren't really big diferences between them, as far as I know :| - but you could change this, too) - and I could show you how (if you like). ;)
User avatar
frankycl
Posts: 401
Joined: Mon Mar 01, 2021 5:16 pm

Re: Swapped Ship- and Station-Designs

Post by frankycl »

Found a little bug in the Ship Design(er) that also affects my mod. :(
Because of the fact that the Devs are still very busy with solving more serious problems, I will fix this manually by myself in the meantime (but it's not a very easy task, so it 'll take a while). ;)

However, I also have reported the bug to the Devs via the officially form, too, In order to also get to include this fix in a future update (whenever this will be). :idea:

Here are the sceens that indicate the bug:

Ashampoo_Snap_Montag, 28. März 2022_21h19m36s_002_.png
Ashampoo_Snap_Montag, 28. März 2022_21h19m36s_002_.png (42.09 KiB) Viewed 2488 times
Ashampoo_Snap_Montag, 28. März 2022_21h19m09s_001_.png
Ashampoo_Snap_Montag, 28. März 2022_21h19m09s_001_.png (1.23 MiB) Viewed 2488 times

As you might have noticed it's the wrong ship model that the game uses in this case (at the start of a game - with NO built ships by myself) :?

Here is the FIX for the vanilla version of the game (1.0.3.1) - (the fix for the mod will be put in the topic-post above):

BugFIX.zip
ShipHulls,xml + Readme.txt
(302.07 KiB) Downloaded 13 times

Please Note: Additionally I found out that there is also a ship design model for the Haakonish medium freighter that wasn't used by the game at all (60-cargo_medium.shmd) - therefore I updated/fixed the downloadable files once more. :D
(That means, if you had already downloaded/used the first fix (with the 60-cargo_large.shmd that was created; s. topic/thread in Steam) you can now delete the 60-cargo_large.shmd, too, if you want to get rid of the wrong design file completely. ;) )
Last edited by frankycl on Tue Apr 05, 2022 7:58 pm, edited 3 times in total.
User avatar
frankycl
Posts: 401
Joined: Mon Mar 01, 2021 5:16 pm

Re: Swapped Ship- and Station-Designs

Post by frankycl »

Added the fixed file for the Haakonish medium freighter (the game uses a wrong ship model (fuel tanker) for auto design; -see here: https://www.matrixgames.com/forums/view ... 4#p4980784) to the topic-post. ;)
User avatar
frankycl
Posts: 401
Joined: Mon Mar 01, 2021 5:16 pm

Re: Swapped Ship- and Station-Designs

Post by frankycl »

Additionally to the posts above I found out that there is also a ship design model for the Haakonish medium freighter that wasn't used by the game at all (60-cargo_medium.shmd) - therefore I updated/fixed the downloadable files once more. :D
User avatar
Iunnrais
Posts: 28
Joined: Sat Mar 12, 2022 3:00 am

Re: Swapped Ship- and Station-Designs

Post by Iunnrais »

A recent update modified and overwrote this... and enough changes were made that this mod is no longer compatible. Need to convert this to YML... I started working on it, but there's SO MANY ENTRIES. I need to think of a way to automate the conversion.
User avatar
Iunnrais
Posts: 28
Joined: Sat Mar 12, 2022 3:00 am

Re: Swapped Ship- and Station-Designs

Post by Iunnrais »

Figured out an overly complicated regex to do it. Here we go! This requires the ModLoader, and should theoretically work on any version of the game.
ShipSwap.zip
Requires ModLoader
(3.61 KiB) Downloaded 17 times
User avatar
frankycl
Posts: 401
Joined: Mon Mar 01, 2021 5:16 pm

Re: Swapped Ship- and Station-Designs

Post by frankycl »

Iunnrais wrote: Fri Apr 01, 2022 11:41 am Figured out an overly complicated regex to do it. Here we go! This requires the ModLoader, and should theoretically work on any version of the game.
What do you mean - what's "an overly complicated regex" ? :?:

And you have forgotten to tell us what you have changed in your mod (?) ;)

EDIT: Or did you want to make my edits a bit more / easier manageable ? - Well, if that's the case - thank you ! :D
(But I'll also will update this when the next officiall patch will be out (next tuesday, assumingly) - since I, personally don't want to use the mod-loader atm.. ;) And yes, in the last Beta-patch Erik wrote about some fixes/changes regarding shiphulls - but for me that's not very important, since you can't download the Beta-patch on GOG yet (without Galaxy). :(
User avatar
Iunnrais
Posts: 28
Joined: Sat Mar 12, 2022 3:00 am

Re: Swapped Ship- and Station-Designs

Post by Iunnrais »

It's just your mod in ModLoader format. Well, more specifically, it's just the ship swapping, I couldn't find your bugfix edit in the file so that's not included. It's more convenient in that it can be combined with other mods that also alter the hulls file, and also won't vanish when the devs update the file (like they did in the beta).

As for "overly complicated regex", that's just how I made it. I took your mod, used a very complicated search and replace (regular expression = regex) and turned it into a YML file. I had originally tried converting it manually, by hand, one ship at a time, and that was proving ridiculously tedious.
User avatar
frankycl
Posts: 401
Joined: Mon Mar 01, 2021 5:16 pm

Re: Swapped Ship- and Station-Designs

Post by frankycl »

Iunnrais wrote: Sat Apr 02, 2022 1:28 am It's just your mod in ModLoader format. Well, more specifically, it's just the ship swapping, I couldn't find your bugfix edit in the file so that's not included. It's more convenient in that it can be combined with other mods that also alter the hulls file, and also won't vanish when the devs update the file (like they did in the beta).
Thanks again, in the name of the players that want to use the mod-loader. :mrgreen:
(I, personally, don't want to use it atm, because it alters the mod-variables if two (or more) mods and/or the vanilla vesion use the same tags/IDs (see here: https://www.matrixgames.com/forums/view ... 2#p4979202)
I guess that the Devs will present us with an even better solution to this sooner or later (like e.g. GalCiv3 handles those issues already). ;)
Iunnrais wrote: Sat Apr 02, 2022 1:28 am As for "overly complicated regex", that's just how I made it. I took your mod, used a very complicated search and replace (regular expression = regex) and turned it into a YML file. I had originally tried converting it manually, by hand, one ship at a time, and that was proving ridiculously tedious.
Yes, it's very tedious (and it's difficult to find the sections they edit in the patches, too :( ), but with some patience (and time to spare) it's possible. - Nevertheless, it would be very interesting (and save me a lot of time, I guess) to know how you automated this (since I'm not too versed with regular expressions) - would you mind to tell me/us your "very complicated search and replace"-formula (please) ? ;)
User avatar
Iunnrais
Posts: 28
Joined: Sat Mar 12, 2022 3:00 am

Re: Swapped Ship- and Station-Designs

Post by Iunnrais »

It wouldn't be a lot of use to you, particularly, since this is for the purpose of getting rid of all the XML except the bits I wanted.

Code: Select all

^(?!(\s*<ShipHullId>|\s*<RaceId>)).*
This regex matches everything except the lines containing the <ShipHullId> or the <RaceId>. I use this to delete everything but this part. Then a more normal search/replace can be used to transform it into YML format.
User avatar
frankycl
Posts: 401
Joined: Mon Mar 01, 2021 5:16 pm

Re: Swapped Ship- and Station-Designs

Post by frankycl »

Iunnrais wrote: Sat Apr 02, 2022 7:37 am It wouldn't be a lot of use to you, particularly, since this is for the purpose of getting rid of all the XML except the bits I wanted.

Code: Select all

^(?!(\s*<ShipHullId>|\s*<RaceId>)).*
This regex matches everything except the lines containing the <ShipHullId> or the <RaceId>. I use this to delete everything but this part. Then a more normal search/replace can be used to transform it into YML format.
Ok, thanks again - this is indeed very helpful. :mrgreen:
(but I only changed the values for the <RaceId>-tags, so far - so you might include the other tags in your "delete everything but this part", too. ;) )
User avatar
frankycl
Posts: 401
Joined: Mon Mar 01, 2021 5:16 pm

Re: Swapped Ship- and Station-Designs

Post by frankycl »

Iunnrais wrote: Fri Apr 01, 2022 11:41 am Here we go! This requires the ModLoader, and should theoretically work on any version of the game.
Since it seemed that you didn't want to change anything anymore, I updataed the topic-post and offered your download in there, too (tanks again for your help, friend. :D )
User avatar
frankycl
Posts: 401
Joined: Mon Mar 01, 2021 5:16 pm

Re: Swapped Ship- and Station-Designs

Post by frankycl »

Updated the files for game-version 1.0.3.1 - and this works with old savegames, that had my old >ShipHulls.xml<, too ! :mrgreen:
(For those of you who don't want to use the modloader. ;-))

EDIT: (Also: In the game-update 1.0.3.3 the >ShipHulls.xml< wasn't altered - so it should work with this versions, too. ;-))
User avatar
frankycl
Posts: 401
Joined: Mon Mar 01, 2021 5:16 pm

Re: Swapped Ship- and Station-Designs

Post by frankycl »

Iunnrais wrote: Fri Apr 01, 2022 11:41 am ShipSwap.zip
Hey Iunnrais. I too tested your mod-loader mod now - and it works perfectly (at least for me). :mrgreen:
But I would like to grow on this even more (since my mod is far from finished, yet ;-)) - So, I have to ask (you or anybody other who knows this): Could I just add some more changes in the YML file (for each ship-ID) under the "update"-sections ?

like e.g.:

Code: Select all

    - update:
        ShipHullId: 60
        RaceId: 7     # Mortalen -> Zenox
        ModelName: Ships/Haakonish/cargo_medium     #(that would be the fix for the medium freighter  ;) )
        
EDIT: Ok, I found out myself: it's possible without any problems. :D (and I'll update the YML-file; -will update "your" download soon, too. ;-))
Only problem, so far: the game-start is clearly slower than without the mod. :? (but I (/my son) will look into this, too. ;))


(But you mixed that up, I think (and yes, I know that you copied it from my post) ! - the comment should be:
# Haakonisch -> Zenox - if you mean the ship design, because the Zenox have now the ship design that the Haakonish had in the vanilla version. - "Mortalen -> Zenox" (in my post) means that the Mortalen now have the ship design that the Zenox had in vanilla. ;) )
User avatar
frankycl
Posts: 401
Joined: Mon Mar 01, 2021 5:16 pm

Re: Swapped Ship- and Station-Designs

Post by frankycl »

Updated the files for the version from >Iunnrais< if you prefer to use the mod-loader.
This should work with any savegame and won't need to be updated with every new patch from the Devs. :mrgreen:

Additionally all files are now fixed, regarding the bug for the Haakonish medium freighter (the game uses a wrong ship model (fuel tanker) for auto design); - equals the Zenox medium freighter in the mod). ;)
User avatar
frankycl
Posts: 401
Joined: Mon Mar 01, 2021 5:16 pm

Re: Swapped Ship- and Station-Designs

Post by frankycl »

Since I was asked for, I made some screens of the new design-allocations and their related homeworlds in an exemplary game:

1. Ackdarian
Ackdarian.png
Ackdarian.png (1.85 MiB) Viewed 1808 times

2. Human
Human.png
Human.png (1.34 MiB) Viewed 1808 times

3. Haakonish
Haakonish.png
Haakonish.png (1.39 MiB) Viewed 1808 times

4. Zenox
Zenox.png
Zenox.png (2.28 MiB) Viewed 1808 times

... to be contiued (due to attachment-limitations in the post :? ) - see below:
Last edited by frankycl on Fri Apr 15, 2022 8:34 pm, edited 1 time in total.
User avatar
frankycl
Posts: 401
Joined: Mon Mar 01, 2021 5:16 pm

Re: Swapped Ship- and Station-Designs

Post by frankycl »

... continuation from above:

5. Boskara
Boskara.png
Boskara.png (1.39 MiB) Viewed 1805 times

6. Mortalen
Mortalen.png
Mortalen.png (1.74 MiB) Viewed 1805 times
Post Reply

Return to “Design and Modding”