-
Hello to everyone, well, I'm working with the HUD' s expanded version of Blazblue Central Fiction. To do all my lifebars I use the awesome add004 because you have unlimited actions to do the anims. Ok! but in my other works I use the fight.def of mugen to work with the lifebar, but this time I wanna use the fightfx archive to reproduce it because I wanna do a better work in the recreation at the intro of the round. I try to add the sprites and modify the code but I can't do two things, all two very important things...
First of all, when I use the action facing=ifelse(teamside=1,-1,1) player 2 image it' s 1pixel misaligned to the right... I found in the common1.cns a part to modify the position of X,
;;>>@Config.LifeBar>>
;; lifebar init ; ƒ‰ƒCƒtƒo[ ‰Šú’l
;sys::init_lifebar
trigger1=1|| var(31):=floor(ifelse(teamside=1,-18,18)*fvar(0)+var(3)*0.5) ;;<- LifeBar_Pos_X ;(XÀ•W)
Is this code that I must modify to position the images of player 2? If so, what should I do?
My other problem it's about the life bar. Add004 can use 3 bars for life, one for nodamage, another that it's the lifebar and the last for the danger. Wow! I don't understand nothing here... The life bar it' s in two segments in every of 3 a little part of the border and the rest. Based on what can I know the size of the small segment? And the most iportant thing, How can I give them a value? In the fight.def the mugen is used p1.range.x and p2.range.x, but the part that I think I need to modify in the common1 file, it's this?
Spoiler, click to toggle visibilty
;---
;sys::lifebar_d_mod-life_bar ; ƒ‰ƒCƒt•Ï—ʃo[
[state 0]
type=removeexplod
trigger1=!numexplod(490000) ;;<- no-life-bars
trigger2=!(var(9)&131072) ;;<-opt-mod-life
id=490203
[state 0]
type=explod
trigger1=var(41)>playerid(var(15)),life && var(41)>1
trigger1=numexplod(490000) && !numexplod(490203)
id=490203
anim=f200020
sprpriority=var(46)
ownpal=1
space=screen
postype=left
facing=ifelse(teamside=1,1,-1)
pos=var(14):=var(31)+ceil(var(41)*100/(playerid(var(15)),lifemax)*fvar(0))*ifelse(teamside=1,-1,1), var(32)
scale=var(41)*0.25/(playerid(var(15)),lifemax), 0.25
bindtime=-1
removetime=-1
ignorehitpause=1
supermovetime=-1
pausemovetime=-1
trans=addalpha
alpha=128,128
[state 0]
type=explod
trigger1=numexplod(490000) && numexplod(490203)=1
id=490203
anim=f200010
sprpriority=var(46)
ownpal=1
space=screen
postype=left
facing=ifelse(teamside=1,1,-1)
pos=var(14),var(32)
scale=0.25,0.25
bindtime=-1
removetime=-1
ignorehitpause=1
supermovetime=-1
pausemovetime=-1
trans=addalpha
alpha=128,128
;---
;sys::lifebar_d_damage_bar ; ƒ_ƒ[ƒWƒo[
[state 0]
type=removeexplod
trigger1=!numexplod(490000) ;;<- no-life-bars
trigger2=var(40)!=(playerid(var(15)),life)
trigger3=var(42)!=(playerid(var(15)),life) && !(var(9)&16) ;;<-not_get_damage
id=490201
[state 0]
type=explod
trigger1=var(42)>playerid(var(15)),life
trigger1=numexplod(490000) && !numexplod(490201) && !numexplod(490203)
id=490201
anim=f200060+ifelse((var(9)&16),0,1)
sprpriority=var(46)-1
ownpal=1
space=screen
postype=left
facing=ifelse(teamside=1,1,-1)
pos=var(14):=var(31)+ceil(var(42)*100/(playerid(var(15)),lifemax)*fvar(0))*ifelse(teamside=1,-1,1), var(32)
scale=var(42)*0.25/(playerid(var(15)),lifemax), 0.25
bindtime=-1
removetime=-1-ifelse((var(9)&16),0,1)
ignorehitpause=1
supermovetime=-1
pausemovetime=-1
[state 0]
type=explod
trigger1=numexplod(490000) && numexplod(490201)=1
id=490201
anim=f200050+ifelse((var(9)&16),0,1)
sprpriority=var(46)-1
ownpal=1
space=screen
postype=left
facing=ifelse(teamside=1,1,-1)
pos=var(14),var(32)
scale=0.25,0.25
bindtime=-1
removetime=-1-ifelse((var(9)&16),0,1)
ignorehitpause=1
supermovetime=-1
pausemovetime=-1
;---
;sys::lifebar_d_life_bar ; ƒ‰ƒCƒtƒo[
[state 0]
type=explod
trigger1=numexplod(490000) && !numexplod(490200)
id=490200
anim=f200020
sprpriority=var(46)+1
ownpal=1
space=screen
postype=left
facing=ifelse(teamside=1,1,-1)
scale=0.25,0.25
bindtime=-1
removetime=-1
ignorehitpause=1
supermovetime=-1
pausemovetime=-1
[state 0]
type=explod
trigger1=numexplod(490000) && !numexplod(490210)
id=490210
anim=f200010
sprpriority=var(46)+1
ownpal=1
space=screen
postype=left
facing=ifelse(teamside=1,1,-1)
scale=0.25,0.25
bindtime=-1
removetime=-1
ignorehitpause=1
supermovetime=-1
pausemovetime=-1
;---
;sys::lifebar_d_life_bar_color2 ; ƒ‰ƒCƒtƒo[ - F‚Q
[state 0]
type=explod
trigger1=numexplod(490000) && !numexplod(490205)
id=490205
anim=f200040
sprpriority=var(46)+2
ownpal=1
space=screen
postype=left
facing=ifelse(teamside=1,1,-1)
scale=0.25,0.25
bindtime=-1
removetime=-1
ignorehitpause=1
supermovetime=-1
pausemovetime=-1
[state 0]
type=explod
trigger1=numexplod(490000) && !numexplod(490215)
id=490215
anim=f200030
sprpriority=var(46)+2
ownpal=1
space=screen
postype=left
facing=ifelse(teamside=1,1,-1)
scale=0.25,0.25
bindtime=-1
removetime=-1
ignorehitpause=1
supermovetime=-1
pausemovetime=-1
;---
;sys::lifebar_d_life_changed ; ƒ‰ƒCƒt•Ï‰»
[state 0]
type=modifyexplod
trigger1=(var(8)&1)
id=490200
postype=left
facing=ifelse(teamside=1,1,-1)
pos=var(14):=var(31)+floor(var(43)*100/(playerid(var(15)),lifemax)*fvar(0))*ifelse(teamside=1,-1,1), var(32)
scale=var(43)/4.0/(playerid(var(15)),lifemax), 0.25 *(var(43)>1)
[state 0]
type=modifyexplod
trigger1=(var(8)&1)
id=490210
postype=left
facing=ifelse(teamside=1,1,-1)
pos=var(14),var(32)
scale=0.25, 0.25 *(var(43)>1)
;sys::lifebar_d_life_changed_color2
[state 0]
type=modifyexplod
trigger1=(var(8)&1)
id=490205
postype=left
facing=ifelse(teamside=1,1,-1)
pos=var(31)+floor(var(43)*100/(playerid(var(15)),lifemax)*fvar(0))*ifelse(teamside=1,-1,1), var(32)
scale=var(43)*0.25/(playerid(var(15)),lifemax), 0.25 *(var(43)>1)
trans=addalpha
;;old; alpha=256-( var(14):=var(43)*256/(playerid(var(15)),lifemax) ), var(14)
alpha=256-( var(14):=ifelse(var(43)>(playerid(var(15)),lifemax)*7/8, 256, var(43)*8/7*256/(playerid(var(15)),lifemax)) ), var(14)
[state 0]
type=modifyexplod
trigger1=(var(8)&1)
id=490215
postype=left
facing=ifelse(teamside=1,1,-1)
pos=var(31)+floor(var(43)*100/(playerid(var(15)),lifemax)*fvar(0))*ifelse(teamside=1,-1,1), var(32)
scale=0.25, 0.25 *(var(43)>1)
trans=addalpha
alpha=256-var(14),var(14)
;sys::lifebar_d_life_changed_color2_warnning
[state 0]
type=modifyexplod
trigger1=(var(8)&1) && (var(9)&8192)>0 ;; 1/3 life
id=490205
trans=addalpha
alpha=256-( var(14):=abs((gametime%33)-16)*16 ), var(14)
[state 0]
type=modifyexplod
trigger1=(var(8)&1) && (var(9)&8192)>0 ;; 1/3 life
id=490215
trans=addalpha
alpha=256-var(14),var(14)
;---
;sys::lifebar_d_life_no_damage ; ƒ‰ƒCƒtƒo[ ƒ_ƒ[ƒW‚È‚µ
[state 0]
type=removeexplod
trigger1=!numexplod(490000) || var(43)<(playerid(var(15)),lifemax)
id=490206
[state 0]
type=explod
trigger1=var(43)>=(playerid(var(15)),lifemax)
trigger1=numexplod(490000) && !numexplod(490206)
id=490206
anim=f200000
sprpriority=var(46)+2
ownpal=1
space=screen
postype=left
facing=ifelse(teamside=1,1,-1)
pos=var(31)+floor(100*fvar(0))*ifelse(teamside=1,-1,1), var(32)
scale=0.25,0.25
bindtime=-1
removetime=-1
ignorehitpause=1
supermovetime=-1
pausemovetime=-1
;---
This is the life bars that I wanna add:
Spoiler, click to toggle visibilty
(https://i.imgur.com/d3PFgV0.png)
(https://i.imgur.com/NucLJiM.png)
(https://i.imgur.com/JM8LMFs.png)
Let's see if you can help me to move forward with the project, I would really appreciate it. Thank you very much.
-
I don't have much time to respond, so I'll try to later, but
trigger1=1|| var(31):=floor(ifelse(teamside=1,-18,18)*fvar(0)+var(3)*0.5) ;;<- LifeBar_Pos_X ;(XÀ•W)
(teamside=1,-18,18)
The 18 values are the pixels. More than likely.
-
I don't have much time to respond, so I'll try to later, but
trigger1=1|| var(31):=floor(ifelse(teamside=1,-18,18)*fvar(0)+var(3)*0.5) ;;<- LifeBar_Pos_X ;(XÀ•W)
(teamside=1,-18,18)
The 18 values are the pixels. More than likely.
Thanks for the response but I modify this values in the past and effective you modify the position of the lifebar but I can't move 1pixel to the left player's 2 lifebar. I try later another time.
-
I've seen a similar problem before with parallax scrolling and stages. You might want to dig around how the fix for the stage is worked out. Your solution may be very similar.
I guess it's because of the scaling.
You may be able to rework the math.
instead of
trigger1=1|| var(31):=floor(ifelse(teamside=1,-18,18)*fvar(0)+var(3)*0.5) ;;<- LifeBar_Pos_X ;(XÀ•W)
maybe
trigger1=1|| var(31):=floor(ifelse(teamside=1,(-18*fvar(0)+var(3)*0.5)),(18*fvar(0)+var(3)*0.5))) ;;<- LifeBar_Pos_X ;(XÀ•W)
You'd be able to modify the *0.5 of the side you need to get that half pixel?
Is the life bar jumping 2 pixels? 3 pixels?
-
Oh! Thank you very much!!! I try with this code later. About the pixels it's only 1 pixel misaligned. I need to displace it to the left.
EDIT:
I try the code and doesn't work... mugen crashes with a error related with the code.
-
I know it's misaligned 1 pixel. You said you've moved it. When you move it, does it move by 2 pixels, or 3 pixels, or more, at one time?
trigger1=1|| var(31):=floor(ifelse(teamside=1,(-18*fvar(0)+var(3)*0.5),(18*fvar(0)+var(3)*0.5))) ;;<- LifeBar_Pos_X ;(XÀ•W)
Try this. I think it's to do with the brackets. I think I put 1 too many on accident.
-
Thank you again but this time nothing happens, the code work but lifebar it's in the same place.
I try to modify the code in the part that you see, for example I change (teamside=1,-18,18) for (teamside=1,-18,17) then player 2 lifebar move 4 pixels to the left. I try with decimals but doesn't work. Thank you very much for worrying and to see if you find the solution.
-
The fact that it's the same means it's working properly with the original values. So that's good news.
Maybe....
trigger1=1|| var(31):=floor(ifelse(teamside=1,(-18*fvar(0)+var(3)*0.5),(18*fvar(0)+var(3)*0.5)-1)) ;;<- LifeBar_Pos_X ;(XÀ•W)
It's that last bit of code you want to edit. I'd think to do the total minus the value you need, OR you might have to edit the 0.5.
(18*fvar(0)+var(3)*0.5)-1)
This chunk of code is what you can edit and get it to move around.
I think if you remove the Floor( ) it will crash. And I think the system is up-scaling everything 4x pixels. Have you tried to find info on the stages?
-
Thank you very much again! But the code that you send me move player 2 lifebar 4 pixels to the left, I try to modify the code in the scale and other things but not move 1 f... pixel. For now I mount the anim in the fight.def and .sff files but I don't have some actions to mount all the animations and some of them works in the same layer...
Spoiler, click to toggle visibilty
(https://i.imgur.com/F7j1HDW.png)
(https://i.imgur.com/MLk5aIE.png)
(https://i.imgur.com/Fk4cLiq.png)
(https://i.imgur.com/yknFH8E.png)
This is the last Hud of blazblue so I would like to do it as well as possible. Can I send you the files whith the lifebars and have a look? Maybe the solution it' s not in the code.
-
Hello to everyone, well after much testing, look at files and patience finally I can add lifebar in the fightfx file of add004! Now I use more than 50 actions to reproduce the fade in of the lifebar, it' s really beautifull now! I include portraits and names and you can fade in them too.
(https://i.imgur.com/JkADtly.png)
(https://i.imgur.com/XoUSzbJ.png)
(https://i.imgur.com/OLSFe82.png)
(https://i.imgur.com/QqFsXfu.png)
(https://i.imgur.com/YgURi4S.png)
(https://i.imgur.com/f5X81E9.png)
(https://i.imgur.com/GXMdbCV.png)
Ok! All looks really good, but... no... like always I have some little problems to run it perfectly. I have already reached my limit of possibilities, I hope now if you help me to finish it please. Let' s start:
1- Portraits
This is the most important thing to correct. I take Kung Fu Man like a testing character. If you see the captures the portraits appears with a blend on top of the lifebar and with the names in the correct way.
Spoiler, click to toggle visibilty
(https://i.imgur.com/aVSDenx.png)
(https://i.imgur.com/PkPL5NY.png)
Playing with Kirito by Sennou-Room portraits are in the good place but they are below the lifebar and names are not good.
Spoiler, click to toggle visibilty
(https://i.imgur.com/cW3dI6W.png)
And with Cody by Trololo portraits are completely misaligned, below lifebar and names are not good too.
Spoiler, click to toggle visibilty
(https://i.imgur.com/O1ZcvyK.png)
I use the same code for everyone, then... what's happen? To correct the 1pixel misaligned bug that have at the start I modify a little the code of the common1.cns deleting the facing=ifelse(teamside=1,1,-1) line and I create this template with 2 portraits with the names and the add. I delete too the removeexplod at the end because the portraits desappear at the end of the round.
(https://i.imgur.com/nwrwief.png)
This is the code that I have in the common1.cns:
Spoiler, click to toggle visibilty
;;>>@Config.Face>>
;sys::-2::face_d ; portrait (Šç)
[state 0]
type=explod
trigger1=!ishelper && alive && !numexplod(490600) && selfanimexist(909002)
trigger1=sysfvar(0)>id && playeridexist(floor(sysfvar(0)))
trigger1=playerid(floor(sysfvar(0))),var(0)=90900 && playerid(floor(sysfvar(0))),numexplod(490600)
trigger1=movetype!=h || (stateno=[120,159]) || (stateno=[5000,5199]) || (stateno=[190190,190196])
id=490600
anim=909002
space=screen
postype=left
ownpal=1
bindtime=-1
removetime=-1
scale=playerid(floor(sysfvar(0))),fvar(32-(id=playerid(floor(sysfvar(0))),var(15))*10), playerid(floor(sysfvar(0))),fvar(33-(id=playerid(floor(sysfvar(0))),var(15))*10)
pos=floor(const240p(playerid(floor(sysfvar(0))),fvar(30-(id=playerid(floor(sysfvar(0))),var(15))*10))), floor(const240p(playerid(floor(sysfvar(0))),fvar(31-(id=playerid(floor(sysfvar(0))),var(15))*10)))
sprpriority=var(46)-10
ignorehitpause=1
supermovetime=-1
pausemovetime=-1
And this is the coords and anims that I include at the end of the .air file:
Spoiler, click to toggle visibilty
;---------
; as characters face / portrait ; ??????????
[begin action 909002]
-1,-1,0,0,110
9000,6,-80,-13,40,, AS0D256,.125,.125
Interpolate Blend
9000,6,-80,-13,-1,, AS256D0,.125,.125
;---
[begin action 909601] ;; empty
0,-1,0,0,1
[begin action 909602]
clsn1: 1
clsn1[0]=-20,-20,20,20
0,-1,0,0,1
[begin action 909603]
clsn2: 1
clsn2[0]=-30,-30,30,30
0,-1,0,0,1
;---------
2-Time:
Time it' s coded by default in fight.def archive but with this appears below lifebar and with layerno=1 looks bad... For this reason I create a counter animation that work in it' s correct place. The problem it' s when you finish the round. In all fighting games, time stops at the second when the fight is over. But as I have used an animation it is continuous.
It would be possible to create a state or trigger ( I may be saying nonsense but that is what I understood ) for this actions to stop at the end of the round? This is the code that I use for them:
Spoiler, click to toggle visibilty
;sys::img_d_Time 01
[state 0]
type=explod
trigger1=!var(20) && var(1)=1 && !numexplod(1)
anim=f199171
id=199171
space=screen
postype=left
sprpriority=var(46)-12
ownpal=1
bindtime=-1
pos=var(11),var(12)
scale=0.5,0.5
ontop=0
removetime=-1
3-This is my last problem and it' s because before starting the round, the images in the fight.sff file are displayed on the screen for a very short time
Spoiler, click to toggle visibilty
(https://i.imgur.com/KnSiUC1.png)
I use the flags nobardisplay and invisible but not affect in this part. Where should I add them? I have added them in these two parts:
Spoiler, click to toggle visibilty
;==========================
; starter [helper for init]
; ‰Šú‰»—p
;==========================
[statedef 90909]
type=s
movetype=i
physics=n
anim=909601 ;; empty
velset=0,0
ctrl=0
;---
[state 0]
type=assertspecial
trigger1=1
flag=timerfreeze
flag2=nobardisplay
flag3=invisible
ignorehitpause=1
;==========================
;;>>@Config.Round_Fight>>
; "round 1 fight!" (round-call) [helper]
; ƒ‰ƒEƒ“ƒhŠJŽn
;==========================
[statedef 180000]
type=s
movetype=i
physics=n
anim=909601 ;; empty
velset=0,0
ctrl=0
;---
[state 0]
type=assertspecial
trigger1=1
flag=timerfreeze
flag2=nobardisplay
flag3=invisible
ignorehitpause=1
;---
Okay, this is all. I hope that together you can solve these doubts to be able to have the lifebars finished. Thank you very much!
-
For the 3rd problem I found a code created by shammahomega that removes all fight elements at the intro and end of the round. I remove the part of the end and copy at Statedef -2 in the common1.cns:
[State -2, AssertSpecial]
type = AssertSpecial
trigger1 = RoundState = [0,1]
flag = nobardisplay
I test it with Kfm and works perfect but with other chars doesn't work... What has different kfm so that everything works well with him? Waiting some answers please.
EDIT:
I have the 3rd problem resolved. The problem it' s because kfm no have files in it' s statedef-2 then mugen takes codes from common1.cns with the changes that I apply. In other chars Add004pie copy the code without modification from it' s files. Then you need to add the same code at the end of the files that copy and works good!
The problem with the portraits it' s something like that. Rewriting the existing files in the statedef-2 with the edited ones I can work portraits on top of the lifebar and now Kirito it' s in his position but Cody no... Maybe you need to add individually coordinates for each char? I hope it can be fixed in another way... Well there is less! I have a great time !!! Waiting some help...
Spoiler, click to toggle visibilty
(https://i.imgur.com/wAP6Hpu.png)
(https://i.imgur.com/o5JNREW.png)
(https://i.imgur.com/VuWpKOZ.png)