Schedule Locations

NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Locked
Wizardry Dragon
Posts: 1241
Joined: Thu May 14, 2020 1:34 pm

Schedule Locations

Post 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
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Iceshard-
Posts: 36
Joined: Thu May 14, 2020 1:34 pm

Re: Schedule Locations

Post 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...
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Schedule Locations

Post by Dominus »

that the z-coordinate cannot be set is a known problem and probably something to change post V1.2
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Wizardry Dragon
Posts: 1241
Joined: Thu May 14, 2020 1:34 pm

Re: Schedule Locations

Post by Wizardry Dragon »

Well, looks like half of my project will have to wait until post 1.2 then.

:-/

- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
MV

Re: Schedule Locations

Post by MV »

Then how do they do that tower south of fawn in SI then?

They have their sleeping quarters on the 2nd floor.
Wizardry Dragon
Posts: 1241
Joined: Thu May 14, 2020 1:34 pm

Re: Schedule Locations

Post by Wizardry Dragon »

That's what I've been left wondering.

- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
MV

Re: Schedule Locations

Post 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.
Wizardry Dragon
Posts: 1241
Joined: Thu May 14, 2020 1:34 pm

Re: Schedule Locations

Post 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
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: Schedule Locations

Post 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.
Wizardry Dragon
Posts: 1241
Joined: Thu May 14, 2020 1:34 pm

Re: Schedule Locations

Post by Wizardry Dragon »

Well, it would be much appreciated :-)

- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: Schedule Locations

Post 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
Wizardry Dragon
Posts: 1241
Joined: Thu May 14, 2020 1:34 pm

Re: Schedule Locations

Post 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
}
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Locked