#exult@irc.freenode.net logs for 2 Jul 2009 (GMT)

Archive Today Yesterday Tomorrow
Exult homepage

[00:08:34] --> azeem has joined #exult
[00:25:46] <-- azeem_ has left IRC (Read error: 101 (Network is unreachable))
[00:56:23] <-- Rottingbeef has left IRC (Read error: 113 (No route to host))
[00:56:31] --> Rottingbeef has joined #exult
[02:26:02] --- pupnik_ is now known as pupnik
[04:14:08] <-- pupnik has left IRC ("leaving")
[04:37:11] <-- Marzo_away has left IRC ("Marzo vanishes suddenly.")
[06:24:54] <-- Rottingbeef has left IRC ("I, too, have lost a kingdom.")
[07:49:24] --> Fingolfin has joined #exult
[07:49:24] --- ChanServ gives channel operator status to Fingolfin
[09:19:41] <-- servus has left IRC (kornbluth.freenode.net irc.freenode.net)
[09:23:23] --> servus has joined #exult
[10:28:07] --> Dominus has joined #exult
[10:28:08] --- ChanServ gives channel operator status to Dominus
[11:02:47] <-- Fingolfin has left IRC ()
[13:01:08] --> shazza has joined #exult
[13:31:17] <-- Kirben has left IRC ()
[13:36:55] <-- Sevalecan has left IRC ("Leaving")
[13:42:57] --> Sevalecan has joined #exult
[14:31:12] <-- Sevalecan has left IRC ("Leaving")
[14:35:11] --> Sevalecan has joined #exult
[15:05:34] --> Marzo has joined #exult
[15:15:44] --- Marzo is now known as Marzo_away
[15:24:14] --> Rottingbeef has joined #exult
[16:33:29] <-- shazza has left IRC ()
[17:46:13] --> Malignant_Manor has joined #exult
[17:49:51] <Malignant_Manor> Marzo, does special pixels use the color in palettes.flx index 0 that is closes to what is asked for in pal.find_color?
[18:07:04] --- Marzo_away is now known as Marzo
[18:07:20] <Marzo> What do you mean exactly?
[18:07:35] <Malignant_Manor> special_pixels[POISON_PIXEL] = pal.find_color(4, 63, 4);
[18:07:47] <Marzo> Ah
[18:07:54] <Marzo> Yes, that is correct
[18:07:57] <Malignant_Manor> Like that, color doesn't seem to match what is listed there though
[18:08:26] <Malignant_Manor> is that hex?
[18:08:33] <Marzo> No
[18:08:44] <Marzo> Colors in U7 are stored in 5-bit format
[18:08:51] <Marzo> (5-bit per channel)
[18:09:02] <Marzo> They range from 0 to 63
[18:09:27] <Marzo> The actual RGB colors for 'standard' 8-bit per channel is obtained by multiplying those values by 4
[18:10:07] <Marzo> (so the poison pixel would be (16, 252, 16) in 8-bit/channel RGB)
[18:10:11] <Malignant_Manor> Thanks, I'm trying to work on getting some stuff documented.
[18:10:44] <Marzo> (or rather, the closest color in that palette)
[18:12:05] <Malignant_Manor> do colors in the palette also need to be in multiples of 4?
[18:12:30] <Marzo> They will be eventually
[18:12:44] <Marzo> (unless you mean in an image's palette)
[18:13:47] --> Fingolfin has joined #exult
[18:13:47] --- ChanServ gives channel operator status to Fingolfin
[18:14:38] <Malignant_Manor> Ok, I guess I will add that suggestion to use multiples of four or zero for a color value. (non hex)
[18:15:37] <Malignant_Manor> Do invisible party members and items use a palette color or a hardcoded one?
[18:16:02] <Marzo> I am not entirely sure
[18:16:27] <Marzo> Ah, found it
[18:16:39] <Marzo> One of the XForm tables is for invisibility
[18:18:02] <Malignant_Manor> Can you please give an explanation about the x-form table information (besides what you posted in the forums) and how to edit/create them?
[18:18:48] <Marzo> Right now, they can't be created in ES
[18:19:00] <Malignant_Manor> Well, manually.
[18:19:17] <Malignant_Manor> Or are they binary?
[18:19:36] <Marzo> There are two ways to create a XForm table: you can edit/create the blends.dat file (it is binary) or create a new entry in xforms.tbl (also binary)
[18:20:00] <Marzo> For the former, you would have to delete xforms.tbl as Exult gives preference to it
[18:20:27] <Marzo> For the latter: the xforms.tbl file is a flex file in 'reverse'
[18:20:56] <Malignant_Manor> it doesn't look in patch for blends and overwrite?
[18:21:03] <Marzo> The first entry is the xform table for color 254, and each additional entry reduces the color index to which it applies by 1
[18:21:25] <Marzo> Exult limits the xforms read from xforms.tbl by the number of entries in blends.dat
[18:22:08] <Marzo> Answering your question: if Exult finds a xforms.tbl in either static or patch, it will use blends.dat only for OpenGL
[18:22:57] <Marzo> If Exult finds no xforms.tbl anywhere, it will use blends.dat to generate the xforms
[18:23:39] <Marzo> (the fact that blends.dat is used in OpenGL is the reason why the number of entries in blends.dat limits the number of xforms read from xforms.tbl)
[18:24:23] <Marzo> Blends.dat is a simple binary file: the first byte is the number of entries, and each subsequent byte tripled is an RGB color (not neccessarily a multiple of 4)
[18:24:54] <Marzo> Each xform from xforms.tbl is an index-remapping table
[18:25:50] <-- Dominus has left IRC ("Leaving.")
[18:26:03] --> Dominus has joined #exult
[18:26:03] --- ChanServ gives channel operator status to Dominus
[18:26:22] <Marzo> It is 256 bytes in length, and each byte tells Exult what color index should be used when that color index is behind the given xform
[18:28:12] <Marzo> Example: for color index 254, the xform used is the first entry in xforms.tbl; if a pixel with color index 254 is rendered on top of a pixel with color index (say) 120, Exult finds the 120th byte of the first xform in xforms.tbl and replaces the color index of that pixel by the byte read from the table
[18:28:48] <Marzo> (so it is hard work making a xform talbe, as you imagine...)
[18:33:45] <Malignant_Manor> Are the .pal files useful for new games or only serpent isle?
[18:36:00] <Marzo> Neither; Exult does not use them (and neither does the original SI, I think)
[18:36:32] <Marzo> I guess that they were part of the Origin screen saver
[18:36:53] <Malignant_Manor> so why does ES display them?
[18:37:04] <Marzo> Because they are in static dir
[18:39:48] <Malignant_Manor> Is exult limited to 16 palettes?
[18:40:10] <Marzo> No, but adding more palettes won't do any good
[18:40:48] <Marzo> (you can't select which palettes are going to be used, they are set by lighting, weather, invisibility and so forth)
[18:41:20] <Malignant_Manor> what are the palettes 4 and up do? I know 0-3.
[18:42:46] <Marzo> 0 = day; 1 = dawn/dusk; 2 = night; 3 = invisibility; 4 = overcast; 5 = fog (currently unused); 8 = badly wounded (flashing red); 10 = lightning flash; 11 = single light when dark; 12 = many lights when dark
[18:42:59] <Marzo> 6, 7 and 9 are currently unused
[18:43:26] <Marzo> (as are 13+)
[18:43:44] <Marzo> (this is in palettes.h, by the way)
[18:43:51] <Marzo> s/in/from
[18:47:20] <Malignant_Manor> s/in/from? sorry just asking about palettes while at it and didn't search yet
[18:47:53] <Marzo> Sorry, that is an idiom from certain command-line Linux tools
[18:48:11] <Malignant_Manor> ES should probably be modified to ignore .pal files to lower confusion.
[18:48:18] <Marzo> 's/to/from' means "replace 'to' by 'from'"
[18:53:14] <Malignant_Manor> is the 1x1 transparent pixel in the pointer shape used for anything?
[18:53:31] <Marzo> No, I don't think it is
[18:55:33] <Malignant_Manor> is the No Magic flag used for anything besides magebane?
[18:56:08] <Malignant_Manor> Spells could still be cast and spell items used.
[18:56:28] <Marzo> The character flag? After magebane hits, it prevents mages from teleporting, summoning, etc
[18:56:58] <Malignant_Manor> I could swear a gazer turned invisible after the flag was set.
[18:56:59] <Marzo> Magebane also removes any spell-like items the character has
[18:57:10] <Marzo> He shouldn't have
[18:58:04] <Malignant_Manor> Just tested and the dragon turned invisible
[18:59:36] <Marzo> As I said, it shouldn't be happening
[19:00:36] <Marzo> Did you set it by cheat screen or through ES? If by the cheat screen, can you test using the advanced flag modifier and set flag 31 directly? (I ask because the flag might be mislabelled)
[19:01:21] <Malignant_Manor> I tested ES since I cannot select egg spawned monsters with the cheat menu.
[19:03:08] <Marzo> Ah, that is a different 'no magic' flag
[19:04:20] <Malignant_Manor> What is its use?
[19:04:33] <Marzo> (one that actually shouldn't be settable, in fact)
[19:05:34] <Malignant_Manor> usecode specific?
[19:06:02] <Marzo> It is only used for usecode to check for a monster flag
[19:06:28] <Marzo> (called 'weapon powers' in the monster shape data tab)
[19:07:17] <Marzo> Its actual value is saved if set, but it is *never* used
[19:07:55] <Marzo> (even get_item_flag gets the actual flag from monster data instead)
[19:12:40] <Marzo> Hm. Given that the 'no magic' flag that is settable is flag 31, and given that the flag set by ES as 'no magic' is flag 13, it could have been a typo that went unnoticed
[19:12:59] <Marzo> I will treat it as such
[19:13:57] <Malignant_Manor> Do the .mid files and .rsg files in the music directory of tfl get used by exult?
[19:14:20] <Marzo> No
[19:14:55] <Malignant_Manor> oops was tools anyway
[19:17:15] <Malignant_Manor> I discovered that the ES doc still points to a now defunct usecode documentation site.
[19:17:32] <Dominus> :)
[19:17:42] <Dominus> the ES docs have not changed in years :)
[19:17:47] <Malignant_Manor> It works with archive.org
[19:17:58] <Malignant_Manor> Well, I'm working on some of it.
[19:18:35] <Dominus> if you come up with stuff I'd gladly add it to the docs...
[19:19:17] <Dominus> or better, I'd gladly add it to the source f Exult so it doesn't vanish as all the other sites havevanished...
[19:19:55] <Malignant_Manor> Some basic stuff with the original games is much more complicated if you don't have them and have never played them (especially with Exult).
[19:20:21] <Malignant_Manor> Meant to say for schedules.
[19:20:41] <Marzo> The change above (plus another minor one) has been committed
[19:22:35] <Malignant_Manor> I hate the new sourceforge update. It doesn't even update the activity properly.
[19:23:28] <Marzo> At least it works a lot faster than before
[19:24:27] <azeem> Marzo: hey, I got a question: When you guys hack on/fix usecode bugs; do you just look at the disassembled output, or do you have some version with useful function/variable names etc.?
[19:25:26] <Marzo> I have a full dump of BG/SI usecode done with UCXT then post-proccessed with a VB utility I did way back
[19:26:19] <Marzo> That utility makes the UCXT output more UCC-like, but it is buggy and removes some streches of code in some cases (notably, LB usecode in BG and a few others)
[19:27:22] <azeem> hrm, ok
[19:28:10] <Marzo> I am writing (off and on) a more specific disassembler than UCXT that generates UCC-style output from the get go, but it is not easy
[19:28:31] <Malignant_Manor> It would be awesome though.
[19:29:52] <Marzo> Most functions are rather easy; but many use if's and goto's to make loops, which are like UCC's while/do while loops, and these are tough to recognize correctly
[19:30:18] <Malignant_Manor> Conversations are annoying too.
[19:31:12] <Marzo> Moreover, some have horrible goto hacks, such as the aforementioned LB usecode, and one in particular (from that guy (whose name I forgot) that pretends to be the avatar, which has a loop but which places parts of the loop code outside the loop, jumping back to it)
[19:31:25] <Marzo> Conversations are actually very easy to do
[19:31:26] <Malignant_Manor> What all is in the delayed update?
[19:31:47] <Malignant_Manor> I might be remembering wrongly on the output.
[19:31:48] <Marzo> ?
[19:32:03] <Malignant_Manor> The gump patch to code.
[19:32:10] <Marzo> Ah
[19:32:15] <Marzo> Mostly, lack of time
[19:32:30] <Marzo> (there is still a lot to do)
[19:33:08] <Malignant_Manor> Anything besides the gumps being done?
[19:34:02] <Malignant_Manor> Oh and besides wave sfx conversion. I guess since you mentioned that bug was going to be obsolete.
[19:34:42] <Marzo> Adding all of the interface in ES to edit all of that data is a lot of work
[19:36:02] <Malignant_Manor> I wasn't bugging you about finishing it, just what was being changed. Sorry, if I sounded like I was trying to rush you.
[19:36:34] <Marzo> But I also refactored the data loading/writing from shape{vga,write}.{cc,h}, so that the new gump{vga,write}.{cc,h} can use it too
[19:37:14] <Marzo> Plus spell reagent/mana cost data, the ability to have up to 16 spells per circle (and save all that in spellbooks, in a backward compatible way)
[19:37:39] <Marzo> (I know, I was looking at 'svn diff | less' to check the changes)
[19:38:06] <Marzo> The ability to reload gump info, as well as shape info
[19:38:52] <Malignant_Manor> Did you change the amount of available spell levels too?
[19:39:02] <Marzo> No, that remains the same
[19:39:30] <Marzo> (changing the number of spells per level is hard enough to do in a way that doesn't break the original games)
[19:39:51] <Malignant_Manor> Well, if someone doesn't like it, there is easily usecode dialog spellbooks.
[19:40:02] <Marzo> Aye
[19:40:46] <Malignant_Manor> Your examples and mine to base it off of too.
[19:40:54] <Marzo> There is also a lot of bugs I fixed which are hard to disentangle from the gump/sound/etc update
[19:41:38] <Marzo> Oh, and frame powers become a more generic frame glags and may also depend on quality
[19:41:49] <Malignant_Manor> Did you add the hit sfx actually working addition?
[19:41:56] <Marzo> (it is used for the ring of reagents, to de-hard-code it)
[19:42:03] <Marzo> Nope
[19:42:16] <Marzo> I am hesitant as yet given that the originals didn't use it
[19:42:34] <Malignant_Manor> It is already in ES though.
[19:42:50] <Marzo> (it was I, in fact, that deactivated it in the first place once I realized it wasn't used)
[19:45:32] <Malignant_Manor> Well, all it takes is a few lines of code and would add to the modding/new game capabilities without breaking anything. Doesn't it use hardcoded hit sfx anyway (can't remember)?
[19:46:13] <Marzo> The hard-coded hit SFX will be moved to the game XML, which will be loaded into an internal table
[19:48:36] <Malignant_Manor> I just think one hit sfx is a bit limiting.
[19:56:15] --- Marzo is now known as Marzo_away
[20:25:37] --> Baastuul_ has joined #exult
[20:28:39] <-- Rottingbeef has left IRC (Nick collision from services.)
[20:28:41] --- Baastuul_ is now known as Rottingbeef
[21:20:26] --> Cahaan has joined #exult
[21:38:42] <-- Dominus has left IRC ("Leaving.")
[22:06:17] <-- Fingolfin has left IRC ()
[22:59:43] --> Kirben has joined #exult
[22:59:43] --- ChanServ gives channel operator status to Kirben
[23:27:10] <-- Kirben has left IRC ()
[23:32:33] <-- Malignant_Manor has left IRC ("ChatZilla 0.9.85 [Firefox 3.0.11/2009060215]")
[23:33:15] --> Kirben has joined #exult
[23:33:16] --- ChanServ gives channel operator status to Kirben
[23:40:05] <-- Rottingbeef has left IRC (Read error: 104 (Connection reset by peer))
[23:42:10] --> Rottingbeef has joined #exult
[23:43:32] <-- Rottingbeef has left IRC (Client Quit)