YesNoOk
avatar

add004basic (Read 1517109 times)

Started by Shiyo Kakuge, June 18, 2014, 05:46:41 pm
Share this topic:
Re: add004basic
#741  January 05, 2017, 12:37:57 pm
  • *****
    • USA
@Shiyo Kakuge: I never realized it until now, well I thought it was an Ikemen thing, health is connected to the combo counter. Which means as health depletes will it activate. It freezes the counter. Oddly enough the score still activates. I know you watch the videos, but one thing I forgot to mention. Here is an example.
https://vid.me/b8Mt

Also the A.I,(Man I hate A.I) tries it's hardest to override the interruption you have set. Characters a lot of the time will start off the match doing an assist before round start(believe this was said above) or random try to do a super when running back out. Just some suggestions for the public version.

Re: add004basic
#742  January 05, 2017, 12:50:08 pm
  • ***
    • Italy
    • mark.nar@hotmail.it
@Shiyo Kakuge: I never realized it until now, well I thought it was an Ikemen thing, health is connected to the combo counter. Which means as health depletes will it activate. It freezes the counter. Oddly enough the score still activates. I know you watch the videos, but one thing I forgot to mention. Here is an example.
https://vid.me/b8Mt

Also the A.I,(Man I hate A.I) tries it's hardest to override the interruption you have set. Characters a lot of the time will start off the match doing an assist before round start(believe this was said above) or random try to do a super when running back out. Just some suggestions for the public version.



I noticed some time ago that hit counter are not counted by add004 if the hits don't cause damage; you should add a damage amount to hitdef of hyper move.
Re: add004basic
#743  January 08, 2017, 10:41:35 pm
  • ****
  • Raging Fist
You know one thing has me wondering thus far: for the 004.bat files, how do I enable the other 2 power bars for tag/ team battle modes? Idk how or even why but I was hoping there might be a way around this. I want to be able to enable such coding for mugen, and I know the codes are in add004's common01.cns, but atm I am not sure how to edit it so the other bars show for different modes.

For Single character, these bars are palette based selection.
For the left (Pal 3,6,9,12) are SVC/Samsho type bars. This bar enables energy for the powerbar by blocking and getting hurt, with Just Defend for additional energy/damage cancel. 50% energy grants lvl 1 supers, while MAXIMUM gives the lvl.2-3 attacks at the cost of 50% energy (This part has the bar draining as well, and I think this also increases the damage for lvl 3 Idk for sure).

the Right (Pal 2,5,8,11) are SFA/KOF Based. This mode has parrying for healing a smidge of life. you start with only lvl.1 attacks at Max. When your life is at 25%, Max becomes super, the power bar slowly regenerates to full, and gives lvls 2-3 attacks.
In hopes of adding some sort of variety I was hoping to get assistance from Shiyo about giving them a slight upgrade and use for team/tag mode, maybe even giving them different abilities to switchup gameplay.
EX: Normal (original) bars can have Alpha countering (at the cost of one bar) and technical recovery with EX Attacks at 50% energy bar(Defensive Balanced), SFA/KOF type can have ki charge up and meteor combo (offensive), SVC/Samsho can have EX attacks, and when health is at 25%, your character could have that CVS2 red glow, marking that lvl 3 attacks can be done with devastating 25% additional damage at the cost of only doing it ONCE per battle, so choose your character wisely(Defensive/Offensive).
Believe it or not a good palette-based ISM powerbar system can work and have a balance, and can be a good alternative download. I just wish someone could listen to this and realize it.
Last Edit: January 08, 2017, 11:54:19 pm by Flowrellik
Re: add004basic
#744  January 08, 2017, 10:54:22 pm
  • *****
  • Super Mario Fighters 3 resurrected.
    • USA
    • doraemariby@yahoo.com
So... You mean the other two lifebars... Or the other "groove" settings?

I really hope there's a better work around to "groove" selecting than palettes at this point.
Re: add004basic
#745  January 08, 2017, 11:23:38 pm
  • ****
  • Raging Fist
Well, either groove select or even pal-ism select can work fine. It would be an awesome sight to see for the game either way. It could be like a select mode during intro (Like up and down for grooves, left and right for first up select).
Re: add004basic
#746  January 09, 2017, 01:56:44 pm
  • avatar
  • *
@ReixSeiryu:
about hit-counters codes, many years ago, K' gave me these neat codes that solved our problems.
it uses life-change to detect "HitAdd" SCtrl, just like what exactly Gladiacloud said (thanks for the perfect comment).
(see ";sys::combo_" in [statedef 90900] for details)
but your video is right, counter will stop increasing when life reached zero or unchanged.

there is a combo font "_combo.fnt" in "res" folder, for using default system.

 or

please use this controller blow temporary instead of "HitAdd" without life-change in your chars.

* works for mugen 1.x and ikemen only.
* NOT guaranteed to work in the future.


[state 0]
   type=null
   trigger1=numenemy
   trigger1=(enemy,sysfvar(0)>0) && (playeridexist(floor(enemy,sysfvar(0))))
   trigger1=playerid(floor(enemy,sysfvar(0))),var(0)=90900
   trigger1=1|| playerid(floor(enemy,sysfvar(0))),cond(1, var(11):= var(11)+1 ,0)


ai-codes are almost in [ststedef 0] in "common1.cns", please clear my dirty codes and relax :)
characters have own ai-codes in their cmd, I guess those triggers in [statedef -1] are
top-priority to execute by mugen engine, and to cancel them is hard and nonsence,
except we edit the cmd directly.

let's find out some better way.



@Flowrellik:
as you "discoverd": by way of entertainment some options were added in add004 ;)
hope this can help you to edit:
find
in "common1.cns" - [statedef 90900]
-blocking/jd_system

 ";sys::blocking/jd_system"

-system and bar type

 "var(22)"
   1: N: normal
   2: C: blocking
   3: S: just-defence
   4: T: tag


your idea is instructive!! very nice !!!
I am so happy that someone else improved this add-on.
add004 is Open-source, please share your own system in this good forum :)
Re: add004basic
#747  January 09, 2017, 06:21:56 pm
  • ****
  • Pixels are atom's of resolution,Low-res or Hi-res
    • Turkey
    • metekervan26@gmail.com
hey shiyo,Add004 is tight,but there are some stuff,you should know and stuff I should ask

Sandman by McCready & Loganir snd Electro by McCready & Loganir and Odb718's( edits are assists and they try to use their Supers(Hypers) at the start of round as assist or while assisting.

At the end of round,If I did chose Kyo as an assist and Ryu as player,Kyo leaves screen and then falls from sky,can you fix it(make it different so he runs in after match is finished and does his winpose)


I noticed that your Hyper Background code has its own Superpause and Superpause effect,please teach me a way to deactivate it or show me lines
of code(I beg you)

I'm kinda curious about your special hitsparks,I want to code my own into common.cns
Can you show me all lines of codes related with your hitsparks?(Begging even more)


Last Edit: January 12, 2017, 03:55:00 pm by mete122
Re: add004basic
#748  January 09, 2017, 07:37:30 pm
  • ****
  • Raging Fist
@Flowrellik:
as you "discoverd": by way of entertainment some options were added in add004 ;)
hope this can help you to edit:
find
in "common1.cns" - [statedef 90900]
-blocking/jd_system

 ";sys::blocking/jd_system"

-system and bar type

 "var(22)"
   1: N: normal
   2: C: blocking
   3: S: just-defence
   4: T: tag


your idea is instructive!! very nice !!!
I am so happy that someone else improved this add-on.
add004 is Open-source, please share your own system in this good forum :)
That sounds like a good idea to me, and that's exactly the spot I had my eyes on. Thing is, I wonder how to implement all 3 bars with the tag system. I tried before to mess with the values and sure enough, N, C and S works with tag/team mode at the cost of ridding the tag assist. Mind you this kind of coding I'm new with so I may very well need your help, even if it's via PM.

EDIT!
I managed to discover this line for changing power modes. Now one thing I wonder is how the hell to make said alt. powerbars work because besides what I shared before, this seems to be a key.
Spoiler, click to toggle visibilty
In changing a code in var (22) I managed to get the other bars working with a slight few hiccups
A) Tag mode no longer works for assists (2 on 2)
B) Team mode. Works but if enemy is defeated, it will go back to the original bar regardless of palette.

@Shiyo Kakuge: Please, I need your help in this.
Last Edit: January 10, 2017, 07:13:20 am by Flowrellik
Re: add004basic
#749  January 11, 2017, 10:59:49 pm
  • *****
    • USA
Alright I will see what I can do. Also I want to see if I can accomplish what we discussed before about the tag-team stuff.
I want to make this fully functional with the tag-team attacks I'm working on. I'll post again once I make some reasonable progress. Also in that last update you did publicly you had the special and super triggers reversed. I.E 1000-2000 triggered the super text & vise verse. Just a head ups idk if you fixed, but I did manually.
Re: add004basic
#750  January 12, 2017, 03:52:45 pm
  • ****
  • Pixels are atom's of resolution,Low-res or Hi-res
    • Turkey
    • metekervan26@gmail.com

haha I can't believe this,I'm so happy
Re: add004basic
#751  January 12, 2017, 05:28:18 pm
  • *****
  • Super Mario Fighters 3 resurrected.
    • USA
    • doraemariby@yahoo.com
Wait, what happened? What's the test for?
Re: add004basic
#752  January 12, 2017, 08:08:47 pm
  • ****
  • Hoping for the best, prepared for the worst.
  • 2D Fighting games forever!
    • Brazil
Same, I have no clue on what's going on.
Lasagna
Re: add004basic
#753  January 12, 2017, 09:30:20 pm
  • ***
  • Amateur Writer
  • Basically, I do palettes.
    • USA
Maybe he never used it before.
Re: add004basic
#754  January 13, 2017, 02:20:15 am
  • ****
  • The other Indian
    • India
Read a few posts above, you'll get why he posted that video.
Re: add004basic
#755  January 13, 2017, 03:14:23 am
  • avatar
  • *
    • USA
First, I'd just like to say that this was awesome enough to make me finally get off my ass and register an account here just so I could post in this thread.

Secondly:
@ReixSeiryu:
about hit-counters codes, many years ago, K' gave me these neat codes that solved our problems.
it uses life-change to detect "HitAdd" SCtrl, just like what exactly Gladiacloud said (thanks for the perfect comment).
(see ";sys::combo_" in [statedef 90900] for details)
but your video is right, counter will stop increasing when life reached zero or unchanged.

there is a combo font "_combo.fnt" in "res" folder, for using default system.

 or

please use this controller blow temporary instead of "HitAdd" without life-change in your chars.

* works for mugen 1.x and ikemen only.
* NOT guaranteed to work in the future.


[state 0]
   type=null
   trigger1=numenemy
   trigger1=(enemy,sysfvar(0)>0) && (playeridexist(floor(enemy,sysfvar(0))))
   trigger1=playerid(floor(enemy,sysfvar(0))),var(0)=90900
   trigger1=1|| playerid(floor(enemy,sysfvar(0))),cond(1, var(11):= var(11)+1 ,0)

Going through all of these roundabout steps to try to figure out the current combo count when the game exposes that information to you (via calling GitHitVar(hitcount) on the hit player) seems counterproductive. By making a couple simple changes, I made the combo counter work even if life doesn't change (e.g. in training mode when the enemy has 0 life left already), and it doesn't require modifying characters to manually increment combo counter variables:
Code:
;---
;sys::combo_indicate_nums
;; コンボ数計算
[state 0]
type=varset ;note the change from varadd
trigger1=(var(11)/10000)=(var(11)%10000) && (playerid(var(15)),stateno!=[120,159]) && (playerid(var(15)),ctrl=0)
;old; trigger1=var(40)>(playerid(var(15)),life) && (var(9)&16) ;;<-life changed && getting damage
trigger1=var(9)&16
;old; var(11)=1 +( var(12):=var(12)+(playerid(var(15)),stateno=[5000,5199]) )*0 ;;<-real combo set
var(12)=(var(12)/10000)*10000 + playerid(var(15)),GetHitVar(hitcount)
[state 0] ;this controller is new
type=varset
trigger1=var(12)%10000 != var(11)%10000
var(11)=(var(11)/10000)*10000 + var(12)%10000

Thirdly: Your support character, the moment the match starts, suddenly gets shunted from state 190191 (offscreen, waiting to become ready for an assist attack) to state 0, then immediately (in the same frame) shunted back to state 190190, because sysfvar(4) still says it should be offscreen (since I can't find a state controller responsible for this sudden shove to state 0, I assume it's hardcoded into the engine). For characters with the default 320x240 localcoords, this isn't noticeable since they're below the bottom of the screen. However, as you can see with kfm720, the offsets in question aren't being run through Const240p(), so he winds up visibly appearing and then running offscreen again. I'm not sure how many other values may need this treatment, but changing these in particular at least got kfm720 to stop visibly running offscreen twice at the start of every match (this is in statedef 190190):
Code:
;---
;sys::partner_goto-standby1
[state 0]
type=changestate
triggerall=time>59 ;;<<- (60F) interval ; 間隔
trigger1=(backedgedist<Const240p(-100) || frontedgedist<Const240p(-100)) ;here
trigger2=(pos y>Const240p(100)) || time>218                              ;and here
value=190191
ctrl=0
;---
;sys::player_pos_y_outscreen1
[state 0]
type=posset
trigger1=backedgedist<Const240p(-60) || frontedgedist<Const240p(-60) ;and here
y=Const240p(180)                                                     ;and here
To be honest, it's probably that last one (the y value of the posset controller) that's the important one, but I did the others just to be on the safe side.
Re: add004basic
#756  January 13, 2017, 03:58:08 am
  • ****
  • Raging Fist
well at least there was one problem solved, What about the problem with having multiple powerbars for team/tag mode @Mageking17: , seeing how I managed to find out what they do and all
Re: add004basic
#757  January 13, 2017, 06:04:11 am
  • avatar
  • *
    • USA
well at least there was one problem solved, What about the problem with having multiple powerbars for team/tag mode @Mageking17: , seeing how I managed to find out what they do and all
Sorry, but since I have no interest in the alternate modes, I likewise have no interest in putting in the effort to integrate them with tag-team mode. :P

On the other hand, it probably wouldn't be too hard to just change all the checks for var(22)=4 to var(22)>=4, and all the checks for var(22)=1, 2, or 3 with var(22)%4=1, 2, or 3 (EDIT: okay obviously that won't work, but you can just subtract 3 instead) (EDIT AGAIN: I must be tired, because that very obviously wouldn't work. Much better to just go with the original modulo and just remember to set var(22) to 5/6/7 instead of 4/5/6)... although you then have to take into account other variables getting assigned the value of var(22), so that's something to watch out for.
Last Edit: January 13, 2017, 06:27:53 am by MageKing17
Re: add004basic
#758  January 14, 2017, 03:13:17 am
  • avatar
  • *
    • USA
Code:
;---
;sys::combo_indicate_nums
;; コンボ数計算
[state 0]
type=varset ;note the change from varadd
trigger1=(var(11)/10000)=(var(11)%10000) && (playerid(var(15)),stateno!=[120,159]) && (playerid(var(15)),ctrl=0)
;old; trigger1=var(40)>(playerid(var(15)),life) && (var(9)&16) ;;<-life changed && getting damage
trigger1=var(9)&16
;old; var(11)=1 +( var(12):=var(12)+(playerid(var(15)),stateno=[5000,5199]) )*0 ;;<-real combo set
var(12)=(var(12)/10000)*10000 + playerid(var(15)),GetHitVar(hitcount)
[state 0] ;this controller is new
type=varset
trigger1=var(12)%10000 != var(11)%10000
var(11)=(var(11)/10000)*10000 + var(12)%10000
Okay, after playing with this a bit more (and using more than one test character), I found a couple problems with this, which I have now fixed.

The first problem was that var(9)&16 (the "taking damage" flag) gets set whether or not the opponent actually took a hit, and GetHitVar(hitcount) never resets itself back to 0 (it just starts counting from 1 again the next time a combo starts), so if the opponent blocked your next attack after you pulled off a big combo, you'd get the combo result popup again without the combo counter ever appearing (and it would spam itself to fill up all available notification slots, too); a simple GetHitVar(guarded) check fixed that.

Secondly, however, GetHitVar(hitcount) obviously doesn't account for hitadd state controllers and and numhits attributes on hitdefs, so some way to manually tell the system that an extra hit has occurred in such a scenario is still needed; with a shrug, I adapted that code snippet @Shiyo Kakuge posted earlier (for manually incrementing the combo counter). I had to change the combo meter code to use an extra variable for it to work; I wound up giving var(11)'s old function to var(10) and making var(11) the "artificial combo inflation" variable since var(10) didn't seem to be in use, despite the _svc common1.cns claiming it is, and this way code can increment the counter in both the unmodified and modified versions of add004. Since the character I was testing this with started getting credit for combos involving hitadd controllers, I think this version of the code is ready for sharing.

Here's my current combo meter code in its entirety (note that I did my work in the base add004 common1.cns, so if there are differences in the combo meter code in the _bs or _svc versions, you'll need to adapt my changes accordingly):
Code:
;------------------------
;------------------------
; combo indicator, code by k' d(^-^)b
; modified by MageKing17
; コンボ数表示、K'さんより
; v10: nums Temp + Now ([0-9999]*1000 + [0-9999])
; v11:  extra hits
; v12: real combo + timer (timer[0-9999]*1000 + [0-9999])
; v13: pos_x / timer
; v14: temp: combo_counter / hittype
;--- ---
; >03 hits: good
; >05 hits: great
; >10 hits: beautiful
; >15 hits: fantastic
; >20 hits: marvelous
; >25 hits: m.u.g.e.n
;;--- announcer.combine + msg_combo (opponent)
;sys::sound_announcer_combo
[state 0]
type=playsnd
trigger1=(roundstate=2) && var(38)<99999999 && numenemy
trigger1=(enemy,sysfvar(0)>0) && (playeridexist(floor(enemy,sysfvar(0))))
trigger1=(playerid(floor(enemy,sysfvar(0))),var(0)=90900) && (playerid(floor(enemy,sysfvar(0))),var(10)%10000<1) && var(14):=(playerid(floor(enemy,sysfvar(0))),var(12)%10000) + (playerid(floor(enemy,sysfvar(0))),var(11))
trigger1=var(14)>2 || playerid(floor(enemy,sysfvar(0))),cond(1, var(11):=0, 0)
trigger1=(var(38):=var(38)*100+10+(var(14)>4)+(var(14)>9)+(var(14)>14)+(var(14)>19)+(var(14)>24)) && (var(14)>4) && (var(7)&64) ;; system_switch
value=f10100,3 +(var(14)>9)
channel=1
abspan=ifelse(teamside=1,-1,1)*facing*320

;sys::combo_real_reset
[state 0]
type=varset
trigger1=!(var(10)%10000)
var(12)=0
;---
;sys::combo_indicate_nums
;; コンボ数計算
[state 0]
type=varset
trigger1=(var(10)/10000)=(var(10)%10000) && (playerid(var(15)),stateno!=[120,159]) && (playerid(var(15)),ctrl=0)
;old; trigger1=var(40)>(playerid(var(15)),life) && (var(9)&16) ;;<-life changed && getting damage
trigger1=var(9)&16
;old; var(10)=1 +( var(12):=var(12)+(playerid(var(15)),stateno=[5000,5199]) )*0 ;;<-real combo set
var(12)=(var(12)/10000)*10000 + playerid(var(15)),GetHitVar(hitcount)*(!playerid(var(15)),GetHitVar(guarded))
[state 0]
type=varset
trigger1=!(var(10)%10000)
var(11)=1-playerid(var(15)),GetHitVar(hitcount)
[state 0]
type=varset
trigger1=1
var(10)=(var(10)/10000)*10000 + cond(var(12)%10000, cond(var(12)%10000 + var(11) > 1, var(12)%10000 + var(11), 1), 0)
[state 0]
type=varset
trigger1=var(10)/10000 != var(10)%10000
var(12)=var(12)%10000
;sys::combo_indicate_init
[state 0]
type=varset
triggerall=(var(10)%10000)>0
trigger1=!(var(9)&16) ;;<-not getting damage
trigger2=(roundstate!=2) || (var(9)&4096) ;;<-bonus stage
trigger3=(playerid(var(15)),ctrl)||(playerid(var(15)),stateno=[0,159])||(playerid(var(15)),stateno=8200)
var(10)=0
;---
;;>>@Config.Combo.Pos>>
;sys::combo_d_pos ;; v13: pos x (240p)
[state 0]
type=null
trigger1=(var(10)%10000=2) && ((var(10)/10000)!=(var(10)%10000))
trigger1=1|| var(13):=ifelse(teamside=2,-150,floor(var(3)/fvar(0))+150) ;;<-init pos x
trigger2=(var(10)%10000>1) && (var(10)/10000)<(var(10)%10000) ;;<-combo update
trigger2=1|| var(13):=var(13)+4*ifelse(teamside=2,-1,1) ;;<-shake
;sys::combo_d_pos_x_shift
[state 0]
type=varadd
;op; trigger1=numexplod(97800)
trigger1=(teamside=2 && var(13)<50) || (teamside=1 && var(13)>270)
var(13)=(ifelse(teamside=2,50,floor(var(3)/fvar(0))-50)-var(13))/3+teamside*2-3
;---
;sys::combo_d_cls
[state 0]
type=removeexplod
trigger1=(var(10)%10000>1) && ((var(10)/10000)!=(var(10)%10000) || (var(12)/10000=0))
id=97800  +( var(12):= (var(12)%10000) +280000 )*0 ;;<-view time reset
[state 0]
type=removeexplod
trigger1=!numexplod(97800)
id=97801
[state 0]
type=removeexplod
trigger1=!numexplod(97800)
id=97802
[state 0]
type=removeexplod
trigger1=!numexplod(97800)
id=97803
[state 0]
type=removeexplod
trigger1=!numexplod(97800)
id=97804
[state 0]
type=removeexplod
trigger1=!numexplod(97800)
id=97805
;---
;sys::combo_d_bg
[state 0]
type=explod
id=97800
triggerall=(var(7)&4) ;; system_switch
trigger1=(var(10)%10000>1) && !numexplod(97800)
anim=f300155 +( var(14):=(playerid(var(15)),stateno!=[5000,5199]) ) ;;<-hit type
space=screen
postype=left
sprpriority=-1
ownpal=1
scale=0.5,0.15
facing=ifelse(teamside=1,-1,1)
bindtime=-1
ignorehitpause=1
supermovetime=-1
pausemovetime=-1
;sys::combo_d_bg_shadow
[state 0]
type=explod
id=97800
trigger1=numexplod(97800)=1
anim=f300157
space=screen
postype=left
sprpriority=-3
ownpal=1
scale=0.7,1
facing=ifelse(teamside=1,-1,1)
bindtime=-1
ignorehitpause=1
supermovetime=-1
pausemovetime=-1
;sys::combo_d_hits
[state 0]
type=explod
id=97801
trigger1=numexplod(97800) && !numexplod(97801)
anim=f300150+var(14)
space=screen
postype=left
sprpriority=0
ownpal=1
scale=0.5,0.5
bindtime=-1
ignorehitpause=1
supermovetime=-1
pausemovetime=-1
;sys::combo_d_nums
[state 0]
type=explod
id=97802
trigger1=(var(10)%10000>1) && numexplod(97800) && !numexplod(97802)
anim=f300050+((var(10)%10000)%10)  +var(14)*10
space=screen
postype=left
sprpriority=1
ownpal=1
scale=0.25,0.25
bindtime=-1
ignorehitpause=1
supermovetime=-1
pausemovetime=-1
[state 0]
type=explod
id=97803
trigger1=(var(10)%10000>9) && numexplod(97800) && !numexplod(97803)
anim=f300050+(((var(10)%10000)/10)%10)  +var(14)*10
space=screen
postype=left
sprpriority=1
ownpal=1
scale=0.25,0.25
bindtime=-1
ignorehitpause=1
supermovetime=-1
pausemovetime=-1
[state 0]
type=explod
id=97804
trigger1=(var(10)%10000>99) && numexplod(97800) && !numexplod(97804)
anim=f300050+(((var(10)%10000)/100)%10)  +var(14)*10
space=screen
postype=left
sprpriority=1
ownpal=1
scale=0.25,0.25
bindtime=-1
ignorehitpause=1
supermovetime=-1
pausemovetime=-1
[state 0]
type=explod
id=97805
trigger1=(var(10)%10000>999) && numexplod(97800) && !numexplod(97805)
anim=f300050+(((var(10)%10000)/1000)%10)  +var(14)*10
space=screen
postype=left
sprpriority=1
ownpal=1
scale=0.25,0.25
bindtime=-1
ignorehitpause=1
supermovetime=-1
pausemovetime=-1
;---
;sys::combo_d_changed
[state 0]
type=modifyexplod
trigger1=numexplod(97800)
id=97800
postype=left
pos=floor(var(13)*fvar(0)), floor(75*fvar(0))
[state 0]
type=modifyexplod
trigger1=numexplod(97801)
id=97801
postype=left
pos=floor((var(13)+(numexplod(97803)+numexplod(97804)+numexplod(97805))*7.5-17)*fvar(0)), floor(69*fvar(0))
[state 0]
type=modifyexplod
trigger1=numexplod(97802)
id=97802
postype=left
pos=floor((var(13)+(numexplod(97803)+numexplod(97804)+numexplod(97805))*7.5-9)*fvar(0)), floor(79*fvar(0))
[state 0]
type=modifyexplod
trigger1=numexplod(97803)
id=97803
postype=left
pos=floor((var(13)+(numexplod(97803)+numexplod(97804)+numexplod(97805))*7.5-24)*fvar(0)), floor(79*fvar(0))
[state 0]
type=modifyexplod
trigger1=numexplod(97804)
id=97804
postype=left
pos=floor((var(13)+(numexplod(97803)+numexplod(97804)+numexplod(97805))*7.5-39)*fvar(0)), floor(79*fvar(0))
[state 0]
type=modifyexplod
trigger1=numexplod(97805)
id=97805
postype=left
pos=floor((var(13)+(numexplod(97803)+numexplod(97804)+numexplod(97805))*7.5-54)*fvar(0)), floor(79*fvar(0))
;---
;sys::combo_update_counter
[state 0]
type=varset
trigger1=(var(10)/10000)!=(var(10)%10000)
var(10)=(var(10)%10000)*10001
;sys::combo_d_display_time
[state 0]
type=varadd
trigger1=(var(12)>=10000)
var(12)=-10000

;;--- ---
;[state 0] ; combo
; type=displaytoclipboard
; trigger1=1
; text="attack=[ %d ] gethit=[ %d ] extra_combo=[ %d ] real=[ %d ] type=[ %d ]"
; params=playerid(var(15)),gethitvar(hitcount), var(10),var(11),var(12),var(14)
; ignorehitpause=1
;;--- ---
You may have noticed I changed the sprpriority of the combo meter's explods; I found it weird that the combo meter would sometimes go behind characters' super backgrounds, so I bumped their priority up to match that of the power bars' explods. If you don't like that change, well, feel free to revert it; it's not like anybody's stopping you. :P

If you want the end-of-match ranking to also accommodate extra combo hits, you'll need to modify the relevant controller appropriately:
Code:
;sys::rank_get_hitcombo
[state 0]
type=varset
trigger1=numenemy && roundstate=2
trigger1=(enemy,sysfvar(0)>0) && (playeridexist(floor(enemy,sysfvar(0))))
trigger1=(playerid(floor(enemy,sysfvar(0))),var(0)=90900) && fvar(3)<((playerid(floor(enemy,sysfvar(0))),var(12)%10000)+(playerid(floor(enemy,sysfvar(0))),var(11)))
fvar(3)=(playerid(floor(enemy,sysfvar(0))),var(12)%10000)+(playerid(floor(enemy,sysfvar(0))),var(11)) ;;<-real combo

And here's the modified snippet I used as a base for manually incrementing the combo meter:
Code:
[state 0]
   type=null
   triggerall=numenemy
   triggerall=(enemy,sysfvar(0)>0) && (playeridexist(floor(enemy,sysfvar(0))))
   triggerall=playerid(floor(enemy,sysfvar(0))),var(0)=90900
   trigger1=1|| playerid(floor(enemy,sysfvar(0))),cond(1,var(11):=var(11)+1,0)
I made the first three conditions triggerall because I had one condition that needed to be split into trigger1 and trigger2, so this was the most convenient way to do it. Yes, that is the only difference; it's still more convenient to have the code repeated here like this, for copy&pasting. :P

The way I used it was to find every hitadd controller and paste that controller under it, and then copy its trigger condition(s) over. For instance, if I had this:
Code:
[State 4001, hitadd]
type = hitadd
trigger1= animelem = 6 || animelem = 25
value = 1
I'd put this below it:
Code:
[state 0]
   type=null
   triggerall=numenemy
   triggerall=(enemy,sysfvar(0)>0) && (playeridexist(floor(enemy,sysfvar(0))))
   triggerall=playerid(floor(enemy,sysfvar(0))),var(0)=90900
   trigger1=animelem = 6 || animelem = 25
   trigger1=1|| playerid(floor(enemy,sysfvar(0))),cond(1,var(11):=var(11)+1,0)
Last Edit: January 15, 2017, 02:55:16 am by MageKing17
Re: add004basic
#759  January 15, 2017, 12:01:23 am
  • avatar
  • *
    • USA
Another bugfix for my modified combo meter: sometimes GetHitVar(hitcount) doesn't reset when it logically should. I noticed this occasionally happening when one character, after taking a large combo, got back up, blocked and attack, and then got thrown. The combo immediately jumped back up to what its previous value was; fortunately, I discovered that by assuming every combo would start with a single hit, initializing my "extra hits" variable to 1-var(12)%10000 when a combo starts counteracted this effect. While I was at it, I also made my modifications handle negative combo modifiers better (by making the minimum value it will assign to the "current combo" value be 1 as long as var(12)%10000 is nonzero).

I modified my previous post rather than just paste the whole thing here again, so look there for the fixed version.
Re: add004basic
#760  January 15, 2017, 12:42:19 am
  • *****
    • USA
Will have to find some time to try this out. Nice work.