Author Topic: Colosseum  (Read 7539 times)

teh Schala

  • Acacia Deva (+500)
  • *
  • Posts: 561
    • View Profile
Colosseum
« Reply #15 on: August 07, 2005, 03:40:45 am »
I'm not sure about the equipping and the BP, but with the status ailments, if you can toy with the enemy's AI, you can make the enemy open with a status attack such as MP Buster to take away the MP...

Agent 12

  • Moderator
  • Zurvan Surfer (+2500)
  • *
  • Posts: 2572
    • View Profile
Enemy A.I
« Reply #16 on: August 07, 2005, 03:46:52 am »
Is there an example of an enemy that does a preemptive attack, I'd say lavos at zeal with his rain from the heavens but he's so pumped up he might just be that fast.

--jp

ZeaLitY

  • Entity
  • End of Timer (+10000)
  • *
  • Posts: 10795
  • Spring Breeze Dancin'
    • View Profile
    • My Compendium Staff Profile
Colosseum
« Reply #17 on: August 07, 2005, 04:22:13 am »
Chrono Tweaker lets you switch up enemy AI, though you probably knew that. You can readd the header to your rom with SNESTool for use with Tweaker.

Chickenlump

  • Architect of Kajar
  • Chronopolitan (+300)
  • *
  • Posts: 327
  • O_o
    • View Profile
Re: Enemy A.I
« Reply #18 on: August 07, 2005, 04:29:34 am »
Quote from: jsondag2
Could you get me started with how to toy with the A.I. I think if i could look at the fake flea's then I could teach myself atleast the basics.

Or better yet is there an example of an enemy that does a preemptive attack, I'd say lavos at zeal with his rain from the heavens but he's so pumped up he might just be that fast.

--jp


Not much is known about the AI right now, but here is everything I have so far.

This is (I think) a collaboration from Proto K and Waddler D.

http://www.helmetedrodent.kickassgamers.com/Proto_K/attackbytes.rtf

The AI starts in the unheadered ROM at offset 0C8D08 and ends at 0CCBC8

Gato's AI is at CA77B.

Here is a conversation I had on IRC with Waddler D on the subject, and all the stuff he found out about it.



---------------------------------------------------------------------------------------
WaddlerD 85: The AI tactics is quite interesting.
WaddlerD 85: All the monsters has 2 main patterns.
WaddlerD 85: A "normal", move on will pattern and a "counter, move with the response of an attack or action, pattern.
WaddlerD 85: It's always seperated by FE FF
WaddlerD 85: The stuff between the FE FF is simple and complicated in a way.
WaddlerD 85: The first 4 bytes are ALWAYS to going to be a precondition.
WaddlerD 85: followed by a FE
WaddlerD 85: to seperate the precondition from the actual actions.
WaddlerD 85: I haven't found out all the preconditions yet, as there are quite a few, but usually 00 00 00 00 is the default.
WaddlerD 85: As it means, "If the monster is alive" probaby. :P
WaddlerD 85: probably*
WaddlerD 85: You can put more than one precondition in a pattern, though.
WaddlerD 85: Like for instance.
WaddlerD 85: FE FF 00 00 00 00 FE Blah blah blah FE 00 00 00 00 FE Blah Blah FE FF <--- Normal attack pattern
WaddlerD 85: The four bytes.
WaddlerD 85: Though it's also good to know that the precondition can be expanded into some big "and" precondition.
WaddlerD 85: Like for instance 01 03 00 00 15 40 00 00 = "When HP is at 50% AND Monster is hit with Shadow based elemental attack.
WaddlerD 85: There is quite a few interesting preconditions that I found out so far.


WaddlerD 85: Somewhat sloppy, but it should be good enough
WaddlerD 85: Byte #1: 00 = No Attack
    01 = Attack
Byte #2: 00 = Normal Attack
    01 = Secondary Attack
Byte #3: (Target?)
Byte #4: Animation that is done before attack
   01 = Up Close
   04 = Stand Still Action
   0A = Circle around
   0E = Going Astray

02 XX 05 XX XX XX

Byte #1: 02 = Techs/Magic
Byte #2: XX = Attack Type
Byte #3: Targeting style?
Byte #4: Double Tech targeting?
Byte #5: Triple Tech targeting?
Byte #6: Message

0A XX XX

Byte #1: 0A = Disables Enemy
    XX = Special Attack
    XX = Message

0B XX XX 00 XX

Byte #1: 0B = Setting Stat
Byte #2: XX = Stat Type
Byte #3: XX = Stat set
Byte #4: 00 = ?
Byte #5: XX = Message

0C 3D XX XX

Byte #1: 0C = Adding Stat
Byte #2: 3D = Offense
    39 = Magic
    3B = Evade
    38 = Speed
    3E = Defense
    3F = Lightning Defense
    40 = Shadow Defense
         41 = Water Defense
    42 = Fire Defense
Byte #3: Increment
Byte #4: Message


0F XX

Byte #1: 0F = Message Enable
Byte #2: XX = Message
 
Attack/Counterattack Preconditions
15 XX = Counters with Type of Attack
   
20 00 00 00 = Final Attack
17 XX 00 00 = Chances Pattern will be used
1F 04 XX 00 = Distance
07 01 00 00 = Custom Pattern is active
11 00 00 00 = Physical Attack
12 XX 01 = Magic Attack
01 03 = HP is at 50%
05 XX = Number of Monsters in battle

WaddlerD 85: Found out another precondition.

WaddlerD 85: I think 40 00 XX 01 points out "When Monster XX is dead"
WaddlerD 85: So if you put 40 00 CF 01 in there, it says "When Monster "Bit" is dead", do this.

WaddlerD 85: Ok, should be simple enough.
WaddlerD 85: You know though...
WaddlerD 85: There may be something more than what I put down for 1F 04 XX XX
WaddlerD 85: A lot more...

WaddlerD 85: Because Gato has 1F 06 00 00 for his counter attack precondition...

WaddlerD 85: Well, 1F usually deals with distance
WaddlerD 85: So I guess the three bytes after it have to do with something...
---------------------------------------------------------------------------------------





So, it's fairly easy to give enemies new attacks and counter attacks, but there is still quite a bit left unknown. I found the set status bit earlier today by experimentation. Feel free to share any findings you happen across.

I did a hex search for 02 10 (02 for magic attack, 10 for Gato's singing attack) and found Gato's script fairly easily. Just look through the Attack Bytes list for the attack of the monster you wish to edit and attempt a search through the area marked as AI, or you could follow the pointer table for it (0C8B08- 0C8D07) to get to the monster (I wish I knew how >_>).

JLukas

  • Fan Project Leader
  • Squaretable Knight (+400)
  • *
  • Posts: 426
    • View Profile
Re: Enemy A.I
« Reply #19 on: August 07, 2005, 09:10:23 am »
Quote from: Chickenlump
or you could follow the pointer table for it (0C8B08- 0C8D07) to get to the monster (I wish I knew how >_>).


Gato is monster $92.  The pointers are 2 bytes, so multiply $92 x 2 in a hex calculator = $124

The AI pointers start at 0C8B08 as you mentioned.  Starting there highlight the first $124 bytes.  Your cursor stops at 7BA7 - Gato's pointer.

If pointers are 3 bytes, just multiply x3.

Chickenlump

  • Architect of Kajar
  • Chronopolitan (+300)
  • *
  • Posts: 327
  • O_o
    • View Profile
Colosseum
« Reply #20 on: August 07, 2005, 01:14:41 pm »
Thanks alot Jlukas, I thought I knew how to do that and calculate pointers, but I think what threw me off was that the first pointer didn't point to the first Enemy AI. I guess pointers don't always have to point to objects, scripts, etc... in order, and some pointers will probably point to the same AI. I'll make an offsets listing for it.

Agent 12

  • Moderator
  • Zurvan Surfer (+2500)
  • *
  • Posts: 2572
    • View Profile
Future
« Reply #21 on: August 07, 2005, 02:33:53 pm »
I'll work more on AI once I figure out what's going on with the silver points.  If someone has a save spot next to the fight against Lavos at Zeal (where chrono dies) and see if his first attack is preemptive.  Maybe I'm wrong but I always remember him getting the first attack.

Tell me if this is how I would do an MP handicap

The fight before the MP handicap I'd add Flea?'s AI which would cast MP buster at the end.   To find Flea's AI I take F0*2(if the pointer is two bytes), go to 0C8D08 (unheadered Rom), go forward F0*2 bites to find flea?'s pointer. Here's where I'm guessing.  I swap the first two numbers with the last two numbers and put a C before it.  That is where I can find Flea?'s AI.

Somewhere in this AI is going to be
              20 00 00 00 FE FF 02 51
            (pre condition)    (magic) (mpbuster)
            (final attack)

I'm not saying I'm going to do this right now but I'd like to know if I'm doing it right.

The only Hex editing I have ever done was for Halo and I was told what to do for every step so I'm really new at this.  But with all the documentation you guys have done it seems plausible to learn fairly quickly.

Ok I'm going to try to figure out what the heck is going on with the silver points thanks for all the help everyone.

--jp

Geiger

  • Guru of Life Emeritus
  • Chronopolitan (+300)
  • *
  • Posts: 315
    • View Profile
    • Geiger's Crypt
Re: Future
« Reply #22 on: August 07, 2005, 03:49:34 pm »
At the fair, silver points are copied to a temporary variable.  They are worked with there, and then copied back to their original location.  The reason the game does this, with so many variables, is that there are more commands geared towards working with temporary variables (7F0200 - 7F03FF) than permanent ones (7F0000 - 7F01FF).  But if the only things you are going to do with your variable are addressed by commands that access permanent memory, then there is no reason to copy back and forth.

It sounds like your particular problem is that you are not copying your temporary variable back into the permanent one.  As for the person not saying the correct value, check the fair again.  There is probably some memory being set up for the value to be "silver points".

---T.Geiger

Agent 12

  • Moderator
  • Zurvan Surfer (+2500)
  • *
  • Posts: 2572
    • View Profile
Colosseum
« Reply #23 on: August 07, 2005, 05:15:20 pm »
I've come to the conclusion that I have the silver points worked out.  The problem isn't the memory it is this piece of code:

TextBox(Bottom, "You have {value 8}BP{null}")

Query: Does {value 8} change from location to location?
 This is what I first thought since my BP checker says how much gold I gained in the last battle.  But if I go to the silver point checker he tells me the correct info.  

The only thing that is confusing me is that if I go to my BP checker AFTER going to the silver point checker my BP checker tells me the correct number.  I'm gunna read some more code.

I'll post more if I figure something out.

To Geiger
I didn't want to use the temp. variable but when I try to write a value directly to 750052(Mem.SilverPoints) it replaces the Paramater add/subtract to 750200, so I have to use a temp. variable as a medium.
I'm going to take your advice and look at the fair for clues on my {value 8} problem.

UPDATE:
The soda guzzler says "only {value 8} cans is that it?"
and the man in front of Bekklers tent says
 "come spend your {value 8 } silver points here"

The first quote means that the problem is not that it is changing for each map cause the soda guzzler and silver point checker both use {value 8} for different values.

The second quote shows that on a different map it is still being used to display silver points.

Well it's a small step in the right direction atleast.
--jp

Agent 12

  • Moderator
  • Zurvan Surfer (+2500)
  • *
  • Posts: 2572
    • View Profile
Figured it out
« Reply #24 on: August 07, 2005, 06:21:12 pm »
Hey everyone I figured out what it was.
If you ever want to see the value of the temporary variable 7E0200 it's {value 8}

What they did in Leene square and the fair was assign the temporary Variable they store silver points in to the one {value 8} is linked to.  Which is what I did.  The arena now has a system of rewards which brings me to my next poll, how to reward each fight, I currently have 7 fights.  Here's how I was going to do the rewards (remember max BP is 255)

1--1
2--2
3--4
4--8
5--16
6--32
7--64

with double for going solo.  Keep in mind that it'll be hard to go through every round so they won't max out TOO quickly.  But maybe I should lessen the rewards.  I was thinking that the player could trade in BP for prizes at 50, 150, 200, 250.  

Any suggestions to change or add to this method?

--JP

Chickenlump

  • Architect of Kajar
  • Chronopolitan (+300)
  • *
  • Posts: 327
  • O_o
    • View Profile
Colosseum
« Reply #25 on: August 07, 2005, 11:46:08 pm »
Your method sounds very fair and balanced actually.
I must say you are catching on to Chrono Trigger editing very quickly. O_o

Geiger

  • Guru of Life Emeritus
  • Chronopolitan (+300)
  • *
  • Posts: 315
    • View Profile
    • Geiger's Crypt
Colosseum
« Reply #26 on: August 08, 2005, 12:00:04 am »
It really depends on what you are giving away.  Remember that most gamers will be able to whip the arena pretty quickly once they advance far enough in the game.  You probably do not want to give them unlimited access to megalixirs.

It is also worth noting that FF7's arena was much sharper in its reward curve (big numbers did not start to appear until the last couple of fights, the last one being worth many times more than any of the others).

Another thing is that the BP rewards were based on the enemy fought and the handicap taken as well as the round.  Different enemies should probably give different amounts.

You can probably also turn this variable into an unsigned short (65535 max value).  7F0051 is for trial innocent votes.  7F0052 is for silver points.  7F0053 is for number of kittens.  Pick two of those and use them together if you do not plan to use them anymore (52 and 53 would probably work best).  Then use {value 16} in your string.  I do not think the game makes use of this character, so there may be some issues with it.

---T.Geiger

ZeaLitY

  • Entity
  • End of Timer (+10000)
  • *
  • Posts: 10795
  • Spring Breeze Dancin'
    • View Profile
    • My Compendium Staff Profile
Colosseum
« Reply #27 on: August 08, 2005, 12:01:54 am »
This sounds good. We can have as many prize increments as we want. I have something else to ask, however:

Would there be any way to use a crude form of exportable data to get this map into the Crimson Echoes rom? Currently, I'm assuming that you've edited Guardia Castle, for lack of more information. Since that place is a keeper in the hack, we'll have to use another location for the coliseum. However, since the event code is tailored to the map (with NPC, enemy placement and all), we should probably stick to the original you've created here. I'm trying to think how we might easily integrate the custom map for the coliseum into CE.

The map could just rebuilt, but if we can save time, it'd be optimal.

This sort of reminded me of two things I eventually want to have there; a cameo by Cyan explaining the credits, and perhaps his theme. But those can be dealt with much later, hah.

Geiger

  • Guru of Life Emeritus
  • Chronopolitan (+300)
  • *
  • Posts: 315
    • View Profile
    • Geiger's Crypt
Colosseum
« Reply #28 on: August 08, 2005, 12:08:41 am »
Would there be any way to use a crude form of exportable data to get this map into the Crimson Echoes rom?

Yes, but it is not something for relatively new hackers to try, and I am not sure how Flux 1.07 would react to it (the 2.00 beta should not have any issues).

You might ask Chickenlump or JLukas how its done (or maybe even to do it for you).  I could do it also, but things are sort of busy in my life at the moment.

This sort of reminded me of two things I eventually want to have there; a cameo by Cyan explaining the credits, and perhaps his theme.

Chickenlump has imported Terra and I have imported The Wild West, so both are possible.  But I do not think Chrono Trigger's instruments could render a true-to-original version of Cyan's theme.

---T.Geiger

Geiger

  • Guru of Life Emeritus
  • Chronopolitan (+300)
  • *
  • Posts: 315
    • View Profile
    • Geiger's Crypt
Colosseum
« Reply #29 on: August 08, 2005, 12:13:37 am »
Seems I was wrong.  Its just a function of round and handicap, not enemy.  See the mechanics of it here:

http://db.gamefaqs.com/console/psx/file/final_fantasy_vii_battle_arena.txt

But since handicaps will not be particularly easy to add to Chrono Trigger, I suggest you rate the BP by enemy.

---T.Geiger