- I made sure my file(s) follow the Submissions Guidelines
- Yes
DISCLAIMER
• This is a port/recreation of my old script from SRB2 v2.1;
• This should work in online play, unfortunately I don't have the people to test it, so I give no guarantees;
• THIS ADDON USES l_ButtonState.lua BY fickleheart (GitHub), IT IS NOT MINE. The main repository implies that the resources in there are free to use. If needed/asked, I'll remove it from this addon.
• You may reuse this as long as l_ButtonState.lua is kept unchanged or otherwise removed for your own button press validaton, seeing it as it's not mine; and you give me credit for whatever content of mine you'll be using.
SUMMARY
Ever came across a situation where you wish you had kept a particular shield instead?
Or maybe you accidentally rolled over a shield monitor and now your old shield is gone?
Or maybe you want to rock around 6 Amy's Shields around
Well, now you can!
HOW IT WORKS?
Store up to 5 shields by pressing CUSTOM 1, and when you need them back, at a cost of 5 rings, you can press CUSTOM 2 to get them back to protect yourself or for any reason you might need them.
Select which shield you want store with Weapon Next / Weapon Prev buttons.
Breaking a shield monitor while having a shield will also store your current shield so you don't just lose them!
Careful though! If you have already 5 shields stored, it'll replace the one in the last slot.
IMAGES
CROSS-ADDON COMPATIBILITY
By default this addon only supports vanilla shields but it is theoretically simple by adding a configuration file in your
luafiles/client/Shield Storage/
folder (Yes, you'll have to create the dedicated Shield Storage folder yourself).The way you should lay out the information in your file should be as such:
luafiles/client/Shield Storage/generic_config_file.cfg:
Amargeddon Shield,SH_ARMAGEDDON,No description,TVARICON,sfx_armasg
Attraction Shield,SH_ATTRACT,No description,TVATICON,sfx_attrsg
For the sake of simplicity, in this example let's pretend Armageddon Shield and Attraction Shield aren't supported by default.
In your config file you'll simply inform, in this exact order:
- The name of the shield;
- Its constant;
- A description;
- Its respective graphic;
- And its sound constant for the orb.
SS_SetCustomList
and SS_ReloadShieldList
, see the commands section).Obviously for other addons you'll have to dig for the constant, graphic image, and sound constant (if any).
As of the time of this post, the name of the shield and description are unused so you may just put anything in there as long as there's something there.
CONSOLE COMMANDS
All commands needs admin privileges to use if you're in a netgame.
COMMAND | PARAMETER / ARGUMENT | ARGUMENT TYPE | DESCRIPTION |
---|---|---|---|
SS_SetCustomList | filename | string | Sets up which config file will be loaded with SS_ReloadShieldList |
SS_ReloadShieldList | N/A | N/A | Reloads the shield list which dictates which shields the addon will work with. |
SS_ResetOnLevelEnd | OnOff | string | Turns on and off, depending on the argument passed, the ability to carry over shields between acts and zones. |
SS_SetRingCost | ringAmount | integer/number | Changes how many rings (minimum 0) the player will spent when exchanging shields or summoning shields from the storage. |
CHANGELOG
Changelog.txt:
┌┴───────┴┐
┌┤Changelog│
│└─────────┘
│┌━───━┐
├┤ 2.0 │
│└━─┬─━┘
│ └— Initial release.
│
│┌━───━┐
└┤ 2.1 │
└━─┬─━┘
├— Added SS_SetRingCost command to alter the ring cost (value: 0 — whatever the integer limit is);
├— Added SS_ResetOnLevelEnd command to allow you to carry shields between zones (value: On | Off);
├— Added SS_SetCustomList command to allow you to set a custom shield list for compatibility (value: name of the file);
├— Added SS_ReloadShieldList command to allow you to reload the shield list at any time in game. Needs to be used after SS_SetCustomShieldList to have the alterations to take effect;
│
├— Changed how compatibility works as stated above;
│
├— Added "Changelog.txt" (this file you're reading);
├— Added "Known issues.txt";
├— Added "COMPATIBILITY 101.txt";
│
├— Separated the main script into multiple lua files for the purposes of reducing eyebleed;
├— Revamped the way the package was structured entirely actually;
│
└— Lost a bit of my sanity.
ISSUES / BUGS
Known issues.txt:
• Stackable shields powerups (i.e Fire Flower) are not supported;
• Depending on the dimensions, certain TVBOXES icons from other addons that include shields might not display correctly, there's nothing I can do about it as far as I'm aware;
• Shield monitors from addons that implement their own logic (don't call A_GiveShield when broken) won't store your current shield, there's nothing I can do about it as far as I'm aware;
• For some reason, sometimes when you store your shield incredibly quickly after you get it, the icon won't be displayed properly;
For further inquiry feel free to contact me.