Keeping quest items

Hi there,

A quick question: what is the best way to make sure a player cannot lose a quest item he has in his inventory? (I also want to prevent him from dropping a quest item by accident.)

Would you just set it „cursed“?

Or are there better ways to secure items in the inventory?

Thanks!

You can do things with tag based scripting or as in the NWN1 OC with the pool. But both solution requires them to be scripted.

2 Likes

@Blackwood - I just make them “cursed”. That takes care of most of it. I usually just do that You can also make them “plot”.

“Plot – whether or not an item is vital to the Plot of the game (such as a quest item). Prevents item from being destroyed or moved from the character’s inventory.” - Quote from somewhere…

Not sure if “plot” is better, but one thing I’ve noticed with plot items is that if you try to sell them they sell for 0 gold, which make them unsellable really, but I don’t think you can sell “cursed” a item either.

1 Like

@Shallina , @andgalf , thank you both for your swift replies!

@andgalf: setting the “plot”-flag doesn’t prevent the player from being able to drop or transfer an item. So it seems that setting the “cursed”-flag is the option of choice …

Hoewever, @Shallina, I was wondering how a handmade script could be of advantage over the “cursed”-solution?

If you are going to use cursed then you should make sure that only the main PC can get the item, otherwise you could have it in a companion’s inventory and remove the companion and lose the item that way. It has been a long time, but I think that could happen if you allow companions to converse (by default they cannot but it can be allowed as I do in the OC Makeover) and give the item in a conversation. I did also develop a a version of the NWN1 pool for NWN2. I think I have it in my Silverwand Sample campaign. As I recall it allowed duplicates but that wouldn’t matter if the item is unsellable and provides no benefits.

2 Likes

You make it so the character cannot drop the item until the plot related to it is resolved.

@Blackwood

Welcome to the community. :slight_smile:

This can be a bit more involved than first thought. As Kaldor has already pointed out, such items could be picked up by companions that the player may eventually have leave the party. Furthermore, it’s possible you may want to pass a “plot” item to another PC for some reason, or to an NPC, or even place into a container.

Personally, I do what Shallina mentioned, and script it so that items whose tags start with a certain phrase are checked via onacquire and unacquire events. That way, each such item can retain all other normal “properties” and can then only be transferred or dropped as you require (checked in your scripts).

Bear in mind that you would still need to check if a player drops a PC from the party (that may be carrying the item), and ensure it ends up on the Main PC. However, if you have set aside a basic tag style for such items, you can iterate through their items and pass it off when that PC is dropped.

If you want to avoid “item check” completely and don’t mind what may appear some odd logical flow, you can simply rely on variables (even just journal entries) to keep track of “items” the party may have had. As an example: The party require the “ogre head” item that you wish to check for quest completion. You could, in theory, just update the journal when they pick up the head and assume the head is always carried at that point onwards. That way, if they happen to lose the head, it won’t matter, as the journal is keeping track of the quest state. As I say, it may offend ones sense of logical flow, but it does help avoid that problem.

The hardest issue you would need to overcome is when you are tracking multiple items over multiple PCs, in an item collection type quest. Just imagine a quest where the PCs are collecting ten bottles, and the player has each PC pick one up. Do you allow a PC to pass one to another to keep the stack in one place? Do these items even stack? Then, also bear in mind if this is going to be a MP game. What happens when different players pick up multiple items of a multi item collection quest?

The bottom line is, you need to consider if your quest item is just a single item or not, and if not, is it stackable? Is this just for a SP or a MP campaign? How much do you want the item’s presence (or not) appear logical to the quest?

Possible Simplest Solution: Without knowing what you have fully in mind here (bar the direct question), the answer you may need may be something as simply as keeping the quest updated using just a story variable. Quest Update: “You stow the giant’s head in the party secret bag ready to return to the king.” ← that way, the player knows they have the item, and secondly, you don’t have to manage it any further.

1 Like

Kaldor_Silverwand ! That’s a name from the past, one of my original helpers, good to know you’re still kicking around !

2 Likes

I am not a builder, but as a player, I have seen plenty of conversation in mods that recognize whether someone in the group has an item even if its not the PC that has it in inventory. I don’t know the technical side so forgive me if this is stupid for a reason I can’t see, but isn’t it better to just set the value to zero and make it seem important in the description? And then have whatever trigger you need recognize if the item is held by anyone in the party?

I mean, if the goal is be subtle and not let on that an item is important until some critical plot point, you are already playing your hand by making it undroppable.

1 Like

@Quixal

The way you describe, the player can still drop the item somewhere, or place it in a container. Sometimes, some containers can destroy their contents. Furthermore, if in a MP game, the item may be unavailable if a player whose PC carries it does not turn up for a session.

Unfortunately, even if a hint of its importance is made, mistakes can be made. And if that is done, why not just tell the player their PC decided to hang onto it… and that is what is normally done to ensure that important plot item is always kept available for play so the game is not broken.

The bottom line is, plot items reveal their importance during play eventually no matter how we might try to keep it subtle. :wink:

It is normal to check for the item among whole party anyway, unless there are good reasons to not do.

1 Like

A general set of guidelines to use for quest items:

  1. Don’t use an item if you can avoid it. Instead, use a permanently undroppable and unequippable item which you give to every PC and store a variable on that undroppable item as a quest progress marker. Use a journal entry to remind the PC of their progress through the quest. The journal entry can be re-done on-enter to the module, if necessary.
  2. If you absolutely must use an item, try to make the quest item an unequippable item. Equippable items may be forcibly dropped if they are equipped and then the player attempts to switch to a different item but there is insufficent space for the unequipped item in the PC’s inventory. This happens even if the item is “cursed”.
  3. If you really have to use an equippable item, you will need to have an OnUnequipItem script which looks at what was dropped, and if it’s a quest item takes some kind of action which will allow the player to re-acquire the item. But DO NOT have the script attempt to force it back into the PC’s inventory as this could cause an endless loop if the PC’s inventory has insufficient space for the item. One potential way of handling the problem is, again, to put a variable onto a permanent undroppable item in the PC’s inventory and delete the dropped item from the game. The PC should then be able to go and recover the dropped item (it gets re-created) from a NPC.
1 Like

@Melkior_Wiseman

I would second that quest items should avoid being items that can be equipped. For while they could be made such, it would take more careful consideration to ensure their “safety” against being “lost”. :+1: On the other hand, using quest items that cannot be equipped is more manageable.

However, I see no reason why a quest item should be given to every PC, nor apply variables, as that seems a lot of extra work for no real gain. Why do this? Under what circumstances would this be necessary? The only real requirement is to help avoid that item being either “lost” permanently, or held onto by the party of PCs until they no longer need it. Note: There is a function that can check for a single item in a whole party.

If we agree that only items that cannot be equipped can be quest items, then a builder need only consider when such an item is unacquired. It will not cause an endless loop. The reason it won’t is because if handled correctly, a space for the dropped item is made available when it is dropped. In other words, it just re-occupies the same inventory space when made to be acquired again.

There is no need for as many variables handling as you suggest, as it can be handled by a single variable and/or tag check on an unacquired event. :slight_smile: (I have done it this way in my own campaign, and has worked OK to date.)

I did consider one other idea for handling such, and that was to have either a hidden or dedicated quest item container accessible by all players, which contained plot items carried by the party. I may still reconsider and employ this idea moving forward, as it has some further advantages over the system I currently use, especially when it come to MP game. However, the downside is that “quest items” become even more obvious … but maybe that is something both I (and players?) can live with? :thinking:

I first considered plot items among PCs and players back in 2009 (See first post I had on it below). I hasten to add, the system has undergone many changes since this time, and now relies more heavily on an item’s tag and any conditions relating to plot events.

The idea behind giving every player a single, unequippable and undroppable “quest item” is that this item can be used to hold variables for multiple quests and purposes. It doesn’t even have to be called a quest item. In some multi-player modules, every player is automatically given a “rule book” on first entry. That book can hold the variables for every quest which the player has taken, but any undroppable and unequippable item can be used to hold variables which track quest progress.
Instead of having an item for every quest, you just have a single item which covers every quest and use an on-enter script to read those variables and update the player’s journal entries to match the progress through each quest.
Some modules permit a player to reset their character and start over from level 1. If your module permits this, having a single item to hold all quest variables means that you can erase all quest progress for a character reset by simply deleting the single item (which also deletes the variables) and replacing it with a new copy.
In short, using a single item is convenient for the module maker and means a less cluttered inventory for the player.
The “endless loop” I was talking about could occur if the PC’s inventory was so full that switching an equippable item caused it to drop. If there was an onunaquire script to automatically return the dropped item to the PC’s inventory, it could be that the PC’s inventory still does not have enough space which would cause the item to be dropped again, which would trigger the onunaquire script to attempt to return the item, which would cause it to be dropped again, and so on endlessly. As I pointed out, this is avoidable by not making an equippable item into a quest item. One alternative is to delete the quest item when it’s dropped and give the PC a way to “recover” it.
Remember, we’re talking about a situation where the item has been dropped because there is insufficient space in the inventory, so there would not always be a space made in the inventory by dropping the item.
Directly re-equipping the item from the floor would also not work since items equipped from the floor still must go through the inventory before being equipped.
I’ve experienced these problems before, which is why I know they exist. It’s also why I’ve had to figure out ways around them.

1 Like

@Melkior_Wiseman

I see now that you may be talking more for PW modules? (I was referring more to coop MP games, as opposed to a PW environment.) I think PW is outside the remit of most who might ask about this sort of thing.

Also, maybe you just refer to NWN1? (NWN2 uses global variables that can handle a lot of that kind of thing - or you can even have a single module item to handle it all, if you did not want to use the module to store the variables itself - for every player?)

Yes, that makes sense. :+1:

I think making equipped items as quest items is definitely a path to avoid. :dizzy_face:

1 Like

I edited my previous post because I realised that I hadn’t made some things clear. It seems that you got my point, but I think it’s still worthwhile me explaining just in case other people reading need that information.
Yes, I was speaking from the perspective of NWN1 and of persistent multiplayer worlds, but I’ve gotten used to thinking in terms of multiplayer rather than single-player. As a general rule, a method of handling a problem which works in multiplayer will also work in single-player, while the opposite isn’t always true. I find it easier to only think in terms of multiplayer all of the time instead of coming up with a solution which will work in SP mode but will fail if used in a MP environment.

3 Likes

If said item is the sword that is the only weapon that would kill the dragon, or the shield that is the only way to protect its wearer from the dragon’s breath, on the contrary I’d say it’s definitely a path to follow :wink:

2 Likes

I wish MP was considered in all modules. Mainly, I’d like the variables to be global so the party doesn’t mess up the questing and allows the story to continue.

It’s fine if the module is written for SP (conversations, etc…). SP conversations can be worked around by RP.

My group has played MP on many, many, many SP modules. We “save early and save often” just in case we need to backtrack. Every once in a while we’ll need to look at the code to set a variable to continue the story.

NWN2fixes recently dealt with a problematic unequipable quest item in the OC, although, the item wasn’t the direct problem. It was able to be gained twice.

By chance, NWN2fixes also recently addressed a problem in the OC concerning possibly dropping valuable inventory when a quest item was forged.

2 Likes

LOL! :smiley:

You always get one … :wink:

I’d just make sure that the sword is so heavy, they could not carry anything else then.

Was that the MotB issue that KevL and I looked into? :thinking: If so, that was a pain.

It was the Holy Symbol in the OC.

2 Likes

@Axe_Edge

Oh yes, I recall that discussion now - that was another thing then. :+1: