collapse

Author Topic: Help with a custom hit state  (Read 772 times)

0 Members and 1 Guest are viewing this topic.

Offline shadowblade99

  • New Member
  • *
  • Posts: 5
  • Last Login:November 25, 2015, 06:02:46 PM
    • Email
Help with a custom hit state
« on: October 23, 2015, 05:20:32 AM »
Hi. I've been working on a Megaman/X/Zero compilation game, and I've been trying to tweak/balance the characters since they are from different authors, some are op, others are a little underpowered. Well, one of these 'op' characters is Sigma from Megaman X1, author unknown.

This Sigma has a sort of super armor, similar to the source game, where after one hit, it flashes and becomes invincible for a few instants. This is troublesome because some characters' attacks are multihit, and against him they basically do near no damage. I'd like to widen the time window before the invincibility procs, but, I know pretty much nothing about coding/programming, so, I have been trying and testing by changing values but so far no success, all I've got was the game to crash once, and bugged instances otherwise, like sigma being unable to be hit, or spawning a clone when he got hit.

All of those experimental changes are obviously undone. I hope someone could help. By the way, it doesn't let me upload the full code since it exceeds 20k characters so, I'm putting it as a pastebin link http://pastebin.com/H933BZx6



Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Help with a custom hit state
« Reply #1 on: October 23, 2015, 08:22:25 PM »
Ugh, it's using the helper method... Yuck.

Ok, this is the bit that is making the character invulnerable.

Code: [Select]
[state 10001, 無敵]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1
ignorehitpause = 1

If you want the invulnerability to last for less time you need to alter this bit
Code: [Select]
[state 10001, ステート変更]
type = ChangeState
trigger1 = Time = 40
value = 10000
And set the time to a lower value. Time = 10 would mean the character is invulnerable for 10 ticks rather than almost a second. Play round with it till you get something that feels right. Multihits will always break when a character has invulnerable frames. By changing the timing though you should get something that lets you get 2-3 hits in rather than 1 as 40 ticks of invuln after any hit is a bit ridiculous.

Offline shadowblade99

  • New Member
  • *
  • Posts: 5
  • Last Login:November 25, 2015, 06:02:46 PM
    • Email
Re: Help with a custom hit state
« Reply #2 on: October 26, 2015, 02:29:40 AM »
Thanks. Related to this, I can't seem to figure out the same thng, the invincibility frames in these CNS files.

http://pastebin.com/Y8Gd4VWU -> Zero

http://pastebin.com/vN8i4FUC ->Iris

http://pastebin.com/2NJc4qbK ->Colonel

These three are by the same author, Shikkoku, perhaps the solution for just one solves the others, but I found nothing similar to the code I was shown. Same goes for the char below, although it's from a different author.

http://pastebin.com/nUrSirky -> Final Sigma W by Ahuron

Thanks in advance. Sorry for requesting this much help.

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Help with a custom hit state
« Reply #3 on: October 27, 2015, 03:02:35 AM »
Looked at zero only, assuming the others are similar. You haven't actually shown me everything so i am GUESSING at this point.

When zero is hit he enters state 6000. Look in other .cns files for hitoverride.

In state 6000, he is invulnerable. If the hitvelocity he was actually hit by has an X or a Y value that isn't 0, he goes to 1 of 2 states. If they're both 0 he drops back to a normal state after the animation times out.

[State 6000, 3]
type = NotHitBy
trigger1 = 1
time = 1
value = SCA
ignorehitpause = 1

This is making him invulnerable. The way it's written is. Each tick be invulnerable for 1 tick. If you wanted to change this you would do

trigger1 = time = 0
time = 5
And he would only be invulnerable for 5 ticks instead as it is only activated when the state starts. And it will only be active for 5 ticks. I imagine the others are almost identical. Ahurons might be something else but at this point you are looking for any nothitby's in anything that doesn't look like a super state. You can hit ctrl+d on the keyboard twice to bring up his debug info and take a look at what state people go to when they are hit to work it out. Turn on clsn's with ctrl+C. If they turn teal, the character is invulnerable in some way.

Offline shadowblade99

  • New Member
  • *
  • Posts: 5
  • Last Login:November 25, 2015, 06:02:46 PM
    • Email
Re: Help with a custom hit state
« Reply #4 on: October 27, 2015, 03:25:48 AM »
I'll check it out. Hmm, now that you mention it, there are a few extra cns files. I'll upload them shortly. Thanks again for the help. I'll edit this soon. Just gonna test what you just said.

[UPDATE] There's a file called zero_-2&-3.cns, here it is. Colonel and Iris seem to have similarly named files, however, I'm not sure about Sigma by Ahuron since ut's a different author. http://pastebin.com/QDtMq7bi

Final Sigma W by Ahuron doesn't have any extra cns files. Got it, I'll try to find the stuff on this one.

[UPDATE 2] Ahuron's Sigma is fine, I think i managed to balance his invincibility by tweaking the defense value, however, even though I have modified the other 3 as you told me with Zero, i don't think it changed anything at all gameplay-wise. Here are some screenshots

http://imgur.com/a/4nKgp
« Last Edit: October 27, 2015, 04:40:59 AM by shadowblade99 »

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Help with a custom hit state
« Reply #5 on: October 27, 2015, 04:12:16 AM »
Ok, so there is some extra

;HitOverRide
[State -2, 0]
type = HitOverRide
trigger1 = 1
attr = SCA, AA, AP, AT
time = 1
stateno = 6000
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999
 
;ダメージ後の無敵
[State -2, 0]
type = NotHitBy
trigger1 = Var(15) != 0
value = SCA
time = 1
 
;無敵時間設定
[State -2, 0]
type = VarSet
trigger1 = Stateno = 6000
trigger1 = Var(15) = 0
v = 15
value = 1
 
[State -2, 0]
type = VarAdd
trigger1 = Var(15) >= 1
trigger1 = Movetype != H
var(15) = 1
 
[State -2, 0]
type = VarSet
trigger1 = Var(15) >= 30
v = 15
value = 0

The first one is the super armour special hitstate itself. The next is activation of invulnerability.

The next 3 are important. The first one activates a variable. The next increments it for while you are not hit up to a value of 30. Ie you are invulnerable for 30 ticks. And when it hits 30, it resets it to 0, so you're vulnerable again. You will need to alter this one.

[State -2, 0]
type = VarSet
trigger1 = Var(15) >= 30
v = 15
value = 0

To change how long you are invulnerable for. I don't know what you're after so try varying values in the trigger line to get the effect you're after. Also i don't like this code. It's an ugly way to deal with stuff.

Offline shadowblade99

  • New Member
  • *
  • Posts: 5
  • Last Login:November 25, 2015, 06:02:46 PM
    • Email
Re: Help with a custom hit state
« Reply #6 on: October 27, 2015, 05:20:49 AM »
Alright. Thanks. I'll try and see what results I get. Also, lol, these characters are actually from WinMugen era (2006ish if i recall correctly, perhaps even earlier), might explain why the code is like that, but not sure.

[UPDATE] I finally managed to adjust all 3 characters. However, I was wrong about the Sigma, he does need an adjustment. I'll try to search for the invincibility thing

[UPDATE 2] I think I finally got all of this done. Thank you very much :D
« Last Edit: October 27, 2015, 05:37:28 PM by shadowblade99 »

Tags:
 


* IMT Facebook

Help us by Donating!

IMT Discord

Join us at our Discord! Click the image below!

* IMT Shoutbox

Sorry, this shoutbox does not exist.

* Recent Posts

Ballroom Hallway (1.1 Only/AIGS) by Vegaz by LightFlare
[May 09, 2024, 11:53:48 AM]


Neon Light Force Demo by kyoman
[May 08, 2024, 12:50:05 PM]


D2TD VS Showcase Thread by D2TD
[May 05, 2024, 10:08:50 AM]


Classic VS : Athena by ELECTRO
[May 02, 2024, 09:44:33 PM]


Lasombra's IKEMEN Go Interactive Stages' WIP Topic and Releases by Lasombra Demon
[April 21, 2024, 12:09:20 PM]


Ultimate E. Honda + stage by ELECTRO
[April 18, 2024, 09:47:24 PM]


Sunset Beach (1.1 Only/AIGS) by Vegaz by LightFlare
[April 16, 2024, 06:55:00 PM]


Wonder Twins 2.0 by brucewayne74, Shining and Skhsato123 by brucewayne74
[April 05, 2024, 06:07:48 PM]


X-Men Training Room (Bright & Dark) Stage 1.1 & 1.0 by MatreroG
[April 05, 2024, 10:55:29 AM]


[WIP] Pocket Dimensional Clash 2 by O Ilusionista
[April 01, 2024, 11:03:03 PM]

* IMT Calendar

May 2024
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4
5 6 7 8 9 [10] 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

SimplePortal 2.3.5 © 2008-2012, SimplePortal