Combine the Global Script:
As with all global scripts, you'll need to combine this with your own if you already have one. Copy all the parts in the example to where they should go relative to the points in your script: pre-while(true), pre-Waitdraw(), and pre-Waitframe(). Additionally, if you're combining it with my death penalty script, look for this line and uncomment it (remove //):
// DeathPenalty[_DP_HASDIED] = 1;
Constants:
There's a lot of constants in this one, many of them optional. Here's the critical ones for the script to work:
- C_STATUSBAR_BG: Color for the background on the status meters.
- C_STATUSBAR_FG: Color for the border of the status meters
- C_STATUSBAR_TEXTSHADOW: The color black
- POISON_TILE and others: Tiles for the status icons for each status effect.
- POISON_COLOR1, POISON_COLOR2 and others: Colors used for the status meters for each status effect
- SFX_POISON and others: Sounds for when inflicted with each status. 0 for no sound.
- SFX_POISON_TICK and SFX_TOXIC_TICK: Sounds when damaged by poison and toxic. 0 for no sound.
If you want the curse status to kill the player, you'll also want to set these constants for the special death animation:
- CURSE_ANIM_TILE: First tile in the death animation
- CURSE_ANIM_W: Tile width of the death animation
- CURSE_ANIM_H: Tile height of the death animation
- CURSE_ANIM_FRAMES: Number of frames in the death animation
- CURSE_ANIM_ASPEED: Duration each animation frames in game time (60ths of a second)
Tiles used by this script are expected to use 8-bit color mode. I did this because there's enough constants already.
Assigning the Scripts:
This is just a small note because this script uses a lot of sub scripts of different types. In addition to the global script, there's 6 generic scripts, 1 combo script, 1 NPC script, one eweapon script, and one item script. Be sure to assign all of these, especially the generic scripts without which the statuses won't do anything.
Inflicting the Statuses:
In order to make enemies inflict status, you'll need to use one of two helper NPC scripts: EnemyStatusContact and EWeaponStatusContact. The first makes the enemy inflict status on contact and the second applies status to weapons it fires. Both scripts use the same D0-7 arguments:
- D0: Which status to inflict
- 0 - Poison
- 1 - Toxic
- 2 - Bleed
- 3 - Frost
- 4 - Curse
- D1: How much of the meter to fill (0-100).
- D2: How long the status lasts for in frames (60ths of a second). If 0, will use default timings.
If you're a person of culture and poison swamps are more your thing, there's a combo script for that as well. In the combo editor, give a combo the script PoisonSwamp and set its properties as follows:
Attribytes:- Attribytes[0]: The status to inflict. Uses the same values as the previous two scripts.
- Attribytes[1]: How much of the meter to fill (0-100)
- Attribytes[2]: How often to apply status buildup in frames (60ths of a second)
- Attribytes[3]: Set to 1 if the status only builds when Link is walking
- Attribytes[4]: Sound to play when the status buildup ticks
Attrishorts:- Attrishorts[0]: How long the status lasts for in frames (60ths of a second). If 0, will use default timings.
Attributes:- Attributes[0]: How much to slow down Link for (no strict limits but 0 to -1 is sensible)
- Attributes[1]: A combo to draw over Link when in the swamp. Once again using 8-bit color mode.
Setting up Items:
There's a few items you can use with this script and all of them are optional. Set these up if you want.
Purging Stone:
This is an active item (or a pickup if you're old school) that removes curse status, if you're like me and feel it should be permanent. Just give your item the CurseCure item script, set SFX_CURSE_CURE to the sound to play when you use it, and it should be good.
Resistance Rings:
You can have up to five rings that protect you against status buildup. They can be individual items or all use the same one. Set these constants to the items you want to use:
- I_RING_POISONBITE: Ring that protects against poison.
- I_RING_TOXINBITE: Ring that protects against toxic.
- I_RING_BLOODBITE: Ring that protects against bleed.
- I_RING_FROSTBITE: Ring that protects against frost.
- I_RING_CURSEBITE: Ring that protects against curse.
You can also adjust the individual strengths of these rings with the constants directly below them.
Rusted Iron Ring:
This item makes you immune to the speed modification effect on swamp combos. Set I_RUSTEDIRONRING to the item you want to use.
Requires std.zh and LinkMovement.zh.