Misc. Character WAD Help

Status
Not open for further replies.

Saturn Ross

The Local Bird-Brain
Hey, I'm trying to get a character's Thok and Spin items to be after-images, sort-of like SkyLua, but shorter, like Peelout v4. It would be appreciated. Thanks!
 
Code:
//This Lua lump gives player afterimages for using some abilities.

//Give afterimages if spinning or thokking
addHook("ThinkFrame", do
	for player in players.iterate
		if not player.mo continue end
			if (player.pflags & PF_THOKKED)
			and (player.mo and player.mo.skin == "sonic")
			or (player.pflags & PF_SPINNING)
			and (player.mo and player.mo.skin == "sonic")
			P_SpawnGhostMobj(player.mo)
		end
	end
end)

Here you go, btw, set your character's Spin and Thok Items to MT_NULL, so it will just display after images.
(Straight copypaste from New Horizons~)
EDIT: Added a skin restriction, as Tails & Knux can also be affected, just replace "sonic" with your Char's skin name, and it should work.
 
Last edited:
"ThinkFrame"
Who even uses this hook anymore? MobjThinker is by far recommended by everyone.

Also, he said "shorter than SkyLua, like Peelout v4", and I imagine SkyLua simply uses P_SpawnGhostMobj. Therefore, I also imagine one'd need to edit the spawned ghost object in some way. Unfortunately, I do not know in which way.
 
What I meant by, "Shorter than SkyLua, like PeelOut v4" I meant that less afterimages would appear. I was kind of looking for an inbetween sort of afterimage, but the one Lat compiled is actually quite good.
 
What I meant by, "Shorter than SkyLua, like PeelOut v4" I meant that less afterimages would appear. I was kind of looking for an inbetween sort of afterimage, but the one Lat compiled is actually quite good.
Well, for that you could try an "if leveltime % 2" for every second frame, "if leveltime % 3" for every third frame, etcetera, however note I did not test that at all. (Reminder: There are 35 frames per second in Sonic Robo Blast 2.)
 
Okay, maybe you could write the code down, because I am new to LUA - I know some traits, what it can do, etc. - but I can't really come up with anything original...
BTW, could anyone find some good Espio sprites and bundle them in a WAD, because thanks to some pre-made LUA, I might just make a complete Espio 2.1/2.2 WAD...
 
Sure, I guess. Though note this is untested.
Code:
addHook("MobjThinker",function(mobj)//Add MobjThinker hook
    if mobj.skin=="sonic"             //If the player is playing as Sonic
    and(mobj.player.pflags&PF_THOKKED //And Thokking
    or mobj.player.pflags&PF_SPINNING)//Or Spinning
    and leveltime%2                   //Then every 2ND tic-
        P_SpawnGhostMobj(mobj)          //-make a ghost object of the player
    end                               //End the "if" line, we're done here
end,MT_PLAYER)                      //End the "function" to be executed, and only execute it on PLAYER objects
Change leveltime%2 to correspond to however often you want. (Testing is important.) You can only use whole values/integers.
 
Thanks! This is perfect! Now, if I were to make an Espio for 2.1/2.2, what abilities aside from the Fall Switch and Wall Run could I use?
 
Maybe some sort of shuriken throw thing, provided P_RingSlingerGametype returns false (as to avoid it being abused in multiplayer). That's all I can really think of, as being able to make all enemies unable to detect one would be horrendously(?) "broken".
 
Okay, that's not a bad idea. How about time-bending powers? He IS a ninja [the Naruto kind with special abilities] after all...
 
While he is a ninja, it wouldn't really work well for anyone other than Shadow or Time Eater. And have you ever seen Espio bend time in any Sonic game? Nope. Throw shurikens? Sanic Heros (unless I remember wrong).
 
To be honest, I thought about this (fan character, don't ask) way back in the day. Here's what I brainstormed (most of these are for competitive gametypes):
  • An ability where the character throws a smoke bomb at their feet to render himself invisible. Basically, just force him into the animation and give him MF2_SHADOW. Make sure he can only do it on the ground, though. (or, if he won't have an animation, it can work in the air too)
  • An ability where he can throw shuriken or kunai daggers or something without using a ring (as if he had an Infinity Ring) but give it the firing rate of the Rail Ring (to prevent being spammed).
  • A sneaking mode of some sort. Like, by holding Custom 1, your move speed is greatly reduced and you can't use weapon rings, but you gain MF2_SHADOW. (an alternative to the smoke bomb idea)
  • A melee attack that costs 10 rings. Probably should stop the character from moving when it's executed though.

While yes, Espio is based on ninjas, I don't think he's based on the Naruto kind with magic. The ninjas from feudal Japan were just stealthy and had tricks up their sleeves. Legends and myths kind of blew that out of proportion, and that's where the "magic" idea came from. If you research them a bit, you'll find that they had neat tricks such as "walking on water," which you could incorporate into Espio's skills somehow. Just don't stray too far from Espio's original concept, which you could easily do especially by adding magic or something. Don't try to use the time bending ability, either, as it's not only inaccurate, but hard to replicate in SRB2.

Feel free to use any of the ideas above if you want.

EDIT: While staying true to Espio's design is good, gameplay is the biggest concern: It can be original if you want it to be, but it shouldn't confuse people and interrupt the flow of the game. This is especially true not only for single player, but competitive modes like Match as well.
 
Last edited:
To be honest, I thought about this (fan character, don't ask) way back in the day. Here's what I brainstormed (most of these are for competitive gametypes):
  • An ability where the character throws a smoke bomb at their feet to render himself invisible. Basically, just force him into the animation and give him MF2_SHADOW. Make sure he can only do it on the ground, though. (or, if he won't have an animation, it can work in the air too)
  • An ability where he can throw shuriken or kunai daggers or something without using a ring (as if he had an Infinity Ring) but give it the firing rate of the Rail Ring (to prevent being spammed).
  • A sneaking mode of some sort. Like, by holding Custom 1, your move speed is greatly reduced and you can't use weapon rings, but you gain MF2_SHADOW. (an alternative to the smoke bomb idea)
  • A melee attack that costs 10 rings. Probably should stop the character from moving when it's executed though.

While yes, Espio is based on ninjas, I don't think he's based on the Naruto kind with magic. The ninjas from feudal Japan were just stealthy and had tricks up their sleeves. Legends and myths kind of blew that out of proportion, and that's where the "magic" idea came from. If you research them a bit, you'll find that they had neat tricks such as "walking on water," which you could incorporate into Espio's skills somehow. Just don't stray too far from Espio's original concept, which you could easily do especially by adding magic or something. Don't try to use the time bending ability, either, as it's not only inaccurate, but hard to replicate in SRB2.

Feel free to use any of the ideas above if you want.

EDIT: While staying true to Espio's design is good, gameplay is the biggest concern: It can be original if you want it to be, but it shouldn't confuse people and interrupt the flow of the game. This is especially true not only for single player, but competitive modes like Match as well.
You have some pretty good ideas, much better than what I thought. However, I'm not too good at LUA, and I usually end up using and modifying what I think fit. I'm also bad at spriting, but there are tons of sprites out there, and sadly the only Espio sprites I found look horrible, and I couldn't even get them out of the WAD with SLADE3. I might be able to ask someone, though.
 
Sure! Now, for the ability, I would like to recreate the Ninja Leaf Swirl from Sonic Heroes [Picked the game back up just for this. It didn't have such bad gameplay mechanics, so I could take inspiration] in LUA, complete with avoiding enemy detection [minus bosses], by pressing Spin after a jump. [His main ability is the Fall Switch] But how should I go about the Tornado effect from the game? Should I exclude it for simplicity, include it for looks, or have it swing enemies out of the way?


Oh, here's a code that could be used as a base:
Code:
addHook("ThinkFrame", do
 for player in players.iterate
  if player.mo and player.mo.skin == "sonic" then
   if player.cmd.buttons & BT_USE
   and player.panim == PA_ROLL
   and not P_IsObjectOnGround(player.mo)
   and player.mo.ldashready == 0
   and player.powers[pw_super] == 0
    player.pflags = $1 & ~PF_JUMPED
    player.mo.state = S_PLAY_FALL1
    player.mo.momx = 0
    player.mo.momy = 0
    player.mo.momz = 0
   end
  end
 end
end)
Straight from MotdSpork's SADX LUA, BTW.
 
Last edited:
Well, it'd (the tornado would) probably look awful in software rendering. Either because it'd be opaque, or because of the limited colours that can be drawn behind it. But I'd say either exclude or include, but don't have it swing enemies.
 
Well, it'd (the tornado would) probably look awful in software rendering. Either because it'd be opaque, or because of the limited colours that can be drawn behind it. But I'd say either exclude or include, but don't have it swing enemies.
Maybe I could use a Whirlwind Shield effect that would rapidly change transparency...?
 
That'd be pretty small, and not tornado-ey enough to me, since it's... well, a shield, and shields in Sonic Robo Blast 2 are round-ish.
But if you will do anything, please make sure to make it both noticable and not block the view. Those two are probably my most major concerns. It actually being easily visible, as well as not block the view at all/too much.
 
Well, I ran into a dead end. I need a code.
What I want it to do is: After a jump, press spin, some fitting effect happens as you stop midair, and you turn invisible for a fair amount of time, possibly unable to do an action, and revert back to normal with an effect.
Would that be hard?
BTW, I'm still using SonicRE sprites as placeholders, so maybe you could find some Espio Sprites [Good or bad]?
 
The hardest would probably be finding/making good Espio sprites (even without anti-aliasing). I'm sorrily(?) not really interested enough to attempt making Lua scripting for what you posted, too. Another hard thing might also be to make one visible to oneself, but invisible to other players (if that's wanted), but that'd also be pretty overpowered.
 
Status
Not open for further replies.

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

Back
Top