Author Topic: Random question about enemy attacks  (Read 8705 times)

Immortal Damyn

  • *
  • Posts: 432
  • Lord of the Twilight
    • View Profile
Random question about enemy attacks
« on: 2010-03-22 03:23:01 »
Ok, so I know you can edit attacks and whatnot for enemies with PrC and such. I was wondering if it would be possible to give and enemy haste. I can't find an enemy that uses haste with PrC's search function, so I was thinking maybe it didn't work that way. But dark Nat. uses barrier on rufus so i was thinking it should be able to. Idk any help would be awesome.

Auraplatonic

  • *
  • Posts: 68
    • View Profile
Re: Random question about enemy attacks
« Reply #1 on: 2010-03-22 03:43:14 »
You could do a few things...in the example of Dark Nation casting Barrier you could change that spell to haste in PrC.  You could also edit a monsters AI script to cast a Haste spell that you create for it.  As far as I know you can't actually give a monster a default haste or barrier, but instead just raise their speed or defense to have the same effect...just use Hojo for that.   Hope that helps :)

Immortal Damyn

  • *
  • Posts: 432
  • Lord of the Twilight
    • View Profile
Re: Random question about enemy attacks
« Reply #2 on: 2010-03-22 03:50:42 »
So if you can't give it a normal Haste or Barrier spell, how can Dark Nat. use Barrier? I just want to give some bosses stat boosting abilities and what not, make the battle seem more realistic. It shouldn't be that only certain enemies and the player characters can boost themselves. I honestly have no idea how to edit AI... looks to be hex code editing, and I am WAY not able to do that...

titeguy3

  • *
  • Posts: 1283
  • A jack of all trades
    • View Profile
Re: Random question about enemy attacks
« Reply #3 on: 2010-03-22 05:44:26 »
You can give a monster a player spell. The same way dark nation uses barrier or Safer Sephiroth uses Wall, all you have to do is make an attack for that character with the same Attack ID as haste, and call it. You don't actually have to tweak any of the attack settings since the game sees that the attack ID is < 256, and pulls it out of kernel.bin without reading the attack data at all.

For example, with dark nation, if you were to take it's barrier spell, and change it's properties and name in Proud Clod, nothing would change since the game sees the ID and pulls the data out of Kernel.bin. However, if you were to change the ID of any of it's attacks to whatever Haste is (you can find out in WallMarket), when the attack is used, it'll show up as haste.

The only complication with changing the ID's around is that you have to remember to update the instances of that attack ID in the monster's AI when it's PUSH ed right before an ATTK opcode, so it doesn't call an attack that it doesn't have (I'm not sure if the latest version of PrC does this for you), and also make sure you assign an animation to the spell in the Animations/Formations window.
« Last Edit: 2010-03-22 05:54:44 by titeguy3 »

Auraplatonic

  • *
  • Posts: 68
    • View Profile
Re: Random question about enemy attacks
« Reply #4 on: 2010-03-22 06:02:41 »
Its in Dark Nation's AI to cast that spell.  So basically you would have to use PrC or use hex editing :(

Immortal Damyn

  • *
  • Posts: 432
  • Lord of the Twilight
    • View Profile
Re: Random question about enemy attacks
« Reply #5 on: 2010-03-22 06:06:23 »
You can give a monster a player spell. The same way dark nation uses barrier or Safer Sephiroth uses Wall, all you have to do is make an attack for that character with the same Attack ID as haste, and call it. You don't actually have to tweak any of the attack settings since the game sees that the attack ID is < 256, and pulls it out of kernel.bin without reading the attack data at all.

For example, with dark nation, if you were to take it's barrier spell, and change it's properties and name in Proud Clod, nothing would change since the game sees the ID and pulls the data out of Kernel.bin. However, if you were to change the ID of any of it's attacks to whatever Haste is (you can find out in WallMarket), when the attack is used, it'll show up as haste.

The only complication with changing the ID's around is that you have to remember to update the instances of that attack ID in the monster's AI when it's PUSH ed right before an ATTK opcode, so it doesn't call an attack that it doesn't have (I'm not sure if the latest version of PrC does this for you), and also make sure you assign an animation to the spell in the Animations/Formations window.
Ok, so basically I think i kinda understand what to do. But my confusion is I looked up the attack ID for wall that safer sephi uses and its 0012 But in wall market its 18, so... IDK what to do there. Also when you start talking about OP codes and whatnot I get lost.. quickly. I kinda understand what you mean, but when it get to the OP codes part and AI editing I really am lost. I can pretty much do everything else, What I'm currently trying to do is take up one of the spots in  Diamond Weapons Attack list that's blank (hoping it doesn't do anything bad) and placing a stat boosting ability there, like haste or barrier. Not that it needs barrier, because it nulls physical unless in countdown mode.

titeguy3

  • *
  • Posts: 1283
  • A jack of all trades
    • View Profile
Re: Random question about enemy attacks
« Reply #6 on: 2010-03-22 06:37:12 »
Its in Dark Nation's AI to cast that spell.  So basically you would have to use PrC or use hex editing :(

Yeah, but it's really not that hard, three~four easy steps:
Step 1: (kind of goes without saying, but) Find out the Attack ID of the player spell you want to use by looking it up in WallMarket: (in this case we're changing Dark Nation's Barrier --> Haste)

As we can see, the Attack ID for Haste is 19. Convert it to hex and we have 0x13.

Step 2: Goto Dark Nation's entry in Proud Clod, find Barrier (I renamed it to Protect in my mod, so just bear with me), and change the attack ID and name as shown: (the name isn't necessary since the game will pull it out of kernel.bin, but just for your own sake it's a good idea to change it too)


Step 3: This step is only necessary when you're adding a new attack. Click the Animations/Formations Button Highlighted in the image in Step 2, then choose the monster you want, then choose the new attack in an unused dropdown list and assign an animation (be careful not to choose an invalid animation, you can tell which animations do what based upon which are used for which attacks. It's not uncommon for monsters to only have 1 or 2 valid animations for attacks)
http://img393.imageshack.us/img393/498/39012795.jpg

Step 4: Now we have to edit the AI a tad. Click the "Edit AI" button shown above and go to Dark Nation's Main Script (that's usually the only place you'll find an attack, unless it's used at the start of battle, or as a counter-attack, post-death, etc....). Usually, with few exceptions, you'll find an attack referenced like this (hex on the left, assembly on the right):
Code: [Select]
60 20 PUSH (20) Type (01)
60/61 [ATTACK ID] PUSH ([ATTACK ID]) Type ([01 for player spells/02 for enemy attacks])
92 ATTK
so in this case, we're looking to change:
Code: [Select]
60 20 PUSH (20) Type (01)
60 0F PUSH (0F) Type (01)
92 ATTK
into
Code: [Select]
60 20 PUSH (20) Type (01)
60 13 PUSH (13) Type (01)
92 ATTK
so just skim through the AI and change every instance you find. Once you think you've got em all, click the "Check Attacks" button to make sure:

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Random question about enemy attacks
« Reply #7 on: 2010-03-22 14:29:18 »
Aww, snap. That's what I was going to add to WM. I kept putting off adding the hex value to the attack IDs. That'll get fixed in the next version.

Bosola

  • Fire hazard!
  • *
  • Posts: 1752
    • View Profile
    • My YouTube Channel
Re: Random question about enemy attacks
« Reply #8 on: 2010-03-22 15:17:51 »
Good idea, but might I suggest adding some marker of the number base to these labels? For instance, preceding with 0x-- or simply appending a 'h' would be more than adequate.

titeguy3

  • *
  • Posts: 1283
  • A jack of all trades
    • View Profile
Re: Random question about enemy attacks
« Reply #9 on: 2010-03-22 15:31:29 »
Good idea, but might I suggest adding some marker of the number base to these labels? For instance, preceding with 0x-- or simply appending a 'h' would be more than adequate.
this. I'm personally a fan of the 0x (since that's the notation that most programming languages that I use utilize), although it would seem a lot of people here already use the 'h' notation...

ryan89

  • *
  • Posts: 31
    • View Profile
Re: Random question about enemy attacks
« Reply #10 on: 2010-03-22 15:53:50 »
hey people back from college anyway i was reading this can someone give me a link or website hosting wall market id really like to use it hehe :)

Auraplatonic

  • *
  • Posts: 68
    • View Profile
Re: Random question about enemy attacks
« Reply #11 on: 2010-03-22 15:58:45 »
hey people back from college anyway i was reading this can someone give me a link or website hosting wall market id really like to use it hehe :)


http://forums.qhimm.com/index.php?action=search

titeguy3

  • *
  • Posts: 1283
  • A jack of all trades
    • View Profile
Re: Random question about enemy attacks
« Reply #12 on: 2010-03-22 16:00:57 »
hey people back from college anyway i was reading this can someone give me a link or website hosting wall market id really like to use it hehe :)

Just use the search bar, there's a whole thread for it with a link to the latest version on the Front page.
There are a bunch of tools that also go well with wallmarket that you can also find threads for in this forum:

WallMarket - Kernel Editing (Magic/Spells/Materia/Items/Player stats)
Proud Clod - Scene Editing (Monster AI/Attacks/Animations)
Hojo - Moar Scene Editing (Kernel scene table building, Enemy stats, drop/steal/morph items, enemy names)
Loveless - Dialogue Editing
WhiteChoco - Shops/Prices Editing
LiBrE (PC version support to be implemented) - Limit Break Editing
« Last Edit: 2010-03-23 11:20:49 by titeguy3 »

ryan89

  • *
  • Posts: 31
    • View Profile
Re: Random question about enemy attacks
« Reply #13 on: 2010-03-22 16:02:58 »
thx lol XD hehe i ought to use it more often i dont often use forums until now lol to find things out lmao

ryan89

  • *
  • Posts: 31
    • View Profile
Re: Random question about enemy attacks
« Reply #14 on: 2010-03-22 16:07:11 »
Thanks dude this is one of the items i was looking for and its awesome cheers for zat :P.

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Random question about enemy attacks
« Reply #15 on: 2010-03-22 21:38:41 »
Good idea, but might I suggest adding some marker of the number base to these labels? For instance, preceding with 0x-- or simply appending a 'h' would be more than adequate.
this. I'm personally a fan of the 0x (since that's the notation that most programming languages that I use utilize), although it would seem a lot of people here already use the 'h' notation...

I am NOT a fan of using "0x" to precede generic hex values. That's always indicated memory address to me. It doesn't make sense to me otherwise.
Appending "h" to it works better in my mind. It will look like this:

Attack ID: 34 (22h)

Seems clear enough to me. If anyone has a problem with it then they should ignore it because they won't know what it means anyway. ;)

Xelane

  • *
  • Posts: 477
    • View Profile
Re: Random question about enemy attacks
« Reply #16 on: 2010-03-23 18:56:07 »
..... :(

........ :|


..................the f%^@ you guys talking about?

Gah! I wish I understood programming!

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Random question about enemy attacks
« Reply #17 on: 2010-03-23 19:25:20 »


Now that I'm looking at it, that picture is very disturbing to me. The label for row 0x02B looks just like the label for row 0x02E! Why does it do that? It doesn't look like that on my XP or my Vista.

titeguy3

  • *
  • Posts: 1283
  • A jack of all trades
    • View Profile
Re: Random question about enemy attacks
« Reply #18 on: 2010-03-23 19:42:59 »
Really? It's always done that for me, a few pixels get cut off the right side there and it does tend to get confusing at times. I can't imagine it's of any fault with your GUI design, since there's plenty of room in those labels, and the values are obviously right-aligned. I wonder if the same problem would occur if the labels were left-adjusted..?