Final Fantasy 9 > FF9 Tools

[PSX/PC] General editor - Hades Workshop (0.50b)

<< < (372/404) > >>

Seramera:
Hello Tirlititi,
thank you for the elaborate answer.
Having built the Randomizer and other stuff, I indeed found out some Variables are used in the back engine.
It got me burst out laughing when i suddenly swapped control with the npc I interacted with. Bugs can be funny creatures. :-D

So the method (that works for me now) is to look for Variables that are already used on the field, but dont interfere with the added use, instead of searching for unused variables.

Here is a little Speak Script that i use to test Battles.


--- Code: ---Function YoungWomanB_SpeakBTN
    ifnot ( IsMovementEnabled ) {
        return
    }
    set VAR_GlobBool_158 = 0
    if ( VAR_GlobBool_159 == 1 ) {
        DisableMove(  )
        if ( VAR_GlobBool_144 == 0 ) {
            DisableMenu(  )
        } else {
            Wait( 1 )
        }
    }
    SetTriangleFlagMask( 127 )
    WaitTurn(  )
    set VAR_GlobUInt8_16 = GetEntryAngle(255)
    TurnTowardObject( 250, 32 )
    WaitTurn(  )
    WindowSync( 5, 2, 2 )
    switch 1 ( GetDialogChoice ) from 0 {
    case +0:
        set VAR_GlobInt16_6 = 0
        set VAR_GlobInt16_4 = 1
        set VAR_GlobBool_21 = 0
        SetTextVariable( 4, VAR_GlobBool_21 )
        SetTextVariable( 5, VAR_GlobInt16_6 )
        SetTextVariable( 6, VAR_GlobInt16_4 )
        WindowAsync( 5, 4, 3 )
        do {
            if ( IsButton(16) ) {
                if ( VAR_GlobInt16_4 == 1000 ) {
                    set VAR_GlobInt16_4 = 1000
                }
                if ( VAR_GlobInt16_4 == 100 ) {
                    set VAR_GlobInt16_4 = 1000
                }
                if ( VAR_GlobInt16_4 == 10 ) {
                    set VAR_GlobInt16_4 = 100
                }
                if ( VAR_GlobInt16_4 == 1 ) {
                    set VAR_GlobInt16_4 = 10
                }
                SetTextVariable( 6, VAR_GlobInt16_4 )
            }
            if ( IsButton(64) ) {
                if ( VAR_GlobInt16_4 == 1 ) {
                    set VAR_GlobInt16_4 = 1
                }
                if ( VAR_GlobInt16_4 == 10 ) {
                    set VAR_GlobInt16_4 = 1
                }
                if ( VAR_GlobInt16_4 == 100 ) {
                    set VAR_GlobInt16_4 = 10
                }
                if ( VAR_GlobInt16_4 == 1000 ) {
                    set VAR_GlobInt16_4 = 100
                }
                SetTextVariable( 6, VAR_GlobInt16_4 )
            }
            if ( IsButton(128) ) {
                set VAR_GlobInt16_6 = ( VAR_GlobInt16_6 - VAR_GlobInt16_4 )
                SetTextVariable( 5, VAR_GlobInt16_6 )
            }
            if ( IsButton(32) ) {
                set VAR_GlobInt16_6 = ( VAR_GlobInt16_6 + VAR_GlobInt16_4 )
                SetTextVariable( 5, VAR_GlobInt16_6 )
            }
            if ( IsButton(8) ) {
                if ( VAR_GlobBool_21 == 0 ) {
                    set VAR_GlobBool_21 = 1
                    SetTextVariable( 4, VAR_GlobBool_21 )
                } else {
                    set VAR_GlobBool_20 = 0
                    SetTextVariable( 4, VAR_GlobBool_21 )
                }
            }
            Wait( 1 )
        } while ( ( !IsButton(196608L) )  )
        break
    default:
        break
    }
    Wait( 5 )
    if ( VAR_GlobBool_21 == 1 ) {
        Battle( 0, VAR_GlobInt16_6 )
    }
    CloseAllWindows(  )
    0xA9( 250 )
    set VAR_GlobBool_158 = 1
    if ( VAR_GlobBool_159 == 1 ) {
        if ( VAR_GlobBool_156 == 0 ) {
            EnableMove(  )
            SetTriangleFlagMask( 255 )
            if ( VAR_GlobBool_144 == 0 ) {
                EnableMenu(  )
            }
        }
    }
    TimedTurn( VAR_GlobUInt8_16, 16 )
    WaitTurn(  )
    return

--- End code ---

--- Code: ---[STRT=100,3][IMME]What u wanna do?
[CHOO=2,1] Go Battle
Nothing

--- End code ---

--- Code: ---[STRT=200,4] [IMME]Increment: [NUMB=6] Destination: [NUMB=5]
startbattlebool: [NUMB=4] (0=no, 1=yes)
[JCBT=START] change startbattlebool
[JCBT=UP] [JCBT=DOWN]Increment[JCBT=LEFT] [JCBT=RIGHT]Destination

--- End code ---

I'll report when I'm stuck elsewhere or have finished sth playable.

stir472:
Hello to the whole community, I wanted to thank you Tirlititi for this incredible tool. I am creating a difficulty mod thanks to your tool and I am learning how to implement npcs. With the latter I have a big problem, when I try to add an npc. I don't know how to add the npc function, for example, if there is Man_A in a scenario and I want to introduce a second NPC called Man_B, I can't change the name of the functions. When you have time can you tell me how I can do it? Thanks in advance. (the english not is my native languaje sorry >.<)

Tirlititi:
Hello stir472.

The name of the function is automatically using the entry's model. You can't change it indeed: it's automatically set when it finds a line "SetModel" in the entry's functions.

In order to add a NPC, first get off the "Edit Script" window and start by adding an entry in the "Edit Entries" window. Set that entry's type to "Object" (I think it is the type number "2" if I recall correctly), remember the newly added entry's ID and confirm.
Then only, go back to the "Edit Script" window and right-click on the function list to add a function. Select the newly added entry and create a function of type "0" (the "_Init" function). In there, add the code to initialize your NPC (you can copy/paste the content of another "_Init" function of an object-type entry and change the positions and the "SetModel" value). Also add a line "InitObject" in the "Main_Init" function to actually initialize it when entering the screen.
Then add whatever code you want for your NPC (most likely, add a function of type "talk button").

Tirlititi:
Update to v0.43.
That's a big update, with several new features, half of which I still don't know why I did them and who will ever really use them...

- Added a Damage Calculator: that's something I wanted for a long time. It doesn't take into account the enemy's elemental boost bug in the PSX version so it can be inaccurate for a couple of enemy attacks depending on the language you play (in PSX, enemies can benefit from elemental boosts but that depends on the language, eg. Sealion has a Water boost but only in the PSX japanese version).

- Added a Walkmesh editor, a Walkmesh OBJ exporter and a Walkmesh OBJ importer. Now walkmeshes can be (almost) fully edited. The editor of the tool is not very convenient or practical, but it allows to change path flags that cannot be passed to an OBJ model. The addition of this editor makes the script editor a bit more convenient regarding the functions "EnablePathTriangle" and "EnablePath" as you can now double-click on the 3D model of the walkmesh to select the triangle/walkpath you want to enable/disable.
Although the walkmesh editor is accessible for both the Steam and the PSX version, it is very buggy on the PSX version and sometimes place newly-added triangles at random positions in-game.

- Added "command" version of the tool. It is a fake command-line version because it still uses an interface but it allows HW to be used by external programs by providing it a sequence of commands written into a file. In the ZIP, I added a file, "CommandSample.txt", that shows how to use this feature and should run fine if you have the Steam version of the game installed.

- Added the options "Memoria -> Export as Custom Field/Battle". These take an existing field or battle and simply create Steam assets (same as "Save Steam Mod" with the option "Raw Assets") with the correct paths and filenames so they can be used by Memoria as additional fields/battles without the need to replace existing ones. I tested a adding a custom field and that worked correctly.
In addition to using that option, creating a custom field/battle requires:
-- reference them in another script, adding a "Field" or "Battle" line using that custom field/battle's script ID,
-- create a file "DictionaryPatch.txt" in your mod folder and copy/paste a line that Hades Workshop provides,
-- for fields, you need to edit the files "[ModFolder]/FF9_Data/embeddedasset/text/[LANG]/location/loc_name.mes" and adding an entry for specifying the custom field's name (these files are generated when you have modified another field name and saved Steam mod with "Raw Assets" and they can be edited with a text editor).
I guess that the convenient workflow for making a mod with custom fields/battles is to have 2 HWS files: one without the custom fields/battles but with all other modifications and the scripts referencing to custom IDs, a the other HWS with only custom fields/battles (because you can't add fields/battles in the lists in Hades Workshop, so you can't have the base field/battle and the custom field/battle simultaneously).
The assets generated this way are not removed when generating a Steam mod (except if you picked the same identifiers as existing fields/battles, which is not advised).

- Added a couple of datas that can be changed in field backgrounds: the depths and positions of tiles (individual tiles or tile sets) can now be changed. I think that most (all?) bug fixes provided by the Moguri mod concerning incorrect tile depths (as described in this topic) could be done using that feature instead of editing the scripts (and potentially make mod compatibility more difficult).

- Fixed several bugs and added several improvements. The world map battle spots or place names should now work correctly (both when saving HWS files and generating Steam mods). "Opening-for-FMV" should not cause any problem anymore. Several script functions were given a name and description instead of the "0xXX" default names. Script batch exporting are a bit better commented because entries are correctly named in the Main_Init function (typically the "InitObject" lines). etc.

rassellek:
Thank you for your work. Tell me please. Is it possible to overcome the limit of hit points for the mark 65535? In the editor, this is the maximum value...  :-(

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version