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

  • Thread starter Thread starter Tirlititi
  • Start date Start date
Status
Not open for further replies.
Thank you Incinerator, when I'm home I give a try!

About the model swap, to distinguish the battle model from the other I have to open it with a 3d program, or else?

And the animations? I can try to looking for all the animations, but you know is there's a particular way to show the preview? Maybe the same program for open models?

You know I don't want to go wrong with something when I'll try to swap Lani and Cinna :P

UPDATE: Mmh, maybe I figured how to distinguish the battle model, in the Field there's "Set Model" and the number, so the other one is the battle model..right?
Model swapping and/or importing doesn't work yet with the model tool.

Mhmh..nope, nothing changed.. :oops:

ps: InitObject (13 0) is Amarant, Vivi is InitObject (7,0) in my case.
Try starting from a clean slate, and then test the function.
 
Model swapping and/or importing doesn't work yet with the model tool.

Try starting from a clean slate, and then test the function.
Oh my, forgive me... freakin distraction, you said me two times and I didn't read it (or maybe I ignored because too excited of the idea, ahahah idk), ok then. So the only one thing to do is to wait and hope I guess ^^''

And ok, I just tried another time to start from a clean state, and I know for sure that the problem is something with blank.. but I really don't get what..  :-\ I'll try for a third time..

Thank you anyway, again.
 
Last edited:
I know for sure that the problem is something with blank.. but I really don't get what..  :-\ I'll try for a third time..

Thank you anyway, again.
I'd see where'd you come from there; I too had problems with Blank and this particular field. So, I ended up using an emergency function to save it all.
 
I'd see where'd you come from there; I too had problems with Blank and this particular field. So, I ended up using an emergency function to save it all.
Aahah, really? So how did you do? I simply did not put Blank in.. but if you had a better idea, I'm curios!
 
In the end I've decided to put Blank as a simple "Extra character" for the battles..much easier for my personal stuff...  :mrgreen:

So now, just want to know

I know Tirlititi mentioned a way to choose between Blank and Amarant without replacing

so I have wrote the dialog choice, but now..

where i put this?

Code: [Select]
Code:
WindowSync( 0, 128, DialogID )if ( GetDialogChoice==0 ) {    // "Amarant..." is chosen    SetPartyReserve( 255 )    SetCharacterData( 7, 0, 255, 5, 7 )} else if ( GetDialogChoice==1 ) {      // "Blank ofc!" is chosen    SetPartyReserve( 1215 )    SetCharacterData( 11, 0, 255, 21, 12 )}
Everytime i try to put this it says "unexpected line {" or something like this..  so where i need to put it exactly??? Between WHICH lines??? Thank you if you'll help  :)
 
I know Tirlititi mentioned a way to choose between Blank and Amarant without replacing

where i put this?

Code: [Select]
Code:
WindowSync( 0, 128, DialogID )if ( GetDialogChoice==0 ) {    // "Amarant..." is chosen    SetPartyReserve( 255 )    SetCharacterData( 7, 0, 255, 5, 7 )} else if ( GetDialogChoice==1 ) {      // "Blank ofc!" is chosen    SetPartyReserve( 1215 )    SetCharacterData( 11, 0, 255, 21, 12 )}
Everytime i try to put this it says "unexpected line {" or something like this..  so where i need to put it exactly??? Between WHICH lines??? Thank you if you'll help  :)
1. It's best to put a choice like this on an NPC. Put in a scenario, and you may only have that one chance to select the choice.

2. Init that NPC in a Field accessible at all times.

3. Your SetPartyReserve and SetCharacterData functions are wrong. Currently (in your else {) you have SetPartyReserve, Marcus selected and SetCharacterData, Blank and Blank's equipment; don't change. The else function should be setting Amarant's data back in. (see below) Functions in your (if {) statement are fine.

4. The error you got is likely because you have two if { statements. You put another if { statement on the else {.

example from mine:
Code: [Select]
Code:
    DisableMove(  )    DisableMenu(  )    WindowSync( 1, 128, 0 )           \\ dialog text with choice (set in Texts panel - example below)    if ( GetDialogChoice == 0 ) {        SetPartyReserve( 2143 )        SetCharacterData( 11, 0, 14, 21, 13 )        SetName( 11, 0 ) \\ Or Amarant's name will set over Blank's...        WindowSync( 1, 128, 1 )        \\ A text "Blank has joined the party!" or something similar.        set VARL_GenBool_8012 = 1        FadeFilter( 6, 16, VAR_GlobUInt8_17, 255, 255, 255 )        EnableMove(  )        EnableMenu(  )        Wait( 16 )        FadeFilter( 7, 16, VAR_GlobUInt8_17, 0, 0, 0 )    } else {        SetPartyReserve( 255 )        SetCharacterData( 7, 0, 7, 5, 7 )        Menu( 1, 7 ) \\ Set name back to Amarant etc.        WindowSync( 1, 128, 2 )        \\ A text "Amarant rejoins the party!" or similar.        FadeFilter( 6, 16, VAR_GlobUInt8_17, 255, 255, 255 )        EnableMove(  )        EnableMenu(  )        Wait( 16 )        FadeFilter( 7, 16, VAR_GlobUInt8_17, 0, 0, 0 )    }    if ( GetDialogChoice == 0 ) {        FadeFilter( 7, 16, VAR_GlobUInt8_17, 0, 0, 0 )    } else {        TimedTurn( VAR_GlobUInt8_16, 16 )        WaitTurn(  )        EnableMove(  )        0x27( 255 )        EnableMenu(  )    }    return
Text dialog choice; add in texts panel:
Code: [Select]
Code:
[STRT=140,4][PCHC=2,1][IMME]NPC"Who'll you replace?"[CHOO][MOVE=18,0]Blank with Amarant[MOVE=18,0]Amarant with Blank

Study this. See the difference between yours?
 
Last edited:
There is no "else if" statement in the script language (it would be possible to implement it but I'm not sure if I'll do it).
You have to put it in a function "NPC_SpeakBTN" of the NPC of your choice. In this post, you have an other example of such function, based on what is usually done for NPCs in the game. The function that Incinerator showed is not complete because, for instance, it uses "TimedTurn( VAR_GlobUInt8_16, 16 )" without showing how "VAR_GlobUInt8_16" is setup.

Other than that, I guess he answered what you're missing, right?
 
it uses "TimedTurn( VAR_GlobUInt8_16, 16 )" without showing how "VAR_GlobUInt8_16" is setup.
That's from the same function you gave me as an example a long while ago. Been using it in that same spot ever since. And it works fine.
 
I don't say it's wrong, I say it's incomplete. You didn't show the first lines of the function.
 
I don't say it's wrong, I say it's incomplete. You didn't show the first lines of the function.
Oh I see! I sure didn't!

got a question myself; is there a function I can use to make a treasure chest appear at random percentage? In other words; init a treasure that has a 1% chance of spawning?
 
So, you can do it like this, in the "Main_Init" function :
Code: [Select]
Code:
if ( ( GetRandom % 100 ) < 1 ) {    InitObject( X, 0 )}
Where "X" is the entry of the chest. With this, the chest will appear with only 1/100 chances each time the player enters the field.
Using the usual code that is made for chests, it will appear opened if the player already took its content. For making it renewable, you need to change the general flag variable that says it is opened into a global variable (which reinits when you leave the field).
The general flag variable is something like "VARL_GenBool_7283" ; turn it into something like "VARL_GlobBool_560" (I just had a look at the game's engine and it seems that the global variables are limited to 80 bytes, so up to "VAR_GlobUInt8_79" or "VARL_GlobBool_639").

If you want the chest to be a one-time, though, you don't need to use global variables instead of general ones.
 
Thank you for the help you guys, so much appreciated  ;D

You know if there's somewhere a database or else where I can find the original PSX Iconset? You know I don't like the new ones so much, so I started to work on it. I just found these on the Wiki, but not much Weapons and items  :(
 
Here you are.
In the PSX version, the icons are defined by a shape and a palette of colors (unlike for the Steam version where each used icon has its own image file, even if only the color changes). A lot of those icons are thus a combination of shape + color that is not used in-game.
 
The cameras of the fields are a bit weirdly stored and, last time I tried, I couldn't have them properly readed.
Would it be possible for you to share what unity asset file the camera data for fields is stored in at all? Along with the file extension.
I've searched high and low but I can't seem to find anything relating to the camera data.

If I had to guess I'd say it could be the MCF files inside of p0data7.
I'm unsure what MCF stands for, and its just a guess honestly, since p0data11 contain the walkmeshes themselves.
 
Last edited:
Wrong ! Try again :p

Just kidding: the files with field cameras are the .bgs files (Tilesets (BG_SCENE)). These files contain both the tilesets and the camera(s). Binary-wise, it presents like this:
Code: [Select]
Code:
uint16 tileset_size // I don't remember if it's the whole file or only tilesuint16 depth_shift // ???uint16 tileanim_countuint16 tileset_countuint16 light_countuint16 camera_countuint32 tileanim_offset // Offsets are absolute with respect to the .bgs fileuint32 tileset_offsetuint32 light_offsetuint32 camera_offsetint16 origin_y // The Y coordinate is called Z in the game's source code ; it's the depthint16 current_y // All these coordinates don't seem to be used anywayint16 origin_xint16 origin_zint16 current_xint16 current_zint16 min_xint16 max_xint16 min_yint16 max_yint16 screen_xint16 screen_y...// At camera_offset:uint16  distance // "proj" in the source codeint16[9] matrix_3x3int32  offset_xint32  offset_zint32  offset_yint16  center_offset_xint16  center_offset_yint16  offset_widthint16  offset_heightint16  min_x // "vrpMinX" in the source codeint16  max_xint16  min_yint16  max_yint32  depth
The main problem for me is the 3x3 matrix: I don't know to which OpenGL matrix it corresponds. I got bad views when I tried to do what seemed logical to me considering how the source code uses everything.

Note that the PSX cameras for the battle scenes are in the .raw17 (of archive p0data2) together with the enemy attack sequencing (and some datas related, like animation lists). But maybe they are ignored for the Steam version and they use other cameras somewhere else.

The MCF files seem to be something about ambiant light, but I'm not sure since there's already data about light in .bgs (EDIT : Ah, no ! I remember that the "light_count" is always 0 in all the .bgs of the game).

Good luck ^^'
 
Last edited:
Note that the PSX cameras for the battle scenes are in the .raw17 (of archive p0data2) together with the enemy attack sequencing (and some datas related, like animation lists). But maybe they are ignored for the Steam version and they use other cameras somewhere else.
Is that why some cameras in few battles either don’t run or bug out completely? I know a few cameras of enemy spell sequences sometimes bug. Like the camera on enemy_Fang in evil forest, or the Enemy_Troll physical attack, and Enemy_Gnoll casting Blizzara. Camera bugs because steam version ignores these psx cameras?
 
Status
Not open for further replies.
Back
Top