#nuvie@irc.freenode.net logs for 15 Aug 2006 (GMT)

Archive Today Yesterday Tomorrow
Nuvie homepage

[02:13:57] --- servus__ is now known as servus
[03:29:11] <-- exultbot has left IRC (ping timeout: 15 minutes)
[03:55:45] --> exultbot has joined #nuvie
[03:55:45] --- Topic for #nuvie is: Nuvie - New Ultima VI Engine (http://nuvie.sf.net)
[03:55:45] --- Topic for #nuvie set by ChanServ at Sun Jun 25 04:12:02 2006
[05:13:33] --- sbx|afk is now known as SB-X
[07:27:55] <-- servus has left IRC (Read error: 104 (Connection reset by peer))
[07:30:08] --> servus has joined #nuvie
[11:29:59] --> Yuv422 has joined #nuvie
[11:31:19] --> Yuv422_ has joined #nuvie
[11:31:19] <-- Yuv422 has left IRC (Read error: 104 (Connection reset by peer))
[11:34:33] <SB-X> hey yuv
[11:34:44] <SB-X> hows it going?
[11:35:03] <luteijn> hopefully 'it' is going better than your irc connection ;)
[11:35:30] <SB-X> hey pieter
[11:35:31] <SB-X> hows it going?
[11:35:34] <luteijn> btw, I got 'get' to get items into containers, although I need to test it a little bit more.
[11:36:19] <SB-X> get isnt supposed to get items from containers
[11:36:38] <luteijn> no not from, but into.
[11:36:47] <SB-X> what?
[11:36:49] <SB-X> get into container?
[11:36:52] <SB-X> oh I see
[11:37:02] <SB-X> if you are viewing a container when you get an object
[11:37:07] <SB-X> with inventoryview
[11:37:10] <luteijn> yes.
[11:37:13] <SB-X> good show
[11:38:02] <luteijn> also fixed the 'feature' where you could get any container whose own weight was within your capacity.
[11:38:29] <luteijn> although we might want to keep that for compatibility with the original..
[11:39:11] <-- Yuv422_ has left IRC ()
[11:41:15] <SB-X> we havnt been fixing any exploits in u6 yet
[11:41:35] <SB-X> or removing cheats
[11:42:39] <luteijn> well it probably needs a configuration item to choose 'compatible' or 'bug-fixed'..
[11:44:14] <luteijn> but it's obvious why it is bugged. it needs to check the weight of the container itself to see if it happens to be 0 or 255, and then needs to calculate the total weight including items inside to see if you can carry it. It was only doing the first part.
[11:45:00] <SB-X> hmm
[11:45:20] <SB-X> does it check the total weight you're carrying?
[11:47:06] <luteijn> yes, but it called 'actor->can_carry_weight(weight)' with weight set to obj_manager->get_obj_weight(obj,OBJ_WEIGHT_EXCLUDE_CONTAINER_ITEMS,OBJ_WEIGHT_DO_SCALE).
[11:47:44] <SB-X> and that's what u6 did too?
[11:49:42] <luteijn> not sure what the exact bug was.. Either something like this (allowance 5 stones, move balloon in bag, get bag) or (allowance 5 stones, open empty bag, allowance now 35 stones, get balloon)
[11:49:57] <SB-X> what does scale mean?
[11:50:13] <luteijn> weight /= 10
[11:50:26] <SB-X> ah k
[11:50:50] <SB-X> object weights are all 10*stones
[11:51:34] <SB-X> if we had OBJ_WEIGHT_EXCLUDE_CONTAINER_ITEMS doesn't that indicate we were duplicating the bug on purpose?
[11:51:51] <luteijn> I think the otherway around, i.e. given in tenths of a stone (except for gold, reagents andhopefully nothing else, which are given in 100ths of a stone).
[11:51:53] <SB-X> i don't remember writing it maybe eric did
[11:52:24] <luteijn> no because first it does need the weight of the object itself for the weight == 0 or 255 check
[11:52:49] <SB-X> oh ok, so you get the weight twice?
[11:53:23] <luteijn> yes, first to do the check if the item is gettable at all, then to check if the person trying to pick it up has the allowance.
[11:54:02] <SB-X> cool
[11:54:03] <SB-X> ok
[11:54:16] <SB-X> you could also just get the weight again if object is a container
[11:54:22] <SB-X> if obj->container is not 0
[11:56:12] <SB-X> I was saying the same thing about obj weight as you. An object with weight 1 is 0.1 stones. (weight=10*0.1stones)
[11:56:32] <SB-X> the way you said it was easier to understand
[11:56:46] <SB-X> more precise I guess :)
[11:56:49] <luteijn> I think it would be less clear to read to do the if at this level.
[11:57:55] <SB-X> to do what?
[11:58:46] <SB-X> i didnt know about gold and reagents being 100ths of a stone
[11:58:50] <luteijn> your if (is_container(obj)) { /*recalculate weight*/ }
[11:59:18] <luteijn> I just recalculate the weight always, as if it's not a container, it's not that much work anyway ;)
[11:59:31] <SB-X> i see
[11:59:36] <SB-X> why isnt that clear to read?
[12:00:30] <SB-X> but you're right it's not much more work
[12:00:56] <SB-X> i wasnt thinking about the fact that the if(container){ } block would have to be in the weight function :)
[12:02:21] <luteijn> there's something here about GET usecode not being able to add to containers, I'll have a look if that can be fixed.
[12:02:38] <SB-X> where?
[12:02:43] <SB-X> sounds familiar
[12:04:07] <luteijn> start of the function: // perform GET usecode (can't add to container)
[12:04:10] <luteijn> if(usecode->has_getcode(obj) && (usecode->get_obj(obj, actor) == false))
[12:04:38] <-- Kirben has left IRC (Read error: 110 (Connection timed out))
[12:04:46] <SB-X> im trying to remember why i added that
[12:04:52] <luteijn> maybe they mean it can't add to container becasue the container isn't passed, but maybe usecode can just get it from the inventorywidget if needed.. but won't know until I check ;)
[12:05:14] <SB-X> that's probably correct
[12:05:23] <SB-X> we didnt want usecode to know about inventorywidget
[12:05:41] <SB-X> im not sure why it cant have access to inventoryview though
[12:05:55] <SB-X> could you make it so inventoryview has the current container?
[12:06:03] <SB-X> and inventorywidget uses that
[12:06:24] <SB-X> (or inventoryview could set it on inventorywidget)
[12:06:56] <luteijn> at the moment I'm using this in the get code:
[12:07:38] <luteijn> bool got_object = get(obj, view_manager->get_inventory_view()->get_inventory_widget()->get_container(), player->get_actor());
[12:08:06] <SB-X> ah, so you pass the container in event
[12:08:18] <SB-X> i'd rather it get passed to usecode somehow
[12:08:31] <luteijn> I added the get_container() member to the inventory_widget, the other get_..() memebers already existed, and get already had a container argument, it was just always set to NULL before.
[12:08:35] <SB-X> so you only have one source for the container
[12:08:49] <SB-X> ah k, that's fine
[12:08:59] <SB-X> probably what we intended to do eventually
[12:09:44] <luteijn> for the usecode I hope to jsut do the same, so not pass it from event, but have it get it itself from the inventory_widget (via the invetory_view, via the view_manager)
[12:10:07] <SB-X> why?
[12:10:11] <SB-X> you already got it
[12:10:48] <SB-X> it would be simple to pass, if not exactly obvious
[12:11:04] <luteijn> no, the bool got_object is at the bottom of Event::get(..)
[12:11:47] <luteijn> so when it calls the usecode, I haven't done that yet. and maybe the usecode wants to change the container..?
[12:12:05] <SB-X> does the final "get()" actually remove the obj?
[12:13:36] <SB-X> from the world
[12:13:57] <luteijn> hmm let me check if I'm not confusing things ;)
[12:14:10] <SB-X> just put an Obj *container_obj = view_manager->get_inventory_view()->get_inventory_widget()->get_container(); at the top of the proc
[12:14:21] <SB-X> then you can use it twice
[12:14:47] <luteijn> there's a get(rel_x,rel_y), that's doing the get_contianer.. so I DO have the contaier when calling the get(obj,container,actor).
[12:15:02] <luteijn> so I can pass it to the usecode get function.
[12:15:13] <SB-X> you wouldnt necessarily call get(rel_x,rel_y) though
[12:15:44] <SB-X> i started arranging the event actions so there are several ways to call them, but only got around to doing it for a few of the functions
[12:15:59] <SB-X> there is a comment in Event.h
[12:16:12] <luteijn> true, but if you call get(obj,container,actor) then you have to pass a container (or NULL), so we can pass that to UseCode.
[12:16:37] <SB-X> right
[12:16:47] <SB-X> where was your got_obj ?
[12:17:05] --> Yuv422 has joined #nuvie
[12:17:46] <SB-X> i assumed you were editing get(rel_x,rel_y)
[12:17:54] <luteijn> in get(x,y) which calls get(obj,c_obj,act)
[12:18:33] <luteijn> get(obj,c_obj,act) already had a lot of the container adding stuff, just wasn't passed the container info (which probably wasn't ready when it was made)
[12:19:03] <SB-X> great
[12:19:04] <luteijn> I had to fix get(obj,c_obj,act) to do proper weight checking though.
[12:19:28] <SB-X> where were you going to add the get_container then?
[12:19:30] <SB-X> if it's already there
[12:19:59] <luteijn> get_container wasn't in the inventory_widget yet. only set_container.
[12:20:11] <SB-X> i mean the bool got_obj = ...
[12:20:33] <luteijn> that was already there, but called get(obj,NULL,actor)
[12:21:14] <SB-X> "<luteijn> there's a get(rel_x,rel_y), that's doing the get_contianer.." <- that sounds like you just discovered it
[12:21:26] <SB-X> sorry I'm probably just confused
[12:21:30] <luteijn> so I added that long string of get_this()->get_that()->get_thing()->get_container()
[12:21:55] <luteijn> that quoted line was a not very clear..
[12:22:21] <luteijn> maybe the , should have been a ; or .
[12:22:54] <SB-X> ah
[12:22:56] <SB-X> heh
[12:23:00] <SB-X> thanks for the clarification
[12:23:05] <SB-X> i understand what you mean now
[12:23:09] <luteijn> before I had said I did the long string of gets at the bottom of the get(obj,c_obj,actr) function, but that was wrong and the quoted statement tried to correct that ;)
[12:23:21] <SB-X> yeah
[12:23:26] <SB-X> np
[12:23:31] <luteijn> it will be clear enough when you read the diffs eventually ;)
[12:23:49] <SB-X> anyway... usecode->get_obj(obj, actor, container_obj) ?
[12:24:21] <SB-X> of course, you can set the container obj before the call
[12:24:43] <SB-X> usecode->set_obj2(container_obj), usecode->get_obj(obj, actor)
[12:24:45] <SB-X> something like that
[12:25:19] <SB-X> you have to add those functions btw
[12:26:25] <luteijn> I can probably add the , Obj * container to get_obj(). But not right now as have to do some 'real' work first ;)
[12:27:31] <SB-X> the extra argument? ok
[12:27:32] <SB-X> np
[12:28:07] <luteijn> mabye with a default =NULL (although that's dangerous ;) )
[12:29:15] <SB-X> i know
[12:29:25] <SB-X> probably no reason for the default arg since we dont use the function much
[12:29:46] <luteijn> probably it's not used in manyplaces so can just fix the few instances that the compiler will flag ;)
[12:29:53] <SB-X> i want to send any gets through event
[12:30:36] <SB-X> through that final get() function, so there's no code duplication
[12:30:55] <SB-X> so we shouldn't be calling get usecode anywhere else
[12:33:59] <-- Yuv422 has left IRC (Read error: 110 (Connection timed out))
[12:35:35] --> Yuv422 has joined #nuvie
[12:49:10] <SB-X> eric
[12:52:28] <SB-X> Yuv422
[13:04:25] <Yuv422> hey SB-X
[13:04:34] <Yuv422> how's it going?
[13:10:20] * Yuv422 looks at the logs
[13:11:42] <SB-X> it's going better than your irc connection!
[13:11:49] <SB-X> er, i mean, fine
[13:12:00] <SB-X> how about you?
[13:12:01] <Yuv422> it's a shocker
[13:12:07] <Yuv422> my irc connection that is
[13:12:12] <Yuv422> I'm good. :-)
[13:12:42] <Yuv422> reading half of the chat conversation from the logs is annoying as you can imagine
[13:13:41] <SB-X> read the entire conversation then :)
[13:13:46] <SB-X> from the logs
[13:28:59] <Yuv422> is there any data in the tileflag file to account for the stackable snake venom weights
[13:35:38] <Yuv422> doesn't look like it
[13:36:37] <luteijn> not as far as I could see, atleast. I put a summary of my findings in the changelog.
[13:39:52] <Yuv422> I guess for the few exceptions they decided to hard code
[13:43:44] <luteijn> Still wondering what the 3 'mystery' tileflags are about..
[13:44:10] <Yuv422> I guess it will come out in the wash
[13:44:25] <Yuv422> can you group the tiles together in anyway
[13:44:32] <Yuv422> the tiles with those bits set?
[13:45:22] <luteijn> I did, yesterday, but it doesn't make much sense:
[13:45:47] <luteijn> one group seems to be non-fire-proof, or non-acid-proof objects.
[13:46:25] <luteijn> one group seems to be 'things that go underneath' or are otherwise low-profile.
[13:46:54] <Yuv422> so an aid to drawing
[13:47:36] <luteijn> it might be, I'll put the three groups in a table so maybe someone else can make something out of it.
[13:52:14] <luteijn> luteijn.xs4all.nl/~luteijn/flags/
[13:54:28] <Yuv422> hmm 0x10 looks interesting
[13:54:59] <Yuv422> I had a problem with a chair sitting behind a bench
[13:55:09] <Yuv422> because nuvie was selecting the shadow
[13:55:13] <Yuv422> not the chair
[13:55:18] <Yuv422> this info could be good
[13:55:39] <Yuv422> maybe it means skip this object when looking / getting etc
[13:55:54] <Yuv422> or some combination of actions
[13:56:03] <Yuv422> I'll have to do some research
[13:56:41] <Yuv422> the earth and floor objects are used to patch up the map
[13:57:03] <Yuv422> and I think we kludged it a bit when implementing them
[13:57:14] <Yuv422> I'll have to look at how we handled it
[13:58:01] <Yuv422> they were used to punch holes in map wall's if I recall correctly
[13:58:37] <Yuv422> 0x20 means place object on top
[13:58:39] <Yuv422> I think
[13:58:47] <Yuv422> or is that in another flag
[13:59:17] <luteijn> I'll cvs add the full table this is extracted from.. I think I got it from SB-X once.
[13:59:37] <Yuv422> I have that table too
[14:00:34] <luteijn> there's a 'toptile' flag already. might want to correlate it with 3:0x20 though.
[14:00:59] <Yuv422> toptile is for overhead tiles
[14:01:02] <Yuv422> IIRC
[14:01:07] <Yuv422> like the top of a pillar
[14:01:25] <Yuv422> place on top allows you to drop a candle stick on a table for example
[14:02:10] <Yuv422> the tiles are much easier to view on the blue background
[14:02:54] <luteijn> because that is _my_ generated file, contrasted with the buggy one from Rackne.. (check difference in lens-beams). mine is transarant too.
[14:03:44] <Yuv422> very nice
[14:03:47] <luteijn> there's a can place ontop flah, so yes the 0x20 could be the 'can have things placed on top'..
[14:04:10] <luteijn> needed it for my (now paused) u6o client homebrew.
[14:04:23] <Yuv422> :-)
[14:11:23] <Yuv422> time for bed
[14:11:25] <Yuv422> cya
[14:11:40] <-- Yuv422 has left IRC ()
[14:33:36] <SB-X> Well I was afk... you can take a look at the u6 editor screenshot or doc to see the abbreviations for the missing flags.
[19:16:12] <-- laxdragon has left IRC (Read error: 104 (Connection reset by peer))
[19:17:32] --> laxdragon has joined #nuvie
[20:04:52] --> servus_ has joined #nuvie
[20:06:36] <-- servus has left IRC (Read error: 110 (Connection timed out))
[22:10:55] --> Kirben has joined #nuvie
[22:16:34] --> Kirben_ has joined #nuvie
[22:16:46] <-- Kirben has left IRC (Read error: 104 (Connection reset by peer))