Author Topic: [PSX/PC] DelingScript  (Read 11730 times)

Shard

  • *
  • Posts: 330
    • View Profile
[PSX/PC] DelingScript
« on: 2015-12-21 23:23:18 »
So, I'm making a tool primarily for my use in editing FF8 field scripts that will transform the assembly-like instructions from Deling into a more workable format. I'll be uploading unfinished versions to get feedback and bug reports.

DelingScript v0.3

Instructions
Run the jar file, put the Deling assembly code on the right, click the left arrow.

Lines with _ before them have no conversion yet. Someday they all will. Right now over half the opcodes are supported.

Current features:
  • Converts Deling's assembly-like code to a format with syntax similar to C/Java/Python etc.
  • Converts the script-like syntax back to assembly. Supports all functions.
  • Removes redundant jumps and labels.
  • Removes some dead script code.
  • Allows comments
  • Customizable function names (for all you non-English people).

Planned features:
  • Ability to click or highlight a function and get documentation for what it does.
  • Syntax Highlighting.

It's in early development, so post any features or suggestions you want to see out of it. ALso post any bugs you find, because we all want it to be bug free when it's done.
« Last Edit: 2019-06-17 15:17:16 by Shard »

Halfer

  • *
  • Posts: 142
    • View Profile
Re: FF8 Scripting Language
« Reply #1 on: 2015-12-22 00:04:47 »
That's actually pretty handy, since there are already a lot of info about OPcodes, maybe you should add like a hover thing on the codes that also tells what parameters needs to be added. That would fasten workflow while writing new scripts! :)

Sega Chief

  • *
  • Posts: 4086
  • These guys is sick
    • View Profile
Re: FF8 Scripting Language
« Reply #2 on: 2015-12-22 14:56:01 »
Translated Op Codes for the FF8 field editor would be great; would be very interested in testing/using it. Is there a compiled list of the translated OpCodes for FF8's field script kept anywhere? I looked at the Wiki, but it seems a bit vague with a lot of them.

paul

  • *
  • Posts: 179
    • View Profile
Re: FF8 Scripting Language
« Reply #3 on: 2015-12-22 17:47:45 »
I had a project that was going to be used for QGears like this:

https://github.com/paulsapps/SUDM

Getting the decompilation step correct is quite difficult though.

Shard

  • *
  • Posts: 330
    • View Profile
Re: FF8 Scripting Language
« Reply #4 on: 2015-12-22 18:10:25 »
Translated Op Codes for the FF8 field editor would be great; would be very interested in testing/using it. Is there a compiled list of the translated OpCodes for FF8's field script kept anywhere? I looked at the Wiki, but it seems a bit vague with a lot of them.
Was it this one? That's the most complete list of them. I was able to document about half of them before I lost my mind.

ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
Re: FF8 Scripting Language
« Reply #5 on: 2015-12-22 22:18:30 »
Coincidentally, I'm working on something similar for FF7. It's progressing fairly well; it'll turn this:

Code: [Select]
UC Disabled=1 //0x0
MENU2 Disabled=1 //0x2
PTURA PartyID=0, Speed=15, Direction=2 //0x4
IFSW BankValue1=2, BankValue2=0, Value1=0, Value2=999, Comparison=2, Offset=16 //0x8 --> 1f
WINDOW WindowID=1, X=67, Y=137, Width=233, Height=73 //0x10
MESSAGE WindowID=1, DialogueID=121 //0x1a
JMPF Offset=14 //0x1d --> 2c
WINDOW WindowID=1, X=39, Y=153, Width=261, Height=57 //0x1f
MESSAGE WindowID=1, DialogueID=120 //0x29
UC Disabled=0 //0x2c
MENU2 Disabled=0 //0x2e
TURNGEN BankRotation=0, Rotation=164, Direction=2, Steps=15, Calculation=2 //0x30

Into this:

Code: [Select]
string sMyoldmanwas = "“My old man was a miner, but\n he couldn't go to work after monsters \n started appearing in the Mythril Mines.”{New Scr}“Now all he does is sit around\n getting drunk in the bar…”";
string sMydadstill = "“My dad still just sits at the\n bar drinking, even though\n he knows Meteor's coming!”{New Scr}“It's sad. Even though he's an adult,\n he just doesn't want to see\n the world as it really is.\n I dunno what to do.”";

EnableMenuAndMove(False);
TurnToPartyMember(0, 15);
if (PPV > 999) {
ShowMessage(67, 137, 233, 73, sMydadstill);
} else {
ShowMessage(39, 153, 261, 57, sMyoldmanwas);
}
EnableMenuAndMove(True);
TurnSmooth(164, Closest, 15);

It'll extract nested if's and while loops from the instructions; I just really need to finish processing all the various opcodes. Shouldn't take too long, since the code structure is the tricky part, and that's mostly done.

Shard

  • *
  • Posts: 330
    • View Profile
First non-working version
« Reply #6 on: 2015-12-23 18:13:28 »
Ok, I've "finished" the assembly -> script translation part. Anyone who's curious is free to take a look at it and give suggestions. Especially feature suggestions. This is a very, very early version so it's going to be kinda rubbush :P

DelingScript v0.1

Run the jar file, put the Deling assembly code on the right, click the left arrow.

Oh, and the lines with _ before them mean I haven't converted those yet. Eventually every opcode will be supported. That's just temporary.
« Last Edit: 2015-12-23 18:36:23 by Shard »

Shard

  • *
  • Posts: 330
    • View Profile
Re: [FF8] DelingScript
« Reply #7 on: 2016-01-26 00:26:34 »
V0.3 is out. It will convert both ways, and comments in the script are supported. ("//" style)

Not all functions get converted nicely yet. They still work but they look ugly.

I'm mainly looking for bugs at this point. If you convert something back and forth, it should be functionally identical to how it started. If you find a piece of assembly that doesn't convert to how it functionally started, please post the assembly.
« Last Edit: 2016-01-26 00:29:19 by Shard »

gledson999

  • *
  • Posts: 71
  • Listem to my Story, this maybe our last chance ♪
    • View Profile
Re: [PSX/PC] DelingScript
« Reply #8 on: 2019-05-12 20:39:03 »
@Shard can you upload again? The link is off

brucy

  • *
  • Posts: 39
    • View Profile
Re: [PSX/PC] DelingScript
« Reply #9 on: 2019-05-30 08:12:27 »
the link for the version 0.3 is dead , please reupload it

Shard

  • *
  • Posts: 330
    • View Profile
Re: [PSX/PC] DelingScript
« Reply #10 on: 2019-05-30 16:03:47 »
Thanks for letting me know. I'll reupload it the next chance I get.

Shard

  • *
  • Posts: 330
    • View Profile
Re: [PSX/PC] DelingScript
« Reply #11 on: 2019-06-17 15:17:48 »
I updated the link. Apparently all my mediafire links changed.

EditorMaster

  • *
  • Posts: 52
  • Hex Editor
    • View Profile
Re: [PSX/PC] DelingScript
« Reply #12 on: 2021-11-20 15:35:55 »
I cannot edit file game iso like Makou Reactor Tool, I wonder when will make this is tool like Makou Reactor ?