Difference between revisions of "Character modding"

From Imperator Wiki
Jump to navigation Jump to search
(Archimedes update)
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Version|Pre-release}}
+
{{Version|1.4}}
 
{{Expand}}
 
{{Expand}}
  
 
== Characters ==
 
== 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.
+
Pre-defined characters are located the in <code>/game/setup/characters/</code> folder. 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.
 
<pre>
 
<pre>
 
"TAG"={
 
"TAG"={
Line 56: Line 56:
 
}
 
}
 
</pre>
 
</pre>
 +
 +
==Character attributes==
 +
 +
The following attributes can be used to define characters:
 +
{| class="wikitable"
 +
!Attribute
 +
!Description
 +
!Example
 +
|-
 +
|first_name
 +
|Name of Character
 +
|first_name="Alexander"
 +
|-
 +
|family
 +
|Family of an '''living''' character. "c:" is the tag of the country, "fam:" is the name of the family.
 +
|family = c:EPI.fam:Aiakidai
 +
|-
 +
|family_name
 +
|Family of an '''dead or unimportant''' character.
 +
|family_name="Argead"
 +
|-
 +
|nickname
 +
|The nickname of an character. See more at [[Cognomen]].
 +
|nickname = "NICKNAME_II"
 +
|-
 +
|birth_date
 +
|Date of the birth of an character. Please note, that the birth date is in '''Ab Urbe Condita'''.
 +
|birth_date=418.7.8
 +
|-
 +
|death_date
 +
|Date of the birth of an character. Please note, that the birth date is in '''Ab Urbe Condita'''.
 +
|death_date=429.7.8
 +
|-
 +
|culture
 +
|Culture of an character. See [[Culture]].
 +
|culture="macedonian"
 +
|-
 +
|religion
 +
|Religion of an character. See [[Religion]].
 +
|religion="roman_pantheon"
 +
|-
 +
|add_trait
 +
|Adds an trait. See [[Characters#Traits|Characters]]
 +
|add_trait="ambitious".
 +
|-
 +
|dna
 +
|Defines the look of an character. Use the portrait editor, to see the dna.
 +
|dna=""
 +
|-
 +
|father
 +
|Defines the father of an character. The number is the id of the father.
 +
|father="char:35"
 +
|-
 +
|mother
 +
|Defines the mother of an character. The number is the id of the mother.
 +
|mother="char:36"
 +
|}
 +
 
=== Character interactions ===
 
=== Character interactions ===
 
<pre>
 
<pre>
Line 111: Line 169:
 
}
 
}
 
</pre>
 
</pre>
 +
  
  
 
{{Modding navbox}}
 
{{Modding navbox}}
 
[[Category:Modding]]
 
[[Category:Modding]]

Latest revision as of 09:00, 15 June 2020


Characters[edit]

Pre-defined characters are located the in /game/setup/characters/ folder. 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 attributes[edit]

The following attributes can be used to define characters:

Attribute Description Example
first_name Name of Character first_name="Alexander"
family Family of an living character. "c:" is the tag of the country, "fam:" is the name of the family. family = c:EPI.fam:Aiakidai
family_name Family of an dead or unimportant character. family_name="Argead"
nickname The nickname of an character. See more at Cognomen. nickname = "NICKNAME_II"
birth_date Date of the birth of an character. Please note, that the birth date is in Ab Urbe Condita. birth_date=418.7.8
death_date Date of the birth of an character. Please note, that the birth date is in Ab Urbe Condita. death_date=429.7.8
culture Culture of an character. See Culture. culture="macedonian"
religion Religion of an character. See Religion. religion="roman_pantheon"
add_trait Adds an trait. See Characters add_trait="ambitious".
dna Defines the look of an character. Use the portrait editor, to see the dna. dna=""
father Defines the father of an character. The number is the id of the father. father="char:35"
mother Defines the mother of an character. The number is the id of the mother. mother="char:36"

Character interactions[edit]

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