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

Tirlititi

  • Freak
  • *
  • Posts: 537
  • Karma: 68
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.38)
« Reply #975 on: 2018-01-26 11:05:25 »
That may be because of that, yes. It is very easy to make your mods compatible with the HD backgrounds though. First of all, the CSharp is the only file causing problems: the p0data1X.bin are not problematic to HW. Then, for creating a mod that is compatible with HD backgrounds, open a non-modded game (or with only the p0data1X.bin swapped), go to the CIL Code -> Macros panel, then "Custom Backgrounds".
Once you're there, change the "Resolution" parameters from 32 (normal backgrounds) to 64 (upscaled backgrounds) and click on "Apply Macro". Now when you'll create the Steam Mod files, the CSharp.dll will also contain what is needed for the HD backgrounds.

Something else to know about HD backgrounds and HW: if you opened a game with the modded p0data1X.bin, containing the upscaled backgrounds, you should better go to "File -> Preferences" and change the Steam's background resolution to 64 as well. It has no effect on the mods you create, but it will display the backgrounds correctly (and HD) when viewing them in the "Fields" panel. In exchange, the loading of this panel is a bit slower, which can be boresome because it's already slow with normal backgrounds.

ste459

  • Fast newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.38)
« Reply #976 on: 2018-01-27 07:42:00 »
I've just googled around and it seems no one knows the reason for the indeed much lower encounter rate of the steam version. Damn, that's an even bigger bummer to my plans. So the only option is to manually go through each field and increase the encounter rate to somehow restore the battle frequency of the original PSX game (more or less)? That'll be quite tedious, but I guess there's no way around it if I don't want to remain constantly underleveled.


Hi Tirliti, I have the same question of Kefka. Actually the only way to increase random battle encounter is to manually edit all fields with a random battle?

I've seen the code you posted on GameFaqs:

if (sMoveKey && !IsNearlyZero(DistanceFromLastFramePos)) {
. . sEncountTimer += DistanceFromLastFramePos * FieldWorldMapFactor;
. . if (!Cheat.IsNoEncounter && usercontrol != 0 && sEncountTimer > 960) {
. . . . sEncountTimer = 0f;
. . . . sEncountBase += encratio;
. . . . if (random8() < sEncountBase/8) {
. . . . . . sEncountBase = 0;
. . . . . . TriggerRandomBattle();
. . . . }
. . }
}

Could the problem be fixed by editing this code? And if so, how I can do this?
« Last Edit: 2018-01-27 07:43:57 by ste459 »

Kefka

  • Crazy poster
  • *
  • Posts: 154
  • Karma: 8
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.38)
« Reply #977 on: 2018-01-27 13:55:49 »
That sounds good, I'll wait for an update then before I import texts.

Two more questions for you, Tirlititi:

1) In the thread at gamefaqs, you posted the random encounter formula:

Quote
if (sMoveKey && !IsNearlyZero(DistanceFromLastFramePos)) {
. . sEncountTimer += DistanceFromLastFramePos * FieldWorldMapFactor;
. . if (!Cheat.IsNoEncounter && usercontrol != 0 && sEncountTimer > 960) {
. . . . sEncountTimer = 0f;
. . . . sEncountBase += encratio;
. . . . if (random8() < sEncountBase/8) {
. . . . . . sEncountBase = 0;
. . . . . . TriggerRandomBattle();
. . . . }
. . }
}

Since you seem to know where this formula is, is it possible to edit it with the CIL code to increase the encounter rate in general (maybe lower the 960 like you suggested in that thread)? This would be far simpler than going through each field file individually.

2) Is it possible to import save files from the PSX version, or do I have to start over? (Well, I would have started over anyway, but having various saves throughout the game would really help with playtesting certain changes).

Tirlititi

  • Freak
  • *
  • Posts: 537
  • Karma: 68
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.38)
« Reply #978 on: 2018-01-28 17:04:12 »
Alright, found it back.
So it's in the CIL code method "EventEngine::ProcessEncount". That's the "ldc.r4 960.000000" line, as you'd have guessed.
Note that the code that you quoted there is not exactly the code in the engine, but a summary of it (the real code lies in different methods, amid other stuff in the field's and world map's main loop).
But yeah, lowering this number seems the best option to me.

Warning: I just saw that, in the CIL code, there's some "INVALID" lines, meaning that the method uses some assembly code that I didn't register for some reason.
When editing the method, also replace the last 5 lines by these (normally, IL_00A8 should point to the last "ldc.i4.0" and IL_00A9 to "ret"):
Code: [Select]
ldc.i4.0
beq.s IL_00A8
ldc.i4.1
br.s IL_00A9
ldc.i4.0
ret

For PSX saves, I think that gjoerulv's Memoria tool can do the conversion.

Kefka

  • Crazy poster
  • *
  • Posts: 154
  • Karma: 8
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.38)
« Reply #979 on: 2018-01-28 19:11:42 »
Thanks a ton, I'll definitely try that out! On another topic that ste459 has mentioned a couple posts ago, the Regen status:

Quote
@ste459: Controlling the ATB that accurately is not possible with Hades Workshop. It is possible with Albeoris's Memoria but you'd need to recode part of the engine for that.
However it is indeed possible to increase the Regen frequency, with both HW and Memoria. In HW, you go to CIL Code, search for the method "btl_stat -> SetOprStatusCount" and remove that part of the code:
Code: [Select]

ldarg.0
ldfld 0x400022A   // BTL_DATA::elem
ldfld 0x400080F   // ELEMENT::wpr
sub

It's the four lines under a "ldc.i4.s 60". The Regen frequency formula is indeed "Frames to wait = (60 - wpr) << 2", which is, in a more standard writing, "(60 - Spirit) * 4". Removing these four lines will remove the spirit part so you will always regen with the same frequency (the overall duration is something else and will still increase though). You may change the number in "ldc.i4.s 60" to adjust it if you think it's too slow (or too fast).

@Incinerator: I was bugged by the task of giving a precise answer but replying to ste459 gave me one : if you use regen on a character with 60 spirit or more, the formula above goes to negative which can either mean regen will never trigger or it will trigger every single frame (having a quick look at the code, I would incline to the latter).

This find is certainly interesting, but does it apply to Regen only, or to Poison and Toxic statuses as well? Seeing as they work kinda similar...

Further, does the CIL code also allow to increase the duration time of temporary status effects (both good and bad)? This has always bugged me about the vanilla game, that if you play with ATB on active mode most statuses would expire within less than one round of combat. What good does it do to cast Protect or Shell on a character when that doesn't even last until the enemy's very next attack? If we could somehow prolong their duration it would certainly make them more useful and open up new tactical possibilities.

ALso, sorry to bother you with so many questions, it's just that I've just begun exploring the steam version, as it seems to offer way more possibilities overall than the PSX version.
« Last Edit: 2018-01-28 19:14:03 by Kefka »

Tirlititi

  • Freak
  • *
  • Posts: 537
  • Karma: 68
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.38)
« Reply #980 on: 2018-01-28 21:54:07 »
No problem. I also had the reaction of "Damn! Steam version will just offer so much more possibilities" :p

So, for Venom and Poison's frequency, it's in the exact same method as Regen's freqency, sooner in the method. The formula is "Frames to wait = wpr << 2" instead (for both). You can add lines like "ldc.i4.s 10 ; mul" or "ldc.i4.s 10 ; add" if you want to play with it.
The formula's lines are these:
Code: [Select]
ldarg.0 // This is the 1st argument passed to the method, of type BTL_DATA ; it contains a character's (or enemy's) battle infos
ldfld 0x400022B // BTL_DATA::elem ; contains the statistics
ldfld 0x4000811 // ELEMENT::wpr ; spirit
ldc.i4.2 // Put the number "2" on the stack for later left shift
shl // LeftShift( spirit, 2 )
conv.u2 // Just a conversion to unsigned short integer
stloc.1 // Store the result in a variable (used later)

However, for the durations of the statuses, they are in 2 spots and it is not possible to edit either of them :/
- In "btl_stat::AlterStatus", a page before the end, there are 3 similar formulas "Duration = (60 - spirit) << 3" (for bad statuses and jump), "Duration = spirit << 3" for good ones and "Duration = spirit << 2" by default (it doesn't seem to be used). You can't edit this method because it's too big and CIL editing tends to bug with big methods.
- In FF9BattleDB (.ctor), there is the setup of "STAT_DATA", a class for status informations, including a multiplier used after the formulas I gave above. You can't modify the method because it's too big and anyway it is one of the few methods that are specially handled by HW and modified by other means.

Maybe in a next version I'll add these multipliers to things you can edit in "Party - Special".

Kefka

  • Crazy poster
  • *
  • Posts: 154
  • Karma: 8
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.38)
« Reply #981 on: 2018-01-29 15:01:38 »
I guess you're right, it's not necessary to be able to edit the whole method when one multiplier is really all we need. I'll eagerly await the next version, then.

About enemy names and enemy spell names: they all have some numbers in front of them in brackets, like [33,1] or [58,1] and such. Do they have a specific meaning? If I want to change enemy names manually, do I have to change these numbers too, or should I leave them be? Because I just found it strange that item names and regular ability names don't have these numbers in front of them.

Tirlititi

  • Freak
  • *
  • Posts: 537
  • Karma: 68
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.38)
« Reply #982 on: 2018-01-29 15:26:37 »
Those are the bubbles' size for dialogs (another features of the texts that is handled in PSX but not conveniently in Steam). By default, they are adjusted to the default text, but it's usually not important to edit them.
For enemy/spell names, it's useless and you can let them (or even remove them I think) ; for dialogs, I think the bubble sizes are automatically computed in some languages (at least that was the case in PSX), or maybe the vertical size (= number of lines) is automatically computed but not the horizontal size...

Incinerator

  • Crazy poster
  • *
  • Posts: 181
  • Karma: -7
  • I’d rather have 1 real friend than a thousand fake
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.38)
« Reply #983 on: 2018-01-30 00:24:14 »
Hi Tirlltiti, 3 questions:

1. where in CIL code “SfxSoundPlayer::PlaySfxSound” do I remove to make ever single sfx in game not pitch? The current lines I removed only affect the spells. This is beneficial to sounds fix.
2. will next update fix the copy/pasting bug of enemy spells in this version?

3. Made a new enemy recently, for setup I wanted to mimic the use of dummy AI exactly how Necron uses it. I got mostly everything on track; got Vaila Pira + 3 dummy targets, setup the corresponding spell attacks and correct spell animation for both Vaila Pira and the dummy targets. Copied the Dummmy_loop from Necron’s AI script to this one and allocated the same variable used.Tested it in battle and everything work perfect, the dummy targets weren’t targetable, they casted spells just like Necron battle. Problem is, when I defeat ValiabPira (new enemy) it dies, but the dummy targets still remain, casting spells. How do I get the battle to end after Valia Pira is defeated?
« Last Edit: 2018-01-31 05:03:35 by Incinerator »

Tirlititi

  • Freak
  • *
  • Posts: 537
  • Karma: 68
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.38)
« Reply #984 on: 2018-01-30 12:10:49 »
Indeed, "Sfx" in FF9's code refers to sounds of battle special effects. They use "Vfx" for the visual of battle special effects as well.

So, for removing the pitch of every sound, go to "FF9Snd::IsShiftPitchInFastForwardMode" and replace the second-to-last line "ldc.i4.1" by "ldc.i4.0". With this, all the sounds will be unaffected by the fast forward booster. I couldn't find anything specific to the cinematics' musics so I think this will remove the fast forward for these as well.

For the next update, I'm currently in the phase of fixing bugs. I had to change a big part of the background system so it was all scrambled. Hopefully, I've fixed bugs about copy/pasting spells, and I'm fixing every bug that I see, but there's still the possibility that I miss some of them.

For the dummy battle, you have two choices. Either use "RunBattleCode( 33, 1 )" that will force the battle to end with a victory (you get exp/rewards from Valia Pira but none from the dummies), or use "set (SV_EnemyTeam & (~SV_FunctionEnemy))[HP] =$ 0" that will kill all the dummies and thus trigger victory (you also get rewards from the dummies).

In both cases, put the code after the Valia Pira's death animation, in his loop function:
Code: [Select]
    AttackSpecial( 9 ) // Death Animation
    while ( IsAttacking != 0 ) {
        Wait( 1 )
    }
    set SV_FunctionEnemy[DEFEATED_ON] =$ 1 // This line is here by default and is also needed
    // Put the line here
    return

EDIT @Rosevalt: Ok ! I found what was likely to be your problem. I know that you had a workaround but I still say it so that people know.
Some characters have one of their command linked to their trance command counterpart. All of that can be seen/modified in the "Stats" panel. It is useful for letting the trance spells learned at the same rate as the normal ones, like Zidane's Dyne which are learned along his Skills. However, it has a specific requirement (else, it soft locks in battle like what you had):
all the spells under the normal command must be present in the Ability Set (in the stats panel).

That means, since you modified the spells under the "Skills" command, you should have also replaced the spells in Zidane's Ability Set in the stats panel to match the difference.

I think that this behavior holds only for the Steam version: the PSX version shouldn't have this subtility.
« Last Edit: 2018-01-30 20:25:26 by Tirlititi »

Incinerator

  • Crazy poster
  • *
  • Posts: 181
  • Karma: -7
  • I’d rather have 1 real friend than a thousand fake
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.38)
« Reply #985 on: 2018-01-30 22:29:36 »
It WORKED! Both of them! I followed each step and copy-pasted Valia Pira’s AttackSpecial - death animation, copied the last portion of Valia_Pira_loop (the if Hp less than 10,000) function and adjusted accordingly. Thanks Tirlititi!

edit:
how's the progress with a model importer? a thought came to me recently of 'animation possible problems' when importing a different model. Fearing, any model imported would be jumbled up in game, as the model imported hasn't been reskinned (rigged) to the current actor (ex. zidane's) bone structure. Unless HW model importer would have an auto rigging process during the import, that would rig any bipedal model being imported correctly to the bone structure of the character replacing target (ex. kuja to zidane, vice versa, etc.) thoughts?
« Last Edit: 2018-01-31 07:12:33 by Incinerator »

Tirlititi

  • Freak
  • *
  • Posts: 537
  • Karma: 68
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.38)
« Reply #986 on: 2018-02-03 20:46:18 »
Quote
“And hast thou done the model importer?
Come to my arms, my beamish boy!
O frabjous day! Callooh! Callay!”
He chortled in his joy.

Update to v0.39 !
- Added the ability to import FBX models and/or animations in the Unity Assets Viewer,
- You can now also add new files in the game's archive instead of replacing existing ones,
- Added a first version of multi-language support (more below),
- Added the database for animations (thanks Satoh), making cutscene scripting much easier,
- Added a sound database for the enemy attack sequencing,
- Allow to add minimal comments when batch exporting scripts, for readability,
- Fixed a few bugs, including the copy/paste of enemies or their attacks ; be very careful if you used that feature in v0.38, your enemy's data is potentially corrupted (all the datas are wrong, such as a lvl of 157 or things like that).

So, the big thing of this update is the model importer. However, I will write about it in more details in my next post because - even if replacing an existing model by another can be easy - fully explaining how it works is a big wall of text. With the model importer, you can add/replace FBX models in the game, including adding/replacing animations.

Another big improvement is the first version of multi-language. Previously, you had to choose a language when opening a Steam game. As a side effect, you couldn't save mods compatible with multiple languages (nor .hws nor Steam modded files).
Now you can freely switch from one language to another by opening "File -> Preferences". You can also decide which languages you want to save (this applies to .hws files, Steam modded files and text batching). However, the loading time of several panels is increased because the data of all the languages is loaded. You have thus the possibility to decide, before opening a Steam game, to get in the old single-language mode, where only one language is loaded and you can't switch after opening the game anymore.

Now, this is only the first step of multi-language because, while you can make your mod and translate it one language by one,
1) It may be tedious to swap between languages each time you want to translate a name, description or dialog,
2) Remember that there are 2 things in HW that are language-dependant: the texts but also the script! If you modify enemy AIs or Field scripts, you need to do it for all the languages (at least those you want to be compatible).

So for the next release, I plan on reworking the text editing window (I'll use the occasion to handle these Steam text opcodes) to make the translations more convenient. I will also try, even if I'm not sure if it will be successful (fingers crossed), to add an "auto-translate" feature that can give a rough translation of your text. Of course, it will be nowhere as satisfying as a real translation but it will already be something for those who want their mod compatible in any language and don't have access to translators in all the 7 languages supported by the game.

For multi-language script editing, I think I will be able to identify scripts that are identical or very close to be identical in different languages (except for the dialog text IDs, most of the Field scripts are the same in all languages and nearly all the AI are the same). Then you can do the job only once.

Also, before moving to model importer, there's a little thing you should know about adding new assets through the Unity Assets Viewer:
- For now, you can't remove assets, only add more,
- In most cases, when you add an asset, you must check the "Bundle Info" option and add a path to your asset (something like "assets/custom_resources/my_image.png"). For making the game use your asset directly, you must refer to that path in the game's engine code,
- Because of the previous remark, you can't add a whole new asset using HW only (you can't edit the strings in the game's engine code with HW). You must use Albeoris's Memoria tool for that... but Memoria is incompatible with HW right now... However, Memoria is not incompatible with the Unity Assets Viewer so you may still decide to use HW for extracting/replacing/adding assets, give up the other features of HW and use Memoria for engine modding. Hopefully one day there will be full compatibility but I don't see that day coming anytime soon.

There's an exception for that last remark: a few dummied assets are referenced in the game's engine code but they are missing from the archives. For instance, there is a field, surely meant to be another version of the "Alexandria Castle/Public Seats" that is referenced in the game's code, has a valid ID and path to access to it and even a very small Field script file (in p0data7.bin) but no background or walkmesh. You might be able to use it for adding 1 field without replacing any other. Here are his specs:
Code: [Select]
Field ID (to use in the Field script): 1805
Event files name (file containing its Field script): EVT_ALEX3_AC_SEAT_N
Background files name (background files to add in the archive p0data11): FBG_N02_ALXC_MAP038_AC_AST_0
Since you won't be able to edit that field's script in HW, you'd need to use another field as a temporary container, do all the changes you want on that field, export its files - event files (ie. script) from p0data7, and background files (ie. .bgs, .bgi and atlas texture from p0data1X) - and add them back with adjusted names (since there's already a script file, you only need to replace it, not add).

Likewise, there seems to be unused animations that you can add without the need to change the engine's code. It's a matter I will develop in my next message.

EDIT: I will write that message tomorrow.
« Last Edit: 2018-02-03 21:11:19 by Tirlititi »

Incinerator

  • Crazy poster
  • *
  • Posts: 181
  • Karma: -7
  • I’d rather have 1 real friend than a thousand fake
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.39)
« Reply #987 on: 2018-02-03 23:42:40 »
TIRLITITI! I FREAKING LOVE YOU!!

- In most cases, when you add an asset, you must check the "Bundle Info" option and add a path to your asset (something like "assets/custom_resources/my_image.png"). For making the game use your asset directly, you must refer to that path in the game's engine code,

If you know, where [in Memoria] do I locate an assets's (3d model) direct path in the game engine code? And does editing such path edit the Csharp file or the corresponding .bin file?
« Last Edit: 2018-02-04 00:46:26 by Incinerator »

Tirlititi

  • Freak
  • *
  • Posts: 537
  • Karma: 68
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.39)
« Reply #988 on: 2018-02-04 14:03:48 »
So, here is how to use the model importer. I guess it will answer your questions, Incinerator ;)

Intro A - Supported Model Formats
You can only import FBX Binary and FBX ASCII files properly, much like exporting. Encrypted FBX are not supported. In general, the other formats have problems with animations or even bones so you should always convert your models to FBX beforehand. 3DS Max is the normal program you would need to create/edit models that can be imported, but it's not free. There is a free version, called Gmax, but I'm not sure if it supports FBX versions that are recent enough. Also, FBX ASCII format is a text file that can be edited with Notepad but it's tedious and won't bring you very far.
The FBX versions supported are:
- FBX ASCII versions 5, 6 and 7 up to 7.4
- FBX Binary versions 5 and 6 up to 6.1

Also, only (polygonal) Meshes are supported. No Nurbs, no Patches.
The Tangents, Normals and - more importantly - the UV coordinates must be stored by Control Points (not by Polygon vertex). I guess it's a simple setting to check in 3DS Max.

For animations, I wasn't able to import properly the Bezier interpolation data: animations will have a close-to-linear interpolation (it usually doesn't look very different).

Note that texture animations are not supported yet. They are stored in different files for which I didn't investigate the format.
And also, some animations have sounds in-game, like footsteps or a sword unsheathing. These are not inside the animation's data but in the Field script codes (usually either in the object's "Init" function, or in its "Reinit" function).

Intro B - The options
In the Unity Assets Viewer, you have the following options for importing models:

-) Only Update Existing Nodes: You will surely have no interest in this function except in very specific situations. It expects the imported model to have exactly the same nodes (mostly bones) as the one in-place. It popups a warning if not. Using this option, you're 100% sure that no new asset will be imported when you replace a model.
-) Update Existing and Import New: The default one. It will compare the hierarchy of the new model with the old one and keep as much as it can from the old one, adding a minimal number of assets to the archive.
-) Import All Nodes in New Files: With this, except for the top-level GameObject (the file selected), all the nodes of the new models will be imported in new assets. When you add a whole new model, that's also what happens except that the top-level GameObject is also new in that case.

-) Keep Unused Nodes: Doesn't remove any asset, even if they become dummied and unusable after replacing a model.
-) Delete Unused Nodes: Clean up the assets that are not used anymore after replacing a model. This option is not implemented yet and the only way to remove assets is to replace the whole Unity archive by a backup (or download it back).

-) Import Mesh/Material: Import the geometry, skeleton, material, UV mapping, etc... You may uncheck this option if you only want to update a model's animations and speed up the process.
-) Import Animations: Import the animations in the p0data5.bin archive file (the one dedicated to the game's animations). You may unckeck this if you only update the geometry, etc...

Also, you'll need to import/update the textures separatly. If you add new textures, you must check the "Bundle Info" flag and give it a path (anything not already used will be fine). Besides that, you must choose the options for Image Quality Conversion. The main ones are:
-) RGB: Full quality images without alpha channel,
-) RGBA: Full quality images with alpha channel, resulting in bigger files,
-) DXT5 - Medium Quality: Compressed images with DXT5 format, resulting in low-sized files. Medium quality is fast and still very good,
-) DXT5 - High Quality: A slightly better quality than the previous one, with the same file size but slower to process.

If the "Default Compression Method" is checked when importing new files, the RGBA format will be used (when replacing existing textures, this option use the same compression as the old texture).

I - Replacing an existing model with existing animations
The easiest thing to do is to replace a model and don't add more animations than those already there. I've tested the model importer on the models of the p0data4 archive only (the most important one). There are also the weapon models (I think it should work) and Battle Scenes (maybe it won't work) in p0data2, and World Map model in p0data3. That last one can't be replaced and can't even be exported properly for now (it mainly consists of plenty of .prefab files, that are parts of the ground and I didn't investigate how all these parts are placed to draw the big thing).

The importing option for this should be either "Only Update Existing Nodes" or "Update Existing and Import New".
The animations of your model must match with the old model's animation internal names ("ANH_" something ; that's the names of the animations when you export the old model).

First, if you use a new texture, you must start by importing that texture. In the same archive as your model (surely p0data4), right-click on the asset list and select "Add". Once you selected your texture, choose "Texture2D" as the file type, give it a name and give it a Full Name. The Full Name is not very important but remember what you chose and be sure to use a full name that is not already used.
Typically, Full Names of the models' textures are "assets/resources/models/[MODEL_TYPE]/[MODEL_ID]/[MODEL_ID]_[TEXTURE_NUMBER].png".
Also, it may be a good idea to remember what was the Internal File ID.

Once you have all the textures set, verify that your updated model is placed in the "HadesWorkshopAssets" folder at the right place and with the right name. It must be at the same place as where the model is exported with the Unity Assets Viewer.
Right-click on the model you want to replace (Reminder: the relevant asset is the one of type "1 (GameObject)" and with the .fbx extension in his file name) then "Import Selection".
Warning: due to a bug that will take a little time to fix, you should never import more than 1 model at a time.
It is possible that the program will ask you to select the texture assets. Select the texture in the asset list or you may also copy/paste the file internal ID that was used when adding that texture.

Then wait for it and it's done!

If the program popups the window for importing assets, displaying the animation names of your model, that means you have more animations than expected and/or they don't have the right names. If your goal was not to add new animations but only replace existing ones, you can choose Full Names that you'll remember and confirm the importations. Then go in the archive "p0data5", export the .anim assets that you just added, identify the animations of the old model and replace them by the .anim you just exported (rename them with the right name and move them in the right folder, like for replacing the model).
You may also hit "Cancel" when the popups for importing new animations appears: it will cancel the update of all the animations and only update the model instead.

If your new model is lacking animations, the related old ones won't be modified at all and will still be valid.

I bis - Adding a new animation by taking advantage of dummied data
If the model you want to update as dummied animations, you can do exactly the same as in I and still add one or a few animations.
The dummied animations appear in the Field script animation list with the description "Unexisting". They are registered by the game's engine and only await to have a related asset to be usable. Here is a list of dummied animations:
Code: [Select]
// Enemy Basilisk
5458, 379, "ANH_MON_B3_011_B", "Unexisting B"
// Enemy LizardMan
5459, 390, "ANH_MON_B3_019_B", "Unexisting B"
// Enemy Carve Spider
5460, 376, "ANH_MON_B3_021_015", "UnexistingA"
5460, 360, "ANH_MON_B3_021_040", "UnexistingB 1"
5460, 366, "ANH_MON_B3_021_041", "UnexistingB 2"
5460, 354, "ANH_MON_B3_021_042", "UnexistingB 3"
// Enemy Clipper
150, 8693, "ANH_MON_B3_039_P", "Unexisting P"
// Enemy Blazer Beetle
84, 9257, "ANH_MON_B3_042_B", "Unexisting B"
// Enemy Cactuar
244, 9239, "ANH_MON_B3_061_B", "Unexisting B"
244, 9900, "ANH_MON_B3_061_TEST", "Unexisting Test"
// Enemy Valia Pira
354, 9340, "ANH_MON_B3_130_B", "Unexisting B"
354, 13578, "ANH_MON_B3_130_ILLUST","Unexisting Illust"
354, 8833, "ANH_MON_B3_130_P", "Unexisting P"
354, 13581, "ANH_MON_B3_130_TEST", "Unexisting Test"
// Enemy Vivi
558, 12302, "ANH_MON_B3_151_001", "UnexistingA"
558, 12306, "ANH_MON_B3_151_005", "UnexistingB"
558, 9675, "ANH_MON_B3_151_B", "Unexisting B"
558, 9677, "ANH_MON_B3_151_P", "Unexisting P"
// Enemy Dagger
671, 9957, "ANH_MON_B3_169_002", "Unexisting"
// Enemy Freya
297, 10317, "ANH_MON_B3_174_B", "Unexisting B"
297, 10319, "ANH_MON_B3_174_P", "Unexisting P"
// Enemy Gigan Toad B
663, 8374, "ANH_MON_B3_197_034", "Unexisting"
// Battle Steiner B
655, 6744, "ANH_MAIN_B0_018_000", "Unexisting 000"
655, 6746, "ANH_MAIN_B0_018_001", "Unexisting 001"
655, 6747, "ANH_MAIN_B0_018_002", "Unexisting 002"
655, 6750, "ANH_MAIN_B0_018_010", "Unexisting 010"
655, 6752, "ANH_MAIN_B0_018_011", "Unexisting 011"
655, 6753, "ANH_MAIN_B0_018_020", "Unexisting 020"
655, 6755, "ANH_MAIN_B0_018_021", "Unexisting 021"
655, 6758, "ANH_MAIN_B0_018_022", "Unexisting 022"
655, 6759, "ANH_MAIN_B0_018_023", "Unexisting 023"
655, 6761, "ANH_MAIN_B0_018_032", "Unexisting 032"
655, 6763, "ANH_MAIN_B0_018_033", "Unexisting 033"
655, 6766, "ANH_MAIN_B0_018_040", "Unexisting 040"
655, 6768, "ANH_MAIN_B0_018_050", "Unexisting 050"
655, 6769, "ANH_MAIN_B0_018_100", "Unexisting 100"
655, 6771, "ANH_MAIN_B0_018_101", "Unexisting 101"
655, 6774, "ANH_MAIN_B0_018_102", "Unexisting 102"
655, 6776, "ANH_MAIN_B0_018_103", "Unexisting 103"
655, 6777, "ANH_MAIN_B0_018_104", "Unexisting 104"
655, 6779, "ANH_MAIN_B0_018_105", "Unexisting 105"
655, 6782, "ANH_MAIN_B0_018_200", "Unexisting 200"
655, 6784, "ANH_MAIN_B0_018_201", "Unexisting 201"
655, 6785, "ANH_MAIN_B0_018_202", "Unexisting 202"
655, 6787, "ANH_MAIN_B0_018_210", "Unexisting 210"
655, 6789, "ANH_MAIN_B0_018_220", "Unexisting 220"
655, 6791, "ANH_MAIN_B0_018_300", "Unexisting 300"
655, 6794, "ANH_MAIN_B0_018_310", "Unexisting 310"
655, 6795, "ANH_MAIN_B0_018_400", "Unexisting 400"
655, 6797, "ANH_MAIN_B0_018_401", "Unexisting 401"
655, 6799, "ANH_MAIN_B0_018_402", "Unexisting 402"
655, 6802, "ANH_MAIN_B0_018_410", "Unexisting 410"
655, 6803, "ANH_MAIN_B0_018_420", "Unexisting 420"
655, 6805, "ANH_MAIN_B0_018_430", "Unexisting 430"
655, 6807, "ANH_MAIN_B0_018_500", "Unexisting 500"
655, 6809, "ANH_MAIN_B0_018_501", "Unexisting 501"
655, 6812, "ANH_MAIN_B0_018_600", "Unexisting 600"
// Unexisting Battle model 002
568, 12511, "ANH_MAIN_B2_003_ALL", "Unexisting All"
// Unexisting Battle model Cam
649, 14461, "ANH_MAIN_B2_CAM_011_1ST", "Unexisting 1st"
649, 14460, "ANH_MAIN_B2_CAM_011_2ND", "Unexisting 2nd"
649, 14463, "ANH_MAIN_B2_CAM_011_DOWN", "Unexisting Down"
649, 14458, "ANH_MAIN_B2_CAM_011_END", "Unexisting End"
649, 14451, "ANH_MAIN_B2_CAM_011_JUMP", "Unexisting Jump"
649, 14454, "ANH_MAIN_B2_CAM_011_OPENING", "Unexisting Opening"
649, 14455, "ANH_MAIN_B2_CAM_011_RUN", "Unexisting Run"
649, 14462, "ANM_MAIN_B2_CAM_011_1ST", "Unexisting 1st"
649, 14459, "ANM_MAIN_B2_CAM_011_2ND", "Unexisting 2nd"
649, 14464, "ANM_MAIN_B2_CAM_011_DOWN", "Unexisting Down"
649, 14457, "ANM_MAIN_B2_CAM_011_END", "Unexisting End"
649, 14452, "ANM_MAIN_B2_CAM_011_JUMP", "Unexisting Jump"
649, 14453, "ANM_MAIN_B2_CAM_011_OPENING", "Unexisting Opening"
649, 14456, "ANM_MAIN_B2_CAM_011_RUN", "Unexisting Run"
// Unexisting Battle model 001
29, 838, "ANM_MAIN_B2_001", "Unexisting 001"
// Gargant
306, 4650, "ANH_ACC_F1_GRG_B", "Unexisting B"
306, 6132, "ANH_ACC_F1_GRG_RUN_1F", "Unexisting Run_1f"
// Zidane
98, 179, "ANH_MAIN_F0_ZDN_JUMP1", "Unexisting Jump1"
// King Leo
5501, 1135, "ANH_SUB_F1_BAK_ANXIETY_3", "Unexisting Anxiety_3"
5501, 9435, "ANH_SUB_F1_BAK_B", "Unexisting B"
5501, 9154, "ANH_SUB_F1_BAK_P", "Unexisting P"
// Puck
121, 2195, "ANH_NPC_F0_RTC_SK_ANGRY", "Unexisting Sk_Angry"
121, 2192, "ANH_NPC_F0_RTC_SK_CRUSH", "Unexisting Sk_Crush"
121, 2183, "ANH_NPC_F0_RTC_SK_GET_LD", "Unexisting Sk_Get_Ld"
121, 2193, "ANH_NPC_F0_RTC_SK_GO_UP1_LD", "Unexisting Sk_Go_Up1_Ld"
121, 2194, "ANH_NPC_F0_RTC_SK_GO_UP2_LD", "Unexisting Sk_Go_Up2_Ld"
121, 2187, "ANH_NPC_F0_RTC_SK_HURRY_UP_LD","Unexisting Sk_Hurry_Up_Ld"
121, 2177, "ANH_NPC_F0_RTC_SK_IDLE", "Unexisting Sk_Idle"
121, 2184, "ANH_NPC_F0_RTC_SK_IDL_LD", "Unexisting Sk_Idl_Ld"
121, 2188, "ANH_NPC_F0_RTC_SK_LIFT_LD", "Unexisting Sk_Lift_Ld"
121, 2191, "ANH_NPC_F0_RTC_SK_PUT_LD", "Unexisting Sk_Put_Ld"
121, 2181, "ANH_NPC_F0_RTC_SK_ROGER", "Unexisting Sk_Roger"
121, 2186, "ANH_NPC_F0_RTC_SK_RUN", "Unexisting Sk_Run"
121, 2190, "ANH_NPC_F0_RTC_SK_RUN_LD", "Unexisting Sk_Run_Ld"
121, 2182, "ANH_NPC_F0_RTC_SK_TURN_", "Unexisting Sk_Turn_"
121, 2179, "ANH_NPC_F0_RTC_SK_TURN_L_LD", "Unexisting Sk_Turn_L_Ld"
121, 2185, "ANH_NPC_F0_RTC_SK_TURN_R", "Unexisting Sk_Turn_R"
121, 2180, "ANH_NPC_F0_RTC_SK_TURN_R_LD", "Unexisting Sk_Turn_R_Ld"
121, 2196, "ANH_NPC_F0_RTC_SK_WALK", "Unexisting Sk_Walk"
121, 2189, "ANH_NPC_F0_RTC_SK_WALK_LD", "Unexisting Sk_Walk_Ld"
121, 2178, "ANH_NPC_F0_RTC_SK_WHICH_LD", "Unexisting Sk_Which_Ld"
The first number is the MODEL_ID, the second number is the ANIM_ID, the "ANH_" string is the internal animation name and the last string is the description as you find it in the field script.
So, in order to import one of these animations, do like in section I, but expect for a window to popup to import the new animation. As a full name, use the following:
assets/resources/animations/[MODEL_ID]/[ANIM_ID].anim

For instance, if you have a whole new animation to Zidane, import it with the full name "assets/resources/animations/98/179.anim". Then, in the field script, you can use the animation ID 179 to refer to it (in a "RunAnimation" line for instance).

Note that:
- There are also dummied models. I guess that you can use these as well in order to import a whole new model without the need to change the engine's code. I didn't try it though.
- there are other "dummied" animations: somes are described as "Unused", meaning that they exist and are all good, but never used in the game (unless I missed something). For now, only the animations of the enemy models were spotted as "Unused" ; some animations of the field models may be unused but not flagged (I know that Steiner at least has an unused animation that I used in AF). There are also "Dummy" animations, which means one thing: it's a very quick animation consisting of only 2 frames. Most of the time ("Dummy P", "Dummy B"...), they are also unused in the sense that they are default animations that are never actually played in-game. You can replace them as well without any regrets.

II - Importing whole new animations
Do the same as in section I, but be sure to use the following when asked to import your new animations:
assets/resources/animations/[MODEL_ID]/[NEW_ANIM_ID].anim

The NEW_ANIM_ID should be some unused animation ID. I think that it's safe to use any number between 20000 and 30000.

Once you've done that, you also need to register the animation in the engine's database. In the engine's source code (available through Albeoris's Memoria tool), go in the class "FF9DBAll". There is a Dictionary definition that takes most of the class's script:
public static Dictionary<int, string> AnimationDB

In this dictionary, add the following entry:
Code: [Select]
{ [NEW_ANIM_ID], [NEW_ANIM_STRING_ID] },
The NEW_ANIM_ID is the one you've already chosen. The NEW_ANIM_STRING_ID must follow some pattern:
ANH_[MODEL_SHORT_STRING_ID]_[Anything you want that's not already used]

The MODEL_SHORT_STRING_ID is like "MAIN_ZDN" or something. You can easily retrieve it because all the animations of that same model share the same part. You can thus search for another animation ID that belongs to the same model.

III - Importing a whole new model
Do the same as in section I (in particular, don't forget to add your model's texture first). You must import the model with the GameObject type and the following full name:
assets/resources/models/[TYPE]/[NEW_MODEL_ID]/[NEW_MODEL_ID].fbx

The full names of the animations must also follow the same pattern as in section II (with your NEW_MODEL_ID instead).

The TYPE is 1, 2, 3, 4 or 5 depending on whether the model type is an Accessory, a "Main" model, an Enemy, a NPC or a "Sub" model. Main models are typically the main characters' field models. Sub models are pretty much the remains. I don't think the model type has such an importance but you should remember what is your choice.
Also, in p0data2, there's a TYPE of 6 for Weapon models.

NEW_MODEL_ID must be an unused one. You can choose it between 6000 and 10000 without problem normally.

Then, you must register the model in the engine's code. This time, it's in the class "FF9BattleDB". There's the following dictionary:
public static Dictionary<int, string> GEO

Add an entry to it:
Code: [Select]
{ [NEW_MODEL_ID], "GEO_[MODEL_SHORT_STRING_ID]" },
The MODEL_SHORT_STRING_ID must itself follow a pattern:
[TYPE_STR]_[F/B/W][VERSION]_[Anything you want that's not already used]

TYPE_STR must be either one of these depending on the chosen model's type:
ACC, MAIN, MON, NPC, SUB, WEP

F/B/W is one letter depending on whether it's supposed to be a Field model, a Battle model or a World model. It doesn't seem too strict as some Battle models are also used inside Fields.

VERSION is a 1-digit number ; I'm not sure what it corresponds to...

The tail of the string ID can be anything you want without special character.
Example:
Code: [Select]
{ 6000, "GEO_MAIN_F0_RED_DOG" },
This model's animations must use the same pattern as in section II but with the MODEL_SHORT_STRING_ID that you've chosen.
Example:
Code: [Select]
{ 20000, "ANH_MAIN_F0_RED_DOG_TALK" },
{ 20001, "ANH_MAIN_F0_RED_DOG_RUN" },
etc...

IV - Using a whole new model and/or animation in-game
Now, hopefully, everything is correctly set but if the animation or the model never appear in-game, that wasn't worth it.

If your model/animation is supposed to be used in a Field or in a World Map, you can simply edit the script of this Field/World Map in Hades Workshop and use these assets in "SetModel" or "RunAnimation" lines. You only need to have a list of the IDs next to you because new models and new animations won't appear in the drop-list menu (unless it was "Unexisting") and you need to write the ID yourself.

However, since Hades Workshop and Memoria are not compatible, you'll need to do that on a fresh backup of your game, without Memoria installed. Then, export the mod as Steam files ; it will create a p0data7.bin archive that contains the script. You may either extract the script asset out of it using the Unity Assets Viewer (in the archive p0data7, there are descriptions that should be more than enough to spot the right asset corresponding to the Field script) or, even simpler, just replace the whole p0data7.bin file of the Memoria-modded game (but it will replace all the scripts at once so it can cancel other changes if that's not the first time you replace it).

You can't use new models/animations for enemies yet. I'm also planning on enabling it for the next version.
Finally, using other animations for the party's characters is all done in the game's engine. Maybe I'll describe how to do it another day.

I didn't lie when I said it would be a wall of text  :evil:
« Last Edit: 2018-02-04 16:12:04 by Tirlititi »

LeonhartGR

  • No life
  • *
  • Posts: 2391
  • Karma: 31
  • ~Whatever...~ Finally married to my "Rinoa"!
    • View Profile
    • LeonhartGR Productions
Re: [FF9] General editor - Hades Workshop (0.39)
« Reply #989 on: 2018-02-04 14:37:08 »
I'm so glad you have progressed so much with this! It's really hopeful that there is a way to import new models and animations now! I'm looking forward to any mod work on this!

Incinerator

  • Crazy poster
  • *
  • Posts: 181
  • Karma: -7
  • I’d rather have 1 real friend than a thousand fake
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.39)
« Reply #990 on: 2018-02-04 18:21:48 »
JESUS!! What a read!Thanks for the immerse work in making it possible, Tirlititi!

I tried to pace through each step slowly to understand it all; no doubt, though, HW crashes during my first attempt to import the new .fbx

So, I followed all steps from -I - Replacing an existing model with existing animations- very carefully; got all the textures of my new model that uses for GameObject for the main model Zidane into the archive: p0data4.bin




I want to think it's coming down to my .fbx model, but can't tell for sure. I exported my .fbx using Metasequoia 4 as ASCII FBX version 7.4 (contents opened from text editor):

Code: [Select]
; FBX 7.4.0 project file
; ----------------------------------------------------

FBXHeaderExtension:  {
FBXHeaderVersion: 1003
FBXVersion: 7400
CreationTimeStamp:  {
Version: 1000
Year: 2018
Month: 2
Day: 4
Hour: 10
Minute: 43
Second: 44
Millisecond: 584
}
Creator: "FBX SDK/FBX Plugins version 2018.1.1"
SceneInfo: "SceneInfo::GlobalInfo", "UserData" {
Type: "UserData"
Version: 100
MetaData:  {
Version: 100
Title: ""
Subject: ""
Author: ""
Keywords: ""
Revision: ""
Comment: ""
}
Properties70:  {
P: "DocumentUrl", "KString", "Url", "", "C:\Users\Dwight\Desktop\ZACH\98.fbx"
P: "SrcDocumentUrl", "KString", "Url", "", "C:\Users\Dwight\Desktop\ZACH\98.fbx"
P: "Original", "Compound", "", ""
P: "Original|ApplicationVendor", "KString", "", "", ""
P: "Original|ApplicationName", "KString", "", "", ""
P: "Original|ApplicationVersion", "KString", "", "", ""
P: "Original|DateTime_GMT", "DateTime", "", "", ""
P: "Original|FileName", "KString", "", "", ""
P: "LastSaved", "Compound", "", ""
P: "LastSaved|ApplicationVendor", "KString", "", "", ""
P: "LastSaved|ApplicationName", "KString", "", "", ""
P: "LastSaved|ApplicationVersion", "KString", "", "", ""
P: "LastSaved|DateTime_GMT", "DateTime", "", "", ""
}
}
}
GlobalSettings:  {
Version: 1000
Properties70:  {
P: "UpAxis", "int", "Integer", "",1
P: "UpAxisSign", "int", "Integer", "",1
P: "FrontAxis", "int", "Integer", "",2
P: "FrontAxisSign", "int", "Integer", "",1
P: "CoordAxis", "int", "Integer", "",0
P: "CoordAxisSign", "int", "Integer", "",1
P: "OriginalUpAxis", "int", "Integer", "",-1
P: "OriginalUpAxisSign", "int", "Integer", "",1
P: "UnitScaleFactor", "double", "Number", "",1
P: "OriginalUnitScaleFactor", "double", "Number", "",1
P: "AmbientColor", "ColorRGB", "Color", "",0,0,0
P: "DefaultCamera", "KString", "", "", "Producer Perspective"
P: "TimeMode", "enum", "", "",0
P: "TimeProtocol", "enum", "", "",2
P: "SnapOnFrameMode", "enum", "", "",0
P: "TimeSpanStart", "KTime", "Time", "",0
P: "TimeSpanStop", "KTime", "Time", "",46186158000
P: "CustomFrameRate", "double", "Number", "",-1
P: "TimeMarker", "Compound", "", ""
P: "CurrentTimeMarker", "int", "Integer", "",-1
}
}

; Documents Description
;------------------------------------------------------------------

Documents:  {
Count: 1
Document: 127362160, "My Scene", "Scene" {
Properties70:  {
P: "SourceObject", "object", "", ""
P: "ActiveAnimStackName", "KString", "", "", ""
}
RootNode: 0
}
}

; Document References
;------------------------------------------------------------------

References:  {
}

; Object definitions
;------------------------------------------------------------------


Placed all .png textures and the .fbx in the correct position where the old (Zidane) .fbx was exported from:



I select GameObject for the main model Zidane, right click and select import selection.

I got the pop up window prompting me to select the texture assets; I did so for all of them as such.

Code: [Select]
assets/resources/models/2/98/98_2.png

ID: 7FFD1E8B51DB44F3

assets/resources/models/2/98/98_3.png

ID 7FFD1E8B51DB44F4

assets/resources/models/2/98/98_4.png

ID 7FFD1E8B51DB44F5

assets/resources/models/2/98/98_5.png

ID 7FFD1E8B51DB44F6

assets/resources/models/2/98/98_6.png

ID 7FFD1E8B51DB44F7

assets/resources/models/2/98/98_7.png

ID 7FFD1E8B51DB44F8

assets/resources/models/2/98/98_8.png

ID 7FFD1E8B51DB44F9

assets/resources/models/2/98/98_9.png

ID 7FFD1E8B51DB44FA

assets/resources/models/2/98/98_10.png

ID 7FFD1E8B51DB44FB

assets/resources/models/2/98/98_11.png

ID 7FFD1E8B51DB44FC

assets/resources/models/2/98/98_12.png

ID 7FFD1E8B51DB44FD

assets/resources/models/2/98/98_13.png

ID 7FFD1E8B51DB44FE

assets/resources/models/2/98/98_14.png

ID 7FFD1E8B51DB44FF

assets/resources/models/2/98/98_15.png

ID 7FFD1E8B51DB4500

assets/resources/models/2/98/98_16.png

ID 7FFD1E8B51DB4501

assets/resources/models/2/98/98_17.png

ID 7FFD1E8B51DB4502

assets/resources/models/2/98/98_18.png

ID 7FFD1E8B51DB4503

assets/resources/models/2/98/98_19.png

ID 7FFD1E8B51DB4504

assets/resources/models/2/98/98_20.png

ID 7FFD1E8B51DB4505

assets/resources/models/2/98/98_21.png

ID 7FFD1E8B51DB4506

assets/resources/models/2/98/98_22.png

ID 7FFD1E8B51DB4507

assets/resources/models/2/98/98_23.png

ID 7FFD1E8B51DB4508

assets/resources/models/2/98/98_24.png

ID 7FFD1E8B51DB4509

assets/resources/models/2/98/98_25.png

ID 7FFD1E8B51DB450A

assets/resources/models/2/98/98_26.png

ID 7FFD1E8B51DB450B

Then I hit OK, and Hades Workshop crashes.

So with all of this, I believe I can narrow it down to my new .fbx being the problem area. It's got me baffled; I'm still testing on it.
« Last Edit: 2018-02-04 19:08:29 by Incinerator »

Tirlititi

  • Freak
  • *
  • Posts: 537
  • Karma: 68
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.39)
« Reply #991 on: 2018-02-04 18:51:43 »
Urgh.
Maybe it's because the UV are refered by Polygon Vertex?
Search in your .FBX the lines "MappingInformationType". What do they say? (ByVertice, ByPolygonVertex, ByPolygon...)

Incinerator

  • Crazy poster
  • *
  • Posts: 181
  • Karma: -7
  • I’d rather have 1 real friend than a thousand fake
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.39)
« Reply #992 on: 2018-02-04 19:10:23 »
I also am not importing any animations at all.
Alright, checking UVs...

EDIT:
Alright MappingInformationType says: ByPolygonVertex.

Code: [Select]
}
GeometryVersion: 124
LayerElementNormal: 0 {
Version: 102
Name: ""
MappingInformationType: "ByPolygonVertex"
ReferenceInformationType: "Direct"
Normals: *39258 {

those are my export setting from Metasequoia 4.
« Last Edit: 2018-02-04 19:23:59 by Incinerator »

Tirlititi

  • Freak
  • *
  • Posts: 537
  • Karma: 68
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.39)
« Reply #993 on: 2018-02-04 20:31:24 »
Yeah, that's the problem (at least that's A problem). I don't know how to change that setting in Metasequoia. That's not on the window you're displaying.
Do you have the free version or the licensed version of Metasequoia? I may look at it.

Incinerator

  • Crazy poster
  • *
  • Posts: 181
  • Karma: -7
  • I’d rather have 1 real friend than a thousand fake
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.39)
« Reply #994 on: 2018-02-05 03:04:19 »
I have GOUGE my eyes out trying to fix the UV from 'ByPolygonVertex' to 'eBY_CONTROL_POINT'; feel asleep on it I did, jesus.

Yes, the is a free version of Metasequoia 4. on their site: Metasequoia 4 you can get a trial (it's under the tab: "Purchase"; fill out the simple form and it'll email you the trial info to enter when you start the program; which lasts for a month and can be renewed after every month if needed~it unlocks ALL features in Metasequoia 4 too.

And by "polygonal meshes only" I presume you mean the model should appear more like this:



Rather than this:



Based off how the extracted old_Zidane appears.

edit:
some datas in the original .fbx are too precise
« Last Edit: 2018-02-05 05:47:01 by Incinerator »

LeonhartGR

  • No life
  • *
  • Posts: 2391
  • Karma: 31
  • ~Whatever...~ Finally married to my "Rinoa"!
    • View Profile
    • LeonhartGR Productions
Re: [FF9] General editor - Hades Workshop (0.39)
« Reply #995 on: 2018-02-05 07:53:30 »
That is really impressive! I'm quite positive you will end up with a convenient solution. Why don't you come over the Discord qhimm servers and discuss this in real time! Thank you guys for trying to achieve the impossible until this moment. I'm excited!

Incinerator

  • Crazy poster
  • *
  • Posts: 181
  • Karma: -7
  • I’d rather have 1 real friend than a thousand fake
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.39)
« Reply #996 on: 2018-02-05 09:26:46 »
And about normals too; a glaring surprise to me as well;
does normals that display like this:



cause issue in HW import?

edit:
well, changing "ByPolygonVertex" to "ByVertice" in the text editor didn't work. Scratch that off the list.
I also tried exported the old zidane, then reimporting it back for tests; and HW imported it, yet the game crashes when initiating main Zidane model.
Would it be possible to remove some of these specific points in .fbx? like with the removal of akb header in audio.
« Last Edit: 2018-02-05 10:52:17 by Incinerator »

ste459

  • Fast newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.38)
« Reply #997 on: 2018-02-05 21:37:11 »
However it is indeed possible to increase the Regen frequency, with both HW and Memoria. In HW, you go to CIL Code, search for the method "btl_stat -> SetOprStatusCount" and remove that part of the code:
Code: [Select]
ldarg.0
ldfld 0x400022A // BTL_DATA::elem
ldfld 0x400080F // ELEMENT::wpr
sub
It's the four lines under a "ldc.i4.s 60". The Regen frequency formula is indeed "Frames to wait = (60 - wpr) << 2", which is, in a more standard writing, "(60 - Spirit) * 4". Removing these four lines will remove the spirit part so you will always regen with the same frequency (the overall duration is something else and will still increase though). You may change the number in "ldc.i4.s 60" to adjust it if you think it's too slow (or too fast).

Got Steam version and tested, it worked perfectly! Thanks, as usual.
Do you know if changing this CIL code entry could mess up something else? Or this lines affects only the Regen effect?
I have made a bit of testing but didn't seen any other alteration for now.

Incinerator

  • Crazy poster
  • *
  • Posts: 181
  • Karma: -7
  • I’d rather have 1 real friend than a thousand fake
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.39)
« Reply #998 on: 2018-02-06 03:57:17 »
Alright, I'm stumped, I have no way of getting the UV coordinates of .fbx to be by "Control Point" ("ByVertice" I assume it's called in the text editor metadata). Now, if I change all " ByPolygonVertex" in text editor, save it, open it in either 3ds Max, or Metasequoia, the UV textures are messed up. (try importing in Unity Assets Viewer still crashes HW workshop). I also don't know of any .fbx explorers that will show me clearer of all the data about my .fbx that need to match the relative format of FF9 .fbx. (No mesh smoothing etc.)
I know of no setting in 3ds max that will convert my model's UV coordinates to "ByVertice"~"Control Points".
Also, I don't know if importer will auto-scale my model to right size in game either. So it doesn't appear too large or too small. I not need to import any animations or add anything new, just replace.

Tirlititi

  • Freak
  • *
  • Posts: 537
  • Karma: 68
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.39)
« Reply #999 on: 2018-02-06 07:35:07 »
So, @Incinerator:
You can't just replace the Mapping Information Type by another ; each type means that the datas are sorted differently (and usually not at the same place in the file). I'm also worried about that Zidane export/reimport as it shouldn't bug in-game. I'll test that today.
What I'm sure of, is that exporting/reimporting the moogle's book works perfectly, as well as the Grimmlock enemy model. Can you try one of these? If that doesn't work, then your archive must be corrupted somehow. If I can't export/reimport Zidane, I'll have something to work with and I can catch where the problem comes from.

Normals are good as they are in your screenshot. That's many polygons but there shouldn't be any data size restriction on the new model.
For the scale, the game expects models of size ~100. It's the same unit as the position in Fields, for instance. So a 100 radius scaled model is quite small, but still visible. For human-sized models, you'd take a height of ~700.

@ste459: Glad to hear that this works at least ^^
There shouldn't be any bug with changing this formula, as long as the frequency is positive. And these lines are only for the Regen frequency.