øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;u=123;area=showposts;start=330e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexf8b6-2.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;area=showposts;u=123e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexf8b6-2.html.zxòg^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ…¬ŽOKtext/htmlISO-8859-1gzip8:ÖŽÿÿÿÿÿÿÿÿTue, 10 Mar 2020 20:17:44 GMT0ó°° ®0®P®€§²ð®òg^ÿÿÿÿÿÿÿÿ¾BŽ Show Posts - Grimoire LD

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Grimoire LD

331
Final Fantasy IV Research & Development / Re: Rydia's transformation
« on: March 30, 2015, 03:15:11 PM »
Among other actor-specific miscellany, do we know how the Tellah 3 actor loads its equipment? Can we get it to load the equipment of a different person?

 :edit: Huh... after some brief experiementing, it looks like it retains the equipment of the character in question, not Tellah specifially... hmm

That is correct. It's just a check for Tellah 3's Actor, if it succeeds than it skips the "new equipment" section of Shadow Slot character building. I wrote down the specifics Long, long ago. I'll see if I still have them.

Wait, I never did write them down, that was information that Phoenix had found.

Thanks!

I forgot to mention one thing. I also found the equipment check for Tellah's third instance (character id 0c). If you want him to receive initial equipment rather than keep what he has, then change the data at 06869 to EAEAEAEAEA. That should work, though I haven't checked it yet.

Right... maybe I should look at the code after all.

Yep, was as simple as I thought...

Code: [Select]
$00/E665 BD D5 09 LDA $09D5,x[$00:09D6] A:0000 X:0001 Y:00C0 P:envMxdizc - Load Character ID from Event.
$00/E668 3A DEC A A:000C X:0001 Y:00C0 P:envMxdizc - -1 to A.
$00/E669 C9 0B CMP #$0B A:000B X:0001 Y:00C0 P:envMxdizc - Is it 0B (0C, Final Tellah -1)
$00/E66B D0 01 BNE $01    [$E66E] A:000B X:0001 Y:00C0 P:envMxdiZC - If not 0B branch to Re-equiping Routine.
$00/E66D 60 RTS A:000B X:0001 Y:00C0 P:envMxdiZC - Return

Very simple coding here. Works well enough, but as always is a bit restrictive. You could change that to any one you want, just remember that it is ID -1. If you would want to get rid of re-equipping all together you would just null D0 01 with two EA's and that would guarantee all characters would not re-equip.

This is located in ROM at...

666A - Actor ID to check.
666B - IF Not correct Actor ID, branch (again to nullify just two EA's at that point)

332
Ah yes I remember trying to accomplish something like this in the past...

If it is to only affect the editor and not the ROM, I can have some something like that whipped up relatively quickly. If you want it to affect the way the game loads spells (e.g. getting them to display correctly in the characters' spell menus) I'm going to need to know the addresses that need reading/writing.

Effecting just the editor would suffice for now since this test ROM already has that done...

Though Dragonsbrethren posted the LoROM offsets a long time ago, here's that post...

Very. From the other thread:

Code: [Select]
$02/CBAF BF B0 8A 0F LDA $0F8AB0,xThis offset (SNES LoROM, of course) is the start point for the eight character names.

Code: [Select]
$02/CB9B C9 48       CMP #$48This is the value of the first eight character spell. Anything below this is six characters.

Code: [Select]
$02/CBA0 E9 48       SBC #$48This is subtracting the value of the first eight character spell, so that the index for eight character names starts at 0 instead of $48 in the loading routine.

So basically, what you want to do is set the two $48 values to whatever the first eight character name is and adjust the offset accordingly. Since you'll be overwriting the start of the eight character names with six, nothing actually needs to move (there's no reason why there can't be blank space between the six and eight character names) so you can leave everything in the same place it is now. (Well, assuming you only allow six character names to be expanded; removing some would require the entire list of eight character names to be shifted.)

In ROM this is at...

0x14B9C - 48 (Change this to where you want eight character spells to start... which would actually be a better option for the editor than what I suggested, heh.
0x14BA1 - 48 (A subtract check, but necessary to change to the same as the above in case someone still wanted to keep Eight character spell names in the list.)

333
Ah, quick question in the Features part of the program how difficult would it be to program in to say "8 Character Limit Past Spell 72" and an option of "6 Character Limit past Spell 72" I'm putting together an expanded unique spell set for all characters and trying to remember "6 slots, stop. Move onto next spell" looks pretty bizarre in the editor itself.

334
There are some battles with the "no change" music option that award exp/money and play the victory theme (e.g. Cagnazzo battle, MomBomb battle) and others that don't, even if the monsters themselves have rewards... The mystery flags in the formaitons don't seem to have any bearing on this as far as I can tell; does anyone know how this is determined?

Ah, you're referring to the Fabul Battles and Golbez vs. Tellah,  I believe with the music that stays constant and the Boss Battles that do play the Victory Theme, sure I'll take a look.

Let's see here... after a little digging I found the song/sound effect that is currently called is loaded at 7E1E01 and indeed at the end of conventional battles a 08 is loaded into this section to play the Victory Theme, now it looks to be a bit of a Table that is used for this sort of dealing, here are the instructions called for this..

Code: [Select]
$03/8219 AD E5 38 LDA $38E5  [$7E:38E5] A:0008 X:0111 Y:000D P:eNvMxdIzc - Load Second Set of Encounter Flags.
$03/821C 29 0C AND #$0C A:0000 X:0111 Y:000D P:envMxdIZc - Keep only 4 and 8.
$03/821E 4A LSR A A:0000 X:0111 Y:000D P:envMxdIZc - /2
$03/821F 4A LSR A A:0000 X:0111 Y:000D P:envMxdIZc - /2
$03/8220 C9 03 CMP #$03 A:0000 X:0111 Y:000D P:envMxdIZc - Is it equal to 03?
$03/8222 F0 09 BEQ $09    [$822D] A:0000 X:0111 Y:000D P:eNvMxdIzc - If so, branch. (This is continue playing the default music)
$03/8224 AA TAX A:0000 X:0111 Y:000D P:eNvMxdIzc - Transfer A to X.
$03/8225 BF 0C FF 13 LDA $13FF0C,x[$13:FF0C] A:0000 X:0000 Y:000D P:envMxdIZc - Load A from the Battle Music Table.
$03/8229 22 12 FF 13 JSL $13FF12[$13:FF12] A:0017 X:0000 Y:000D P:envMxdIzc - Jump to Placing Song Data.
(This table is...)
27 - Normal Battle Music
1A - Elemental Fiends Battle Music
0B - Boss Music

Now let's see how this End of Battle is interpreted then.

Alright, once the battle is won this data is loaded to play the normal Victory Fanfare...

Code: [Select]
$03/872F AD E5 38 LDA $38E5  [$7E:38E5] A:0000 X:FE67 Y:000E P:envMxdiZC  - Load Second Set of Encounter Flags
$03/8732 29 0C AND #$0C A:0000 X:FE67 Y:000E P:envMxdiZC - Get rid of all bits that are not 0C.
$03/8734 C9 0C CMP #$0C A:0000 X:FE67 Y:000E P:envMxdiZC - Is it 0C?
$03/8736 F0 08 BEQ $08    [$8740] A:0000 X:FE67 Y:000E P:eNvMxdizc - If so, branch. (If the Second Set of Encounter Flags contains a 0C the game will not play the Victory Fanfare, however having a 03 (which only implies a 0C /4  for the second encounter flags in terms of bits since it is divided twice) will still be "no change").
------------------------------------------------------------------------------------------------------
$03/8738 A9 08 LDA #$08 A:0000 X:FE67 Y:000E P:eNvMxdizc - Load Victory Fanfare into A.
$03/873A 8D BE 38 STA $38BE  [$7E:38BE] A:0008 X:FE67 Y:000E P:envMxdizc - Store A in 7E38BE.
----------------------------------------------------------------------------------------------------------
$03/873D EE BD 38 INC $38BD  [$7E:38BD] A:0008 X:FE67 Y:000E P:envMxdizc - +1 to 38BD.
$03/8740 20 0F 88 JSR $880F  [$03:880F] A:0008 X:FE67 Y:000E P:envMxdizc - Jump to Subroutine (??)

While it's in the code above I may as well say it plainly here as well... if the Second Set of Encounter Flags which controls the music playing contains a 0C it will play "no change" music, whereas if a 0C is used it will not only continue "no change" music, but it will also suppress the Victory Fanfare.

As I've never looked at that data in ROM, PinkPuff it doesn't make much sense to me, but since you put together a program that reads these matters correctly I imagine you would know how this second set of encounter flags are parsed in the Formation data.

 :edit: I forgot the basics of hex math, so my above conclusion is incorrect. I'm still looking for the answer.

No, no. Nevermind. It was a misunderstanding on my part. My above conclusion is right, there does appear to be something special about the MomBomb battle though, since that should fall under the same auspices of of 0C and skipping the victory theme, I'll take a look though.

Let's see... some sort of check at 13FD00  is looked at in the end of battle seeing what formation was just played... looks to be the Auto-Battles, but I don't know what is being referred to here.

Hmm, can you get Exp/Gil in Auto Battles? I'm wondering if they are looking to suppress those?

 :edit:
Ah? Here's another table of sorts which looks a bit more varied, let's see here... 13FE69...

Battle DD - 221 (CPU)

Battle E1 -  226 (Mom Bomb)

Battle E7 -  232 (Dark Elf/Dragon)

You know what these all have in common? They are all "No change" music Boss Battles which end with the Victory Theme. And I am right on the ticket!

This is the answer, another bizarre choice of Formation tables. These are located at 13FE69 in LoROM and ROM at 9FE69.

Here is the data with that...

DD 00 - CPU
E1 00  - Mom Bomb
E7 00  - Dark Elf/Dragon
A7 01 - Calbrena
A8 01 - Golbez
AF 01 - Evil Wall

And there you go! You may have Only Six specific formations have a "no change" music and have the Victory Theme. A very strange way of going about it, make no mistake.
B6 01



335
It's a place like this where an expanded ROM would be most desired, but alas it would break FF4kster compatibility.

I actually had an idea regarding this issue. It would be somewhat of an undertaking but I could make a config file that contains all the major addresses for data and code that people would be likely to move and then use that instead of hardcoded addresses.

The upside is that it would still work normally on a normal ROM if you change nothing, while at the same time allowing you to expand the rom and/or move things around and still use the editor.

The downside is that if you don't know the correct addresses for some reason or if you make a typo, KABOOM! Also it will take quite a bit of time and effort, meaning that's time and effort not spent on expanding the editor's functionality in other areas.

While I was originally in favor of expanding the ROM, finding that extra space helps me immensely as far as the Routines are concerned.

My plan is to change the LDA XX, STA 82's that create dynamic addresses. use that to JSL to (likely the 08 bank area) Load the original Spell Subroutine OR Command Subroutine (due to slightly different data, they would have two similar, but different routines to reach their proper assigned new banks. If the Spell Subroutines read 35 or over, load the new bank's location in A. If it reads below, Load a 03 into A and store that in 82.

For Commands it would look past 27 for the same measures as listed above.

Therefore the new Commands and the old Commands could exist without any conflict and the same goes for the Spell Subroutines. The only that would need to be remembered is that these custom addresses will have to JSL (4 bytes instead of 3 bytes) to reach specific information pertaining to the 03 Bank.

336
Well, the good news is that my plan worked! There are now 3F amount of Command and Pointers and 7D worth of Spell Subroutine Pointers compared to the original 27 and 35. Now it comes to finding empty space for these new routines and that will quickly become a difficulty I would imagine. It's a place like this where an expanded ROM would be most desired, but alas it would break FF4kster compatibility.

There's empty space scattered about the ROM, but now knowing where Text begins and ends, I fear that some of these large swaths of empty information may be reserved for text...

So if anyone knows, could they divulge the locations of Text Locations and Maps? If I know the blank space is not revolving about them, then we should have a large amount of empty space.

 :edit: After a bit of research on the forums I found an old post from JCE3000GT in regards to empty space, and with his hacking document on rb.thundaga.com I also found what these empty spaces were correlated to (if known) and if they were safe to change. The vast majority were and I think I can say that we can create A Lot of new routines without any issue as far as space is concerned...


0001DE55 - 1195 Bytes!
00023C38-23C80
0023C94- 23FFF (A fair amount of Bytes.)
5FD58 - 680 Bytes!
6E3A0-6F25F EBF (3775 Bytes!)
977F0-97FFF - 80F (2063 Bytes!)

To put that into perspective the game uses Bank 03 for the Spell Subroutines and crams them into...
E02C
D388-

CA4 amount of Bytes, The section in Bank D0000 (6E3A0) holds EBF bytes alone more than enough space for any new routines, I would imagine.

Past the Fight Command, Damage Routines, and Spell Routines, the Commands become much more compact and take up maybe 1000 more bytes, which is of course, large, but with space available elsewhere, then there is no worries in terms of space so all of the (mostly useless) original commands can exist alongside brand new ones as the hacker chooses.

This gets rid of any space problem we've ever had as far as Battle is concerned.  There is also a large section of free space around 438B9, but this hack is using a Lot of that space for more table space, mostly.

337
Game Modification Station / Re: FF6Hacking Down?
« on: March 28, 2015, 07:07:02 PM »
Posting this here since I think it's the most pertinent to people that post in this subforum.  My apologies if it's in the wrong place.

Does anyone know what happened to ff6hacking.com?  It looks like the site got deleted by some sort of keyword search.  Are there plans to get the site back up?  I don't post there often but I pop in and read threads every so often.

Eh? Looks like the site works fine for me, was probably just some temporary downtime.

338
Final Fantasy IV Research & Development / Re: Rydia's transformation
« on: March 28, 2015, 06:20:27 PM »
Older post of mine ffrom the Unknown Info topic...


Every other character has their class from start to finish. Rydia's class changes to use her new graphic. An interesting way to go about it. I grew suspicious when I saw there was no automated fashion this is done, at least according to the editor so I took a look around and quickly found the answer.

In LoRom - HiRom....

0x0E5B7 - C9 11 (CMP 11) - Compare Adult Rydia's ID (Somehow) if this is read...
0x0E5BB - A9 0B (LDA 0B) - Load 0B (Adult Rydia's Class) into...
0x0E5BD - 99 01 10 (STA 7E1001) - 7E1001 - Rydia's Information.

In ROM at...

0x067B7 - C9 11 (CMP 11) - Compare Adult Rydia's ID (Somehow) if this is read...
0x067BB - A9 0B (LDA 0B) - Load 0B (Adult Rydia's Class) into...
0x067BD - 99 01 10 (STA 7E1001) - 7E1001 - Rydia's Information.

The uses for this could be interesting, in case you didn't want Rydia to return in an aged fashion or wanted to use the assignment of byte to somewhere else. Or want another character to change their class. But it does solve to me how the game switches a class in the middle of the character's existence.


339
In my most recent hacking stint I've formulated methods to go far beyond the limits of our original Table mandated routines by moving these to empty spaces and repointing accordingly. Hacking 101, now that I really think on it. But in so doing I've concocted a way to increase our Command space from a measly 27 slots (in hex) in which a lot of them are paired commands anyhow to a much more robust 38-3B amount of slots. Meaning that there would be enough room for 18-20 new routines without touching any others. The concern would invariably become "But what about Bank 03? It's nearly full as is!" Oh, that it is, but we aren't necessarily locked into Bank 03, the makers left leeway by tying the Bank choice at the very end of the "find table pointer" routines, meaning you would create a JSR to some unused space, create a check to see if the Subroutine is beyond a certain amount, if so jump to another place filled with empty space and that's where you can start to use unique subroutines.

That takes care of that, but then the second question, "Why would we ever need so much space?" And that is a fair point. With 13 characters there is only room for 39 (decimal) unique  commands and when Magic slots are taken into account that drops to 28.  And that's where my other new hack comes into play. This hack is an event instruction which moves Battle Commands into SRAM and when initialized the second part of that event instruction hack is to add any given Command to any Slot of a character's Commands. Another piece of this hack is that it loads Commands by Character basis rather than Actor basis, so it takes up a lot less space (a necessity as there is not much free space at all in SRAM.)

With the ability to mold a character's Command Set as one pleases, a lot of things would open up. With roughly  20-30 new Command slots to use people could allow their creativity flow as they will not have to worry about replacement and all of that and they can have these new commands accessible in any event setup they please.

But here is where this idea comes in to make a showcase...

Cecil will start the game with Dark Wave.

Say you go into the Training Hall and instead of a bunch of NPC's there are statues of the PC's. When you talk to say... Dark Knight Cecil's Statue the game will check to see if a flag is on that indicates Dark Knight Cecil is present through the use of my Flag Check Skip Instructions hack that I have recently made. If not it will say "Nothing happened." If you talk to it with the Dark Knight in your party you would then be prompted. "Would you like to change Dark Wave to Dark Omen?" and a Yes/No prompt would appear. If you have Dark Omen then it would ask "Would you like to change Dark Omen for Dark Wave?"  Through the very same use of flags. Or you could even have both Dark Omen and Dark Wave on at the same time, but my thought is to supply a unique command slot for each character that can hold them, so in essence Dark Knight Cecil could have 3 command slots thus three Cecil Statues that would offer new commands (likely for some price, or based on game progress). And so on and so forth with the other characters.

Does such an idea sound workable, does anyone have any suggestions to improve upon this thought or other ideas that could utilize expanded Commands/Flag check Hack/Command Placement in RAM and manipulation hacks?


340
I was going over this in my head and wondering "where can I find this space that will be needed for these new Command instructions? The 03 Bank is already glutted with an immense amount of data. Then it hit me, I won't Need to confine myself to a bank, the instructions right there show that it uses a variable number of bank. Expanding with a JSR to look for certain amounts beyond a certain range would be the most preferable way to to do this. In fact this could be the ticket for including more table subroutines for a variety of matters. Granted they don't coincide with a natural barrier. Commands are stuck at 3F Max because of the C0+ which is added for any and all commands. Events likewise are tied to their amount of 30 because of 00-CF being reserved for NPC movement.

What is not tied to a known limit though are Spell Subroutines. That number is never used for anything else that we are aware of outside of FF acting as Audiovisual Effect calls, but I think the more proper term for that may be "blank" because those sorts of calls are internally checking the spell number used. Play a Visual Effect Event Instruction should be similarly unbound. It's all a matter of finding a new space for the Tables to support more than their intended max.

I was also wrong about the F0-FF Commands(Except for F0 and F2, they do not function correctly, but I haven't ruled out that those are Timer issues, rather than anything wrong with the Hex assignment.) The F1+ Commands, if they are overwritten within their Command routine this causes no oddities. What this means, for me, is that my custom commands will largely be able to exist alongside the older commands, and while this would ordinarily be worthless because of only so many Command Slots a character would have (3 unique Commands for each character would only be decimal 39 (27 hex) and that''s not taking away slots devoted to magic use. When you factor those in it's a lot less at, decimal 28 (1C hex). So in a normal sense roughly 39-3A Commands is overkill, unless my new hack is taken into account. Imagine this scenario... 3 variants of Dark Wave. One is the traditional Dark Wave, 1/8 HP for low-decent physical damage. This is what Cecil starts with. But say the Training Hall is replaced with the "Command Hall"

Now, using my other Flag Check hack that would look to see if Dark Knight Cecil is in the party through the use of Flags, they will offer a change of command for a low price (might be free, if I can I may include some sort of Quasi-Job system where they may ask for a certain amount of battles fought before you can change command? It's all a little up in the air at the moment)

This would allow Cecil to change up Dark Wave for Combat Boost's Dark Omen, with the added stipulation of turning into a Zombie when used. The third one would be Darkness (Probably truncated down to Dark(Sword)- Which would give him x2 damage for the cost of 1/8 of his HP each time he attacks as a reference to the DS version.

These are all just ideas, but it would give a lot of use and variety to the game if used and balanced accordingly.

My end objective is to give as much room as possible for the determined hacker to fool around with, without the need to expand the Rom.

I'll make a new topic on this to get people's inputs on it to see if they have anything they would like to see expanded.

341
Thank you very much PinkPuff, I'm trying to find as much free space as I can (it seems that relocating data will also give us not just more Command Room,but Spell Subroutines room, which is also of importance!) but I need to know if these swathes of FF's are safe to change or if they are related to Map or Text.

342
By "Timers" do you mean what FF4kster labels "Delay" in the command editor?

Ah, yeah that would be the name in the editor.

343
Ah, PinkPuff, since Chillyfeez is away for a couple of days could you share the location of the Timers, they are technically the very last thing I *should* need to move to get the new 8 commands working in an optimal fashion.

344
Well, I've come across an interesting realization...

The game only supports 23 (Hex) Commands by default because that is the length of the table. What is interesting about this is that the name table for the commands supports a whopping 1C extra support for Command names! (Not including commands that are used by the game but are not named such as Jump''s Return/Focus' Attack/Twincast Success/

If we could relocate the Command Table we could increase the amount of available commands to a much improved 3F (Decimal 63!) That is up from the default 1D (Decimal 29)

I see no reason not to try my hand at it. If it succeeds that means in combination with my Battle Command Switch Event we could have a much more robust Command system than the original FFIV had.

This would also mean that we'd have to change the locations of the Command Stances, but since they take up only one byte that shouldn't be too difficult.

...

Pointers - Check
Targeting - Check
Timers - Yet to do
Monster AI Bypass Routine - In progress

I'm making good progress, the last hurdle thus far has been the Monster AI Bypass. The game only ever intends the player to use commands from C0-E7, after which the command bytes take on Monster Parameters, for instance if I set my Command to 31 and use it, despite what formula it may have, it will still display a message because of the correlation with the Monster Parameters. My objective now is to force that information to JMP to a new section of data where I can create a conditional on whether a character or a monster is accessing that command (because players never use monster commands and monsters don't use anything else aside from fight.)



 :edit: Grr... After several hours of trying to make a workaround there is just too much linked into the position (animations are the big part) to go beyond the sponsored 27 line. So while I was able to set aside a new section for the pointers, stances, and targeting I couldn't actually use the expanded data in any meaningful way.  Despite coming so close, I am afraid this experiment was a failure.

Here is the information for anyone if they'd like to give it a shot. Maybe I'm missing something really simple.

Location of Command Pointers

08B850

(Change 03B160 to BF 50 BA 08) - New Location of Command Pointers

(Change 02B201 to BF 00 BB 08) - New Location of Command Stances

(Change 038BB3 to BF 80 BB 08) - New Location of Command Targets

Bah, hopefully my next experiment will be more fruitful.

 :edit: Important Note

The bank that the Command Routines are stored is not deadset to 03.

Purely because of...

03/B160   BF 50 BA 08   LDA $08BA50,x[$08:BA86]   A:0036   X:0036   Y:0000   P:envMxdizc
$03/B160   BF 50 BA 08   LDA $08BA50,x[$08:BAA0]   A:0050   X:0050   Y:0000   P:envMxdizc
$03/B164   85 80   STA $80    [$00:0080]   A:0052   X:0050   Y:0000   P:envMxdizc
$03/B166   BF 51 BA 08   LDA $08BA51,x[$08:BAA1]   A:0052   X:0050   Y:0000   P:envMxdizc
$03/B16A   85 81   STA $81    [$00:0081]   A:00E8   X:0050   Y:0000   P:eNvMxdizc
$03/B16C   A9 03   LDA #$03   A:00E8   X:0050   Y:0000   P:eNvMxdizc
$03/B16E   85 82   STA $82    [$00:0082]   A:0003   X:0050   Y:0000   P:envMxdizc

Does it look in Bank 3. We could technically move all of those to a more space-friendly bank if eventually desired.

 :edit:
E8-EF despite being AI Orders don't appear to react strangely like anything above F0 tends to do. So if I can get this working right I can at least get us 2F slots, rather than 1C. While a hit to the thought, it's better than abandoning the idea all together. The oddity in graphics mean very little if the new Commands they have include a couple of Audiovisual Cues of their own.

345
Ok, let's give this another shot:

  • If the party is completely annihilated, instead of game over, ignore XX and skip directly to the next event
    • As a result of this, the pseudo YY parameter, if it had one, would be skipped as a result anyway
  • If someone in the party is still alive, interpret this as an "IF" instruction, using the XX parameter and the pseudo YY parameter in the usual way

Do I have it now?

Yep, that's how it goes. Really it's taking advantage of the "Prevent Losing" flag and using it to its maximum potential as possibility for different scenarios.