-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conflict Resolution for CK3 #271
Comments
Just to put out a disclaimer: I am not familiar with any PDX games aside Stellaris. Now, Conflict Solver has never been requested so far for any other game. I've tried expanding on Conflict Solver support by testing the waters of HOI4 community, I failed to find any interest. Some of my friends who play EU4 and HOI4 told me that there's not much to gain by adding a conflict solver for these games as most people play a bunch of overhaul mods... I don't own CK3 but a friend does so I could borrow his game to run some unit tests to see if there is any need to touch up on the paradox script parser that is used in Irony, so that's not an issue. The issue is however that I'd need something like this: https://stellaris.paradoxwikis.com/Modding#Overwriting_Specific_Elements I'm willing to do it but I'll need the info I mentioned. |
My guess for why it hasn't been requested much, or at all, is likely due to how (relatively) new the game is. I know, personally, I'd find it immensely helpful. Unfortunately, I am not sure I'm quite knowledgeable enough to find or offer you the information you need. I could possibly ask in the CK3 Modding Co-Op discord but you may have more luck doing so. It's very possible the resources you need exist and I'm just not aware of them! |
I just scoured the modding wiki a bit. Doesn't seem like the information I need is available. |
I am far from the expert on this, but I'd venture to say that list for Stellaris is, at least, very close to how CK3 functions as well. I posted this request on the CK3 Modding Co-Op and hopefully someone with more experience than myself can give you the information you need. I appreciate your quick responses! |
Stellaris and CK3 don't have the same structure for common folder. I suppose event overriding works in the same way, interfaces and localizations. Stellaris has about dozen folders in common directory which are FIOS. On top of that there are several folders which are treated in a specialized manner due to duplicate items. By this I mean that certain items when duplicated and overwritten in different filenames actually causes the game to go berserk. For example stuff like buildings in Stellaris, if you don't override them in the same file (as in using same filename) they vanish from the game (I believe this is how it manifests in the game). In order to fix that Irony uses a hack to create zero byte file overwrites and then dumps all buildings in separate files in its own patch to circumvent this particular issue. I'm guessing down the line CK3 will have similar problems if this ever gets implemented. |
Conflict detection and resolution for CK3 would be a terrific addition to this tool! |
There's no documentation available for me to implement this feature. |
I was mulling this over and I had an idea for a possible soft substitute for this! I know real conflict resolution is likely not going to happen unless a list like the Stellaris was created. However, what would be very helpful in the interim is something that indicates on merging which file came from which mod. Like a comment inserted at the top of each file or something actually in Irony that indicates where each file came from. It's not perfect but it'd help a fair bit in figuring out when specific files are being overwritten, at least, and save some time with having to sift through mod files. Would this be possible? |
You're basically wanting a readonly mode for conflict solver if I'm understanding correctly? Since I don't own CK3. How do mod conflicts look like in that game? Do people overwrite specific elements or whole files? By specific element I mean that let's say you've got in events folder a large file which has a many events like let's say: Then do mods overwrite this whole file which contains all of these events 1-5. Or do they create a separate file which contains only event.2 for example to overwrite? It's kinda sad to see that only Stellaris community takes the time to document such important modding information. I'm not sure if you've seen what actually Irony's conflict solver for stellaris does? Irony is able to break down the example file like I mentioned event 1-5 into individual elements and then create single overwrites only without altering a whole file. I did however in v1.19 RC implement a new type of override which actually merges many different elements into a single file (this could be useful for CK3). Though I'd still need data on how CK3 operates at least. The trick here is that Irony writes zero byte files thus invalidating other mods and then forcing the game to use it's own override. |
From what I've seen, for events at least, Modders will overwrite the entire file if they're modifying already existing events. They'll make new files/folders if they're making new Events, though. Unfortunately, I'm really not the person that could or should be telling you, though. I'm very, very amateur at modding and I'm not even close to the expert in this. I can really only speak from what I've seen digging around other, more experienced Modders' files. Like, for instance, the Way of the Kings mod, made by Tobbzn who is one of the more experienced modders that I'm aware of, seems to completely overwrite existing event files while also making his own events. However, everything in /common seems to be fairly free game in terms of being able to modify existing items in files without needing to copy the entire file wholesale. Honestly, though, I could be completely wrong so please don't take my word for it. I agree that I wish a similar resource existed for CK3 as well! Perhaps it's because the modding community is still relatively new? But I'm not sure. |
This mod seems like a total overhaul mod so it's not a good criteria to judge the modding practices for me. Seems like insight from a CK3 modder is needed here. I can't say what's the reason for the lack of documentation, it is true however that Stellaris is the only one that seems to have this sort of documentation. |
How would one go about making that sort of documentation? Is it just a trial and error sort of thing? |
I asked in the CK3 Discord's Mod Help channel, linking the Stellaris "Overriding Specific Elements" page, and Stik replied with this:
Tobbzn also added:
Hopefully this helps a bit! |
Trial and error, in stellaris it was documented over the years by various contributors who worked on their mods and they updated the documentation based on their findings.
Yeah, I get that. Same as with stellaris but common folders behave erratically. Some require prefix aaa_\zzz_ to force the game to use yours (FIOS\LIOS I mentioned).
Interesting.
Same in stellaris.
on_actions in stellaris require you to overwrite whole file (filename matching similar to how events behave in CK3 I guess). I'm not sure I understand the meaning of this to be honest.
Duplicate event errors happen in stellaris but they can be ignored. So I'm guessing events are file based conflicts then.
I'm guessing it works same as in Stellaris, but when you use this system does the filename matter if you override a single element? In stellaris it needs to be LIOS (zzz_ suffix) |
I think the erratic behaviour has been solved in CK3, by making the load order the only predictor of what will be loaded, but I'll make some tests to make sure of it. It's also possible not all folders behave the same, but so far, I haven't seen any case where filename impacted load order.
Let's say we have the following vanilla on_action:
when an AI character dies, their primary heir gets 100 gold If in my mod I use this :
the vanilla trigger and effects block are overwritten : but you can append elements to the events and on_actions blocks, so both So except if you do want to override the vanilla on_actions, the proper way to use them is to append a custom_on_action, and use triggers and effects in this custom_on_action only, not in the vanilla on_action you're appending to.
With this, when a character dies, if it's an AI character the primary_heir will get 100 gold (from the vanilla on_death on_action), and if it's a player character, every child will get 100 prestige (from the custom_on_action appended to on_death via the on_actions block). Hope that makes sense =)
I'll run some tests, because I have no idea =) |
If true it makes my life a lot easier. The app could dump any part of the code with any filename and just ensure that it's own patch mod (as I call it) is loaded last -- which it already does.
It's a bit clearer but what I might be missing is some context. It does not seem as though the on_action are similar to how they work in stellaris. In stellaris (this is snippet from a vanilla file):
The filename of this file is
And it will be called on game start action regardless of how many there are. The only way for me to overwrite anything from vanilla or another mod is to actually use the filename overwrite. Basically in my mod make a new file called I hope you can see where my confusion comes from. So am I correct in assuming that on_actions structure is different? Irony should be able to handle the scenario problem is just me fully understanding this part.
I'd assume they work the same or in similar fashion. An example of a stellaris GUI file would be:
So if I wanted to create a partial override I could just dump in a separate file:
And be done with it. Next part localization I guess. Does CK3 have
These are all annoying questions but Irony tries to cover all aspects of duplicate detections from GFX, Localisation and scripts. For Stellaris it also detects base game stuff so not just mods. |
It works the same in CK3.
Seems to be the same, yes
Yes, there's a But if by priority ID you mean the number 0 in your example, that's not a priority ID, but a versioning number for internal use by PDX which has no impact whatsoever on modding, at least not in CK3 (confirmed multiple times with PDX devs).
Not annoying at all, anything I can do to help =) |
Yeah you only define events last time I checked (I didn't play stellaris for a really long time so I'm not up to speed with it). Last the guys added was to allow modders to fire custom on actions -- which previously was unavailable. But you define triggers in stellaris events actually. An example of vanilla event trigger:
So basically I had a friend send me this on_death action from CK3 vanilla which looks like this:
What confused me what your example a bit, I understood that regardless of the filename I used if Now it sounds like it doesn't matter as long as the filenames don't match though.
Also in this on_action I see a familiar events array which calls multiple events same as in stellaris. And the only way to overwrite this is to call my on action file death.txt as this file.
To be honest I had to check my notes on the logic I wrote, trust me this taking into account is a really taxing job. You can theoretically overwrite stuff by using filename or some other trick but the method is unreliable (without using replace folder). It is in Irony that I use this priority (or version) to indicate to people that the author probably intended a certain localisation item to be used. You cannot reliably overwrite stuff when you have 2 duplicate items and game does not seem to follow any pattern that can be discernible in case of Stellaris at least. Judging by your answer same applies to CK3. |
Even if there was a way mark if a mod has the same files as any other mods would be very useful. I'm always doing searches when I get a new mod to see if there are any conflicting files. |
Is this feature actually still a thing. It's been a while since the last comments. Without being able to help out much, this would actually be really significant for CK3.
While this is actually so in CK2, EU4, HOI4, the modding mindset and scope of CK3, is now very much Stellaris inspired.
Thoughts on how to get this "project" kickstarted? |
Stellaris has 6 years of experience documented etc CK3 still has none to my knowledge. I still don't own the game so I'm looking for help from someone who owns it. I was asked a couple months back about my experiences of adding this to HOI4 (analyze mode only). These were my thoughts on discord:
As you can see this is only the first step. HOI4 still doesn't have conflict resolution capability and I doubt it will in the near future. |
Ahh, I see. You can't expect that to be implemented in the near future. I like to use the Conflict Solver and have worked with it quite a bit. I would love to help there. But to be honest, my knowledge is clearly limited. What I know (not only modding, but programming itself) is very rudimentary and learned autodidactically. |
Help wanted label is attached to this ticket (and has been for a while). I am losing hope though since it's been a while like this. |
What would the process be to manually figure this out by just trying things? I understand it's a huge amount of things to check, and probably isn't much fun. But if we made a checklist with every common folder in it and the questions we need answered about each we could slowly start chipping away at the problem. |
If you mean detecting how folders are loaded in the game probably by trial and error. You document how the game behaves. Ex.
Then you try to override an element. You pick one element out and put in say
And document whether your override took effect (load the game test changes). This is how it's been done through crowd sourcing in Stellaris. Lot of modders contributed to the wiki. For a lone person to do this is very daunting task. Please do note that I've been told here that maybe the game doesn't even take this into account (FIOS\LIOS like in Stellaris\HOI4) and instead it actually used Load Order. But since I don't own the game I've never been able to confirm. BUT before anything is done one first we need to make Irony understand how to detect duplication in CK3. So before doing what I just described this applies before anything: #271 (comment) Naturally this means one must setup Irony in VS then perform the steps described in that message. In case anyone is interested and wants some more help they can visit the Irony discord and hit me up there. I'll try to respond as soon as I can. |
I also found this https://github.com/nickbabcock/jomini |
Um, what?
|
Conflicting files is a HUGE issue when modding Crusader Kings 3. Many, many mods interact and conflict with each other by editing the same common files. As it is right now, the only way to really deal with this is to manipulate the load order and/or use difference comparison tools manually to find out what parts of each mod to keep.
This is particularly common for UI-based mods and results in a lot of broken UI elements when trying to merge even with careful usage of load orders.
It would be very nice if the conflict resolution currently implemented only for Stellaris could be used on Crusader Kings 3 as well. I'm not entirely sure if this has been requested or touched on before but it would make modding significantly less headache inducing.
As of right now, I'm just using VSCode to open the two files and using the comparison feature to manually create merged files. I then put these merged files into a personal mod folder to be loaded last (so a compatibility patch, essentially.)
I would quite literally throw money at someone to make it so this can be done in a simpler, less labor-intensive manner.
The text was updated successfully, but these errors were encountered: