DW2 Modding Roadmap

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

Moderator: MOD_DW2

mordachai
Posts: 684
Joined: Fri Mar 06, 2015 4:55 pm

Re: DW2 Modding Roadmap

Post by mordachai »

The current system does work as overrides - so the base game files are loaded, then each mod in order - where any defined object is overwritten by the next definition read in sequence, or new objects are defined anew.

Hence "last one wins"...

The biggest limitation on the current system is that objects must be defined in whole. You cannot say, just override the cost of an object (say a tech, or a component) - but instead, must define everything about that object - completely overwriting any other mods / base-game for any given object as a whole (you don't have to include all objects defined in a given file - you can override just part of the techs, or just some of the components, etc).

This is fine if you're defining new objects that aren't in the base-game (at least, if the engine is improved to handle ids as mapping values and not as linear indexes that must be sequential - which fails as new ids are added to the base game, or various mods conflict with one another).

But ultimately, it means that you must target a specific underlying thing if you're trying to override some aspects - e.g. XL must target the base game and override whatever I need it to - but when the base game updates that object - I have to merge their changes (that I don't wish to override) into my mod's xml files - so that I'm only overriding what I intend to - and not everything else... Similarly, if someone wanted to make an XL compatible mod, they'd need to override whole objects - and ensure that anything they didn't intend to override was kept in sync with XL. Ideally, we'd have sub-object control - the ability to override specific fields rather than whole objects - so that a mod-mod can just define a change in cost, or a change in associated tech-name or icon or whatever specific parameters they wish to override - without having to become responsible for every field related to that/those object(s).
AKicebear
Posts: 616
Joined: Sat Jul 26, 2014 2:11 pm

Re: DW2 Modding Roadmap

Post by AKicebear »

mordachai wrote: Mon Feb 13, 2023 2:19 pm Ideally, we'd have sub-object control - the ability to override specific fields rather than whole objects - so that a mod-mod can just define a change in cost, or a change in associated tech-name or icon or whatever specific parameters they wish to override - without having to become responsible for every field related to that/those object(s).
Thanks for that thorough explanation!

Hopefully the devs can comment on whether or not this type of improvement is on the roadmap - being able to do mod mods (compatibility mods between large and popular mods) seems to be a major boon in other vibrant modding scenes.

This is on my mind in particular as I have a few ideas for facilities (new and modified) and I'd like to ensure they work both for base game and XL players (my pref). Having a base mod and XL compatibility mod would be ideal, and the system you described would make that easier to maintain.
User avatar
rxnnxs
Posts: 503
Joined: Sat Jun 01, 2013 10:25 am
Location: what goes on
Contact:

Re: DW2 Modding Roadmap

Post by rxnnxs »

Who has a mod that works as intended in the mod foder?
AKicebear
Posts: 616
Joined: Sat Jul 26, 2014 2:11 pm

Re: DW2 Modding Roadmap

Post by AKicebear »

rxnnxs wrote: Sat Feb 25, 2023 6:53 pm Who has a mod that works as intended in the mod foder?
Try the XL mod, either via Workshop or the GitHub link for direct download. I've been using it successfully for a few updates now.
User avatar
rxnnxs
Posts: 503
Joined: Sat Jun 01, 2013 10:25 am
Location: what goes on
Contact:

Re: DW2 Modding Roadmap

Post by rxnnxs »

Thank you for the hint to the mod, I managed to do some nice things, but right now I am creating my own music.
With all the downsides that you also know.
While renaming the music folder in the original data folder,
creating own music is very tedious. As in other areas, there is no XML file that allows it. there is no documentation that helps.

This is in general (to modders in the whole) very hard if not impossible - to change some thigns that are not accessible.
If you have game files that are in a "bundle", we might even change that stuff when we create a folder with a pic for instance that is named exactly as in the bundle.

With the music, it could be even easier: change the music that is already in the folders, but the xml file that is referring to those files is somehow not accessible - perhaps it is in a "bundle" itself?
so it would be nice if those xml files that reside in the "bundle" files from stride are named and extracted with the goal to show us what they refer to.

for the music it is then possible to name the files different than those that are there and use some lesser music files.
For other files like race pics it is a little more work: extract a sample so that we can see what files re used and in which format.

so I am not asking for a documentation but only for a xml files, that show what they refer to and some samples.
this could also be done by someone who is able to extract some bundle files.
I can not for i have no that much time to build on my pc the extract program.
Item4369
Posts: 4
Joined: Sat May 27, 2023 2:13 pm

Re: DW2 Modding Roadmap

Post by Item4369 »

Is it possible at the moment to modify the advisor AI so they wont spend money on gifts etc unless the player has more than [100000] cash in the bank?

i looked through the xml files but could see any that looked like AI control.
OrnluWolfjarl
Posts: 294
Joined: Fri Oct 20, 2017 8:36 pm

Re: DW2 Modding Roadmap

Post by OrnluWolfjarl »

Item4369 wrote: Sat May 27, 2023 9:01 pm Is it possible at the moment to modify the advisor AI so they wont spend money on gifts etc unless the player has more than [100000] cash in the bank?

i looked through the xml files but could see any that looked like AI control.
Don't quote me on this, as I play mostly manually and have the advisor set on Suggest on only a few things.

I think there's a reserve level you can set at the economy tab, which the automatically-take-action advisor will respect.

I think you can also mod this through the policies files?
Item4369
Posts: 4
Joined: Sat May 27, 2023 2:13 pm

Re: DW2 Modding Roadmap

Post by Item4369 »

Thanks

According to the tooltip the the reserved income level in the economy reserves cash flow not a stock of cash. The reserved revenue may build up some cash, but there is nothing stopping the AI spending all of the stockpile itself. did you mean something else?

In the policy file my guess is that
<CashflowUncommitted>0.3</CashflowUncommitted>

has the same limitation; based on its name.
OrnluWolfjarl
Posts: 294
Joined: Fri Oct 20, 2017 8:36 pm

Re: DW2 Modding Roadmap

Post by OrnluWolfjarl »

Item4369 wrote: Mon May 29, 2023 2:23 pm Thanks

According to the tooltip the the reserved income level in the economy reserves cash flow not a stock of cash. The reserved revenue may build up some cash, but there is nothing stopping the AI spending all of the stockpile itself. did you mean something else?

In the policy file my guess is that
<CashflowUncommitted>0.3</CashflowUncommitted>

has the same limitation; based on its name.
As I said, don't quote me on it, as I'm not sure about it since I don't use it. Did you try it? If not I'd suggest you try it and let us know if it works :)
fruitgnome
Posts: 431
Joined: Wed Jun 04, 2014 11:49 am

Re: DW2 Modding Roadmap

Post by fruitgnome »

elliotg wrote: Thu Mar 10, 2022 2:14 am ... Distant Worlds 2 was written with modding in mind from the start. As much as possible, all the data is externalized in XML and text files. ...
For this approach it is neccesary that mods have effect on savegames.
mavor
Posts: 28
Joined: Sat Nov 05, 2016 1:40 pm

Re: DW2 Modding Roadmap

Post by mavor »

elliotg wrote: Thu Mar 10, 2022 2:14 am Connecting to Game Code
The code in DW2 is currently obfuscated. However we plan to deobfuscate most of this to allow access to code modding.
17 months have passed. Is this ever going to happen and if so, when?
fruitgnome
Posts: 431
Joined: Wed Jun 04, 2014 11:49 am

Re: DW2 Modding Roadmap

Post by fruitgnome »

Is it possible to mod data/dialog/*.txt for example dhayut.txt? If yes, how? I tested somethings.

It is possible to edit the original files maybe I will do this. Fleshhh, meat, food, yum yum ;)
Post Reply

Return to “Design and Modding”