ACR Resting system

Scripted ALFA systems & related tech discussions (ACR)

Moderators: ALFA Administrators, Staff - Technical

User avatar
AcadiusLost
Chosen of Forumamus, God of Forums
Posts: 5061
Joined: Tue Oct 19, 2004 8:38 am
Location: Montara, CA [GMT -8]
Contact:

Post by AcadiusLost »

One recurring bug/quirk with this system: a module reset advances the "time since last rest" by about 24 hours- not sure why. Shouldn't be a big problem if mod stability is decent.

Ideas?
User avatar
ç i p h é r
Retired
Posts: 2904
Joined: Fri Oct 21, 2005 4:12 pm
Location: US Central (GMT - 6)

Post by ç i p h é r »

Does it have anything to do with the code you added to save module time?
User avatar
AcadiusLost
Chosen of Forumamus, God of Forums
Posts: 5061
Joined: Tue Oct 19, 2004 8:38 am
Location: Montara, CA [GMT -8]
Contact:

Post by AcadiusLost »

I suspect it has to do with conflicts between the persistent time code, and the settings for module time in the module properties, but I never found the smoking gun, so to speak. It's a minor issue, unless a module is going to be crashing often (in which case it'll be refreshing PCs' spells every time).
User avatar
ç i p h é r
Retired
Posts: 2904
Joined: Fri Oct 21, 2005 4:12 pm
Location: US Central (GMT - 6)

Post by ç i p h é r »

Minor, but we'll need to figure out the root cause at some point. Do you use the bug tracker on sourceforge.net? If so, please note the details of your discovery there so we can fix it - eventually.

Thanks.
User avatar
Wynna
Dungeon Master
Posts: 5734
Joined: Sat Jan 03, 2004 10:09 am
Location: Seattle, WA (PST)

Post by Wynna »

I want to designate dorm rooms as interior sleeping areas. I already have a trigger covering the entire dorm room for other script functions. I tried copying the resting flags from Cipher's example resting trigger into my current interior dorm room trigger but I didn't get resting functions working ingame that way. Do I need to use a specific tag on a trigger to designate it a resting trigger? Or will only the example interior resting trigger work?

Also, what's the final outcome on studying for spells? Can one only study in a resting trigger? Does studying take 1 ingame hour or something less? Can one study without resting or vice-versa?

Thanks for the answers!
Enjoy the game
User avatar
AcadiusLost
Chosen of Forumamus, God of Forums
Posts: 5061
Joined: Tue Oct 19, 2004 8:38 am
Location: Montara, CA [GMT -8]
Contact:

Post by AcadiusLost »

Resting triggers should be in the trigger blueprints under RestZone, there should be both interior and exterior ones. You'll want interior ones.

Studying for spells can be done anywhere, and should take about a minute and a half RL time. You must have rested at some point before studying, you cannot study for spells a second time until you have rested. Resting should not affect your available spells (any expended will still be missing after the rest), the completion of the studying cycle refreshes spell memory (for Wizards). Resting must be done inside rest zones, and cannot be done more than once per 24 IG hours (2.8 RL hours) - also, if you are logged out for more than one full IG day (2.8 RL hours), the ACR should adjust you to have full rest and spells back again, as if your character had rested in the meantime.

Don't have the exact blueprint locations for the rest triggers handy, but can confirm them tonight.

Also, the +24h advance mentioned in prior posts was fixed a while back.
User avatar
Wynna
Dungeon Master
Posts: 5734
Joined: Sat Jan 03, 2004 10:09 am
Location: Seattle, WA (PST)

Post by Wynna »

Thanks, AL. One thing I wasn't clear on is that I already have a trigger covering the area I want to designate a rest area. Can I just copy in the rest flags to my existing trigger and combine its current functions with a rest function?
Enjoy the game
User avatar
AcadiusLost
Chosen of Forumamus, God of Forums
Posts: 5061
Joined: Tue Oct 19, 2004 8:38 am
Location: Montara, CA [GMT -8]
Contact:

Post by AcadiusLost »

So long as your trigger event properties incorporate calls to the appropriate ACR functions:

ACR_TriggerOnEnter(); (in the OnEnter script)

ACR_TriggerOnHeartbeat(); (in the OnHeartbeat script)

ACR_TriggerOnExit(); (in the OnExit script)

etc.


And has the following variables set:

ACR_REST_ZONE = 1 (integer)
ACR_REST_BONUS = 0 (integer)
ACR_REST_DISEASE = 0 (integer)
ACR_REST_DISEASE_CHANCE = 0 (integer)

Technically, the first of those is the important one, since the others should be read as 0 by default.
User avatar
ç i p h é r
Retired
Posts: 2904
Joined: Fri Oct 21, 2005 4:12 pm
Location: US Central (GMT - 6)

Post by ç i p h é r »

If you copy the rest flags AND have the acf_trg_* script hooks assigned to the trigger, yes, it'll work in tandem with whatever else you have going on. If you're coding custom behaviors, just invoke your custom scripts from the respective acf_trg_* file and you'll be good to go.
User avatar
AcadiusLost
Chosen of Forumamus, God of Forums
Posts: 5061
Joined: Tue Oct 19, 2004 8:38 am
Location: Montara, CA [GMT -8]
Contact:

Post by AcadiusLost »

ç i p h é r wrote: just invoke your custom scripts from the respective acf_trg_* file and you'll be good to go.
However, remember as well that the acf_trg_* scripts are potentially called by every trigger in the module- so if you edit them directly to add an ExecuteScript() call for your custom script, you'll want to make that line conditional on something (like a special tag for those triggers).

for example:

Code: Select all

if (GetTag(OBJECT_SELF) == "slv_dorm_trigger") 
{
   ExecuteScript("slv_trg_dormonenter", OBJECT_SELF);
}
That way all your seamless ATs and other custom triggers won't be inadvertantly calling the script as well (unless they happen to have that tag).
Locked