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 ... 19 20 21 22 23 [24] 25 26 27 28 29 ... 35
576
Version 0.35b is up. All the changes apply only to the Steam version :
- Fixed the black screen bug in battles when you modified an item,
- Improved the reading/modding of Assembly-CSharp.dll,
- Added a "Break damage limit" macro, be careful that it will bug with certain bosses,
- You can now change the model of the enemies.

So, for the reading/modding of Assembly-CSharp.dll, it should allow people like Baby5, who has slightly different version of the game, to use Hades Workshop without problem (Baby5, you can use the file that you uploaded : stats panel and status lists and other things should work fine now).

The "Break damage limit" has a problem which is not related to the game's engine but with the AI of several bosses : they have 10000 more Max HP than normally and are not supposed to die, ever (they terminate the battle before they reach 0 HP). For these bosses, if you hit them so hard that they reach 0 HP without passing through the 1HP-9999HP range, they will die for real and, from my experience, the game will sofltlock.
I don't know how to fix that... Any fix will be AI script related anyway.

The enemy model feature is all fresh. I just figured out this week-end that it shouldn't be too hard to be done with the Steam version. To properly modify the model (you can only choose models of enemies btw), you need to change the model in the 1st page of an enemy's data and then modify that enemies' attacks spell animation sequences. Indeed, in the spell animation sequences, there are lines like "Play Animation" ; since the animations of the previous model and the animations of the new ones will likely not match, you need to change the numbers of these lines (check the spell animations of the default enemies that have the chosen model).
In the future, I will make it so you can add/remove different kinds of enemies in an battle, and I hope the "Battle Scene" field will work soon as well. This way you can take out the full potential of choosing an enemy's model.

I looked about modifying Defend/Change abilities, but that's a bit more complex than I thought. They are specially handled at various points in the code and I need to see which ones to modify and how.

577
Yes it is possible to add break damage limit. For tents (I also experienced it with Chakra and Pumpkin Head when I gave those skills to bosses), that's a non-intended bug. I don't know what it does in the Steam version, but in the PSX one, it displays a green 9999 even though it damages the target.
The new damage cap should be at 32767, or maybe 65535. The Max HP limit can't be increased as said.

@ blahitzmunchii : You can do the same as for Beatrix minus the fact that you need to remove Amarant from the party for that. Depending on what you want to do exactly, it may be easier with CheatEngine or such. I copy/paste a post I made a while ago :
It is perfectly possible (though tedious) to replace a character by another, minus the well-known fact that Cinna, Marcus and Blank share some data (the levels in particular) with Quina, Eiko and Amarant respectively. You can't have both Cinna and Quina in the team either, for instance. To replace a character, you can put the following lines inside scripts, at points before you can change your party (in the Hildaguard 3, for instance) :
Code: [Select]
SetPartyReserve( 4095 ) // Adjust this argument if you want fewer people
SetCharacterData( 8, 1, 255, 22, 15 ) // Beatrix
SetCharacterData( 9, 1, 255, 21, 8 ) // Cinna
SetCharacterData( 10, 1, 255, 21, 10 ) // Marcus
SetCharacterData( 11, 1, 255, 21, 12 ) // Blank
SetName( 8, 75 ) // Rename Beatrix (shouldn't be important)
SetName( 9, 72 ) // Rename Cinna (or else he's called "Quina")
SetName( 10, 73 ) // Rename Marcus (or else he's called "Eiko")
SetName( 11, 74 ) // Rename Blank (or else he's called "Amarant")
You'd need to add that kind of script anywhere the party is somehow modified to make it persistant ; or use a similar script to revert the changes if you want Quina, Eiko or Amarant back in the team.
There are bugs that can happen at some point of the game, however. During the Oeilvert part, for instance, the script looks for your party members to see which character should be present in the cutscenes. I think Eiko will be on the field instead of Marcus and so on... but for Beatrix, you need to add script animations and such specially for her.

Instructions on how to modify the scripts can be found in the following post. It is needed for Beatrix inside those problematic fields like at Oeilvert (otherwise the game softlock), and it is optionnal for Marcus, Blank and Cinna (without it, you see the corresponding regular party member on the field).
http://forums.qhimm.com/index.php?topic=14315.msg242890#msg242890

For completeness, I put below the typical "Init" functions for Beatrix, Blank, Marcus and Cinna. I add a "jump" animation in case you want them to jump because, in the Steam version, there can be a "bug" which makes those jumps unavailable under certain conditions.
For the record, that "bug" works like this :
1) An animation has to be loaded in the RAM before it can be used by a character/model,
2) In the PSX version, the only animations loaded in the RAM are the very basic ones for all the party cast + the ones specified in the "Preloading" datas,
3) In the Steam version, an animation is loaded in the RAM (if it weren't there already) most of the time at the moment it is required,
4) The opcode "SetJumpAnimation" is buggy in the sense that it won't load the corresponding animation ; I think it's the only one doing that,
5) Animations can also be loaded in the RAM when entering the field using the "Preloading" datas ; it is less convenient and it needs to be linked to a model for that.
Code: [Select]
Function Beatrix_Init
    SetModel( 204, 100 )
    CreateObject( 0, 0 )
    TurnInstant( 0 )
    SetStandAnimation( 8566 )
    SetStandAnimation( 2978 )
    SetWalkAnimation( 2975 )
    SetRunAnimation( 2981 )
    SetLeftAnimation( 2980 )
    SetRightAnimation( 2974 )
    SetJumpAnimation( 8566, 4, 23 )
    SetObjectLogicalSize( 20, 20, 30 )
    SetAnimationStandSpeed( 14, 16, 18, 20 )
    SetHeadAngle( 104, 48 )
    return

Function Cinna_Init
    SetModel( 107, 87 )
    CreateObject( 0, 0 )
    TurnInstant( 0 )
    SetStandAnimation( 9889 )
    SetStandAnimation( 470 )
    SetWalkAnimation( 761 )
    SetRunAnimation( 105 )
    SetLeftAnimation( 104 )
    SetRightAnimation( 107 )
    SetJumpAnimation( 9889, 5, 22 )
    SetObjectLogicalSize( 20, 20, 30 )
    SetAnimationStandSpeed( 14, 16, 18, 20 )
    SetHeadAngle( 96, 61 )
    return

Function MarcusA_Init
    SetModel( 109, 100 )
    CreateObject( 0, 0 )
    TurnInstant( 0 )
    SetStandAnimation( 12011 )
    SetStandAnimation( 474 )
    SetWalkAnimation( 367 )
    SetRunAnimation( 365 )
    SetLeftAnimation( 368 )
    SetRightAnimation( 364 )
    SetJumpAnimation( 12011, 9, 24 )
    SetObjectLogicalSize( 20, 20, 30 )
    SetAnimationStandSpeed( 14, 16, 18, 20 )
    SetHeadAngle( 96, 61 )
    return

Function Blank_Init
    SetModel( 5467, 87 )
    CreateObject( 0, 0 )
    TurnInstant( 0 )
    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 )
    return

578
@ Fraggoso : It is 0.35, I only forgot to change the thread's title (to check the version, go to "about" (F1)).

@ Ignotus : If you use the Steam version of Final Fantasy IX, then do as Fraggoso said. If you use a binary image of the PSX version, then it is corrupted because it still works (for those, at least, I'm sure there are not 50 different official versions floating around).

@ Baby5 : Thank you for the report.
The occasional crash when you select the language is troublesome ; I had this regularly, for a lot of different versions of the tool, and everytime I think I've fixed it, then another one pops up somewhere else...
In 0.35, I fixed a few of them so maybe that won't happen anymore there. However, I know for sure that the program crashes if you're browsing the "Fields" panel too long (after looking at ~120 different fields on my PC, but that should vary depending on the PC). I didn't succeed at fixing it.
The difference in size is normal. As long as there are different versions of Assembly-CSharp.dll, their file sizes will likely not match. The offsets are all internal though. There is no other file that have offsets pointing in Assembly-CSharp.dll, so that's strange your game crashes.

As a reminder : Hades Workshop can read only non-modded files. For the Steam version, only Assembly-CSharp.dll needs to be clean : the resources file and p0dataN and such can be modded as long as they still contain the normal files (they are archives). That means :
1) HW does not work if Albeoris's Memoria was applied on your game (the mods that don't change Assembly-CSharp.dll, like the Audio Fix, works fine),
2) HW does not work if you give it to read a modded Assembly-CSharp.dll even if it was generated by HW. That's why there are those saving instructions and that's why you should make .hws files ("Save Mod"), which are light files created very fast and that contain all your modifications and are portable if ever FF9 gets officially updated.

It might happen that HW successfully reads and modifies modded games, but it's luck-based and if the modded file don't differ too much.

Since Baby5 just re-installed the game from Steam and it didn't work, then either Steam distributes different versions of the game depending on something (you don't have a Japanese version, right?), either I missed an update or such. I'll re-install the game as well to check.

579
Check your PMs, Baby (I didn't think I would write that someday).

Yes, importing the .hws mods from PSX has issues because of the text formatting which is totally different and I don't make the conversion. If you untick the boxes "including texts", you should have no problem though (I did that for my Alternate Fantasy).

The "list of status" bug should have been fixed also.

@ Itoikenza : No, those CIL Macros don't work for the PSX version.
The PSX's basic language is MIPS : it's a set of instructions and every single PSX game uses them to communicate with the PSX machine.
For computers, there is a lot of those basic languages and CIL is one of them.
So you can't use MIPS in computers and you can't use CIL for PSX : they don't understand these languages. It's like speaking greek to a french guy, he just won't understand :D

580
Hold everything ! A new problem has just popped.
It seems that if you modify something in the "Items/Key Items" panels and export the mod to Steam, then the battle won't start properly in-game (either a black screen either you can see enemies with very few luminosity).

The saving/loading of .hws files seems to work fine still. Nothing's lost as long as you use that saving method.

Fixing that asap.

581
Thanks Vivigix.

Well, that's a valid point, even for the Steam version. It will require to modify the btl_cmd types only, I think.
If you're lucky, I can find out where the related MIPS code lies (I'm sure it is in the editable MIPS code somewhere... I only got to find it in an assembly code of 78710 instructions :D). Then I can give you a .hws file (I'm not planning to make macros for MIPS, no ^^").
Which PSX version are you using again? The US?

582
Hi everone, version 0.35 is now available :
- You can now poorly modify the IL script code (more details below),
- In the same panel, the feature called "Macro" allows to do pre-generated IL script modifications. For now, only two are availables :
--- Unlock Ability Learning for Beatrix : allows Beatrix to learn abilities like a regular character and to use supporting abilities (more below),
--- Disable Cheats : remove the booster features of the Steam version. The speedup is still available but it also speeds up timed game phases, like Hot & Cold or the 30 minutes Alexandria event.
- Fixed the export/import text batching,
- Fixed several bugs in scripts edition (when I say "script" alone, I mean the field/World and enemy AI scripts).

Two notes about IL scripts :
1) It is an assembly-type script, so it will be very very hard to decipher (plus, as said, the way HW displays it is not the best...). I can't imagine someone doing proper things if he doesn't have the source/decompiled C# code to compare with.
2) The list of IL instructions can be found here for instance :
https://en.wikipedia.org/wiki/List_of_CIL_instructions
IL and CIL are synonymous.

One of the most useful IL type to look at and modify must be "btl_calc" : every methods of this type are useful. It contains the same battle mechanics as the available MIPS code in the PSX version : damage calculations, status adding, special spell requirements... I modified a bit a version of the these methods to make it a bit more convenient (I changed the names of those "CalcSub" methods). You can find it here :
https://dl.dropboxusercontent.com/u/98687557/Resources/BtlCalc.cs

About IL Macros, they modify one or several methods ; if you modify those methods yourself aside of that, the related macro will not be available anymore. I'm planning on adding options for them also, so you can decide if you want to disable all the cheats or just some of them for instance. One of their point is also that they will be updated and the bugs (if any) will be fixed without for you to change everything if a bug is found for a macro.

About the "Unlock Ability Learning for Beatrix", you need to do two things so that it works : apply the macro and give to Beatrix AP requirements to her abilities (and optionnally supporting skills). She then will be like a normal character, which also means that her abilities won't be available from the start. You can make her learn her standard abilities by adding this code inside the field scripts when you recruit her for the first time :
In "A. Castle/Queen's Chamber" (the 3rd one when the fields are not sorted alphabetically ; there are functions with "Queen_Brahne" and "Bandersnatch" in the list on the left),
In the function "Beatrix_Loop", go at the very bottom of the function, there is a line "Battle( 0, 916 )" which is the battle against Bandersnatch.
Add these lines right before that battle :
Code: [Select]
        LearnAbility( 8, 149 )
        LearnAbility( 8, 150 )
        LearnAbility( 8, 151 )
        LearnAbility( 8, 152 )
        LearnAbility( 8, 2 )
        LearnAbility( 8, 5 )
        LearnAbility( 8, 6 )
        LearnAbility( 8, 10 )
        LearnAbility( 8, 14 )
        LearnAbility( 8, 16 )
        LearnAbility( 8, 19 )
        LearnAbility( 8, 24 )
Then parse and confirm.

Also, I checked and you can use this macro for the same purpose on Marcus, Blank and Cinna (if you give them abilities to learn). Their ability AP progression will even be conserved if you save/load the game, but, judging from the source code (maybe gjoerulv can confirm that, or someone tests it), they will be saved on the ability AP slots of the corresponding regular character : If Marcus learn abilities in disc 2, Eiko will have abilities learned as soon as you recruit her.
The script opcodes "LearnAbility" and "UnlearnAbility" should do the trick for that.
Beatrix has not this kind of problem since she doesn't share her character slot with someone else. Her ability learning progression is saved properly.

About the "Stats" panel bug now...
I wasn't able to reproduce it, but I think I know where it comes from : you somehow don't have the same Assembly-CSharp.dll as me.
You may try to reinstall FFIX to fix that problem (don't forget to copy your saves and such). I will need to fix it anyway because I don't want HW to be dependant on having the exact same files as the normal ones. I spent quiet some time trying to fix that already, though...
If one of you three who have the bug can check something for me :
- Check that you can go to the "CIL code" panel and that if you apply the CIL macro "Unlock Ability Learning for Beatrix", there's no bug (the tool doesn't crash, can save the Steam mod and the works will run fine (check up to the Main Menu screen)).
- However, if you apply the other macro "Disable Cheats", then check that it won't work (either HW crashes when you save the Steam mod, either the game crashes when you launch it afterward).

If both checks goes how I think, then I know why the stats panel bugs.

About field backgrounds, I've tried to adjust the alpha channel (despite it was adjusted according to the standard picture format, which is called DXT5 btw). I think it's a bit better now but it's still far from clean. I couldn't find why it's not the same as the in-game pictures, but that may be related to how they draw it. Each tile is actually, unlike for the PSX version, used for UV mapping and the background is rendered as a 3D model composed of planes one behind the others.

I think the next release will be a bug-fix for this stat panel thing. I will try to add a few more macros as well : if you have ideas, toss them at me !

583
FF9 Gameplay Releases / Re: [FF9] Kaotic Hardcore Mod
« on: 2016-10-20 08:26:43 »
Good to see you're improving it ^^

However, I think you have the bugs in the "Stats" panel : the last levels are scrumbled and everyones' stats as well (Zidane has 0 base strength for instance).
If you don't mind, you can mod start that panel all over again. Else, I will see if I can fix it (that bug was my fault : HW had a compatibility flaw at some point with that stats panel).

Do you plan to make it compatible with Steam?

584
Well, I don't know about these artefacts. I'll look into it but don't hope for a fix too soon :/
You don't have access to the "background viewer" in the Steam version, thus you can't choose which layers (called Tile Blocks in the program) you can export at one time.

It will be possible to import to the Steam version upscaled backgrounds that you got from the PSX version.

I don't know in what format the images will be best for importation. As said, either 1 file per layer or 1 file per background (with all the layers inside). The problem is that I'm not an expert in the image formats. Most of them don't seem to support multi-layered images. I found the .tiff which could do that (but it's not supported very well by Photoshop from what I heard) and I don't know about the others. I would like to avoid editor-specific formats : I know that .xcf supports several layers and a bunch of other features, but it's Gimp-specific for instance.

To be more precise about the format of the Steam background images (I'm writing that from memory, so there might be inaccuracy) :
- Each file contains a bunch of tiles, that is a 36x36 pixels square (compared to 16x16 for PSX).
- However, there is a border of 2 pixels on each side of the square that seem unused (maybe they correct that alliasing thing?), so the used tiles are of actual size 32x32.
- All the pixels are not fully specified with a RGBA value : the 36x36 square is split into 4x4 squares which share a RGB value with possible variations on each pixel (but restricted).
- The tile sorting/layering into Tile Blocks are done in other files, which were extracted from the PSX version and were not modified at all.

So the format is a bit compressed compared to a full specified bitmap file of the same size/resolution (because of those 4x4 squares). I didn't try nor dig anything yet about where those are handled in the game's code. I don't know :
1) If I can remove that compression,
2) If I can enable other resolutions.
Ideally, I can do both, but one of them only will be sufficient to import your upscaled files from the PSX version without loss of quality.

EDIT : About FPS, there's a limit set in the game's code (one limit for menu, one for World Map, etc...) that can easily be raised to 30 or 60 FPS. I don't know if it will need changes at other places but eventually, I'm quiet confident that it won't be too difficult.

585
I saw that too. This alliasing is in the image's data and appears in-game :

For some reason that I don't really understand, it's much less visible in-game than there. The file format of images have a documentation, so I'm pretty confident that, color and transparancy-wise, I export the right images. Either Steam's version uses a slightly different file format, either it improves the rendering when it displays the layers.
If you remove those alliasing, that can only improve the quality.

586
@ Fraggoso : You can already export the backgrounds, you can't import them back. It won't be ready for the next release but maybe for the one after that (or if someone else does that ; the project is on GitHub !).
But since you can export them already, someone can start reworking them. I didn't see anyone doing that yet.
Also, Aelrobis seems to be making some work about it currently (Export/Import). I don't know whether he'll be able to change the resolution or how his solution will be conflicting with HW though.

@ gledson999 : That's likely not possible to do that directly on the .ppf as the text are not stored very consistently in those files. You can try a search using an hexadecimal editor but you are not guaranteed to find the text and you can't change it to a text with another size.

Here is a solution that should always work :
1) Make a .hwf scan on a non-modded game (or surely you have one already),
2) Apply your .ppf to a game,
3) Rename your .hwf scan with the same name as your modded game,
4) Open HW and your modded game with it ; there should be no scan (since you provided it) and it should display the modded datas,
5) Fix your text stuff,
6-Optionnal) You can take the opportunity to go to the "Mod Manager" tool, check all the boxes corresponding to modded aspect of the game, and then use "Save Mod" to have a .hws version of the mod.
7) Save as a .ppf, then close HW, then apply the .ppf to the modded file,
8) Now that you have the modded game with all the right modifications, you can use makeppf.exe to create a .ppf file.

587
Hi.
I just moved to a country I don't know the language yet, so I don't work on HW so much these times. I have a sparse internet also.

I'll check about this crash. Since v0.33 or so, I experience random crashes at times and I don't know the reason (one of them is the extensive use of RAM the field panel asks, but that doesn't explain everything).

@ dclem : The battle spot isn't working on the Steam version yet ; it did on the PSX version but Steam has another way to handle that, not so convenient for me.
HW can't export the models other than the Battle Scenes (and then, it misses a few stuff like the Crystal in the related scene). However, there's this tool that can do that (about spell effects, only a few are handled, not eidolons). You need to extract the .img for the PSX version but that's not a big deal and it worths it.

@ Resinate : no, the Steam version can't bypass this limit. I don't think I'll ever make it so it can be enabled : though it is in the horizon of possible things to make the HP a 4-bits number (if you look very very focused to the horizon), the technical obstacles are really annoying (the Steam version doesn't help there).

588
You can't do that yet.

If you're reworking the backgrounds, I may try to make them importable in priority for the next releases. However, I'm still bugged about which kind of format I should allow for the importation.
Import 1 image for 1 Tile Block?
Import 1 image with several layers for all the Tile Blocks?

589
Yep, Trance Kuja is a bit disappointing. I just had no idea for this fight but hopefully, some update of my tool will allow to have more varied abilities (along the same line, I want to make Zidane's Transcend skill able to target any character whose Trance bar is over 50% or such).

For Necron's save state, you have the auto-save which should do just fine. If you die, you can just use the "Continue" option to get to the hill of despair right after beating Trance Kuja (you have to do all the cutscene and menus again though).

Thanks a bunch for your kind words ; appreciated :)

590
No, it's not possible at the moment.
Hopefully it will be possible someday ; or at least include Memoria's features (all of them) in HW.

591
Thanks Manerr, glad you enjoy it :)

It's not my spirit to give away infos like this ; the mod was partly done to encourage the player to explore the game anew.
I can say that there are two orichalcons in the mod, both of them are different from the original game and one of them is missable.

592
You're other problem is indeed related Raven, thx for mentionning it.

It means quiet for sure that we don't have the same version of FF9 Steam. I double-checked and my game is said to be up-to-date. Either yours is not, either I screw up something and my game can't update anymore (that'd be strange though since most people that left comments succeed in installing the mod).
There's also the possibility that you used Albeoris's Memoria tool. Remember they are not compatible (both Alternate Fantasy and Hades Workshop).

You may need to check that your game is up-to-date with the Steam client. Sometimes, the update is not automatic and doesn't trigger just by running the game.

593
Haha lol

Unfortunatly, I'm afraid that will never happen out of your dreams ^^"
There are other tools to edit FF8 (dunno about the Chrono series) ; it would be strange to use only 1 program to modify all of Square's games.

594
Nop, you replace the file on your hard drive.
Let's say your original game is named "FFIX.bin" and modded game is "FFIX_Mod.bin":
1) You open "FFIX_Mod.bin",
2) You do all the stuff with panels and Mod Manager,
3) You rename "FFIX_Mod.bin" to something else and rename "FFIX.bin" to "FFIX_Mod.bin",
4) You export the PPF.

595
@ rhadamants: I'll check the file batching for the next release. Thx to point out the problem.

@ BaconCatBug: hopefully it will also be doable in the next release. I'm not sure yet how you'll be able to do that (either you'll have to modify the IL script, which is kinda like assembly, either you'll have a more practical tool for that).

@ Itoikenza: you have two options for that. Both of them require the original (non-modified) binary file.
1) Using HW : Open your modified binary file with Hades Workshop and go to all the panels so that data is loaded. After that, replace your modified binary file (which is still opened in HW) by the original game file. Finally, go to "Tools -> Mod Manager" and tick all the boxes you find necessary. Exporting the changes as .ppf will then create a .ppf with all the changes done from the original game.
2) Using MakePPF : download this tool (created by the guy who invented .ppf) and create a .ppf with the original file and the modded one. It is a command-line program so you need to open a cmd window (there are plenty of documentation about command-line programs on the web).
IIRC, the command's syntax is
makeppf.exe c -u -d "description here" [original bin] [modified bin] [created ppf name]

596
There may be bugs if you're using the cheats though.

597
Hum... Maybe your game is not up-to-date (I think that would bug).
Remove the mod, open Steam and check for FF9 updates, then try again.

I just tested in case the uploaded version was somehow corrupted. But no, it worked fine for me.

598
Update.
A Steam version of the mod is now available. It doesn't differ much from the PSX version except that Beatrix can be recruited at the end of disc 3.

I've tested it from new game to the end and didn't encounter bugs, but there may still be. Don't hesitate to tell me if you find one.
There may be bugs if you're using the cheats though.

599
Thanks Guardin & IzzacSturnburg :)

@Gine: Ok, thanks for reporting the problem. I'll see what it is (I also plan on making a more complete text support in the next version).
However, I have a few other projects related to FF9 before updating Hades Workshop. I don't think a new version will come out so soon.

@vivigix: You can indeed make those places available in disc 4. For most of them, that's in the World Map's script of the disc 4 you have to unlock things.
But there are two problems:
1) The Iifa roots will still be there, apparently blocking the access. You can't remove them (it would require changing the world's 3D model and pathing).
2) It seems that the event positions allowing you to enter places are also coded in the pathing. The positions where the "!" appears to enter the Observatory Mountain, for instance, is not present in the disc 4 World Map (I mean there's nothing special here).

To solve this 2nd problem, you have to code your own "place entering script". Here is how I would do it:
● At the end of the "Main_Loop" function (before the Wait) of the World's script, add some lines like those:
Code: [Select]
if (( VAR_B6_24 == 100 ) && (World_CurrentTransport==0) && ((MV_WorldPositionX12 - POS_X) <= 30000L) && ((POS_X - MV_WorldPositionX12) <= 30000L) && ((MV_WorldPositionY12 - POS_Y) <= 30000L) && ((POS_Y - MV_WorldPositionY12) <= 30000L)) {
    set VAR_B6_39 = PLACE_ID
    RunScriptAsync( 6, 1, 11 )
}
where (POS_X, POS_Y) is the place's position (that's the hard thing to get) and PLACE_ID is the corresponding ID in the following table:
Spoiler: show
IDPlace NameRelated Function
1Alexandria HarborMain_38313
2AlexandriaMain_38301
3Evil ForestMain_38809
4Ice CavernMain_39061
5Quan’s DwellingMain_40109
6TrenoMain_40353
7South GateMain_39829
8South GateMain_40085
9South GateMain_39825
10South GateMain_40077
11South GateMain_40333
12Ice CavernMain_39569
13Observatory MountainMain_39049
14DaliMain_39305
15North GateMain_38789
16North GateMain_38781
17Gizamaluke’s GrottoMain_39289
18BurmeciaMain_38521
19CleyraMain_38765
20Chocobo’s ForestMain_40329
21Gizamaluke’s GrottoMain_39801
22Qu’s MarshMain_40309
23Pinnacle RocksMain_41589
24Lindblum Dragon’s GateMain_40817
25LindblumMain_41330
26Lindblum HarborMain_41581
27Earth ShrineMain_35729
28Desert PalaceMain_34965
29Mognet CentralMain_33669
30Qu’s MarshMain_35197
31Black Mage VillageMain_35705
32Fossil RooMain_35953
33Conde PetieMain_35697
34Madain SariMain_34417
35Conde Petie Mountain PathMain_34669
36Conde Petie Mountain PathMain_34921
37Iifa TreeMain_35169
38Chocobo’s LagoonMain_41801
39Wind ShrineMain_40001
40DaguerreoMain_41005
41Qu’s MarshMain_40229
42OeilvertMain_39217
43Landing SiteUnused (For Hilda Garde 1 landing)
44Water ShrineMain_37661
45Ipsen’s CastleMain_36377
46Qu’s MarshMain_36649
47Shimmering IslandMain_35385
48Esto GazaMain_34605
49Fire ShrineMain_33601
50Chocobo’s ParadiseMain_33029
51  ? 
52  ? 
53  ? 
54MemoriaMain_35169
55Chocobo’s Air GardenWorld_Chocobo_20
56Chocobo’s Air GardenWorld_Chocobo_20
57Chocobo’s Air GardenWorld_Chocobo_20
58Chocobo’s Air GardenWorld_Chocobo_20
59Chocobo’s Air GardenWorld_Chocobo_20
60Gizamaluke’s GrottoMain_39553

When I say that the "place entering script" is not present in the 4th disc WM, I mean that the related function in the table above doesn't exist and creating one won't work (I just tested that). So you can't use the related function unfortunatly.
● The rest should be handled fine by the script system in place (setting "VAR_B6_39" launches the machinery).

600
You're welcome, Gine :)

Update to v0.34b :
- Fixed the crash that occured sometimes when you are writing texts or when you use incomplete tags,
- Fixed a bug with the .hws saving of item texts, resulting in loss of data inside the .hws,
- Fixed a crash when editing the preferences (they are not useful for the Steam version yet however),
- Fixed various other minor bug,
- You can now add/remove script entries, thus NPC on the field.

When adding/removing entries, the script will be updated so that functions still refer to the right entries. If an entry is deleted but was still used in the script (if it was initialized in the "Main" function, for instance), the reference changes to the "Main" entry and a warning will be prompted.

So, how do you handle NPCs and the PC with this?

A model on the field is linked to an entry. I will only discuss of the case when there is only 1 model per entry, but using the UID, one can have several models on the field handled by only one entry.
An entry linked to a model must be of type 2 and initialized with an "InitObject" call in the main function.

To create a new NPC (not for Beatrix, see below), you must create a new entry for it. In the field panel, choose "Edit Entries" and add a new one with the entry type 2. By default, the created entry will have the ID number 1 (and the entries that were already there are displaced except for the Main entry). Its ID is its position in the list.

Then, to create functions for this NPC, choose "Edit Script", right-click on the list in the left, then "Add", then choose the created entry and set the function type to a number depending on the function's purpose (let the mouse on the "Function Type" field to have a list of specially handled function types).

It can have several useful functions.
1) The Init function
This is the one defining the object's 3D model as well as its position on the field, animations and such... A standard Init function looks like this for an object's entry :
Code: [Select]
Function ManA_Init
    set VAR_B10_0 = 58
    set VAR_B10_4 = 65163
    set VAR_B10_6 = 192
    set VAR_B10_2 = 65518
    SetModel( 111, 100 )
    CreateObject( VAR_B10_0, VAR_B10_4 )
    TurnInstant( VAR_B10_6 )
    SetStandAnimation( 555 )
    SetWalkAnimation( 599 )
    SetRunAnimation( 598 )
    SetLeftAnimation( 597 )
    SetRightAnimation( 601 )
    SetObjectLogicalSize( 20, 20, 30 )
    SetAnimationStandSpeed( 14, 16, 18, 20 )
    SetHeadAngle( 64, 1 )
    EnableHeadFocus( 0 )
    SetObjectLogicalSize( 1, 40, 150 )
    return
The first numbers are the object's initial position (the coordinates X, Y, the facing angle and then the Z coordinate respectively). For the "SetModel" code, a list of known model IDs is available ; note that the model gives its name to the entry, so the model 111 is "ManA".
Unlike the PSX version, the Steam version can use any model any time. The animations, however, must match with the model. As there is no list of animations yet (if you want to help doing one, that would be cool ^^), you'll have to grab the animation ID from other field scripts, where you know that the animations you seek are used.
It seems that there's no need to add the animation in the "Preload" list of the field. I don't actually know that list's purpose then.

2) The SpeakBTN function
This one is executed when the player approches the model and speaks to him. A standard SpeakBTN function looks like this :
Code: [Select]
Function ManA_SpeakBTN
    ifnot ( IsMovementEnabled ) {
        return
    }
    set VAR_A6_158 = 0
    if ( VAR_A6_159 == 1 ) {
        DisableMove(  )
        if ( VAR_A6_144 == 0 ) {
            DisableMenu(  )
        } else {
            Wait( 1 )
        }
    }
    0x27( 127 )
    TurnTowardObject( 250, 32 )
    WaitTurn(  )
    WindowSync( 0, 128, 199 )
    set VAR_A6_158 = 1
    if ( VAR_A6_159 == 1 ) {
        if ( VAR_A6_156 == 0 ) {
            EnableMove(  )
            0x27( 255 )
            if ( VAR_A6_144 == 0 ) {
                EnableMenu(  )
            }
        }
    }
    return
If the player is in a cutscene, we don't want him to be able to speak with the NPC that he's facing, thus the "IsMovementEnabled" check. The following 10 lines are standard for everytime the game removes the control from the player, and the last ones are their counterpart to give it back. The "TurnTowardObject( 250, 32 )" forces the NPC to face the player's character, and the "WindowSync" displays a bubble of dialog.

The same kind of function can be made with the CardBTN function but using a "TetraMaster" line of code instead of the "WindowSync" line. For chests, the SpeakBTN function is perfect to allow the player opening the chest and taking the item inside.

3) The other functions
The other functions are used for the rest of the NPC's behavior. The Loop function often ends by the two following lines.
Code: [Select]
Wait(1)
loop
Which means that the function is executed every frame. There's a Range function that runs when the player's character comes in range of the NPC but don't necessarily speaks to him.
And all other, numbered, functions can be used by the previous ones or by other part of the field's script. They may be used for a tiny part of a cutscene, or a special movement such as a jump, non synchronised dialog (ie. dialog bubbles that are displayed while the player still has the control on his character), or one-time walks...
Note that the cutscene scripts are often writen in a Loop function :
- Either the Main_Loop function is used, manage the cutscene's progression and calls parts of the NPC's script,
- Either the Loop functions of NPC and/or PC are used and comunicate with each other using variables.

NPC models corresponding to a Party's member

There is a special case of entries that normally are present in all the scripts of the game (even if most of them don't have any function and thus are invisible). Indeed, the last 9 entries are each assigned to a potential member of the party, namelly
Zidane,
Vivi,
Dagger,
Steiner,
Freya,
Quina or Cinna,
Eiko or Marcus,
Amarant or Blank,
Beatrix

These entries have nothing special - you can use any model you want, for instance - but one thing : they can be refered to with special entry IDs and be used if they are in the player's team.
For instance, if the following lines are present in Main_Init function, then up to 3 of these entries will be initialized accordingly to the characters in the player's team :
Code: [Select]
InitObject( 252, 0 )
InitObject( 253, 0 )
InitObject( 254, 0 )
They can then be refered using the same special entry IDs for cutscenes and such. An example of use can be found in the script of the field "Oeilvert/Planetarium". In the function "Zidane_17" of this field, there's the cutscene when Zidane reads terran letters and the present characters are amazed. The different calls of "RunScriptAsync( ..., 252, ... )" are used to handle the reactions of the 2nd party member, whoever he is, at the different points of the cutscene.

So, in order to implement Beatrix in these cutscene, you need to create functions for her. Add a new function of type 0 chosing the last of the entries, then write the Init function :
Code: [Select]
Function Beatrix_Init
    set VAR_B10_0 = 364
    set VAR_B10_4 = 63977
    set VAR_B10_6 = 252
    set VAR_B10_2 = 65456
    SetModel( 204, 100 )
    CreateObject( VAR_B10_0, VAR_B10_4 )
    TurnInstant( VAR_B10_6 )
    SetStandAnimation( 2978 )
    SetWalkAnimation( 2975 )
    SetRunAnimation( 2981 )
    SetLeftAnimation( 2980 )
    SetRightAnimation( 2974 )
    SetObjectLogicalSize( 20, 20, 30 )
    SetHeadAngle( 104, 48 )
    return
Replace the first numbers by coordinates (or you can remove those 4 lines and put the coordinates inside the "CreateObject" and "TurnInstant" lines).

With this, Beatrix will be created for this kind of cutscene if and only if she is in your party. You may also need to hide her in the Init function because she shouldn't appear before the cutscene. The line "SetObjectFlags( 14 )" does that.
Then you need to create other functions corresponding to her behavior during the cutscene. Look at the numbered functions for the other characters and create functions for Beatrix with the same ID (type) and with a similar pattern (adapt the dialogs and animations, off course).
By the way, you can add a new text in the corresponding text block beforehand with a right-click on it.

Once everything's done, don't forget to parse your functions and save. Congratulations : you have created cutscene elements for Beatrix !


PS. : contact me if you want to be part of the Github project.

Pages: 1 ... 19 20 21 22 23 [24] 25 26 27 28 29 ... 35