#nuvie@irc.freenode.net logs for 9 Aug 2007 (GMT)

Archive Today Yesterday Tomorrow
Nuvie homepage

[01:49:59] --> SB-X has joined #nuvie
[02:00:09] <SB-X> luteijn: "the game wouldn't be the same anymore if I got to it, and probably less fun for most people.." <- Oh noes! What diabolical scheme did you have in mind for U6O, once you get your hands on it? Weather and resource management?
[02:35:43] --- servus_ is now known as servus
[02:59:34] <-- SB-X has left IRC (Read error: 110 (Connection timed out))
[06:07:27] <-- Kirben has left IRC ()
[06:09:41] --> Kirben has joined #nuvie
[07:23:48] <luteijn> SB-X: If I had the free time, I'd try to make the NPCs/Monsters and Players as much the same as possible, both in how they looked (can't be 'nice' to players, and 'nasty' to monsters if you don't know which is which) and 'under the hood' (no ridiculous amounts of HP for monsters, any fights would be short and deadly to both sides; basically I'd make combat less important). Also I'd make the game a lot more rewarding for people playing together in small
[10:18:01] --> SB-X has joined #nuvie
[10:20:55] <SB-X> luteijn: oh, nothing wrong with that. "people playing together in small..." ?
[10:28:16] <luteijn> in small parties than playing solo..
[10:32:30] <luteijn> There's a huge amount of debug information being printed by nuvie, even with some of it #defined/commented out..
[10:32:32] <SB-X> ah ok, sounds good to me :)
[10:32:41] <SB-X> thanks for answering even when i was offline
[10:32:45] <SB-X> yes i know
[10:33:04] <SB-X> doesn't hurt now, but at some point that needs to be trimmed down or hidden
[10:33:18] <SB-X> especially information that could be used for cheating
[10:34:29] <SB-X> you already took care of it?
[10:35:00] <luteijn> I've set most of it to the lowest level at the moment, but I'm too curious/nosey to run at less than LEVEL_DEBUGGING.. I think for a release version we should compile with 'WITHOUT_DEBUG'.
[10:35:31] <SB-X> I've never actually compiled nuvie with DEBUG enabled globally, just defined per-file.
[10:35:54] <SB-X> ok
[10:36:00] <luteijn> everything that used printf originally is now wrapped by DEBUG() I hope. Now working on the cerr<< stuff.
[10:36:23] <SB-X> there's not really anything that we would send to stderr that can't be considered debug level information
[10:36:47] <luteijn> There was only 2 small sections that had 'DEBUG' as a conditional debug section, I saw your converse stuff had things like CONVERSE_DEBUG etc.
[10:36:48] <SB-X> maybe startup messages, it's all used to help us figure out what's going on
[10:36:53] <SB-X> but it's all used*
[10:37:17] <SB-X> oh right, that's for more verbose messages, isn't it?
[10:37:30] <luteijn> right, screen/Screen.cpp is sending its diagnostics via cerr<< which means it is a little more work to wrap them into DEBUG()
[10:37:59] <luteijn> yes, if you enable those CONVERSE_DEBUG sections, it will really get spammy..
[10:38:23] <SB-X> heh, i forgot the kinds of messages printed
[10:38:33] <SB-X> didn't you convert everything including cerr stuff to PERR?
[10:39:33] <SB-X> why TILEMANAGER_DEBUG?
[10:39:51] <luteijn> eh no, only printf was converted to PERR because that was almost automatic. for cerr<< I need to reorder the arguments.
[10:40:02] <SB-X> ah k, np
[10:40:18] <luteijn> I think that used to be a #ifdef DEBUG section in TileManager.cpp
[10:40:42] <luteijn> but I'm using the 'DEBUG' define as a macro now.
[10:41:03] <SB-X> shouldn't Look::get_description just use a bool, not a pointer to bool?
[10:41:54] <luteijn> After I first defined that, I promptly got an error on startup there, it used a contant. I think it wants a bool reference,
[10:42:27] <luteijn> const char *Look::get_description(uint16 tile_num, bool *plural)
[10:42:48] <luteijn> so the constant false ('0') caused null-pointer-dereference
[10:43:27] <SB-X> that makes sense, but i dont see why it has to use a pointer
[10:43:59] <luteijn> it could have used a c++ style reference
[10:44:21] <luteijn> *plural = has_plural; //we return if this string contained a plural form.
[10:44:40] <SB-X> also true, i just saw that :)
[10:44:54] <SB-X> is that used by anything
[10:45:05] <luteijn> I think in the past it was used the other way around, to select if you wanted the plural or singular form to be returned?
[10:45:31] <SB-X> that's how i thought it was used, but that's probably another function i'm thinking of
[10:46:07] <luteijn> I don't know, I didn't check if it's used anywhere, just fixed the problem with the debug output. I assume when it was added it worked, then got defined out, and then the function changed..
[10:46:19] <SB-X> can references be default arguments?
[10:46:58] <SB-X> I don't see why not. Anyways we should have a default version that doesn't take plural.
[10:47:34] <SB-X> there's also a "has_plural()" function that doesn't seem to be used
[10:48:25] <luteijn> TileManager.cpp: return look->has_plural(tile_num); // luteijn: FIXME, doesn't take into account Zu Ylem, Silver Snake Venom, and possibly other stackables that don't have a plural defined.
[10:48:51] <luteijn> I didn't write that line, just the FIXME comment..
[10:49:08] <SB-X> hehe
[10:49:47] <SB-X> i dont think "get_description()" does much different
[10:50:20] <SB-X> Hey, I wanted a varargs debug printf for a while now. Thanks for writing it. I'm glad you didn't call it nudebug. (NUviewDEBUG)
[10:51:54] <luteijn> I'm not 100% happy with it, printing the 'timestamp/level' looks a little ugly. Maybe if it's filtered through a post-processor..
[10:54:15] <luteijn> hmm get_description is only used in Tilemanager.cpp. It looks like you can 'request' the plural/singular form with the bool, and it gets set to reflect if you actually got a plural or not.
[11:01:01] <SB-X> why use DEBUG instead of PERR? or why not make PERR redirect to DEBUG?
[11:02:01] <SB-X> i see where the bool return is used, TileManager::lookAtTile()
[11:04:49] <luteijn> One of the intermediate steps was to define PERR(x...) to call debug(0,LEVEL_DEBUGGING,x..), but in some places the debug is split into several parts, so printing the timestamp and level over and over is a bad idea.
[11:05:09] <SB-X> I don't think the level needs to be printed.
[11:05:41] <luteijn> Eric wanted that. It's easy enough to turn it off in Debug.cpp.
[11:05:52] <SB-X> ah k
[11:06:15] <SB-X> he might change his mind if he has to read it :)
[11:06:18] <luteijn> Probably going to make it configurable so I can get rid of the timestamp, and you can get rid of the level ;)
[11:07:41] <SB-X> that would work, although we also should consider what we want the logs sent with bug reports to look like
[11:09:29] <luteijn> I've shortened the names of the debug-levels to 5 characters in the output, which already helps a lot with the looks.
[11:10:17] <SB-X> oh, good
[11:11:48] <SB-X> even one letter would work (D)
[11:12:07] <SB-X> i didn't really see how all the long names looked anyway
[11:12:28] <SB-X> While we're on the subject of varargs functions, can you write us a MsgScroll::printf? ... Please? :-)
[11:12:30] <luteijn> Emergency and Error would overlap, but I guess I could use a symbol like ! for Emergency
[11:13:11] <luteijn> This dbeug function cheats, it just makes (v)fprintf do all the work.
[11:13:54] <luteijn> I could maybe use vsnprintf for a msgscroll version.
[11:14:10] <SB-X> yeah vsnprintf
[11:14:31] <luteijn> I'm not even sure I'm using the stdarg.h stuff properly, but it seems to work..
[11:15:43] <SB-X> i still havnt got C man pages installed on this ubuntu box
[11:16:10] <SB-X> but it looks ok to me, from what I remember
[11:16:43] <SB-X> i just realized you added your own formatting strings
[11:17:20] <luteijn> where?
[11:18:02] <SB-X> the !!increase!! and !!decrease!! ones that change debuglevel
[11:19:05] <luteijn> yes, a bit of an ugly trick; maybe debuglevel should just be a global static, or debug a proper class instead of a global function.
[11:19:29] <luteijn> alt-i and alt-d in/decrease debuglevel.
[11:21:04] <luteijn> a NULL format string is used to set the debug level to a certain level. That one isn't that bad... maybe if debug just returned the current debuglevel..
[11:33:00] <SB-X> - // scroll->PERR("%s says, \"This is the %s%s.\"\n\n", prefix, dungeon_name);
[11:33:00] <SB-X> + // scroll->DEBUG(0,LEVEL_DEBUGGING,"%s says, \"This is the %s%s.\"\n\n", prefix, dungeon_name);
[11:33:11] <SB-X> heh, that's just a hypothetical printf :p
[11:34:06] <SB-X> or a FIXME-type comment, to be done when you write a MsgScroll::printf ;)
[11:34:17] <luteijn> hmm yess, I guess my automation went overboard there.
[11:34:32] <luteijn> I'll go add the printf to MsgScroll then..
[11:35:05] <SB-X> :D
[11:35:31] <SB-X> of course you don't really have to, we've gotten along fine without it
[11:35:48] <SB-X> but thanks again if you do
[11:35:51] --> Yuv422 has joined #nuvie
[11:35:57] <luteijn> At the moment it doesn't look too hard; which means it probably is..
[11:36:06] <SB-X> something else i don't have to do
[11:36:09] <SB-X> hi yuv
[11:36:19] <Yuv422> hi guys
[11:36:20] <SB-X> luteijn: right ;)
[11:36:36] <luteijn> hi yuv
[11:42:23] <luteijn> Bleh, SDL's ugly debug-output is messing up ours..
[11:43:42] <Yuv422> I'm going to hack around with sleeping a bit
[11:44:02] <Yuv422> there are some large bugs in it at the moment
[11:45:14] <SB-X> you're going to sleep?
[11:45:33] <luteijn> That was what I thought he meant at first...
[11:45:34] <SB-X> what? oh sleeping in nuvie, nm
[11:46:16] <SB-X> didn't know SDL had debug output, maybe we should use a different macro
[11:46:34] <Yuv422> hehe
[11:46:48] <luteijn> ALSA lib conf.c:3968:(snd_config_expand) Evaluate error: No such device
[11:46:54] <luteijn> etc.
[11:47:25] <luteijn> maybe I should set up sound properly on that machine ;)
[11:49:10] <luteijn> also need to write something to format the lua debug output the same as the rest
[11:50:46] <Yuv422> we could make a lua function that backs into the debug call
[11:53:11] <luteijn> That would probably be the nicest way.
[11:54:15] <SB-X> how hard will it be to convert Configuration to lua?
[11:54:26] <SB-X> (if that is desirable)
[11:54:38] <Yuv422> hmm
[11:54:50] <SB-X> i was thinking we could just use the same Configuration class for compatibility
[11:55:04] <SB-X> but read in lua tables instead of xml keys
[11:55:10] <Yuv422> they give a few config examples in the lua book
[11:55:30] <Yuv422> I'd say that would be a job for a little further down the track
[11:55:33] <SB-X> yeah seeing that is why i thought of it :)
[11:55:57] <SB-X> ok, perhaps i can still use a lua config to read in keybindings
[11:56:11] <SB-X> even before integrating it with configuration
[11:56:43] <Yuv422> have a play and see how well it fits
[11:57:24] <SB-X> OK, will do. Either way bindings can live under config/input or config/input/keys.
[11:58:22] <SB-X> the keybinder uses a function table with pointers and SDLKeys though
[11:59:16] <Yuv422> can npcs be put to sleep in SE or MD?
[11:59:31] <Yuv422> just wondering if I should put the logic in Actor or U6Actor
[12:00:56] <SB-X> what about from talk scripts?
[12:02:57] <luteijn> I really don't know SE/MD that well...
[12:03:08] <Yuv422> work type sleep is different
[12:03:21] <Yuv422> I'm going to separate the two
[12:03:38] <Yuv422> as I think that's how the original handled it
[12:04:21] <Yuv422> magically induced sleep will override normal worktype activities
[12:07:14] <luteijn> there's no sleep spell in SE according to dino's page.
[12:07:23] <SB-X> ah k, i dont know anything about SE or MD
[12:10:02] <SB-X> sounds like a good idea, obviously someone you just put to sleep shouldnt get up to go to work right after
[12:10:16] <SB-X> didn't know nuvie was handling that wrong
[12:10:38] <SB-X> i mean it sounds like a good change
[12:10:42] <Yuv422> we have no sleep timer so any actor put to sleep will never wake up.
[12:13:47] <luteijn> Did the original store sleep timers somewhere that we haven't figured out yet?
[12:14:08] <Yuv422> I don't think so
[12:14:12] <Yuv422> it's just random
[12:14:45] <Yuv422> save a game while an npc is sleeping they will wake up at random times
[12:14:49] <SB-X> i guess you tested by saving and reloading
[12:14:53] <Yuv422> each time you load
[12:14:55] <SB-X> i see
[12:15:00] <Yuv422> yes :)
[12:15:09] <Yuv422> and diffing the objlist
[12:15:27] <luteijn> ok, maybe your debugger can help finding the chance to wake up
[12:15:38] <Yuv422> yeah
[12:15:46] <SB-X> that reminds me, i was going to ask you to use the debugger to look for alt codes
[12:15:47] <Yuv422> I've found the rest function
[12:16:08] <SB-X> did you find the alt-code handling function?
[12:16:24] <Yuv422> I haven't found that yet
[12:16:41] <SB-X> I wonder if there are any more than we know, or any unimplemented codes, since you can put in random numbers and get "glitchy" results.
[12:17:15] <Yuv422> I can search for the xref to the alt 213 string
[12:17:18] <SB-X> maybe the codes are some kind of function vtable index or something
[12:17:25] <Yuv422> that should find the alt handler pretty quickly
[12:17:33] <SB-X> ah, yeah
[12:17:36] <SB-X> whenever you have time
[12:17:44] <Yuv422> maybe tomorrow
[12:17:48] <Yuv422> :)
[12:17:50] <luteijn> I'm not sure if it is really an 'alt-code' cheat. Probably all you do is type a 'weird' character.
[12:17:51] <SB-X> k
[12:18:18] <Yuv422> yeah
[12:18:27] <Yuv422> extended ascii
[12:28:01] <luteijn> alt-128 -> ? (no what) alt-129 -> Attack alt-130 -> Cast alt-131 -> Talk (seems to be the commands in order of the button bar)
[12:28:35] <Yuv422> cool
[12:29:12] <luteijn> this goes for a bit, alt-138 toggles combat mode, alt-139 does a what.
[12:29:43] <SB-X> wow, that didn't take long
[12:29:51] <Yuv422> I'm off to get some real sleep now
[12:30:03] <SB-X> cya
[12:30:06] <Yuv422> I'll work on soft sleep tomorrow
[12:30:13] <Yuv422> cya
[12:30:18] <luteijn> alt-143 'pass'
[12:30:27] <luteijn> I'm just trying them all out in dosbox..
[12:30:47] <Yuv422> might be a hack like the overflow spam trick for funny frame_n's
[12:30:56] <Yuv422> in the original event handler
[12:31:03] <Yuv422> cya
[12:31:06] <-- Yuv422 has left IRC ()
[12:31:52] <luteijn> I doubt that, because A and C are not adjacent but 129 and 130 are
[12:32:14] <luteijn> but might be aliased ctrl-a ctrl-b etc.
[12:33:06] <luteijn> ctrl-a -> what ctrl-b -> what. so I guess it's not
[12:33:16] <SB-X> I never guessed it was related to extended characters, but thought some of the codes would link to normal actions.
[12:33:26] <SB-X> or hoped so anyway :)
[12:34:55] <luteijn> alt-065 would be an 'A'. The codes only working on the numpad is kind of a hint. That's what we used to type 8-bit characters in the past ;)
[12:36:13] <SB-X> I remember that, especially using alt-255 for a fake "space". It still works in Windows. (alt-codes)
[12:36:13] <luteijn> alt 144,5,6 seem to mess with the Views.
[12:36:28] <SB-X> those are the ones i noticed with "glitchy" effects
[12:37:08] <luteijn> hmm, found another one.. ctrl-F9 exits dosbox.. bleh.
[12:40:33] <SB-X> so if you hit alt-065 it also does Attack?
[12:40:49] <luteijn> of course
[12:41:16] <SB-X> so it's exactly as you said...
[12:41:26] <SB-X> in u6 the command bar just simulated keypresses then?
[12:42:01] <SB-X> or would that be just speculation at this point
[12:42:37] <luteijn> It might, I don't know how their mouse system works, it could very well be that those 'weird' ones are just mouseclicks that shouldn't be possible (button not available) but are forced in..
[12:46:12] <luteijn> alt-149/150 both move the cursor out of the msgscroll.
[12:46:38] <SB-X> cursor?
[12:47:36] <luteijn> spinning ankh
[12:48:05] <luteijn> text subsequently gets printed in the wrong spot too. Have fun emulating that in nuvie ;)
[13:08:52] <luteijn> alt-160 helps with container debugging.. it 'goes into' the last object used/select etc. (can go into a door or sword too)
[13:11:41] <SB-X> weird, but we could use one like that
[13:12:57] <-- Kirben has left IRC (Read error: 110 (Connection timed out))
[13:13:02] <luteijn> also nice for cheating, as you can look at a chest, then alt-160 it...
[13:13:21] <luteijn> http://luteijn.xs4all.nl/nuvieki/AltCodes has results so far.
[13:13:24] <SB-X> and get the contents?
[13:13:28] <SB-X> ok
[13:14:07] <SB-X> or how about put something into it
[13:16:37] <luteijn> haven't tried yet, but assume it will work..
[13:17:18] <luteijn> at first that key seemed to do nothing, so also went back to some other unknow keys that needed some 'state' initialized first to work properly
[13:18:11] <luteijn> you can drop stuff out of the chest as if you are holding it.
[13:19:40] <SB-X> nice, i'm surprised nobody put that into known u6 cheats lists yet
[13:20:28] <luteijn> not sure if it is possible to get anything into e.g. a key or an ankh amulet, I think would have to move it into it, but then it is not considered a container even if opened once before.
[13:23:35] <luteijn> I can move stuff from inside the closed chest into the bag that is also in there, but not out of the chest altogether (but drop works). considered out of range (even if standing next to it)
[13:24:46] <luteijn> hmm it also works on characters; their inventory is linked just like a container's inventory I guess.
[13:26:09] <luteijn> but only for characters in the party.
[13:27:16] <luteijn> correction it does work on outsiders, like LB..
[13:32:02] <SB-X> npc's are just special types of objects so they could be containers too
[13:36:42] <luteijn> but it does recognize there's soething special about them, as for a chest I see my own readied items, and for eg Lord B I see his readied items on the left side..
[13:51:00] <luteijn> ctrl-v / alt-22 lists the version; the game.exe I'm using claims to be 4.5
[14:05:28] <SB-X> Version 4.5
[14:05:35] <SB-X> Turbo-C - Copyright (c) 1988 Borland Intl.
[14:05:36] <SB-X> :)
[14:05:49] <SB-X> (in game.exe's strings)
[18:04:36] <-- SB-X has left IRC (Remote closed the connection)
[18:46:04] --> harbingerkun has joined #nuvie
[19:21:03] --- harbingerkun is now known as harb[busy]
[22:00:03] --- harb[busy] is now known as harb[away]
[22:16:01] --> SB-X has joined #nuvie
[23:38:39] --> servus_ has joined #nuvie
[23:56:43] <-- servus_ has left IRC (Read error: 110 (Connection timed out))
[23:57:12] --> servus_ has joined #nuvie
[23:57:38] <-- servus has left IRC (Read error: 110 (Connection timed out))