Users browsing this thread: 1 Guest(s)
HP Script (Zeemis)

#21
Posts: 13
Threads: 6
Thanks Received: 0
Thanks Given: 0
Joined: Aug 2011
Reputation: 0
Status
None
for the HP loop do i put the command at the beginning of the entire thing or before end of first wave and end.
Quote  

#22
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(01-01-2012, 02:40 AM)MugenHeadNinja Wrote: for the HP loop do i put the command at the beginning of the entire thing or before end of first wave and end.

You must put the whole thing right after the "End of the first wave of attack". That script must be place before the others counterattacks conditions if you have some. If your monster has no counterattacks, that means at the end of the script. Don't forget a FF at the very end to end the script.
  Find
Quote  

#23
Posts: 259
Threads: 3
Thanks Received: 5
Thanks Given: 1
Joined: Jun 2013
Reputation: 6
Status
None
I don't understand why you use the "if monster is in slot..." conditional for this purpose. It seems unnecessary.

This is the variation that I used for Brave New World:

Quote:FC 06 36 50 ; If target self has less or equal than 10240 HP
F5 00 00 01 ; Monsters #1 , if hidden/dead, brought in with their HP restored, suddently
F9 00 00 00 ; VAR000 toggle bit: 0
F8 01 81 __ ; 1 added to VAR001
FC 0D 01 02 ; If variable VAR001 is greater than or equal to 2
FB 0B 07 __ ; Monster gains hidden status: Death
F5 0C 01 FF ; Monsters #1, #2, #3, #4, #5, #6 are killed, dies like a boss
FE __ __ __ ; End If and reset targeting

I use the HP conditional rather than checking for death as a safeguard, since bosses are vulnerable to seizure in our mod and seizure/poison damage will not check the reactive portion of the battle script. Further, it does not appear that desperation attacks (which show up more commonly in my mod) do, either.

Toggling bit 0 on VAR000 is optional, as it simply allows the boss's opening attack to be used again. To the astute player, this will signal the beginning of a new round (as several of my bosses change scripts on subsequent "lives"). Otherwise, it's just an opportunity to add a bit of variety with an uncommon attack.

Further, the forced setting of the "death" status is optional. This is done because enemies force-killed through the "dies like a boss" opcode will not leave GP, experience, or items. As with the original game, none of my bosses leave gold or experience to avoid headaches in this department. However, several of my bosses drop items, thus necessitating this.

The nested conditional wherein it checks to see if the boss is out of lives functions a bit oddly. First, it sees VAR001 as it was before the attack occurred (in other words, it doesn't notice the 1 that's added to VAR001 just before the check occurs), so the boss in this script actually has a total of *three* lives. It took me awhile to wrap my head around that one.

Secondly, I learned (the hard way, of course) that a single FE will *not* close out multiple conditionals. What this means is that every time this conditional is checked, it will keep going past that FE and through the rest of the reactive portion of the script. In this particular case, it's desired behavior, as I'd rather not a boss's normal reactive behavior be interrupted by its HP reaching a certain threshold (even though I initially coded it like this to save space). However, I actively avoid using nested conditionals anywhere else in my scripts.
Quote  

#24
Posts: 33
Threads: 13
Thanks Received: 2
Thanks Given: 0
Joined: Jun 2009
Reputation: 6
Status
Vanish
BTB Wrote:I don't understand why you use the "if monster is in slot..." conditional for this purpose. It seems unnecessary.


The command (FC,19,01,00) "If the monster is in slot 1" seems unnecessary in the script. However, it's purpose was simply to prevent bugs from surfacing. There are times when the game responds just as expected and there are times when it does whatever it wants completely skipping over a set of bytes or an entire sequence. I haven't figured out the reason for this yet. I'm not sure if the Rom gets bugged when things are moved, or if curtain formations are the culprit. I do know that if you don't specify what the script should check, sometimes bugs will surface.

When I create a script, usually I prioritize what sequences are the most critical. The game seems to run fluent and efficiently once it knows which ones are the most important. For Example:

FC,0D,01,13, - If variable VAR001 is greater than or equal to 20
FC,12,00,00, - If following monster is/are dead:
F5,0C,01,FF, - Monsters #1, #2, #3, #4, #5, #6 are killed, dies like a boss
FE, - End If and reset targeting
FC,19,01,00, - If monster is in slot: #1
FC,12,00,00, - If following monster is/are dead:
F5,00,00,01, - Monsters #1 , if hidden/dead, brought in with their HP restored, suddenly
F8,01,81, - 1 added to VAR001
FE, - End If and reset targeting

This HP/Loop belongs to my Emperor Dragon. Even after death, you still receive the Exp and Items. I'm not certain why everyone else is having problems with their Loop. However, you can play test this in your custom designs and see if you receive your items.

This loop must be placed after (FF,) "End first wave of attack", and before (FC,05,00,00) "If monster has been attacked". Priority is placed in the monster dying like a boss and the (FC,19,01,00,) command is specified here for preventing bugs.

Contact me if your having problems.
Quote  

#25
Posts: 259
Threads: 3
Thanks Received: 5
Thanks Given: 1
Joined: Jun 2013
Reputation: 6
Status
None
The problem is that seizure is universally effective in our mod, so we had to account for preventing death by seizure (which is why I use HP conditionals rather than death conditionals).
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite