[Aborted] Distant Worlds 2 Mod Maker

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

Re: [Release] Distant Worlds 2 Mod Maker

Post by frankycl »

Hm, ok thanks again for further explanations.
But either you haven't read my questions, or you don't know how to answer them, since you still haven't told me anything about "which files are used where and when" (?) :|

So, I'll repeat my questions (and have underlined the important parts ;) ) :
frankycl wrote: Tue May 17, 2022 7:07 pm "Internal: The Mod Maker takes care of this part..." - What does this mean exactly / does the Mod Maker use the XMLs/TXTs in the data-folder of the game ? Or where do those to-be-edited values come from (and where are they stored) :?:

"External: (...) The corresponding game file can then be attached to the current mod..." - Does this mean that the "corresponding game file" (= XML/TXT) will be merged with a game file that is already modded ? _like e.g. when I would use my modded ShipHulls.xml with the already (otherwise) moded ShipHulls.xml from your Mod Maker ? (or what do you mean by "current mod" - all we can mod so far are the XMLs, the TXTs and some parts of the bundle-files (if we get to extract/save them), or not ?) :?:

Eventure wrote: Tue May 17, 2022 5:22 pm (...)
There is a value called "triggerRaceIdField" so filtering race would not be a problem. (...)
Eventure wrote: Wed May 18, 2022 1:37 pm I checked the data again. After that, it's probably best to use two filters. First to filter the trigger type and second the race. In the case of race, both the "trigger race" and "placement race" parameters are included in the filter. So if the selected race appears in one of the two parameters, it will be displayed.
Yeah, sounds good, but please don't forget about the <NonTriggerRaceId>-tags - those are always just 1 game-event in the file, but are triggered for 6 races at a total ! ;)
User avatar
Eventure
Posts: 105
Joined: Wed Apr 20, 2022 12:16 pm

Re: [Release] Distant Worlds 2 Mod Maker

Post by Eventure »

development aborted
Last edited by Eventure on Sat Feb 04, 2023 10:38 am, edited 1 time in total.
User avatar
frankycl
Posts: 401
Joined: Mon Mar 01, 2021 5:16 pm

Re: [Release] Distant Worlds 2 Mod Maker

Post by frankycl »

Eventure wrote: Wed May 18, 2022 3:23 pm (...) a copy is made for each game release and the backup is stored at
C:\Users\User Name\AppData\Roaming\DW2MM\DW2Data
(...)
The Mod Maker stores its own mods in the folder
C:\Users\UserName\AppData\Roaming\DW2MM\Mods
Yes, this makes it all a lot clearer for me - thanks again for your explanations (and I think you should put this in your manual/readme, too ;-)) :D

So, to conclude, your Mod Maker takes the original XML-files out of the data-folder of the game (if needed) and copies them to two folders of your tool (1 as a backup and 1 as templates for the mods that can be created with your tool), yes ?
And then you decide if you only want to mod the copies in the DW2MM\Mods-folder, or if you want to use additional modded files that are copied into the data-folder of the game together (= attached) with the before created mod-files of your tool, right ?
But this also means that you only could use additional "attached" files if they are not the same XMLs as the ones that were used for the mods of your tool (and if you want to use the same XMLs you'd have to "import" them instead), right ?

Ok, but what I still don't understand:
Eventure wrote: Wed May 18, 2022 3:23 pm (...) Inside is a folder for each game version...
Does that mean your tool stores all the XMLs from different game-versions ? If so - from what version beginning and the beta-versions, too ? (but why :? )

and:
Eventure wrote: Wed May 18, 2022 3:23 pm (...) After the file is selected, the Mod Maker will examine the file for any differences from the original game file...
What "origial game file" ? Diddn't you mean the modded game file ? (because if he only checks the "origial game file" he wouldn't know if there are inconsistencies between the attached file(s) and the modded one(s), or not ?)

Oh, and you haven't said anything about the TXT-files - aren't they included in your Mod Maker, too (or could at least be attached) :?:
- That would be a real pitty, I think, because then you couldn't mod any dialogues or couldn't use the files of any localizations. :?


Ok, and regarding the game-events:
Eventure wrote: Wed May 18, 2022 3:23 pm
frankycl wrote: Wed May 18, 2022 2:15 pm (...) please don't forget about the <NonTriggerRaceId>-tags - those are always just 1 game-event in the file, but are triggered for 6 races at a total ! ;)
It can be also included into the race filter, like the both other tags. No problem!
Well, but in this case your filter will only tell you what races are NOT the ones you are searching for, and you'll have to use an additional algorithm to determine which races should be placed in the filter-list instead (because this always depends on the race-ID of the <NonTriggerRaceId>-tag ;-))

Also, you didn't say anything about my suggestion regarding the additional filters for "Main Story"-, "Racespecific Story"- and "General"-events. Would this be possible, too :?:

And yes, I'm really inquisitive here (but don't want to get on your nerves), but this is only due to the fact that your tool has sooo much potential and it's quite exciting to learn more about it. ;)
User avatar
Eventure
Posts: 105
Joined: Wed Apr 20, 2022 12:16 pm

Re: [Release] Distant Worlds 2 Mod Maker

Post by Eventure »

development aborted
Last edited by Eventure on Sat Feb 04, 2023 10:38 am, edited 1 time in total.
User avatar
frankycl
Posts: 401
Joined: Mon Mar 01, 2021 5:16 pm

Re: [Release] Distant Worlds 2 Mod Maker

Post by frankycl »

Eventure wrote: Wed May 18, 2022 6:06 pm
frankycl wrote: Wed May 18, 2022 4:58 pm (...)
Does that mean your tool stores all the XMLs from different game-versions ? If so - from what version beginning and the beta-versions, too ? (but why :? )
(...) It check on every start, if the game executable version has changed from the last check. If so, it creates a backup of the game files (XMLs). Beta's also included, if you have installed them.

Why? Let me try to explain.
(...)
Ok, I think I have understood your reasoning now completely, but I also think that you try to do this in a not needed complexity. Why ? Because there is no need for checking or storing any old game-files (for your tool). ;)

Let me explain, what I mean: What do you think is the difference between a (manually) modded XML and a (by the DEVs) patched XML for the game ? There isn't any ! There is no check for game-versions when the game loads the XMLs and also not when you load an older save (since then the game always uses the old XMLs, no matter what (patched) game-version you use after this).
Therefore I think it would be sufficient to only store the XMLs of the momentarily used game (in order to change back to the unmodded game when exiting it), because this is always the best patched version for this time (if the gamer uses a patched version, that is). And if the game (files) will be patched again, so what ? Then this newly patched XMLs are the ones to be stored (and the old ones aren't necessary any more).
But what you / your tool should do instead (of storing/comparing old XMLs) is to compare the newly patched XMLs with the already modded (internally or externally), tell the user what the patched parts of the XMLs are and ask him if he wants to include this in his modded XML, too (because your tool should "know" already the modded differences, it shouldn't be too difficult to seperate them from the patched ones, I think) - just like the comparison of the modded and the imported XMLs. That's all that would be needed in my opinion - but no check on "the game executable version". You see what I mean ? ;)
(But didn't you say, this already happens "when you upgrade your mod" ? Well, the only improvement on this function would be that this is done automatically the moment you want to load a mod (from your tool) or a modded XML that you want to attach or import to this mod - then it would be perfectly user-friendly and easy to use. :mrgreen: )

Bsds: There are many game-updates where only a view (if any) XMLs are included. So it would be additional mostly totally in vain to store/compare them all. :roll:

Eventure wrote: Wed May 18, 2022 6:06 pm (...)
I developed this for the reason that there are also bug fixes for the game data. I've found a couple of incorrect values. So if they are fixed by the developers, you can then transfer them to your mod.
That's completely right - that's what's really needed ... but you don't need any checks or backups for game-versions for this. ;)

Eventure wrote: Wed May 18, 2022 6:06 pm Text files are currently not supported, (...) Until supported, copy the manually edited file into the right location of your mod folder (e.g.\Mods\Your Mod Name\Dialogs) and the Mod Maker will copy the files into the game folder on launch and removing them too.
I think that's a very nice function already - good to know. :D


Ok, and regarding the game-events ... I'll make another post - this might get too long. ;)
User avatar
frankycl
Posts: 401
Joined: Mon Mar 01, 2021 5:16 pm

Re: [Release] Distant Worlds 2 Mod Maker

Post by frankycl »

Regarding the <NonTriggerRaceId>-tag:
Eventure wrote: Wed May 18, 2022 3:23 pm The race filter will show a list of events, which have an effect on this race.
No, I don't think that you've understood the problem here. If you/your tool would do this it would list the wrong events for the wrong races !
Let me explain again: If your tool searches the XML for the <NonTriggerRaceId>-tag (because for those events there is non of the otherwise searched tags, like <TriggerRaceId> or <PlacementRaceId>) it will find 1 Race-Id that's technically linked to that event - BUT this is NOT the race your tool should connect the event with, because there are similar (main) events with the same triggers, locations, etc. that are already connected (and hopefully filtered by your tool) with the race from above.
But the <NonTriggerRaceId>-tag doesn't really mean that particullary race (found by your filters), but instead (and vice versa) it means all 6 other races that are NOT linked technically to this event ! Therefore you'd need something like this (only a logical example - no code, or anything):
If <NonTriggerRaceId> = x, the event should be listed for/connected with all Race-Ids that are NOT = x !
(or as an example in numbers: If <NonTriggerRaceId> = 1, the event should be listed for/connected with Race-Ids 0,2,3,4,5,6 ... or: If <NonTriggerRaceId> = 4, the event should be listed for/connected with Race-Ids 0,1,2,3,5,6 !) - You see what I mean ?
And for an example in the XML see the event in line 33645 and compare it to the one in line 33527 (game version 1.0.4.3) ;)

Eventure wrote: Wed May 18, 2022 3:23 pm There are no definitions for "Main Story", etc. in the game files or I can't see them.
Yes, you just haven't seen them, yet (most probably because they are NOT in a trigger-tag, but in the <Name> of the events). - However this is a bit tricky, too:

- For "Main Story"-events your tool should first look for "MainStory_..." in the <Name>-tag. - And then (in order to connect/list the events, that are gameplaywise connected to this main event) it would have to look for the events that have the term behind the "MainStory_" in their <Name>-tags. - so, for example for the Main Story-event <Name>MainStory_GraviticStorms_2 (line 7459) this would be all events with "GraviticStorms_2" in their <Name>-tags, like <Name>GraviticStorms_2 Explanation (line 7684), or <Name>GraviticStorms_2 Debris Field Explanation (line 7732), etc. ;)

- For "Racespecific Story"-events it's a bit easier, but your tool would also need to look for specific things (= characters) in the <Name>-tags, namely the terms in brackets, or more easily for the brackets themselves. - so for an example out of the XML: <Name>Refuse to Pay Choice 2 (Boskara) (line 30601), or <Name>Ancient Boskara Fortress (Boskara) (line 30776), etc. ;)

- and finally "General"-events would be everything else (which should be easy to find/filter). ;)
User avatar
Eventure
Posts: 105
Joined: Wed Apr 20, 2022 12:16 pm

Re: [Release] Distant Worlds 2 Mod Maker

Post by Eventure »

development aborted
Last edited by Eventure on Sat Feb 04, 2023 10:39 am, edited 1 time in total.
User avatar
frankycl
Posts: 401
Joined: Mon Mar 01, 2021 5:16 pm

Re: [Release] Distant Worlds 2 Mod Maker

Post by frankycl »

Eventure wrote: Thu May 19, 2022 5:33 pm (...)
I was already at that point, but if you think further you will see why I do it the way I do it. (...)
Ok, it's your tool after all - but if this creates additional problems or will cause a loss in performance you know what you can do instead - in my opinion (or at least what I would do ;-)).

Eventure wrote: Thu May 19, 2022 5:33 pm (...) If the filtered race ID is not noted in the NonTriggerRaceId, the event is displayed.
(...) if we have an identifier in the name of the event it's enough to filter the event.
So we would have three filters:
-GameEventTriggerType
-Race
-GameEventType
(...)
I've almost finished the OrbTypes and should start with the game events at the weekend.
Sounds good - I'm already very curious how this will turn out. ;)

But why do you need "GameEventTriggerType(s)" ? (when or why do you think anyone would filter them by trigger-types ?)
User avatar
frankycl
Posts: 401
Joined: Mon Mar 01, 2021 5:16 pm

Re: [Release] Distant Worlds 2 Mod Maker

Post by frankycl »

Additionally regarding game-events:

Instead of trigger-types I think it would be important to be able to search/filter for "exclusive (!) racespecific story-events", because those are (mostly) the ones that have a connection to your own race. 8-)

And for your filter-function this would be all events with the race-name in brackets (in the <Name>-tag), but without a "Non" that's included (or without a <NonTriggerRaceId>-tag). ;)
User avatar
Eventure
Posts: 105
Joined: Wed Apr 20, 2022 12:16 pm

Re: [Release] Distant Worlds 2 Mod Maker

Post by Eventure »

development aborted
Last edited by Eventure on Sat Feb 04, 2023 10:39 am, edited 2 times in total.
User avatar
Eventure
Posts: 105
Joined: Wed Apr 20, 2022 12:16 pm

Re: [Release] Distant Worlds 2 Mod Maker

Post by Eventure »

development aborted
Last edited by Eventure on Sat Feb 04, 2023 10:39 am, edited 1 time in total.
User avatar
frankycl
Posts: 401
Joined: Mon Mar 01, 2021 5:16 pm

Re: [Release] Distant Worlds 2 Mod Maker

Post by frankycl »

Eventure wrote: Fri May 20, 2022 6:23 pm (...)
You can either download the new version above or update the mod maker from the app configuration window.
Sorry to tell you, Andree, but update still isn't possible (at least when you have installed it with the default path on C:) :( :

Update-Error.png
Update-Error.png (91.45 KiB) Viewed 810 times
User avatar
Eventure
Posts: 105
Joined: Wed Apr 20, 2022 12:16 pm

Re: [Release] Distant Worlds 2 Mod Maker

Post by Eventure »

development aborted
Last edited by Eventure on Sat Feb 04, 2023 10:39 am, edited 1 time in total.
User avatar
frankycl
Posts: 401
Joined: Mon Mar 01, 2021 5:16 pm

Re: [Release] Distant Worlds 2 Mod Maker

Post by frankycl »

Eventure wrote: Fri May 20, 2022 6:34 pm
frankycl wrote: Thu May 19, 2022 8:58 pm Additionally regarding game-events:
(...)
I'll take care of it tomorrow and get an overview of which filters are useful.
Your tips are definitely helpful!
Thank you :D
Eventure wrote: Sat May 21, 2022 12:17 pm
frankycl wrote: Sat May 21, 2022 12:06 pm Sorry to tell you, Andree, but update still isn't possible (at least when you have installed it with the default path on C:) :( :
Oh yes, I found the problem, please download the installer instead, I forgot to remove the remaining code from version 0.56.
Will be fixed in the next version for sure!
You're welcome. :)

... but why have you changed to 80% default UI-scaling ? - This makes everything a lot smaller (for me it was 100% before) ! :?
- But it still would be ok for me (although I will have to adapt the font-size every time on a fresh start. :roll: ) - but maybe at least default font-size 11 would be better now (even for those with better eyes than mine; - I'll have to set it even to 12) ?
User avatar
Eventure
Posts: 105
Joined: Wed Apr 20, 2022 12:16 pm

Re: [Release] Distant Worlds 2 Mod Maker

Post by Eventure »

development aborted
Last edited by Eventure on Sat Feb 04, 2023 10:39 am, edited 1 time in total.
User avatar
frankycl
Posts: 401
Joined: Mon Mar 01, 2021 5:16 pm

Re: [Release] Distant Worlds 2 Mod Maker

Post by frankycl »

Hm - I've installed the new version (0.5.8) completely fresh, but I still get the "unhandled exception" when I try to update it (since it still shows installed ver. 0.5.7, but online-ver. 0.5.8 (?)) :(

I also noticed that there is a button "Update Mod" right after the start - but I haven't got any mod to update, so far (?). And when I click on it, I get the same "unhandled exception"-message as above. :?

However everything else (scaling, etc.) is now perfect (at least for me). :mrgreen:
User avatar
Eventure
Posts: 105
Joined: Wed Apr 20, 2022 12:16 pm

Re: [Release] Distant Worlds 2 Mod Maker

Post by Eventure »

development aborted
Last edited by Eventure on Sat Feb 04, 2023 10:40 am, edited 1 time in total.
User avatar
frankycl
Posts: 401
Joined: Mon Mar 01, 2021 5:16 pm

Re: [Release] Distant Worlds 2 Mod Maker

Post by frankycl »

Eventure wrote: Sun May 22, 2022 7:45 am The 0.57 had this bug also, so a reinstall is required to fix the issue.
But I had reinstalled everything, already (I had un-installed and installed it completely new) !

However I downloaded the new version today once again - and it seems it's a completly different version (although it's also called 0.5.8) (?) :shock: - could it be, that you changed/updated the downloads in your link yesterday :?: (the old version was from around 9 pm - and the new version now is from 11 pm !)
User avatar
Eventure
Posts: 105
Joined: Wed Apr 20, 2022 12:16 pm

Re: [Release] Distant Worlds 2 Mod Maker

Post by Eventure »

development aborted
Last edited by Eventure on Sat Feb 04, 2023 10:40 am, edited 1 time in total.
User avatar
frankycl
Posts: 401
Joined: Mon Mar 01, 2021 5:16 pm

Re: [Release] Distant Worlds 2 Mod Maker

Post by frankycl »

Ok, this time I've (finally) got the right version ... and I'm ready for testing. :mrgreen:

However I can't test the update-function anymore, but will do, as soon as there is a new version online. ;)

Ok, for a start I tested the Game Events a bit - and there are 2 things I'd like to note/suggest:

1. In the RaceFilter-menu there are listed all races of the Races.xml.
In general this is done completely well, but in this case it leads to the majority of races without any linked events in the GameEvents.xml - since they are all non-playable races (so far).
Now, although it isn't bad to offer these additional races (since at least some of them might be added to the playable races in the future), it's not so optimal for the filter-list, imho, because there isn't any difference between the playable-/non-playable races shown.
Therefore I think it would be better to either add another filter-category for the non-playable races, or (at least) add an indication for the races that are non-playable (and therefore non-linkable to game-events), so far. If they get playable one day (or with some mods), it would be enough to add them to the general race-filter-list after that, imho. ;)

2. When you chose a single race in the RaceFilter-menu, there are not only listed all race-specific events for this race, but also some MainStory-events that are only thematically linked to that race.
This is not good, imho - not only because the MainStory-events are playable for all races (not only the one that was chosen in the race-filter), but most of all because in the game these events are clearly seperated from each other and can also be en-/disabled independent from each other ! (and additionally you could play all other MainStory-events with this race, too - not only the ones that are linked thematically to that race)
Therefore I think it would be better to list MainStory-events only if NO individual race is selected additionally and ONLY list race-specific events (that are only triggered by this race) with a special race chosen out of the RaceFilter-menu. ;)

... to be continued...
Post Reply

Return to “Design and Modding”