Author Topic: Question about multi-parts enemies  (Read 8177 times)

Jeet

  • *
  • Posts: 155
    • View Profile
Question about multi-parts enemies
« on: 2014-09-08 18:52:08 »
I was wondering how the game set multiple characters like " hellectic hojo, emerald weapon" and others, that have multiple parts,(separate legs and arms) I know they are independant enemies, but how the game "link" them together so they play their animations in the same time etc.What in the game ,for example,says" enemy331 will be combined with enemy332" ?

 

vayneruel

  • *
  • Posts: 161
    • View Profile
Re: Question about multi-parts enemies
« Reply #1 on: 2014-09-08 20:40:30 »
They are link with the AI, a main part controls the other parts.

Jeet

  • *
  • Posts: 155
    • View Profile
Re: Question about multi-parts enemies
« Reply #2 on: 2014-09-08 21:00:25 »
The AI is the one that can be modified with proudcloud? or its another one?

In wallmarket and proudcloud there is the " pre battle" AI ,"main" and many others, thats the one your talking about? If yes is there a way to alter it for a playable character?

Vgr

  • Global moderator
  • *
  • Posts: 2163
  • If it quacks like a duck, it must be a duck
    • View Profile
Re: Question about multi-parts enemies
« Reply #3 on: 2014-09-08 21:27:03 »
Enemy AI can be modified with Proud Clod. Character AI only is in kernel.

Jeet

  • *
  • Posts: 155
    • View Profile
Re: Question about multi-parts enemies
« Reply #4 on: 2014-09-08 21:45:38 »
I see where  to modifiy the AI in the kernel but i dont know what  each values mean, i dont find any documentation about this, someone have an idea?

vayneruel

  • *
  • Posts: 161
    • View Profile
Re: Question about multi-parts enemies
« Reply #5 on: 2014-09-08 22:15:58 »
What you want modify, enemy or character AI?

Jeet

  • *
  • Posts: 155
    • View Profile
Re: Question about multi-parts enemies
« Reply #6 on: 2014-09-08 22:27:51 »
Im making a playable version of hojo, i already hacked his human and lifeform appearance, i hacked the "hellectic" too, but he dont have arms( since they are separate models) so i want to "copy" the AI u talked about that combine the two arms of hojo, i've hacked the two arms as well, so they are all playable, but  i dunno how to assemble them.

But i have no  clues wich values i need to change, there is no documentation about this its seems

vayneruel

  • *
  • Posts: 161
    • View Profile
Re: Question about multi-parts enemies
« Reply #7 on: 2014-09-08 23:08:47 »
For linked diferents enemies, the main part save the id of other parts in a variable, with this method is easy control the other parts. In case of Hellectic Hojo he only use the arms for change his stantard and damage animation because the body model contains all animations.
How hellectic link the arms?
In pre-battle:
0x01ELocalVar:0060 <-  (LocalVar:0040.EnemyID == 307)
0x02DLocalVar:0080 <-  (LocalVar:0040.EnemyID == 308)
12 0060
02 0040
02 4120 ----------------------- opcode for "EnemyID==" 
80
60 0133
90
12 0080
02 0040
02 4120
80
60 0134
90
You dont need save the enemy id in two variables, but he uses this form.

Jeet

  • *
  • Posts: 155
    • View Profile
Re: Question about multi-parts enemies
« Reply #8 on: 2014-09-08 23:34:46 »
thats exactly what i wanted, thx for theses informations but i dont understand everything yet, i explain :

I dont use the chaos and death gigas form of vincents, so i have swapped them with the right arm and left arm of hellectic hojo, if i follow what u are saying, i have to change the enemy ID 307 and 308 to chaos and death gigas ID?

In my game hojo replace cait sith, if i write  only this part of the pre battle script this will  works? Have u any ideas about the ID of chaos and death gigas?

thx

vayneruel

  • *
  • Posts: 161
    • View Profile
Re: Question about multi-parts enemies
« Reply #9 on: 2014-09-09 13:41:35 »
Yes, 307 and 308 are the id of hojo´s arms so you need the id of Death gigas an chaos, in SCENE they have these id (i think its the same for kernel)
Death Gigas= 01DE
Chaos= 01E0

Jeet

  • *
  • Posts: 155
    • View Profile
Re: Question about multi-parts enemies
« Reply #10 on: 2014-09-09 14:14:31 »
I dont understand the "opcode" part, i dont have knowledge in this(i tried to take a look yesterday but i dont understand), could you explain me in more details how this works? or write the pre battle with the ID of chaos and death gigas?Its seem that there is some calculs to do before obtaining the ID or im wrong?

vayneruel

  • *
  • Posts: 161
    • View Profile
Re: Question about multi-parts enemies
« Reply #11 on: 2014-09-09 15:33:20 »
I write a example but if you want, could you says what do you want to achieve?
LocalVar0060 (Active mask EnemyID=478)
LocalVar0080(Active mask EnemyID=480)
12 0060
02 2050
02 4120
80
60 01DE
90
12 0080
02 2050
02 4120
80
60 01E0
90
73

Jeet

  • *
  • Posts: 155
    • View Profile
Re: Question about multi-parts enemies
« Reply #12 on: 2014-09-09 16:35:35 »
Thx, look like the wallmarket dont accept " 60" value with such numbers, but its works with "61"

But nothing happend

What i want to achieve is having hellectic hojo in my party(its done) but his arms dont appear, because they are separate model, and the onlyway to have them attached to the body was using the same way that the AI, but i just think about something that maybe make this impossible

first, even if the armes are linked, their position wont be on hojo because i looked the scene of hellectic hojo and the 2 arms are positioned exactly at the same place that hojo himself, so to have the same result i should: sacrifice 2 characters to be the right arm and left arm, and have them located exactly where hojo is? in that case this is impossible ( at the start i was thinkin that the AI itself was "sumoning" the right and left arm and place them where hojo is, and then link them so they share the same animations, but look like its not that simple)

I thought about a second solution, because last time you said something interesting " hellectic hojo body have all animations", are you saying that if i implent news bones(the arms) in hellectic hojo they will be directly animated?

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Question about multi-parts enemies
« Reply #13 on: 2014-09-09 17:27:03 »
Thx, look like the wallmarket dont accept " 60" value with such numbers, but its works with "61"
60 is only for byte-sized values. 61 will take word-sizes, which is what you want.

I thought about a second solution, because last time you said something interesting " hellectic hojo body have all animations", are you saying that if i implent news bones(the arms) in hellectic hojo they will be directly animated?
For a multitude of reasons, including the reasons you already described, this is the approach you should take. The only reason that the arms are separate on HH is so you can target them and kill them.

Jeet

  • *
  • Posts: 155
    • View Profile
Re: Question about multi-parts enemies
« Reply #14 on: 2014-09-09 17:41:18 »
Yep i think thats the better and simple solution, thats sad because character like bizarro sephiroth and synthesis jenova are perfectly working, even if they are composed of multiple parts, but unlike hellectic their members dont really die so they are all in the same 3D model

I hope the arms will be naturally animated (but i doubt it)because i have no clues how to modify battle animations

Anyway Hellectic hojo have some nice animations even without arms but it will be so much better with at least his right arm

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Question about multi-parts enemies
« Reply #15 on: 2014-09-09 19:00:05 »
Yep i think thats the better and simple solution, thats sad because character like bizarro sephiroth and synthesis jenova are perfectly working, even if they are composed of multiple parts, but unlike hellectic their members dont really die so they are all in the same 3D model

Bizarro and JENOVA cheat by having invisible targets. You can't have more than three unique enemy actors in any formation. Bizzaro looks like he has five that are interconnected, but they're all the same model in the same place with different target points assigned. Ruby and Emerald take the other route and have multiple pieces that are all controlled by a "master" enemy. Emerald also "cheats" into having four types (head, legs, and two eye types) by using the same model for each eye and coloring them differently.

Helletic Hojo is the really annoying one that has two arms that technically do nothing on their own except some behind-the-scenes data setting before and after the fight. It's the body's animation scripts, not it's AI, that tells its arms how to move.

Jeet

  • *
  • Posts: 155
    • View Profile
Re: Question about multi-parts enemies
« Reply #16 on: 2014-09-09 21:12:45 »
animation script for this melee attack:

C7 01 00 03 C7 02 00 03
FC 02 03 F7 04 04 05 E5 EE

Thats right before each animations in his script there is this c7 01 00 0X  , probably for playin the X animation of his 1st and second arm? I didnt noticed that but unfortunally that would help me anymore since i wont be able to play with additional models

It is technically possible to add a bone for a battle model? that would be the best solution, if i cant i can still exchange the strange "stomach" things on his back ( composed of 4 parts like the right arm) , i already make a lot of enemies playable but i never modifier their bones, so thats new to me

Jeet

  • *
  • Posts: 155
    • View Profile
Re: Question about multi-parts enemies
« Reply #17 on: 2014-09-11 00:05:50 »
DONE!

finally hellectic hojo is mine , his arm is well animated ( not well as the original) but still very good, i didnt tried the left arm on purpose, because even with his big size with his left arm missing im able to play him with 2 other characters, this is strange because lifeform hojo seems smaller in size, but need to be played alone or game will crash, its like hellectic<lifeform, in size, i dont understand why.



thx to Proud Cloud i was able to modify the camera of every battle to match with his size

vayneruel

  • *
  • Posts: 161
    • View Profile
Re: Question about multi-parts enemies
« Reply #18 on: 2014-09-11 13:38:17 »
Congrats Jeet ;)