Quick Questions, Quick Answers Thread #7

Post » Mon Nov 19, 2012 4:49 am

What would be the script to do the following; "when the player sleeps in The Bannered Mare, once they are asleep, I'd like them moved to another location"?
User avatar
Nick Jase Mason
 
Posts: 3432
Joined: Sun Jul 29, 2007 1:23 am

Post » Sun Nov 18, 2012 10:22 pm

I just got a very strange error message when closing the CK:

FORMS: Forms were leaked during ClearData. Check Warnings file for more info.

When I checked the EditorWarnings.txt file, I noticed the following error log:

FORMS: Form 'ST_DovahMirRemove' (01010040) of type SMQN in file 'Shout-tastic.esp' was not freed.

I think this is related to a quest node I added to the Player Remove Item SM Event Node, any idea what "was not freed" means, or what I should do to fix it?
User avatar
Lillian Cawfield
 
Posts: 3387
Joined: Thu Nov 30, 2006 6:22 pm

Post » Mon Nov 19, 2012 10:27 am

Does it happen repeatedly? I think I had a similar error once that never happened again.
User avatar
LuBiE LoU
 
Posts: 3391
Joined: Sun Jun 18, 2006 4:43 pm

Post » Sun Nov 18, 2012 10:36 pm

Got rid of the distance condition and he walked over to the portal. However, it did not activate (he stayed in the center of the portal). Taking a look at my script I think I see why:
Scriptname rayPortalGoHome extends ObjectReference{Sends the player to the castle.}ObjectReference Property PortalDoor AutoEvent OnActivate(ObjectReference akActionRef)If akActionRef == Game.GetPlayer()  PortalDoor.Activate(Game.GetPlayer())EndIfEndEvent

I'm guessing I'll need to remove that getplayer bit and maybe the whole If statement as well. I don't see why the distance condition would cause a problem though, how often would an actor re-evaluate packages when the player is near?

With my own limited testing, I have found that actors near the player evaluate their packages roughly every ten seconds..
User avatar
Chloe Botham
 
Posts: 3537
Joined: Wed Aug 30, 2006 12:11 am

Post » Mon Nov 19, 2012 5:59 am

Is there a way to see if your mod has deleted records from the game? I had 1 apparently, although the CELL itself didn't show as edited in the Details section. I want to see if I've deleted anything else by mistake :S

P.S. Wrye Bash reports no dirty edits in my mod.
User avatar
N Only WhiTe girl
 
Posts: 3353
Joined: Mon Oct 30, 2006 2:30 pm

Post » Mon Nov 19, 2012 2:47 am

Does it happen repeatedly? I think I had a similar error once that never happened again.

It seemed to fix itself, somehow. Hasn't returned so far.
User avatar
Lisha Boo
 
Posts: 3378
Joined: Fri Aug 18, 2006 2:56 pm

Post » Mon Nov 19, 2012 8:32 am

Yes, remove it I think. It's not the player doing the Activating (is it?), it's the NPC.

As to the Distance Condition ... well if your-guy walks over to the portal without it being present, but does not walk when it is present; at the very least something is wrng with it (as you currently have it written). Maybe you are just checking for too small a distance? (or something like that). Note: I have not used Distance in a Criteria, only in scripts.

Well I have modified the script to work for any actor and it works perfectly now. When the portal is summoned he walks up to it and activates it and disappears. Then I go activate it and when I end up at the castle he is right next to me. Now I need to get working on that scene, we will see how that goes ha.

Thanks a lot for the help :goodjob:
User avatar
Marcia Renton
 
Posts: 3563
Joined: Fri Jan 26, 2007 5:15 am

Post » Mon Nov 19, 2012 7:03 am

What would be the script to do the following; "when the player sleeps in The Bannered Mare, once they are asleep, I'd like them moved to another location"?

Register your script to receive Player Sleep events (RegisterForSleep()). When the player goes to sleep, check that he is sleeping in the correct bed, and if he is, use MoveTo() to put him where you want and call PlayIdle(WakeUp) on the Player.

Don't forget to unregister the script for Sleep events when you don't need it anymore.
User avatar
Setal Vara
 
Posts: 3390
Joined: Thu Nov 16, 2006 1:24 pm

Post » Mon Nov 19, 2012 4:57 am

What is the currently accepted utility for deleting undesirable records from a plugin? TESVGecko? Something else? I have a few dirty edits I'd like to clean up but don't want to make a mess of things in the process.
User avatar
Jani Eayon
 
Posts: 3435
Joined: Sun Mar 25, 2007 12:19 pm

Post » Mon Nov 19, 2012 10:58 am

What is the currently accepted utility for deleting undesirable records from a plugin? TESVGecko? Something else? I have a few dirty edits I'd like to clean up but don't want to make a mess of things in the process.
You can 'clean' a plugin manually with the Creation Kit and know you're safe. File > Data > Set YourPlugin.esp as "Active" > Details. From there, select forms to remove/Ignore with Delete key > Click OK. When you save the plugin, the "Ignored" forms will be removed.

Note: You can't "Ignore" GRUP entries, but they'll be automatically removed if they've no children

When TES5Edit arrives, it'l be as easy as http://i.imgur.com/4x4J8.png followed by R-Click > Remove "Identical to master" records. Gecko is still in alpha/beta, so I'd just use the CK for now.
User avatar
Jonny
 
Posts: 3508
Joined: Wed Jul 18, 2007 9:04 am

Post » Mon Nov 19, 2012 7:04 am

Feel like a dumbaXX for asking this when everybody seems to be asking such technical questions, but here it goes...
I use a custom follower but I want to change some things about her, such as her height, and if possible give her a different combat style
I have tried opening the CS but it keeps coming up with errors when I load up her esp, so I dont know if I am screwing up the esp by modifying it, could I use Tesedit for this, and would it only screw thing up even further if I try it?
User avatar
joseluis perez
 
Posts: 3507
Joined: Thu Nov 22, 2007 7:51 am

Post » Mon Nov 19, 2012 1:20 pm

TES5Edit isn't yet publicly available as it's still in alpha. You might not need to edit the ESP to accomplish what you're after. Try opening your consoie, click on her, then type...
GetScale
...noting what value is returned in case you want to revert. Then type...
SetScale 0.9
...for instance to reduce her overall size. You should only have to do it once per game.
User avatar
Krystina Proietti
 
Posts: 3388
Joined: Sat Dec 23, 2006 9:02 pm

Post » Sun Nov 18, 2012 9:12 pm

Register your script to receive Player Sleep events (RegisterForSleep()). When the player goes to sleep, check that he is sleeping in the correct bed, and if he is, use MoveTo() to put him where you want and call PlayIdle(WakeUp) on the Player. Don't forget to unregister the script for Sleep events when you don't need it anymore.

Thank you for the response, but could you possible be a little more specific? I'm sorry, but I'm still new to this, and I can't work out what you mean...
User avatar
Kara Payne
 
Posts: 3415
Joined: Thu Oct 26, 2006 12:47 am

Post » Mon Nov 19, 2012 12:56 am

Any suggestions for a good way to troubleshoot a quest with a couple stages not updating properly? In game I was able to try advancing the quest along, and I could see there were some trouble stages.

I have a quest which starts with an SM Event Node ChangeLocation event, sends a courier to deliver a note and a book, the player reads the note, then reads the book, then the quest sends him to a random dungeon to obtain the objective from the boss container.

All of that worked fine, but the next stage I have an SM Event Node PlayerAddItem event, which is supposed to check when the player adds the item from the boss container, trigger a subquest that updates the stage of my main quest. This part didn't work.

I used console to advance to the next stage, which is similar (player must obtain item, SM Event Node player add item check) and that stage didn't work either.
User avatar
Lucy
 
Posts: 3362
Joined: Sun Sep 10, 2006 4:55 am

Post » Mon Nov 19, 2012 6:19 am

All of that worked fine, but the next stage I have an SM Event Node PlayerAddItem event, which is supposed to check when the player adds the item from the boss container, trigger a subquest that updates the stage of my main quest. This part didn't work.

Stage? SM Event nodes are for starting quests. I don't quite understand what you're doing.
User avatar
josie treuberg
 
Posts: 3572
Joined: Wed Feb 07, 2007 7:56 am

Post » Mon Nov 19, 2012 9:36 am



Stage? SM Event nodes are for starting quests. I don't quite understand what you're doing.

Yea event nodes start quests mate. What you could do is make a dummy quest run with that SM event, and all it does is set the stage for your proper quest, then completes. Seamless :)

That's what I did to track kills in my quest. The kill sm event launches a dummy quest, that runs a function in my proper quest script, to update the global (displayed in the player journal).

Edit:

I'm assuming your object in the boss container is a quest alias. If so just attach a script to the alias that sets the stage OnContainerChanged.
User avatar
Becky Cox
 
Posts: 3389
Joined: Thu Jun 22, 2006 8:38 am

Post » Mon Nov 19, 2012 12:41 am

TES5Edit isn't yet publicly available as it's still in alpha. You might not need to edit the ESP to accomplish what you're after. Try opening your consoie, click on her, then type...
GetScale
...noting what value is returned in case you want to revert. Then type...
SetScale 0.9
...for instance to reduce her overall size. You should only have to do it once per game.
I tried it, changing her height works perfectly but changing her weight gives the black face bug, upon reloading her face went back to normal, but she now quite a noticeable gap between her neck and chest...oh well I just switched her height again and it was enough
User avatar
cassy
 
Posts: 3368
Joined: Mon Mar 05, 2007 12:57 am

Post » Mon Nov 19, 2012 6:31 am

Hey guys! thanks a lot for this helping community, well i got a problem but instead of esplaining everything i got a simpler question.
Whats the best way to make a scripted timer on a pickable object? for example when 3 days (ingame) have passed since you picked up the object, a debug.messagebox appears, any ideas?
User avatar
Nicola
 
Posts: 3365
Joined: Wed Jul 19, 2006 7:57 am

Post » Sun Nov 18, 2012 11:07 pm

Something like this:

Spoiler
Event OnActivate()   GotoState("Waiting")   RegisterForSingleUpdateGameTime(24 * 3)EndEventState Waiting  Event OnActivate()  EndEvent  Event OnUpdate()	 GotoState("")	 Debug.MessageBox(...)  EndEventEndState
User avatar
Adam Baumgartner
 
Posts: 3344
Joined: Wed May 30, 2007 12:12 pm

Post » Mon Nov 19, 2012 11:35 am

Something like this:

Spoiler
Event OnActivate()   GotoState("Waiting")   RegisterForSingleObjectGameTime(24 * 3)EndEventState Waiting  Event OnActivate()  EndEvent  Event OnUpdate()	 GotoState("")	 Debug.MessageBox(...)  EndEventEndState


Thanks for the help, but just for learning cuz im still pretty much new, why there has to be an activate event inside the state?
User avatar
Blessed DIVA
 
Posts: 3408
Joined: Thu Jul 13, 2006 12:09 am

Post » Mon Nov 19, 2012 10:15 am

Thanks for the help, but just for learning cuz im still pretty much new, why there has to be an activate event inside the state?

It stops the script running more than once mate :) To help stop the player activating it loads, jamming up the papyrus train.
User avatar
Roisan Sweeney
 
Posts: 3462
Joined: Sun Aug 13, 2006 8:28 pm

Post » Mon Nov 19, 2012 12:28 am

It stops the script running more than once mate :smile: To help stop the player activating it loads, jamming up the papyrus train.

oh, ok, i think i get it, so when i firs activate it (pick it up) the item, it will change to waiting state where if i activate it again will do nothing cuz theres nothing to execute, am i right? and btw, if i pick it up and drop it, the script will keep running? or only when i have it on my pocket?
User avatar
Ricky Rayner
 
Posts: 3339
Joined: Fri Jul 13, 2007 2:13 am

Post » Mon Nov 19, 2012 5:43 am

Yes about the activate, and yes, The script will keep running. You could either add a check in the OnUpdate event to prevent the messagebox, or you could add an OnItemRemoved event which would put you back in the empty state - GotoState("")
User avatar
sunny lovett
 
Posts: 3388
Joined: Thu Dec 07, 2006 4:59 am

Post » Mon Nov 19, 2012 9:43 am

Yes about the activate, and yes, The script will keep running. You could either add a check in the OnUpdate event to prevent the messagebox, or you could add an OnItemRemoved event which would put you back in the empty state - GotoState("")

going to empty state technically restarts the script?
User avatar
Lawrence Armijo
 
Posts: 3446
Joined: Thu Sep 27, 2007 7:12 pm

Post » Mon Nov 19, 2012 1:07 am

going to empty state technically restarts the script?

The first Event OnActivate() in the code above is in the empty state, while the Event OnUpdate isn't. So if you go back into the empty state, nothing will happen when the update fires, but the player can activate the object and start the process again.
User avatar
Alina loves Alexandra
 
Posts: 3456
Joined: Mon Jan 01, 2007 7:55 pm

PreviousNext

Return to V - Skyrim