If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Modding in EU4

One of the best things in Paradox games is in my opinion the ability to mod the game and it has only gotten better and more accessible with the years, with more commands and whatnot. Assuming this trend is being kept in EU4 then I do think there is one thing that could be expanded upon: compatibility.

That you have to actively go into every single file to change something is (while it is good that you can!) somewhat of a compatibility issue for mods and it does stop some people from enjoying several good mods at the same time. Of course it won't stop a modder like me, but there are plenty who are not well into or simply don't have the time/will/whatever to merge mods.

So. What do I propose? In CIV5 you have an 'update' command for XML stuff. It allows you to target something in the original game files and replace it with something else - or add something. I am not suggesting that Paradox should be doing it exactly that way, but the idea is that you essentially write a script that updates the game files with some new data - that means two mods could potentially tinker with the exact same event and still work.

In other words, you could have a folder modname/scripts where you put all your scripts, then change certain things in the game with a command that could look like this:

Code:

update = {

file = "muhko.txt" // Finds the file in question
type = event // Figures out if we are crazy about an event, decision, mission or so on
name = "EVT701" // Finds the name of the event, decision, etc.
utrigger = {

religion = pastafarian // Updates the triggers with one more requirement.

}
MTTH = {

days = 101 // Replaces the meantime to happen for the event, including all modifiers.

}

}

Could be something like that, I am quite certain the development team is smarter than me when doing this. So look at the idea and the problem presented instead.

Why all that trouble when you can just go to the mod files and edit whatever you want with very little work?

As I said: Compatibility. In CIV5 for example you can make a lot of small mods and then have them all load without problems. In CK2 we can load several mods at once but if files conflict (as in two mods edit the same file) you got a bug - even if they edit two different parts of the file. In CIV5 you can edit the same file and still have it function without bugs (so long you do not edit the exact same thing, and even then it still works). By doing things in an 'update' fashion as I suggested you can more easily have several mods running flawlessly at the same time.

Edit: Oh and I might add that CIV5 has commands to delete missing references and you can edit a lot of similar things with a single command. It is good things to have when modding I think - even if CIV lacks the ease that EU3 and CK2 has with the files, but I am not asking for that to be taken away.

As I said: Compatibility. In CIV5 for example you can make a lot of small mods and then have them all load without problems. In CK2 we can load several mods at once but if files conflict (as in two mods edit the same file) you got a bug - even if they edit two different parts of the file. In CIV5 you can edit the same file and still have it function without bugs (so long you do not edit the exact same thing, and even then it still works).

I don't know CKII, but if that is the problem then wouldn't it be easier to have the mods not conflicting if they don't edit the same thing instead of adding a file that references another file?

I don't know CKII, but if that is the problem then wouldn't it be easier to have the mods not conflicting if they don't edit the same thing instead of adding a file that references another file?

Of course it is easier to try and avoid the problem by not making mods conflict, but fact of the matter is that sometimes it cannot be avoided. Let me give you can example in EU3 terms:

Make the following assumption: You can load several mods at once.

Mod-1 edits the file buildings.txt in the common folder and edits the tech level that a temple can be built at.

Mod-2 edits the file buildings.txt in the common folder and edits the cost for the university.

These two mods now conflict with each other, even if it is a very minor thing that could easily be merged. But think if you had 5 mods or 10 or even 20. Then things starts to get hairy and annoying since you have to figure out exactly what do they edit and then merge it. If these mods had all simply used an update command they would not conflict with each other.

Would be nice to have the ability to do replacement at the event/decision/mission/history entry level instead of at the file level. You could do this with the existing system if every event/decision/mission/history entry had its own file (which would be very difficult to manage). Similarly I've suggested before that scripted modifiers be broken out into multiple files the way events/decisions/missions are (which was done in CK2 1.05 so I assume this will be in EU4 as well) and even better would be the ability to overlay a single modifier. Not sure if this is worth the development effort though; to some extent just breaking down some of the largest files into smaller chunks would be a useful substitute.

EDIT: One problem with this more granular approach (and your suggestion which goes further than this to the actual line level) and your multiple mods point is that having multiple mods that aren't specifically designed to work together editing the same object is probably going to cause problems even without them overwriting each other's changes. Changing a trigger or effect in an event without knowing what other changes have already been made could easily break one or both mods. This would apply to my post as well since many events are part of a chain, possibly linked to a decision or mission, and replacing one of those objects could break the chain.

Last edited by jdrou; 30-08-2012 at 16:39.

"The trouble with fighting for human freedom is that one spends most of one's time defending scoundrels. For it is against scoundrels that oppressive laws are first aimed, and oppression must be stopped at the beginning if it is to be stopped at all." --H. L. Mencken
Playing EU4

EDIT: One problem with this more granular approach (and your suggestion which goes further than this to the actual line level) and your multiple mods point is that having multiple mods that aren't specifically designed to work together editing the same object is probably going to cause problems even without them overwriting each other's changes. Changing a trigger or effect in an event without knowing what other changes have already been made could easily break one or both mods. This would apply to my post as well since many events are part of a chain, possibly linked to a decision or mission, and replacing one of those objects could break the chain.

Sure, some probably are not supposed to mix, but some could mix without problem and even benefit from it. Personally I think splitting every event up into its own file is too much of a hassle and it still does not solve the actual problem when two mods wish to slightly alter the same event in different ways.

Would be nice to have the ability to do replacement at the event/decision/mission/history entry level instead of at the file level. You could do this with the existing system if every event/decision/mission/history entry had its own file (which would be very difficult to manage). Similarly I've suggested before that scripted modifiers be broken out into multiple files the way events/decisions/missions are (which was done in CK2 1.05 so I assume this will be in EU4 as well)...

EDIT: One problem with this more granular approach (and your suggestion which goes further than this to the actual line level) and your multiple mods point is that having multiple mods that aren't specifically designed to work together editing the same object is probably going to cause problems even without them overwriting each other's changes. Changing a trigger or effect in an event without knowing what other changes have already been made could easily break one or both mods. This would apply to my post as well since many events are part of a chain, possibly linked to a decision or mission, and replacing one of those objects could break the chain.

The idea of splitting up the modifiers into different files would be fantastic.

On your 2nd point, I think there's a distinction to be made here, between "working" as in running, and "working" as in being a good game. The granular suggestion obviously is directed at the former. I'd like to point out that, just because triggers, effects, and the like, are incompatible in the 2nd sense, is not a reason to keep us from trying to mix them. It just means that they take more testing, and that is what the OP's really would help. We could take X from MEIOU and Y from TN, and Z from MM, and see how they mix; then mod from there. As it is, we have to rewrite the same files over repeatedly, for each step of testing.

'Believe me, my young friend, there is nothing--absolutely nothing--half so much worth doing as simply messing about in boats.' -- the Water Rat

Remember we're talking more about end-users mixing mods though, not just modders. If a user installs two mods and the game doesn't crash they'll probably assume everything is good when it really isn't working properly and if they aren't a modder themselves they may not be able to identify the problem let alone fix it. While making it more granular would make it somewhat easier for modders to merge mods or make their mod compatible with others the modder will still need to do that work just as they do now. It wouldn't really help the end-user load two mods that hadn't been designed for each other.

"The trouble with fighting for human freedom is that one spends most of one's time defending scoundrels. For it is against scoundrels that oppressive laws are first aimed, and oppression must be stopped at the beginning if it is to be stopped at all." --H. L. Mencken
Playing EU4

Remember we're talking more about end-users mixing mods though, not just modders. If a user installs two mods and the game doesn't crash they'll probably assume everything is good when it really isn't working properly and if they aren't a modder themselves they may not be able to identify the problem let alone fix it. While making it more granular would make it somewhat easier for modders to merge mods or make their mod compatible with others the modder will still need to do that work just as they do now. It wouldn't really help the end-user load two mods that hadn't been designed for each other.

True enough. But then, is that a problem which has a solution? I mean, if someone wants to combine MM's abstracted exploration with Rex Maris, then "King John, somebody told me, said to a man he knew, if people go down to the end of town, what can anyone do?"

'Believe me, my young friend, there is nothing--absolutely nothing--half so much worth doing as simply messing about in boats.' -- the Water Rat

True enough. But then, is that a problem which has a solution? I mean, if someone wants to combine MM's abstracted exploration with Rex Maris, then "King John, somebody told me, said to a man he knew, if people go down to the end of town, what can anyone do?"

Exactly this. In CIV5 you generally have modders saying which mods are not compatible in the description.

This would not be my most pressing request, but it would be a nice feature. It is not about the difficulty of modding files so much as the shear number that sometimes need to be modded. If one is modding the province files you could be talking about modding thousands of files. One unified system would be nice.

This would not be my most pressing request, but it would be a nice feature. It is not about the difficulty of modding files so much as the shear number that sometimes need to be modded. If one is modding the province files you could be talking about modding thousands of files. One unified system would be nice.

Indeed. This is by no means a deal-breaker for me, I just thought it would be nice to have as a modder. It would make my life infinitely easier.