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

Incinerator

  • Guest
Re: [PSX/PC] General editor - Hades Workshop (0.39b)
« Reply #1150 on: 2018-05-27 22:54:02 »
I want to add damage to the Break attacks Steiner has. So, it does damage like a regular attack, and also performs the Break (Power, Armor, etc.) Is there any way to do that?

Change the Effect of the spell. To either Magic Attack, etc.

Tirlititi

  • *
  • Posts: 874
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.39b)
« Reply #1151 on: 2018-05-28 08:08:23 »
@ploppo: About adding Beatrix, the simplest ways if you don't care about story are to use either CheatEngine or Albeoris's Memoria (the latter is the easiest but not compatible with changes made with HW).
I don't do team viewer or other things like this. I explained precisely how to import Beatrix out of my mod and if you made a mistake the 1st try, just try again ^^'

About Salamender/Zidane trance skills, the most probable if I got it right is that you only swapped the command in the "Stats" panel.
In the "Stats" panel, you need to:
1) Remove the "Trance link" of those characters by setting the option to "None",
2) Replace the abilities from the ability list to the ones used by the trance commands.
If you apply 1) without 2), you should be able to use all the abilities without learning them. If you apply both 1) and 2), you'll make these abilities learnable exactly the same as for the other abilities. In particular, you should also make sure that Zidane's weapons (and Salamender's) teach the trance abilities instead of the normal ones.

@Squid7777: It is not possible without changing the battle engine (the solution proposed by Incinerator doesn't work because Break abilities are not statuses). There are 2 ways of changing the battle engine: using Albeoris's Memoria tool (not compatible with HW) or using a C# DLL editing tool (compatible with HW as long as you don't mess with sensible parts of the engine).
I suggest that you use dnSpy for that.
What you need to do is to edit the class "btl_calc". More specifically, the method "CalcMain" of that class and even more specifically, the cases 33, 34, 35 and 36 in the switch. It should be something like this by default:
Code: [Select]
case 33:
case 34:
case 35:
case 36:
btl_calc.CalcSub_101(cALC_VAR);
btl_calc.CalcSub_114(cALC_VAR);
if (btl_calc.CalcSub_121(cALC_VAR))
{
if (prog_no == 33)
{
DEF_PARAMS expr_F0B = target.defence;
expr_F0B.p_def /= 2;
}
else if (prog_no == 34)
{
target.elem.str = target.elem.str * 3 / 4;
}
else if (prog_no == 35)
{
DEF_PARAMS expr_F54 = target.defence;
expr_F54.m_def /= 2;
}
else if (prog_no == 36)
{
target.elem.mgc = target.elem.mgc * 3 / 4;
}
}
break;
The "CalcSub" lines are quite abstruse.
"CalcSub_101" setups the accuracy of the spell,
"CalcSub_114" lowers the accuracy if Shell is on,
"CalcSub_121" performs the accuracy check: what is inside the "if" block is executed only if this check connects and the "missed" flag is turned on otherwise.
In that file, I've copied the "btl_calc" class and renamed the "CalcSub" methods to make it more readable. You can look at it to understand how spell effects work.

What you want to do is changing these lines to something like this:
Code: [Select]
case 33:
case 34:
case 35:
case 36:
btl_calc.CalcSub_101(cALC_VAR); // Accuracy for the break effect
btl_calc.CalcSub_114(cALC_VAR); // Shell hit rate malus for the break effect
if (((int)v.hit_rate > Comn.random16() % 100) && ((int)v.ev <= Comn.random16() % 100)) // conditionally lower stat
{
if (prog_no == 33)
{
DEF_PARAMS expr_F0B = target.defence;
expr_F0B.p_def /= 2;
}
else if (prog_no == 34)
{
target.elem.str = target.elem.str * 3 / 4;
}
else if (prog_no == 35)
{
DEF_PARAMS expr_F54 = target.defence;
expr_F54.m_def /= 2;
}
else if (prog_no == 36)
{
target.elem.mgc = target.elem.mgc * 3 / 4;
}
}
// Unconditionally damage the target:
btl_calc.CalcSub_13A(cALC_VAR); // Setup base damage like a physical strike
btl_calc.CalcSub_141(cALC_VAR); // Apply caster bonuses of Bersek/Trance and malus of Mini
btl_calc.CalcSub_143(cALC_VAR); // Apply target bonuses of Sleep/Mini and maluses of Defend/Protect
btl_calc.CalcSub_159(cALC_VAR); // Apply equipment elemental boosts of the spell element
btl_calc.CalcSub_203(cALC_VAR); // Setup the damage... Everything else is handled by "CalcResult"
break;
It's a kind of mix between "Break" spells and "Physical Strike" spells.

@ToraCarol: I'm not sure...
These lines from the "Main_Init" function are definitely wrong:
Code: [Select]
    while ( GetBattleState != 1 ) {
        if ( #VAR_GlobUInt16_42 ) {
            set VAR_GlobUInt16_42[PRESENCE_OFF] =$ 1
        }
        Wait( 1 )
    }
Use these instead:
Code: [Select]
    while ( GetBattleState != 1 ) {
        Wait( 1 )
    }
    if ( #VAR_GlobUInt16_42 ) {
        set VAR_GlobUInt16_42[PRESENCE_OFF] =$ 1
    }
Also, you should import the .hws file "LocalVariableSettings": in the AI scripts, it gives names to the local variables and make it much more readable (you'll see "dagger" and "blank" instead of "VAR_GlobUInt16_28" and "VAR_GlobUInt16_42" for example).
But I'm not sure that it will fix the bug... I'll try to investigate it if it doesn't work, but I'm busy with the next version of HW right now.

ploppo

  • *
  • Posts: 103
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.39b)
« Reply #1152 on: 2018-05-28 10:21:32 »
@Tirlititi my objective is to unlock her permanently , not temporary , so i don't know how i could do with cheat engine , and if i can permanently have her with that engine tool than i could be nice if hw become compatible with it , but what exactly is the reason why is not compatible ? and i was thinking about the reason of the failure : all i did was to download the alternate fantasy files from your post on steam, so maybe that can be the mistake , then , i followed your guide , and i unticked everything except the "text" and the "fields" parts , after importing i modified that part of the script in the boss fight that would be glitcky , still no trace of beatrix , maybe the problem depend on the fact that i applied the mod after several saves and several progress in the plot , or maybe the problem come from the language i selected initially (italian), what do you think ?

Tirlititi

  • *
  • Posts: 874
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.39b)
« Reply #1153 on: 2018-05-28 10:30:21 »
Yes, you need to select the english (US) language. There is no italian translation right now (after the next release of HW, I'll work on an international version of Alternate Fantasy).

The problem with Albeoris's Memoria is that it changes sensible parts of the engine. The spell datas, for instance, are not stored in the same format anymore after applying Memoria.

ploppo

  • *
  • Posts: 103
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.39b)
« Reply #1154 on: 2018-05-28 15:46:26 »
@Tirlititi ok , in any case , i deleted the previous save and started the game in english language , this time it should work , i mean i am not an hacker , but i take a look at the entries menu in hw , and i see that both zidane and beatrix have the "2" , while the non existent characters  in that zone have the "255" , but is possible that zidane need a "1" instead of a "2" ? i mean , is possible that she doesn't appear because of that corresponding number ? come to think of it , after an initial failure i take a look at the conversation in the steam forum , this time , before start the game in english , i injected the parts that contain beatrix trough a what you called " the before_scene " or something like that , but i don't know if that can be a problem or not
« Last Edit: 2018-05-28 15:48:28 by ploppo »

ToraCarol

  • *
  • Posts: 120
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.39b)
« Reply #1155 on: 2018-05-28 17:35:05 »
@Tirlititi.. thank you so much! I know that the follow code you sent me was the right one, but I've tried to change place for testing.. because when the battle is starting, at very first the "floating sword" of Blank appears, and when the ATB stars it desappear! (already the camera is not the best, so imagine)




 I've tought that doing something like this it may have solved the problem.. and it did...but.. it creates me one even worse! So, ok, thanks to you now I know that I have to try something else..so..I'll give a chek, but if anyone will find a solution before me I will be so thankful!
« Last Edit: 2018-05-28 18:28:35 by ToraCarol »

ploppo

  • *
  • Posts: 103
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.39b)
« Reply #1156 on: 2018-05-28 19:22:49 »
@Tirlititi   even after starting the game in english language , she doesn't appear in the castle coutryard :\ , at this point i could try to add her by myself once i reach the part of the plot were i can fight kuja for the lust time

ploppo

  • *
  • Posts: 103
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.39b)
« Reply #1157 on: 2018-05-28 21:27:11 »
@ToraCarol @Trilititi : i managed to solve the problem , in trith i followed the procedure correctly , the real problem is something that none mentioned in any post , that is : if we select a certain language in hades workshop , we are modifying the relative language in the game itself , but usually those kind of programs doesn't have this clause , at least isn't something common for a non hacker , essentially , the first three times i applied the mod to the italian language of ff9 , so the only result was to not make her appear in the castle to recruit her , and also to corrupt the italian translation , but after i selected the english language in the program , and also running the game since the beginning in english , she finally appeared , in short , those kind of details are very important to know , it was only for a coincidence that i attempted to apply the mod after selecting the english text in the program

ploppo

  • *
  • Posts: 103
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.39b)
« Reply #1158 on: 2018-05-29 15:45:22 »
@Tirlititi link thanks , i solved the problem about the trance command of zidane and amarant, usually they only appear when they are in trance because those abilities aren't present in three apposite sections used to tell the game that a certain character have a certain ability , in short , to give any ability we want to any character we want we must : place the command\support ability in the skill list of an equipment that belong to the character that we chose , and do the same in the command\support ability section , and if we want to give to someone a command , we also must place that command in the list of abilities that belong to a certain command
« Last Edit: 2018-05-29 18:26:19 by ploppo »

ploppo

  • *
  • Posts: 103
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.39b)
« Reply #1159 on: 2018-05-29 18:28:20 »
@Tirlititi  were the game store and assign the music to play during the random battles ? i like to substitute the usual battle them with the ost " you are not alone " :D

Incinerator

  • Guest
Re: [PSX/PC] General editor - Hades Workshop (0.39b)
« Reply #1160 on: 2018-05-29 19:28:07 »
@Tirlititi  were the game store and assign the music to play during the random battles ? i like to substitute the usual battle them with the ost " you are not alone " :D

It's stored resources.assets :: BtlEncountBgmMetaData.txt
It's arranged as:

Code: [Select]
  "2924": { // field ID
    "138" // Enemy ID : "35", // Music to Play

Though for You're not Alone event in particular, the function is ran from the script, with "RunSoundCode( 0, 0 )"; played throughout the scene. The three battles are not present in BtlEncountBgmMetaData.txt, to prevet the changing of music during battle encounter.
It is in the Main_Loop function of field: Pand./Mind Control IIRC.

Change it from the script; change it from p0data61.bin
« Last Edit: 2018-05-29 19:31:00 by Incinerator »

ploppo

  • *
  • Posts: 103
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.39b)
« Reply #1161 on: 2018-05-29 19:33:14 »
@Incinerator ok thanks,i will try and let you know the results :D

ploppo

  • *
  • Posts: 103
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.39b)
« Reply #1162 on: 2018-05-29 20:02:17 »
@Incinerator  but wait a minute : what option  i have to look in hades workshop to do that ?

ploppo

  • *
  • Posts: 103
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.39b)
« Reply #1163 on: 2018-05-29 20:07:25 »
@Tirlititi the  0.40 version of hades worhsop doesn't show all the battle spots , the previous version show almost 400 battle spots , but this version only show 127 battle spots , how can we fix that ?

ToraCarol

  • *
  • Posts: 120
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.39b)
« Reply #1164 on: 2018-05-29 20:13:33 »
@Incinerator  but wait a minute : what option  i have to look in hades workshop to do that ?


Tirlititi

  • *
  • Posts: 874
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40)
« Reply #1165 on: 2018-05-29 20:18:29 »
@ploppo: The musics are in the "p0data61" archive. You can replace them using the Unity Assets Viewer (in the "Tools" menu). Only .ogg files are accepted. Incinerator's answer is more complete, if you want to change some the musics of individual battles.
Also, the battle spots are still there, just displayed better (there was only the first 4 battles in each spots before and spots at the same place were not shown together).

Update to v0.40:
- Improved the text changing window:
--- Fixed the crash of the PSX version,
--- Added a proper preview of most Steam text opcodes,
--- Allow to change all the languages on the same window,
--- Compute the dialog bubble size, approximately.
- Added a language link between scripts (AI scripts, World Map scripts and Field scripts):
--- When languages are linked, any modification on the script of one language also applies to the linked languages,
--- Except for dialog text IDs, the scripts of linked languages are the same (you can choose the translations of each text ID),
--- By default, if two language scripts only differ by the text IDs of the dialogs, they are linked,
--- The scripts batch exported are exported in all the languages checked in the "Preferences".
- Added a preview for the item icons in the Steam version (it was already there in the PSX version).
- Improved a bit the display of the World Map Battle Spots.
- Fixed some bugs (crash for some .hws files, crash when editing scripts after adding/removing a function, crash when trying to edit the "Opening-For FMV" Field...).

So, with this new version, you can, without too many troubles, create mods that are compatible with all the languages.
As I said, you can't automatically translate the texts right now, but it will be possible eventually (keeping in mind that it will be nowhere as good as true translations ; it will be about "google-translate" quality and manage the opcodes of the translations more easily). I didn't add a way to import PSX texts in Steam or vice versa. I'm not sure if it will be a thing one day (well, if really I don't have anything more to do).

Also, about the "STRT" opcode, it is updated when clicking on the "Auto-Size" button but it's not very important to have a precise width (the height is just the number of lines). If the specified width is too short, the game automatically choose the best fitting width.
It is however extremely important to have exactly one STRT opcode at the start of all the texts (at least in the "Texts" panel), even in texts that are not actually used.

Also, I tweaked the way that 3D models are imported, especially when custom model hierarchy are used, but I couldn't make everything work unfortunatly :/
I saw that replacing the 3D models of main characters is quite complicated (even swapping models) but it is possible: it needs to really make it perfect to have the good animations (so, let's say you use Quina's model instead of Zidane's, you'd need to rename the animations of Quina to fit the names of the animations of Zidane, not to mention to import everything properly with the right path names)... I'm not sure if I can make the process easier because it seems very dependant to what the engine expects... and when there is a dummy animation together with the model in the p0data4 archive, it has to be imported as well (for some reason, it's important to have this dummy animation when it's there by default).
Accessory, enemy and NPC models are much easier to change than models of the main characters (for battles, there's an additional problem since normal battle models and trance battle models share their animations).

EDIT: I forgot to add. About script languages that are linked and those that are not:
Most of the times Field scripts are the same between languages except for minor differences (but sometimes not so minor).
1) The Japanese version is not often linked to others because the buttons used are not the same. In particular, most of the time, when the script awaits a "Confirm" or "Moogle" button in the international versions (when dialog bubbles are handled by the script, for instance), it awaits a "Cancel" or "Moogle" button instead in the Japanese version.
2) In the Japanese and US versions, some "Wait" times are higher than in the other versions (surely to catch up with the PAL/NTSC frame rate). It is not always the case, far from that, but it may happen that a "Wait( 60 )" in the US/Japanese version is a "Wait( 50 )" in the European versions.
3) Dummy differences: it happens sometimes that dummy lines, with no effect, are present in some languages and not in the others. An example of this is the Chocobo Forest's UK script where an extraneous local variable is set up but never used (as part of the functions dealing with the display of the "Chocobo Forest" title tiles).
4) Real and important differences: there are a couple of real differences between the different languages. The most known is the reward of the Blank swordfight minigame (there is no static reward of 10000 gil when performing a 100/100), but there are also titles tiles that are displayed a bit differently, or some "Wait" lines added in some cutscenes... The AI script of Ragtime Mouse is also different in the US language because, contrary to all the other versions, the questions are displayed in 2 successive dialogs in US instead of 1 dialog with two lines.
Even though, it is usually safe to force the link on all the languages (except for the button mapping in Japanese that can be troublesome for people used to it). If you do force the link, you'll have to verify that dialogs used in the scripts are using the correct translation (as you may have noticed, the number of texts varies from language to language: some unused texts are removed/added in some versions, creating a shift in the text IDs).

I will now work on Alternate Fantasy for a while. I'll make an international version first, but then I'll also work on the mod ; I'm planning to only work sparsely on HW while doing that.

Also, I have once again changed a lot of things related to .hws file format (for script and text datas) ; I have done tests to check if that goes without bugs and didn't find any, but everything is possible. So I advise you to have copies of you .hws files (anyway, these files are so low-sized that I advise to have backups of them in any case).
« Last Edit: 2018-05-29 20:51:37 by Tirlititi »

ploppo

  • *
  • Posts: 103
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.39b)
« Reply #1166 on: 2018-05-29 20:27:25 »
@Tirlititi  @ToraCarol ok thanks :D , and my interest in to change the background music of all the random battles
« Last Edit: 2018-05-29 20:29:12 by ploppo »

ToraCarol

  • *
  • Posts: 120
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.39b)
« Reply #1167 on: 2018-05-29 20:29:53 »

Also, I tweaked the way that 3D models are imported, especially when custom model hierarchy are used, but I couldn't make everything work unfortunatly :/
I saw that replacing the 3D models of main characters is quite complicated (even swapping models) but it is possible: it needs to really make it perfect to have the good animations (so, let's say you use Quina's model instead of Zidane's, you'd need to rename the animations of Quina to fit the names of the animations of Zidane, not to mention to import everything properly with the right path names)... I'm not sure if I can make the process easier because it seems very dependant to what the engine expects... and when there is a dummy animation together with the model in the p0data4 archive, it has to be imported as well (for some reason, it's important to have this dummy animation when it's there by default).
Accessory, enemy and NPC models are much easier to change than models of the main characters (for battles, there's an additional problem since normal battle models and trance battle models share their animations).

I will now work on Alternate Fantasy for a while. I'll make an international version first, but then I'll also work on the mod ; I'm planning to only work sparsely on HW while doing that.

Also, I have once again changed a lot of things related to .hws file format (for script and text datas) ; I have done tests to check if that goes without bugs and didn't find any, but everything is possible. So I advise you to have copies of you .hws files (anyway, these files are so low-sized that I advise to have backups of them in any case).


Aaaaw, so no way for me to add Lani...  :oops: You know, I've tried by replacing names and stuff.. I've tried to check everything but.. I don't know, the game still go crashing! I think that for some reason I forgot something for sure!

Thank you anyway for your hard work Tirlititi!

Oh yeah I wanted to ask you

1) May you know the reason of that floating sword of Blank at the beginning and how to remove it?
2) I want to create a window ability exclusive for Blank.. but i REALLy can't figure how to create one, I mean there's no space in any case and it says me about "link" and stuff, but I don't know the best way to "sacrifice"  spells etc etc, can you give me a hint?
3) Talking about music... how is the best way if I want to replace a music with an external one, so not already in the game?

ploppo

  • *
  • Posts: 103
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.39b)
« Reply #1168 on: 2018-05-29 20:44:27 »
@ToraCarolmaybe i can help this time : i was having crush problems even before open hades workshop the very first time , so i take a look at some conversation on steam and i learned the cause : developers just were too careless to set the compatibility with the multiple core , so , to solve the problem , run the game and after the first logo appear , open the task manager , right click on FF9 process and click on " show more details " or something similar , then , right click on the FF9 process again and click on something similar to " set affinity " , that will open the panel of the affinity with the core , you must untick every core besides the core number 0 , that will assure limitless hours of play without any problem , i tested this solution :D

Incinerator

  • Guest
Re: [PSX/PC] General editor - Hades Workshop (0.40)
« Reply #1169 on: 2018-05-29 20:53:47 »
Awesome work as always T.
We got further now with importing custom model: HW will bring up a message to Insert New Asset: "Take001.anim", then proceed to crash. I'll be testing away with this one; been meaning to try this plan, see if it works.

Tirlititi

  • *
  • Posts: 874
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40)
« Reply #1170 on: 2018-05-29 21:00:35 »
@ToraCarol:
1) I don't know :/
The "set VAR_GlobUInt16_42[MODEL_OFF] =$ 65535L" line should be the one that hides the weapon if I am not mistaken. I'll look in the engine if there are special instances where it's not good enough.
2) You can select one of the "Seiken" command and link it to the other "Seiken" command because they share the same abilities anyway ; that frees 4 slots that you can distribute somewhere else. You can do the same with Dagger's summons (normal & trance commands).
3) I gave the answer to that: musics are stored in the p0data61 archive and you can swap/replace them at will. You only need to have your music in .ogg format (and define looping points if you want it to loop in-game ; it is a feature of .ogg files).

Incinerator

  • Guest
Re: [PSX/PC] General editor - Hades Workshop (0.40)
« Reply #1171 on: 2018-05-29 21:13:52 »
Error:
Code: [Select]
The AnimationClip '' used by the Animation component '443(Clone)' must be marked as Legacy.
I got this error after tweaking my model; at least the game didn't crash, however:

Warning: Do not attempt model swapping; it will cause the game to use up all your ram.

ploppo

  • *
  • Posts: 103
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40)
« Reply #1172 on: 2018-05-29 21:17:40 »
@Tirlititi come to think of it , i always wanted to ask you something : long ago you said that the engine can't handle some enemy spells wen you try to make them usable for the player , how this is possible ? it's the same game , the same..everything , why should make a difference the fact that , for example , zidane is using ultima ?  :-o

ploppo

  • *
  • Posts: 103
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40)
« Reply #1173 on: 2018-05-29 21:24:55 »
@Tirlititi so i am the only one with this problem in the battle spot section ? the first 4 lines appear , but the other group of four lines doesn't appear

Incinerator

  • Guest
Re: [PSX/PC] General editor - Hades Workshop (0.40)
« Reply #1174 on: 2018-05-29 21:26:18 »
zidane is using ultima ?  :-o

I believe he said with Ultima, it's something about the battle not being able to continue after using it as a regular spell.
Of all the enemy spells this one can be used. Even some of the [Enemy-Death] animation can work as spells given it added damage figure points.
One hopes for HW to edit spell animations more deeply.

@Tirlititi so i am the only one with this problem in the battle spot section ? the first 4 lines appear , but the other group of four lines doesn't appear
Doesn't happen with me...
« Last Edit: 2018-05-29 21:30:19 by Incinerator »