- Getting started -
To add your own things in Dicey Wastelands, you need to use CSV files. Currently you can add custom equipment, enemies and characters.
Create a folder in the "mods" folder of Dicey Wastelands and give it a name. This will be the name of your mod.
- Equipment -
Create a new file in your mod folder and call it "equipment.csv". Copy and paste the header of the "equipment.csv" from the Dicey Wastelands folder:
Name,Description Line 1,Description Line 2,Size,Floor,Script: On Use,Script: Init Variables,Script: Begin Turn,Script: End Turn,Slots,Countdown,Color,On Upgrade,On Weaken,Cast Direction,Uses,Single use
Equipment has 15 fields and can be heavily customized:
- Name - equipment name (displayed at the top of the card). Supports color tags.
- Description Line 1 - the first line of equipment description (displayed below the dice slots). Supports color tags.
- Description Line 2 - the second line of equipment description (displayed below the dice slots). Supports color tags.
- Size - the equipment size (either 1 or 2).
- Floor - the floor on which you can find this item (set to -1 if it isn't supposed to be found in chests or level-ups)
- Script: On Use - a pipe-separated ( | ) list of commands (strings) that are executed on use. Read more about scripts in the Scripts section.
- Script: Init Variables - a pipe-separated list ( | ) of commands (strings) that are executed outside of combat to initiate variables. Shouldn't contain commands other than "var".
- Slots - a pipe-separated ( | ) list of the dice slots (displayed in the middle of the card).
Slot name Description NORMAL Takes any dice. EVEN Takes dice with an even value. ODD Takes dice with an odd value. REQUIRE1 Takes only 1s. REQUIRE2 Takes only 2s. REQUIRE3 Takes only 3s. REQUIRE4 Takes only 4s. REQUIRE5 Takes only 5s. REQUIRE6 Takes only 6s. MAX2 Takes dice with a value equal or below 2. MAX3 Takes dice with a value equal or below 3. MAX4 Takes dice with a value equal or below 4. MAX5 Takes dice with a value equal or below 5. MIN2 Takes dice with a value equal or above 2. MIN3 Takes dice with a value equal or above 3. MIN4 Takes dice with a value equal or above 4. MIN5 Takes dice with a value equal or above 5. COUNTDOWN Takes any dice, but activates only if the countdown reaches zero. DOUBLES Takes any dice, but activates only if the dice values in both DOUBLES slots are equal. CLICK Takes no dice, activates on click. - Countdown - the amount of dice pips required to activate the item. Required for COUNTDOWN slots.
- Color - the color of the card. Can be RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE, GRAY or RAINBOW.
- On Upgrade - what should happen if this item is upgraded.
Value Description simplify Makes the dice slots less restrictive (for example, EVEN > NORMAL). adduse Gives an additional use to the equipment. upgrade Changes the equipment to its upgraded version, which is a different piece of equipment with the same name and "_upgraded" appended to it (Revolver > Revolver_upgraded). reducecountdown Reduces the base countdown value by 50%. - On Weaken - what should happen if this item is weakened.
Value Description complicate Makes the dice slots more restrictive (for example, NORMAL > EVEN). noreuseable Sets the equipment uses to one. downgrade Changes the equipment to its downgraded version, which is a different piece of equipment with the same name and "_downgraded" appended to it (Slugger > Slugger_downgraded). noeffect Removes all commands from the equipment. immune Makes the item immune to weakening. - Cast Direction - the direction of movement when equipment is used (1 for up, -1 for down).
- Uses - the amount of uses per turn (-1 for reuseable, 0 for one).
- Single use - whether this item should be used only once per battle (0 for false, 1 for true).
Name,Description Line 1,Description Line 2,Size,Floor,Script: On Use,Script: Init Variables,Script: Begin Turn,Script: End Turn,Slots,Countdown,Color,On Upgrade,On Weaken,Cast Direction,Uses,Single use Gamer Time,+<gamertime> to next,attack for both,2,-1,inflict:BUFF&@gamertime|inflictself:BUFF&@gamertime|sfx:sndMutant16LowA|varadd:gamertime&1,var:gamertime&3,,,COUNTDOWN,8,GRAY,,,1,0,0 Lucky Cake,Heal 5 hp,to someone,2,-1,callifelse:heal;5&healself;5&rd&1&3|sfx:sndSharpTeeth,,,,CLICK,,GREEN,upgrade,downgrade,1,0,0 Lucky Cake_upgraded,Heal 5 hp to you,Heal 2 hp to enemy,2,-1,healself:5|heal:2|sfx:sndSharpTeeth,,,,CLICK,,GREEN,,,1,0,0 Lucky Cake_downgraded,Heal 2 hp to you,Heal 5 hp to enemy,2,-1,healself:2|heal:5|sfx:sndSharpTeeth,,,,CLICK,,GREEN,,,1,0,0 Broken Watch,Skip an enemy turn,@s(Once per battle)@w,1,-1,inflict:SKIP&1|sfx:sndWeirdTickTock&dw_examplemod,,,,COUNTDOWN,24,PURPLE,reducecountdown,noeffect,1,0,1 Sharp Screw,Do 2x[] damage,@s(Reuseable)@w,1,-1,var:screw&d|varmult:screw&2|attack:@screw|sfx:sndScrewdriver,,,,DOUBLES|DOUBLES,,RED,simplify,noeffect,1,-1,0
- Enemies -
Create a new file in your mod folder and call it "enemies.csv". Copy and paste the header of the "enemies.csv" from the Dicey Wastelands folder:
Name,Level,Rarity,Sprite,Voice,HP,Dice,Equipment,Last Words,Attributes
Enemies have 10 fields:
- Name - the name of the enemy.
- Level - the level of the enemy (defines the experience reward and the spawn floor).
- Rarity - defines how rare this enemy is (if rarity is 5, the chance of this enemy appearing is 1/5).
- Sprite - the enemy sprite. Only the first two frames are shown outside of combat.
- Voice - the sound that is played when the enemy says their last words.
- HP - starting health.
- Dice - starting dice.
- Equipment - a pipe-separeted list of the enemy's starting equipment.
- Last Words - the enemy will sometimes say those when defeated. You can use underscores ("_") to add pauses.
- Attributes - a pipe-separated list of the enemy's attributes.
Attribute Description poisonstrong Takes 0.5x damage from poison. poisonheal Heals from poison. poisonimmune Takes no damage from poison. burnweak Takes 2x damage from picking burning dice. burnstrong Takes 0.5x damage from picking burning dice. burnheal Heals from picking burning dice. burnimmune Takes no damage from picking burning dice. stunimmune Equipment can't be stunned. weakenimmune Equipment can't be weakened. getdice Gets +1 dice every turn. ignoreloops Doesn't get loop buffs (extra health and dice). noworldanim Doesn't have animation outside of combat (shows only the first frame of the sprite). noworldpreview Doesn't show its name and level when hovered. customsprite Has a custom sprite instead of a vanilla one (takes 3 arguments: mod type, mod name, sprite variable). shakyequipment Causes enemy equipment cards to shake.
Name,Level,Rarity,Sprite,Voice,HP,Dice,Equipment,Last Words,Attributes Angry Screwdriver,2,-1,sprScrewDriver,sndScrewdriver,20,1,Screwdriver:0&0|Screwdriver:1&0|Screw:0&1|Screwdriver:1&1|Screwdriver:0&2|Screwdriver:1&2,SHANK SHANK ___SHANK,
- Characters -
Custom characters should be created in their ".race.gml" file. They have several fields:
- displayname - the displayed name of your character.
- skillcards - an array of the character's skillcards (they usually have gray color). You can have two skillcards at the same time by making .them take up one slot and setting their "row" value to 0 and 1 respectively.
- equipment - an array of the character's starting equipment. If left blank, the character starts with a Revolver.
- inventory - an array of the character's starting inventory.
- maxhealth - the maximum amount of health the character has from the start.
- dice - starting dice.
- gold - starting gold.
- combatdisplay_sprite - an array consisting of two values - the portrait sprite of the character and the subimage (frame).
#define diceywastelands_race() return { displayname: "Cuz", skillcards: [{ name: "Gamer Time", row: 0 }], equipment: [], inventory: [], maxhealth: 24, dice: 2, gold: 3, combatdisplay_sprite: [mskNone, 0] };
- Scripts -
Scripts follow this syntax: "command1:arg1&arg2&arg3...|command2:arg1&arg2&arg3...".
Command | Arguments | Description |
---|---|---|
attack | amount of damage | Deals damage to the opponent. |
attackpierce | amount of damage | Deals damage to the opponent, ignoring status effects. |
attackself | amount of damage | Deals damage to the user, takes shield and armor into consideration. |
attackpierceself | amount of damage | Deals damage to the user, ignoring status effects. |
recoil | amount of damage | Deals damage to the user, takes shield into consideration. |
heal | amount of health | Heals the opponent. |
healself | amount of health | Heals the user. |
sfx | sound index, (optional) mod name | Plays the sound (if the mod name is defined, it plays a sound from that mod). |
inflict | status name (or "RANDOM") | Inflicts the status effect on the opponent. |
inflictself | status name (or "RANDOM") | Inflicts the status effect on the user. |
givedice | dice value | Gives a new dice with this value. |
splitdice | dice value, amount of new dice | Randomly splits the dice value and gives new dice. |
giveeq | equipment name | Replaces this equipment with another one for this turn. |
giveeqtarget | equipment name | Gives the opponent an item in the bottom middle slot for one turn. |
replaceeq | equipment name | Replaces this equipment with another one for this battle. |
stealgold | amount of gold | Takes this amount of gold from the opponent and gives it to the user. |
reducegold | amount of gold | Reduces this amount of gold from the opponent. |
reducegoldself | amount of gold | Reduces this amount of gold from the user. |
var | variable name, value | Declares a variable under this name (if it doesn't exist yet) and sets its' value. |
varadd | variable name, value | Adds this value to the variable value. |
vartake | variable name, value | Subtracts this value from the variable value. |
varmult | variable name, value | Multiplies the variable value by this value. |
vardiv | variable name, value | Divides the variable value by this value. |
rdvar | variable name | Sets this variable's value to a random number from 1 to 6. |
expdischarge | - | Sets the player's experience charge to 0 (used in Horror's Rad Beam). |
destroydice | amount of dice | Destroys this amount of remaining dice. |
callifelse | script 1, script 2, value, min, max | Calls script 1 if the value is between the min and max numbers, otherwise calls script 2. Scripts here use ";" instead of ":"; "?" instead of "&"; "/" instead of "|" (/ is used for separating multiple commands in a script). |
alldice | new value | Sets the value of all remaining dice to this. |
flee | turns | Flee from the battle in X turns. Enemies will choose this only if it has 20% health or less. |
halfdice | - | Returns half of the dice value that you input. |
You can also add these commands to change the way the enemy AI uses equipment:
Command | Arguments | Description |
---|---|---|
bonus | amount of points | Gives bonus points to this equipment. More points means that the AI is more likely to use this item. |
ignoredeath | - | Sets the amount of points to 1 if the enemy is supposed to die when using this item. |
playlast | - | Sets the amount of points to 1 so the enemy always uses it after all items are used. |
You can pass special arguments to the commands:
Argument | Real value |
---|---|
d | total sum of the dice pips of all dice in this item. |
rd | a random number from 1 to 6. |
@variablename | the variable value (if it exists). |
$statusname | the amount of this status effect on the enemy. |
expcharge | Horror's Radiation Beam charge. |
hp | the user's health. |
targethp | the opponent's health. |
maxhp | the user's max health. |
targetmaxhp | the opponent's max health. |
dice | the user's dice. |
targetdice | the opponent's dice. |
gold | the user's gold. |
targetgold | the opponent's gold. |
remainingdice | the amount of remaining dice. |