Skip to content

Character Background, Animations and Environment

Chris Kaiser edited this page Aug 25, 2026 · 3 revisions

Character Panel Background and VFX

Background

To change a characters background image in the character panel you will first need to create a self referencing ideology with the image you want as the background set as the icon:

character_background_gate_char_role_arcanist = {
    icon = gfx/interface/character_backgrounds/gate_char_role_arcanist.dds

    priority = 0

    character_ideology = no
}

The name in localization needs to be the same as the ideology key. Alternatively you can simply not do any localization at all.

 character_background_gate_char_role_arcanist: "character_background_gate_char_role_arcanist"

and finally you can use the set_com_character_background effect in the character scope to set the background:

set_com_character_background = {
    background = character_background_gate_char_role_arcanist
}

There can only be one character background. When the effect is run again it will overwrite the previous background.

VFX

You can also add custom VFX elements to your background. This only works with custom backgrounds! This is done with the add_com_character_background_vfx effect which is also run in the character scope:

add_com_character_background_vfx = {
    vfx = vfx_entity_ui_bg_char_ruler_smoke
}

There can be an unlimited amount of VFX set on the character since in the background its a list.

Character Animations and Environment

To change a characters animation, camera and environment CMF provides a series of scripted effects to set them:

  • set_com_character_animation - sets only the animation
  • set_com_character_camera - sets only the camera
  • set_com_character_environment - sets only the environment
  • set_com_character_portrait - sets all three elements
  • set_com_character_portrait_everywhere - sets all three elements for every portrait of the character

Another scripted effect remove_com_character_portrait removes all three elements. Individual elements can be removed with remove_variable = com_character_"element"

All of these effects must be run in the scope of the character.

NOTE These effects will change the character portrait in all COM event windows and set_com_character_portrait_everywhere does so EVERYWHERE the character is shown and will be PERMANENT unless removed! So use this effect with caution.

The set_com_character_portrait and set_com_character_portrait_everywhere effects have three required parameters:

  • animation - A localization key containing the animation name
  • camera - A localization key containing the camera name
  • environment - A localization key containing the environment name

The other three setting effects have only one of those parameters, matching the effect's name. remove_com_character_portrait has no parameters.

CMF has predefined the base game animations, cameras, and environments. They can be found here.

NOTE Either localization or the "base" value can be used; i.e. both com_animation_idle and idle produce the same pose - as long as idle is not also a localization key.

If you want to use custom values for modded animations, cameras, and environments, you can simply define them as localization keys, like CMF already does.

Usage Example

One of the main use cases for this feature is posing characters in specific events. Here is a very simple example event:

some_event.1 = {
	# ... event stuff

    gui_window = event_window_1char_tabloid
    left_icon = root.ruler

	immediate = {
		ruler = {
            set_com_character_portrait = {
                animation = com_animation_idle
                camera = com_camera_lifestyles
                environment = com_environment_agitator_main
            }
		}
	}

    after = {
        ruler = {
            remove_com_character_portrait = yes
        }
    }

	# ... event stuff
}

Clone this wiki locally