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

  • Thread starter Thread starter Tirlititi
  • Start date Start date
Status
Not open for further replies.
Tirlititi has a mod for trance models defaults!.
https://www.dropbox.com/sh/ac7sr4q3...XeGUrBKEa?dl=0&preview=PC_AlwaysTranceMod.zip

it sets all characters on trance model but can be edited with the provided .hws!.
First things first. Thank you all for your help and instructions! I'm very glad to see how supportive this community is :).  I know that mod, and I have used it. But the problem is that it sets all characters into their trance model, I only wnat it for Zidane. Evenmore, I don't know why, but when casting spells with that mod on, there is always a kind of shadow shilouette behind the spellcaster which looks quite weird.
 
Tirlititi has a mod for trance models defaults!.
https://www.dropbox.com/sh/ac7sr4q3...XeGUrBKEa?dl=0&preview=PC_AlwaysTranceMod.zip

it sets all characters on trance model but can be edited with the provided .hws!.
I don't suppose this could be used to add trance skins to Beatrix, Marcus, Blank and Cinna and an animation to change into them. Or, perhaps rather, allow them to have a "trance mode" without actually shifting to a new model.

As things are now, the game will crash if they are given a trance bar and it becomes full because the animation/skin is missing from those models.

And the only way I can think of a work around would be to edit the action for what happens when trance happens is so that instead of doing the animation to shift into their trance model, to make it so that all characters maybe just do their victory pose instead. So then none of the characters ever use their trance modes. I am not even sure if that would work, but I imagine it might.

And, honestly, not using the second skin for any of the characters is fine for me. Final Fantasy 7 didn't need its characters to mutate into weird super saiyajin versions of themselves for the round they had trance after all.

But-- still-- I might decide I want to try to make a trance skin for Marcus eventually if I can get him working without eliminating Eiko from the game.
 
Here is how it works. It's pretty simple:
1) In the class "btl_init", the array "model_id" contains the list of the player character's models:
Code: [Select]
Code:
Zidane (2 of them),Vivi,Dagger (4 of them),Steiner (2 of them),Quina,Eiko (2 of them),Freya,Amarant,Cinna,Marcus,Blank (2 of them),Beatrix,Zidane Trance (that's the 20th, at index 19 and there are 2 of them just like the regular),Vivi Trance,etc...up to Amarant Trance.
Which makes a list of size 19 (regular) + 14 (trance) = 33 models.
These are different model names but I think that they mostly use the same mesh files and the different names are meant to link to different animations (but I'm not sure, that's what I remember about). Anyway, the duplicates are because of the different fighting stances when using, for example, thief daggers or thief swords. Dagger also has her long/short hair versions.
About Steiner, I think the difference has to do with a flag that can be activated in the "Battle" and "BattleEx" script codes, but it's a dummied feature and never actually used.

2) The methods "BattlePlayerCharacter::CreateTranceModel" and "btl_init::SetBattleModel" setup the models at the start of the battle. They create both a regular and a trance model/skin for those who have it and hide the trance version. The condition is simply "if ((int)(serialNumber + 19) < btl_init.model_id.Length) // add a trance version" for both methods.
Note that there is a duplicate of the regular model list, "BattlePlayerCharacter::PlayerModelFileName" for some impractical reason. The lists used are thus:
- "BattlePlayerCharacter::PlayerModelFileName" for the regular model and "btl_init::model_id" for its skin (geotexanim),
- "btl_init::model_id" for the trance model and its skin.

3) When creating a trance model, the animations are entirely taken from the regular model so you don't need to care about it (but the trance model has to have exactly the same bone hierarchy as the regular one). I suppose that there is no problem in taking the same "geotexanim" as the regular one or even don't use geotexanim at all (I don't really see a texture animation on battle models, except the trance glowing but that's handled automatically elsewhere).

4) In HW's "Party -> Stats" panel, there's some setting to do in order to have a proper trance command.

5) Characters have a trance gauge if they are not setup with category "temporary character" in the script code initializing them ("SetCharacterData"). Also, trance gauge is disabled early game and for Dagger when she's depressed.

6) Also, another array must be extended for Beatrix. In the method "btl_stat::SetStatusVfx", which mostly takes care of glowing effects (and floating/confused but we don't care there), you can find an array like that
Code: [Select]
Code:
byte[][] array = new byte[][]new byte[] { 255, 96, 96 },// etc...
These are RGB color factors for the glowing effect of the trance. You must extend the array with one entry (of 3 bytes) corresponding to Beatrix's glowing effect when she turns to trance. The default color factor is 128, which means that "{ 128, 128, 128 }" will not display any glowing at all. Personally, I used the following in my mod:
Code: [Select]
Code:
new byte[] { 255, 160, 128 }
In conclusion
In order to add a properly working trance to Blank, Cinna, Marcus or Beatrix, you need to do 3 things:
• In HW, setup a trance command for the character (define it in the panel "Party -> Commands" and give it to the character "Party -> Stats"; remind that Beatrix has 2 ability sets),
• In HW, remove the "Temporary Character" category of the character(s) you want to give trance to. It's in the "Environment -> Fields" scripts, when the characters join the team, there are lines "SetCharacterData" to tweak a bit. For instance, Beatrix's character data is initialized twice:
-- in the script "A. Castle/Queen’s Chamber" (one of them anyway, there are several ones... the good one has "Bandersnatch" functions in its script), whithin the function "Beatrix_Loop", there's a line "SetCharacterData( 8, 1, 11, 22, 14 )" near 4/5 of the function.
-- in the script "Alexandria/Square" (the one at night), whithin the function "Steiner_Init", there's a line "SetCharacterData( 8, 1, 13, 22, 15 )". In both cases, the change should be replacing the argument "22" by a "6" to remove the "Temporary Character" category.
• In dnSpy, append 5 lines to "btl_init::model_id" by giving trance models.
-- Either use the exact same models as the regulars (ie. append "GEO_MAIN_B0_013", "GEO_MAIN_B0_014", "GEO_MAIN_B0_015", "GEO_MAIN_B0_016" and "GEO_MAIN_B0_017" to the list): the only difference will be the glowing,
-- Or use another existing model and the same bone hierarchy (the correspondances between "model name" and "model numerical ID" is in the dictionary "FF9BattleDB::GEO"),
-- Or find a way to import a workable new model with the right bone hierarchy and register it in both "FF9BattleDB::GEO" and "btl_init::model_id". I have been unsuccessful to import a workable model, as the files added to the archives require a lot of registering and linkage and I apparently miss some (I don't remember if I successfully imported a new texture with the Unity Assets Viewer...).
• Still in dnSpy, append 1 entry to the local array that can be found around the middle of "btl_stat::SetStatusVfx".
 
Last edited:
Tirlititi a new model being replaced/added is not limited to a certain poly amount right? I insured the model has the same bone hierarchy as original and model showed invisible in game!. My model has ~117289 polys. ~88790 without spline patches.
 
Thanks for the help Tirlititi, it works!

ps: while we're in argument of "battle trance model"...there is, so, a way to let temporary characters use trance mode, right?
 
Last edited:
@Incinerator: I don't think that splines are imported correctly!
Triangularize the mesh before importing it. I think splines are not supported because there is none in the non-modded game and I didn't know how to handle them. If someone is expert in Unity serialized 3D models, he could explain how to handle splines.

There is no hard-coded polygon limit so I guess the problem doesn't come from there. There is no reason for the engine to discard big models if they are valid.

@ToraCarol: Yes, that's the main point of my previous message.
 
Sorry I have another little problem, tomorrow I try to check again but if someone can help me for now, I'll be glad. So on Burmecia I'm in the "Zorn and Thorn event", but I don't know why for some reason it's freezing at the start, when Zidane comes in the Region for the event. I've tried to set the VAR_GlobBool_247=0 because if I don't put the variable in it freezing anyway, and if set to 1 Freya keeps walking randomly for some reason, but..it seems to not work. Have I to set "if" or something on the loop? I really don't understand :| The only thing I know is that before to put the variable the script worked! So it may be the reason..i'm not sure.

I'm sorry if i'm coming with silly problems like this but...sometimes I don't really know how to come through x"D



Ok guys, I've checked and solved...thank you anyway!!! 8)

I also want to say sorry for my oversight, yesterday I was on my phone and I haven't seen that TheHobgoblin asked about the temporary character-trance thing..and Tirlititi explained very well. So I'm very sorry for having asked a so obvious question.  :oops:

Just a thing, it's necessary to use DnSpy? And if so, where I have to go exactly? (I didn't used DnSpy so much, the only time I've used it was just for change the font  :roll:)
 
Last edited:
Yes, it is necessary to use dnSpy (or mod the source code using Memoria, but that's C# all the same).

When I write about editing C# code (or CIL code), I write about classes and method with the format "class::method". That means that you need to find the class in the list shown by dnSpy and then find the method inside that class. Namely, the classes of interest here are "btl_init" and "BattlePlayerCharacter".
 
I'm so so sorry to bother you again but this time I seriously don't know where's the problem. So in the end of the Zorn and Thorn loop, when Zidane move is enabled again, it looks like Freya doesn't want to follow him and stay in her place...so..why? I've tried everything but I guess i'm missing something..

Anyway when I change from one field to another, everything it's ok, so this just happen at the end on the loop, before to leave the field!



UPDATE: Another thing, on Memoria I want to make appear on the Field the first character of the Party, to control instead of Zidane..so I've tried to entry a new character for test, set InitObject (251) (TeamCharacter 1),  but it doesn't seem to work..Zidane still appears? Why?
 
Last edited:
I'm really sorry if I bother...now I'm trying to solve by myself the Burmecia thing..I think I can solve somehow...

Still no Idea about Memoria..can someone help? :(
 
Last edited:
@Incinerator: I don't think that splines are imported correctly!
Triangularize the mesh before importing it. I think splines are not supported because there is none in the non-modded game and I didn't know how to handle them. If someone is expert in Unity serialized 3D models, he could explain how to handle splines.
I figured this may have been it!.
I've become triangulating the mesh, will need re-working, as I see spline are really not supported. I'm also researching the use of splines in Unity serialized models.
 
@ToraCarol: It's not really possible to do that because not all the characters have the correct animations (like opening a chest or climbing a ladder).
"InitObject( 251 )" works only if there are script functions for the character. For instance, if Eiko is the first character, then the script must have a "Eiko_Init" function attached to Eiko's entry for "InitObject( 251 )" to work.
You can see in the "Edit Entries" window that there is always an entry for the player characters. It's just that they usually don't have any function linked to them.

In order for the player to control a character, it's something different: you need to use "DefinePlayerCharacter()" in the entry that you want the player to take control of (usually, it's in the "Init" function but it can be in another function if, for instance, the control is not given as soon as the characters are placed).

You don't bother me; it's just that I stopped modding so I don't answer right away anymore.
 
@ToraCarol: It's not really possible to do that because not all the characters have the correct animations (like opening a chest or climbing a ladder).
"InitObject( 251 )" works only if there are script functions for the character. For instance, if Eiko is the first character, then the script must have a "Eiko_Init" function attached to Eiko's entry for "InitObject( 251 )" to work.
You can see in the "Edit Entries" window that there is always an entry for the player characters. It's just that they usually don't have any function linked to them.

In order for the player to control a character, it's something different: you need to use "DefinePlayerCharacter()" in the entry that you want the player to take control of (usually, it's in the "Init" function but it can be in another function if, for instance, the control is not given as soon as the characters are placed).

You don't bother me; it's just that I stopped modding so I don't answer right away anymore.
Mhmhmh..maybe I'm missing something. So what I actually did for a test it was to "InitBlank", so I created this Init for him and then I've tried to put on the Main Init the "InitObject (251)"  ???
But it doesn't work anyway.. I've also added the  "DefinePlayerCharacter()"  thing.

I had to mention this before, forgive me!

Anyway, I was thinking about memoria because is the place where it needs less animation (like Hiza and stuff that are in common with all the characters, almost). And since is the last part of the game I thought it would be nice to create something like this!

And don't worry, you've been very helpful and I appreciate it! I want to say thank you for the help you gave me, also Incinerator too! Without you I guess this Mod (even if is not perfect) would never have been created!
 
What did you put in Blank's Init function?
It should look like the example I gave here for Beatrix (you need to change the position, the model ID and its animation IDs and add the "DefinePlayerCharacter" line).
 
Here, like I always did.. (in this case I've taken a few codes from Zidane init , but the model and animations are the right ones)

Code: [Select]
Code:
Function Blank_Init    switchex 3 ( General_FieldEntrance ) {    case 150:        set VAR_GlobInt16_0 = 65390        set VAR_GlobInt16_4 = 62586        set VAR_GlobInt16_6 = 151        set VAR_GlobInt16_2 = 937        break    case 152:        set VAR_GlobInt16_0 = 117        set VAR_GlobInt16_4 = 3048        set VAR_GlobInt16_6 = 255        set VAR_GlobInt16_2 = 65349        break    case 10000:        set VAR_GlobInt16_0 = 64979        set VAR_GlobInt16_4 = 65407        set VAR_GlobInt16_6 = 64        set VAR_GlobInt16_2 = 65321        break    default:        set VAR_GlobInt16_0 = 65382        set VAR_GlobInt16_4 = 62643        set VAR_GlobInt16_6 = 0        set VAR_GlobInt16_2 = 937    }    SetModel( 5467, 87 )    CreateObject( VAR_GlobInt16_0, VAR_GlobInt16_4 )    TurnInstant( 80 )    SetStandAnimation( 5041 )    SetStandAnimation( 462 )    SetWalkAnimation( 5225 )    SetRunAnimation( 5222 )    SetLeftAnimation( 5223 )    SetRightAnimation( 5224 )    SetJumpAnimation( 5041, 9, 25 )    SetObjectLogicalSize( 20, 20, 30 )    SetAnimationStandSpeed( 14, 16, 18, 20 )    SetHeadAngle( 96, 61 ) MoveInstantXZY( GetEntryPosX(255), VAR_GlobInt16_2, GetEntryPosY(255) )    SetPathing( 1 )    DefinePlayerCharacter(  )    EnableHeadFocus( 0 )    if ( General_FieldEntrance == 10000 ) {        SetObjectFlags( 14 )        SetObjectSize( 12, 0, 0, 0 )    }    return
 
Last edited:
That seems correct.

1) You're using the Steam version, right? It doesn't work easily on the PSX version (though it should work if the animations are the standard ones).
2) Check that you added this function to the correct entry: it should be the 7th entry after Zidane's entry (for instance, if Zidane is the entry 11, Blank should be the entry 18). In particular, this "Blank_Init" function should be displayed below Zidane's functions.
3) In the "Edit Entries" window, check that Blank/Amarant's entry is properly set to a "model entry (2)". They are sometimes defaulted to "255" when they are not used.
 
UPDATE:
Nevermind Tirlititi, I've decided to solve in another way..let'see if works!
 
Last edited:
I want to extract moguri mod merged images. I've tried to use 0.40 0.40b (the second one looks like it has bugged Custom Backgrounds macro). And I can't unpack textures to properly merged images. Images are always mismatched. I've tried to apply macro, save mod, swap csharp and always it looks like it using parameter 32.

I was thinking of changing code, but it shows that I don't have wxwidgets. Yes, I used recursive git to clone.
Tried with vc2017 cmake and it shows that I don't have fbxsdk. Installing it resolved nothing.

Edit: ok, nvm. Solved it.  ::) Still I need to figure out how to properly export/import Backgrounds.
 
Last edited:
Status
Not open for further replies.
Back
Top