Quick Questions -- Quick Answers, The Twentieth

Post » Sun Sep 20, 2009 6:11 pm

I have a script that has an NPC say a voiced dialogue line, is there a command to let the script know when the NPC has finished talking? At the moment, I'm just using a timer and guessing the length.
You can use the response's result script to set a flag that gets checked by your script.
User avatar
Stay-C
 
Posts: 3514
Joined: Sun Jul 16, 2006 2:04 am

Post » Sun Sep 20, 2009 6:13 pm

hey guys

When I try to use TES4Gecko to make my mod a Master (esm) file then when i load it, I am not able to go to Tamriel (don't know if I can go to any other for that sake) When i enter tamriel everything goes black iand I get a message saying you can not go further that way.
So I was wondering, what am I doing wrong?
I really would love to make an .esm because it starts to take years to save the mod and if I could make plugins for the mod and then merge it, then it would save me a lot of time!
User avatar
Danny Blight
 
Posts: 3400
Joined: Wed Jun 27, 2007 11:30 am

Post » Sun Sep 20, 2009 4:01 am

Hey guys, this is probably a really simple one and I'll slap myself once you tell me, but can I write a script to advance a quest stage once all the 'bad' NPCs in a cell are dead? (The player has a companion NPC, and we need to kill all the bandits in the area)

EDIT: The bandits are all leveled creatures in the Sercen cell (From the original .esm File)
User avatar
christelle047
 
Posts: 3407
Joined: Mon Apr 09, 2007 12:50 pm

Post » Sun Sep 20, 2009 6:19 am

hmmm you need to give all your bandits a reference then under conditions use getdead to check if all of them are dead and then use setstage to advance the quest
User avatar
Jay Baby
 
Posts: 3369
Joined: Sat Sep 15, 2007 12:43 pm

Post » Sun Sep 20, 2009 2:10 pm

I have a script that has an NPC say a voiced dialogue line, is there a command to let the script know when the NPC has finished talking? At the moment, I'm just using a timer and guessing the length.

From the cs wiki :http://cs.elderscrolls.com/constwiki/index.php/Say
"Say" returns the time in seconds that the NPC will take to finish speaking, which can be useful for timing followups in scripts

great no ? :)
User avatar
Amy Melissa
 
Posts: 3390
Joined: Fri Jun 23, 2006 2:35 pm

Post » Sun Sep 20, 2009 8:20 am

Quick question : Is there a way to center the cursor in an OBSE input text box ?
OpenTextInput "The cursor in the next line appears centered - possible ? (max 29 chars)%r|Finished" 0 29

User avatar
Lilit Ager
 
Posts: 3444
Joined: Thu Nov 23, 2006 9:06 pm

Post » Sun Sep 20, 2009 11:11 am

Add as many whitespaces as necessary before the button definitions.
User avatar
N Only WhiTe girl
 
Posts: 3353
Joined: Mon Oct 30, 2006 2:30 pm

Post » Sun Sep 20, 2009 3:27 am

hmmm you need to give all your bandits a reference then under conditions use getdead to check if all of them are dead and then use setstage to advance the quest


Cheers, I thought it would be simple like that :thumbsup:
User avatar
April
 
Posts: 3479
Joined: Tue Jun 20, 2006 1:33 am

Post » Sun Sep 20, 2009 7:32 am

Add as many whitespaces as necessary before the button definitions.
Yes I thought of this - but I want a "dynamic" effect - the text to stay centered as long as I type - not important, just for aesthetics
Thanks :)
User avatar
Horse gal smithe
 
Posts: 3302
Joined: Wed Jul 05, 2006 9:23 pm

Post » Sun Sep 20, 2009 4:10 am

the boolean variables in obse must be 0 or 1 (sounds stupid I know)?
I mean this :
messageboxEx "%{optionaltext %}text|Done" b
won't work if b has the value 2 ? or the script would act as if b were 1 ?
EDIT: the script would act as if b were 1
User avatar
Nathan Hunter
 
Posts: 3464
Joined: Sun Apr 29, 2007 9:58 am

Post » Sun Sep 20, 2009 3:45 pm

And another one on format strings. The array elements won't work :
string_var nameLet n := ar_construct arrayar_Resize n 4short i; n[0],...n[3] take string valueslet name := sv_construct "%z" n[1]	; not workingi=0let name := sv_construct "%z" n[i]	; not workingmessageboxEx "Your name is %z" n[0]	; not working

Is there a more elegant way than :
string_var name_templet name_temp := sv_construct "%z" n[0]messageboxEx "Your name is %z" name_tempsv_destruct name_temp
?
User avatar
Andrea Pratt
 
Posts: 3396
Joined: Mon Jul 31, 2006 4:49 am

Post » Sun Sep 20, 2009 6:19 am

And another one on format strings. The array elements won't work :
let name := "Your name is " + n[1]messageBox $name

User avatar
Peter lopez
 
Posts: 3383
Joined: Mon Sep 10, 2007 5:55 pm

Post » Sun Sep 20, 2009 2:58 pm

Thanks shadeMe
Edit : oops
this :
	let str := "What would you like to do ?"		let str += "|Place a marker here"	let str += "|Nevermind"
produces a "What would you like to do ?|Place a marker here|Nevermind" messagebox
And another small detail :
how would one go about copying the contains of n[...] to a string variable ? should this :
let name := sv_construct "%z" n[1]      ; not workingi=0let name := sv_construct "%z" n[i]      ; not working
be :
let name :=  "%e" + n[1]i=0let name :=  "%e" + n[i]
?
so sv_destruct name would not destroy n[...]
From OBSE doc :
set string1 to sv_Construct "First string"    set string2 to string1    set string1 to sv_Construct "Second string"    ; modifies both string1 and string2...both string1 and string2 end up containing "Second string." If this is not desired behavior, use sv_Construct to copy the contents of one string to another, i.e.:    set string2 to sv_Construct "%z" string1    ; copies string1's contents to string2    set string2 to player.GetName               ; modifies only string2

So I guess also in the example above (set string2 to string1) sv_destruct string1 (or sv_destruct string2) would destroy both string1 and string2.
User avatar
R.I.p MOmmy
 
Posts: 3463
Joined: Wed Sep 06, 2006 8:40 pm

Post » Sun Sep 20, 2009 5:44 am

double posted
User avatar
Sasha Brown
 
Posts: 3426
Joined: Sat Jan 20, 2007 4:46 pm

Post » Sun Sep 20, 2009 5:42 pm

Thanks shadeMe
Edit : oops
this :
	let str := "What would you like to do ?"		let str += "|Place a marker here"	let str += "|Nevermind"
produces a "What would you like to do ?|Place a marker here|Nevermind" messagebox
Use messageBoxEx - That should fix it.

And another small detail :
how would one go about copying the contains of n[...] to a string variable ? should this :
let name := sv_construct "%z" n[1] ; not workingi=0let name := sv_construct "%z" n[i] ; not working
be :
let name := "%e" + n[1]i=0let name := "%e" + n[i]
?
forEach aIterator <- n let name += *aIteratorloop

User avatar
Rinceoir
 
Posts: 3407
Joined: Thu Jun 29, 2006 1:54 am

Post » Sun Sep 20, 2009 2:55 pm

Use messageBoxEx - That should fix it.
It did fix it - thanks :)
forEach aIterator <- n let name += *aIteratorloop

Thanks - this is for copying the entire array I guess - I meant just an element :
let name:= n[0]
would make both name and n[0] refer to the same string ( OBSE doc :direct assignment of one string variable to another causes both variables to refer to the same string). Correct for array elements ? If yes, would it be avoided thus :
let name := "%e" + n[0]
?
I promise this is the last one :D (for the weekend)
User avatar
Lily
 
Posts: 3357
Joined: Mon Aug 28, 2006 10:32 am

Post » Sun Sep 20, 2009 3:07 am

Thanks :)
Thanks - this is for copying the entire array I guess - I meant just an element :
let name:= n[0]
would make both name and n[0] refer to the same string ( OBSE doc :direct assignment of one string variable to another causes both variables to refer to the same string). Correct for array elements ? If yes, would it be avoided thus :
let name := "%e" + n[0]
?
I promise this is the last one :D (for the weekend)
I'm pretty sure elements aren't passed by reference when moved from an array to a string var, so your first line of code should do.
User avatar
DarkGypsy
 
Posts: 3309
Joined: Tue Jan 23, 2007 11:32 am

Post » Sun Sep 20, 2009 1:02 pm

I'm pretty sure elements aren't passed by reference when moved from an array to a string var, so your first line of code should do.

Great - thanks for explaining this out :thumbsup:
User avatar
Adrian Powers
 
Posts: 3368
Joined: Fri Oct 26, 2007 4:44 pm

Post » Sun Sep 20, 2009 5:04 pm

hey guys

When I try to use TES4Gecko to make my mod a Master (esm) file, then when i load it in oblivion, I am not able to go to Tamriel (don't know if I can go to any other worldspaces besides imperial city for that sake). When i enter tamriel everything goes black i and I get a message saying "you can not go further that way". and then I get teleported back
So I was wondering, what am I doing wrong?
I really would love to make an .esm because it starts to take years to save the mod and if I could make plugins for the mod and then merge it, then it would save me a lot of time!
User avatar
*Chloe*
 
Posts: 3538
Joined: Fri Jul 07, 2006 4:34 am

Post » Sun Sep 20, 2009 12:36 pm

Quick question :D For shader effects, the "persistent alpha ratio" setting... is 1 full opacity and 0 complete transparency? Or vice versa

[EDIT] Also, what effect does the "Affect Skin Only" setting have on weapons? None?
User avatar
chinadoll
 
Posts: 3401
Joined: Tue Aug 22, 2006 5:09 am

Post » Sun Sep 20, 2009 5:21 am

Yes and yes.
User avatar
Cesar Gomez
 
Posts: 3344
Joined: Thu Aug 02, 2007 11:06 am

Post » Sun Sep 20, 2009 9:24 am

Thanks :)
User avatar
Franko AlVarado
 
Posts: 3473
Joined: Sun Nov 18, 2007 7:49 pm

Post » Sun Sep 20, 2009 1:49 pm

I have an issue with a minor POC I'm playing with.

I have stumbled on a way to use the mouse wheel to scroll through weapons, spells, ammo, etc. (anything that can be hotkeyed) using a combination of Skyranger-1's Super Hotkeys mod (and his cycler items), a disabler mod for the mouse wheel's control of the vanity camera, and an Oblivion.ini tweak that clones two of the vanilla hotkeys onto the mousewheel up and mousewheel down.

The Oblivion.ini is set up like this:

Quick6=000708FF
Quick7=000809FF

So that the 6 & 7 hotkeys are set to both the normal number keys and to the mousewheel up and mousewheel down.

With item cyclers placed in those hotkey slots with Super Hotkeys rolling the wheel up scrolls through one, and down scrolls through the other.

However, some people actually use the mouse wheel to control the vanity camera, so I was trying to work out a way to give both options. I was thinking I could use a modifer key to enable/disable the vanity camera and enable/disable those two hotkeys in the opposite state. I tried it this way:

scn jawmousewheeltestscriptfloat fQuestDelayTimeBegin Gamemodeset fQuestDelayTime to .0001If IsKeyPressed2 11 == 0	setnumericgamesetting fVanityModeWheelMult 0.0000	EnableControl 23	EnableControl 24	printc "key not held, controls enabled"elseif IsKeyPressed2 11 == 1	setnumericgamesetting fVanityModeWheelMult 0.1000	DisableControl 23	DisableControl 24	printc "key held, controls disabled"EndifEnd


This kind of works, the vanity camera does become available when the 0 key is held down, but the mousewheel still activates the hotkeys even though the numeric keys are disabled.

And I tried this way:

scn jawmousewheeltestscriptfloat fQuestDelayTimeBegin Gamemodeset fQuestDelayTime to .0001If IsKeyPressed2 11 == 0	setnumericgamesetting fVanityModeWheelMult 0.0000	EnableKey 264	EnableKey 265	printc "key not held, controls enabled"elseif IsKeyPressed2 11 == 1	setnumericgamesetting fVanityModeWheelMult 0.1000	DisableKey 264	DisableKey 265	printc "key held, controls disabled"EndifEnd


but it had no effect at all on the mouse wheel activating the hotkeys.

Anyone see an issue or have a suggestion?

edit: Does anyone know how SetStringIniSetting works? Is this even close?

scn jawmousewheeltestscriptfloat fQuestDelayTimestring_var testerstring_var tester1Begin Gamemodeset fQuestDelayTime to .0001If IsKeyPressed2 11 == 0	setnumericgamesetting fVanityModeWheelMult 0.0000	SetStringINISetting "Quick6|000708FF"	SetStringINISetting "Quick7|000809FF"	set tester to getstringinisetting Quick6	set tester1 to getstringinisetting Quick7	printc "Quick6 is %z" tester	printc "Quick6 is %z" tester1elseif IsKeyPressed2 11 == 1	setnumericgamesetting fVanityModeWheelMult 0.1000	SetStringINISetting "Quick6|0007FFFF"	SetStringINISetting "Quick7|0008FFFF"	set tester to getstringinisetting Quick6	set tester1 to getstringinisetting Quick7	printc "Quick6 is %z" tester	printc "Quick6 is %z" tester1Endif

User avatar
Laura Richards
 
Posts: 3468
Joined: Mon Aug 28, 2006 4:42 am

Post » Sun Sep 20, 2009 3:58 pm

I want certain lines of dialogue to only fire as long as the player & NPC are NOT in any of the Oblivion worlds.

I've sorted out two possible approaches to handle interiors:

1) Create two dummy cells and use them with GetInCell. One would be OblivionRD00, the other OblivionRDC. That would minimize, although of course not completely avoid, the problem of clashing with mods that also use dummy cells for Oblivion; or

2) Just go on ahead and test for each and every cell, along these lines:

if player.getincell OblivionRDCaves02 == 1 || player.getincell OblivionRDCaves04 == 1 || player.getincell OblivionRDCaves06 == 1 		set weareinOblivionohdear to 1; And so on for all the cells, god help me. 


(Not actual code-- just mocked up real quick with names.)

I really want to avoid mod clashes. While method 2 is more tedious, it seems more sensible, but it also seems incredibly inefficient. Since this is going to check for 20-odd locations at least, is it going to be draggy in execution? At what point does line length become an issue?

I'm obviously really new to this, but I'm honestly trying to work things out logically; any input is appreciated.

Thanks for your time.
User avatar
Ronald
 
Posts: 3319
Joined: Sun Aug 05, 2007 12:16 am

Post » Sun Sep 20, 2009 4:58 am

?How would I modify a Helmet, Cuirass, Greaves and Boots in NifSkope so they can be worn by a Skeleton without ?http://img694.imageshack.us/img694/7642/skeletonsmear.jpg happening?
User avatar
Roisan Sweeney
 
Posts: 3462
Joined: Sun Aug 13, 2006 8:28 pm

PreviousNext

Return to IV - Oblivion

cron