Quick Questions -- Quick Answers, The Eleventh

Post » Fri May 27, 2011 6:47 am

You can't create a new music type, but can stream custom music using the http://cs.elderscrolls.com/constwiki/index.php/StreamMusic function.


thanks :D
User avatar
Emma Pennington
 
Posts: 3346
Joined: Tue Oct 17, 2006 8:41 am

Post » Thu May 26, 2011 8:19 pm

how do you determine something from 23 to 6 in gamehours ( 11 pm and 6 am)
User avatar
Fluffer
 
Posts: 3489
Joined: Thu Jul 05, 2007 6:29 am

Post » Thu May 26, 2011 11:18 pm

how do you determine something from 23 to 6 in gamehours ( 11 pm and 6 am)

if ( gameHour > 23 ) || ( gameHour < 6 )
User avatar
Eibe Novy
 
Posts: 3510
Joined: Fri Apr 27, 2007 1:32 am

Post » Fri May 27, 2011 6:59 am

If your enemy is an NPC how do you make the him lvl up with you? do you need to flag PCleveloffset or what do you have to do to make them more equal to you?
and how do you make them a little stronger or a letter weaker?
User avatar
Catharine Krupinski
 
Posts: 3377
Joined: Sun Aug 12, 2007 3:39 pm

Post » Fri May 27, 2011 7:57 am

If your enemy is an NPC how do you make the him lvl up with you? do you need to flag PCleveloffset or what do you have to do to make them more equal to you?
and how do you make them a little stronger or a letter weaker?

http://cs.elderscrolls.com/constwiki/index.php/SetLevel
User avatar
Sarah MacLeod
 
Posts: 3422
Joined: Tue Nov 07, 2006 1:39 am

Post » Thu May 26, 2011 8:54 pm

How can I get a quest script/quest to run from the start of the game, without being received from an NPC?
User avatar
Benji
 
Posts: 3447
Joined: Tue May 15, 2007 11:58 pm

Post » Fri May 27, 2011 3:38 am

How can I get a quest script/quest to run from the start of the game, without being received from an NPC?

Use the Start Game Enabled flag on the quest.
User avatar
M!KkI
 
Posts: 3401
Joined: Sun Jul 16, 2006 7:50 am

Post » Thu May 26, 2011 10:42 pm

It doesn't seem to be working. Or maybe it's the script, which is VERY short. Lemme post it.
[script]
scn aaaSleepSaveDeathLoadScript2

begin menuMode
if GetPCSleepHours > 0
con_Save LastSlept
endif
if player.GetDead == 1
con_LoadGame LastSlept
endif
end[/script]

I don't know about the second part, but the first part isn't even working. I sleep, wake up, and no save file with that name is there in the load list when I go to check.
User avatar
Lisa Robb
 
Posts: 3542
Joined: Mon Nov 27, 2006 9:13 pm

Post » Fri May 27, 2011 6:44 am

It doesn't seem to be working. Or maybe it's the script, which is VERY short. Lemme post it.
[script]
scn aaaSleepSaveDeathLoadScript2

begin menuMode
if GetPCSleepHours > 0
con_Save LastSlept
endif
if player.GetDead == 1
con_LoadGame LastSlept
endif
end[/script]

I don't know about the second part, but the first part isn't even working. I sleep, wake up, and no save file with that name is there in the load list when I go to check.

Try replacing your first condition with isTimePassing.
User avatar
A Dardzz
 
Posts: 3370
Joined: Sat Jan 27, 2007 6:26 pm

Post » Fri May 27, 2011 12:43 am

Okay, but now when I die it says the savegame is corrupt...any ideas?
User avatar
Marion Geneste
 
Posts: 3566
Joined: Fri Mar 30, 2007 9:21 pm

Post » Fri May 27, 2011 7:57 am

Okay, but now when I die it says the savegame is corrupt...any ideas?

Probably because you saved the game after the PC died :shrug:
User avatar
Jordan Fletcher
 
Posts: 3355
Joined: Tue Oct 16, 2007 5:27 am

Post » Fri May 27, 2011 1:11 am

Hmm, okay, I think I've solved it, SHOULD work now. Thanks for all the help! ;)

EDIT: It's still broken. :(

Here's the new script
begin gameMode	 DisableControl 26	 DisableControl 27endbegin menuMode 1012;Sleeping or Waiting	 if IsTimePassing == 1		  Con_Save SaveSlept	 endifendbegin menuMode 1038;Load game menu	 if player.GetDead == 1		  Con_LoadGame SaveSlept	 endif	 message "You awake from a horrible dream!"end

User avatar
Marion Geneste
 
Posts: 3566
Joined: Fri Mar 30, 2007 9:21 pm

Post » Fri May 27, 2011 5:45 am

Two basic questions.

Do declared variables reset during separate iterations of a script?

Say I have

short variablebegin ScriptEffectStartScriptEnd


attached to a weapon enchantment. Each time the weapon hits, does the declared variable reset to zero?

Second question: Are nested begins possible?

Something like:

Begin ScriptEffectUpdate	   Begin OnHit Player	   EndEnd


Sorry if these questions seem very basic, but I'm new to programming in general, and I've been having a lot of trouble with these issues.
User avatar
naome duncan
 
Posts: 3459
Joined: Tue Feb 06, 2007 12:36 am

Post » Thu May 26, 2011 7:46 pm

PhiniusMaster: The reason why it gives a corrupt save is probably because you saved during menumode. Normally the game won't let you save during menumode so even if you manage to do it by script, the game won't like it. Perhaps setting a variable and then save right after the sleeping is done will work.

short isSleepingbegin gameMode	 DisableControl 26	 DisableControl 27	 if isSleeping		  set isSleeping to 0		  Con_Save SaveSlept	  endifendbegin menuMode 1012;Sleeping or Waiting	 if IsTimePassing == 1		  set isSleeping to 1		 ;Con_Save SaveSlept	 endifendbegin menuMode 1038;Load game menu	 if player.GetDead == 1		  Con_LoadGame SaveSlept	 endif	 message "You awake from a horrible dream!"end


Two basic questions.

Do declared variables reset during separate iterations of a script?

Say I have

short variablebegin ScriptEffectStartScriptEnd


attached to a weapon enchantment. Each time the weapon hits, does the declared variable reset to zero?
Yes they are reset, but I think the term reset isn't right in this context. Look at it this way, each time the weapon hits someone, it creates a new instance of the script. The spell effect is renewned but the script associated with it is replaced.

Second question: Are nested begins possible?

Something like:

Begin ScriptEffectUpdate	   Begin OnHit Player	   EndEnd


Sorry if these questions seem very basic, but I'm new to programming in general, and I've been having a lot of trouble with these issues.
No, nested blocks are impossible. The cs will yell at you when you even try to do it. :(
User avatar
Trey Johnson
 
Posts: 3295
Joined: Thu Oct 11, 2007 7:00 pm

Post » Fri May 27, 2011 10:39 am

Just so that I don't mess anything up: If a cell with a leveled creature list gets reset, then the actor spawned gets replaced by a new one from the leveled list (or none, should the "chance none" happen)?

If your enemy is an NPC how do you make the him lvl up with you? do you need to flag PCleveloffset or what do you have to do to make them more equal to you?
and how do you make them a little stronger or a letter weaker?
When you look at a NPC or monster, you see the "PC Level Offset" checkbox. Check it. Then "level" turns into "Offset". Adjust it accordingly (e.g. 5 = always five level above the player). Min and Max can be used to keep the actor in certain level ranges.
User avatar
Vickey Martinez
 
Posts: 3455
Joined: Thu Apr 19, 2007 5:58 am

Post » Thu May 26, 2011 10:19 pm

Thank you so much :D.

One last question: I was trying to use a two part script.

It began with a Begin ScriptEffectStart block, and used a Begin OnHit player block for the second part. It didn't seem to actually register the second part. Are script effect blocks incompatible with non script effect blocks?
User avatar
Eddie Howe
 
Posts: 3448
Joined: Sat Jun 30, 2007 6:06 am

Post » Thu May 26, 2011 11:16 pm

Magic effect scripts can only use ScriptEffectStart, ScriptEffectUpdate/Gamemode and ScriptEffectFinish. All other blocks are ignored in magic effect scripts.
User avatar
matt
 
Posts: 3267
Joined: Wed May 30, 2007 10:17 am

Post » Fri May 27, 2011 11:45 am

is there a way to force the player to be in firstperson?
User avatar
Dorian Cozens
 
Posts: 3398
Joined: Sat May 26, 2007 9:47 am

Post » Fri May 27, 2011 1:53 am

Magic effect scripts can only use ScriptEffectStart, ScriptEffectUpdate/Gamemode and ScriptEffectFinish. All other blocks are ignored in magic effect scripts.


Not that I know of. If there is it's probably an OBSE function, I'd ask in the OBSE thread to be sure.
User avatar
Lisa
 
Posts: 3473
Joined: Thu Jul 13, 2006 3:57 am

Post » Thu May 26, 2011 10:55 pm

I created a new idle which has facial animations to show my vampire's teeth when I am isSpellTarget (vampirism). I have two problems:

1.) The stock vampire feed animation no longer plays, even though it has completely different conditions than my new animation.
How does idle manager decide which animation is more important? Is simply a hierarchy system? My new group of animations is first in the hierarchy tree of idle animations. Am I to try and avoid ever having two conditions true at the same time?

2.) When I activate my vampire appearance, the facial animation takes about 20-30 seconds to kick in, and then go away after I hide my vampire appearance. I've heard pickidle might fix this if I add it to my script.
User avatar
Kyra
 
Posts: 3365
Joined: Mon Jan 29, 2007 8:24 am

Post » Fri May 27, 2011 6:34 am

For some reason, when the player dies, I get an error saying that it cannot load because the save game is corrupted. Any ideas as to why this may be? I have been trying to solve this problem for a while now with no luck. :(

Here is the code:
scn aaaSleepSaveDeathLoadScript2short isSleepingbegin gameMode	DisableControl 26;Quicksave control	DisableControl 27;Quickload control	if isSleeping		set isSleeping to 0		Con_Save SaveSlept	endifendbegin menuMode 1012;Sleeping or Waiting	if IsTimePassing == 1		set isSleeping to 1	endifendbegin menuMode 1038;Load game screen	if player.GetDead == 1		Con_LoadGame SaveSlept		Message "You wake up from a horrible dream that you've been killed, but after looking over yourself realize that you are fine."	endifend

User avatar
TIhIsmc L Griot
 
Posts: 3405
Joined: Fri Aug 03, 2007 6:59 pm

Post » Fri May 27, 2011 3:21 am

I created a new idle which has facial animations to show my vampire's teeth when I am isSpellTarget (vampirism). I have two problems:

1.) The stock vampire feed animation no longer plays, even though it has completely different conditions than my new animation.
How does idle manager decide which animation is more important? Is simply a hierarchy system? My new group of animations is first in the hierarchy tree of idle animations. Am I to try and avoid ever having two conditions true at the same time?

2.) When I activate my vampire appearance, the facial animation takes about 20-30 seconds to kick in, and then go away after I hide my vampire appearance. I've heard pickidle might fix this if I add it to my script.


1) I'm not an expert, but I *believe* it IS a heirachy system. I'd suggest adding a 'GetQuestVariable' to your new Animation, and setting it to '1' just before and ater your Animation plays. As I say, I'm no expert, and just going on what I've seen in my own experiments.
User avatar
naomi
 
Posts: 3400
Joined: Tue Jul 11, 2006 2:58 pm

Post » Thu May 26, 2011 8:43 pm

The game breaks down after the player dies. There are a ton of things that simply stop running at that point. You're much better off trying to catch the player before he actually dies.
User avatar
LuBiE LoU
 
Posts: 3391
Joined: Sun Jun 18, 2006 4:43 pm

Post » Fri May 27, 2011 3:31 am

1) I'm not an expert, but I *believe* it IS a heirachy system. I'd suggest adding a 'GetQuestVariable' to your new Animation, and setting it to '1' just before and ater your Animation plays. As I say, I'm no expert, and just going on what I've seen in my own experiments.

I fixed it just by lowering below the sleep animations in the hierarchy. I still have an issue with the fangs/vampire face animation to kick in quickly but maybe that is my interpretation of how to do facial animations. I'll play with my kf file and see if I can get it working better by tweaking some of those numbers.
User avatar
Darlene Delk
 
Posts: 3413
Joined: Mon Aug 27, 2007 3:48 am

Post » Fri May 27, 2011 5:13 am

1) I'm not an expert, but I *believe* it IS a heirachy system. I'd suggest adding a 'GetQuestVariable' to your new Animation, and setting it to '1' just before and ater your Animation plays. As I say, I'm no expert, and just going on what I've seen in my own experiments.

Same here. Apparently, when an action requires an idle animation to be player, the engine walks through the idle tree and picks the first record that satisfies it's conditions. This can be exploited to perform a custom idle at run time without the needing to manually edit the idle tree.
User avatar
Lynette Wilson
 
Posts: 3424
Joined: Fri Jul 14, 2006 4:20 pm

PreviousNext

Return to IV - Oblivion