Page 1 of 1
Schedule Locations
Posted: Sat May 01, 2004 10:05 am
by Wizardry Dragon
Just moseying along with my own little project, and I came to an impasse.
I want to have the sleeping quarters at the top of a tower (you wouldn't sleep on the bottom floor of a fortified position, would you?) but I cannot find a way to get the NPCs to know that it's on the third floor that they go to sleep at night.
I don't know how much of a problem it would be to add something like that in, so that a NPC may have a Z coordinate attached to their schedule, but it would be much appreciated by the U7 modders out there and I
- Wizardry Dragon
Re: Schedule Locations
Posted: Sat May 01, 2004 11:34 am
by Iceshard-
I know NOTHING about codeing, here, but... Would it be possible to have a set path they follow, (When it is 'bedtime' they go to the nearest of a number of coordinates) which involves going down some stairs or through a teleporter or something? That way, they go down the stairs as waypoints dictate, and then scripts say they sleep in X bed. Just a thought...
Re: Schedule Locations
Posted: Sat May 01, 2004 11:55 am
by Dominus
that the z-coordinate cannot be set is a known problem and probably something to change post V1.2
Re: Schedule Locations
Posted: Sat May 01, 2004 12:02 pm
by Wizardry Dragon
Well, looks like half of my project will have to wait until post 1.2 then.
:-/
- Wizardry Dragon
Re: Schedule Locations
Posted: Sat May 01, 2004 4:03 pm
by MV
Then how do they do that tower south of fawn in SI then?
They have their sleeping quarters on the 2nd floor.
Re: Schedule Locations
Posted: Sat May 01, 2004 4:03 pm
by Wizardry Dragon
That's what I've been left wondering.
- Wizardry Dragon
Re: Schedule Locations
Posted: Sat May 01, 2004 4:05 pm
by MV
Opps, no wait, never mind. I just remembered they don't break routine to go off and sleep as there is always some sleeping, and there is always some guarding outside, they don't "swap" shifts. Doh.
Re: Schedule Locations
Posted: Sat May 01, 2004 4:46 pm
by Wizardry Dragon
Hmm. I suppose the work-around is to create a nocturnal egg which creates an NPC lookalike with the sleep schedule, but we'd have to get rid of the actual NPC.
That'll do for now, but being able to set the Z attribute would be much more efficient and straight-forward.
- Wizardry Dragon
Re: Schedule Locations
Posted: Sat May 01, 2004 10:19 pm
by drcode
I think that's on the list of things we want to add to the new savegame format, since the original U7 has no spot for it.
Another example is the NPC that runs the List Field in SI, who had to be created by an egg.
Re: Schedule Locations
Posted: Sun May 02, 2004 7:00 am
by Wizardry Dragon
Well, it would be much appreciated
- Wizardry Dragon
Re: Schedule Locations
Posted: Mon May 03, 2004 4:38 am
by artaxerxes
IIRC, the guards' usecode says for this particular location you mention:
if(schedule_says_it_is_time_to_go_to_sleep)
find_the_nearest_bed_and_use_it
instead of the most expected version:
if(schedule_says_it_is_time_to_go_to_sleep)
use_item(at_location(X,Y,Z))
Artaxerxes
Re: Schedule Locations
Posted: Mon May 03, 2004 10:43 am
by Wizardry Dragon
I'm guessing the function isn't "find the nearest bed and use it", so what would that be?
I can get the conditional fine, just not the finding the bed thing. If I could set the bed to be around a specific location, this would be a way of hardcoding the schedule in.
Something like
if (UI_get_item_schedule(item) == c_sked_sleeping)
{
// finding and using code here
}