Modding Problem

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
User avatar
eltharion
Posts: 44
Joined: Sat Feb 20, 2010 10:32 am
Location: 1701-A Deck 5-Room 0195

Modding Problem

Post by eltharion »

I wanted to create a simple mod where I gave a “slight”—so to speak—advantage to humans...

By modifying hull abilities, bonuses, the number of installable components, and so on...

I create the file and check it (the XML syntax doesn't give me any errors), I put it in a nice folder with its .json file.
The game starts, I enable the mod... I start a game... and nothing, the game acts as if the mod doesn’t exist.

I tried replacing ShipHulls_Human.xml directly in the game folder, and the game crashes...
which makes me think I made some big mistake, but I haven’t found any logs explaining why...

Does anyone have any suggestions about this?
Attachments
ShipHulls_Human_SUPERPOWER.zip
(68.79 KiB) Downloaded 12 times
He who fights with monsters might take care lest he thereby become a monster. Is not life a hundred times too short for us to bore ourselves?

-Friedrich Nietzsche-
fruitgnome
Posts: 627
Joined: Wed Jun 04, 2014 11:49 am

Re: Modding Problem

Post by fruitgnome »

compare original with your mod file
maybe you started modding before an update, updates changed often xml structure, my reason I stopped modding
User avatar
rxnnxs
Posts: 661
Joined: Sat Jun 01, 2013 10:25 am
Location: what goes on
Contact:

Re: Modding Problem

Post by rxnnxs »

Hello Dear Modder eltharion!

Sorry that I just started now to look into your work.
You have done huge changes!
better you start off with small ones.

I tried first using notepad++ and the comparePlus plugin.
It stalled...
hmmm..
I jused WinMerge and here is the screenshot:'
shiphull.jpg
shiphull.jpg (177.73 KiB) Viewed 410 times
Now I would say, even if it is not causing issues in most cases:
Keep exactly your text the way it is in the original.
If the file is windows (CR LF) UTF-8, then it has to stay that way.
Notepad++ is shoing you this at the bottom right. I guess you know this program already.

Next..: You use spaces, the original uses TABs.

Biggest Problem: You have different ShipHullIDs!
YOu have to keep the IDs as they were.
Just change some Stats and startup the game and look if it runs up. Then check if your change is done in-game.
Without modding your game, you do it like you did: just add an xml-file into the folder where the original is. And oyu can try how small you can create that file.

What I mean is: You can change one ShipHull at a time. Maybe...
I am going to try this right now..
Ok, great, it worked!

Now the fun goes on: Now that you know how to edit one shiphull, you can do it to all of them, or in parts, also.
Then you put it in your own mod and there you go..

Here is the Video I created:
https://youtu.be/d9lzz5_fJIM
Post Reply

Return to “Distant Worlds 2”