Resource icon

[Script] Engine Swap v1.6 - Change your kart stats

Lucario_

Lucario
This script allows you to change your kart stats (speed and weight) instead of using skin stats via commands.
Now you can play as your favourite character with your favourite stats

COMMANDS:
engine_help: Shows you the commands and current stats.
engine / en: Multi-command, get a list of usages by using the command without parameters.
engine_server: Display current server settings of Engine Swap.

VARIABLES - These variables are only for server and remote admin.
engine_enabled <No / Yes>: Toggles entire Engine Swap. Default Yes.
engine_joinmessage <Disabled / Chat / Console>: Toggles the join message when a player joins. Default Disabled.
engine_allowinbattle <No / Yes>: Allow of Engine Swap will be active on Battle mode or not. Default No.
engine_bounds <Normal / Unlimited / Custom>: Changes the bounds of Speed or Weight. Default Normal.
engine_notify <No / Yes>: Toggles notification when a player changes their engine.

CHANGELOG
v1.6
- Added replay support via a synced table instead cvars because for some reason cvars doesn't works at all, but at least works perfectly. Finally!
- Changed on-screen warning text.
- Changed some text of the 'engine' command.
- Removed some junk in the code.

v1.5.1
- Added on-screen warning if Restat is enabled with Engine Swap saying that keeping both active at time will conflict.
- Added 'engine_enabled' variable for toggling entire Engine Swap.
- Added 'engine $[number]' to 'engine' command which list all players with custom engine and their player name and player number.
- Merged 'engine_server' with 'engine_help', so 'engine_server' is removed.

v1.5
- Added notifications when a player changes their engine.
- Added 'engine' command as the master command.
- Added 'engine_notify' server console variable to toggle notifications.
- Changed print of commands.
- Removed 'speed', 'weight', 'reset', 'list' and 'get' commands in favor of 'engine' command.

v1.4
- Added 'get <skinname>' command.
- Added 'list' command.
- Added 'engine_server' command.
- Added 'engine_joinmessage', 'engine_allowinbattle', 'engine_minspeed', 'engine_maxspeed', 'engine_minweight' and 'engine_maxweight' console variables.
- Renamed 'engine_unlimited' to 'engine_bounds'.
- Renamed 'engine_reset' to 'reset' and added 'rt' as alias of 'reset'.
- Renamed 'engine_weight' to 'weight' and added 'ss' as alias of 'speed'.
- Renamed 'engine_speed' to 'speed' and added 'ss' as alias of 'sw'.
- Better print of commands. (No more rainbow colours mode).
- Rewrite of ThinkFrame core and now checks if 'kartspeed' or 'kartweight' is not equals to players custom selection.

v1.3
- Now the custom stat will be applied after finishing a race and the stat changes you make while spectating will be applied once you join the game.
- Renamed command 'enginehelp' to 'engine_help'.
- Renamed command 'resetengine' to 'engine_reset'.
- Renamed command 'set_weight' to 'engine_weight'.
- Renamed command 'set_speed' to 'engine_speed'.
- Fixed an issue where the script wouldn't let you change the speed or weight after a race and in the intermission voting screen

v1.2
- Better only numbers system check on 'set_speed' and 'set_weight' commands.
- If battle mode is underway the addon auto disables and re enables when race mode is underway.

v1.1.1
- Fixed the "Only Numbers!" issue.

v1.1
- Now players can't change their stats in the middle of a race. (After countdown).
- Fixed a bug by trying to put non-numerical values on 'set_speed' or 'set_weight' commands.

v1.0
- Initial release.

SCREENSHOTS
HELP COMMAND
attachment.php


ENGINE COMMAND
attachment.php


SERVER COMMAND
attachment.php
 

Attachments

  • srb2kart_fWGkWoxgDi.png
    srb2kart_fWGkWoxgDi.png
    180.5 KB · Views: 3,266
  • srb2kart_RCikc12LTb.png
    srb2kart_RCikc12LTb.png
    129.9 KB · Views: 3,280
  • srb2kart_xju4IHqsCo.jpg
    srb2kart_xju4IHqsCo.jpg
    86.9 KB · Views: 3,140
  • KL_EngineSwap-v1.6.lua
    30.8 KB · Views: 262
Last edited:

Lucario_

Lucario
Update 1.1:
- Now players can't change their stats in middle of race. (After countdown).
- Fixed a bug by trying to put non-numerical values on set_speed or set_weight commands.
 

SCOTT0852

Member
Could there be some sort of admin-only console command to allow for values higher than 9 to get something like Offroad Crawla's 17 weight? Of course, it should be disabled by default, but it would be fun to play around with.
 

Lucario_

Lucario
Could there be some sort of admin-only console command to allow for values higher than 9 to get something like Offroad Crawla's 17 weight? Of course, it should be disabled by default, but it would be fun to play around with.

Is really possible to set more that 9 of speed and weight?
 

SCOTT0852

Member
Is really possible to set more that 9 of speed and weight?
Yes, but it requires lua. A couple characters have stats above 9 or below 1, but they just become 1 or 9 unless you have lua to force them to the "correct" stats, but the only character with that lua is Offroad Crawla with stats of 1 speed and 17 weight. Engine Swap is a lua script, so it should have no issue with that.
 

Lucario_

Lucario
Version 1.4 is released!

CHANGELOG
- Added 'get <skinname>' command.
- Added 'list' command.
- Added 'engine_server' command.
- Added 'engine_joinmessage', 'engine_allowinbattle', 'engine_minspeed', 'engine_maxspeed', 'engine_minweight' and 'engine_maxweight' console variables.
- Renamed 'engine_unlimited' to 'engine_bounds'.
- Renamed 'engine_reset' to 'reset' and added 'rt' as alias of 'reset'.
- Renamed 'engine_weight' to 'weight' and added 'ss' as alias of 'speed'.
- Renamed 'engine_speed' to 'speed' and added 'ss' as alias of 'sw'.
- Better print of commands. (No more rainbow colours mode).
- Rewrite of ThinkFrame core and now checks if 'kartspeed' or 'kartweight' is not equals to players custom selection.
 

Lucario_

Lucario
Now, you have absolute permission to repack my addon. I think for us, we now about the problematic addon limit (only 48 files). That's not means that you can modify the code!
 

Lucario_

Lucario
New version v1.5 released!

CHANGELOG:
- Added notifications when a player changes their engine.
- Added 'engine' command as the master command.
- Added 'engine_notify' server console variable to toggle notifications.
- Changed print of commands.
- Removed 'speed', 'weight', 'reset', 'list' and 'get' commands in favor of 'engine' command.
 

Lucario_

Lucario
Version 1.5.1 released.
- Added on-screen warning if Restat is enabled with Engine Swap saying that keeping both active at time will conflict.
- Added 'engine_enabled' variable for toggling entire Engine Swap.
- Added 'engine $[number]' to 'engine' command which list all players with custom engine and their player name and player number.
- Merged 'engine_server' with 'engine_help', so 'engine_server' is removed.
 

Lucario_

Lucario
Version 1.6 released:
- Added replay support via a synced table instead cvars because for some reason cvars doesn't works at all, but at least works perfectly. Finally!
- Changed on-screen warning text.
- Changed some text of the 'engine' command.
- Removed some junk in the code.
 

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Top