-
Notifications
You must be signed in to change notification settings - Fork 0
Arguments
Arguments are the only way to interact with DRG. Some can only check the game's state while others can also modify the state, such as changing your loadout. These are called "Checks" and "Sets", all Sets can be used as a Check and Sets will automatically Check themselves before running. This is done to prevent Sets from doing something that you shouldn't be able to do.
Fun fact: Any Check with three states can cycle through all possible permutations of that value. This can be cleverly done with inverting the argument to give all possible combinations of 1 or 2 types, with the true argument giving the last 2 combinations. This trick works on the complexity, duration, and structure arguments.
These arguments are all internal and don't interact with anything outside the mod.
Will always return either true or false respecting the NOT operand (!0 == 1). Useful for manually enabling or disabling a rarely used or joke statement. Note that malformed argument IDs default to 0.
0
1
This references a signed integer in the mod. This integer is set to 0 when the Prog is ran. By setting and checking this integer it is possible to have more complex inter-statement control flow in the Prog. It can also be used as a simple way to switch/case between statements, theoretically giving you 4,294,967,295 loadouts instead of programmatically made ones. Will return true if the given integer is equal to the variables current value. This Set argument doesn't check itself before running.
2:-5
2:2000000000
This references the same internal integer as argument 02. If checked it will return true if the integer is between the first and second integer inclusive. If checked it will set the integer to a random number between the specified integers inclusive. This Set argument doesn't check itself before running.
3:-5:5
3:0:6
Set the internal integer to the specified internal var. Check will return true if the internal integer is the same as the internal var. The integer can then be used in other commands with 'i' to make them always apply to the current character. Indexes are as follows:
0 = statement index,
1 = character ID
true 4:1 28:i:0:0:IronWill
Given the statement index, returns what the final result of that statements conditions. Be careful as adding statements before the index that you are checking will make the check point to the wrong statement.
5:0
These indexes are reserved for future use.
Returns true if the given integer is equal to the current number of players in lobby or 0 if the current mission is set to solo only. so 0 = solo restricted, 1 = open to public/friends server but only you are in the lobby.
9:0
9:4
These arguments are all Checks and start with 1. As of writing there is no dedicated argument to check if a mission is selected or not. Use the first objective for a workaround.
Takes an integer between 0 and 2 as its first part. Returns true if the given integer plus one equals the current mission's complexity/duration.
10:0
11:2
Takes an integer between 0 and 2 as its first part. Returns true if the given integer is the current mission's structure. Indexes are as follows:
0 = Single Mission,
1 = Deep Dive,
2 = Elite Deep Dive.
12:0
Takes an integer between 0 and 10 as its first part. Returns true if the given integer is equal to the missions biomes index. Indexes are as follows:
0 = Crystalline Caverns,
1 = Fungus Bogs,
2 = Glacial Strata,
3 = Dense Biozone,
4 = Magma Core,
5 = Radioactive Exclusion Zone,
6 = Salt Pits,
7 = Sandblasted Corridors,
8 = Caustic Mire,
9 = Azure Weald,
10 = Hollow Bough
13:8
The primary/secondary objective. Takes an integer between 0 and 7 as its first part. Returns true if the given integer is equal to the missions objective index. Objective1 can be used to check if a mission is selected. It will return true if the mission is not in the mod's hard coded objective list (Since "no mission" can't be in the list).
Primary Objective Indexes:
-1 = No/Unknown Objective
0 = Mining Expedition,
1 = Egg Hunt,
2 = On-site Refining,
3 = Salvage Operation,
4 = Point Extraction,
5 = Escort Duty,
6 = Elimination,
7 = Industrial Sabotage
Secondary Objective Indexes:
-1 = No/Unknown Objective
0 = Alien Fossil,
1 = Apoca Bloom,
2 = Boolo Cap,
3 = Dystrum,
4 = Ebonut,
5 = Fester Flea,
6 = Gunk Seed,
7 = Hollomite
14:-1
15:4
Takes an integer between 0 and 4 as its first part. Returns true if the given integer plus one is equal to the hazard level of the current mission. This is untested on mods that add or modify hazard levels and should be used with caution. Only recognizes base game whole number hazard levels.
16:0
Takes an integer as its first part. Returns true if the given integer is equal to the missions anomaly index. Currently there is a hard coded limit of one anomaly per mission. Indexes are as follows:
-1 = No Anomaly,
0 = Gold Rush,
1 = Low Gravity,
2 = Mineral Mania,
3 = Golden Bugs,
4 = Rich Atmosphere,
5 = Critical Weakness,
6 = Double XP,
7 = Volatile Guts
17:3
Takes an integer as its first part. If greater than or equal to zero, returns true if the given integer is equal to the warning index of any warning that currently applies to this mission. If negative, returns true if the following equation is equal to the number of warnings (abs(INPUT)-1). DRG's generated mission object can theoretically support every single warning at once. Indexes are as follows:
-3 = Two Warnings,
-2 = One Warning,
-1 = Zero Warnings,
0 = Exploder Infestation,
1 = Shield Disruption,
2 = Mactera Plague,
3 = Cave Leech Cluster,
4 = Parasites,
5 = Regenerative Bugs,
6 = Low Oxygen,
7 = Lethal Enemies,
8 = Haunted Cave,
9 = Elite Threat,
10 = Swarmageddon
18:6
This index is reserved for future use.
The self arguments are a group of arguments targeting the player character. They can have multiple different part lengths depending on what is to be checked. The different length self arguments are shown below with what each is doing and their parents. Most self arguments have a parent ID and its listed in square brackets. An argument will fail if a parent ID's argument would have failed. For example if you're not driller but try to set the drillers perk slots the argument will always fail.
20
28
21
22
28
23
24
25
26
27
Returns true if the given perk is unlocked. The first part switches between the Active (0) and Passive (1) perks. The second part takes a string instead of an integer. The 'New Passive Perk Slot' perk is not accessible here, use the unlocked perk slots Check instead. The available internal perk names are listed below along with the human readable name:
Active:
BeastMaster, Berzerker, Dash, FieldMedic, HeightenedSenses, HoverBoots, IronWill, DownedBomb, ShieldLink
Beast Master, Berzerker, Dash, Field Medic, Heightened Senses, Hover Boots, Iron Will, See You In Hell, Shield Link
Passive:
BornReady, DeepPockets, TemperatureInsulation, FriendlyFire, BugThing, Resupplier, MarathonGuy, FlareThrower, RedSugarRocks, Thorns, StrongBack, Vampire, ExpertDepositor
Born Ready, Deep Pockets, Elemental Insulation, Friendly, It's a Bug Thing, Resupplier, Second Wind, Strong Arm, Sweet Tooth, Thorns, Unstoppable, Vampire, Veteran Depositor\
20:{perk type}:{perk name}
20:0:ShieldLink
20:1:TemperatureInsulation
The character check works differently from all other self checks. Instead of checking if a character is unlocked (they are all unlocked by default), it checks if you are currently the specified character. Since the mod can only act upon the currently selected character this check is here to disallow checking items or properties of a non-selected character. It is recommended to organize statements by character as it is impossible to have a single argument act upon two different characters. Setting 'i' to the current character's index and using it in place of the arguments index is possible if you want an argument to always apply, however this is not recommended. Indexes are as follows:
0 = Driller,
1 = Engineer,
2 = Gunner,
3 = Scout/Navigator
21:{character index}
21:0
Returns true if the number of unlocked perks slots is greater than or equal to the provided integer. For example if you specify 2 passive perks it will return true if you have 2 or 3 unlocked passive perk slots. Specifying 1 should always return true as you unlock 1 of each slot by default.
22:{character index}:{perk type}:{amount}
22:0:0:3
Returns true if the given item category and index corresponds to an owned item. Most categories only hold one item and some have no exposed use (flare & mining tool). Only checks if the item is unlocked, not if it is equipped. You can modify items even if they are not currently equipped. Returns false if the item or category doesn't exist or isn't owned. Category indexes are as follows:
0 = Primary Weapon,
1 = Secondary Weapon,
2 = Traversal Tool,
3 = Class Tool,
4 = Grenade,
5 = Flare,
6 = Mining Tool,
7 = Armor
23:{character index}:{catagory index}:{item index}
23:0:4:0
Returns true if the specified item has overclocking enabled (A purchased upgrade in all upgrade tiers). Note that this can still return true even if the dwarf has not promoted, no overclocks are forged, and the item doesn't even support overclocks.
24:{character index}:{catagory index}:{item index}
24:0:1:1
Returns true if the given overclock is owned. Note that due to the parent evaluation this will always return false if the Overclock check fails. Overclocks are as follows:
WIP: I need to buy all the overclocks and dump their internal values for confirmation. fun. You can probably guess the missing internal values though.
Overclocks
Driller:
CRSPR Flamethrower: ?, Sticky_Additive, Compact_Feed_Valves, ?, ?, ?
Cryo Cannon: ?, ?, ?, ?, ?, Snowball
Corrosive Sludge Pump: ?, ?, Volatile_Impact_Mixture, ?, ?, ?
Subata 120: ?, ?, ?, ?, Explosive_Reload, ?
Experimental Plasma Charger: Energy_Rerouting, ?, ?, ?, ?, ?
Engineer:
"Warthog" Auto 210: ?, Light-weight_Magazines, ?, ?, ?
"Stubby" Voltaic SMG: ?, ?, ?, ?, ?, ?
LOK-1 Smart Rifle: ?, ?, ?, ?, ?, Neuro-Lasso
Deepcore 40mm PGL: ?, ?, ?, ?, ?, Hyper_Propellant
Breach Cutter: ?, ?, ?, ?, ?, ?, ?
Gunner:
"Lead Storm" Powered Minigun: ?, ?, Burning_Hell, Compact_Feed_Mechanism, ?, ?, ?
"Thunderhead" Heavy Autocannon: ?, ?, ?, ?, ?, ?
"Hurricane" Guided Rocket System: ?, ?, ?, ?, ?, ?, ?
"Bulldog" Heavy Revolver: ?, ?, ?, ?, Elephant_Rounds, ?
BRT7 Burst Fire Gun: ?, ?, Compact_Mags, ?, ?, ?, ?
Scout:
Deepcore GK2: ?, ?, ?, ?, ?, ?, ?
M1000 Classic: ?, Minimal_Clips, ?, Hipster, ?, ?
DRAK-25 Plasma Carbine: ?, ?, ?, ?, ?, ?, ?
Jury-Rigged Boomstick: ?, ?, ?, Stuffed_Shells, Shaped_Shells, ?
Zhukov NUK17: ?, ?, ?, ?, ?
25:{character index}:{catagory index}:{item index}:{overclock}
25:0:1:1:Energy_Rerouting
Returns true if the specified upgrade tier is unlocked. Returns false if the index is out of bounds or not unlocked.
26:{character index}:{catagory index}:{item index}:{upgrade tier index}
self:class:0:Inventory:0:0:upgrade:2
Returns true if the given upgrade is currently owned or equipped. Returns false if the index is out of bounds or not owned.
27:{character index}:{catagory index}:{item index}:{upgrade tier index}:{upgrade index}
27:0:0:0:4:1
Checks if a perk is equipped in a slot and can set perks in a slot. Doesn't check itself when like other arguments but checks two parents.
28:{character index}:{perk type}:{perk slot index}:{perk name}
28:0:0:1:FieldMedic
Returns true if the current beer buff is equal to the one specified. Buffs are as follows:
BackbreakerStout, DarkMorkite, PotsOGold, ?, ?, SkullCrusherAle, SlayerStout, ?
29:PotsOGold