Jump to content

Help? Equip item looted to advance quest stage


QaxeIsKaze

Recommended Posts

K. I'm knackered and confused. The idea is, the player has looted an item (jewelry) and I need him/her to wear the thing in order to progress to the next stage of the quest.

 

I've been looking at every quest that I could think of that involves equipping items, but the one that looks most like what I want most is TG08A "Trinity Restored"

 

Scriptname TG08AHeadArmorScript extends ReferenceAlias  Conditional

Quest Property pTG08AQuest  Auto  

Event OnEquipped(Actor akActor)

if akActor == Game.GetPlayer()
	(pTG08AQuest as TG08AQuestScript).pTG08AHeadEquip = 1
	(pTG08AQuest as TG08AQuestScript).TG08AArmor()
endif

endEvent

 

I have done THIS so far, but don't know what to do with the "if akActor section"

 

Scriptname CrownEquipScript extends ReferenceAlias  Conditional

Quest Property IcicleLordQuest01  Auto  

Event OnEquipped(Actor akActor)

if akActor == Game.GetPlayer()
	(pTG08AQuest as TG08AQuestScript).pTG08AHeadEquip = 1
	(pTG08AQuest as TG08AQuestScript).TG08AArmor()
endif

endEvent

 

I hate to just GUESS. Looking at this makes no sense to me because I don't know if the TG08AQuestScript or the pTG08AHeadEquip is referencing something somewhere, or if this line is creating it.

 

ALSO: In the Quest Objectives section, I have created a condition with a GetVMQuestVariable, just like in TG08A, but I don't know how to create this "VM variable" in the Select Function Parameters box. In TG08A it reads

 

::pTG08AHeadEquip_var

 

Help if you can, I'm at a loss.

Edited by Ahondara
Link to comment
Share on other sites

Scriptname CrownEquipScript extends ReferenceAlias  Conditional ;<--Looks like you have attached this script to an alias on your quest. Good idea

Quest Property IcicleLordQuest01  Auto  ;<--unused property? I think this is your quest you want to advance?

Event OnEquipped(Actor akActor) ;<-- The event has captured the actor that is equipping and stored him\her as akActor
       if akActor == Game.GetPlayer() ;<-- if the stored actor is the player
               (pTG08AQuest as TG08AQuestScript).pTG08AHeadEquip = 1 :<-- Sets a variable on another script to 1 
               (pTG08AQuest as TG08AQuestScript).TG08AArmor() :<-- now its running TG08AArmor() function on TG08AQuestScript
       endif

endEvent

 

Thats the line by line of what you got. Try this.

 

Scriptname CrownEquipScript extends ReferenceAlias  Conditional

Quest Property IcicleLordQuest01  Auto 

Event OnEquipped(Actor akActor) ;<-- The event has captured the actor that is equipping and stored him\her as akActor
       if akActor == Game.GetPlayer() ;<-- if the stored actor is the player
           IcicleLordQuest01.SetStage(x) ;<-- where 'x' is the stage you want to set on your quest. fill in the blank  
       endif

endEvent

 

You should need to be fusing around with the story manager what so ever. Thats used for making randomized quests that are triggered by chance based game world events. If your making a normal quest dont use it :)

Link to comment
Share on other sites

Thanks so much for replying so quickly. I've been staring this down for a couple hours straight, but my staring powers haven't helped. Heh heh. Now, by "not needing to use the story manager" (sorry, my vocab isn't that great either) do you mean the part where I was talking about the Quest Objectives section, and creating conditions? Yeah, the less I need to confuse myself with the better. Thanks, I'm off to test this!
Link to comment
Share on other sites

Scriptname CrownEquipScript extends ReferenceAlias  Conditional

Event OnEquipped(Actor akActor) 
       if akActor == Game.GetPlayer()
           GetOwningQuest().SetStage(x)
       endif
endEvent

 

Opps I was on my way out the door and didnt notice you could have used GetOwningQuest() because its an alias. If you were having trouble before remember to fill your properties http://www.creationkit.com/Bethesda_Tutorial_Papyrus_Introduction_to_Properties_and_Functions#Hooking_up_the_message_boxes_to_the_properties_in_the_script

Link to comment
Share on other sites

scrivener07, thanks a lot. I switched up to the 2nd suggestion and it worked great.

 

I actually have more that I'm having difficulty working out if you don't mind. Or anyone who's reading.

 

I've got a what I think is a fun little quest that is the typical kill bad-guy scenario, with a twist. Since it concerns killing a boss in a castle within my town, I've been trying like the dickens to create a ceremony event for the player, where he/she gets in the town faction and receives some gold and the castle. I've got it worked out up to the ceremony, and I've got the get-in-faction event, and the prize part. The trouble is I need a trigger to 1. Get the townsfolk to come to the ceremony 2. make them clap once the player puts the crown on his head. I've got bards too, but right now they all just stand there.

 

I attempted to put a trigger box in the room, and set it up with a prereqstageopt so that it only triggers at the stage when I WANT the townsfolk to show up. But even with that variable set, the townsfolk show up before the player has even killed the boss, taken his crown, etc. Without a trigger of some kind they won't come. So I wouldn't mind some pointers. Of course the other thing is that even when they do show up, I still need them to applaud the player when he/she puts the crown on.

 

At MS08 Olaf's Festival the audience doesn't show up too early, and they applaud, but when I look at the packages, Quest Aliases, and the scripts, I see nothing but a "travel package" that reads applause, but no idles...etc.

 

Any further advice on this point would be tremendous.

Link to comment
Share on other sites

scrivener07, thanks a lot. I switched up to the 2nd suggestion and it worked great.

 

I actually have more that I'm having difficulty working out if you don't mind. Or anyone who's reading.

 

1. Get the townsfolk to come to the ceremony 2. make them clap once the player puts the crown on his head. I've got bards too, but right now they all just stand there.

 

Any further advice on this point would be tremendous.

 

Your on the right track with aliases and ai packages but we gotta pull it all together in a quest scene. They are really tricky and I get frustrated when I work with them myself :) More on that when I get home from work later today. If youve got your mod in a somewhat working state make a good ol zipped up backup and try a bit yourself. If you bugger the thing just roll back :whistling:

 

Basicly you add aliases as (actors) to a scene and then you can add actions to your actors. Each phase of the scene can make an actor do actions (or do nothing). This is different than just adding packages directly to actors because you can sequence multiple actors and packages together and control the whole shabang with sceneName.stop() and sceneName.start(). good luck

Link to comment
Share on other sites

Backups. I can't believe you said that. Do you have ESP? I always backup everything, and have "too many" copies of my mod...but... yesterday I did about 6hours of work and somewhere around 2:30am I botched something somewhere and nothing would work in the quest. I'd go to the dead body that has the book that starts the quest...not there. Loaded in a different character whose never been to this mod, nada. So I spent a bunch of hours today just redoing the quest. I "could" have started from where I left off on my previous backup (6hours before the one I messed up) but I decided that I didn't want to risk the scripts file in my PC contaminating anything, so I just redid the thing. If I weren't still just learning, I might have done it another way, but this way I got practice recalling what to do instead of just copying stuff from other quests, YouTube and other people's suggestions. Same outcome, but you know... driving with my eyes on the road type of thing.

 

I'm now backing up more frequently.

 

I've been hacking at this quite a bit today (it's 1:30am or so here in Japan). So I think I'll take a break and go in game and kill some stuff for awhile.

 

A question first on creating a scene. Is this going to be in a separate file from the actual quest? Is that why MS05 has a quest file and an Olaf's Festival file? Anyway, thanks for being such help.

Edited by Ahondara
Link to comment
Share on other sites

Backups. I can't believe you said that. Do you have ESP? I always backup everything, and have "too many" copies of my mod...but... yesterday I did about 6hours of work and somewhere around 2:30am I botched something somewhere and nothing would work in the quest.

Not ESP just paranoia. When your trying new things your bound to make mistakes so its best to just prepare to make them. I use git to version control my mod projects but thats way too much overhead if you dont already use it. Back things up like its going out of style :cool: and try to make your backups everytime you shift focus in your project. Like if you perfectly placed a ton a statics in a cell and decided you wanted to work on some scripts after getting bored of that, BAM backup time. Sounds like you already do this but as you just found out it only takes forgetting to backup once to loose hours of work. Ugh, its happened to me so many times :)

 

 

I'd go to the dead body that has the book that starts the quest...not there. Loaded in a different character whose never been to this mod, nada.

If you have a save you play skyrim with dont even attempt to play test your mods with it. Clean saving is a myth, its does not actually purge any data that can cause false errors and hours lost to debug time.

You can use a TRUE clean save I made specifically for play testing. The player in this save has been run through the main chargen quest with everything properly initialized on a completely clean skyrim install.

https://sites.google.com/site/scrivener07/files

 

 

So I spent a bunch of hours today just redoing the quest. I "could" have started from where I left off on my previous backup (6hours before the one I messed up) but I decided that I didn't want to risk the scripts file in my PC contaminating anything, so I just redid the thing. If I weren't still just learning, I might have done it another way, but this way I got practice recalling what to do instead of just copying stuff from other quests, YouTube and other people's suggestions. Same outcome, but you know... driving with my eyes on the road type of thing.

No worries there. I used to redo my mods all the time to the point I could rebuild them from muscle memory. You learn a ton that way because it forces you to understand what your doing. But theres no reason to ditch your source files, the .psc. These files cant contaminate anything. They are just txt files with a different file extension. Only the Creation Kit knows about their existence. Its the pex files you have to watch out for. Ill list a few things about these files off the top of my head.

 

1. Make sure all your scripts are compiled to the most recent versions.

>There have been times where no matter what I did in script nothing would change in game and.... :hurr: forgot to compile.

 

2. Make sure the right compiled scripts are in place.

> Ive had issue where I changed my scripts name and recompiled but the OLD version of the pex is still in the data folder alongside the renamed version. This can cause problems. Look over whats hanging around your script folder.

 

3. Make sure your properties are filled.

>Im terrible about remembering this step.

 

 

A question first on creating a scene. Is this going to be in a separate file from the actual quest? Is that why MS05 has a quest file and an Olaf's Festival file? Anyway, thanks for being such help.

Scenes are a part of quests. No extra forms or files. There should be a scenes tab on top of the quest window. There could be several reasons why that part of the quest was separated. The first that comes to mind is just to stay organized but the more likely reason is technical. If a script on a quest form registers for an OnUpdate() function, ALL scripts attached to the quest receive the update as well. This can get messy if other scripts on the same quest need to manage there own updates too. So the best solution is to separate those portions of the quest to their own quest objects.

 

 

 

Post back if you have trouble getting your mod at least back to where you started.

Link to comment
Share on other sites

But theres no reason to ditch your source files, the .psc. These files cant contaminate anything.

Yes. This was actually the file I meant. I just outright moved the aliases .pex file out of my script folder and started over. I didn't actually "delete" it because I try not to just go deleting files I am unfamiliar with. ...I've broken programs doing that. Doh!

 

Make sure all your scripts are compiled to the most recent versions.

When we talk about remembering to compile, in this case do you mean clicking the Compile button in the papyryus fragment box of the Quest Stages tab? Not being that saavy I was under the assumption that this was automatic. Sheesh.

 

Yes, I am back to where I started a full day ago. The quest is built, up to the point where the player speaks to an npc and says "the badguy is dead". But like I said, there is trouble with this "scene". Everyone in town now starts in the dungeon before I've even started the quest. They should be at work! And it appears to be because...I didn't even think to look at the Scenes Tab.

 

Looking at good ol' MS05, I first thought "How did I even miss this?" but of course, I didn't bother looking so... Anyway I see that there are 8 Phases in the Olaf Festival, at the top of the page, and then a large storyboard as it were below that. I now see the areas where people are applauding, but I still don't see the way to force them into that action, since the package itself is merely a "Travel to xmarker heading" type of thing. I'm going to play with this for a few hours.

Edited by Ahondara
Link to comment
Share on other sites

Hmm. Lots of little lights are going on in the cobweb covered attic of my brain.

Now some things are making a little more sense. But I have questions of course.

 

Stage 255 of MS05 points to a separate file in the quest, MS05KingOlafsFestival with this bit

MS05KingOlafsFestival.SetStage(0)

 

This makes me wonder why they even have a trigger box, if the actual trigger is just "setstage". That is confusing me a bit.

But my question here, this part is from MS05

setObjectiveCompleted(253)
setObjectiveDisplayed (255)
alias_MS05Effigy.GetRef().Enable()
MS05KingOlafsFestival.SetStage(0)

 

Since everything in my quest is contained in just one file, I'm wondering if I couldn't have player talk to an npc at stage 40, then at stage 50 "you've talked to Jo-Bob, now go to your ceremony" and have the script look like this:

 

setObjectiveCompleted(40)
setObjectiveDisplayed(50)
Alias_CeremonialFire.GetRef().Enable()
Game.GetPlayer().AddtoFaction(IcicleValleyTownFaction)
SetStage(60)

 

The line MS05KingOlafsFestival.SetStage(0) links to another quest file, I'm wondering if I can't just say "It's all cool, just go to the next stage." The thing is, at stage 50 I want certain things to happen, and at stage 60 I want everyone in town to start walking to the castle to have this ceremony. The Scenes are going to take place in 60, I just need a way to get from 50 to 60...which is why I thought the trigger box was the key, but it wasn't.

 

Sorry if I'm unclear or longwinded.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...