[PSX/PC] Battle editor - Proud Clod (1.5.0/FINAL)

  • Thread starter Thread starter nfitc1
  • Start date Start date
Status
Not open for further replies.
Quick request (which I have probably asked before...): Could you implement an Enemy AI dump option? I know that you can currently just C/P to a text file and have it there, but the most important thing, and most annoying thing to add is the offsets, which is not included in the copied information.

I know that the copied info would be enough for most people's needs, but for me, I always like to have the offsets present so that i can know from a glance where the jumps are actually going, and also because I will be dumping every redone enemy script that I do, so that I can actually comment on stuff (hard to know why I did certain things if I go away for a bit and come back to a specific enemy and want to remove/compress stuff that I knew before couldn't be touched, costing me lots of lost time :P), and create my own "pseudocode" for the AI, which helps even more (It is as if I disassembled it in PrC, but without it yelling at me for my coding style :P).

You could even think of it as an extended copy button, that includes the offsets as well (doesn't have to output anything, just copy to the clipboard), and includes the final end opcode, though I am not sure how PrC would handle accidentally trying to import the offsets, I mean you could take the easy way and just tell people NOT to include the offsets, or tell your program to ignore anything starting with 0x###, though I am not sure how much it already ignores, how much work all of this would be, and how willing you would be to do it, but I would be VERY grateful for such a feature :D.
 
shoulda modified my other post, but oh well.

I noticed a strange bug when copying guard scorpion's AI (my rewritten version at least); a part that had two messages in a row, only separated by a jump, caused part of the copied data to become screwed up as such:

EDIT: added another instance of the bug.

Original:
Code: [Select]
Code:
93 {EA0000h} "It's gonna fire that laser…"72 014993 {EA0000h} "{EA0001h}, be careful!"60 24 //this is 0x14960 0092...93 {EA0001h} "I dunno what's goin' on, but…60 2460 009293 it looks pretty bad.60 2460 0092
Copied with error:
Code: [Select]
Code:
93 {EA0000h} "It's gonna fire that laser…"00 0200 //this is where the jump would be, but it is all screwed upEA            //start of the message is here00 0C0100 454200 4143524546554C01 FF0260 2460 0092...93 {EA0001h} "I dunno what's goin' on, but…495400 4F4C4F4B5300 52504554545900 4142440E 60FF2460 0092
 
Last edited:
I'm having trouble with AI. Strictly, this should go in the 'Welder' thread, but I suspect that something else is the issue.

I created a simple script using my header and the 'heal hurt unit' plugin. The AI code is as follows:

Code: [Select]
Code:
12 207002 20A0829060 2061 01C58160 043460 024270 (goes to 92 at end)02 206002 21408061 01C6864270 005413 100002 208003 41608002 208003 41808060 033360 0232439003 100060 014270 (goes to 92 at end)12 207003 100082909161 01C692
Every turn that comes around, the battle freezes - players continue in their idle animations, but nothing happens.

The attacks 01C5 and 01C6 are valid (Nerosuferoth).

I altered the code so that it would compare whatever remained on the stack, printing what I'd been expecting if I was correct. If I didn't have
01C5 as my first pop, and 20 as my second, that's where my problem would be. Guess what?

gah.gif


So, why isn't using 92 with 01C5 / 20 working? It's just Nerosuferoth's beak.
 
Last edited:
I'm double-posting, rather than editing, because some developments are serious enough to warrant a bump.

I can get the code working... once the jumps are borked. Observe:

Code: [Select]
Code:
12 207002 20A0829060 2061 01C58160 013570 0042 -> points to the 73 opcode!12 100002 20A003 41608002 20A003 41908060 033360 0232439002 100060 014270 0042 -> points to the 73 opcode!12 207002 100082909161 01C692
This code works. Well. Perfectly, in fact. The Neros use attack X ('beak'), but 50% of the time will use attack Y ('healwing') when a party member has less than 50% HP. This goes against all good sense: we'd expect the Neros to refuse to act except when using their attack Y on a char with less than half health, as often the logic branches to the 'end' opcode.

When I fix the logic jumps by substituting $42 with $3F, the game freezes every time an attack is made by the monsters.

This makes no sense whatsoever, unless - and I hesitate to say this - there is an issue with the way that Proud Clod calculates addresses in the AI scripting section. I am, of course, open to other suggestions. I'll see if I can verify the address digits PC generates. If they're consistent, who knows how to explain it?

--

Edit: I understand now. Take a look at the following GIF (I'm quite keen on animations today : ) ):

scroller.gif


Basically, when you scroll to the end, Proud Clod doesn't properly 'scroll' the address list. 42 always DID point to the 92 opcode, it's just that PC doesn't 'scroll' the addresses properly once you roll to the end of a script. Make sure you're aware of this when writing your jumps.

This means, in effect, that by 'fixing' the jumps, I actually had the monsters perform 1C5 'as' a 1C5, which is impossible. Initially, I assumed that $20 was being popped somewhere, because it looked like an incorrect 'type'. It looked like an incorrect 'type'... because it was one.
 
Last edited:
@secondadvent:

Yes, this is a known issue with copying scripts with text strings in them. This has been fixed in the version that is Oh-so-close to being released. Armorvil has a copy of a mostly ready one. The only problem is that I'm doing something different for disassembling and that's throwing me behind.

@Bosola:

This is also a known issue that I was hoping no one would notice.  :-[ Thing is, the actual grid of addresses and grid of code are two different objects. I split them for efficiency's sake. It made everything work three times faster, but they don't sync up 100% of the time. It is very frustrating, but the next version they will be combined again. It will also play around with some syncing, but it shouldn't be noticeable like this.
 
More problems: there seem to be many circumstances under which PC will plain not save changes to AI, blanking the script out entirely. This is often the case after pasting into a blank script - until I type and change the code, PC doesn't recognize that I've made alterations.

I note that the 'data changed' flag doesn't seem to be touched (there's no '!' in the app. title).

Not saying it's down to the optimization efforts, but I will say one thing: a lot of optimizing 'tricks' - like, trying to only save data that has been changed - run the risk of incorrectly identifying 'redundant operations'. That can be a real problem with an IDE, as tempting as it is to improve performance.

Anyway, Proud Clod will never initialize snappily. It will never boot quickly because it is written in VB.NET, and the CLR / chunky vb dlls are the bottleneck. But no-one really minds about that - it's a difference of a few seconds. Don't worry about making PC fast.
 
Last edited:
I changed Thundera to Thundara, when I then use search for Thundera it crashes.  Thundera no longer exists and maybe because it doesn't find it there is some sort of bug?


************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at ProudClod.Form1.ByNameToolStripMenuItem_Click(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.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)
 
Thundera no longer exists and maybe because it doesn't find it there is some sort of bug?
Well, that's basically what the exception says...

Object reference not set to an instance of an object.
An object has been nulled before being referenced.
 
Thundera no longer exists and maybe because it doesn't find it there is some sort of bug?
Well, that's basically what the exception says...

Object reference not set to an instance of an object.
An object has been nulled before being referenced.
O_o VEEEEEERRRYYYY different concept there. The object wasn't "nulled" it just never existed. Kinda strange because I remember thinking about an empty result and I thought I took care of that eventuality. In fact, I did. Then I rewrote it and made that particular error handling not work. :( It's fixed now (for the next release).

Anyway, Proud Clod will never initialize snappily. It will never boot quickly because it is written in VB.NET, and the CLR / chunky vb dlls are the bottleneck. But no-one really minds about that - it's a difference of a few seconds. Don't worry about making PC fast.
Correct. It's noticeable, but there's really little to nothing I can do about it if I want all the functionality retained. What really slows it down is how it loads the scene.bin file. Each scene in there is GZipped and PrC has to GUNZip each of them, read the enemy names, the load the first scene before actually giving control to the user. It's a rather processing heavy process that I've reduced to as fast as possible (I think).
 
Last edited:
I never realized GZipping took so much time.
It's not the Gzipping that takes time. It's the gunzipping and storing of 256 files of varying size that makes it take so long.
 
when i used the Proud Clod editor and it come this: Unable to find a version of the runtime to run this application.

i have installed oll of framework and the other but it comes this error message.
 
Which version of the framework did you install? I think it specifically wants version 3.5.
 
Specifically, I found that block 155 in my scene.bin was completely missing ( aka empty. it's the rapps battle block. in ProudClod it's 154 I recon ) and because of that I had to manually recreate the part. I copied stats and whatever from other blocks for the monsters but since rapps is unique, I had to look up the original stats in a non-hardcore scene.bin ( yes, the rapps battle was merely missing in my h_scene.bin god knows why )  and modifiy it myself. I then 'created' the attacks in proudclod, did the formation tab stuff and then the AI stuff  ( I again copied from the existing blocks, as the enemies arent unique except rapps )

Now it gets tricky.
I had no hardcore version of rapps AI and as such i tried copying the non-hardcore version of his AI. it copy / pastes fine, but when I close the tab by clicking 'done' and save scene.bin, the AI data is gone. To clarify, I tried reproducing this with other monsters, but when I copy the AI of a non-hardcore foulander into the h_scene.bin , it saves without problems and errors and the monster acts normally.

It puzzles me why exactly the rapps part doesn't save.
 
Please see my post further up this page. I detail the bug. Hope that helps.
 
Yeah, solved the problem
>copy paste AI
>change any value
>change value back
>save

works like a charm, thanks
 
ok this problem is too ok i have installed the framework 2.0 and 3.0 thx for helping and this threat can be closed
 
Yeah, solved the problem
>copy paste AI
>change any value
>change value back
>save

works like a charm, thanks
OK. That's why I was confused. It doesn't do that in the yet-to-be-released version, but I guess that problem still exists in the one available. I'm almost done with this next version, I just need to make sure some changes are saving and fix the way the disassembly looks.
 
Status
Not open for further replies.
Back
Top