Expansion mod

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

Moderators: Icemania, elliotg

Alvek
Posts: 279
Joined: Fri Mar 24, 2023 9:47 pm
Location: Kyiv

Re: Expansion mod

Post by Alvek »

CaesarAug wrote: Tue Mar 17, 2026 9:16 pm When you say shipset11 you mean family11? Interesting the possible error. But that really shouldn’t be a problem since I don’t recall having encountered this issue in my Star Trek Kirk Era Mod with 45 playable races. Nor in the EM version of DWUR with 46 races.

It’s something peculiar with this Star Wars Universe Mod with 30 races. By the way, the version I uploaded incorporates the latest changes I made: deleting several same-class capitalship png images for the Empire. I think there were 7 or 8 capitalship images, maybe there were too many for the game to calculate correctly?

With this uploaded version, I play-tested a little but this time without the error messages and crashes. Need more testing time but it looks somewhat hopeful…
This error looks same as incorrect shipset loaded for certain races in BM that i fixed.
In short with large numer of shipsets you select incorrect images as there is enough to stay in range, with low number you think there is more images than the are and crash on accessing beyond array border.

Edit: will know for shute after debugging. Iirc game ignores additional images and use only hardcoded names for designs
User avatar
CaesarAug
Posts: 537
Joined: Tue Jun 23, 2015 4:54 am

Re: Expansion mod

Post by CaesarAug »

I remember that, yes, when the game mismatched races and shipsets. Strange that it should happen again in this mod.

Thinking some more: Could a png image file be too big for the game to handle? The game manual states 300x300 pixels though 500x500 pixels work ok. If I remember correctly, one Empire destroyer image may be 2048x2048 pixels in size. Could that cause a problem maybe?
Alvek
Posts: 279
Joined: Fri Mar 24, 2023 9:47 pm
Location: Kyiv

Re: Expansion mod

Post by Alvek »

CaesarAug wrote: Tue Mar 17, 2026 9:27 pm I remember that, yes, when the game mismatched races and shipsets. Strange that it should happen again in this mod.

Thinking some more: Could a png image file be too big for the game to handle? The game manual states 300x300 pixels though 500x500 pixels work ok. If I remember correctly, one Empire destroyer image may be 2048x2048 pixels in size. Could that cause a problem maybe?
Looks like there is same logic to select family in different places, so same error in different cases.

Image size doesn't matter unless you are out of memory. During drawings game resizes image anyway, you can probably use 3x3 size
Alvek
Posts: 279
Joined: Fri Mar 24, 2023 9:47 pm
Location: Kyiv

Re: Expansion mod

Post by Alvek »

Code for selecting design image gets even more confusing. Looks like it ignores what you selected and changes only small image for design panel, not actual image ships will use. I haven't even got to out of range bug %)
User avatar
CaesarAug
Posts: 537
Joined: Tue Jun 23, 2015 4:54 am

Re: Expansion mod

Post by CaesarAug »

Well, that is another issue: for some strange reason, selecting alternate ship images for a given class do not normally “save” the first time. I usually need to make some change in components, or manually change the role (for example, temporarily change from capitalship to cruiser, then change again to capitalship), or manually change the ship-class name. Some sort of change before finally getting the new ship image in the design panel and also in the game.
Alvek
Posts: 279
Joined: Fri Mar 24, 2023 9:47 pm
Location: Kyiv

Re: Expansion mod

Post by Alvek »

CaesarAug wrote: Thu Mar 19, 2026 3:55 pm Well, that is another issue: for some strange reason, selecting alternate ship images for a given class do not normally “save” the first time. I usually need to make some change in components, or manually change the role (for example, temporarily change from capitalship to cruiser, then change again to capitalship), or manually change the ship-class name. Some sort of change before finally getting the new ship image in the design panel and also in the game.
As far as I can tell right now you can only assign images from same sub roles, designer just displays whatever you selected and assign same image it used or from other family randomly if there is more than one found.
Changing role doesn't change image so that should work, still bugged behavior.
User avatar
CaesarAug
Posts: 537
Joined: Tue Jun 23, 2015 4:54 am

Re: Expansion mod

Post by CaesarAug »

Oh yes, it still is a bugged behaviour. As you can see in the Empire’s ship family9 (I think it’s family9) I have named the images thus: capitalship, capitalship1, capitalship2… and for cruisers likewise. Is this naming correct? The Bacon Mod introduced multiple ship-class images and I’ve been playing like this ever since, and now with the Expansion Mod.
User avatar
CaesarAug
Posts: 537
Joined: Tue Jun 23, 2015 4:54 am

Re: Expansion mod

Post by CaesarAug »

Good news, Alvek! salemonz has provided the answer: non-existent pirate families are called for by certain races. There were four Star Wars races which referenced non-existent pirate families, 47 and 49, just the ones reported "missing" in the error messages which crashed the game. Changing to existing ship families should correct the issue. Excellent find.

Now the remaining issue is the "bug" regarding switching ship-class images, without having to work-around it... :mrgreen:
Last edited by CaesarAug on Thu Mar 19, 2026 4:28 pm, edited 1 time in total.
Alvek
Posts: 279
Joined: Fri Mar 24, 2023 9:47 pm
Location: Kyiv

Re: Expansion mod

Post by Alvek »

CaesarAug wrote: Thu Mar 19, 2026 4:06 pm Oh yes, it still is a bugged behaviour. As you can see in the Empire’s ship family9 (I think it’s family9) I have named the images thus: capitalship, capitalship1, capitalship2… and for cruisers likewise. Is this naming correct? The Bacon Mod introduced multiple ship-class images and I’ve been playing like this ever since, and now with the Expansion Mod.
Haven't seen anywhere code about loading multiple images for subrole. There is even math to get right image index for family like "shipset image count * family + subRoleId"
It would fail on multiple images per subrole
Alvek
Posts: 279
Joined: Fri Mar 24, 2023 9:47 pm
Location: Kyiv

Re: Expansion mod

Post by Alvek »

CaesarAug wrote: Thu Mar 19, 2026 4:27 pm Good news, Alvek! salemonz has provided the answer: non-existent pirate families are called for by certain races. There were four Star Wars races which referenced non-existent pirate families, 47 and 49, just the ones reported "missing" in the error messages which crashed the game. Changing to existing ship families should correct the issue. Excellent find.
Added code to check and crash if loaded race info doesn't have corresponding shipset images to avoid errors during playing.
Trying to figure out image selection bug
jayman
Posts: 54
Joined: Fri Jul 14, 2023 12:39 pm
Location: United Kingdom

Re: Expansion mod

Post by jayman »

CaesarAug wrote: Thu Mar 19, 2026 3:55 pm Well, that is another issue: for some strange reason, selecting alternate ship images for a given class do not normally “save” the first time. I usually need to make some change in components, or manually change the role (for example, temporarily change from capitalship to cruiser, then change again to capitalship), or manually change the ship-class name. Some sort of change before finally getting the new ship image in the design panel and also in the game.
I remember using destroyer1, 2, 3 etc in Bacon mod but I thought EM had removed it as I couldn't get it to work. I must try your work-around for it as it's handy having different images for things like escort destroyers (more anti-fighter weapons) and attack destroyers (more missiles/beam weapons) and things like that. As I graduated from naval warfare games to space-based 4x ones I still have the ship-role mindset and use different sub-types in my games, which can get confusing it they all look the same.

DWU is still great even after 10 years (and addictive, I've stayed up until 4 in the morning playing it!), particularly with the upgrades Salemonz and Alvek have made to it.
Last edited by jayman on Thu Mar 19, 2026 7:31 pm, edited 1 time in total.
Alvek
Posts: 279
Joined: Fri Mar 24, 2023 9:47 pm
Location: Kyiv

Re: Expansion mod

Post by Alvek »

jayman wrote: Thu Mar 19, 2026 7:22 pm I remember using destroyer1, 2, 3 etc in Bacon mod but I thought EM had removed it as I couldn't get it to work.
Looks like I need to check original bacon code to check for this
User avatar
CaesarAug
Posts: 537
Joined: Tue Jun 23, 2015 4:54 am

Re: Expansion mod

Post by CaesarAug »

jayman wrote: Thu Mar 19, 2026 7:22 pm
CaesarAug wrote: Thu Mar 19, 2026 3:55 pm Well, that is another issue: for some strange reason, selecting alternate ship images for a given class do not normally “save” the first time. I usually need to make some change in components, or manually change the role (for example, temporarily change from capitalship to cruiser, then change again to capitalship), or manually change the ship-class name. Some sort of change before finally getting the new ship image in the design panel and also in the game.
I remember using destroyer1, 2, 3 etc in Bacon mod but I thought EM had removed it as I couldn't get it to work. I must try your work-around for it as it's handy having different images for things like escort destroyers (more anti-fighter weapons) and attack destroyers (more missiles/beam weapons) and things like that. As I graduated from naval warfare games to space-based 4x ones I still have the ship-role mindset and use different sub-types in my games, which can get confusing it they all look the same.

DWU is still great even after 10 years (and addictive, I've stayed up until 4 in the morning playing it!), particularly with the upgrades Salemonz and Alvek have made to it.

Good luck! Like I mentioned, I can eventually get alternate ship-class images to work but it doesn’t work as it should. So by trying different “changes” it eventually works, but it is erratic behaviour, and I can’t seem to figure out exactly what “changes” makes it work.

Oh yes, DWU is an awesome game, Alvek and salemonz have done some remarkable modding to considerably improve gameplay. And yes, it is incredibly addictive, even after all these years.
User avatar
CaesarAug
Posts: 537
Joined: Tue Jun 23, 2015 4:54 am

Re: Expansion mod

Post by CaesarAug »

Alvek wrote: Thu Mar 19, 2026 5:03 pm
CaesarAug wrote: Thu Mar 19, 2026 4:27 pm Good news, Alvek! salemonz has provided the answer: non-existent pirate families are called for by certain races. There were four Star Wars races which referenced non-existent pirate families, 47 and 49, just the ones reported "missing" in the error messages which crashed the game. Changing to existing ship families should correct the issue. Excellent find.
Added code to check and crash if loaded race info doesn't have corresponding shipset images to avoid errors during playing.
Trying to figure out image selection bug
Great! Given your modding experience at the .exe level, I’m sure you’ll fix the alternate ship-class image issue. :mrgreen:
Post Reply

Return to “Design and Modding”