Random SPBs
A mod for customising the SPB.
Set if the default SPB should show up. If set to
If set to a non-zero value, will force all new SPBs to be the custom SPB with this ID.
Sets what SPBs should turn transparent when close to the camera. By default all SPBs will turn transparent. When set to
Client-side variable
If set to
Permanently removes an SPB from the random rotation. The SPB will no longer show up. The specified SPB must exist.
A mod for customising the SPB.
- +4 card -
Callmore#4947
- Handsome -
Chaobrother#1451
- LETSF**KINGGOOOOOOOOOOOOOOOOO -
HattyBoyo#1639
To add a custom SPB, use the lua function:
Where:
An easy way to check if the mod is loaded (for making custom mods that might be loaded in any order) is to wrap the
Lua:
rspb.addReplacement(string sprite_name, number[] list_of_frames, [number death_frame], [string | number sound], [boolean is_tall])
sprite_name
is the name of the sprite to be shown.list_of_frames
is a list of frames that should be played in order while following the player. The list should contain a list of frames that should be played sequentially.death_frame
is what index of the list of frames to jump to when this SPB is killed (usually through thunder shield). If not specified, will default to the first frame.sound
is the name of the sound to play when this SPB locks onto a player. If not specified, will default to the normal SPB lock-on sound.is_tall
is if this SPB is considered tall, meaning that unless a specific option is disabled, it will turn invisible when close to the camera. If not specified, will default to [code single]false[/code].
Lua:
{0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 8, 0, 8}
rspb.addReplacement
statement like so:
Lua:
if rspb ~= nil then
rspb.addReplacement(...)
end
rspb_defaultspbenabled
(Yes/No, Default: Yes)Set if the default SPB should show up. If set to
No
the default SPB will never show up.rspb_spbforce
(Range: 0 - Number of SPBs loaded, Default: 0)If set to a non-zero value, will force all new SPBs to be the custom SPB with this ID.
rspb_fade
(Never/Tall/Always, Default: Always)Sets what SPBs should turn transparent when close to the camera. By default all SPBs will turn transparent. When set to
Tall
, only SPBs with the is_tall
flag will turn transparent when close to the camera. When set to Never
, SPBs will never turn transparent.rspb_enable
(Yes/No, Default: Yes)Client-side variable
If set to
No
, SPBs will not be swapped locally.rspb_removespb <SPB ID>
Permanently removes an SPB from the random rotation. The SPB will no longer show up. The specified SPB must exist.
While this addon is marked as not reusable. You are allowed to reuse and modify the main lua file
Lua/RandomSpb.lua
as long as credit is given. I would prefer if the art was not touched out of respect of the creators.