Europa Universalis IV

Europa Universalis IV

Automatic building removal
22 Comments
Taipan 4 Apr, 2022 @ 12:21am 
Did it myself, if anyone wants to do it, just open each text file in the mod, search for the vanilla function, copy paste the new vanilla over the former vanilla code, and keep the code added by the mod, which removes buildings and stuff. Works like a charm.
Taipan 1 Apr, 2022 @ 3:44pm 
I think this needs an update.
Droog 16 Mar, 2022 @ 7:32pm 
Very based
这瓜保熟吗 4 Mar, 2022 @ 7:39am 
可以的, 这个mod, 我以前有一个类似的mod, 不过是做成决议的形式来手动触发的. 你要不要考虑下呢, 亲!
Luc  [author] 9 Feb, 2022 @ 2:36pm 
Ah, okay. No, it shouldn't. As far as I'm aware, the conditions only trigger on actual ownership changes of provinces, not on temporary occupation.
KillWonder 9 Feb, 2022 @ 2:00pm 
I meant when the AI occupies a province, do they delete buildings as well on there?
Luc  [author] 9 Feb, 2022 @ 9:06am 
@KillWonder I'm not sure if I fully understand your question, but to hopefully answer it (and maybe a couple of others): the mod deletes certain buildings when a province is gained by a player. It does not automatically remove buildings for the AI. However, the AI may construct buildings which will be deleted once you conquer/integrate/buy/smurf their provinces (which is basically why I made the mod, since I got tired of manually destroying tons of stuff in new provinces) :)
KillWonder 9 Feb, 2022 @ 7:21am 
Does this also count for the AI?
Luc  [author] 3 Dec, 2021 @ 9:08am 
Brief update: I've updated the mod for 1.32.2 (including compatibility with the base game effects of the triggers as discussed below). No functionality changes though.
Luc  [author] 3 Dec, 2021 @ 8:14am 
On further thought, I think moving the effect to a decision and removing all automation (or moving the automation part to automatically enabling/disabling the decision) would remove any compatibility issues. I'll think about it.
Luc  [author] 3 Dec, 2021 @ 8:10am 
That's a very good point. Thanks!

As you say, the on_action triggers in EU4 overwrite each other so this mod will not work properly with other mods using the same two triggers. In fact, I wasn't aware of this fact when I made this mod (I ran into this issue with a mod I'd been working on later but didn't realise it'd also affect this one), so I didn't copy any of the effects of the base game either. In other words, this mod also breaks some base game stuff if you're playing (from what I can tell) with some specific nations, government reforms or faiths. Mostly minor stuff, but still.
I'll at least make the mod compatible with the base game. Moving the effects from the on_action triggers to a hidden event with a lot mean time to happen or in one of the yearly pulses would make it more compatible but would probably decrease performance, so I'm hesitant to change that.

I'll add a note in the description for the time being.
Shiyah 3 Dec, 2021 @ 7:47am 
ah, just a note that i had trouble with the on_action overwriting other on_actions of the same type. so i think the mod will break the other mods' on_province_owner_change and on_trade_good_changed effects.
Luc  [author] 3 Dec, 2021 @ 2:38am 
I'll also have to figure out how to update the mod now that I'm on a new computer, but it should be possible to link it again somehow :)
Luc  [author] 3 Dec, 2021 @ 2:36am 
@Vulkandrache Hi! Sorry for the tardy reply. To be brief about it: yes, it would be possible to add this. I don't think it should be hard either. It's on my list of things to do when I eventually get around to overhauling the mod but that might take some time.

In the meantime, if you wish to change it in your local copy: you can disable the automatic cleanup by changing or removing the file in on_actions. For adding a decision, it's probably the easiest to take some existing decision from the base game as an example. I imagine it would work to have the potential set to being a player nation, always allowing the decision, setting ai_will_do to 0 and using the scripted effect in the mod files to all the nation's provinces. The wiki (along with other mods) is a good reference point for the technical details :)
Vulkandrache 24 Nov, 2021 @ 7:45pm 
Is there a way to add a decision to runthe building removal with a click and not automatic?
I might want to remove churches later but at the start there is no reason to not have them make money.
Shiyah 16 Apr, 2021 @ 5:47pm 
@Luc I've added special manufactories and barracks to the auto-delete. Removed drydock, cathedral, and shipbuilding buildings. Tweaked the mismatching manufactory trigger to fit my preferences. Added Anbennar stuff since I play Anbennar a lot.

My thinking is that drydock, training fields, and cathedral add enough value over their t1 versions that i'm okay with them using a slot. Don't really care for special manufactories (even if they cost a lot) unless I place them personally. I kinda like the naval forcelimit buildings even if I don't build them that often. Personal preference I guess.
Luc  [author] 3 Apr, 2021 @ 10:49am 
@Shiyah Fair enough :P Some of the defaults are just what I would usually like, though it's typically situational (and I might not be a typical player). I haven't gotten around to adding a customisation decision yet. For reference, what are your preferences? That might help me in adding more options later on :)

@Peg City Fiend Yep, agreed ;)
Peg City Soldier 3 Apr, 2021 @ 12:36am 
if only this was ironman compatible :(
Shiyah 21 Mar, 2021 @ 6:04am 
thanks for the mod. disagree a bit with the defaults, but i can edit it myself to fit my preferences
Luc  [author] 16 Mar, 2021 @ 12:24am 
@Summercat Glad to hear you like it! ;)
Summercat 15 Mar, 2021 @ 6:31pm 
I don't plan on using this mod, but I'm subscribing because of the pic you used for it.
ampa_mushing 12 Mar, 2021 @ 7:35am 
Gee thanks.