Character modding

From Imperator Wiki
Revision as of 14:20, 11 April 2020 by Phillipm02 (talk | contribs) (Archimedes update)
Jump to navigation Jump to search


Characters

Pre-defined characters are handled by the character_setup.csv, it is very important to keep the same number of commas for any additional entries if your editing tool doesn't keep it straight for you like it would something like excel. For traits, to add multiple traits you use a | to separate different traits. You don't have to define everything for a character, the game will fill in as much as it can, but it is wise to do as much as possible. If you want to give a character particular dna, it is very useful to use the portrait_editor (pe) console command to get a dna string that's satisfactory.

"TAG"={
	country="TAG"
	ID={
		first_name="xxx"
		family = c:TAG.fam:xxx
		birth_date=
		culture="xxx"
		religion="xxx"
		no_stats=yes
		add_martial=x
		add_charisma=x
		add_finesse=x
		add_zeal=x
		no_traits=yes
		add_trait="xxx"
		add_gold=xxx
		add_popularity=xx
		c:TAG={
			set_as_ruler=char:ID
		}
		dna="xxx"
	}
}

Example:

"ARM"={
	country="ARM"
	49={
		first_name="Orontes"
		family = c:ARM.fam:Orontid
		birth_date=418.7.8
		culture="armenian"
		religion="zoroaster"
		no_stats=yes
		add_martial=6
		add_charisma=8
		add_finesse=5
		add_zeal=8
		no_traits=yes
		add_trait="unnoticeable"
		add_gold=500
		add_popularity=80
		c:ARM={
			set_as_ruler=char:49
		}
		dna="IvUi9ZyfnJ/UpNSkAmgCaAKIAogClgKWAoUChQJwAnACdQJ1AokCiQJpAmkClwKXA60DrQKAAoACrwKvApUClQAvAC8CbgJuAn4CfgKRApEClAKUAocChwJxAnECjgKOAoYChgJzAnMDrQOtACMAIwJrAmsChAKEApICkgKIAogCewJ7AoMCgwJpAmkCcwJzAnQCdAKZApkCjQKNAWMBYwOyA7ICcwJzAooCigKGAoYCkQKRAnoCegF0AXQBdwF3AogCiAOjA6MClwKXAm0CbQKFAoUChwKHAEgASAKUApQEzATMAoUChQIXAhcCtgK2AHIAcgF5AXkAAwADAMYAxgKvAq8AxgDGAXABcACuAK4ABgAGAGwAbAB/AH8A0gDSAAcABwFWAVYBPQE9ApYClgAQABAA3wDfAosCiwB/AH8AlwCXAX0BfQB/AH8BIgEiAscCxwCtAK0AsQCxBPIE8gCTAJMCigKKBMcExwMGAwYLVgtWAH8AfwVDBUMGngaeAb4BvgNBA0EEngSeAdgB2AAAAAAAAAAAAAAAAA=="
	}
}

Character interactions

hold_triumph = {

    on_other_nation = no
    on_own_nation = yes
    
    sound = "event:/SFX/UI/Character/sfx_ui_character_hold_triumph"
    
    potential_trigger = {
        hidden:scope:target = {
            is_alive = yes
        }
    }
    
    allowed_trigger = {
        hidden:scope:actor = {
        
            
        
            can_pay_price = hold_triumph
            
            custom_tooltip = {
                text = "TRIUMPH_RECENTLY_HELD"
            
                NOT = { has_variable = triumph_recently_held }
            }
        }
        scope:target = {
            is_adult = yes
            
            days_since_last_victory < 720
        }
    }
    
    effect = {
        scope:actor = {
            pay_price = hold_triumph
            
            set_variable = {
                name = triumph_recently_held
                value = 1
                days = 365
            }
            
        }
    
        scope:target = {
            add_loyalty = loyalty_huge
            add_popularity = popularity_huge
        }
    }
    
}


Documentation EffectsTriggersModifiersScopesVariablesData TypesLocalisationCustomizable localization
Scripting AIBuildingsCasus belliCharacterCharacter InteractionsCombat TacticsCountriesCultureDecisionsDefinesEconomic PoliciesEventsEthnicitiesGovernmentGovernor PoliciesIdeasModifiersMilitary TraditionsOfficesOn ActionsPartiesPricesPopsReligionScript ValuesScript ModifiersSetupSubject TypesTechnologyTrade goodsTraitsUnits
Map MapTerrain
Graphics 3D ModelsInterfaceGraphical AssetsFontsParticlesShadersUnit models
Audio MusicSound
Other Console commandsChecksumMod structureTroubleshooting