52 lines
1.9 KiB
Text
52 lines
1.9 KiB
Text
# The choice is made based on a weighted random, but the first weight that evaluates to >= 100 will be automatically chosen
|
|
|
|
my_animation = { # Name of the animation, this is the name events and gui scripts reference. If no item has a weight > 0 no item will be selected
|
|
male = { # Animations are scripted for each portrait type, all types needs to be scripted
|
|
default = { head = "idle" torso = "idle" } # Default animation used if no item has a weight > 0, or if it is used in a non scripted environment
|
|
|
|
force = no # portrait_modifier are copied to children if they have none of their own. If specified, copying is skipped unless force = yes. Default is no.
|
|
|
|
portrait_modifier = { # Triggered portrait modifier for when this animation is picked. The first one satisfying the trigger will be picked.
|
|
trigger = {
|
|
age > 30
|
|
}
|
|
custom_beards = awesome_beard # One or multiple portrait modifier overrides
|
|
clothes = basic_clothes
|
|
.....
|
|
}
|
|
|
|
portrait_modifier = ...
|
|
|
|
evil = { # Item, specifies animations to be used if this one is choosen by the weighted random
|
|
animation = { head = "evil" torso = "evil" }
|
|
|
|
portrait_modifier = ... # Portrait modifiers for the current variant (same syntax as for the default animation). If none are specified, the default animation ones will be used.
|
|
portrait_modifier = ...
|
|
|
|
weight = { # This is where the weight is calculated
|
|
base = 1 # The final weigth is calculated like this:
|
|
# weight = base
|
|
# for each modifier
|
|
# weight *= modifier factor
|
|
# weight += modifier add
|
|
modifier = {
|
|
add = 10
|
|
has_trait = evil
|
|
}
|
|
modifier = {
|
|
factor = 0
|
|
has_proffession = programmer
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
boy = {
|
|
default = { head = "idle_boy" torso = "idle_boy" }
|
|
}
|
|
|
|
female = {
|
|
default = { head = "idle" torso = "idle" }
|
|
}
|
|
girl = female
|
|
}
|