SRB2 Message Board  

Go Back   SRB2 Message Board > Sonic Robo Blast 2 > SRB2 Discussion

Thread Tools Search this Thread
Old 2 Days Ago   #6081
Just a random person

Originally Posted by Zwip-Zwap Zapony View Post
We have controls specifically for custom Lua actions, being Custom 1/2/3. However, these controls occasionally overlap between mods (Example: TauntVoices uses Custom 2 for taunting with most characters, but a few taunt with Toss Flag instead as Custom 2 is already in use by those characters), and some mods may be well-suited for some Custom control layouts while others may be well-suited for other layouts.

What sort of chance and possibility is there of allowing custom Lua scripts to add their own controls that can be re-mapped at will and can overlap with any other controls (since overlaps might be wanted in some cases), which SRB2 will then also save and remember between game sessions (even if the WAD isn't loaded for several game sessions in a row)?

For example, perhaps something like AddControl("LIGHTDASH","Ring Lightdash","E",nil) would add a variable to all players called BT_LUA_LIGHTDASH, which returns if the button is pressed or not, with the control being added in the options menu under the displayed name "Ring Lightdash", with the default control being set to E if a "lua_lightdash" setcontrol is not found in a configuration file for the WAD file.

The above AddControl's parameters are in order the internal name (uppercase with "BT_LUA_" added in front for the variable name, lowercase with "lua_" in front for setcontrol), display name (used in the options menu controls list), and default key 1 and 2 (for the first time that the WAD is loaded).
The second split-screen player's controls for it would always be blank (because making mod makers supply default keys for player 2 may cause even more conflicts with players' existing control layouts than just for player 1).

Mod developers would have to take care to avoid the same internal name being used by multiple mods, but that may in many cases be as simple as adding a character/mod name in front of the internal (and display) name.

Implementation-wise... I really don't know, but probably something involving looking for the AddControl function thing in Lua scripts when loaded, taking them into account if they exist, and of course getting rid of them for the "handling" of what the Lua script should do and such in-game.

I understand that this may be really hard, but I personally think that it's worth at least thinking about for a bit.
That would be a cool idea, but the menu code would need a rewrite I think.
EmpiralMP v1.1.4 Official Thread:
choalover is offline   Reply With Quote
Old 2 Days Ago   #6082
Backseat Developer
Rumia1's Avatar

Isn't someone working on a menu code rewrite...?
Originally Posted by Cirno
Rumia1 is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Some suggestions..... Konata123 SRB2 Discussion 3 03-30-2011 03:01 AM
I want some suggestions/reviews, please. Shadow Hog Outdated Releases (0.X & 1.X) 22 10-31-2006 01:45 AM
Question about a few 1.1 suggestions SSNTails Help 11 01-07-2006 04:27 AM
My suggestions RenegadeC Help 41 10-18-2005 09:51 PM

All times are GMT. The time now is 02:15 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.