Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Tirlititi

Pages: 1 ... 12 13 14 15 16 [17] 18 19 20 21 22 ... 35
401
@fmalust: Oh, I'm sorry. I didn't see your message... Good that you could fix the problem.
It's not the first time that I miss a message ; it happens too frequently these days...

@ToraCarol: I have double-checked and I didn't change any camera setting for this battle in AF. You are doing something making it weird.
Verify that the camera used is the camera 0 in the group data (below the list of attacks of Abadon).
If the camera is indeed 0, a camera bug could occur because of AI script: did you change a function of the AI script? If so, what are those changes?

402
I'll check ; I have no idea of what is the glitch that you describe. The only slowdowns I've ever experienced were because of bad 3D models (or badly configurated).

Well, in any case, I did built the mod after saving/loading the .hws several times so it seems doubtful that the file itself is corrupted.

EDIT: Ah well, I nevermind then ^^'

403
I messed with the battle, but not with the camera.
I have seen several people doing that fight without bug, so I guess it's your version that glitches. The second Abadon uses the same functions as the first (even if it has a different attack pattern).

404
You can't control the battle camera... but that battle should allow 3+1 characters with a good camera: I don't remember messing with the camera when I added Beatrix to this battle and it works fine.

About the name, it may have been reseted by the script for some reason... Add a "SetName" line in the Pandemonium script before the fight and choose to rename Blank with the appropriate name.

405
Which window dialog? 493, 494 or 224?

The 493 and 224 dialogs are supposed to be handled by the script: the player has no natural control on closing the windows (or displaying the text faster) but with the lines "while ( !IsButton(655360L) ) { Wait( 1 ) }", the script waits for the player to press a button ("Confirm" or "Moogle") and closes the windows after a fading.
These dialogs are assumed to have either the opcode [NFOC] (= "No Focus") or [TIME=-1] (which has the same effect but can also determine a timeout for closing the window if the argument is non-negative).

The dialog 494 is not closed by the script and is assumed to have none of the opcodes [NFOC] or [TIME=...].

406
Hum, no idea. I thought that the light was dependant on the position of the character. Maybe that's because he's next to a light source?
It seems weird to me that models would need some special setting to have a correct light.

407
That might be the case. It seems to me that they are a bit off. At least there are the bugs you mention, and the cameras during Beatrix fights are shifted. There definitely is a problem with battle camera but I still don't know whether the PSX cameras are badly read or if they made other cameras and failed some of them.

Actually, there is a whole bunch of methods in the "SFX" class that are external, so not in the Assembly-CSharp.dll, and I don't know how to access to them. Surely that they are in the FF9SpecialEffect.dll plugin, but the dll's header doesn't list them.

408
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]
uint16 tileset_size // I don't remember if it's the whole file or only tiles
uint16 depth_shift // ???
uint16 tileanim_count
uint16 tileset_count
uint16 light_count
uint16 camera_count
uint32 tileanim_offset // Offsets are absolute with respect to the .bgs file
uint32 tileset_offset
uint32 light_offset
uint32 camera_offset
int16 origin_y // The Y coordinate is called Z in the game's source code ; it's the depth
int16 current_y // All these coordinates don't seem to be used anyway
int16 origin_x
int16 origin_z
int16 current_x
int16 current_z
int16 min_x
int16 max_x
int16 min_y
int16 max_y
int16 screen_x
int16 screen_y
...
// At camera_offset:
uint16 distance // "proj" in the source code
int16[9] matrix_3x3
int32 offset_x
int32 offset_z
int32 offset_y
int16 center_offset_x
int16 center_offset_y
int16 offset_width
int16 offset_height
int16 min_x // "vrpMinX" in the source code
int16 max_x
int16 min_y
int16 max_y
int32 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 ^^'

409
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.

410
So, you can do it like this, in the "Main_Init" function :
Code: [Select]
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.

411
I don't say it's wrong, I say it's incomplete. You didn't show the first lines of the function.

412
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?

413
@Tedrainbow: Hum ok, it's been a while since you asked and I thought you did that already.
So, apparently, what I described before only allows your stat growth to break the limit, but the limit still applies for equipment stat boost.
So, you need to also change the method "ff9play::FF9_GetSkill". Near the 4/5 of the method, you'll find lines like these:
Code: [Select]
ldfld 0x40008AD // FF9PLAY_SKILL::Base
ldloc.0
ldelem.u1
ldloc.s 6
ldloc.0
ldelem.u1
ble IL_0328
ldarg.1
ldind.ref
ldfld 0x40008AD // FF9PLAY_SKILL::Base
Just replace the line "ble IL_0328" by "br IL_0328" and it should remove the limit totally.
It is not easy to choose the limit yourself by CIL code editing because the limit is stored in an unreachable array ("<PrivateImplementationDetails>::$$field-545").
In practice, it will then be that the base stats are limited (by whatever limit you want) and the equipment stat boosts can still increase that limit a bit.

@Tedrainbow: Maybe you import the atlas file in a RGB format (Alpha channel, ie. transparency is not imported). In the Unity Assets Viewer's image options, you can choose the "RGBA" compression method to be sure to import the image without compression and with its transparency. If I remember correctly, the DXT5 compression method can use about 4 shades of transparency.

MIPS is the assembly language of the PSX. It doesn't exist anymore in the Steam version and is replaced by CIL code.
It is possible to move other characters than Zidane (actually, you just need to use the script code "DefinePlayerCharacter()" in another entry than Zidane's entry) but you'd need to script all the animations that come with that. Zidane can have an interaction with a lot of stuff through the game and sometimes has specific animations for these interactions that other characters just don't have.
This has nothing to do with MIPS but with Field scripts, by the way.

414
@ToraCarol: Albeoris's Memoria tool is able to change the text font of the game easily, but it's incompatible with HW right now.
But apparently, the tool dnSpy allows to edit the Assembly-CSharp.dll by changing the C# code, which is just as great. You can change the font by replacing the declaration of the variable "defaultFont", in the "EncryptFontManager" class, by this:
Code: [Select]
public static Font defaultFont = Font.CreateDynamicFontFromOSFont( "Arial" , 16 );"Arial" is the font name and "16" is the font size (you can change them to your convenience).
Here's a list of fonts you can use.

@Tedrainbow: I don't really understand.
First of all, this red light is not part of your problem, right?
Then, changing the primary stats bonuses in the "Items" panel should be enough ; there's nothing else to do to mod the items primary stat boosts (the only thing is that they use "Stat Sets" and modding the stats boosts of 1 equipment can have an impact on other equipments if you're not careful).
It was working fine a couple of HW versions ago, and I didn't touch that part of the tool, so I guess you're doing it wrong. But if you can't fix it, I'll have a look.

About CIL code, I'm not planning to add nor to fix anything from these panels. I know that they are useful for plenty of things that people generally want to mod, but these panels were added more like a precarious feature waiting for something more convenient.
As said, it looks like dnSpy should be a better solution right now (I didn't test it yet but I'm definitelly interested in that).

415
Ok, so lot's of things there :/

1) The problem lies somewhere else. Modifying the script should have no impact on what happens after the SquareEnix logo. Script modifications are in the file "p0data7.bin" and, if you get an "Assembly-CSharp.dll", that means you're modifying something else.
I don't know what could cause this bug with the latest version of HW. You may try to update your FF9 game by going to your Steam's game library -> right-click on FF9 -> Properties -> Check the integrity of local files. It will update the game to the latest Steam release and replace the modded files (it won't remove the .hws files and it's always better to have your mod in that format as well ("File -> Save Mod" in HW)).

2) So, if I understand correctly, nothing happens in-game if you do that? No bug, but nothing changed?
If so, it may be because of:
- Either your "Blank_Init" function is wrong ; since your "Blank_SpeakBTN" is correct, I feel that you did the other one just fine,
- Or you forgot to add a line "InitObject" in the "Main_Init" function: you should have a look at it and see a bunch of those "InitObject" lines, each corresponding to some 3D model on the field,
- Or you made the mod in one language and play the game in another one (the default language is "English (US)" in HW, you can change that in the "Files -> Preferences"). Scripts are language-dependant.
- Or, as Incinerator said, you copy the files in the "x86" folder of the game while playing in "x64" mode. If you copy the modded files in both folders, you're sure to be good in that regard.

3) It's a bit complicated: Blank uses the same slot as Amarant, so you can't have them both in the team at the same moment. Since Amarant is already there (as a party member) in the Pandemonium scripts, the best is to consider Blank as a NPC if you want to add him in cutscenes.
There is only one feature that is different between playable characters and NPCs in the scripts: it's the possibility to refer to an entry (in that case, a 3D object) that corresponds to the characters in your party. In the "InitObject" line, for instance, one can use "InitObject( 251, 0 )" to refer to the 1st character in the party, instead of doing things like:
Code: [Select]
if (IsInParty(0)) { // If Zidane is in the party
    InitObject( 10, 0 ) // Init the 3D object and functions corresponding to Zidane
}
if (IsInParty(1)) { // If Vivi is in the party
    InitObject( 11, 0 ) // Init the 3D object and functions corresponding to Vivi
}
// etc...
Except for that feature, NPCs and PCs are handled the same way.

4) That picture is in the "sharedassets2" archive (like most of this kind of pictures).
When you "right-click -> Export selection", it exports the file in the folder "HadesWorkshopAssets" (in the game's directory) as you saw. You may edit the file from there (if you have the option "Automatically convert images to PNG", as I recommand, you should be able to edit the file with any image editing tool). In order to re-import the modded file in the archive, you must be sure that this modded file is in the "HadesWorkshopAssets" folder at the same place and with the same name as when exported (in this case, there should be no ".png" extension because the file doesn't have an extension in his name in the archive). Then just "right-click -> Import Selection" should popup a message, either saying it was successfully imported or saying that it failed.
The general politic is that the Unity Assets Viewer expect the re-imported file to be in the same format as the exported file, ie. it expects a PNG image if you have the "Automatically convert images to PNG" enabled.
And to complete, the archives are indeed duplicated (except for the "Streaming Assets" archives) in two folders, "x64" and "x86" and only one of them is used by the game. You may switch folders in the Unity Assets Viewer in its options, or you may indeed copy-paste the modded archive to the other folder as well.

416
It's the field that is loaded when hitting the "New Game" button. It basically launches the opening cinematic and move to Prima Vista/Cargo Room.
It used to work fine. I guess that it crashes because it has no background or walkmesh ; I'll fix it.

Variables of type "General" (Var_Gen...) are the ones saved in saved games. It doesn't matter whether it's an auto-save or a moogle save.
I'm not really sure what you're doing that for. If you want to have a "New Game +" feature, setting a flag before an auto-save is not the way to go because auto-saves make sure that both executions are ran with the same setup (you can't distinguish between the 1st execution and the execution after the player hits the "Continue" button).

417
So, I'm working on something else right now and I can't test about these bugs you mentioned, Incinerator, but I'll eventually take a look at them.
About 3D environment, it would be possible to change the engine to make it possible ; I don't even think that would be such a huge amount of work (the environment is already mostly 3D, engine-wise). It would be way more difficult to recreate the scenes themselves in 3D, and I don't think they would look as great as prerendered backgrounds (not to mention that a lot of things are working visually because of static backgrounds: look at Alexandria's bell tower, its size from outside and its camera for inside).

The foot sfx datas are indeed stored in the walkmesh (well, more precisely, the walkmesh says which kind of ground each triangle is ; then the script says which footstep sound is played on each kind of ground). It is not possible to replace the walkmesh data now because there's no tool to edit the walkmesh itself.

@jmp434: You have the 3D OBJ files describing the walkmesh geometry two posts above yours. The cameras of the fields are a bit weirdly stored and, last time I tried, I couldn't have them properly readed.

418
I don't exactly know what you're preparing us, but that sounds very neat :D
Here are the walkmeshes:
https://www.dropbox.com/s/p0yvu6ofcj658u1/FF9Walkmeshes.zip?dl=1

I don't think that I'll add an option to export them in HW as I am pretty sure that there will never be an importer of walkmeshes in OBJ format. Adding an exporter may make people think that walkmeshes are just a bunch of triangles. I'll just let the walkmeshes here.

PS: I double-faced the triangles because apparently the orientation of triangles is not relevant for walkmeshes.

419
It is possible, yes. You just need to empty the party reserve and then setup the characters' data: with the "Update level" option, it usually sets the character's level to the average level of the party reserve, but it sets the level back to 1 for an empty party reserve.
Code: [Select]
    SetPartyReserve( 0 )
    SetCharacterData( character_id, 1, 255, 255, 255 )  // By using 255 in the other arguments, you don't change the value
    SetPartyReserve( 255 ) // May be different if you don't want the 8 regular characters to be available

420
Yes he was modded (both the usual and the friendly yans).
It was also proven that, contrary to the non-modded fight, you can defeat a Friendly Yan at lvl 1.

421
Look at Black Waltz 3's AI script (the battle on the Cargo Ship). He starts the battle by casting trance on Vivi.
Basically, you need to "set SV_FunctionEnemy[ATB] =$ SV_FunctionEnemy[MAX_ATB]" and use a flag for the first attack of the enemy.

422
Ok yes, this is AI script.

So actually, the default AI scripts are usually quite complex. One thing you should do before editing AI scripts is import the local variable informations ("LocalVariableSettings_v1.hws" that is included with the tool). It makes the scripts a bit more readable.
But writing a simple AI script like what you say can be done quite easily. Here is how the "ATB" function would look like:
Code: [Select]
Function Enemy_ATB
    if (turn_counter == 0) {
        // Turn 1
        if (GetRandom % 2) {
            set SV_Target = RandomInTeam( SV_PlayerTeam )
            Attack( Poison ) // It is not "Poison" that should be in the real thing but the attack ID instead
        } else {
            // You may avoid Silencing someone who's already silenced using this kind of lines
            set SV_Target = RandomInTeam( NotMatching(SV_PlayerTeam[STATUS_CURRENT_A], 265) & NotMatching(SV_PlayerTeam[STATUS_CURRENT_B], 64) )
            if (SV_Target == 0) { // Everyone is either dead or silenced already...
                set SV_Target = RandomInTeam( SV_PlayerTeam )
            }
            Attack( Silence )
        }
    }
    if ((turn_counter == 1) || (turn_counter == 3)) {
        // Turn 2 and 4
        set SV_Target = RandomInTeam( SV_PlayerTeam )
        Attack( Physical Attack )
    }
    if (turn_counter == 2) {
        // Turn 3
        set rnd_num = GetRandom % 100
        if (rnd_num < 50) {
            set SV_Target = RandomInTeam( SV_PlayerTeam )
            Attack( Flare )
        } else {
            if (rnd_num < 90) {
                set SV_Target = RandomInTeam( SV_PlayerTeam )
                Attack( Stop )
            } else {
                set SV_Target = SV_PlayerTeam | SV_EnemyTeam
                Attack( Doomsday )
            }
        }
    }
    set turn_counter = ((turn_counter + 1) % 4)
    return
And declare the local variables "turn_counter" and "rnd_num" in the local variable panel:
Code: [Select]
local uint8 turn_counter
local uint8 rnd_num

For the counter-attack, I suggest that you take a look at Gizamaluke's AI and mimic it.

423
@aidolu12: Yes, it's extremely difficult to do CIL changes by only looking at the CIL code. It's way better to look at the C# code to at least understand how the engine works before guessing how you can tweak it (it requires reading C# but that's always better than CIL).
You can see the C# code in Memoria's Github page, or using a tool like dnSpy or dotPeek.

For your particular question, it's not particulary easy in CIL, but you might change the method "BattleHUD::GoToBattleResult" and add this kind of lines:
Code: [Select]
call 0x6000F5D // FF9StateSystem::get_Battle
ldfld 0x4002267 // BattleState::FF9Battle
ldfld 0x4002230 // FF9StateBattleSystem::btl_list
ldfld 0x4000226 // BTL_DATA::next
ldfld 0x400022A // BTL_DATA::cur
ldfld 0x4000809 // POINTS::hp
call 0x6000F5D // FF9StateSystem::get_Battle
ldfld 0x4002267 // BattleState::FF9Battle
ldfld 0x4002230 // FF9StateBattleSystem::btl_list
ldfld 0x4000226 // BTL_DATA::next
ldfld 0x4000229 // BTL_DATA::max
ldfld 0x4000809 // POINTS::hp
ldc.i4.4
div
add
call 0x6000F5D // FF9StateSystem::get_Battle
ldfld 0x4002267 // BattleState::FF9Battle
ldfld 0x4002230 // FF9StateBattleSystem::btl_list
ldfld 0x4000226 // BTL_DATA::next
ldfld 0x400022A // BTL_DATA::cur
stfld 0x4000809 // POINTS::hp
This only restores 25% of max HP of the 1st character only (and doesn't even check if it goes over the max HP limit)...
Best is to use Memoria for that and add these lines instead, since you can surely use local variables when replacing C# code:
Code: [Select]
for (BTL_DATA next = FF9StateSystem.Battle.FF9Battle.btl_list.next; next != null; next = next.next)
if (next.bi.player != 0 && next.cur.hp>0)
next.cur.hp = min(next.cur.hp + next.max.hp / 4, next.max.hp);
Much simpler indeed ^^'

@Gordo98: What you want to do is not related to AI but to the battle system, so CIL code or C# again :/
And increasing the duration of status effects is not possible with HW, as explained here. The best you can do is to change the tick for poison/venom/regen.

424
Don't say that! It is still possible to annoy me many many more times :p
Here's an updated link.

However, Italian is actually a language for which there already is a translation (of the current version of AF). TheFF8Fan was able to translate everything all by himself, and even added a couple of scripted sequences.
https://www.youtube.com/watch?v=NWWxD4WKBdA (Check out his profile for the parts after this.)

425
About the "Spells" panel: yes, the Magic Swords are in there as well, but they are spread around. Most of them are next to Dagger's summons and Flare/Doomsday are at the end of the list.

About the "Localization" field, yes I noticed that. As strange as it appears, it's not a bug from HW but that's how the latest Steam version texts are (they were correctly set in the previous Steam versions). Don't bother.

Pages: 1 ... 12 13 14 15 16 [17] 18 19 20 21 22 ... 35