Please login or register.

Login with username, password and session length
Advanced search  

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.

Pages: [1]
Named Generic Unit
Satoh [Posts: 17]
  • View Profile
  • share
  • [September 05, 2017, 03:30:46 AM]
Miluda, a simple world map instruction de/constructor
« on: September 05, 2017, 03:30:46 AM »
Ok, so, all this really does is convert a set of world map instructions in hexadecimal to a readable format.
It has some error checking, but it's probably not the best.

Ideally you would only input properly formatted instructions in and it will convert it to something you can read a little easier.
It also has an instruction formatter, which will guide you through what information is needed for an instruction, and generate the instruction when it has all the info it needs.

It will NOT read the wldcore.bin instruction header or calculate space and offsets for you, you're still better off using a spreadsheet for that for now...
but now you can at least check your work on what you're adding to the spreadsheet to ensure that it is good code.

This is currently a very young version of this project, and time permitting, I may expand and update it. Until then, its one slightly smaller hassle than you had before, if you do story mods.


I'm sure I haven't thought of EVERY possible user error or flawed code entry, but, as far as I've tested, I've worked out all the breakages from proper code entry. Please let me know if you get some huge error.

Everything is hard coded for now, but I may add a config file for customized text output later.
Coded for .NET 3.5, hopefully by now you all have that... unlike 4.6.7 which I had to install a few days ago and was a pain.

EDIT: Just making sure I uploaded the correct release.
The Puppet ---Master---
Elric (Overseer) [Posts: 3820]
  • View Profile
  • Youtube Channel
  • http://steamcommunity.com/id/Bones42
  • share
  • [September 05, 2017, 03:27:20 PM]
Re: Miluda, a simple world map instruction de/constructor
« Reply #1 on: September 05, 2017, 03:27:20 PM »
Good job, I'll test this out in a bit.

    • Modding version: PSX
  • <@Angel> Teach a man to fish and he'll open up a fishery to compete against yours.
    Journey of the Five Youtube ChannelThe Lion War Current Status
       
    Jot5 Leader :: Eventer :: OtherTLW Leader :: Eventer :: Other
    Toshiko
    Angel (Empress) [Posts: 1229]
    • View Profile
    • にゃにゃめにゃにゃじゅうにゃにゃどのにゃらびでにゃくにゃくいにゃにゃくにゃにゃはんにゃにゃだいにゃんにゃくにゃらべてにゃがにゃがめ
    • share
    • [September 05, 2017, 06:24:16 PM]
    Re: Miluda, a simple world map instruction de/constructor
    « Reply #2 on: September 05, 2017, 06:24:16 PM »
    It may seem minor to you, but tools for story mods are so very welcome. Thank you for this.

    • Modding version: PSX
  • * Angel should quit being a lazy bitch
    <@Elric> I agree to that as well
    At the end of the day, are we not all trapped inside lemons?
    French Maid
    Xifanie (Webmistress) [Posts: 4235]
    • View Profile
    • Final Fantasy Hacktics
    • http://steamcommunity.com/id/Xifanie
    • share
    • [September 05, 2017, 10:32:35 PM]
    Re: Miluda, a simple world map instruction de/constructor
    « Reply #3 on: September 05, 2017, 10:32:35 PM »
    Going with your current format, I'd probably go with something like (with let's say Gariland):
    IF Var 0x006D == 0x0000 && Var 0x006E == 0x0001 THEN Text 0x0000
    IF Var 0x022F == 0x0000 && Var 0x006E == 0x0001 THEN DrawPath 0x06 - 0x18
    IF Var 0x0218 == 0x0000 && Var 0x006E == 0x0001 THEN DrawLocation 0x18
    IF Var 0x022D == 0x0000 && Var 0x006E == 0x0001 THEN DrawPath 0x18 - 0x02
    IF Var 0x0202 == 0x0000 && Var 0x006E == 0x0001 THEN DrawLocation 0x02
    IF Var 0x006E == 0x0001 THEN LoadEvent 0x000D (0x0002)

    Even better would be with variable, paths, and location name customization:
    IF Var "Call Worldmap Message" == 0x0000 && Var "Storyline Progression" == 0x0001 THEN Text 0x0000
    IF Var "Gariland <-> Mandalia Path" == 0x0000 && Var "Storyline Progression" == 0x0001 THEN DrawPath "Gariland" -> "Mandalia Plains"
    IF Var "Mandalia Plains" == 0x0000 && Var "Storyline Progression" == 0x0001 THEN DrawLocation "Mandalia Plains"
    IF Var "Igros Castle - Mandalia Plains" == 0x0000 && Var "Storyline Progression" == 0x0001 THEN DrawPath "Mandalia Plains" -> "Igros Castle"
    IF Var "Igros Castle" == 0x0000 && Var "Storyline Progression" == 0x0001 THEN DrawLocation "Igros Castle"
    IF Var "Storyline Progression" == 0x0001 THEN LoadEvent 0x000D (0x0002)

    Although at that point it might be better to have one per line:
    Var "Call Worldmap Message" == 0x0000
    Var "Storyline Progression" == 0x0001
    Text 0x0000
    ---
    Var "Gariland <-> Mandalia Path" == 0x0000
    Var "Storyline Progression" == 0x0001
    DrawPath "Gariland" -> "Mandalia Plains"
    ---
    IF Var "Mandalia Plains" == 0x0000
    Var "Storyline Progression" == 0x0001
    DrawLocation "Mandalia Plains"
    ---
    Var "Igros Castle - Mandalia Plains" == 0x0000
    Var "Storyline Progression" == 0x0001
    DrawPath "Mandalia Plains" -> "Igros Castle"
    ---
    Var "Igros Castle" == 0x0000
    Var "Storyline Progression" == 0x0001
    DrawLocation "Igros Castle"
    ---
    Var "Storyline Progression" == 0x0001
    LoadEvent 0x000D (0x0002)

    Of course, with the option to edit sets or individual lines.

    • Modding version: PSX
  • <R999> My target market is not FFT mod players
    <Raijinili> remember that? it was awful
    Named Generic Unit
    Satoh [Posts: 17]
    • View Profile
    • share
    • [September 05, 2017, 11:58:43 PM]
    Re: Miluda, a simple world map instruction de/constructor
    « Reply #4 on: September 05, 2017, 11:58:43 PM »
    That's certainly something I'd like it to do in the future, and I'm continually trying to think through the efficient process of linking all the instructions together intelligently, such that one instruction knows what the previous instruction just did, for linking multiple conditions...

    But right now its simply a dumb text parser based on an admittedly messy dictionary setup.
    A prototype at best, but one that was more or less usable for smaller things.

    I did notice something I forgot to check for in the current r0 release... I didn't check that information typed into those comboboxes at the bottom were proper numbers... so... be responsible and don't just start typing sentences in there for now?

    I'm currently working on a more intelligent set of classes to (hopefully) be able to do something more meaningful with the actual WLDCORE...
    That said, I can't guarantee I'll succeed, or that I'll be able to show that off anytime soon if I do.
    It'll take a while, and the way the WLDCORE headers work is... not what I would consider optimal.
    The instruction header is in two stages, which you, Xifanie, are probably aware of...
    The first stage is 44 shorts, one for each location in the game, each leading to a point in the second stage of the header. That second stage is a collection of more offsets, each leading to the start of a full map instruction... the list appears to be terminated with a 0x0000 null short...
    However, as there is no point in the header structure that actually lists how long any of these lists or instructions are, its a but of a mess trying to confirm those lengths.

    If I parse that header iteratively, I'd have to continually be checking that each short I read isn't overlapping somewhere else, just to determine if I've actually reached the end or not...

    Which in non-programming/reverse engineering terms, is a pain in the rear.

    tl;dr version:
    I'm working on it =p

    EDIT:
    Well I have it all read into a class structure now at least... coded myself into a corner as to how to make it alterable though...
    « Last Edit: September 13, 2017, 12:25:56 PM by Satoh »
    • Modding version: PSX & WotL
  • Pages: [1]