STEAM GROUP
Final Fantasy - Modding FF-Modding
STEAM GROUP
Final Fantasy - Modding FF-Modding
267
IN-GAME
2,151
ONLINE
Founded
26 July, 2015
Language
English
Location
United States 
Showing 51-60 of 85 entries
32
Hades Workshop
Congrats ;)

It is not possible to directly increase the max HP more than 65535, but you can use a trick to bypass the problem. You have to edit the AI script for that. I copy-paste the detailed answer I made when the question was asked for Kuja. The same remarks about Curaga and his counter attacks hold for Ozma.

For AI script, the functions are usually the followings.
- A single main function that usually only inits the enemies with a InitObject call.
- For each enemies, a set of function that can be made of :
-- Init : usually defines which regular attacks the enemy will use and their mana cost (set the caret on the numbers and look at the fields "Attack List" and "4-tuple" on the left).
-- ATB : what the enemy does when its ATB is full.
-- Loop : a function that check the enemy's state each frame and may respond to it accordingly. It always ends with the lines "Wait(1)" and "loop". That's the one you're looking for. (optional but frequent)
-- Counter : what the enemy does when it has been hitted (optional)
-- CounterEx : what the enemy does when it casts a spell on himself or anytime the "counter" doesn't trigger for some reason (optional)
-- Death : what happens when the enemy dies (optional)

For most bosses, you may have noticed that they display 10 000 more HP than they should. Trance Kuja's HP is 55535 in-game, not 65535. That's because the looping function is scripted so when Kuja goes under 10 000 HP, he speaks, cast Ultima and ends the fight.
That's this part of the code specifically :
if ( #( SV_FunctionEnemy[HP] <$ 10000 ) ) { // Wait until Kuja no longer attacks while ( IsAttacking != 0 ) { Wait( 1 ) } // Dunno... Maybe a check of "The battle has started" if ( GetData_30 != 4 ) { return } // Freeze the ATB and hide it. RunBattleCode( 32, 0 ) while ( GetData_30 != 1 ) { Wait( 1 ) } // Cast Ultima (the speech is included in it) set #( SV_Target = SV_PlayerTeam ) AttackSpecial( 5 ) while ( !( VAR_B5_199 & 16 ) ) { Wait( 1 ) } RunBattleCode( 40, 1 ) set VAR_B5_199 &= 65519 Wait( 1 ) while ( !( VAR_B5_199 & 16 ) ) { Wait( 1 ) } // Fade filter and ends the fight FadeFilter( 0, 1, 0, 255, 255, 255 ) set VAR_B5_199 &= 65519 while ( IsAttacking != 0 ) { Wait( 1 ) } set SV_FunctionEnemy[DEFEATED_ON] =$ 1 RunBattleCode( 33, 5 ) return }

So, you see, to check if an enemy's HP is under 10 000, that's the line "#( SV_FunctionEnemy[HP] <$ 10000 )".
Using simply "SV_FunctionEnemy[HP] <$ 10000" should also work. The purpose of the # operator and $ operator modifier is to handle multiple characters at once.
For instance, the expression "#( SV_PlayerTeam[HP] ==$ 1 )" will return true if there is at least 1 character in the team whose HP is 1.
However, "SV_PlayerTeam[HP] == 1" won't work. It will return true only if the 1st character's HP is 1 and all the others' are 0.

More precisely, suppose you have 4 characters in the team and their HP are 100, 113, 210 and 95.
"SV_PlayerTeam[HP]" returns a list : [100, 113, 210, 95]
"SV_PlayerTeam[HP] >=$ 100" also returns a list : [1, 1, 1, 0]
"#( SV_PlayerTeam[HP] >=$ 100 )" returns the amount of bits on : 3

So, how do you increase the HP limit? By doing exactly what you suggested ! You take a variable ("VAR_B7_60" is fine for that purpose and completly unused), increment it and heal each time Kuja goes under 10 000 and launch the end of the battle only once it reaches a certain amount.
You also need to set the local variable counter to more than 61 in order to use "VAR_B7_60". That means you must replace the "allocate [NB]" by "allocate 61" in the local variable panel.

To heal, use this line :
set SV_FunctionEnemy[HP] =$ FirstOf(SV_FunctionEnemy[MAX_HP])
"FirstOf" converts a list [value1, value2, value3, value4] into value1.
You can also use :
set SV_FunctionEnemy[HP] =$ 65535

You may want to init VAR_B7_60 to 0 in the enemy's initialization function but it's always initialized to 0 by default.

The resultant code should look something like this :
Function func_Trance_Kuja_Loop if ( !VAR_B7_0 ) { set VAR_B7_0 = 1 while ( !( GetData_40 & 8 ) ) { Wait( 1 ) set VAR_B5_206 = GetRandom } set SV_FunctionEnemy[54] =$ 0 while ( GetData_30 != 1 ) { Wait( 1 ) set VAR_B5_206 = GetRandom } RunBattleCode( 35, 0 ) while ( GetData_30 != 4 ) { Wait( 1 ) } } if ( #( SV_FunctionEnemy[HP] <$ 10000 ) ) { if ( VAR_B7_60 < 5 ) { set VAR_B7_60++ set SV_FunctionEnemy[HP] =$ FirstOf(SV_FunctionEnemy[MAX_HP]) } else { while ( IsAttacking != 0 ) { Wait( 1 ) } if ( GetData_30 != 4 ) { return } RunBattleCode( 32, 0 ) while ( GetData_30 != 1 ) { Wait( 1 ) } set #( SV_Target = SV_PlayerTeam ) AttackSpecial( 5 ) while ( !( VAR_B5_199 & 16 ) ) { Wait( 1 ) } RunBattleCode( 40, 1 ) set VAR_B5_199 &= 65519 Wait( 1 ) while ( !( VAR_B5_199 & 16 ) ) { Wait( 1 ) } FadeFilter( 0, 1, 0, 255, 255, 255 ) set VAR_B5_199 &= 65519 while ( IsAttacking != 0 ) { Wait( 1 ) } set SV_FunctionEnemy[DEFEATED_ON] =$ 1 RunBattleCode( 33, 5 ) return } } Wait( 1 ) loop

Note that Kuja's counter-attacks are based on his current HP. You may want to change that also. And you may also want not to heal Kuja completly (let's say bring his HP to 55535 instead of 65535) so his Curaga still heals him.
Hope you'll be more at ease after that ^^

Note that if you import the file "LocalVariableSettings_v1.hws" (using Open Mod), the variables of AI scripts will be given names fitting their purpose, so it'll be a bit easier to understand the script.


However, there may be bugs in-game when Grand Lethal hits twice.
EDIT : Nevermind, the bugs are not triggering anymore in the Steam version. That's a good news ^^
867
1
Memoria - Engine modifications
Showing 51-60 of 85 entries