Random SPB

Random SPB 1

Random SPBs
A mod for customising the SPB.
Espio being exploded by a +4 uno card
  • +4 card - Callmore#4947
  • Handsome - Chaobrother#1451
  • LETSF**KINGGOOOOOOOOOOOOOOOOO - HattyBoyo#1639
To add a custom SPB, use the lua function:
Lua:
rspb.addReplacement(string sprite_name, number[] list_of_frames, [number death_frame], [string | number sound], [boolean is_tall])
Where:
  • 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].
The list of frames for the default SPB is:
Lua:
{0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 8, 0, 8}
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 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.
Author
Callmore
Downloads
819
Views
3,733
Extension type
pk3
File size
165 KB
MD5 Hash
7fb686389d798aa7a91b7ec5defd343f
First release
Last update

More resources from Callmore

Share this resource

Latest reviews

Welcome to releases!
Upvote 0
Back
Top