Atrius: I'm trying to fix the site, but it might take a while.

It seems the SQL database had grown larger than our hosting company allows.
I've cleaned out all of the unnecessary log data to get it down to an
acceptable size, but haven't received a response as to why normal
functionality hasn't been restored yet.


 Guardian Ball
Golden Sun Hacking Community
July 20, 2018, 10:13:16 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
  Home   Forum   DC Wiki Help Search Calendar Downloads Login Register  
Pages: [1] 2   Go Down
  Print  
Author Topic: Guardian Ball  (Read 1720 times)
0 Members and 1 Guest are viewing this topic.

Regular Member
**

Coins: 2
Offline Offline

Posts: 135

« on: January 08, 2017, 10:22:40 AM »

So I'm experimenting with Star Magician and I'm having trouble manipulating the Guardian Ball into not using Guard Aura. I've advanced the BRN 11 times from 0 and it's using Guard Aura inconsistently. Changing the GRN changes whether or not the Guardian Ball uses Guard Aura - the resulting turn order from a seed where Guard Aura is used is the same as one where Guard Aura is not used.

This is a very unusual thing, I don't know of anything else that behaves this way. I was curious if there's any special coding for Guard Aura or whether I'm missing something and it actually does behave according to usual battle rules.
Logged
View Profile
Rolina
The Fulminous Witch
Jupiter Clan

Template maker turned lurker

Alchemist
*

Coins: 10
Offline Offline

Gender: Female
I am: wondering if we can get our clan position changed...
Clan Position: Grand Overlady of Jupiter
Posts: 6051

« Reply #1 on: January 08, 2017, 06:25:42 PM »

Guardian Ball has a 5/8 chance of using Guard Aura, and a 3/8 chance to defend.  It might be a better idea to be rid of it ASAP and manipulate RPG to try and guarantee a better replacement.
Logged

View Profile WWW
Fox
Fox McCloud, the Hacking Doctor
Mercury Clan

Prodigy
*

Coins: 28
Offline Offline

I am: certainly not a Gallant!
Clan Position: Head Gallant
Posts: 2411

« Reply #2 on: January 08, 2017, 07:13:28 PM »

That is interesting... Here's a quick image of my /early/ studies... Do you think that the 7th BRN generated thingy has anything at all to do with it? (Maybe in combination with something else.) I'll be checking... Also, Agility gets modified... Apparently... So there could be something, but I just don't know what it is, yet...
(Also, note that these breakpoints come before the ability used for this enemy is applied, I think...)


* gball1.png (121.72 KB, 1096x903 - viewed 104 times.)
« Last Edit: January 08, 2017, 07:18:43 PM by Fox » Logged

Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Remember kids! Before you go on that interview, remember to wash your hands in teawater! *Coughs on hand* (Excuse me, I just coughed up a little teawater, so they're still clean!) You wouldn't want that hiring manager to be unimpressed.

May the force be with you!
Shoo! Why does it smell in here?
Maybe that's the wrong kind of force. *smirk*
View Profile

I need saves to test encounters in GS Reloaded!

Great Member
***

Coins: 13
Offline Offline

Gender: Male
Posts: 745

« Reply #3 on: January 08, 2017, 07:26:33 PM »

Agility being modified couldn't be just how the game handles priority moves like Guard Aura?
Logged
View Profile

Regular Member
**

Coins: 2
Offline Offline

Posts: 135

« Reply #4 on: January 08, 2017, 07:27:31 PM »

I would be surprised if its the 11th BRN advance that is causing this - although it certainly could be. I can't seem to reproduce the behavior with 0 BRN. I experienced some randomness with a previous BRN seed that I was working with (but later abandoned it due to better strats). I did just notice that you get +7 BRN when the game decides to use Guard Aura after the PC attacks are confirmed (3 Starmagician, 4 balls), and +6 BRN when the Guardian Ball chooses to defend. Seems like the decision is made prior to the balls turn coming up, unlike other enemies which decide their action when their turn comes up.

Caledor is probably right about the agility stuff being related to Guard Aura being a priority move.
Guardian Ball has a 5/8 chance of using Guard Aura, and a 3/8 chance to defend.  It might be a better idea to be rid of it ASAP and manipulate RPG to try and guarantee a better replacement.
Star Magician is a one turn fight :) Even if we can't make progress here there's still good odds that guard aura doesn't happen (and is likely faster than an alternate strat)
« Last Edit: January 08, 2017, 07:31:51 PM by Plexa » Logged
View Profile
Fox
Fox McCloud, the Hacking Doctor
Mercury Clan

Prodigy
*

Coins: 28
Offline Offline

I am: certainly not a Gallant!
Clan Position: Head Gallant
Posts: 2411

« Reply #5 on: January 08, 2017, 08:02:49 PM »

Well, both BRN 6 and BRN 7 are used for getting an ability... so I found that a bit confusing ish...
But it's possible Guard Aura is a priority move... (Is that Guard Aura, or the Ability Effect? Just to make sure.)
Logged

Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Remember kids! Before you go on that interview, remember to wash your hands in teawater! *Coughs on hand* (Excuse me, I just coughed up a little teawater, so they're still clean!) You wouldn't want that hiring manager to be unimpressed.

May the force be with you!
Shoo! Why does it smell in here?
Maybe that's the wrong kind of force. *smirk*
View Profile

Regular Member
**

Coins: 2
Offline Offline

Posts: 135

« Reply #6 on: January 08, 2017, 08:13:28 PM »

Yeah all I'm trying to say is that guardian ball only has "one action" if it does not defend (guard aura) and that decision is made after all the pc commands are given (not really surprising in any way). The more I test this the more it seems like either i) BRN determines a % chance for guard aura, and then uses the GRN to determine success or ii) it's use is solely determined by GRN. This is based off of the fact that I can't manipulate a defend with 0BRN (trying >10 seeds), but with 11BRN attack cancelling is giving about 50% success.

I pull all my information from: http://goldensunwiki.net/wiki/Ball_enemy_line#Guardian_Ball which says that its an enemy ability and that is has increased priority
« Last Edit: January 08, 2017, 08:16:03 PM by Plexa » Logged
View Profile
Fox
Fox McCloud, the Hacking Doctor
Mercury Clan

Prodigy
*

Coins: 28
Offline Offline

I am: certainly not a Gallant!
Clan Position: Head Gallant
Posts: 2411

« Reply #7 on: January 08, 2017, 08:29:28 PM »

@one action:  Well, yes, I noticed that... (In my image.)
So I'm planning to figure out the code flow from the 6th to the 7th BRN.... (and beyond).... hopefully.

@Priority... = Yeah... I think it's the Ability Effect.... (My test: See [080B9DF8 + 3], and change the 0x58 to something else.)

The ability effect adds 0x2710 (10000 in dec.) to the agility... in the Enemy AI code, it seems. (Not sure how often, as there is this conditional before it gets added. Conditional separates Start of Round from Start of Turn.)

@7 BRN = Nevermind! I think I didn't realize the Start of Round/Turn thing... so got confused... I'm still looking this up, though....
At least I do usually find the answer in the end, at least. :)




How are you checking the random number for abilities? (Or were you not doing any fancy equations? And instead only looking for RN counts that give you a result... Ermm...)
RNG & 0xFF ? And then comparing... (0x20,0x20,0x20.... 8 times for Guardian Ball) (As in... It's not (RNG * 8) >> 16)
« Last Edit: January 08, 2017, 11:20:04 PM by Fox » Logged

Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Remember kids! Before you go on that interview, remember to wash your hands in teawater! *Coughs on hand* (Excuse me, I just coughed up a little teawater, so they're still clean!) You wouldn't want that hiring manager to be unimpressed.

May the force be with you!
Shoo! Why does it smell in here?
Maybe that's the wrong kind of force. *smirk*
View Profile

Regular Member
**

Coins: 2
Offline Offline

Posts: 135

« Reply #8 on: January 09, 2017, 04:40:27 AM »

RNG results are trial and error, + I have RN counters in my routing scripts. I've attached an image which illustrates the problem I'm having. In the first image (BRN 11, 0 GRN (0 is relative due to how my script counts)) the Guardian Ball will use Guard aura, while in the second image (BRN 11, 295 GRN (relative to previous image, i.e. this state is 295 GRNs further along than the first one)) the Guardian Ball defends. 



* starmagician1.png (525.93 KB, 961x642 - viewed 99 times.)

* starmagician2.png (523.82 KB, 956x638 - viewed 95 times.)
Logged
View Profile

Regular Member
**

Coins: 2
Offline Offline

Posts: 135

« Reply #9 on: January 09, 2017, 07:55:03 AM »

Found a second seed which gives defend, and I'm thinking my first hypothesis is correct - i.e. that the BRN determines the chance for Guard Aura to work based off the GRN. So far I've been working with BRN11, but turns out BRN7 works as well. I did some manual sampling (51 samples) and BRN7 had a 70% defend rate while BRN11 had a 35% defend rate.

This is very unusual.

Edit: If you want to manually test this, save before star magician [battery file enclosed] enter the fight and do anything with your party. Guardian ball should use guard aura and immediately soft reset when you see this text come up. This will have advanced the BRN by 7. Load back into the star magician fight and enter the battle; you're now fighting star magician at BRN7. You can test the defend/guard aura rate with this.

Alternatively, use my battery file, load gabomba catacombs and enter the mud fight - do atk/def/diamond dust/blitz and soft reset. Now load into the Star Magician fight - you'll be at BRN11. You can test defend/guard aura rate here and compare it to BRN7.

* Star Magician Test File.sav (64 KB - downloaded 43 times.)
« Last Edit: January 09, 2017, 08:18:49 AM by Plexa » Logged
View Profile
Fox
Fox McCloud, the Hacking Doctor
Mercury Clan

Prodigy
*

Coins: 28
Offline Offline

I am: certainly not a Gallant!
Clan Position: Head Gallant
Posts: 2411

« Reply #10 on: January 09, 2017, 08:56:52 AM »

So... I was looking at @ 0811CFFA , Weird... But enemies are listed in a stack, and the GRN seems to swap them around a bunch of times. Is this based on evaluating turns in a certain order? (Before actually putting them in the order they'll go?)
Hypothetical... But let's look at these numbers for a moment to support the theory.
0x00000000 = Ability 0
0x00003039 = Ability 1
0xD3DC167E = Ability 0
0xA70427DF = Ability 1
0xD6651C2C = Ability 0
0x0DAA96F5 = Ability 4
0xC21F1C8A = Ability 0

(00, 20, 40, 60, 80, A0, C0, E0 sections is what I'm looking at.)

No room for Guardian Ball to ever "Defend" in that case.... (Where BRN count is 0.) ...
Hmmm..... I may want to look further into this theory, though.


EDIT: Although, 00000000 is probably not the first one /skipped.  Since I forgot that a number is generated first... XD (Was just an oversight.)
I am not sure if that Ability 7 one works or not for BRN 0, though....  So yeah, I'll need to think of something.
« Last Edit: January 09, 2017, 10:30:10 AM by Fox » Logged

Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Remember kids! Before you go on that interview, remember to wash your hands in teawater! *Coughs on hand* (Excuse me, I just coughed up a little teawater, so they're still clean!) You wouldn't want that hiring manager to be unimpressed.

May the force be with you!
Shoo! Why does it smell in here?
Maybe that's the wrong kind of force. *smirk*
View Profile

Regular Member
**

Coins: 2
Offline Offline

Posts: 135

« Reply #11 on: January 09, 2017, 09:34:09 AM »

That looks like a promising theory and would explain the behavior I'm seeing. Shuffling the order in which moves are determined would mean the guardian ball is using a variety of different BRN seeds instead of one seed every time. BRN11 would have about 2-3 good seeds and 5-4 bad seeds, while BRN7 would have about 5 good seeds and 2 bad ones.

Star Magician actually doesn't advance the RNG by one with BRN 0, so your calculations were valid actually you're right. This lines up experimentally with what I observe where Gball always guard auras on 0BRN.

EDIT: If you could check BRNs 8-14 and 12-18 and see how many seeds will make Gball use guard aura? If the ratio of guard aura/defend lines up experimentally this is probably the reason.

EDIT2: I did 8-14 myself and got 4 defends, 3 guards giving me a theoretical ~57% chance of defend. But since Star Magician eats 3 RNs at once, and 80% of the time will consume at least one of the guard seeds I imagine the real probability is nudged higher.

Code:
BRN7 = 3EAD 62 FB - 62 -> 3
BRN8 = AF5A AD 71 - AD -> 5
BRN9 = 20DA 77 56 - 77 -> 3
BRN10= AFE5 33 D7 - 33 -> 1
BRN11= 69AC C4 C4 - C4 -> 6
BRN12= 961B AF AD - AF -> 5
BRN13= 261E B2 E2 - B2 -> 5
BRN14= 525F 36 73 - 36 -> 1

EDIT3: just saw your post below xD somehow I missed a seed
« Last Edit: January 09, 2017, 10:57:36 AM by Plexa » Logged
View Profile
Fox
Fox McCloud, the Hacking Doctor
Mercury Clan

Prodigy
*

Coins: 28
Offline Offline

I am: certainly not a Gallant!
Clan Position: Head Gallant
Posts: 2411

« Reply #12 on: January 09, 2017, 10:29:31 AM »

Well... I messed up my rand numbers... So instead of calculating them myself... I'm letting the game do it.... (Just target an enemy/back up/target... while looking at GRN... from 0, since both GRN and BRN work the same/generate the same numbers.)

0 = 0x00000000 = Ability 0
1 = 0x00003039 = Ability 1
2 = 0xD3DC167E = Ability 0
3 = 0xA70427DF = Ability 1
4 = 0xD6651C2C = Ability 0
5 = 0x0DAA96F5 = Ability 4
6 = 0xC21F1C8A = Ability 0
7 = 0x3EAD62FB = Ability 3
8 = 0xCD1DCF18 = Ability 6 ***
9 = 0xAF5AAD71 = Ability 5 ***
10 = 0x20DA7756 = Ability 3
11 = 0xAFE533D7 = Ability 1
12 = 0x69ACC4C4 = Ability 6 ***
13 = 0x961BAFAD = Ability 5 ***
14 = 0x261EB2E2 = Ability 5 ***
15 = 0x525F3673 = Ability 1
16 = 0x65136930 = Ability 3
17 = 0x7E7099A9 = Ability 4
18 = 0xE6791B2E = Ability 0
Logged

Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Remember kids! Before you go on that interview, remember to wash your hands in teawater! *Coughs on hand* (Excuse me, I just coughed up a little teawater, so they're still clean!) You wouldn't want that hiring manager to be unimpressed.

May the force be with you!
Shoo! Why does it smell in here?
Maybe that's the wrong kind of force. *smirk*
View Profile

Regular Member
**

Coins: 2
Offline Offline

Posts: 135

« Reply #13 on: January 09, 2017, 10:56:29 AM »

And just like that, 5/7 guards starting on BRN7 and 3/7 guards starting on BRN11. This is certainly what is going on.

Very curious behavior!

EDIT: the real probability (assuming the order in which the actions are assigned is random) should be 80%, so my sample calculations were a good 10% out
« Last Edit: January 09, 2017, 11:05:02 AM by Plexa » Logged
View Profile
Fox
Fox McCloud, the Hacking Doctor
Mercury Clan

Prodigy
*

Coins: 28
Offline Offline

I am: certainly not a Gallant!
Clan Position: Head Gallant
Posts: 2411

« Reply #14 on: January 09, 2017, 11:41:34 PM »

So I assume that you can make Guardian Ball Defend 100% of the time if you do the Break item trick... and such....?

As for random... well... I think it is about 0x20 random swaps... (So two random numbers generated for each swap b/c both random numbers represent the slots to swap.)

However, there are only 5 enemies, right? So that's five slots to swap around. (I think Star Magicians turns are one after another?)
« Last Edit: January 10, 2017, 12:04:17 AM by Fox » Logged

Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Remember kids! Before you go on that interview, remember to wash your hands in teawater! *Coughs on hand* (Excuse me, I just coughed up a little teawater, so they're still clean!) You wouldn't want that hiring manager to be unimpressed.

May the force be with you!
Shoo! Why does it smell in here?
Maybe that's the wrong kind of force. *smirk*
View Profile
Pages: [1] 2   Go Up
  Print  
 
Jump to:  

Cbox
July 18, 2018, 10:49:52 PM
roger: I can post but it goes to an error page when I submit.
July 18, 2018, 05:24:12 PM
zman9000: Site is back WOO!
May 09, 2018, 12:35:37 AM
KyleRunner: The "Start In" field is not editable... I'll try making new shortcuts
May 08, 2018, 09:51:08 PM
Fox: If all else fails, you canmake new Shortcuts to do the same thing.
May 08, 2018, 09:49:53 PM
Fox: Export Properties > Shortcut (Tab) > Target / Start In ; Target (for Export) should be: (filename) 0 , and for Import: (filename) 1
May 08, 2018, 08:52:00 PM
KyleRunner: I can't change the path in properties menu...
May 08, 2018, 01:27:19 AM
Fox: You may need to edit something in properties, though... so it uses the exe file in the same directory.
May 08, 2018, 01:24:59 AM
Fox: It is suppose to be a shortcut, yes.
May 03, 2018, 11:48:05 PM
KyleRunner: Fox, the "export" function in your text editor is just a shortcut... Could you please fix it?
May 02, 2018, 09:53:45 PM
KyleRunner: I come here everyday. I'm working on a Portuguese translation, and the people here help me a lot.
May 02, 2018, 08:56:07 AM
Drake baku: My feel as well, I posted a little as well since my return, but silence was all that followed... At least the forum is a great source for data when hacking GS/ GS2, currently looking for something I have read a long time ago cause my PP recovery psy is not working
May 01, 2018, 09:58:04 AM
Fox: I am thinking a lot of this might be because of Discord?
May 01, 2018, 09:56:08 AM
Fox: Yeah, this forum is more dead than ever before.  February and April have 0 new topics. (All other months prior have more.) And March has lowest number of new posts. (It'd be dumb to count the very first month this site was created.)
April 25, 2018, 09:02:13 PM
Fox: Yes. The best tool is a hex editor. Well.... VBA, VBA-SDL-H, no$gba Debugger, GBATEK, and my documentation.... to use these to learn how the code/data works. Best method because it maximizes your editing ability... and then there is my program gsmagic that I was working on. Still in its early stages, though. (Even after year(s).)
April 25, 2018, 04:21:58 PM
Xendrox D: *exept tla editor.
April 25, 2018, 04:21:29 PM
Xendrox D: is there any other tool for hacking gs?
April 23, 2018, 09:26:27 PM
Atrius: Rarely, but not never.
April 23, 2018, 08:01:48 AM
Drake baku: Can it be, the god who created the editor, atrius. I heard you never came back online here anymore
April 20, 2018, 02:46:36 PM
KyleRunner: Atrius!!
April 19, 2018, 11:29:46 PM
Atrius: @Fox, I tried, but for some reason Mario Golf won't boot, and Mario Tennis crashes when you patch out the text compression, and I'm not sure why...  The normal text loading functions in them are basically the same as the ones in the Golden Sun games.

Affiliates
Temple of Kraden Golden Sunrise
Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.116 seconds with 29 queries.