Treasure hunt technical advise - (initially disabled etc)

Post » Sun Jun 24, 2012 4:54 am

(technical advise needed, best practice for intially disabled script etc)

Evening chaps. I'm working on a treasure hunting mod, currently in the "drawing board" stages. The premise for now is basically how it is in Red Dead Redemption. You find Map 1, and in Chest 1 you'll find Map 2. Upon finding Map 2, Chest 2 will be born into the world, and so on.

I'm not going to be begging for scripts (for a change :wink:), I'd just like some advise as to the best way to go about it. Should I...

A: Use an

OnRead()

script so that the next chest is only enabled when the relevent map for it is read?

B: Use the

OnContainerChange

script so the chest will appear in the world once the map is in the players inventory? Or...

C: Use the

OnActivate

script so the next chest is born once the preceding chest has been activated?


What do you think would be the most "clean" way of doing it? Any thoughts? :smile:

EDIT: If there is a better option behind door number 4 I'm all ears.
User avatar
Elizabeth Lysons
 
Posts: 3474
Joined: Fri Feb 02, 2007 7:16 am

Post » Sun Jun 24, 2012 3:22 pm

Well, certainly not the expert here, but I'd look at using Quests and Quest Stages. Seems like a natural, logical fit. Then you can put all your "quest logic" in one place and make it easier to both implement and maintain (ie change or fix).

Using the papyrus fragments, you still have full scripting control too.
User avatar
Chloe Yarnall
 
Posts: 3461
Joined: Sun Oct 08, 2006 3:26 am

Post » Sun Jun 24, 2012 5:01 pm

Well, certainly not the expert here, but I'd look at using Quests and Quest Stages. Seems like a natural, logical fit. Then you can put all your "quest logic" in one place and make it easier to both implement and maintain (ie change or fix).

Using the papyrus fragments, you still have full scripting control too.

Thanks Sollar :) I didn't want it to be a quest.... however, can I make it a quest that's behind the scenes, so its a quest but the player doesn't know?
User avatar
Sophie Miller
 
Posts: 3300
Joined: Sun Jun 18, 2006 12:35 am

Post » Sun Jun 24, 2012 3:34 am

Thanks Sollar :smile: I didn't want it to be a quest.... however, can I make it a quest that's behind the scenes, so its a quest but the player doesn't know?

Yes, definately... as I was just posting in a different thread... Quests are Bethesda basic game unit. Seemed odd to me at first too, but just change the name, mentally, from Quest to "Basic Building Block" ;) and hopefully that will make it easier.

A quest certainly does not need to be visible to the player (just don't give it a quest name and such) but you can still use all the "stages" logic, which I think would be helpful for your idea.
User avatar
joannARRGH
 
Posts: 3431
Joined: Mon Mar 05, 2007 6:09 am

Post » Sun Jun 24, 2012 10:56 am



Yes, definately... as I was just posting in a different thread... Quests are Bethesda basic game unit. Seemed odd to me at first too, but just change the name, mentally, from Quest to "Basic Building Block" ;) and hopefully that will make it easier.

A quest certainly does not need to be visible to the player (just don't give it a quest name and such) but you can still use all the "stages" logic, which I think would be helpful for your idea.

That probably would be easier lol.

I'll have a play around when it comes to building, and see how far I get cheers mate :)
User avatar
sally coker
 
Posts: 3349
Joined: Wed Jul 26, 2006 7:51 pm

Post » Sun Jun 24, 2012 4:09 pm

although the quest is not necessary to get your thing to work, it might be easier to control through a quest.

you still need an "activator" to trigger these events in the quest. this is how i would approach it:

Use an OnReadSetStage script (i believe there is a default one already written) for each of your maps. when the map is "read" by the player it will set a new stage in your quest

in the quest fragment you would use the enable() command for your corresponding chest. assuming the next map is already in the chest, the player can trigger the next stage by reading that map etc. since your treasure hunt is sequential, this makes it very convenient to track stages in the quest, as you wont ever need to back track to a previous stage (something that a quest cannot do to itself)

just make sure that your OnRead script you use has some type of "Do once" variable that makes it inactive after the first read, or else the quest may revert to an earlier stage if a previous map is read
User avatar
Kathryn Medows
 
Posts: 3547
Joined: Sun Nov 19, 2006 12:10 pm

Post » Sun Jun 24, 2012 7:42 am

although the quest is not necessary to get your thing to work, it might be easier to control through a quest.

you still need an "activator" to trigger these events in the quest. this is how i would approach it:

Use an OnReadSetStage script (i believe there is a default one already written) for each of your maps. when the map is "read" by the player it will set a new stage in your quest

in the quest fragment you would use the enable() command for your corresponding chest. assuming the next map is already in the chest, the player can trigger the next stage by reading that map etc. since your treasure hunt is sequential, this makes it very convenient to track stages in the quest, as you wont ever need to back track to a previous stage (something that a quest cannot do to itself)

just make sure that your OnRead script you use has some type of "Do once" variable that makes it inactive after the first read, or else the quest may revert to an earlier stage if a previous map is read

Thanks man. So each map and chest would be a quest alias? And if I don't give my quest a name, just an ID, it shouldn't be displayed etc? :)

Edit:

And also am I right in thinking the OnRead and enable scripts need to be on the object and chest, respectively, not in the quest's script?
User avatar
Marina Leigh
 
Posts: 3339
Joined: Wed Jun 21, 2006 7:59 pm

Post » Sun Jun 24, 2012 4:55 am

you would only need aliases in this case, if you plan on placing a marker over it (but doesnt that defeat the point of a treasure hunt?)

otherwise, if you are trying to have it a manual hunt like in RDR, you dont need aliases at all. just have each chest exist in the world set to initially disabled, then call each enable() in the stage fragment (you will need to declare the chest as an objectreference property in their respective stages

on your quest itself, only have the editorID set the type to None and leave the quest name blank. it wont ever appear to the player
User avatar
Leilene Nessel
 
Posts: 3428
Joined: Sun Apr 15, 2007 2:11 am

Post » Sun Jun 24, 2012 4:33 pm

Thanks mate you guys have both been really helpful :)

I shall have a play when I'm working on my hunting quests this weekend, and test out the scripts/learn it :)

Do you know of any video tutorials that deal with enable scripts in quests? Just something to familiarise myself with it.
User avatar
lucile
 
Posts: 3371
Joined: Thu Mar 22, 2007 4:37 pm

Post » Sun Jun 24, 2012 6:00 am

And remember, the http://www.creationkit.com/OnRead_-_ObjectReference applies to a book:

Event received when this object (which is a book) has been read. In other words, it is sent when the book UI opens a book.
There's different ways you could do it, but I would have the OnRead trigger the next quest stage, rather than enabling/disabling items... the reason, if you want to make changes, you only have to go to 1 place for all your changes - the quest. So I would put all the "treasure hunt progression" in the quest stages and then all your objects do is trigger that they've been completed (found, read, etc).
User avatar
Tamara Dost
 
Posts: 3445
Joined: Mon Mar 12, 2007 12:20 pm

Post » Sun Jun 24, 2012 10:42 am

Thanks mate you guys have both been really helpful :smile:

I shall have a play when I'm working on my hunting quests this weekend, and test out the scripts/learn it :smile:

Do you know of any video tutorials that deal with enable scripts in quests? Just something to familiarise myself with it.

on each stage you only need the following code:

ChestProperty.Enable()

BUT before you type that in, simply type a ; and compile, and ok to close the window. the reopen the window and declare ChestPropery under properties (ObjectReference) first. When you fill this refernce point it to the chest you want to enable in the reference window. then type the code and compile.

repeat this for every stage you want a new chest to be enabled.
User avatar
RAww DInsaww
 
Posts: 3439
Joined: Sun Feb 25, 2007 5:47 pm

Post » Sun Jun 24, 2012 9:14 am

Do you know of any video tutorials that deal with enable scripts in quests? Just something to familiarise myself with it.

Do you mean how to enable objects from scripts?

Do enable an object, you would just have to pass it in on a property and call object.Enable(). Or maybe I'm not following you?

Here's a good list of http://www.creationkit.com/Video_Tutorials, maybe check out this series? Doug's Quest Creation Tutorials
User avatar
Rachel Eloise Getoutofmyface
 
Posts: 3445
Joined: Mon Oct 09, 2006 5:20 pm

Post » Sun Jun 24, 2012 7:05 am

Thanks guys you've been dead helpful :) will post back any issues I come across.
User avatar
Kitana Lucas
 
Posts: 3421
Joined: Sat Aug 12, 2006 1:24 pm

Post » Sun Jun 24, 2012 7:49 am

Just uploaded a private video. It shows the clean map (nice smooth edges, and it looking hand-drawn), and the OnRead() script in action, enabling the disabled chest in the game.

http://www.youtube.com/watch?v=iG6qSPF7Qeg

The Treasure Hunt is a quest, but doesn't appear in the game or quest log, so it's much more natural and immersive. I'm only working on this now, because I can't do the hunting quests I want to do, damn not knowing CK stuff hmph :confused:

Note: Also posted in the WIPz thread, for people that may be following that.
User avatar
Inol Wakhid
 
Posts: 3403
Joined: Wed Jun 27, 2007 5:47 am


Return to V - Skyrim