• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
March 18, 2024, 11:01:40 pm

News:

Don't be hasty to start your own mod; all our FFT modding projects are greatly understaffed! Find out how you can help in the Recruitment section or our Discord!


App: FFT OrgASM XML Generator v1.3 - Prettified, Uniform, Easily Scanned XML!

Started by RavenOfRazgriz, September 10, 2011, 02:22:56 am

RavenOfRazgriz

Having a hard time formatting your hacks to be used with FFT OrgASM and have no clue what the fuck to do?

Nay, I say.  Just download this simple application and input the data for the ASM you're trying to use into it, and it'll output an XML file that OrgASM can process.  If you place it in the same folder as your FFT OrgASM, it'll even ask you if you want to run OrgASM immediately upon closing as a convenience feature.  The default location options should be enough to cover just about any existing hack you'd use OrgASM for, but I can easily update them if needed and the app will accept your own custom locations, though it'll give you a warning to verify it's what you want.  It also has more editing windows a button-press away if you're trying to OrgASM-up a large hack - up to 25 fields!  If someone makes a hack that needs more than 25 fields... first, bless them, then let me know so I can update this with more fields, since it's pretty easy.

Use and enjoy, broskis.  It'll concatenate each hack you add to the end of your My Hacks.xml, so don't worry about overwriting anything when using this!

Cheetah

I have done hardly any ASM stuff, but this is looking cool.
Current Projects:

Mando

Somehow I feel this was created for a someone I know, who goes by ____ hooves ;D

Otherwise nice layout! I prefer this :O! Does it do formatting as well? I like to keep my xml sheets pretty organized.

^ New FFAT website made by St4r!

RavenOfRazgriz

This was mostly created so I could get a bit of practice messing with XML files through VB (and in turn, indirectly verify that my PSX Events.txt editing option on EasyVent Editor Super Perfect works), and so that I could mess with showing/hiding certain controls.

What do you mean by formatting?  The output looks like:

<Patch>
<Description>Text</Description>
<Location>
Hex
<Location>
</Patch>

This is then concatenated to the bottom of the My Hacks.xml file.  If you mean your hex not looking sloppy, just don't input it as looking sloppy and it won't be output as such.

Mando

I was just saying that because when you use your sheets, the lines of hex are very long and not seperated each 6 characters, (which I cannot complain since you made life easier)

That is why I was curious though ^^

^ New FFAT website made by St4r!

Glain

The standard, as far as I've been able to tell, for those XML files, is to indent two spaces for each inner level. So:

<Patches>
  <Patch>
    <Description>Text</Description>
    <Location>
      Hex
    </Location>
  </Patch>
</Patches>

That'd be useful, to keep the correct formatting. Otherwise, I'd prefer doing it by hand. A big file of patches without any space indenting? D:
  • Modding version: Other/Unknown

RavenOfRazgriz

Quote from: Mando on September 10, 2011, 07:09:41 pm
I was just saying that because when you use your sheets, the lines of hex are very long and not seperated each 6 characters, (which I cannot complain since you made life easier)

That is why I was curious though ^^


They're long like that because it's far easier to format them that way then the standard Word per line format, at least in terms of the Shop fixes and stuff where I'm building all the code myself.  It looks messy but it doesn't affect performance and I don't feel like dropping 2 hours to make something no one will ever see look pretty.

But yes, the hex will be formatted however you drop it into the box.  You want it pretty, make sure its pretty before you push the button.

Quote from: Glain on September 10, 2011, 07:37:38 pm
The standard, as far as I've been able to tell, for those XML files, is to indent two spaces for each inner level. So:

<Patches>
  <Patch>
    <Description>Text</Description>
    <Location>
      Hex
    </Location>
  </Patch>
</Patches>

That'd be useful, to keep the correct formatting. Otherwise, I'd prefer doing it by hand. A big file of patches without any space indenting? D:


I can easily make the program do that for at least the tags as a quick v1.1 release when I'm less lazy.

However, this program already concatenates a new line before it adds your newest patch, so it ends up looking like:

<whatever the fucking XML header is here>
<Patches>
<Patch name="My Little Pony">
<Description>Fuck it I'm not finishing this meme.</Description>
<Location file="FUCKTHEINTERNET_BIN" offset="Yourmom0">
00000000
</Location>
</Patch>

<Patch="Glain's really picky!">
<Description>Meh, changing it's easy anyway."</Description>
<Location file="FORMATTING_OCD_OUT" offset="yuhateme">
00001000
</Location>
</Patch>
</Patches>

The only thing I wouldn't be able to make indent is the hex unless I made an infinite-entry array that split your Hex every 8 characters on a loop then concatenated spaces to it... which I guess wouldn't be hard either. 

If people really care I'll add that to a v1.1 release.

Glain

September 10, 2011, 08:34:09 pm #7 Last Edit: September 10, 2011, 08:35:00 pm by Glain
Your example patch name is quite catchy! I believe we may share that trait. I find it comes with the territory of programming, though... you have to pay attention to detail.

The spacing between patches looks good. Come to think of it, I'd probably also do the <Description> tags as separate lines. Looks better if you've got a long description... Not sure about formatting the hex itself. Seems like the user's job (or they could paste from my encoder :D), but as a matter of convenience, it might not be a bad idea.

Why use an infinite entry (dynamic expansion?) array, if you could do something along the lines of... (syntax may be a bit off here, as I'm a bit rusty with basic)

FOR i = 1 to txtHex.Text.Length
 ' (Maybe skip spaces or something; worry about formatting, whatever)
 Write txtHex.Text.Chars(i) to file (or string, or what have you)
 If (i Mod 8 = 0)
   Write newline to file (or string, or what have you)
NEXT i
  • Modding version: Other/Unknown

RavenOfRazgriz

Basic's turned over to VB.NET the last couple years, so your rustic knowledge may not have been as useful as you hoped.  (That, and I already finished it before seeing your post, hah.)  You can't do Control Arrays anymore, for example, which made the initial build of this far more annoying to make than it should've been since Control Arrays were the only thing I remembered from my VB class back in 06-07.  I've got it all worked out though, I did a small array that I just expand to fit the length of your hack, then reconcatenate your hack back together and add it to the Hex(Count) array, wee.  (This entire program is just a giant loop, hence why there's so many arrays.)

v1.1 release JUST FOR YOU, Mr. Glain.

The output now looks like:


<?xml version="1.0" encoding="utf-8"?>
<Patches>

 <Patch name="12345678">
   <Description>12345678</Description>
   <Location file="12345678" offset="12345678">
     12345678
     12345678
     12345678
     12345678
     12345678
     12345678
     12345678
     12345678
     12345678
     12345678
   </Location>
 </Patch>


 <Patch name="12345678">
   <Description>12345678</Description>
   <Location file="12345678" offset="12345678">
     12345678
     12345678
     12345678
     12345678
     12345678
     12345678
     12345678
     12345678
     12345678
     12345678
     12345678
     12345678
     12345678
     12345678
     12345678
     12345678
     12345678
     12345678
     12345678
     12345678
   </Location>
 </Patch>

</Patches>


There.  You should be satiated now.  This'll also auto-break it into Words by default no matter how you input it.

Okay, I fixed that issue.  We all good now, you should always get the above output, etc.  Now quit yer bitchin.

Glain

Very nice. :D

I sorta handwaved VB.NET and BASIC all together in one category. Hard to really give an algorithm without knowing the code you're dealing with, though.

But yes, I enjoy that change quite a bit. Good stuff!

  • Modding version: Other/Unknown

RavenOfRazgriz

Version 1.2 release. Bugfix on SCUS writing, was writing to SCUS_942_42_21 instead of SCUS_942_21, added OPEN.BIN, ENTD1.BIN, ENTD2.BIN, ENTD3.BIN, ENTD4.BIN, ENTD5.BIN, and maybe something else random I already forget.

Enjoy kiddos.


RavenOfRazgriz

And here's a version 1.3 for all you unappreciative pricks who bothered to download this and couldn't be asked to make a post saying that the saving routine had an error when setting your file name.  Enjoy.  Should be pretty bug-free now.

Pride

Would you be able to have you choose the file name you save it as and the location? Would be nice to have that function.
  • Modding version: PSX
Check out my ASM thread. Who doesn't like hax?