• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

evilon

Major
133 Badges
Jun 10, 2004
722
473
  • Europa Universalis IV: Cradle of Civilization
  • Crusader Kings II: Conclave
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Steel Division: Normandy 44
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Knights of Honor
  • Crusader Kings Complete
  • Europa Universalis IV: Third Rome
  • BATTLETECH
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Age of Wonders: Shadow Magic
  • Age of Wonders
  • Age of Wonders II
  • Cities: Skylines - Green Cities
  • Imperator: Rome - Magna Graecia
  • Imperator: Rome Sign Up
  • Stellaris: Ancient Relics
  • BATTLETECH: Season pass
  • Age of Wonders: Planetfall
  • Stellaris: Lithoids
  • BATTLETECH: Heavy Metal
  • Hearts of Iron IV: La Resistance
  • Stellaris: Federations
  • Europa Universalis 4: Emperor
  • Hearts of Iron IV: No Step Back
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Crusader Kings III: Royal Edition
  • Crusader Kings III
  • Prison Architect
I've made a mod that mainly makes some changes to the map (+1 state, taking pieces from 2 others, adjusting some province modifiers), and where buildings, people and resourcers are. It's called split Piedmont (parts of Piedmont and Nice is part of Liguria now, partly to not disappoint Garibaldi ;) ) for reference. My main issue is that I believe Imight have included too much data in the mod, which doesn't help my mediocre ability to keep it updated.

So I'd like to be more intelligent about what data and files I include in the mod so that my ability to keep it updated is improved.
What should I read?
Or does anyone have general pointers on how I can do things in a more efficient way?
 
File/folder compares are the usually way I check for new changes when overwriting vanilla files. Beyond that, it's just about know what your mod interacts with and what related vanilla files you need to check.
 
File/folder compares are the usually way I check for new changes when overwriting vanilla files. Beyond that, it's just about know what your mod interacts with and what related vanilla files you need to check.

I've done some occasional scripting since the later half of the 90'ies, starting with eggdrop/tcl (bots for use on irc) and moving on to minor modding for paradox games. But somehow I've never wrapped my brain around compares in a great way. If I'm using Notepad++, any resources, specific to that or not, you would recommend? Bonus poins if it's tailored to an old and spent adhd brain. o_O

And I might not have worded it right, so I'll give it another shot with a specific example: Let's say I'm trying to make changes to Piedmont and adding Liguria. Would there be a good way to not have to include information about Tuscany? And if I just want to specifically remove SAR Provence (Nice)/move the map tile to Liguria, do you know any way of doing that without including data about the whole of France?
 
Last edited:
I've done some occasional scripting since the later half of the 90'ies, starting with eggdrop/tcl (bots for use on irc) and moving on to minor modding for paradox games. But somehow I've never wrapped my brain around compares in a great way. If I'm using Notepad++, any resources, specific to that or not, you would recommend? Bonus poins if it's tailored to an old and spent adhd brain. o_O
I've used "WinMerge" for a long time now, that's more effective than just notepad++ as it highlights differences line-by-line, as well as folder comparisons. There are many similar programs, so you can find what works best for you.
And I might not have worded it right, so I'll give it another shot with a specific example: Let's say I'm trying to make changes to Piedmont and adding Liguria. Would there be a good way to not have to include information about Tuscany? And if I just want to specifically remove SAR Provence (Nice)/move the map tile to Liguria, do you know any way of doing that without including data about the whole of France?
Given what I know so far of Vic3 modding, I don't think so. That is, generally, any changes to vanilla files requires overwriting that file entirely. That's not always the case, and I haven't tested what changes can be "dropped" in or overwritten on an script item basis versus a file basis (Stellaris has many things that can be "dropped-in"/selectively overwritten). But it rarely hurts to try, you might be able to overwrite just a single state by redefining it in a new file, presumably one that is alphanumerically later (so zz_better_italian_states.txt or something like that) and including your changes to Provence and Liguria there.
 
I've used "WinMerge" for a long time now, that's more effective than just notepad++ as it highlights differences line-by-line, as well as folder comparisons. There are many similar programs, so you can find what works best for you.

Given what I know so far of Vic3 modding, I don't think so. That is, generally, any changes to vanilla files requires overwriting that file entirely. That's not always the case, and I haven't tested what changes can be "dropped" in or overwritten on an script item basis versus a file basis (Stellaris has many things that can be "dropped-in"/selectively overwritten). But it rarely hurts to try, you might be able to overwrite just a single state by redefining it in a new file, presumably one that is alphanumerically later (so zz_better_italian_states.txt or something like that) and including your changes to Provence and Liguria there.
Thank you. I'll try the latter first and get and practice on the former before 1.5. :)
 
Given what I know so far of Vic3 modding, I don't think so. That is, generally, any changes to vanilla files requires overwriting that file entirely. That's not always the case, and I haven't tested what changes can be "dropped" in or overwritten on an script item basis versus a file basis (Stellaris has many things that can be "dropped-in"/selectively overwritten). But it rarely hurts to try, you might be able to overwrite just a single state by redefining it in a new file, presumably one that is alphanumerically later (so zz_better_italian_states.txt or something like that) and including your changes to Provence and Liguria there.

You seem to be right, you can only add or overwrite, and not subtract:

Tested with buildings on Savoy, because reasons I guess. Sorry to all the confused peasants.

Code:
BUILDINGS={
    s:STATE_SAVOY={
        region_state:SAR={
            create_building={
                building="building_iron_mine"
                level=5
                reserves=1
                activate_production_methods={ "pm_picks_and_shovels_building_iron_mine" "pm_no_explosives" "pm_no_steam_automation" "pm_road_carts" "pm_merchant_guilds_building_iron_mine" }
            }
        }
    }
}

It just added Iron mines, and didn't overwrite anything. Farms etc was still there.

del_building, delete_*, rem_*, remove_* kill_* aren't commands, so I found no way to remove the various farms while testing. I'm assuming this is the same for most if not everything in /history/ that uses create_* commands. There may have been commands that I don't know of, that would counter the various "create*" commands.


I did another test:

Code:
BUILDINGS={
    s:STATE_SAVOY={
        region_state:SAR={
            create_building={
                building="building_wheat_farm"
                level=4
            }
            create_building={
                building="building_livestock_ranch"
                level=6
                reserves=1
            }
            create_building={
                building="building_logging_camp"
                level=3
                reserves=1
                activate_production_methods={ "pm_saw_mills" "pm_no_hardwood" "pm_no_equipment" "pm_road_carts" "pm_privately_owned_building_logging_camp" }
            }
        }
    }
}

All of those changed the level to the level in the later file, if it was a higher level. I found no way to reduce the level. Tried level=0, =-1 and = .

Code:
state_trait_po_river = {
    icon = "gfx/interface/icons/state_trait_icons/mountain.dds"
   
    modifier = {
        state_construction_mult = -0.15
        state_infrastructure_mult = -0.15
    }
}

Overwrites with a carbon copy of a mountain trait from +15 infrastructure and river icon.

I'll edit this one with other tests if I get I find inspiration for new ones, but I think most bases are covered by this.

So it seems we are forced to overwrite the whole file unless someone can come up with a list of commands that subtracts stuff. :)

*Sad lazy modder noises*
 
[snipped]

So it seems we are forced to overwrite the whole file unless someone can come up with a list of commands that subtracts stuff. :)

*Sad lazy modder noises*

There is a remove_building effect; it's used in the industry banned law enactment effect for an example as well as a couple events.

I've found the effect_localization folder to be a handy place to check for effects (likewise for trigger_localization.

Anyway, this is a good find, to know what sort of indirect overwriting can be done.
 
There is a remove_building effect; it's used in the industry banned law enactment effect for an example as well as a couple events.

I've found the effect_localization folder to be a handy place to check for effects (likewise for trigger_localization.

Anyway, this is a good find, to know what sort of indirect overwriting can be done.

Aaah, I tried that with the same variations of format I used on
Code:
create_building
, when I should've just simplified it.

Code:
BUILDINGS={
    s:STATE_SAVOY={
        region_state:SAR={
            remove_building = building_wheat_farm
            remove_building = building_livestock_ranch
            remove_building = building_logging_camp
        }
    }
}

Removes all those buildings completely (leaving just the barracks). I tested that way to see if it just removed 1 level, which it doesn't seem is possible currently. Good to know that I don't have to use it in an event, but can use it in "history" stuff too. I don't want to wrap my head around events....

Well, that makes my life somewhat easier. :)
 
  • 1Like
Reactions: