Author Topic: Why would game stop just by changing enemy attack skills?  (Read 2498 times)

Abashi76

  • *
  • Posts: 64
    • View Profile
Why would the game stop (it freezes but not crashes) just by changing enemy attack skills? I switched an enemy's attack from Bolt2 to Fire2. Proud Clod has a simple way to change sprite animations, but the sprite animations are the same. It should work. This really shouldn't matter if I change the attack to a similar attack.

The enemy was : Soldier 3rd

I know both Hardcore and New Threat mods mess with those soldiers all the time. Is it because every enemy of the same type must all have the same attacks?
« Last Edit: 2020-06-19 23:46:22 by Abashi76 »

Sega Chief

  • *
  • Posts: 4086
  • These guys is sick
    • View Profile
Re: Why would game stop just by changing enemy attack skills?
« Reply #1 on: 2020-06-20 00:08:17 »
I answered PM, but will post answer here for anyone else who changes attacks and encounters problems:

An enemy can only use the attacks listed in its scene. These attacks need to be set with an animation ID (one that can handle it properly; physical animations should be used with attacks using Impact ID/Effect, and magic animations for ones using an Animation Effect). Finally, if you're changing spells that come from the kernel (such as Ice2, Bolt2, etc.) or if you add new attacks with new IDs then the enemy's AI needs to be updated with these IDs.

For instance:

Bolt 2 ID: 22
Fire 2 ID: 1C

In the AI, you would do something like this:
12 2070
02 20A0
82
90
60 20
60 22 > (Change to 1C)
92

You can quickly identify all the attack IDs that aren't set with an Animation ID in an enemy by going into its AI groups and clicking the Check Attacks button. This will highlight all the cells where an Attack ID is referenced that the enemy doesn't have an Animation ID set for.

Abashi76

  • *
  • Posts: 64
    • View Profile
Re: Why would game stop just by changing enemy attack skills?
« Reply #2 on: 2020-06-20 00:44:14 »
Okay, thanks. I'll try to figure it out. After that I will have to do a second playtest for my minor gameplay mod.

Where do you place the IDs? I can't seem to find the right menu. I am looking for it in "edit AI" mode. I also get an error every time I try to change it. I clicked on #22 on the list all the time and the program doesn't respond and sometimes crashes. Are there any other menus?

Spoiler: show
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.InvalidOperationException: Operation is not valid because it results in a reentrant call to the SetCurrentCellAddressCore function.
   at System.Windows.Forms.DataGridView.SetCurrentCellAddressCore(Int32 columnIndex, Int32 rowIndex, Boolean setAnchorCellAddress, Boolean validateCurrentCell, Boolean throughMouseClick)
   at System.Windows.Forms.DataGridView.set_CurrentCell(DataGridViewCell value)
   at System.Windows.Forms.DataGridView.OnClearingRows()
   at System.Windows.Forms.DataGridViewRowCollection.ClearInternal(Boolean recreateNewRow)
   at System.Windows.Forms.DataGridViewRowCollection.Clear()
   at ProudClod.CharAIEditWindow.Fill_AI_BLOCK(Object TopCell)
   at ProudClod.CharAIEditWindow.EditCharAI_CellEndEdit(Object sender, DataGridViewCellEventArgs e)
   at System.Windows.Forms.DataGridView.OnCellEndEdit(DataGridViewCellEventArgs e)
   at System.Windows.Forms.DataGridView.EndEdit(DataGridViewDataErrorContexts context, DataGridViewValidateCellInternal validateCell, Boolean fireCellLeave, Boolean fireCellEnter, Boolean fireRowLeave, Boolean fireRowEnter, Boolean fireLeave, Boolean keepFocus, Boolean resetCurrentCell, Boolean resetAnchorCell)
   at System.Windows.Forms.DataGridView.SetCurrentCellAddressCore(Int32 columnIndex, Int32 rowIndex, Boolean setAnchorCellAddress, Boolean validateCurrentCell, Boolean throughMouseClick)
   at System.Windows.Forms.DataGridView.ResetCurrentCell()
   at System.Windows.Forms.DataGridView.OnInsertingRow(Int32 rowIndexInserted, DataGridViewRow dataGridViewRow, DataGridViewElementStates rowState, Point& newCurrentCell, Boolean firstInsertion, Int32 insertionCount, Boolean force)
   at System.Windows.Forms.DataGridViewRowCollection.InsertCopiesPrivate(DataGridViewRow rowTemplate, DataGridViewElementStates rowTemplateState, Int32 indexDestination, Int32 count)
   at System.Windows.Forms.DataGridViewRowCollection.Insert(Int32 rowIndex, Int32 count)
   at ProudClod.CharAIEditWindow.EditCharAI_DoubleClick(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnDoubleClick(EventArgs e)
   at System.Windows.Forms.DataGridView.OnDoubleClick(EventArgs e)
   at System.Windows.Forms.DataGridView.EditingControls_CommonMouseEventHandler(Object sender, MouseEventArgs e, DataGridViewMouseEvent dgvme)
   at System.Windows.Forms.DataGridView.EditingControls_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.TextBoxBase.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.TextBoxBase.WndProc(Message& m)
   at System.Windows.Forms.TextBox.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8806 (QFE.050727-8800)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
ProudClod
    Assembly Version: 1.5.0.2
    Win32 Version: 1.5.0.2
    CodeBase: file:///C:/Import/New%20folder%20(2)/New%20folder%20(2)/Hojo%201.1/ProudClod.exe
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.50727.5483 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8806 (QFE.050727-8800)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5491 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5495 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5483 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8773 (QFE.050727-8700)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8771 (QFE.050727-8700)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5483 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
System.Core
    Assembly Version: 3.5.0.0
    Win32 Version: 3.5.30729.5420 built by: Win7SP1
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


0x022:   RBYT - Is it this? How do I change it?

EDIT: I just figured out how to do it by I haven't tested it yet.

The Yuffie scene broke some reason and I didn't do anything to change it. I always save the "Kernel" file from Proud Clod. Why did it happen?
« Last Edit: 2020-06-20 22:33:42 by Abashi76 »

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Why would game stop just by changing enemy attack skills?
« Reply #3 on: 2020-06-28 23:00:09 »
@Sega Chief. That's not entirely correct nor do I believe that is the issue. Kernel.bin actions (player-accessible magics and E.Skills) are always loaded and don't actually need to be in the scene. Only actions with indexes greater than 255 look at scene data. That's the way it is on the PC anyway.

What I believe the issue you're having, Abashi76, is that you haven't set the animation of the actor you want to change the action from to react to the new action. It's the exact same issue that the Adamantaimai softlock has. It is actually trying to perform Cure, but it has no animation assigned to Cure so it doesn't work and the battle engine softlocks.

Go to the Animations and Formations menu of the enemy in question and change the dropdown that says Bolt2 to Fire2.

Not all instances of actors have to be the same. I have a theory as to why the are the way they are in the scene.bin file, but as far as the battle engine cares each scene is entirely isolated from all the others. Every actor in the game can have the same name and appearance and still behave entirely differently. There are some issues with some animations cooperating with certain actions, but you could replace every actor with the model of a Tonberry and have them do the "knife animation" for every action those actors do and the game would "work just fine".

Unfortunately, the AI Editor of both WM and PrC is sorely lacking in...consistent workingness. You shouldn't see a 22 in that code.

Why did Yuffie break? You need to be more specific. Did you verify the KERNEL.BIN's SLUT when you saved?

Sega Chief

  • *
  • Posts: 4086
  • These guys is sick
    • View Profile
Re: Why would game stop just by changing enemy attack skills?
« Reply #4 on: 2020-06-29 02:03:14 »
@Sega Chief. That's not entirely correct nor do I believe that is the issue. Kernel.bin actions (player-accessible magics and E.Skills) are always loaded and don't actually need to be in the scene. Only actions with indexes greater than 255 look at scene data. That's the way it is on the PC anyway.

What I believe the issue you're having, Abashi76, is that you haven't set the animation of the actor you want to change the action from to react to the new action. It's the exact same issue that the Adamantaimai softlock has. It is actually trying to perform Cure, but it has no animation assigned to Cure so it doesn't work and the battle engine softlocks.

Go to the Animations and Formations menu of the enemy in question and change the dropdown that says Bolt2 to Fire2.

Not all instances of actors have to be the same. I have a theory as to why the are the way they are in the scene.bin file, but as far as the battle engine cares each scene is entirely isolated from all the others. Every actor in the game can have the same name and appearance and still behave entirely differently. There are some issues with some animations cooperating with certain actions, but you could replace every actor with the model of a Tonberry and have them do the "knife animation" for every action those actors do and the game would "work just fine".

Unfortunately, the AI Editor of both WM and PrC is sorely lacking in...consistent workingness. You shouldn't see a 22 in that code.

Why did Yuffie break? You need to be more specific. Did you verify the KERNEL.BIN's SLUT when you saved?

Bit confused, you tell me I'm wrong about something I didn't claim and then repeat the instructions I made about setting an animation to the attack's ID? The spell does need to be in the scene anyway, because the enemy needs to have the ID in one of the attack slots to set an animation to it; the attack data can be whatever, but it does need the ID to be in there somewhere.

The reason I think it's AI is because if you change an attack's ID, but not its 'slot' in the scene's attack list, then the enemy retains the animation it has set for that attack slot. But the AI reference will still be referencing the old ID which is no longer in the enemy's attack animation list.

And what do you mean they shouldn't see a 22 in Soldier 3rd's AI? Bolt2's attack ID is 22 so of course they're going to see it.
There's one in there:


If Abashi has changed the attack ID in the scene's attack list to Fire2, assuming he's changed the ID of it, he's going to have to update the AI there to 1C instead of 22 otherwise it's not going to find an animation to use with the attack.

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Why would game stop just by changing enemy attack skills?
« Reply #5 on: 2020-06-29 02:32:26 »
Bit confused, you tell me I'm wrong about something I didn't claim and then repeat the instructions I made about setting an animation to the attack's ID? The spell does need to be in the scene anyway, because the enemy needs to have the ID in one of the attack slots to set an animation to it; the attack data can be whatever, but it does need the ID to be in there somewhere.

You are correct. I read what you had entirely wrong. I thought you were talking about something else and I was getting distracted. Sorry for the confusion. The action in question doesn't directly need to be in the scene. It's a limitation of PrC that requires it to be there. That really should be changed. A great deal about that tool needs to be changed. I've washed my hands of it the way it is now and the new tool I'll eventually make will be way better.

Sega Chief

  • *
  • Posts: 4086
  • These guys is sick
    • View Profile
Re: Why would game stop just by changing enemy attack skills?
« Reply #6 on: 2020-06-29 02:57:59 »
Fair enough, no worries.