Skip to main content

Field Commands

Field Commands are helpful "functions" that can be used in nearly any text fields in Pandemic's Script Creator (PSC).

Available Commands

Field CommandWhat it turns into
var(Variable Name), v(Variable Name)the variable's value
parameter(Parameter Name, p(Parameter Name), param(Parameter Name)inside of a custom action, this will be the parameter's value that was passed in
list(List Variable Name)the list as a comma separated string
list(List Variable Name, Element Position)the list item at the given position
map(Map.Key)the key's value in the given map
prop(Variable Name, Property Name), property(Variable Name, Property Name)the variable's property value, can be used with any property with a Variable Property action
size(List Variable Name)the list's length
version()the script's current version as listed in the main action
script()the script's name
timer(Timer Name)the length of time remaining in a timer, formatted hh:mm:ss
timerLong(Timer Name)the length of time remaining in a timer, formatted Xd Xh Xm Xs
time()the current time in milliseconds
runtime()the current runtime of your script, formatted hh:mm:ss
runtimeLong()the current runtime of your script, formatted Xd Xh Xm Xs
status()the current action running, same as in the default paint
lastOutput()the last action's output as a string
rand(a, b)a random number between 'a' (inclusive) and 'b' (exclusive)
rand(a)a random number between 0 (inclusive) and 'a' (exclusive)
randGaussian(mean, variance)a random value sampled from the Gaussian distribution with the given parameters
add(a, b, ...)the value of 'a' plus 'b' (plus 'c'... if more than 2 are provided)
sub(a, b, ...)the value of 'a' minus 'b' (minus 'c'... if more than 2 are provided)
mul(a, b, ...)the value of 'a' multiplied by 'b' (multiplied by 'c'... if more than 2 are provided)
div(a, b, ...)the value of 'a' divided by 'b' (divided by 'c'... if more than 2 are provided)
mod(a, b)the remainder of 'a' divided by 'b'
min(a, b, ...)the smaller of 'a' and 'b' (and 'c'... if more than 2 are provided)
max(a, b, ...)the larger of 'a' and 'b' (and 'c'... if more than 2 are provided)
round(a)the value naturally rounded (1.4999 would be 1, 1.5001 would be 2)
floor(a)the value rounded down to the lower integer value (1.9999 would turn into 1)
ceil(a)the value rounded up to the higher integer value (1.0001 would turn into 2)
num(Number), num(Variable Name)this will format a number (or a variable's value) into a friendly text version (25000 would turn in to 25k, 1500000 would be 1.5M)
hourly(Number)an hourly rate of the given number based on how long your script has been running
invCount(Item Name, ...)the amount of the named item(s) you currently have in your inventory
bankCount(Item Name, ...)the amount of the named item(s) your bank contains (this works when closed if it has been opened before while the script was running)
itemGain(Item Name, ...)the amount of the named item(s) you've gained (or lost) since the start of the script
profit(Item Name, ...)the total value of the gained (or lost) amount of the named item(s)
profit()the total value of the gained (or lost) amount of all tracked item gains and losses (this covers anything you've gained or lost)
skillLevel(Skill Name)the real skill level
expGain(Skill Name)the amount of experience gained since the script started
levelGain(Skill Name)the amount of levels gained since the script started
timeToLevel(Skill Name)a formatted time left until you level up
livePrice(Item Name or ID)the current live price of the given item
livePriceLow(Item Name or ID)the current low live price of the given item
livePriceHigh(Item Name or ID)the current high live price of the given item
timeToLevel(Skill Name, Level)a formatted time left until you reach the given level
uuid()a randomly generated UUID
thread()the current thread's name