-
Notifications
You must be signed in to change notification settings - Fork 0
Mission Functions And Commands
these are functions used by all types of missions. both story and special missions. all functions on this page use the following format:
examplemission.SetActive()
sets the mission as active. active missions will be randomly selected in the mission select screen.
examplemission.SetInactive()
sets the mission as inactive. inactive missions will not be randomly selected in the mission select screen. used in cases where a certian decision or action on the players part will remove a mission from the available mission pool without marking it as complete
examplemission.SetComplete()
does the same thing as 'SetInactive()' but also sets the mission as complete. the "completed" tag on missions is used to determine if a mission has been seen by a player. also used in some ingame logic
examplemission.SetActivationDate(33)
arguments:
Totaldays: an integer that represents the total ingame days passed to activate on
sets the date in total days var "calendar.Totaldays" for this mission to automatically activate on. intended for missions that should automatically activate after a certain amount of time ingame has passed (such as a new character being introduced)
examplemission.Delayactive(7)
arguments:
days: an integer of days to delay by
sets the date in total days var "calendar.Totaldays" + inputted number for this mission to automatically activate. intended to make missions active after a predetermined amount of time (like when a mission is meant to take place a week after the player finishes a previous mission)
examplemission.Conditional_activate(othermission1,othermission2,othermission3,othermission4)
arguments:
missions: a single or a list of mission instances to check against
takes in the instances of several other missions and checks to see if they are all completed. if all are completed then it sets the mission to active.
used in cases where you would want to see if several other missions were completed without having to use long "if/else" chains
examplemission.Conditional_activate_percentage(60,othermission1,othermission2,othermission3,othermission4)
arguments:
threshold float 0 to 100
missions: a single or a list of mission instances to check against
takes in number between 1 and 100 and a list of missions as arguments
checks to see what percentage of those missions are completed and if its higher than the threshold. it activates the mission. used the same as conditional activate
functions specific to certain types of missions
examplemission.Priorityactive()
immediately adds this mission to the start of the special queue.
used for special missions that have to be done next in front of other missions
examplemission.Override_story_information(["new mission title","new mission preamble","new_mission_image.png"])
arguments:
new_information: a python list of new information to override the mission story information with
used in cases where its needed to override the display information of a mission with new information.
these functions are meant to be used to control the flow of dialogue during missions.
format:
if examplefunctionhere(variables):
"new dialogue here"
$ functionshere()
else:
"other dialogue here"
$ otherfunctionshere()
takes in the instances of several other missions and checks to see if they are all completed. if all are completed then it returns true. used in cases where you would want to see if several other missions were completed without having to use long "if/else" chains
arguments:
threshold: float 0 to 100
missions: mission instances
takes in number between 1 and 100 and a list of missions as arguments
checks to see what percentage of those missions are completed and if its higher than the threshold. it returns true if the percentage of missions completed is higher than the set threshold