Users browsing this thread: 1 Guest(s)
Ice Dragon Script

#1
Posts: 33
Threads: 13
Thanks Received: 2
Thanks Given: 0
Joined: Jun 2009
Reputation: 6
Status
Vanish
Script: Ice Dragon (Dragon's Den)
Length: 163 bytes
AI Level: Advance
By: Lord Envoy
Description:
This is the script from the Ice Dragon in FF6A Dragon's Den. At the beginning of battle, the AI is set to summon three exact copies of the same dragon. The attacks of each dragon changes depending on the amount of monsters remaining on the battlefield. When more dragons remain in battle, the lighter the attacks. The lesser amount of dragons remain in battle, the heftier the attacks. When there are only two remaining, it's counterattacks now include it's Special Attack.

Announcement:
Finally! A condensed Ice Dragon FF6A script for those of you who have used the older versions. The older script posted here was the script of the Ice Dragon. However, the battle was actually 2 separate monsters with 2 differing scripts. The first script, is the script of the Ice Dragon itself and the second, is the Ice Dragon's mirrors. This thread has been updated to give the same effect but with only one script. Thus users can use the extra space for other monsters.

------------------------------------------------------------ Update ------------------------------------------------------------------------------


Script: Ice Dragon from Dragon's Den
Bytes: 163

FC 15 24 00    ; If VAR036 has all the following bit cleared: 0
FC 19 04 00    ; If monster is in slot: #3
F3 3F 00         ; Text: " images!<D> "
F5 03 02 F8    ; Monsters #4, #5, #6 , if hidden, brought in without affecting their HP, from side, indiv.
F9 01 24 00    ; VAR036 set bit: 0
FE                   ; End If and reset targeting
FC 13 01 01    ; If 1 monster(s) or less remain
F1 47              ; Targeting: use normal targeting
F0 EF C5 C5    ; Rand. spell: Special or N. Cross or N. Cross
FD                   ; Wait until the attack sequence is called upon again, then continue (reset targeting)
F1 47              ; Targeting: use normal targeting
F0 EF BB BB    ; Rand. spell: Special or Absolute 0 or Absolute 0
FD                   ; Wait until the attack sequence is called upon again, then continue (reset targeting)
F1 47              ; Targeting: use normal targeting
F0 EF 74 74    ; Rand. spell: Special or Avalanche or Avalanche
FE                   ; End If and reset targeting
FC 13 01 02    ; If 2 monster(s) or less remain
F1 47              ; Targeting: use normal targeting
F0 EE 54 54    ; Rand. spell: Battle or Snowstorm or Snowstorm
FD                   ; Wait until the attack sequence is called upon again, then continue (reset targeting)
F1 47              ; Targeting: use normal targeting
F0 EF 0A 0A    ; Rand. spell: Special or <MB>Ice 3 or <MB>Ice 3
FD                   ; Wait until the attack sequence is called upon again, then continue (reset targeting)
F1 47              ; Targeting: use normal targeting
F0 EF EF CF     ; Rand. spell: Special or Special or Cold Dust
FE                   ; End If and reset targeting
FC 13 01 03    ; If 3 monster(s) or less remain
F1 47              ; Targeting: use normal targeting
F0 EE 54 FE    ; Rand. spell: Battle or Snowstorm or Nothing
FD                  ; Wait until the attack sequence is called upon again, then continue (reset targeting)
F1 47             ; Targeting: use normal targeting
F0 0A EF FE    ; Rand. spell: <MB>Ice 3 or Special or Nothing
FD                  ; Wait until the attack sequence is called upon again, then continue (reset targeting)
F1 47             ; Targeting: use normal targeting
F0 EF CF FE    ; Rand. spell: Special or Cold Dust or Nothing
FE                  ; End If and reset targeting
F0 EE EE FE    ; Rand. spell: Battle or Battle or Nothing
FD                  ; Wait until the attack sequence is called upon again, then continue (reset targeting)
F0 EE EF FE    ; Rand. spell: Battle or Special or Nothing
FD                  ; Wait until the attack sequence is called upon again, then continue (reset targeting)
F0 EE 0A FE    ; Rand. spell: Battle or <MB>Ice 3 or Nothing
FF                   ; End first wave of attack
FC 0D 03 03    ; If variable VAR003 is greater than or equal to 3
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
F8 03 00         ; Set VAR003 to 0
FE                   ; End If and reset targeting
FC 12 00 00    ; If following monster is/are dead: 
F1 47              ; Targeting: use normal targeting
F0 BB C5 74    ; Rand. spell: Absolute 0 or N. Cross or Avalanche
F8 03 81         ; 1 added to VAR003
FE                   ; End If and reset targeting
FC 13 01 02    ; If 2 monster(s) or less remain
FC 05 00 00    ; If monster has been attacked
F0 EE EF FE    ; Rand. spell: Battle or Special or Nothing
FE                   ; End If and reset targeting
FC 05 00 00    ; If monster has been attacked
F0 EE EE FE    ; Rand. spell: Battle or Battle or Nothing
FE                   ; End If and reset targeting
FF                   ; End


------------------------------------------------------------ End of Update ----------------------------------------------------------------


Battling Ice Dragon:
It has about 32,000 HP and a script about 144 bytes long. I designed it just for the purpose of other players to challenge it. Especially if they don't have the FF6A game. In the Dragons' Den, the Ice Dragon returns as a boss, but like the other seven dragons, the battle is made more difficult with special conditions. Rather than fighting just one, the Ice Dragon employs the same battle tactic as the Vector Lythos in Kefka's Tower, in that it is acompanied by three other exact copies. All four Ice Dragons have the same stats and attacks. If the player attempts to strike them all with a spell however, the character casting the spell will be struck by three consecutive physical attacks. The Ice Dragons can all use Ice 3, Cold Dust, Snowstorm, Avalanche, and Freeze, just to name a few. The Ice Dragons should be attacked one at a time so as not to make them counter. However, if Vanish is cast on the party, then their physicals will miss when multi-hitting spells are used. Besides this, the same strategy that applies to the encounter in the Snowfields should be employed here.
Quote  

#2
Posts: 1,261
Threads: 250
Thanks Received: 11
Thanks Given: 7
Joined: Jun 2009
Status
Traitor
I believe variable 36 needs to be changed to variable 000. I personally haven't tested this, but a user from RomHacking.net's IRC was testing some of these boss scripts and mentioned that it needed changing.
Quote:[14:13]dn: the issue is that the variable he used made the message appear multiple times, since the ice dragon brings in 3 clones
  Find
Quote  

#3
Posts: 3,970
Threads: 279
Thanks Received: 236
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
This block is only executed at the beginning:

Code:
If (VAR036.bit0 equals 0){
    VAR036.bit0 equals 1
    Text: "Ice Dragon creates 3 mirror images! "
    Monsters #3, #4, #5, #6 , if hidden, brought in without affecting their HP, from side, indiv.
}

Whatever variable you use if bit0 of that variable equals 0 you execute once the three commands the first on being setting the bit to 1 so there is no way it can come back in that part of the script. If by any chance the bit was initially set to 1 you would have no dragon image. Bit 0 of var036 is not set or use anywhere else so I don't see how it's possible that you see multiple times the message. Bit 0 of Var036 needs to be automatically reset to 0 by some unknown way to make that happens.. Maybe it is use for something else other than in the script...
  Find
Quote  

#4
Posts: 76
Threads: 20
Thanks Received: 2
Thanks Given: 4
Joined: Apr 2012
Reputation: 0
Status
None
Zeemis is right, the clones of the Ice Dragon does make the message appear multiple times. Each clones tries to bring more dragons, but cannot since they are already present. The variable doesn't matter, I've change variable 036 to 000 and the same thing continues to occur. Does anyone know how to fix this? I've spend around 25 minute trying different things and looking at other monster scripts but can't come up with anything.

The only thing that is different from the script posted here compare to mine is the way the dragon appears on screen (from the "water" instead from the side) and uses a different quote pointer, but I doubt that would be what causes the message to repeat itself.

Add: After some more testing and looking at other scripts and formations, the only thing that I came up with that made sense for why it doesn't work is that this script needs to have an event associated with the formation that contains this monster and this script. Like the Waterfall battle with those fish monsters.

There's also a major error, when one of the Ice Dragons dies with the script above, all of them dies. It doesn't matter which one is killed, they all die. Contrary to the Advance version, you had to kill them "one" by "one", and only the last one died like a boss. All other Ice Dragons, except the last one, should die like normal monster.
  Find
Quote  

#5
Posts: 33
Threads: 13
Thanks Received: 2
Thanks Given: 0
Joined: Jun 2009
Reputation: 6
Status
Vanish
(06-19-2013, 07:54 PM)Fenrir Wrote: There's also a major error, when one of the Ice Dragons dies with the script above, all of them dies. It doesn't matter which one is killed, they all die. Contrary to the Advance version, you had to kill them "one" by "one", and only the last one died like a boss. All other Ice Dragons, except the last one, should die like normal monster.

When I recreated the Ice Dragon, I used 2 different monsters with slight alterations in the 2nd AI. It was the only way to achieve a flawless effect with out the AI bugging out. However, I've forgotten to include it here.

Those of you who used this script, experienced multiple messages that appear when the Ice Dragon summons itself. It's the result of using the Ice Dragon's AI for monster positions 2-4 when the Ice Mirror's AI should be used for those positions.

So, I must apologize to everyone for any inconvenience (especially to you Fenrir, it must have been frustrating. @_@) It's just something I forgot to include. I've updated the script in this thread but I'm still stuck with USME 66.

I have an old CPU with missing drivers. Unfortunately, I'm still not able to include a download link for a script file. It's just one of those things that's been hampering my efforts. I need a new CPU... Hmm
Quote  

#6
Posts: 3,970
Threads: 279
Thanks Received: 236
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(06-19-2013, 07:04 PM)Lord Envoy Wrote: I used 2 different monsters with slight alterations in the 2nd AI. It was the only way to achieve a flawless effect with out the AI bugging out.

I'm curious why it doesn't work. When you have multiple enemies with the same script, if some are dead, their script doesn't run. By setting that bit with the 1st monster, the revived monsters should never enter the condition, because variables apply to all monsters. Am I missing something here?
  Find
Quote  

#7
Posts: 33
Threads: 13
Thanks Received: 2
Thanks Given: 0
Joined: Jun 2009
Reputation: 6
Status
Vanish
(06-19-2013, 07:54 PM)Madsiur Wrote: I'm curious why it doesn't work. When you have multiple enemies with the same script, if some are dead, their script doesn't run. By setting that bit with the 1st monster, the revived monsters should never enter the condition, because variables apply to all monsters. Am I missing something here?

I believe it's because the Mirrors are summoned during the OCS (Opening Command Sequence). The sequence doesn't end until it fully resolves. Since the monsters are summoned before its End, the sequence continues.

Here's an example of the bug taking place:

Original OCS:
1.) FC,15,24,00, If VAR036 has all the following bit cleared: 0
2.) F9,00,24,00, VAR036 toggle bit: 0
3.) F3,3F,00, Text: "Ice Dragon creates 3 mirror images! "
4.) F5,03,02,3C, Monsters #3, #4, #5, #6 , if hidden, brought in without affecting their HP, from side, indiv.
5.) FE, End If and reset targeting

OCS Bugged:
1.) FC,15,24,00, If VAR036 has all the following bit cleared: 0
2.) F9,00,24,00, VAR036 toggle bit: 0
3.) F3,3F,00, Text: "Ice Dragon creates 3 mirror images! "
4.) F5,03,02,3C, Monsters #3, #4, #5, #6 , if hidden, brought in without affecting their HP, from side, indiv.
5.) FC,15,24,00, If VAR036 has all the following bit cleared: 0
6.) F9,00,24,00, VAR036 toggle bit: 0
7.) F3,3F,00, Text: "Ice Dragon creates 3 mirror images! "
8.) F5,03,02,3C, Monsters #3, #4, #5, #6 , if hidden, brought in without affecting their HP, from side, indiv.
9.) FC,15,24,00, If VAR036 has all the following bit cleared: 0
10.) F9,00,24,00, VAR036 toggle bit: 0
11.) F3,3F,00, Text: "Ice Dragon creates 3 mirror images! "
12.) F5,03,02,3C, Monsters #3, #4, #5, #6 , if hidden, brought in without affecting their HP, from side, indiv.
13.) FC,15,24,00, If VAR036 has all the following bit cleared: 0
14.) F9,00,24,00, VAR036 toggle bit: 0
15.) F3,3F,00, Text: "Ice Dragon creates 3 mirror images! "
16.) F5,03,02,3C, Monsters #3, #4, #5, #6 , if hidden, brought in without affecting their HP, from side, indiv.

5.) FE, End If and reset targeting

A sequence of commands will continue to be checked by the game code even if a switch is toggled to shut it down. In the "Original OCS", the second thing to happen is that VAR036 is immediately toggled to shut it down. However, the AI finishes it's sequence at byte "5" before byte "2" takes it's effect.

So, once it has checked byte "4" then the bug begins. Since all monster scripts have the same OCS, the now active duplicate scripts is then added to the Original. This results in a very long OCS because it had never reached it's End and finished its command.

It can also be because the sequence is being "toggled" by byte "2" and not actually "set" in the OCS, this can also result in the sequence being re-triggered multiple times. However, this is less likely being that the sequence will still be read by the game until it reaches it's End.

I hope this explains everything.
Quote  

#8
Posts: 76
Threads: 20
Thanks Received: 2
Thanks Given: 4
Joined: Apr 2012
Reputation: 0
Status
None
I came to the same conclusion myself, two Ice Dragons were needed for it to work. I'm curious on how they program it in the Advance release.

Actually Lord Envoy, I didn't regret the time I spend trying to make it work. I've actually learn quite a few things in monster scripting, of course I'm far from being an expect on the subject. But at least, I'm more knowledgeable on it.
  Find
Quote  

#9
Posts: 33
Threads: 13
Thanks Received: 2
Thanks Given: 0
Joined: Jun 2009
Reputation: 6
Status
Vanish
Quote:I came to the same conclusion myself, two Ice Dragons were needed for it to work. I'm curious on how they program it in the Advance release.

You know, I'm a bit curious myself. Usually I'm right on the money, but this one sort of stumped me. I probably can recreate it's script using a different design so that it will only need itself and not the mirrors. However, I'll need to brain storm on their death sequence to get the same effect.
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite