News:

As a consequence of the forum being updated and repaired, the chatbox has been lost.
However, you can still come say hi on our Discord server!

Main Menu

Enemy Editor, Unlabeled value 2

Started by Atrius, 19, November, 2008, 10:42:00 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Atrius (He/Him)

Valid settings for the second unlabeled value in the enemy editor range from 0-6.  Anything above 6 will be treated as though it is equal to 6.

First, it's important to know how the ability slots are laid out in the editor:

0    1
2    3
4    5
6    7

If that second unlabeled value is set to 0, 1, or 2 the game will use it's infamous random number generator to select an ability slot based on the following ratios:

0
0=1/8
1=1/8
2=1/8
3=1/8
4=1/8
5=1/8
6=1/8
7=1/8

1
0=53/256
1=47/256
2=41/256
3=35/256
4=29/256
5=23/256
6=17/256
7=11/256

2
0=113/256
1=56/256
2=31/256
3=20/256
4=14/256
5=10/256
6=7/256
7=5/256



3, and 4 are both handled similarly to each other, but are more complex than 0-2.  I'm still working on figuring them out.



5 always selects the ability in slot 0.



6 always defends.


I can't say for sure what happens when they can't use the ability they originally selected.  From observation, it seems to often result in them defending instead as would be expected.
[sprite=220,4,0]I'm shaking my head in general disapproval of everything[/sprite]

Atrius (He/Him)

It looks like those enemies all have the value set to 3 except for Valukar, and Sentinel whose abilities all fit in their first list anyway.
[sprite=220,4,0]I'm shaking my head in general disapproval of everything[/sprite]

Rolina

Huh.  So is this the 'enemy AI'?

Also, what about cases such as Dullahan, who has THREE slots and movesets, all of which he uses in battle.  Have you looked into it enough to see how they went about doing that?

Rolina

Well, Dullahan is the only one I know of that has 3 sets, and whom uses the skills from ALL three sets...  My question was "Have you found out why/how he does it?"

Atrius (He/Him)

Doom Dragon and Poseidon have multiple sets, and use them too.

I haven't had time to confirm it, but I do believe it's because they all have that second unknown value set to 3.
[sprite=220,4,0]I'm shaking my head in general disapproval of everything[/sprite]

MaxiPower

Quote from: Atrius on 23, November, 2008, 10:01:00 AMDoom Dragon and Poseidon have multiple sets, and use them too.

I haven't had time to confirm it, but I do believe it's because they all have that second unknown value set to 3.
Poseidon...

before and after you use the trident?

Doom Dragon

Before and after you give him a little big of "Of With His Head"

just a guess  

Atrius (He/Him)

Doom Dragon has 9 copies total.

4 when he has 3 heads, and gets 4 turns per round of battle.
3 when he has 2 heads, and gets 3 turns per round of battle.
2 when he has 1 head, and gets 2 turns per round of battle.

It could be that a move is selected from a different list for each turn he gets per round.  Every other enemy that has multiple copies with different moves they use have the same number of copies as the amount of turns they get per round of battle.
[sprite=220,4,0]I'm shaking my head in general disapproval of everything[/sprite]

Atrius (He/Him)

They don't need multiple move sets, and none of them have that second unknown value set to 3.
[sprite=220,4,0]I'm shaking my head in general disapproval of everything[/sprite]

Rolina

Ah... I'm guessing only bosses though?  Because I don't see that happening with the Phoenix line...

Rolina

True, true.  Anywho, we look forward to when you figure out the formula. ^-^

Also... I find it amazing that you're only 21, yet have skills good enough to pull stuff like this off. I mean, I took computer science all through High School, but my skills are NOTHING like this...  Keep up your good work!

Oh, any clue on what the value 7 does?  You listed it in your first post, but didn't describe what it does...

Atrius (He/Him)

I never really took any computer science, or programming classes.  I've just been teaching myself ever since I first learned you could make your own computer programs.  I first started out making games in ZZT, and later Megazeux.  I've been working in Game Maker for probably over 5 years, and am now finally starting to learn C++.

The 0-7 are the positioning of the ability slots in the editor's interface.  The value can only range from 0 to 6, if you set it above 6 it just treats it as though it's equal to 6.
[sprite=220,4,0]I'm shaking my head in general disapproval of everything[/sprite]

Rolina

Oh, I knew that.  Silly me. XP

By the way, how are Enemy-held items handled?

Daddy Poi's Oily Gorillas

#12
Okay. 3 and 4 aren't that hard to understand.

3 = Start from a random ability slot.
4 = Start from the first ability slot.

Each turn they both use the next ability in the list.


The things relating to multiple turns are assembly coded. The code checks the turn number to determine which enemy in the editor to use. So the good news is that the attack pattern has nothing to do with multiple turns. (Or even of grabbing from abilities of the other enemies.)
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...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)