[Open Assets] Modern Sonic Abilities 4.0 BIG UPDATE

This content may be freely modified and/or maintained by anyone.

MotdSpork

Mafia? Zombies? Gold spork?
Hello, This is my first post regarding a release. This is a wad containing lua scripting that gives SRB2 Sonic all of Modern Sonic's abilities.

Abilities:Boost(Custom 1)
Run on water (as long as boosting)
Lightdash(Custom 1)
Stomp(Spin)
DoubleJump/HomingAttack (ala Sonic Colors)
WallJump (doublejump at a wall)
Slide (replaces Spindash)
QuickStep (hold custom 3 + strafe)


There are two files inside. One with a character and the other with just the Lua.


Update 4.0

Added Quick Step
Added Boost Bar
New Boost sfx


Enjoy
 

Attachments

  • srb20001.gif
    srb20001.gif
    3.6 MB · Views: 11,554
  • srb20003.gif
    srb20003.gif
    5.5 MB · Views: 6,696
  • srb20004.gif
    srb20004.gif
    3.8 MB · Views: 11,156
  • srb20005.gif
    srb20005.gif
    2.1 MB · Views: 6,028
  • srb20014.gif
    srb20014.gif
    5.9 MB · Views: 6,958
  • modernabilities.zip
    762.8 KB · Views: 19,033
Last edited:
There is a warning that appear in the console when either of these are added.
WARNING: Line 0: Patch is for SRB2 version 211,
only version 210 is supported
1 warning in the SOC lump
For this, just set the first line in the OBJCTCFG to have 210 instead.

Another thing is that there is a slight bug regarding boost. Boost sets your ability to swim so that it can give you run on water, which is intended. However, the script does this when you don't have any rings and are pressing the button to boost as well. Meaning you cannot thok while holding the boost button with no rings. Furthermore, if you attempt this underwater you just get rocketed downwards instead.

They're relatively minor issues and should be simple to fix. Considering the lua seems to be custom (with the exception of the lightdash I believe, although that is marked as re-usable), I can't see any other reason for this to not be released, unless another judge can correct me, just fix up those minor issues.
 
Last edited:
OK i will fix as soon as i can. As for the boost, I'm not sure why this is happening? but thank you for your feedback.
They're relatively minor issues and should be simple to fix. Considering the lua seems to be custom (with the exception of the lightdash I believe, although that is marked as re-usable), I can't see any other reason for this to not be released, unless another judge can correct me, just fix up those minor issues.
As for this i did use Badnik's lightdash as a base although i did not copy. it was just a reference.
 
Last edited:
Ok, this all seems to be in working order now. Moving to releases as a lua example in Miscellaneous for others to use.
 
That's a good script, although i founded a bug and i believe you can fix it.
Here's the bug: if you try to boost while standing still, the animation is the standing one.
Once again i hope you can fix it...
If i can, i'l try to put a screenshot or movie to see the problem.

---------- Post added at 03:14 PM ---------- Previous post was at 02:58 PM ----------

Here's the problem:

 
ah yes I remember having that. A quick fix would be to force Sonic to go into the running state. Really silly problem honestly.
 
ah yes I remember having that. A quick fix would be to force Sonic to go into the running state. Really silly problem honestly.


The way the script is set up, when i set it to force the player into a running state, it stays in that state. what this means is that if you are boosting, then you will be stuck in 1 running frame.
 
This is nice, but can I suggest moving the lightdash to one of the custom buttons? It'd make more sense. How about moving the stomp to maybe custom action 2, and lightdash to 3? I say this because the stomp collides and renders Super Sonic's flight unusable. Also, your stomp and double jump aren't compatible with Super Sonic's pallete.
 
Last edited:
what this means is that if you are boosting, then you will be stuck in 1 running frame.
Code:
if player.mo.state==S_PLAY_STND
or player.mo.state==S_PLAY_TAP1
or player.mo.state==S_PLAY_TAP2
or player.mo.state==S_PLAY_RUN1
or player.mo.state==S_PLAY_RUN2
or player.mo.state==S_PLAY_RUN3
or player.mo.state==S_PLAY_RUN4
or player.mo.state==S_PLAY_RUN5
or player.mo.state==S_PLAY_RUN6
or player.mo.state==S_PLAY_RUN7
or player.mo.state==S_PLAY_RUN8
    player.mo.state=SPD1
end
You're whale cu welcome. Just a silly little coding I made up in my head right here, right now.
 
Code:
if player.mo.state==S_PLAY_STND
or player.mo.state==S_PLAY_TAP1
or player.mo.state==S_PLAY_TAP2
or player.mo.state==S_PLAY_RUN1
or player.mo.state==S_PLAY_RUN2
or player.mo.state==S_PLAY_RUN3
or player.mo.state==S_PLAY_RUN4
or player.mo.state==S_PLAY_RUN5
or player.mo.state==S_PLAY_RUN6
or player.mo.state==S_PLAY_RUN7
or player.mo.state==S_PLAY_RUN8
    player.mo.state=SPD1
end
You're whale cu welcome. Just a silly little coding I made up in my head right here, right now.

wanna know something? i completely forgot about the "or" part. it works now, thank you.

This is nice, but can I suggest moving the lightdash to one of the custom buttons? It'd make more sense. How about moving the stomp to maybe custom action 2, and lightdash to 3? I say this because the stomp collides and renders Super Sonic's flight unusable. Also, your stomp and double jump aren't compatible with Super Sonic's pallete.

ive noticed this as well so yes i will change the buttons. I'm not sure about the stomp palette but i will do what i can.


Thank you both for letting me know about these issues. i will fix as soon as possible.
 
Last edited:
Nice, the changes look more natural.
I don't mean to nitpick but the stomp is on Custom Action 3, as well as the Lightdash. So it's kind of hard to lightdash if you also stomp. Maybe move the stomp over to Custom Action 2? Other then that, this is really fun to use.
 
Nice, the changes look more natural.
I don't mean to nitpick but the stomp is on Custom Action 3, as well as the Lightdash. So it's kind of hard to lightdash if you also stomp. Maybe move the stomp over to Custom Action 2? Other then that, this is really fun to use.

strange i though i changed this as well. one moment.

Edit: OK its fixed now.
 
Last edited:
Code:
if player.mo.state==S_PLAY_STND
or player.mo.state==S_PLAY_TAP1
or player.mo.state==S_PLAY_TAP2
or player.mo.state==S_PLAY_RUN1
or player.mo.state==S_PLAY_RUN2
or player.mo.state==S_PLAY_RUN3
or player.mo.state==S_PLAY_RUN4
or player.mo.state==S_PLAY_RUN5
or player.mo.state==S_PLAY_RUN6
or player.mo.state==S_PLAY_RUN7
or player.mo.state==S_PLAY_RUN8
    player.mo.state=SPD1
end
Your code is flawed. You can remove almost all of those extra statements with this:

Code:
if player.mo.state == S_PLAY_STND
or player.mo.state >= S_PLAY_TAP1
or player.mo.state >= S_PLAY_RUN1
    player.mo.state = S_PLAY_SPD1
end

and for the love of god PLEASE use proper syntax.

As for the issue with the MT_THOK mobj being discolored, that is an internal SRB2 issue and cannot be fixed without the lua backend having more access to the game's color selections.
 
Your code is flawed. You can remove almost all of those extra statements with this:

Code:
if player.mo.state == S_PLAY_STND
or player.mo.state >= S_PLAY_TAP1
or player.mo.state >= S_PLAY_RUN1
    player.mo.state = S_PLAY_SPD1
end
I was tired when I typed that out. And I accidentally typed SPD1 instead of S_PLAY_SPD1. Also, I don't trust the "more than" or "less than" thing for states.


and for the love of god PLEASE use proper syntax.
If you're talking about the lack of spaces between equal marks and variables and such, I have confirmed it works completely, and it does reduce filesize a tiny bit, especially if there are a lot of spaces otherwise.
Sure, it MIGHT look a bit more confusing to people other than me, but I like it, and I type SRB2 Lua coding that way.
 
Your code is flawed. You can remove almost all of those extra statements with this:

Code:
if player.mo.state == S_PLAY_STND
or player.mo.state >= S_PLAY_TAP1
or player.mo.state >= S_PLAY_RUN1
    player.mo.state = S_PLAY_SPD1
end

and for the love of god PLEASE use proper syntax.

That would probably be best done like this.

Code:
if not (player.mo.state >= S_PLAY_SPD1
    and player.mo.state <= S_PLAY_SPD4)
    and P_IsObjectOnGround(player.mo)
    player.mo.state = S_PLAY_SPD1
end

This way it just checks if they currently aren't in their running frames and if they're on the ground before setting the frames.

Also, I don't trust the "more than" or "less than" thing for states.

More than and less than work fine for states, since all those names are representing is numbers. When you know what states you're using within SRB2, it's fine. Most (if not all) states that are related are grouped together properly, so the only time you might find problems is when you define your own states in a weird order.
 
Last edited:
More than and less than work fine for states, since all those names are representing is numbers. When you know what states you're using within SRB2, it's fine. Most (if not all) states that are related are grouped together properly, so the only time you might find problems is when you define your own states in a weird order.
I know, I just don't trust it.
 

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

Back
Top