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

Post Reply
Alvek
Posts: 205
Joined: Fri Mar 24, 2023 9:47 pm
Location: Kyiv

Re: Expansion mod

Post by Alvek »

If I haven't missed something in code then you missing gasminingship.png in family1 folder.
This mod fixed old BaconMod error that only mining ship\base image was used and gas images was ignored. Maybe your mod missing this files?
User avatar
Retreat1970
Posts: 1125
Joined: Wed Nov 06, 2013 11:09 am
Location: Wisconsin

Re: Expansion mod

Post by Retreat1970 »

Files are present. Each popup in the image was a different type of ship (freighter, mining, etc...). I'll play some more to gather more clues.
User avatar
Retreat1970
Posts: 1125
Joined: Wed Nov 06, 2013 11:09 am
Location: Wisconsin

Re: Expansion mod

Post by Retreat1970 »

2023-06-12_150213.jpg
2023-06-12_150213.jpg (39.9 KiB) Viewed 1003 times
So it happens occasionally, but family-1 (negative) is strange. Earlier today I noticed I had a new crash dump:

System.Threading.ThreadAbortException: Thread was being aborted.
at System.Windows.Forms.SafeNativeMethods.MessageBox(HandleRef hWnd, String text, String caption, Int32 type)
at System.Windows.Forms.MessageBox.ShowCore(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, Boolean showHelp)
at BaconDistantWorlds.BaconDesign.SetPictureRef(Design design, Int32 originalValue)
at BaconDistantWorlds.BaconEmpire.CreateNewDesigns(Empire empire, Int64 designDate, Boolean forceUpdate, Int32 designRoleToChange)
at DistantWorlds.Types.Empire.ReviewDesignsAndRetrofit()
at DistantWorlds.Types.Empire.DoTasksPirates()
at DistantWorlds.Types.Empire.DoTasks()
at DistantWorlds.Main.method_96(Object object_7)

But this was 8 hours ago and I've had the popups since then.
User avatar
salemonz
Posts: 133
Joined: Tue May 19, 2015 2:37 pm
Location: USA

Re: Expansion mod

Post by salemonz »

Might be DWUR in part. For many races that supposedly aren't allowed to be pirates, they would have (-1) as the family value for pirate ships. I applied that value for each race that weren't allowed to be pirates. But...I can go through and just give them valid number assignments and see if that clears things up.
Alvek
Posts: 205
Joined: Fri Mar 24, 2023 9:47 pm
Location: Kyiv

Re: Expansion mod

Post by Alvek »

"-" in family name is weird, no such symbols in code during message generation.
Only thing I can imagine is that save file got corrupted and saved later or exe file got corrupted due to disk error, but that is very improbable. Can you upload your mod and save file so I can debug them locally?
Beside uploading you can test if same error exist in BaconMod or my mod versions 1.05 and below (version 1.06 got performance update that could potentially be the source of this bug, but I haven't found any way to get family name with "-").
Most confusing thing to me how "family-1" string got created, in code family text is hard-coded and number added to end of string.
Alvek
Posts: 205
Joined: Fri Mar 24, 2023 9:47 pm
Location: Kyiv

Re: Expansion mod

Post by Alvek »

salemonz wrote: Mon Jun 12, 2023 8:32 pm Might be DWUR in part. For many races that supposedly aren't allowed to be pirates, they would have (-1) as the family value for pirate ships. I applied that value for each race that weren't allowed to be pirates. But...I can go through and just give them valid number assignments and see if that clears things up.
Well, that explains -1 number. I will try to test this tomorrow, maybe that bug is pirates empire going legit or something similar.
User avatar
salemonz
Posts: 133
Joined: Tue May 19, 2015 2:37 pm
Location: USA

Re: Expansion mod

Post by salemonz »

I just made sure every race has a valid number for pirate ship designs, even if they are flagged N for being pirates. Hopefully that clears things up.

Replaced the DWUR files, but kept it as version 0.9.4, so it shouldn't mess with any save files. Specifically you just need to replace the txt files in the races folder.

https://www.mediafire.com/file/29apn8m2 ... 4.zip/file
User avatar
salemonz
Posts: 133
Joined: Tue May 19, 2015 2:37 pm
Location: USA

Re: Expansion mod

Post by salemonz »

Alvek wrote: Mon Jun 12, 2023 8:52 pm Well, that explains -1 number. I will try to test this tomorrow, maybe that bug is pirates empire going legit or something similar.
Yeah seems like another thing that came from me using the "data validation" feature in the DWU Mod Tool. Whoops :(
Alvek
Posts: 205
Joined: Fri Mar 24, 2023 9:47 pm
Location: Kyiv

Re: Expansion mod

Post by Alvek »

salemonz wrote: Mon Jun 12, 2023 9:03 pm
Alvek wrote: Mon Jun 12, 2023 8:52 pm Well, that explains -1 number. I will try to test this tomorrow, maybe that bug is pirates empire going legit or something similar.
Yeah seems like another thing that came from me using the "data validation" feature in the DWU Mod Tool. Whoops :(
That tool probably built for original game and don't include BM mod changes or extreme things like creating pirates for every race.
User avatar
Retreat1970
Posts: 1125
Joined: Wed Nov 06, 2013 11:09 am
Location: Wisconsin

Re: Expansion mod

Post by Retreat1970 »

I don't use dwur files only images and misc pieces.

I will try 1.82 and 1.05 later. There was one thing I changed. I assigned the hotkey for passenger missions to ctrl-w because I was so used to it, but I can't imagine why that would do anything.

Edit: from an old post

https://www.matrixgames.com/forums/view ... +mod+image

Start on 2nd page. Same issue with baconmod.
User avatar
Retreat1970
Posts: 1125
Joined: Wed Nov 06, 2013 11:09 am
Location: Wisconsin

Re: Expansion mod

Post by Retreat1970 »

Per the above old post, I too use the stock family images. I will copy them into my RetreatUE and start a new game. They didn't say if it worked, but roger suggested it.
User avatar
salemonz
Posts: 133
Joined: Tue May 19, 2015 2:37 pm
Location: USA

Re: Expansion mod

Post by salemonz »

Retreat1970 wrote: Mon Jun 12, 2023 9:58 pm Per the above old post, I too use the stock family images. I will copy them into my RetreatUE and start a new game. They didn't say if it worked, but roger suggested it.
Check your races .txt files. I just downloaded RetreatUE and some races have -1 as the pirate family pic (napoar, lipid, lemeresh...maybe more).

IF this -1 is the culprit, that might be what's throwing that particular crash.
Alvek
Posts: 205
Joined: Fri Mar 24, 2023 9:47 pm
Location: Kyiv

Re: Expansion mod

Post by Alvek »

Simplified code for family name looks like this:

Code: Select all

int familyNumber = 0;
if(pirate)
familyNumber = DesignPictureFamilyIndexPirates;
else
familyNumber = DesignPictureFamilyIndex;
string familyName = "family" + familyNumber;
So any pirate race with -1 would get no image error. Also BaconMod version 1.82 should be able to find proper images without starting a new game.
User avatar
Retreat1970
Posts: 1125
Joined: Wed Nov 06, 2013 11:09 am
Location: Wisconsin

Re: Expansion mod

Post by Retreat1970 »

My question I guess is why is this happening now when it never has before?
Alvek
Posts: 205
Joined: Fri Mar 24, 2023 9:47 pm
Location: Kyiv

Re: Expansion mod

Post by Alvek »

I managed to recreate no image bug, to do this I edited race file and set CanBePirate ;Y with DesignsPictureFamilyIndexPirates ;-1. This way new games will get this error, saved games ignore new race settings, though I haven't found where they stored yet.
Race files with CanBePirate ;N should be safe even with DesignsPictureFamilyIndexPirates ;-1, looks like there is no way to add pirates for this races even with editor.
Alvek
Posts: 205
Joined: Fri Mar 24, 2023 9:47 pm
Location: Kyiv

Re: Expansion mod

Post by Alvek »

Found pirates raid code, sadly its not a bug that pirates can raid resource and money even if they failed to win ground battle.
User avatar
CaesarAug
Posts: 455
Joined: Tue Jun 23, 2015 4:54 am

Re: Expansion mod

Post by CaesarAug »

This must be a strange bug in DWU, surely… At a new game-start, I’m noticing that factions using shipset family21 use only some of the corresponding ship images, but also a mix of images from the images/ships/other/MajorSet/PhantomPirates folder.

This is consistent throughout: default vanilla game as well as all mods I’ve tested. So this is not exclusive to the Expansion Mod, it’s a DWU game engine bug, seemingly.

I suspect something similar with factions using ship family20, and who knows?, possibly other ship families are likewise affected. But not all ship families, it looks like higher-numbered ship families.

Strange bug. Don’t know what can be causing this mismatch of ship images, but only for certain ship families.
Alvek
Posts: 205
Joined: Fri Mar 24, 2023 9:47 pm
Location: Kyiv

Re: Expansion mod

Post by Alvek »

CaesarAug wrote: Thu Jun 15, 2023 7:45 am This must be a strange bug in DWU, surely… At a new game-start, I’m noticing that factions using shipset family21 use only some of the corresponding ship images, but also a mix of images from the images/ships/other/MajorSet/PhantomPirates folder.
Will look into this bug.
User avatar
CaesarAug
Posts: 455
Joined: Tue Jun 23, 2015 4:54 am

Re: Expansion mod

Post by CaesarAug »

Thanks! Good luck!

You’ll notice, for example, in a new game-start, that a non-pirate faction using shipset family21 will use only some of the corresponding ship images, while others will be taken from images/ships/other/MajorSet/PhantomPirates folder.

Specifically, that faction will be using the defensivebase.png ship image from that PhantomPirates folder as a carrier, both on the galaxy map as well as on the ship design panel. Also notable is using the homebase.png image as a resupply ship. And several other ship classes, but not all. A player can create a modified ship with the correct shipset family21 images, but requires a manual search.

Hope this helps!
User avatar
CaesarAug
Posts: 455
Joined: Tue Jun 23, 2015 4:54 am

Re: Expansion mod

Post by CaesarAug »

Alvek, I thought to try this out: using the default .exe from the original 1.9.5.12 install/patch, the above problem with mismatched ship images for family21 (and probably other ship families) is a NON-ISSUE. Interesting. But using the original .exe forfeits all the benefits from the Bacon Mod and Expansion Mod, of course…

Conclusion: the bug was introduced with the Bacon Mod .exe and/or Expansion Mod .exe.
Post Reply

Return to “Design and Modding”