How to make quest objects available in jail?

Post » Thu Jun 21, 2012 1:23 pm

I have two quests which use aliases to create quest items in a container.

This was working fine, but, for plot reasons, I wanted a way to remove all items from the player on entry to the interior cell in which the container is found.

RemoveAllItems() http://www.gamesas.com/topic/1365685-gamegetplayerremoveallitemsholdingcontainer-true-true/page__fromsearch__1.

So I used SendPlayerToJail() on entry to the interior cell (after the quests have started).

Now the quests work correctly in every respect bar one - the quest items are not in the container (even though the quest objective marker appears above it).

When I run a script manually to ClearPrison(), the items suddenly appear in the container.

Snag is, one of the quest items is the key needed to escape from the prison!

I suspect the items would appear correctly if I started the quests after SendPlayerToJail(), but that would be a significant redesign.

Is this a bug, a feature, or something I can work around?
User avatar
jadie kell
 
Posts: 3497
Joined: Sat Jul 29, 2006 3:54 pm

Post » Thu Jun 21, 2012 3:27 am

I have two quests which use aliases to create quest items in a container.

This was working fine, but, for plot reasons, I wanted a way to remove all items from the player on entry to the interior cell in which the container is found.

RemoveAllItems() http://www.gamesas.com/topic/1365685-gamegetplayerremoveallitemsholdingcontainer-true-true/page__fromsearch__1.

So I used SendPlayerToJail() on entry to the interior cell (after the quests have started).

Now the quests work correctly in every respect bar one - the quest items are not in the container (even though the quest objective marker appears above it).

When I run a script manually to ClearPrison(), the items suddenly appear in the container.

Snag is, one of the quest items is the key needed to escape from the prison!

I suspect the items would appear correctly if I started the quests after SendPlayerToJail(), but that would be a significant redesign.

Is this a bug, a feature, or something I can work around?
I don't think I'm really understanding the issue. Do you actually need any of the other items other than the key? Couldn't you just manually add the key via script after the player has been sent to jail?
User avatar
Melly Angelic
 
Posts: 3461
Joined: Wed Aug 15, 2007 7:58 am

Post » Thu Jun 21, 2012 4:03 am

Couldn't you just manually add the key via script after the player has been sent to jail?
I could do that, of course. However, I'm trying to use the quest alias approach, in order to learn how to "do things right".
User avatar
Taylah Haines
 
Posts: 3439
Joined: Tue Feb 13, 2007 3:10 am

Post » Thu Jun 21, 2012 6:03 am

A bit weird ...

But the JailQuest thing in itself is a bit weird, so I'm not surprised.

Question - why can't you:

1. Player enters cell
2. SendToJail
3. ClearJail
4. Update your Main Quest to a temp stage - and get that stage to Start a SUB QUEST
5. In the sub-quest (which only needs two stages, I think) - Add the chest Alias and fill it with stuff and then set stage back on your Main Quest
6. When your use of the chest is over, complete the Sub-Quest (from an applicable stage of your Main Quest)

Will that work for you?



OR

1. Put the items in the aliased container at Quest Start ... but DISABLE them
2. On player enter cell do the SendToJail
3. Enable the items in the same script
4. Clear Jail

... Never tried that ... will it work?
User avatar
Mason Nevitt
 
Posts: 3346
Joined: Fri May 11, 2007 8:49 pm

Post » Thu Jun 21, 2012 3:46 pm

Thanks for the suggestions, but they don't work for me.

Having tested several scenarios, I've concluded that SendPlayerToJail() tells the engine to hide all quest objects in every inventory (including any created later).

Quest objects held by the player are hidden but not sent to the evidence chest.

Game.ServeTime() or Game.ClearPrison() unhides quest objects everywhere.

So, my working solution is simply to make the key a regular item, not a quest object.

EDIT : the engine won't let the player drop a key, so this solution is robust.

The rule seems to be that a quest while in jail cannot involve a quest item. Bethesda examples I've examined so far just use regular items.
User avatar
Dorian Cozens
 
Posts: 3398
Joined: Sat May 26, 2007 9:47 am

Post » Thu Jun 21, 2012 12:31 pm

Then, have you tried ENABLING the particular Quest Item (the only way I think they can have done it is to diable the items) ... So just run an ENABLE on the BASE OBJECT (cast it from the AliasRef) ...

... but maybe there is some hard-coded, internal type logic that does this for Beth which won't work for us humans ;)

(Anyway, glad you found a work around ... at least the no-drop-key is good for something!! ;))
User avatar
Eliza Potter
 
Posts: 3481
Joined: Mon Mar 05, 2007 3:20 am

Post » Thu Jun 21, 2012 5:50 am

I did try disable / enable, but it doesn't work (I guess being in jail imposes a "hide quest items" rule which is independent of, and over-rides, the enabled / disabled status).

At any rate, we have a solution.

I guess that if a story involved a vital item which could be lost while in jail, this could be trapped in the player's OnUnequipped event.
User avatar
k a t e
 
Posts: 3378
Joined: Fri Jan 19, 2007 9:00 am


Return to V - Skyrim