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:

ACR Resting system

Post by AcadiusLost »

Cipher had mentioned this as another system that should be good to package with the early release, but on a brief glance at least, it still seemed to need access to the Campaign Variables for persistency. I didn't try to test or install it, nor have I had a chance to examine it in any great detail: is there some functionality we could get out of it in the near term (without the persistency), or is it better added to the pile of systems that are waiting on Obsidian's script fixes?
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 »

The rest system doesn't depend on Campaign variables. It stores its data on a "creature skin" that travels with the PC, the point of which is to preserve the data independently of the server. It'll need to be retrofitted to function with NWNx at some point so a minimal retest may be necessary, but I expect this to be completely transparent, meaning it'll be more a [re]test of persistence than of resting.
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 »

That's good to hear. Looks like a number of resting/praying/studying files are in the /scripts/coresystems/rules area of the sourceforge Repository- could you let me know which ones should be bundled up?

Also, do we need to toolset and .erf standard items to associate with these? (holy symbols, spellbooks, bedrolls, etc).
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 »

Great point. Yes, we do need to create those items.

Namely: Tent, Bedroll, Campfire, Herbs, Medicines, Holy Symbols, and Spell Books. Herbs/Medicines pending standards review, but are non essential. Holy Symbols and Spell Books are going to be required for relearning spells. Tents, Bedrolls, and Campfires are non essential as well, but we can add them in if we want to add a bit more flavor.
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 »

Ok this is a preliminary list.

Required HAK files:

acr_pps_i
acr_resting_i
acr_spelltrack_i
acr_praying (this is an item script, but it needs to be renamed to match our item naming standards)
acr_studying (this is an item script, and same as above)

Required ERF files:

acf_mod_onplayerrest
acf_mod_oncliententer
acf_mod_onclientleave

We'll also need to bundle in a lot of base scripts for things to compile, but that can be derived from the "includes" section.
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 »

Was doing some more work integrating this last night, had an unusual observation.

It seems that tag-based scripts aren't firing when they are hak'd, only when a copy exists local to the module. Has anyone else seen this behaviour? Seems like includes and bueprints work fine from the haks, but scripts being called by ExecuteScript() are failing if their targets are in the haks, rather than in the mod itself.

Could it be we need to use some alternative method to hak the associated ncs files? I don't think this was a problem in NWN1, though it may have been. I'd hope we wouldn't have to clutter up the pallete of every module with all the abr_it scripts.
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 »

The lexicon seems to imply that very behavior. Rats. Does it run if you stick it in a .zip and put that in your override folder?
User avatar
Rusty
Retired
Posts: 2847
Joined: Mon Feb 21, 2005 10:36 pm
Location: London
Contact:

Post by Rusty »

Is there any chance later patches will fix this?
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 »

Probably a slim chance if it's requested. Seeing as it apparently works the same way NWN1 did, I suspect it wouldn't be a priority. There may well be some technical reason behind the implementation and why it has to work the way it does.

Bugger. We may have to rethink our approach (individual script vs global script) or just contend with having to distribute item scripts.
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 »

Did manage to get a script to fire from inside the Scripts.zip in the main install directory /Data (not the My Documents one, though). However, having an extra .ncs in there keeps it from updating/patching, so we'd have to manually swap the Scripts.zip before patching each time.

Not sure if it's worth the bother or not, just wanted to pass on my analysis.
User avatar
Mayhem
Otyugh
Posts: 906
Joined: Wed Aug 10, 2005 10:45 pm
Location: Norfolk

Post by Mayhem »

Completely wacky idea off the top of my head, so feel free to shoot it down.

Vis - rest in wilderness areas.

Incorporate a survival check in some fashion. Include a bonus to the check for campfires and tents.

Folk that don't know the wilderness and havn't come prepared will suffer an uncomfortable night.
*** ANON: has joined #channel
ANON: Mod you have to be one of the dumbest f**ks ive ever met
MOD: hows that ?
ANON: read what I said
ANON: You feel you can ban someone on a whim
MOD: i can, watch this
ANON: its so stupid how much power you think you have
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 »

System already has checks for bedrolls and tents, I'll check on the survival thing, though IIRC that has more to do with finding food & water in PnP.
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 »

AcadiusLost wrote:Did manage to get a script to fire from inside the Scripts.zip in the main install directory /Data (not the My Documents one, though). However, having an extra .ncs in there keeps it from updating/patching, so we'd have to manually swap the Scripts.zip before patching each time.

Not sure if it's worth the bother or not, just wanted to pass on my analysis.
Thanks AL. At least the mechanism exists to invoke scripts beyond the bounds of the module. So, maybe extending the implementation to include HAKs wouldn't be hard.
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 »

Been doing a bit of patching and testing with this system, worked out a few things that were going strangely (needs character skin items in the pallete, etc)- ran into another thing I wanted to ask about:

The Holy Symbol and Spellbook - triggered spell refreshes: since they are actually mediated by a ForceRest() call, it means a Cleric/Wizard will refresh all spells (divine included) by studying their spellbook, /or/ praying with their holy symbol. Likewise, a sorc/wizard gets their full complement of both spells back after studying.

Is this what we're going with for now? I'm not sure how we can manage the spell slots by type offhand- and I suppose this behavior is still more IC than everyone getting their spells when they "rest".

[edit: also, the "study/meditate" looping animation only lasts a few seconds despite the HoursToSeconds() call for it, and doesn't have any enforcement for if the player cancels out of it, meaning players can flash-study or flash-pray to get their spells back, once per day. Again- not sure what we could do about this, but as an observation, I figured I should ask.]
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 »

AcadiusLost wrote:The Holy Symbol and Spellbook - triggered spell refreshes: since they are actually mediated by a ForceRest() call, it means a Cleric/Wizard will refresh all spells (divine included) by studying their spellbook, /or/ praying with their holy symbol. Likewise, a sorc/wizard gets their full complement of both spells back after studying.
There is a caster class check on those scripts which should prevent clerics from using spellbooks and wizards/sorcerers from using holy symbols. Is it not working?
Is this what we're going with for now? I'm not sure how we can manage the spell slots by type offhand- and I suppose this behavior is still more IC than everyone getting their spells when they "rest".
You mean are we going with "study/pray for spells" vs "rest for spells"? Yes, unless it doesn't function or ALFA as a whole desires otherwise.
also, the "study/meditate" looping animation only lasts a few seconds despite the HoursToSeconds() call for it, and doesn't have any enforcement for if the player cancels out of it, meaning players can flash-study or flash-pray to get their spells back, once per day. Again- not sure what we could do about this, but as an observation, I figured I should ask.
Perhaps the timers are glitchy in NWN2 or something else is missing/not configured right (I think you may need an updated NWscript.nss)? The "click to cancel" behavior is perfectly legitimate but that also cancels the prayer/studying process, which means no flash studying/praying. At least in my NWN1 testing, it was handled properly. NWN2 may have introduced a few new wrinkles however.
Locked