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 - ficedula

Pages: 1 2 [3] 4 5 ... 59
Also, an additional example that I forget to mention above about using global variables (that persist from one script call to the next):

Code: [Select]
Import common

const word ATT_BODYBLOW := $0172

byte mode

function AI.Main: void
if mode = 0 then
Targets := Me
else if mode = 1 then
Targets := PickRandomBit(FindLargest(LoadStats(Enemies, StatCurrentHP)))
else if mode = 2 then
Targets := PickRandomBit(Allies)
end if
mode := (mode + 1) mod 3
end function

In this case the 'mode' variable persists from one function call to the next - we cycle it through 3 values so the enemy's behaviour effectively loops every 3 actions.

Sega Chief: I've released a tool here that you might find useful for writing AI functions: if you could take a look and let me know if you have any suggestions for features you'd find useful, that'd be good ;)


FF7 Tools / [PSX/PC] AI Script compiler - Conformer (v0.2)
« on: 2015-02-15 16:18:32 »
v0.2 download:

Old versions:

v0.1 download: (you will need an up to date version of the .NET framework installed also).

This is an initial release: there's many things missing I'd like to add but enough is working now for it to be functional and for me to gather some feedback, so, here you go.

Conformer is essentially a script compiler for the AI scripts. (It doesn't replace Proud Clod - in fact you currently need Proud Clod to make any good use of it). The idea is that rather than writing AI scripts in the raw bytecode you can write them in a vaguely friendly scripting language and Conformer will compile your textual script down into the bytecode FF7 uses.

Here's a very simple example:

Code: [Select]
Import common

const word ATT_BODYBLOW := $0172
const word ATT_FANG := $0189

function AI.Main: void
Targets := PickRandomBit(Enemies)
if (Random() mod 2) = 0 then
        Call Perform(ENEMY_ATTACK, ATT_FANG)
        Call Perform(ENEMY_ATTACK, ATT_BODYBLOW)
end if
end function

Obviously this is pretty simple and the sort of thing you could code in the bytecode manually but it's a bit nicer to do it this way ;)

Here's something a bit more complex:

Code: [Select]
Import common

const word ATT_BODYBLOW := $0172

function AI.Main: void
if LoadStats(Me, StatCurrentHP) < (LoadStats(Me, StatMaxHP) / 2) then
Targets := PickRandomBit(FindLargest(LoadStats(Enemies, StatCurrentHP)))
Targets := PickRandomBit(Allies)
end if
end function

I can't see why you would implement a script like this ;) but it's a good example of the language. In this case, it loads the current creature's HP, and if it's less than half of their maximum HP, it loads the HP of all the enemies, finds which of them has the most, and picks a random one of those to target. Otherwise it targets a random ally.

How to actually use it...:

You type your script into location (1). (You can load, save, etc. scripts from the menu like normal.)

Once you've entered your script, pick one of the AI functions you've written (e.g. AI.Main) from the list (2).

Then click Compile (3).

Either it'll work, or it'll show you errors in the listbox (4), in which case you need to fix the errors first!

If it works, it'll output the bytecode in area (5), in three formats: plain binary, commented binary explaining what each block of bytecode is doing, and (most usefully) in the text format Proud Clod expects for you to paste into the AI editor. Since Conformer doesn't have an option yet to edit the scene.bin files that's how you'll want to get your AI into the actual game.

A language reference is available from the Help menu or here: or off course post questions here!

I have quite a few planned features to add; direct write support into scene.bin is an obvious one, the bytecode it produces could be optimised further, and some other things, but requests are also welcome.


Sure, if you're coming up with an entire martial art, devised makes more sense then: you really are talking about something quite elaborate and complex. Doesn't seem to fit so well for a single way of hitting someone hard.

I mean, it's not a major issue, because it's not clearly wrong - but regardless of whether you technically can use the word, if it seems out of place to enough people, it's not conveying the right impression. Still, I suppose you need more people to complain before it's clear that's actually the case..

Learned also doesn't really do it justice... they aren't really learning a technique... they are devising / creating.  Although learned may work.  I don't really see a big issue with devised. 

Devised to me gives the impression of coming up with something particularly elaborate (and the OED agrees). One might devise an evil scheme, a cunning plan or a contraption; it doesn't fit so well with a technique for punching someone especially hard or hitting them with a sword multiple times. It's not wrong, just doesn't seem to fit.

Unlock makes a certain amount of sense since you can use it to describe someone unlocking their potential: they can now do something they couldn't previously do (and doesn't necessarily imply it's a thing other people can do).

General discussion / Re: It's been awhile
« on: 2015-02-10 12:29:02 »
Cool; any vague ideas of timescale on that? Weeks, months, days...? ;)

General discussion / Re: It's been awhile
« on: 2015-02-05 19:01:39 »
I would love to - my free time is limited, however.  I would love to work on something a piece at a time, though - if that's alright?  What kind of sounds/soundscapes do you have in mind?  Any areas from the game you would like me to start on?

It's up to you, really, but - absent any suggestions from Shard etc. - I think Midgar is a pretty good place to start: you've got lots of fairly confined, urban areas that could plausibly have all sorts of background things going on. Wall Market is meant to be sort of bustling - in places at least! and it has quite a few different areas, too - the sewers after you complete Wall Market could be enhanced with some underground, wet sounds, the train sequence after the first bombing mission could be upgraded with some good sound effects, and so on.

The error you posted earlier was this:

C:\FINAL FANTASY VII\/shaders/main.vert

But the screenshots show you have the game installed in C:\Games\SteamApps\Common\Final Fantasy VII.

It certainly won't work if the paths don't match.

General discussion / Re: It's been awhile
« on: 2015-01-29 06:43:41 »
Good stuff. So:

So - I'm a musician, producer, recording engineer and amateur voice actor.  Foley Work is fun - I can generate sounds for whatever projects people are working on if you guys are interested.  Let me know if I can help in any way.

...are you interested in putting together sounds for a project?

General discussion / Re: It's been awhile
« on: 2015-01-28 12:24:52 »
Eh, if there is anyone wants to get started sooner I don't see any harm in starting work on background sounds sooner - the work won't be wasted even if it doesn't totally match up to the areas the voiceover project starts with.

General discussion / Re: It's been awhile
« on: 2015-01-27 12:35:13 »
I made once a scene analysis for the first scene:

I think if we could cover upper and under Midgar it would be a very impressive demo. If you are interested I assume that Mayo Master would be glad if you could cover the HD scenes he has made for his video presentation.

If there's people interested in getting this moving, consider me available for the technical side of things, of course: let's get something going.

General discussion / Re: It's been awhile
« on: 2015-01-26 12:20:08 »
So much stuff though. Is there any grunt work that  can be done? I'm no coder and my modeling is easily outdone visually and with less polies and my texturing is even worse. I have a general knowledge of batch files and a fair share of experience on qhimm.
Sadly no one seems to be interested to use ultrasound to create ambient sound effects.

So, y'know, if you were interested in doing something, finding background sound effects to apply to the scenes might be worthwhile...

I'm sure freely available background/ambient effects won't be available for every scene in the game, but surely there'll be some that are suitable.

Team Avalanche / Re: [HD Remake] WIP Sector 5 slums
« on: 2015-01-14 18:01:46 »
This would demand to create new files for the waterfall animation and these files must be in the flevel.lgp as well.
I wonder why Aali doesn't use the same trick as he use to mimic the color pallets for magic effects? Like **_15_00, **_15_01, **_15_02, etc. If this would work then Palmer may need an update too to extract the different palettes as textures.

Going by the field script above, the issue is that the palette is being changed through code: it's not like the file contains 3 different palettes that get switched between (so you could just have 3 PNG files, one for each version). Instead, some script code changes part of each palette (and because it's script, in theory it could change it by a different amount based on variables, so there could be hundreds, or thousands of different possible palettes that get generated.)

In practice I guess that actually there are a limited number of variations of the palette that actually get set up by the script, but that's why there's no simple solution, if I understand it correctly.

(If I were coding a solution to this - which I'm not - then I'd probably set up the fragment shader to effectively emulate a paletted texture; have the actual data as an integer texture, and send a lookup table to the shader containing the palette data for it to translate. Would have reasonable performance on anything even semi-modern. Certainly a little complex though.)

Completely unrelated / Re: Off to Japan
« on: 2014-12-27 18:05:39 »
You should absolutely visit Akihabara!

That was already on the list, it would be very silly to not visit if we're in Tokyo!

If you are a coffee fanatic, look up Chatei Hatou in Tokyo - It's amazing.
Definitely go eat some real ramen too.

Ah, that looks great - Chatei Hatou is on the list now as well!
And yeah, we'll definitely be going for genuine Japanese food on the trip, no point in visiting another country and not sampling the local cuisine.

Completely unrelated / Off to Japan
« on: 2014-12-23 21:17:17 »
I'm currently planning out a holiday to Japan with a friend next September. Provisionally we'll be visiting Tokyo, Nagoya, Kyoto and Hiroshima.

Anybody have recommendations for particular places we should go or things we should do while we're out there?

Given the choice between modifying every script where there is dialogue said by a 'generic' party member, which breaks compatibility with any other mods that modify the field files; or adding support for it into Ultrasound ... I'm not sure why you think the former is simpler.

Well, I suppose it would require less programming. It's noticeably more work though, given that it involves both having to change all the relevant field scripts and rewrite the dialogue to make sense when spoken by the party leader.

Oh, I see. In that case I fear that there is no good way around this other than altering the texts removing all variable content so it doesn't matter who says it. For the first issue you probably have to replace all those statements by text that the party leader speaks.

No, that isn't the case at all.

I don't see any problem adding support to Ultrasound for having different voice files for the same text box depending on who's in the party. Might take a bit of time to code but there's no technical reason it can't be done; it's already injecting a DLL into the FF7 process, so it can access the necessary information without too much trouble.

Audio Modding / Re: FF7 Voices - assessing interest
« on: 2014-12-02 20:17:20 »
Oh, I see - the intention is that after the player selects an option, you play the voice file for that choice while [effectively] pausing the game, and then let it progress to the next dialogue window?

That would be trickier to do, but it might be possible. Ultrasound is already overriding certain things (which is why you can use it to replace sound effects).

Annoyingly it doesn't crash for me.

Can you clarify - when you say Ultrasound crashes, are you seeing the Ultrasound window crash & disappear, but FF7 keeps on running? Or FF7 crashes as well?

Audio Modding / Re: FF7 Voices - assessing interest
« on: 2014-12-01 18:17:49 »
I'm about to finish up prepping the raw script (it will need some formatting and a lot of localization) and wanted to check a few things.

We will be adding dialogue boxes to the game to allow selected dialogue choices to play sounds (the response will pop up right after you choose it). We will be able to update everyone's texts through touphScript, but will we also be able to easily modify the scripts in everyone's flevel?

If the only reason you're adding the dialogue boxes is so that, after a choice is made, a sound/voice file is played, then rather than changing the field files it'd be simpler to just add support for that into Ultrasound.

...I'd have to investigate before I could promise that yes, it's definitely possible, but I think it certainly might be.

Found a bug. Ultrasound crashes right before the bike minigame in Midgar, right as the game's giving you the controls.

I haven't been able to check the other minigames yet.

EDIT: It looks like it's not the minigame itself, but the boxes that pop up before it. I'm getting a lot of crashes in places where multiple windows pop up at the same time, including
  • Bike minigame explanation
  • Explanation of Mr. Dolphin segment
  • Junon soldier training and minigame
  • Shera's flashback in Rocket Town (when the countdown for the rocket starts)
  • The "sephiroth enters Nibelheim" scene in the Tifa+Cloud Lifestream

Hm, OK. In theory that should be able to fix once I can see it happening on my PC: do you happen to have a savegame close to the location of one of the crashes?

Well, glad you got the DLL working anyway ... only difference that comes to mind between the dialogue and ambient sounds is that the dialogue is in WAV files, but the ambient/SFX files are MP3s. Can't think of an obvious reason why the WAVs would be problematic, but I guess it's possible.

TBH, I'd expect we'd want to use MP3 or OGGs for distributing things anyway, so it's not the end of the world if the wav decoder I'm using isn't working completely reliably.

That's pretty uninformative :/  If I had to guess it looks like it's not loading the VoiceHook.dll library properly; you're completely sure the path to the DLL in the config file is correct?

If so, I'll have to put a new release out with more logging to try and track this down.

I'm having trouble getting Ultrasound to do anything. I changed the config to find the VoiceHook.dll and data folders, it runs FF7 when I click Go, but no sounds get played (not even the ones you recorded), and no logging happens.

I installed using the original 1998 discs, plus whatever Bootleg does to the exe. The exe has probably also been changed by TouphScript.

Hm, your exe works fine with Ultrasound for me, so it's not any of the patches you've applied.

Do you not get any sounds at all, not even the standard ones...? That suggests your configuration is broken somehow.

Alternatively, try using Debugview - - and see what messages get output when you run the game through Ultrasound.

Tricky to work out exactly what's happening when the problem is that nothing's happening... ;)

Can you upload your EXE somewhere and PM me a link - so I can try with your exe and see if the same happens for me?

Pages: 1 2 [3] 4 5 ... 59