massimilianogoi on 3/3/2008 at 01:01
the problem is that the perl script compiles in some new CSC files, I've tried to leave before the original csc files, but this script overwrite them, so, for testing I've had to move them in another folder, that's why we don't heard the original sounds in the video.
But that's just a test, soon I will discover the way to merge them..
Ziemanskye on 3/3/2008 at 17:54
Try openning/changing the compileschemas.pl file (in notepad or the like)
Code:
$mmry = 1;
$hdrv = 2;
$dvd1 = 3;
$dvd2 = 4;
$dvd3 = 5;
my @metafiles;
open $metafiles[$mmry], ">SchemaMetafile_Memory.csc";
open $metafiles[$hdrv], ">SchemaMetafile_HardDrive.csc";
open $metafiles[$dvd1], ">SchemaMetafile_DVD1.csc";
open $metafiles[$dvd2], ">SchemaMetafile_DVD2.csc";
open $metafiles[$dvd3], ">SchemaMetafile_DVD3.csc";
You may be able to specify a new Metafile name to use that way (or just comment out the lines you don't want to replace with new versions)
massimilianogoi on 3/3/2008 at 19:52
Yeah! nice idea! :D :D
Thanks for your priceless help, Ziemanskye, without you, nothing of that should be possible.
I think that I will do some testing about that script tonight...
massimilianogoi on 3/3/2008 at 20:09
No, unfortunally this way doesn't work... :( :(
Anyway, I've already some other idea in my head...
Ziemanskye on 3/3/2008 at 22:04
I'm just throwing suggestions around as/when I think of them: as I've said, I don't really know what I'm talking about in this matter, but it would be something useful to the whole community to know so I figure I may as well at least try to be helpful.
Beyond that, dumpschemanames.pl seems to do pretty much what it's named after: I haven't run it - so I could easily be wrong about this - but it looks like it just creates a log of all the names and tags that the schemas use. Grouped by tag, perhaps, so it's useful as a debug-tool to make sure that all the barks and things are attached to the correct people.
Also, I don't know if it's any use or not, but the dumpblockfile.pl script seems to list all the things that go into the ibt files. Including SoundSchemaMetaFiles, SoundSchemas and Sounds (and Songs), so it may be possible to bake the sounds you want into the mission ibt file: I'd guess this is where any sounds compiled as "memory" sounds go, and why the actual SoundSchemaMetafile_Memory.csc is empty - it's just a placeholder into which to load the stuff in the ibt. Might be wrong, naturally, but it might give you space to think of in which to look for the solution/workaround to this.
massimilianogoi on 4/3/2008 at 05:14
So, let's reason for exclusion:
1-) I've made many tests, and the game should accept just the schemas to play in SchemaMetafile_DVD*.csc; putting that in SchemaMetafile_Memory.csc doesn't work: I've slightly retouched the compileschemas.pl code in these rows, with my gaunt knowledges of other languages than C:
my @metafiles;
open $metafiles[$mmry], ">SchemaMetafile_Memory.csc";
# open $metafiles[$hdrv], ">SchemaMetafile_HardDrive.csc";
# open $metafiles[$dvd1], ">SchemaMetafile_DVD1.csc";
# open $metafiles[$dvd2], ">SchemaMetafile_DVD2.csc";
# open $metafiles[$dvd3], ">SchemaMetafile_DVD3.csc";
$metafilehdrv = $metafiles[$mmry];
so the only file that were open for being writed was SchemaMetafile_Memory.csc, and the other four files were leaved untouched.
Anyone of the custom schemas was set up to store itself in Memory.
But, unfortunately, when I started the game, all the sounds played currectly, less my custom schemas!
2-) I've tried to compile the custom schemas, and add to the end of the SchemaMetafile_DVD*.csc, SchemaMetafile_HardDrive.csc, SchemaMetafile_Memory.csc file that compiled previously by myself, when starting the game, same result of the point 1;
3-) Modifying the compileschemas.pl so that it writes in another file, f.e. SchemaMetafile_DVD_custom1.csc don't work in the game
(substituting "open $metafiles[$dvd1], ">SchemaMetafile_DVD1.csc";" with "# open $metafiles[$dvd1], ">SchemaMetafile_DVD_custom1.csc";", etc...;
4-) Compiling the entire Sounds folder brings an error "MISSING WAV (namewavfile), referenced by schema (nameschemafile)!"m and the following csc files were empty, just filled of my custom schemas, with their relative audio files, since, if you open the entire Schema browser, you can look that the original schemas are linked to no file;
5-) I've tried also to take a look at the entire compileschemas.pl listing, but due to my scant knowledges about perl, I've not understood so many...
At last, it seems that's a T3editor programmers neglect, a BIG neglect, because if you compile the whole schemas, all the sounds vanishes out :wot:
At least they could spent two minutes more to add a parameter in the arguments that specify not to overwrite all the csc, but just to add in the middle of that our custom schemas... SHAME!
Ziemanskye on 4/3/2008 at 07:42
You can use SoundDrone to get the sounds out of the schemas, and I think you need "empty" .wavs for them as well as the .oggs for them to compile: we came across that bit before, somewhere. It's part of why we don't have all the sounds seperated from the CSC files: it'd be a much bigger dl/install for the editor if all the sounds (which you already have) were also loose.
Also, I don't know how much of a difference it would make, but I think you also need to change the "$mmry = 1;"-like lines: it looks like that is basically assigning more meaningful names to an array of numbers, to make it easier for a human to know what it's doing.
Next, we have a list of SchemaMetafileName entries in the Default.ini (under the [Cadence] section). I have no idea if that means they're hard-coded though, so we might not be able to add any more. Similarly, in the Default.ini there's a line for [ResPathsWhenBlockLoading] saying WaveSound=ogg;wav|Sounds*, so you might be able to just put things in Sounds/DynamicallyLoaded after all.
massimilianogoi on 4/3/2008 at 21:23
Quote Posted by Ziemanskye
You can use SoundDrone to get the sounds out of the schemas, and I think you need "empty" .wavs for them as well as the .oggs for them to compile: we came across that bit before, somewhere.
But compiling the schemas in this way, generates always a mute sounds,. because the common factor in all the official schema is this:
Inline Image:
http://img218.imageshack.us/img218/1566/commonci0.jpgSo, when the compiler elaborate the schema, we says to it to compile without any linked wav.... we should have to reset all the schemas with the appropriate sound related... and that's more than 15000 files :(
Quote Posted by Ziemanskye
It's part of why we don't have all the sounds seperated from the CSC files: it'd be a much bigger dl/install for the editor if all the sounds (which you already have) were also loose.
I don't know the difference, since the audio files are already (maybe compressed??) in the csc files... Maybe they could put that files in ogg compressed version, out of the csc files, with these empty, and with the schemas linked to the currect sound, so that we could compile anything directly.
Quote Posted by Ziemanskye
Also, I don't know how much of a difference it would make, but I think you also need to change the "$mmry = 1;"-like lines: it looks like that is basically assigning more meaningful names to an array of numbers, to make it easier for a human to know what it's doing.
MMmm... maybe I've not understood.. but if you mean about the reading of variables, my problems are not the reading of the variables, but the comprehension of the whole algorhytms, as this function:
sub write_string($$)
{
#print "CALLED WRITESTRING $_[0]\n";
# A string is written out as a DWORD length followed
# by the string itself (with no nullterm.)
$stringlen = pack "I", length $_[0];
my $targmetafile = $_[1];
print $targmetafile $stringlen;
# I can't figure out an easy way to write out a string
# with no nullterm. I can't just write it out and
# seek backwards one byte because the last data
# in the file is a string, so I'd have to shorten the
# file by one after that, too.
#
# Also, how weird is it that perl has 'chop' to cut
# the last char off a string and return it, but not
# the equivalent for going forwards? Reverse the string
# to emulate that behavior.
$revstr = reverse $_[0];
while (length $revstr > 0)
{
#my $thischar = pack "C", chop $revstr;
print $targmetafile chop $revstr;
}
}
What it means the pack "I" and "C"?? what is their function? What are the purpose of the function write_string? Why it have to reverse the string?? etc, etc...
This program, beside being really complex, is written in a language that I basically don't know; my knowledges are limited to C, C++, basic, and a bit of Java.
Quote Posted by Ziemanskye
Next, we have a list of SchemaMetafileName entries in the Default.ini (under the [Cadence] section). I have no idea if that means they're hard-coded though, so we might not be able to add any more. Similarly, in the Default.ini there's a line for [ResPathsWhenBlockLoading] saying WaveSound=ogg;wav|Sounds*, so you might be able to just put things in Sounds/DynamicallyLoaded after all.
Here the problem is that we have these values:
SchemaMetafileName=SchemaMetafile_HardDrive.csc
SchemaMetafileName_Memory=SchemaMetafile_Memory.csc
SchemaMetafileName_DVD1=SchemaMetafile_DVD1.csc
SchemaMetafileName_DVD2=SchemaMetafile_DVD2.csc
SchemaMetafileName_DVD3=SchemaMetafile_DVD3.csc,
altering that would mean saying to the game do not read the audio files in that csc, but in another file, and would be the same problem as overwriting that with custom SchemaMetafile_DVD*.csc file, since the game could not read also the original audio files...
Ziemanskye on 5/3/2008 at 19:44
I'm honestly not any more knowledgable about Perl than you. I've done a little PHP, SQL, HTML, XML, ASP.net, some Java and some UnrealScript, but that's about it.
The empty wavs are because without any .wav it doesn't compile the .ogg into the .csc (You also need to run the script with "-p" on the end, for the PC version). In the sound schema browser, it's saying wav file none because we don't have the wavs (or oggs) seperated from the csc files for most things. You might need de-ogged wavs to hear the sounds through the editor too, since the Xbox version used wav while the PC used ogg. I'm not sure why this discrepancy between versions.
Either way though, with the unpacked sounds (and named correctly) they should hopefully be automatically picked up by the schema browser, rather than having to change all the schemas as well - it's saying "none" because it can't find it. As far as I remember, Sounddrone defaulted to the correct names, but I've not used it for years.
The sounds aren't included with the editor because that'd make the editor dl nearly 1Gb, which is nuts, especially for 3-4 years ago: the csc files account for about 600Mb of sounds between them, basically as ogg files with a bit of formatting around them as far as I know - it would have killed the community/point of releasing the editor if only one or two people could confidently and easily download it because of how big it was.
Okay, that dealt with....
The lines I mentioned, cryptically, seem to declare the existence of the csc files and gives them numbers. So it's got 5 csc meta files, which you can refer to either by a number, because the programmers knew which they'd be (having declared them) or by name (to make it easier to work with). That part of my suggestion basically hinged around changing those lines to see if you could make it think there were more/less csc files to need to compile, so you could either add your new one and/or not recompile the old ones. I'm not sure if somewhere there's a hard limit though: the game might actually think of the csc files as numbers 1 to 5, so it'd be (very nearly) impossible to add more - hence the part about the Default.ini: perhaps you could *add* another line to force it to consider another file. (and if it thinks of them as numbers, that might just add to the count)
As for the write_string function...It's a hack to get around a weirdness in Perl:
sub write_string($$) - function needs two $string arguements.
$stringlen is the length of the first arguement ($_[0]) - how many charcters are we adding to the file?
$targmetafile is which of the metafiles you're writing to. $_[1] I guess is like the second arguement in the function: this'd be your $hddr or whatever.
so print $targmetafile $stringlen writes the length of the string into the metafile
$revstr is the original argument but backwards, so a string containing "+voice" would become "eciov+"
The loop then takes this and takes the last letter off of it, putting it into the file: writes "+", then hacks the end off so the string is now "eciov", then writes "v" and hacks the end off to "ecio" so that the metafile now has "+v".
Take "o" - have "ecio" - written "+vo"
And so on until "+voice" is in the metafile, the loop is over, and we go back where we called the write_string function to get the next word to put in.
In fact, thinking about it, pack "I" is probably a type declaration - it's telling the interpreter that the string is actually an Integer, like Integer.toString() in Java, and pack "C" is telling it that it's a single Character.
Oh - and sorry about my last post being a bit unfocussed: I was on the way to work and had to leave mid train-of-thought, so whatever I was saying I couldn't remember to finish the rest of the post :o
And - usual disclaimer - I don't really know what I'm talking about, I just put on a fairly sensible guess/bluster about it.