Script Actions

## Introduction:

Scripting is accomplished with .json objects which contain an "actns" variable and often also an "args" variable. The specific kind of args accepted will depend on the actn. Below is a list of available actns and their usage.

## List of in game actions:

All are activated with the "actn": command.

new\_battle

Launches the battle setup screen. If no args are provided, looks for an "accepted\_mission" game\_var exists which contains the mission being setup. args: can be "mission", "selected:mission", "current\_campaign", or "accepted\_mission" to pull the mission from the corresponding game\_vars

can an object be "prepped\_map" along with a "list" of prepped maps

can be an object with a "map" and "script" file

can also include a "setup\_trigger" which will override the default battle\_group\_setup trigger when launching the battle setup

launch\_battle

Launches the battle that was being setup from new\_battle

launch\_startup

Launches the

restart\_game

            actn = self.restart\_game

file\_var

            actn = self.file\_var

select\_campaign

            actn = self.menu\_campaigns

toggle\_fullscreen

            actn = self.toggle\_fullscreen

eval\_contract

            actn = self.eval\_contract

new\_rpg

            actn = self.launch\_rpg

save\_game

            actn = self.save\_game

load\_game

            actn = self.load\_game

set\_volume

            actn = self.set\_volume

play\_music

            actn = self.script\_play\_music

stop\_music

            actn = self.stop\_music

set\_goods

            actn = self.set\_goods

set\_star\_map\_file

            actn = self.set\_star\_map\_file

mod\_star\_map\_file

            actn = self.mod\_star\_map\_file

lock\_mod\_star\_map\_file

            actn = self.lock\_mod\_star\_map\_file

rpg\_status\_bar\_file

            actn = self.set\_rpg\_status\_bar\_file

battle\_status\_bar\_file

            actn = self.set\_battle\_status\_bar\_file

battle\_unit\_selection\_file

            actn = self.set\_battle\_unit\_selection\_file

battle\_enemy\_selection\_file

            actn = self.set\_battle\_enemy\_selection\_file

new\_planet

            actn = self.launch\_planet

set\_planet

            actn = self.set\_planet

        # elif(cur\_actn == "star\_map

        #     actn = self.star\_map

self\_mod

            actn = self.mod\_current\_map\_json

trigger

            #print(f"trigger from df {df}")

            actn = self.do\_trigger

queue\_trigger

            actn = self.queue\_trigger

delayed\_trigger

            actn = self.delayed\_trigger

add\_triggers

            actn = self.add\_triggers

remove\_trigger

            actn = self.remove\_trigger

rand\_var

            actn = self.do\_rand\_var

            #print(f"do\_rand\_var: {df=}")

set\_attr

            actn = self.set\_attr

var

            actn = self.do\_var

var\_type

            actn = self.do\_var\_type

rep

            actn = self.do\_rep

prep\_maps

            actn = self.prep\_maps\_actn

remove\_list\_item

            actn = self.remove\_list\_item

update\_prompt

            actn = self.update\_prompt

refresh\_ui

            actn = self.refresh\_ui

update\_ui

            actn = self.update\_ui

selected\_actn

            actn = self.do\_selected\_actn

mod\_game\_list

            actn = self.mod\_game\_list

mod\_battle\_group\_list

            actn = self.mod\_battle\_group\_list

mod\_frame

            actn = self.mod\_frame

update\_text\_input

            actn = self.update\_text\_input

mod\_goods

            actn = self.mod\_goods

float\_item

            actn = self.new\_list\_float

close\_prompt

            actn = self.close\_prompt

switch\_tab

            actn = self.switch\_tab

if\_enter\_selected

            actn = self.enter\_only\_action

new\_list

            actn = self.new\_list

remove\_from\_list

            actn = self.remove\_item

remove\_from\_list\_if

            actn = self.remove\_item\_if

add\_to\_list

            if("type" in df["args"] and df["args"]["type"] == "crew

                actn = self.add\_crew

            elif(("type" in df["args"] and df["args"]["type"] == "unit") or "unit" in df["args"]):

                actn = self.add\_unit

            elif("type" in df["args"] and df["args"]["type"] == "news

                actn = self.add\_news

add\_player\_unit

            actn = self.add\_player\_unit

player\_exp

            actn = self.give\_player\_exp

repair\_unit

            actn = self.repair\_unit

damage\_unit

            actn = self.damage\_unit

paint\_unit

            actn = self.paint\_unit

reset\_paint

            actn = self.reset\_paint

select\_option

            actn = self.select\_option

move\_shape

            actn = self.move\_shape

edit\_shape

            actn = self.edit\_shape

remove\_shape

            actn = self.remove\_shape

calc\_travel

            actn = self.calc\_travel

scroll\_to

            actn = self.scroll\_to

spawn\_units

            actn = self.spawn\_units

select\_unit

            actn = self.select\_unit

unit\_order

            actn = self.unit\_order

issue\_order

            actn = self.issue\_order

deactivate\_unit

            actn = self.deactivate\_unit

remove\_map\_triggers

            actn = self.remove\_map\_triggers

trigger\_visible

            actn = self.trigger\_visible

move\_trigger

            actn = self.move\_trigger

mod\_unit\_stat

            actn = self.mod\_unit\_stat

mod\_unit\_add\_item

            actn = self.mod\_unit\_add\_item

mod\_unit\_remove\_item

            actn = self.mod\_unit\_remove\_item

pause\_battle

            actn = self.pause\_battle

mouse\_target

            actn = self.do\_mouse\_target

jump

            actn = self.jump\_to

clear\_on\_date\_change

            actn = self.on\_date\_change\_clear

on\_date\_change" or cur\_actn == "on\_date\_change\_add

            actn = self.on\_date\_change\_add

on\_date\_change\_remove

            actn = self.on\_date\_change\_remove

update\_game\_date

            actn = self.update\_game\_date

loading\_anim

            actn = self.loading\_anim

heal\_crew

            actn = self.heal\_crew

gen\_salvage

            actn = self.generate\_salvage

quit\_game

            actn = self.quit\_box

rand\_force\_name

            actn = self.rand\_force\_name\_for\_var

rand\_pilot\_name

            actn = self.rand\_pilot\_name\_for\_var

rand\_pilot\_portrait

            actn = self.rand\_pilot\_portrait

set\_crew\_name

            actn = self.set\_crew\_name

set\_crew\_gender

            actn = self.set\_crew\_gender

date\_to\_num

            actn = self.date\_to\_num

print

prints a statement to the console, handy when debugging

args: a string to print