ACR Quest System

Scripted ALFA systems & related tech discussions (ACR)

Moderators: ALFA Administrators, Staff - Technical

User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

That's beautiful cipher.

If you write one conversation template, I'll write the rest. I just want to compare mine with yours so I don't make any mistakes. I'll send them to you when they're done.
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, will do. Thanks Indio.
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 »

The documentation you've linked doesn't really match the scripts that have been committed, am I missing something?
ALFA Tech Wiki wrote:The following generic scripts are available for use in setting up the conditions for any of your conversation nodes:

acr_cs_abcheck
This conversation script performs an ability check at a specific node. It consists of two arguments (parameters): nAbility and nDC. nAbility is an integer, which corresponds to the values defined in nwscript.nss for each ability score (Strength = 0, Dexterity = 1, Constitution = 2, Intelligence = 3, Wisdom = 4, Charisma = 5). nDC is an integer, which corresponds to the Difficulty Class of the ability check, and can range from very easy (0) to nearly impossible (40).

acr_cs_atcheck
This conversation script performs an attribute check at a specific node. It consists of three arguments (parameters): nAbility, nValue, bBaseScore. nAbility is an integer, which corresponds to the values defined in nwscript.nss for each ability score (same as above). nValue is an integer, which corresponds to the attribute score against which the attribute check is made. bBaseScore is a boolean (0 or 1) that is used to restrict checks to the character's base attribute score (ie does not apply ability modifiers from items, spells, or anything else).

acr_cs_gpcheck
This conversation script performs a currency check at a specific node. It consists of two arguments (parameters): nDenomination and nValue. nDenomination is an integer, which corresponds to the type of currency to evaluate based on its multiple (Copper = 1, Silver = 10, Gold = 100, Platinum = 1000). Presently, only gold is available as currency in-game. nValue is an integer, which corresponds to the amount of currency against which the check is made.

acr_cs_skcheck
This conversation script performs a skill check at a specific node. It consists of two arguments (parameters): nSkill and nDC. nSkill is an integer, which corresponds to the values defined in nwscript.nss for each skill?. nDC is an integer, which corresponds to the Difficulty Class of the skill check, and can range from very easy (0) to nearly impossible (40).

acr_cs_svcheck
This conversation script performs a saving throw at a specific node. It consists of two arguments (parameters): nSaveType and nDC. nSaveType is an integer, which corresponds to the values defined in nwscript.nss for each saving throw (Fortitude Save = 1, Reflex Save = 2, Will Save = 3). nDC is an integer, which corresponds to the Difficulty Class of the ability check, and can range from very easy (0) to nearly impossible (40).

Additional scripts may be defined in the future, as needed. If you have any requests, please submit them to the Technical Team via the forums or PM, or if you are a capable scripter, feel free to submit your work to the Tech Team for inclusion in the ACR.
But the sourceforge instead has these scripts:
sourceforge wrote:acr_quest_errand.nss 428 5 weeks alfa-admin Added support for item bounties, errands, escorting and rewards.
acr_quest_escort.nss 428 5 weeks alfa-admin Added support for item bounties, errands, escorting and rewards.
acr_quest_i.nss 428 5 weeks alfa-admin Added support for item bounties, errands, escorting and rewards.
acr_quest_progress.nss 428 5 weeks alfa-admin Added support for item bounties, errands, escorting and rewards.
acr_quest_reward.nss 428 5 weeks alfa-admin Added support for item bounties, errands, escorting and rewards.
acr_quest_update.nss 428 5 weeks alfa-admin Added support for item bounties, errands, escorting and rewards.
The latter were bundled into the alfa_acr.hak, and have some support for scripted quests, but seem incomplete. The former list may be ones you didn't commit, or maybe outdated ones? Maybe I'm overlooking something here.
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 »

Those are just generic scripts for use with conversations. It's the stuff above that which relates to quests. I'll commit the has_item script to the repository (it's trivial) but AFAIK, that's the only issue that has been reported thus far, though it doesn't actually impede the quest itself.

Edit: Added a wiki entry for the has_item script as well.
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 »

BTW Indio, where would you like me to send the sample conversation?
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

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 hadn't spotted those conversation scripts in the Sourceforge repository before, thanks for drawing them to my attention. Should they be included in the alfa_acr.hak, or imported into the module? My inclination is that they are meant for the ACR hak, since they have the acr prefix, so I'll pack them in with the next update, probably this weekend.

Noticed the commits last night, will test them out with an example quest this weekend if I can.
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

Couple of things I can't work out.

- Can't find an OnEnter script to put in a trigger to use ACR_QST_SPAWN_CRESREF, or which function to use to dfeine a scouting location
- Not sure about what script to put in the spawned creature's OnDeath

Conversation-based quests make sense with the scripts provided, as do item quests. But I could use a hand with bounty quests...a working example rather than explanation would be much more useful. I'll do the documentation.
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 »

You should be able to just get away with leaving the acf_trg_* scripts on the trigger, so long as it has the proper local variables defined. Cipher put the hooks in for Quests to the acr_trigger_i file, so they're automatically performed by the ACR_TriggerOnEnter() function.
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

I spent a few hours on this today, but I'm going around in circles and I don't want to waste too much time doing what may very well already be done.

I'm having no luck testing locally as my database table isn't configured with the quests data, and testing remotely won't do me any good unless I can see what's going wrong.

Sorry I can't do much to help on this. Would like to.
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 »

The quests table should be generated automatically by the ACR, I believe... are you getting errors logged in your xp_mysql.txt in /NWNx4/ ?

If you're worried your DB might be the problem, I can hook you up with OAS2 DB access to test against.
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

Not sure what I'm doing wrong then.

I'l wait for cipher's conversation template and try again.
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 email sent, Indio. Please read the text on each node. I've tried to explain things in there but I've no doubt I'll need to do more explaining. If you have any questions whatsoever, please let me know. I can also get on IRC and go over this with you if need be.

In a nutshell, you need to setup:

a quest journal with unique quest names and appropriate XP rewards
a quest conversation with appropriately configured conditions and actions
a quest trigger with appropriately configured local variables (see wiki)
and item/creature blueprints, as needed.

FYI. The acr_quest_update script has 6 parameters atm (you will have to expand your columns to see them all), but I'd like to trim that down to what we really need, hopefully 2 or 3 at the most. Once we've got you creating quests, I'm hoping that you can tell me what we can cut out of the system and what we need to shore up. I'm relying on your experience to help me tweak the system.

Much obliged for your help - as always - and apologies for holding up the show.
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

Got it.

Many thanks mate. :hail: Saved my bacon.
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

For BOUNTY quests, place a quest trigger where you wish to spawn the creature and define the creature blueprint ResRef to spawn.

For ITEM quests, place a quest trigger where you wish to spawn the item and define the item blueprint ResRef to spawn.
If you see this in passing cipher, does the waypoint function get used here? I assume the trigger is where the spawn is initiated when entered, but its at the waypoint where the creature actually spawns. I'll be testing it anyway, but just to make sure.
Locked