#pentagram@irc.freenode.net logs for 11 Mar 2007 (GMT)

Archive Today Yesterday Tomorrow
Pentagram homepage

[13:09:45] --> exultbot has joined #pentagram
[13:22:51] <-- Kirben has left IRC (Read error: 110 (Connection timed out))
[13:25:51] <-- exultbot has left IRC (shutting down)
[13:26:07] --> exultbot has joined #pentagram
[15:52:08] --> dragon08-15 has joined #pentagram
[15:52:16] <dragon08-15> hey!
[15:52:52] <wjp> hi
[15:53:54] <dragon08-15> Do you know if there's any pentagram mail address? I can't find one on the website..
[15:55:04] <wjp> hm, interesting point
[15:55:27] <wjp> our mailing list is pentagram-devel@lists.sourceforge.net
[15:57:06] <dragon08-15> that's a public one, is isn't it?
[15:57:14] <wjp> yes
[15:57:44] <wjp> another good place to talk or ask questions about pentagram is here :-)
[15:59:10] <dragon08-15> Are you part of the "team lead" (if there's something like that) ?
[15:59:36] <wjp> yes
[16:00:54] <dragon08-15> Okay, I have written a mail I was just trying to find the correct address for - but I can as well use IRC for this purpose
[16:01:47] <dragon08-15> First of all, my nick might look strange. My real nick (in the ultima world) is "Hawkwind" but that nick was - as expected - already used.
[16:02:15] <dragon08-15> I am part of "Team Forgotten World", perhaps you have heard of us. We're creating a modification for Ultima IX Ascension.
[16:02:58] <dragon08-15> www.forgottenworld.de is our website
[16:04:12] <dragon08-15> We decided to get in touch with similar projects and your project is - besides Exult - probably the one which is closest to ours
[16:05:38] <dragon08-15> First of all, are you interested in a link exchange?
[16:06:38] <wjp> We decided a while ago to leave that to sites like aiera
[16:07:28] <wjp> so we're now just linking to open-source engine rewrites
[16:08:24] <dragon08-15> Ah, I see - well, what might even be more important is the exchange of knowledge (in case there's anything to share). We know that the flx format has mainly stayed the same since Ultima 7. Maybe there are other parts, too.
[16:08:35] <wjp> regardless, Forgotten World sounds like a great idea; U9 had far more potential than what 'came out'
[16:09:42] <dragon08-15> Thanks. It's a pity to see what could have been done, but has not been done, due to lack of time
[16:10:10] <wjp> I'm entirely for sharing knowledge :-)
[16:10:47] <wjp> I've never used a hex-editor on U9 files, but I'm fairly familiar with most u7/u8 file formats
[16:11:34] <dragon08-15> We have decoded most of the U9 files already. Currently, we're working on writing a world editor and decoding the scripts.
[16:11:45] <wjp> cool
[16:12:11] <wjp> scripts/bytecode is usually quite interesting to decode
[16:12:21] <dragon08-15> I thought there might be similarities between the script format (maybe not to a large extent, but who knows).
[16:12:30] <wjp> it changed quite a bit from u7 to u8
[16:13:04] <wjp> especially Serpent Isle really hit the limits of what u7's scripting could do, so U8 has a far more general scripting system
[16:13:33] <wjp> e.g., U8's vm is fully multithreaded
[16:13:38] <wjp> (cooperatively)
[16:14:25] <wjp> the original language was probably object oriented, but of course we can only see the resulting bytecode, so it's hard to say much about it
[16:14:52] <dragon08-15> In U9, most scripts are attached to an item. There are items which are invisible and do nothing but cause the music to play and so on. Now every item has certain links to entries in the triggers.flx (the big file which includes all the scripts).
[16:15:10] <wjp> yeah, u7 and u8 have those as well
[16:15:14] <wjp> we call them eggs
[16:15:21] <dragon08-15> Ah, cool.
[16:15:32] <wjp> (music eggs, monster eggs, usecode eggs, teleporter eggs, etc)
[16:16:37] <wjp> most of u8's scripts are attached to item types as well
[16:18:09] <wjp> they're often run by 'events' of an item: look, use, hit, hatch, schedule, animate, for example
[16:18:21] <dragon08-15> We are not very far in that regard - but I am afraid a lot of information on item types is hardcoded (for example, if the script is triggered when you step on the item or when you click on it - that's determined by the typename id)
[16:19:00] <wjp> oh?
[16:19:14] <dragon08-15> Some items have several entries - for example the lever: One for turning the lever to position A and another one for turning it to position B. I guess that's the same in U8?
[16:20:09] <dragon08-15> With entries I mean numbers of the relating script to run.
[16:22:25] <wjp> a lever in u8 has a 'look' and a 'use' event. The function attached to the 'look' event just outputs 'lever' to the screen. The 'use' function is extremely long, and calls other functions depending on where in the game world the lever is
[16:23:11] <wjp> it deduces its current position from its current graphics
[16:25:16] <dragon08-15> the u9 triggers are generally quite short
[16:25:40] <dragon08-15> for example, this is a simple teleport trigger: 1F 10 6E 04 C0 01 FF 10 00 00 00 00
[16:26:18] <wjp> you'll have to translate that for me :-)
[16:26:35] <dragon08-15> Sure :)
[16:27:41] <dragon08-15> First 2 bytes: I have not yet determined what that is. Byte 3/4: Teleport command. Byte5: Map number. Byte6: Show teleport animation? (bool) - the last 6 bytes are somehow an "end of file" marker or something
[16:28:47] <dragon08-15> The teleporter item has an idea. Let's say "1000" - now it looks on Map 192 (C0) if there's a "teleporter egg" (to say it in your language) with id "1000" and if there is, the player is brought there
[16:28:54] <dragon08-15> not idea, id ;)
[16:29:31] <dragon08-15> Now, this doesn't look familar to you?
[16:30:09] <wjp> the 1000 is from those last 6 bytes?
[16:30:15] <dragon08-15> nope
[16:30:16] <wjp> s/six/5/
[16:30:23] <dragon08-15> it's not within the scripts
[16:30:26] <dragon08-15> It's in the map file
[16:30:37] <wjp> oh, wait; I misread
[16:31:34] <wjp> teleport eggs in U8 work similarly
[16:31:44] <wjp> but they don't have any code attached to them
[16:32:19] <wjp> they have a 'quality', and they search for a destination egg with the same quality in the destination map
[16:33:08] <dragon08-15> Where's the destination map defined?
[16:33:20] <dragon08-15> If they don't have any code attached to them
[16:35:08] <wjp> part of the data of the teleport egg
[16:35:43] <wjp> all objects have two or three data fields. The teleport egg uses its field for quality and target map
[16:36:05] <dragon08-15> aah
[16:37:30] <dragon08-15> Now the script file determines what to do when you "use" a teleporter egg, have I understood that correctly?
[16:37:50] <wjp> no, teleport eggs can't be used because they're invisible
[16:38:04] <wjp> ('use' is the event that's triggered when you double-click on an item)
[16:38:28] <dragon08-15> Okay. So in this case it's like "step on" or something?
[16:38:30] <wjp> eggs have a trigger range (which is the third data field, which I just forgot to mention)
[16:39:56] <wjp> they're a bit of a special case; they get triggered when you get near them
[16:41:58] <wjp> if an other script would want to teleport the avatar, it would call the teleport function, and pass the target map and egg as arguments
[16:42:10] <wjp> (or call a different teleport function which takes coordinates as its arguments)
[16:45:22] <dragon08-15> I see. Now, the engine does know that it is a teleport egg, reads out the parameters and knows what to do. But where is information about these "eggs" (e.g. what the parameters are and so on) stored?
[16:52:21] <wjp> in the map data files
[16:53:30] <wjp> each object consists of (shape,frame,flags) and the three data fields I mentioned
[16:53:51] <wjp> (shape,frame) determine how the item looks visually
[16:54:07] <dragon08-15> Sorry, I described it wrong: How does the engine know how to identify an item as a teleporter?
[16:54:14] <wjp> by its shape
[16:54:39] <wjp> there's a file typeflag.dat that lists the 'sort of object' each shape is
[16:54:58] <dragon08-15> Cool. There's something similar in U9.
[16:55:22] <wjp> generic, quantity, breakable, container, monsteregg, globegg, unkegg, teleportegg, reagent
[16:55:31] <wjp> (and a few misc others)
[16:56:07] <wjp> unkegg is the most versatile egg, as that one executes a script when triggered
[16:56:21] <dragon08-15> Do you have a list of file format definitions or something?
[16:56:34] <wjp> (typeflag.dat also has other information, such as flags, weight, volume, dimensions)
[16:56:56] <wjp> yeah, in the docs/ directory in our subversion repository
[16:57:18] <wjp> http://pentagram.svn.sourceforge.net/viewvc/pentagram/pentagram/trunk/docs/
[16:57:55] <wjp> u8mapfmt.txt, u8typeflag.txt, u8usecode.txt are probably the most useful ones
[16:58:35] <wjp> (if you're not familiar with svn, just click on the number between the filename and the age to view the latest version of the file on that webpage)
[16:59:58] <dragon08-15> Great. Thanks alot!
[17:00:45] <wjp> they might be slightly outdated in places
[17:01:25] <wjp> the actual script bytecode format isn't really documented, only in our code
[17:04:42] <dragon08-15> might still be of great help!
[17:05:04] <dragon08-15> yeah, that's no prob - gives some good ideas I think
[17:09:52] <dragon08-15> You said you're guessing that the original format was object oriented - so there's one big file in which all the triggers are or is it an flx file, too, which includes small triggers?
[17:11:05] <wjp> all code is in a single flex file
[17:11:19] <wjp> each 'file' in the flex is a single class
[17:11:46] <wjp> most of these directly correspond to item shapes, but some contain general utility functions and don't belong to items
[17:12:54] <wjp> when you double-click on a lever, it looks up class for the lever's shape (672), looks in the event table of that class, and runs its 'use' event
[17:14:26] <wjp> are you collecting the information you're gathering somewhere online?
[17:14:34] <dragon08-15> Oh, nice one.
[17:14:42] <dragon08-15> http://paeron.klippanlan.net/ultima9/
[17:15:00] <dragon08-15> it's a bit outdated and needs to be updated, though
[17:15:46] <dragon08-15> well, that's the correct url: http://paeron.klippanlan.net/?page=project&id=10
[17:16:04] * wjp bookmarks
[17:16:17] <dragon08-15> No, now that I read over it, it's QUITE outdated.. ;)
[17:17:14] <dragon08-15> Tell me, are the dialogue scripts in the flex file, too?
[17:17:30] <wjp> yes, dialogues are just scripts
[17:18:46] <wjp> there are 'intrinsics' (engine functions that the scripts call to manipulate the world and such) for displaying text and showing conversation options
[17:20:16] <wjp> examples of intrinsics are 'get item's position', 'set item's position', 'set avatar's strength', 'get game time', 'teleport', etc...
[17:20:25] <wjp> (there are about 200 of them)
[17:21:15] <dragon08-15> And these are "hardcoded"?
[17:21:34] <wjp> intrinsics are hardcoded, yes
[17:21:49] <wjp> they're the functionality the engine 'exports' to the scripts
[17:22:35] <dragon08-15> Makes sense..
[17:22:44] <wjp> yes
[17:23:16] <wjp> because there are so many, the scripts can take care of running the entire plot
[17:24:04] <dragon08-15> Nice
[17:24:18] <dragon08-15> I'm afraid it's a bit differently in U9
[17:25:04] <dragon08-15> At least it looks like (filemon study) the dialogue is hardcoded
[17:26:35] <wjp> hm, is that something you can deduce from filemon output?
[17:26:49] <dragon08-15> I am not sure
[17:26:57] <dragon08-15> U9 reads most stuff from the harddrive
[17:27:06] <dragon08-15> it's really silly sometimes
[17:27:20] <dragon08-15> That's why this game won't run faster even on a high-tech pc
[17:27:57] <dragon08-15> For example, whenever you call a "class", it's read from harddrive
[17:29:01] <wjp> strange; it's not as if triggers.flx is so big it couldn't keep it cached entirely...
[17:29:16] <dragon08-15> yes...
[17:30:05] <dragon08-15> there's sfxcat.flx, a 6 KB file - it is read 100 times a second...
[17:31:59] <wjp> anybody working on re-implementing u9? :-)
[17:33:41] <dragon08-15> That'd be step 3 (after writing the editor and creating the mod), but we have to reach steps 1 and 2 before we can seriously plan on doing that ;)
[17:33:50] <wjp> :-)
[17:34:37] <dragon08-15> Actually, the editor will be something like a small U9 engine
[17:34:53] <-- Fingolfin has left #pentagram ()
[17:34:57] --> Fingolfin has joined #pentagram
[17:34:57] --- ChanServ gives channel operator status to Fingolfin
[17:35:21] <wjp> time for dinner
[17:35:44] <dragon08-15> Have a good meal! And thanks alot for your information.
[17:35:58] <dragon08-15> I will go through the docs and sourcecode and see if there's more useful stuff in there :)
[17:35:59] <wjp> sure, no problem
[17:36:13] <wjp> good luck with forgotten world
[17:36:27] <dragon08-15> Thanks and good luck with Pentagram! :)
[18:18:17] <wjp> (before I leave for the rest of the evening, ) do you know how much the unofficial U9 dialogue patch changes? Does it keep the same dialogue 'structure', only changing the actual text, or does it change the structure/dialogue tree as well?
[19:14:57] <dragon08-15> Sorry, I was afk, too - the dialogue patch can only change the text (no structure / dialogue tree changes)
[20:02:59] <-- Fingolfin has left IRC ()
[20:33:32] <-- Jett has left IRC (Read error: 110 (Connection timed out))
[20:34:51] <-- dragon08-15 has left IRC ("Ende! :: (Gamers.IRC) www.gamersirc.net ::")
[21:53:31] --> Jett has joined #pentagram
[22:47:39] --> Kirben has joined #pentagram
[22:47:39] --- ChanServ gives channel operator status to Kirben
[22:54:48] --> Kazin has joined #pentagram
[23:10:18] <-- Kazinstan has left IRC (Read error: 110 (Connection timed out))
[23:49:22] --> Colourless has joined #Pentagram
[23:49:22] --- ChanServ gives channel operator status to Colourless