tuxemon.event.actions.set_player_template module

final class tuxemon.event.actions.set_player_template.SetPlayerTemplateAction(sprite, combat_front=None)[source]

Bases: EventAction

Switch template (sprite and combat_front).

Please remember that if you change the combat_front, automatically will change the combat_back.

Eg if you put xxx, it’s going to add xxx_back.png

if you choose a feminine sprite, then it’s advisable:

heroine

if you choose a masculine sprite, then it’s advisable:

adventurer

Script usage

set_player_template <sprite>[,combat_front]
Script parameters:
  • sprite – must be inside mods/tuxemon/sprites (default = original)

  • eg – adventurer_brown_back.png -> adventurer

  • combat_front – must be inside mods/tuxemon/gfx/sprites/player

  • eg – adventurer.png -> adventurer

Parameters:
  • sprite (str) –

  • combat_front (str | None) –

combat_front: str | None = None
name: ClassVar[str] = 'set_player_template'
sprite: str
start()[source]

Called only once, when the action is started.

For all actions, you will need to override this method.

For actions that only need to run one frame you can simply put all the code here. If the action will need to run over several frames, you can init your action here, then override the update method.

Return type:

None