Author Topic: [PSX/PC] General editor - Hades Workshop (0.40b)  (Read 280390 times)

Tirlititi

  • Freak
  • *
  • Posts: 537
  • Karma: 68
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #225 on: 2014-08-09 09:20:18 »
@ Napha : Ah, ok. I'll check to see what are the differences between those Aera, then. Maybe there are none but usually, there's at least a difference about the camera movements (like in the different versions of Aerial Slash).

@ Isidore : Please check your private messages.

@ everyone : I made the youtube video, it's available here. Sorry for the slowdown ; I tried to fix it but I'm really running on an old laptop at the moment ^^'

Vir

  • Crazy poster
  • *
  • Posts: 101
  • Karma: 4
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #226 on: 2014-09-16 05:37:57 »
Hey, Tirlititi, I am making another mod. I wonder, if I make it as a second ppf and don't change any of the same value (no conflict?), can I make it as two optional mods which work together no problem? Or should I just plan for it to be part of the same mod?

Tirlititi

  • Freak
  • *
  • Posts: 537
  • Karma: 68
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #227 on: 2014-09-16 18:10:56 »
It may have a conflict even if you don't change the same values in these case :
1) You change the name or help text of a spell/command/item/etc... in both mods, even if it is not the same object for both mods (let's say you change the help of "Thunder Slash" in one mod and the help of "Thievery" in the other : it will make a conflict).
2) You edit an enemy (or a text block) in both mods. As long as it's the same enemy (or text block) that is edited, it won't really matter which field (or text line) you changed in both.

If you really don't change things that are not in the same panel, it shouldn't make a conflict.

Anyway, you can simply make two separate mods and save them as two .hws files. Then you import both one after another and create a .ppf patch from then. So you'll have 3 versions : 1 for each mod and 1 for their fusion.


By the way, I'm not working on the program anymore since few weeks. I'm slowly getting used to my new job but that's really time consuming for me :/
I don't know when I'll be back on business here.

Vir

  • Crazy poster
  • *
  • Posts: 101
  • Karma: 4
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #228 on: 2014-09-16 23:53:07 »
Fair enough. I won't expect you necessarily to answer as immediately, then. Thanks for the answer this time, too.

Best of luck with your new job!

demeterf

  • Fast newbie
  • *
  • Posts: 18
  • Karma: 0
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #229 on: 2014-09-24 21:04:13 »
Hy Tirlititi!

I know that I asked before, that you could make an importing feature for the text, but you said that is not your priority.

We have started translating the game by exporting the texts, but it is hard and takes a long time, to copy paste every line one by one
and to resize the text bubble. It would be much faster if you could make an importing feature only for the texts.

But if you don't have time for it, could you please write a little instruction on how to make it, so we could search for
someone who could make ii

Thanks!

Tirlititi

  • Freak
  • *
  • Posts: 537
  • Karma: 68
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #230 on: 2014-09-26 13:59:46 »
I'll see what I can do once I got back to work, but don't expect much... Also, it would only work with µ-written opcodes (so you had to disable the flag "Use extended opcodes").

As for the instruction, the program is open-source. Have fun.
« Last Edit: 2014-10-13 18:50:51 by Tirlititi »

shikulja

  • Fast newbie
  • *
  • Posts: 37
  • Karma: 1
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #231 on: 2014-10-07 00:51:54 »
what about extented space for text? (progress)

eXistenZe

  • Crazy poster
  • *
  • Posts: 239
  • Karma: 4
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #232 on: 2014-10-19 08:37:04 »
Is it possible to convert a ppf to hwf format?

Tirlititi

  • Freak
  • *
  • Posts: 537
  • Karma: 68
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #233 on: 2014-10-19 16:14:43 »
@ shikulja : you mean the extended space text opcode? I'll display those properly once I rewrite the text displaying feature (so it uses the characters directly from the game).

@ eXistenZe : Not fully. You can patch a game, then open it with HW and save as .hws, but it won't save everything. It saves properly everything in the "Party" and "Item" panels but it won't save the enemy datas (even if you enable the corresponding flag) since, from the program's perspective, they haven't been modified. Same for the "Environment" panels.
That's on my todo list to add a solution to that.


I've some time to spare on the program these days. Editing scripts shouldn't be too far away from now.
« Last Edit: 2014-10-19 16:16:37 by Tirlititi »

shikulja

  • Fast newbie
  • *
  • Posts: 37
  • Karma: 1
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #234 on: 2014-10-19 17:33:42 »
not. I wanted to say. to be able to write more text. i.e. disable limit

Tirlititi

  • Freak
  • *
  • Posts: 537
  • Karma: 68
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #235 on: 2014-10-19 18:07:43 »
Ah...
Not yet either I'm afraid ^^'

I have yet to find the pointers to this kind of datas. Not that I actively search for them but it's been an unknown for me since a long time.

eXistenZe

  • Crazy poster
  • *
  • Posts: 239
  • Karma: 4
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #236 on: 2014-10-21 17:16:13 »
Hey guys...

Another run through FF9 and having some fun with this tool...
Since I don't actually like any of the current mods available (way many abilities broken or badly implemented), I'm kinda cheating and removing some abilities from my least used chars to boost my preferred ones...

Since this will most likely break the difficulty of the game, is there anyone who has actually created a difficulty mod where I can import the monster data from? Like HP + 100% to all enemies and other boosts?

Best regards,
xz

[edit]
When I add a blue magic to a char pool and the respective item/weapon, they can equip it, use it, learn it, but the learn % never shows the actual numbers, just the progression bar. Any idea why?

[edit2]
More bugs found.
When I add Might to a char like zidane or steiner, no matter what animation I give them, it will never show.
Some changes with abilities apparently bug other ones. I never changed the cure spell or anything related to it, but dagger is unable to cast it in battle(it does not show in battle menu, despite being learned and cast through main menu...
« Last Edit: 2014-10-22 15:52:04 by eXistenZe »

eXistenZe

  • Crazy poster
  • *
  • Posts: 239
  • Karma: 4
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #237 on: 2014-10-24 15:45:16 »
Vacation time, I guess...

Tirlititi

  • Freak
  • *
  • Posts: 537
  • Karma: 68
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #238 on: 2014-10-24 22:49:11 »
Haha ^^
Yes I'm in vacation, but I'm still around. I just didn't see your edits.

About the blue magics, I didn't notice it. I have no solution for that but using other spell slots instead of making a blue magic learnable. Thanks for warning, though. I add it to my todo list ^^'

About Might and Cure, I never had this problem. Might works fine for me if it's used by Zidane or Steiner and Cure should be usable by Dagger as long as it remains in her "White Magic" command and she keeps that command in her command list.

eXistenZe

  • Crazy poster
  • *
  • Posts: 239
  • Karma: 4
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #239 on: 2014-10-25 12:09:03 »
Blue magic % is a minor bug...

Might is a weird one. Zidane takes a step forward and nothing happens, no matter the animation I choose...

Cure is the problematic bug... I never touched the spell, it's place in the command list or it's "learnable" position... She can learn it and use it by main menu, just not in battle.

When you return from vacation can I send you my hws for you to check?

[Edit]
It's not only cure. It also affects cura, curaga and regen. And it's not about their position in the command list. Cure in the bottom of the list does not show and protect in the begining works.
« Last Edit: 2014-10-26 10:24:55 by eXistenZe »

Tirlititi

  • Freak
  • *
  • Posts: 537
  • Karma: 68
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #240 on: 2014-10-28 21:56:24 »
@ eXistenZe : Yes, send me your .hws. I'll check it.

Update to 0.26 !
What's new :
- You can fully edit the game scripts. Also, you now have access to the World Map's script except for the japanese version which I have troubles with. The syntax ressembles to the C syntax with some significiant differencies (see below),
- Added an option for displaying texts in a nicer way (without the opcode symbols) in previews.
- Added a button in the text editing window to automatically compute the size of the dialog box. It's not 100% reliable but it's still fairly accurate.

About the game script, here is what I added in the "Help" window :

Code: [Select]
The game script handles scripted events, enemy AIs and other related stuffs.

The script is presented with a kind of C-like syntax. There are several differences though.

[General]
The language accepts only one instruction per line.
Lines are not terminated by any punctuation character.
For flow control statements, the braces are mandatory.
You can't use braces out of a flow control statement.
There is no such thing as real values. Everything is done using integers (sometimes signed).

Once you have modified a function's script, you must parse it to check eventual errors.

[Flow Control]
The different keywords for controlling the script's flow are described here.

if : usual If/Then statement with an optional Else. The syntax is

if ( CONDITION ) {
    CODE
}

or

if ( CONDITION ) {
    CODE_A
} else {
    CODE_B
}

Note that the opening braces must be on the same line as the keywords "if" and "else".

ifnot : opposite control of if. It works similarly though. The syntax is

ifnot ( CONDITION ) {
    CODE
}

while : usual While statement. You can use the keyword "break" to leave the control but there is no such thing as a "continue" instruction. The syntax is

while ( CONDITION ) {
    CODE
}

do/while : usual Do/While statement. You can also use the keyword "break" to leave the control. The syntax is

do {
    CODE
} while ( CONDITION )

switch : a Switch statement with consecutive cases only. The first case's value is specified in the control, as well as the maximal amount of cases. The syntax is

switch NB ( VALUE ) from FIRST {
case +INC:
    CODE_A
case +INC ; +INC:
    CODE_B
default:
    CODE_C
}

where
NB is the maximal amount of cases,
VALUE is the control expression,
FIRST is the "+0" case,
INC are numbers strictly lower than NB.
Note that, like in C, you have to use the keyword "break" if you want only one branch to be run and that the "default" case is optional.
The semicolon allows to make several values lead to the same code branch.

switchex : a more usual Switch statement. The exact amount of cases (default case excluded) must be provided in the control. The syntax is

switchex NB ( VALUE ) {
case X:
    CODE_A
case Y ; Z:
    CODE_B
default:
    CODE_C
}

NB being the amount of cases and X, Y and Z representing numbers. The keywords "break", "default" and the semicolon have the same purpose than for the "switch" statement.

loop : rerun the whole function. It works as an alternative to a last "RETURN" instruction and can only be used out of any other control block.

[Variables]
You can not declare variables. There is a limited amount of them, some being globals shared accross different field scripts, some being locals initialized to 0 when the script code is loaded.
For what I know,
- local variables are the ones named "VAR_A" "VAR_B" followed by 2 numbers. The second number works as an array operator,
- usual globals variables are the ones named "VAR_D",
- global variables that are saved in a memory card save are the ones named "VAR_C",
- "MV" and "SV" variables are special globals that are also shared by the game's mechanics (such as the battle code or the deplacement code).
- There are also Getters to retrieve values from the other game's mechanics that can't be directly modified (such as the player's gils amount).

In order to manipulate variables, you must use the instruction "SET" followed by a series of operations over the variables. Some of those operations are still unknown.
Besides the usual operations, you have "^" that marks the binary XOR operation and "#" that is an unary operator counting the amount of active bits.
The brackets are more of a structure's field accesser than a real array operator. They will be displayed differently in a next version.
Note that the minus operator can't be read as an unary operator yet. Only positive integers can be used in variable manipulation codes.

WARNING : at the moment, the operation priorities are not respected. By default, the operations will be executed from right to left. It is advised to write all the parentheses.

Variable manipulation codes can also be used in most of instructions's arguments.

You can change quiet a lot of things now. The content of the chests, the game dialogs, mini-game mechanics, etc... The scripting language may be a bit ascetic :/ I guess I would have had way more work if I wanted to make it more flexible.

Here is an example I made (a patch for the Disc 1 of the US version - just start a new game once patched) :
download patch example
It took me some time, though. It's still tedious. But way way less than editing the thing with an hexadecimal tool ^^

There is a limitation I'm willing to remove for the next version : you are limited for using only preloaded datas. You can't use a model if it is not present (hidden or not) in the original game in the field you want to use it. That also goes for model animations or fields (you can't jump from any field to any other field) or for battles.
In fact, I already passed by this limitation in the "hidden dialogs" patch I made. I need to work just a little bit more to automate the process. I guess I'll make available the choice of which datas are preloaded in a field (and a battle -> you'll finally be able to change an enemy's model).

Ah yes, something I forgot to mention in the help : the array of variables (the second number in "VAR_A10_10" for example) is of size 256 for variables of type A, B and SV and is 65536 for C, D and MV. I also forgot to throw an error if you enter something higher... You'll end up with an array re-ajusted between 0 and 255 without being noticed of that.

Also, here is a list of the fighter structure fields I know (If you see "SV_FunctionEnemy[38]", for instance, that refers to the enemy's current MP). They appear only as raw number in the program :
Code: [Select]
[32] : Enable back presence flag
[33] : Disable presence flag
[35] : max HP
[36] : current HP
[37] : max MP
[38] : current MP
[39] : max ATB
[40] : current ATB (Only player characters maybe)
[41] : level
[42] : status immune (Heat - Gradual Petrify)
[43] : status immune (Petrify - Protect)
[44] : auto status (Heat - Gradual Petrify)
[45] : auto status (Petrify - Protect)
[46] : current status (Heat - Gradual Petrify)
[47] : current status (Petrify - Protect)
[48] : elemental immune
[49] : elemental absorb
[50] : elemental half
[51] : elemental weakness
[54] : shadow flag?
[55] : model size
[59] : Disable model flag
[60] : Enable back model flag
[65] : line position (not to confuse with "row position" ; that's the ordering of the fighters from 0 to 3)
[73] : magic power
[74] : defence
[75] : evade
[76] : magic defence
[77] : magic evade
[78] : marthym order flag (change its value to cast Marthym !)
You can totally modify them in battle script (the game does that for turning Ozma's darkness absorbtion into a weakness, for instance).
By the way, the reason why I display integer values as a base 64 numbers (among other display modes) is that most of enemy AIs use this base for the setup of their spell (how them casting is randomized is quiet complicated ^^). It has importance for the values in the AI setup.

I would be surprised if there isn't any bug, but not with the most common opcodes and stuff.
If you find one or if you have any question, please tell me.

I would like to thank yaz0r, a french fellow who works on a script dumper and who helped me for this (if you have convenient names for some functions, it's thanks to him for instance ^^).
« Last Edit: 2015-02-21 19:44:16 by Tirlititi »

Baby5

  • Fast newbie
  • *
  • Posts: 7
  • Karma: 0
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #241 on: 2014-11-24 12:16:03 »
MP Multiplier of Spells:
0 = Nothing special
1 = Can be used in menu(such as Cure). Does nothing & waste mp if you allow some commands(such as Flare) to be used on a party member in menu.
2 = Blue Magic(this skill may be obtained by Eat/Cook). Character must have skill available in Ability set.
3 = No idea, havent tested. Not used for anything by the game though.
4 = Makes MP cost 4x the amount. Used on Garnet's Eidolons.

For example, if i swap Ifrit's MP Multiplier from 4 to 1, Ifrit's MP cost becomes 26(the regular amount) and becomes usable from the menu. Since Ifrit does nothing in terms of "Heal/Status/Revive", the character just wastes 26 MP.

Tirlititi

  • Freak
  • *
  • Posts: 537
  • Karma: 68
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #242 on: 2014-11-24 17:52:33 »
Oh my god, thank you so much for this point :O

I think I just tested the value 3 on Garnet's eidolons and saw the multiplication went down to 3 times the MP amount.
The flag 2 may be the fact that you don't see figures when you are learning the ability. That's not something that can be seen in regular games but the Blue Magics don't display the AP on the learning bar ("35/40" for instance ; it's replaced by 3 stars when you have fully learned the ability). eXistenZe was having this problem : I think you just gave him the way to fix it ^^
Indeed, there are few effects that can be used in menu.

I'll investigate that more thoroughly. Thanks a bunch again !
« Last Edit: 2014-11-24 17:54:14 by Tirlititi »

ZackNeji

  • Fast newbie
  • *
  • Posts: 10
  • Karma: 2
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #243 on: 2014-12-18 11:17:57 »
I have a problem.
I want to make the same as hidden dialogs patch in the spanish version.

But in Steiner in Prima Vista scene (Prima Vista/Storage -> Function func_0_1) gives me this error:  "- Not enough space : data is 21636 bytes too heavy."

This error apears without changing anything, and if I change a value, the program don't make any real change when I save it.

Any solution?

Sorry for my english.

Tirlititi

  • Freak
  • *
  • Posts: 537
  • Karma: 68
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #244 on: 2014-12-18 16:58:58 »
Indeed, the script editor has a kind of bug (harmless but it sometimes screw the data space required by a function) : some switch/ex control cases have redundant operations.

In this case, you have switches in this function that ressemble to this :
Code: [Select]
switchex 14 ( VAR_B9_239 ) {
case 206:
    some_code_A...
    FIELD( 206 )
    some_code_B...
case 200:
    same_code_B...
The code B is redundant in the first case because the "FIELD" opcode should be handled like a "RETURN"...

I'm aware of the problem and hopefully it will be fixed in the next version.

I'm in holidays tomorrow ; I'll have a bit more time for the program so I guess the next version will come out soon. It will also enable the edition of preloading datas, which is compulsory for making a patch like "Hidden dialogs" (for the Linblum's part).

So I can only tell you to wait a bit 'till I fix the problem, sorry. You're looking at the very right place for Steiner's dialog, congrats ^^

ZackNeji

  • Fast newbie
  • *
  • Posts: 10
  • Karma: 2
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #245 on: 2014-12-18 17:32:30 »
Thanks, I keep waiting ;). You are doing a great great work.

I have another question (less important).
I already added the dialogs between Vivi and Puck. All gone well, but when Puck talks (not Vivi beacuse his texts are in his function) the new text boxes appears over Puck and cover him. I don't know why this happends. Can you tell me why?



Thx.

Tirlititi

  • Freak
  • *
  • Posts: 537
  • Karma: 68
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #246 on: 2014-12-18 19:04:18 »
I didn't even see that dialog was still in the script ! It's not in my Hidden Dialogs patch ^^"
I'll look into it. It might be related to the window's flag UI argument in the "WINDOW" or "DIALOG"s opcodes.

ZackNeji

  • Fast newbie
  • *
  • Posts: 10
  • Karma: 2
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #247 on: 2014-12-18 23:12:02 »
I didn't even see that dialog was still in the script ! It's not in my Hidden Dialogs patch ^^"
I'll look into it. It might be related to the window's flag UI argument in the "WINDOW" or "DIALOG"s opcodes.

The dialog is not in the script, only text. I added it into the script. I'll look the UI options, thx.

If you want the script modifed to add the conversation, here you have it:
viviPuckDialog.rar

The both goes in "Alexandria/Rooftop"

The script is the spanish one, but I thing that works in USA or french ver. as well ;)
« Last Edit: 2014-12-19 00:23:34 by ZackNeji »

Tirlititi

  • Freak
  • *
  • Posts: 537
  • Karma: 68
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #248 on: 2014-12-19 21:55:30 »
Ah ok, I wondered ^^

I guess the dialog was initially meant to be placed after they reach the castle's wall, since the texts are after the “After this wall, we'll be inside the castle!”. That's why I didn't add them in Hidden Dialog.
Though it makes sense to have the dialog here.

ZackNeji

  • Fast newbie
  • *
  • Posts: 10
  • Karma: 2
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #249 on: 2014-12-20 00:02:25 »
You're right. I look to add there to see how it looks^^