YesNoOk

Show content

This section allows you to browse the content for this member. Note that you can only see content for which you have sufficient viewing permissions.

**
WastedCoder is Offline
Contact WastedCoder:

WastedCoder

User

Messages by WastedCoder

    

Re: Is it possible to replicate Amenotejikara in Mugen?

 December 15, 2023, 02:26:51 pm View in topic context
 Posted by WastedCoder  in Is it possible to replicate Amenotejikara in Mugen? (Started by WastedCoder December 13, 2023, 05:51:20 pm
 Board: M.U.G.E.N Development Help

Looks like you're aware of the Mugen limitations already. I'm gonna be that guy and say this would be quite simple to do in Ikemen.

Also TargetPosAdd can be done with TargetBind and appropriate expressions.

My PC can't run Ikemen :c
Thank you, I will experiment with this.
I don't know why, but I thought target bind was not suitable for this kind of task.
    

Is it possible to replicate Amenotejikara in Mugen?

 December 13, 2023, 05:51:20 pm View in topic context
 Posted by WastedCoder  in Is it possible to replicate Amenotejikara in Mugen? (Started by WastedCoder December 13, 2023, 05:51:20 pm
 Board: M.U.G.E.N Development Help

Have you played the newest Naruto Storm game? Or maybe watched Naruto/Boruto?

Sasuke Uchiha's power, Amenotejikara, allows him to switch places with an opponent or any object and switch places of other objects/people within a certain range.

As far as I am aware, it's probably impossible to do it in Mugen without interrupting enemy's attack or placing enemy in custom state.
It would probably be possible with projectiles tho, but if there are many small projectiles it won't work for that kind of moves, making the ability redundant, compared to just making it a simple teleport.

So, I am simply asking to hear some propositions. I know there's a bug in Mugen that lets the 'target' flag stay on the enemy indefinitely. I wonder if this can be abused in some way, just to make this move work somehow? It's unfortunate, we don't have 'targetposadd' XD
    

Re: How to make ai taunt after each combo?

 November 23, 2023, 09:05:25 pm View in topic context
 Posted by WastedCoder  in How to make ai taunt after each combo? (Started by FinesseFui November 22, 2023, 12:02:43 am
 Board: M.U.G.E.N Development Help

The main problems are here:
Code:
trigger1 = Random = 999 * (AIlevel ** 2 / 64.0)
trigger1 = Enemy,P2life = 0

In the first one, you're checking if random is equal to 999, which gives you a 1/1000 chance that it will happen. And that's if the AIlevel calculation returns a whole number, because if it's a decimal it will never trigger.

In the second one, you're checking if the enemy's P2 (i.e. your char) is dead.

Good Lord, I can't believe I didn't notice all that. I am so inattentive. `:D
    

Re: How to make ai taunt after each combo?

 November 23, 2023, 09:51:43 am View in topic context
 Posted by WastedCoder  in How to make ai taunt after each combo? (Started by FinesseFui November 22, 2023, 12:02:43 am
 Board: M.U.G.E.N Development Help

So I'm using beterhans chunli and I'm trying to make her taunt either in-between the round or when match over here the code. Also I'm new so don't beat me up ;-c

[State -1,Taunted]
type = Changestate
triggerall = AIlevel && Numenemy && Statetype !=A && p2statetype !=A
triggerall = Roundstate = 2
triggerall = Alive
trigger1 = Enemy,P2life = 0 
trigger1 = ctrl
trigger1 = Random = 999 * (AIlevel ** 2 / 64.0)
value = 196

You mean, this block doesn't work? If so, the reason might be roundstate = 2. When someone is dead and the other one is in ctrl, roundstate should proceed to 3 and on(?)
Anyways, roundstate = 2 means the fight has started and players can attack each other.
I suspect, deleting this line 'roundstate = 2' might actually cause some bugs during intros tho, so maybe you should try roundstate > 1. And 999 random value is too high, will result into spam.
    

Re: My Launcher is infinite and shouldn't be! How can I limit 1 Launcher per combo?

 November 19, 2023, 12:06:28 am View in topic context

Yeah, it should work. But make sure there's only one [Statedef -2] in the character.
    

Re: My Launcher is infinite and shouldn't be! How can I limit 1 Launcher per combo?

 November 14, 2023, 04:35:25 pm View in topic context

You gotta make sure var(10) or whichever you are going to use, is not used anywhere else. (u got 60 vars, ranging from 0-59)
    

Re: My Launcher is infinite and shouldn't be! How can I limit 1 Launcher per combo?

 November 11, 2023, 07:49:50 pm View in topic context

    

Re: SF3 M.Bison

 October 09, 2023, 02:17:28 pm View in topic context
 Posted by WastedCoder  in SF3 M.Bison (Started by inktrebuchet February 22, 2017, 08:03:32 pm
 Board: Sprite Projects

Wow! 6 years and this is still a thing! I wish you a good luck. These are incredible. I look forward to seeing it all finished.
    

Re: How can I make a Buff System??????

 August 29, 2023, 09:12:58 pm View in topic context
 Posted by WastedCoder  in How can I make a Buff System?????? (Started by Rabano August 27, 2023, 08:50:35 pm
 Board: M.U.G.E.N Development Help

I guess u should change this

Code:
[State 2005, End]
type = removeexplod
trigger1 = fvar(39)=0
 
[State 2005, End]
type = destroyself
trigger1 = fvar(39)=0

to this

Code:
[State 2005, End]
type = removeexplod
trigger1 = root,fvar(39)=0
 
[State 2005, End]
type = destroyself
trigger1 = root,fvar(39)=0

Since it should check for root's var, which is set to 1. This helper's own fvar 39 is 0, meaning it will self-destroy instantly.
    

Re: Yagami-AD

 August 01, 2023, 07:27:13 pm View in topic context
 Posted by WastedCoder  in Yagami-AD (Started by vicneo August 01, 2023, 09:04:09 am
 Board: M.U.G.E.N Development Help

Is there a way to make him instantly go into stronger form when his health starts to lose like Xavier Kim and Orochi K Shura?

You need it for AI or you want it to happen automatically no matter who's in control?

I want it to happen automatically

So, you go to your Statedef -2
and write something like this

Code:
[State 0, SelfState]
type = SelfState
trigger1 = statetype != A && ctrl && life<lifemax/2 && var(x) != y
value = ;transformation state number
ctrl = 0
People usually use vars for transformations, so if after transformation he sets var(2) to 1, that's what X and Y should stand for. This is important, or he will spam the transformation endlessly. It's if I understand correctly how this character works, of course. If u do everything right, then, after his health is below 50% he will automatically transform, assuming, he is on the ground and in control, not in the middle of any move etc.

EDIT: if he has many transformations, then u add more Selfstates changing the conditions as you like, and don't forget to include the var part.
And you can choose any life value u see fit, like 'life<500' etc. that was just an example.

    

Re: Yagami-AD

 August 01, 2023, 01:31:03 pm View in topic context
 Posted by WastedCoder  in Yagami-AD (Started by vicneo August 01, 2023, 09:04:09 am
 Board: M.U.G.E.N Development Help

Is there a way to make him instantly go into stronger form when his health starts to lose like Xavier Kim and Orochi K Shura?

You need it for AI or you want it to happen automatically no matter who's in control?
    

How to detect hitoverride?

 July 31, 2023, 08:32:29 pm View in topic context
 Posted by WastedCoder  in How to detect hitoverride? (Started by WastedCoder July 31, 2023, 08:32:29 pm
 Board: M.U.G.E.N Development Help

So, recently I asked how to detect i-frames, and the helper that hits enemy constantly worked, but I encountered another problem, if hit was overridden, then it doesn't work. How do I find that out? I experimented with a few things, but nothing worked, so, pls, tell me if such a way even exists.
    

Re: How to detect invincibility frames?

 July 31, 2023, 10:15:15 am View in topic context
 Posted by WastedCoder  in How to detect invincibility frames? (Started by WastedCoder July 30, 2023, 08:40:15 am
 Board: M.U.G.E.N Development Help

I've had this idea that I never put to the test because it's impractical, but you might be able to have a helper following the opponent and constantly hitting them with a "type = none" Hitdef. When it misses P2 is probably invincible.

It actually worked for this specific case. Thank you once again! ^-^
    

Re: How to detect invincibility frames?

 July 31, 2023, 09:24:44 am View in topic context
 Posted by WastedCoder  in How to detect invincibility frames? (Started by WastedCoder July 30, 2023, 08:40:15 am
 Board: M.U.G.E.N Development Help

I've had this idea that I never put to the test because it's impractical, but you might be able to have a helper following the opponent and constantly hitting them with a "type = none" Hitdef. When it misses P2 is probably invincible.

I will try it out and let you know how it worked. Thank you!
    

How to detect invincibility frames?

 July 30, 2023, 08:40:15 am View in topic context
 Posted by WastedCoder  in How to detect invincibility frames? (Started by WastedCoder July 30, 2023, 08:40:15 am
 Board: M.U.G.E.N Development Help

I want the AI to stop hitting an invincible enemy and just move away while the opponent is invincible during super pause etc.
Are there any common ways to do so?

Thanks ^-^
    

Re: Help me do my math in Mugen :D

 May 12, 2023, 10:46:08 pm View in topic context
 Posted by WastedCoder  in Help me do my math in Mugen :D (Started by WastedCoder May 01, 2023, 03:12:21 pm
 Board: M.U.G.E.N Development Help

So I'm trying to sort that last long line of code you posted.
One thing that jumps out at me is
enemynear(var(59)), movetype = H
is scattered throughout the line. I'd personally make 2 of whatever you're making. 1 for the hit reaction, and 1 for the not hit reaction.
BUT I thought this was FOR the hit reaction.
So Why's it there??

One other thing,
23+floor((p2bodydist x / 8.5)))
is something else I'd reduce down. You can set the value as a variable and the code will be a LOT easier to read.
 
    p2bodydist y = [-49-(enemynear(var(59)), movetype = H)*floor((23+floor((p2bodydist x / 8.5)))*(enemynear(var(59)),Vel Y)+((23+floor((p2bodydist x / 8.5)))*((23+floor((p2bodydist x / 8.5)))+1)/2)*fvar(20)),0-(enemynear(var(59)), movetype = H)*floor((23+floor((p2bodydist x / 8.5)))*(enemynear(var(59)),Vel Y)+((23+floor((p2bodydist x / 8.5)))*((23+floor((p2bodydist x / 8.5)))+1)/2)*fvar(20))]

vs

    p2bodydist y = [-49-(enemynear(var(59)), movetype = H)*floor((Var(718))*(enemynear(var(59)),Vel Y)+((Var(718))*((Var(718))+1)/2)*fvar(20)),0-(enemynear(var(59)), movetype = H)*floor((Var(718))*(enemynear(var(59)),Vel Y)+((Var(718))*((Var(718))+1)/2)*fvar(20))]


But even with all that, when I plug in arbitrary numbers, I'm getting a crazy span in the results. Like say P2 is 89 away from P1.
23+floor((89 / 8.5)  = ‭33.470588235294117647058823529412‬

Code: (Easier to read with the return)
p2bodydist y = [-49-  1*floor((33)*(enemynear(var(59)),Vel Y) + (33*34/2)*fvar(20))  
, 0-(enemynear(var(59)), movetype = H)*floor(33*(enemynear(var(59)),Vel Y)+(33*34/2)*fvar(20))]
33 times 34 divided by 2 is 561. how small of a fraction is fvar(20)????

At this point I'm not even sure what you're trying to code with the
p2bodydist y =
starting things off.
It seems like you want your range to be 0 to 49, so maybe just code for that??

I think you're making the code WAY more complex than it needs to be.

Oh, thanks for answering once again.
I've changed the entirety of that, limiting the whole thing to work only if p2bodydist x = [0,100]
I used then different values. And I don't use vars, because I don't have many spare ones.
Now for the acceleration formula I have this in AI helper:
Spoiler, click to toggle visibilty
And this in -2 state:
Spoiler, click to toggle visibilty
So, yeah, I solved the issue and made it work.
If u need, I can explain how this works, but I suppose the above code will be enough. This thing isn't mine, obviously. I found it on some old forum, as well as the tuto on how to use it, and there I am, using it. It works perfectly, but if enemy isn't hit, he may evade a special or super, which will result in a waste of meter.
    

Re: Help me do my math in Mugen :D

 May 06, 2023, 10:31:57 am View in topic context
 Posted by WastedCoder  in Help me do my math in Mugen :D (Started by WastedCoder May 01, 2023, 03:12:21 pm
 Board: M.U.G.E.N Development Help

Can you provide more information about the move? When does the velocity kick in? Does the acceleration begin immediately, or does it wait one tick after the velocity starts (as is usually the case for most coders)?

Anyways, I'm not sure that determining the velocity here is the right way of going about this. The math gets tricky, and I was never the best at recurrence relations (this is all assuming that velocity begins at time = 0, and that acceleration and friction kick in at time = 1):



But, after some manipulation of these equations, a pattern starts to form...



And we can determine the general form of the formula needed to calculate the x-distance travelled in this move at any arbitrary point in time. It's not pretty, and each singular point in time uses a different formula. So while it is certainly possible to calculate the distance traveled given the velocity, friction, and accel, and time, it's something that doesn't seem very worthwhile in this situation.

I think instead your best bet might be to determine the average velocity of the entire move (it'd be easiest to experiment with the character and figure out the total x-distance traveled and divide by the number of ticks it takes to reach that distance, rather than calculating it yourself) and use that in your calculations. The result won't give you 100% accurate results, but it should be good enough (I would also advise taking the ceiling of p2bodydist x/average x-vel, to ensure you always overestimate the amount of ticks it would take to travel close enough to the opponent).

Thank you for your answer!
Of course.
Move is Chidori form Naruto.
Velocity kicks in on the 24th tick after activation. And on 25th tick he gets his first 1.7 velocity.
The formula I need to slap the vel x in, looks like this:
Code:
p2bodydist y = [-49-(enemynear(var(59)), movetype = H)*floor((23+floor((p2bodydist x / 8.5)))*(enemynear(var(59)),Vel Y)+((23+floor((p2bodydist x / 8.5)))*((23+floor((p2bodydist x / 8.5)))+1)/2)*fvar(20)),0-(enemynear(var(59)), movetype = H)*floor((23+floor((p2bodydist x / 8.5)))*(enemynear(var(59)),Vel Y)+((23+floor((p2bodydist x / 8.5)))*((23+floor((p2bodydist x / 8.5)))+1)/2)*fvar(20))]
Yeah, actually, that's the conclusion I've come to. That's too complicated, and I've already spent too much time trying to figure that out.
Oh, that's what I decided to do. XD
    

Re: Help me do my math in Mugen :D

 May 06, 2023, 10:22:29 am View in topic context
 Posted by WastedCoder  in Help me do my math in Mugen :D (Started by WastedCoder May 01, 2023, 03:12:21 pm
 Board: M.U.G.E.N Development Help

How do I do the vel x math here if it takes number 2 from veladd, multiplies by friction thing, which results in 1,7, then it takes 1,7 multiplies it by friction thing again and adds it to the previous number, which results in 3,145? How do I make these calculations before the character even starts moving, so it charges only if he can reach in time?  :neutral:   

So I've done some pretty complex calculations in the past. Wolfram Alpha was always on my list to test out when I was totally stuck. It always sucked and could never make anything that got me closer. ChatGPT has.

BUT, your math comes down to 2 things. How fast P2 is estimated to hit the ground, and how fast you're willing to let P1 move.

I'm imagining 3 different ways that your move could work. Which could be coded multiple ways each.
Is it a custom combo kinda set up? Almost like a throw. Where you hit p2, they pop up, then P1 runs over and hits them a 2nd time?
Is this just a random special that targets P2's location and fires off toward that position?
Do you want P1 to have a set speed all the way through, or do you want it to slow down when it gets close enough to P2?

As far as I know, speed 1 moves 1 pixel per tic, speed 17 moves 17 pixels per tic.
So if P2 is 55 pixels up moving speed 8 down, and you're 175 pixels away;
55/8=x
175/x=y
So
Vel X = "175"/"55"*"8" ;55 is player 2 height, 8 is P2's vel y,  175 is p2 dist x
This might get you close to what you want


----
Also, you mentioned something that you wouldn't want this to trigger unless you were going to be able to hit P2 before they land. You'd just set this up as a trigger to check if a known value was greater or less than "55"/"8". Cuz if it's only going to take 2 tics for P2 to hit the ground there's no reason to run for it.
Thank you for your answer!
The move is Chidori. Sasuke Uchiha uses it. He charges it for 23 ticks and on 24th he starts moving.
This is the formula I am using. 8.5 is vel x, which is ofc just a average speed.
Code:
p2bodydist y = [-49-(enemynear(var(59)), movetype = H)*floor((23+floor((p2bodydist x / 8.5)))*(enemynear(var(59)),Vel Y)+((23+floor((p2bodydist x / 8.5)))*((23+floor((p2bodydist x / 8.5)))+1)/2)*fvar(20)),0-(enemynear(var(59)), movetype = H)*floor((23+floor((p2bodydist x / 8.5)))*(enemynear(var(59)),Vel Y)+((23+floor((p2bodydist x / 8.5)))*((23+floor((p2bodydist x / 8.5)))+1)/2)*fvar(20))]
    

Re: Help me do my math in Mugen :D

 May 01, 2023, 04:09:40 pm View in topic context
 Posted by WastedCoder  in Help me do my math in Mugen :D (Started by WastedCoder May 01, 2023, 03:12:21 pm
 Board: M.U.G.E.N Development Help

I'd really have to clear out the dust in my brain to answer your actual question ;D, but I can provide some advice instead. First thing is that using both acceleration and friction is very uncommon in a fighting game. The second thing is AI doesn't have to be a calculator. You can empirically check how many frames the move needs to hit properly and just use that time in your calculations (that said I'm guilty of making it a calculator at times).

If you want to figure out how to calculate it for the fun of it, then go right ahead, of course.

Thank you for your answer.
I've already spent like hours and hours and I figured that this thing is called geometric sequence or something, but I ultimately failed to solve it xd
I am super bad at maths... it seems almost impossible, so, yeah, I will probably try to figure something like you're saying for some general distances.
But I'd still appreciate it, if anyone took the time and explained me, what should have I done in order to calculate it. Because for fixed velocities of projectiles and stuff I'd just go with (p2bodydist x / 20) for example, and even though that would result into a super long formula, I still like how it looks in game, for the hardest AI difficulty. 
    

Re: forward dash with backward dash code

 May 01, 2023, 03:17:48 pm View in topic context
 Posted by WastedCoder  in forward dash with backward dash code (Started by jimboshorimbo April 30, 2023, 09:30:16 pm
 Board: M.U.G.E.N Development Help

If u want him to dash forward then in your velset controller use a positive number for x, like 5, 10 etc. and a negative number, like -3,-8 etc. for y to go up, if u need.

Or, if u have those numbers stored in your constant, then just change const(velocity.run.back.x) to const(velocity.run.fwd.x), same for Y value with const(velocity.run.fwd.y)