Difference between revisions of "Questions"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Gamall
(edited at the same time ;))
imported>DragoonWraith
(→‎OnCollide: my version, and Gamall, I know well what he's doing wrong, don't worry, I've got it covered, can I just get my edit in please?)
Line 1,425: Line 1,425:
:::::[[User:DragoonWraith|<font face="Oblivion,Daedric Runes" size=3>D</font>ragoon <font face="Oblivion,Daedric" size=3>W</font>raith]] [[User_talk:DragoonWraith|<font face="Oblivion,Daedric" size=2>TALK</font>]] 15:25, 22 July 2006 (EDT): You misunderstand how scripted enchantments work (as do many people, much to my confusion). The scripts do not run on the weapon, they run on the thing that the weapon '''hits'''. Think about it - does a weapon enchanted with Damage Weapon break itself? No, it breaks ''the target's'' weapon. Enchanted weapons cause the effect they're enchanted with to be transferred to the target - no matter what the effect is. In the case of Scripted Effect, it causes the script to run on the target. The GetSelf would return the target's reference.
:::::[[User:DragoonWraith|<font face="Oblivion,Daedric Runes" size=3>D</font>ragoon <font face="Oblivion,Daedric" size=3>W</font>raith]] [[User_talk:DragoonWraith|<font face="Oblivion,Daedric" size=2>TALK</font>]] 15:25, 22 July 2006 (EDT): You misunderstand how scripted enchantments work (as do many people, much to my confusion). The scripts do not run on the weapon, they run on the thing that the weapon '''hits'''. Think about it - does a weapon enchanted with Damage Weapon break itself? No, it breaks ''the target's'' weapon. Enchanted weapons cause the effect they're enchanted with to be transferred to the target - no matter what the effect is. In the case of Scripted Effect, it causes the script to run on the target. The GetSelf would return the target's reference.


:::::In the case of your bludgeoning stick, I'd create a magic script that goes on the stick's enchantment, and script it like this:
<pre>
scn BludgeoningStickHit
Begin ScriptEffectStart
SetUnconscious 1
End
Begin ScriptEffectFinish
SetUnconscious 0
End
</pre>
:::::Just make the enchantment last however long you want the target to remain unconscious. Do, however, read [[ScriptEffectFinish]] for some important warnings about it.


-- [[User:Gamall|Gamall]] 15:29, 22 July 2006 (EDT) No no no, I said a "scripted spell effect", no "a script on the weapon". As far as I know, you can't do that from the weapon. And yes, used like that, GetSelf ''will'' yield ref to the weapon...
::::::-- [[User:Gamall|Gamall]] 15:29, 22 July 2006 (EDT) No no no, I said a "scripted spell effect", no "a script on the weapon". As far as I know, you can't do that from the weapon. And yes, used like that, GetSelf ''will'' yield ref to the weapon...


To avoid that, create a spell that reads like that
::::::To avoid that, create a spell that reads like that


<pre>
<pre>
Line 1,443: Line 1,460:
</pre>
</pre>


and enchant your weapon with it. It will run on any actor your weapon hits. Oh, and make sure to tick the "disallow Spell Reflect/Absorb" and "Script Effect Always Applies" to avoid unpleasant surprises...
::::::and enchant your weapon with it. It will run on any actor your weapon hits. Oh, and make sure to tick the "disallow Spell Reflect/Absorb" and "Script Effect Always Applies" to avoid unpleasant surprises...


[[User:Gamall|Gamall]] 15:31, 22 July 2006 (EDT) Edit : edited at the same time... ;) The thing with his script is that it is NOT a Spell Script...
:::::::[[User:DragoonWraith|<font face="Oblivion,Daedric Runes" size=3>D</font>ragoon <font face="Oblivion,Daedric" size=3>W</font>raith]] [[User_talk:DragoonWraith|<font face="Oblivion,Daedric" size=2>TALK</font>]] 15:35, 22 July 2006 (EDT): You don't even need to use the ref var for what he wants to do, actually, since the entire script would just run on the target.

Revision as of 14:35, 22 July 2006

Lip Sync

How can I get an ingame character to lyp sync to a voice file? I've seen it done before, for example in the senetile weapons modification. anyone know where the option for this is? (btw, I want to know cause Im trying to make a order for hobos to sing for money :D )

Fezex- 9:14 PM.

P.S. used the general edit function because I didnt find anywhere to add a question.

Dragoon Wraith TALK 15:58, 18 July 2006 (EDT): Can't help you, but just on Wiki in general - you did the right thing for this question, though usually you would put it at the bottom rather than the top (not a big problem). Also, sign your Talk posts with ~~~~.

3rd Party Applications

How might I place script variables into a memory location and be able to access that memory address from outside the oblivion engine (with a external program)?

If that is not possible, is there documentation on any way to use 3rd party applications to extend the features in the oblivion game engine?

While I'm sure this is possible, no one knows how, yet, on both counts. Sure too is that Bethesda will not help you. I'm also quite sure some people are working on it, considering the popularity of 3rd party apps for Morrowind. FPS Optimizer, MWSE, and MGE are possibilities that I think are pretty likely (the first for its popularity, the second and third because their authors are still active in the TES community, though they are currently working on other things). --DragoonWraith 11:10, 26 May 2006 (EDT)

Actor's name?

Is there a way to get an actor's name? --nehon

Dragoon Wraith TALK 16:23, 17 July 2006 (EDT): You can set an actor's name, and you can check it's ID, but you can't simply "get" the actor's name. There may be a way to get the player's name, I'm not sure. Otherwise, though, no, you can't. For most uses, you can use IDs, because each ID will only have one name that you'll (usually) know beforehand.
Of course, if you're trying to use this to find the name of characters from other mods, you're screwed. Sorry.

nehon : In fact i'm trying to make a scan spell that displays some of the targeted actor stats...and i would like to display his name first...but never mind. I will add it to the wish list. Thanks

Creating a new Soul Gem Soul Class

I was simply curious as to how one might be able to edit the size of Soul Gem Souls. The options available in th CS range from None to Grand. However, I have noticed that a max of 1600 points for enchanting your own items is far to little to make most want to truly do it. So, I would like to make larger sizes of souls available and attempt to scale them in rarity as well as needed souls within the game. Does anyone know how to edit these settings and create a new Soul size? -noexcusepunk

I don't know of any way of creating new soul levels, but I know how to make the level worth more enchanting points. Go into the game settings menu (found in the Gameplay Tab) and go to the setting "iSoulLevelValueGrand" and enter whatever numeric value you want grand soul gems to be. You can also set the other soul levels too. TheImperialDragon 23:03, 7 June 2006 (EDT)

Creating a designated area on normal ground to use Placeatme

I am working on a mod that will allow you to use one item to place another item on the ground in front of you. Because of the way I am using this, I want to restrict this from happening anywhere but my deisgnated areas. Designated areas will be a slightly normal looking piece of ground.

Can anyone offer any insight on how I could script this? If a player is on that ground then allow it, if they are not, give them a message? --Brainspackle 13:02, 8 April 2006 (EDT)


Sadly, there's no programmatical way of restricting it to a specific terrain type (because there's no way for scripters to detect what kind of terrain the player is standing on). You can, however, ensure that the player is within range of a specific object:

You would need a global variable (or quest variable), and two different scripts. The first script would be attached to the object you want to use, and would set the global variable to 0, then check on the next frame to see if that global variable has been set to 1. The second script would be attached to the range-checking objects, which would simply set the global variable to 1 if the PC was within range of them (using the GetDistance function). If the variable remains zero, then the player isn't close enough to any of the range-checking objects, but if the variable is reset to 1 after being set to 0, then the player is close enough. Then you would just place the range checking objects throughout the designated area, ensuring that all of the points in the designated area are covered within at least one range-checker's radius.

Another way is to use hard-coded coordinates, by ensuring the player's coordinates are within specific X and Y coordinates by using the GetPos function. This is, of course, a lot less adaptable, but could be a lot easier if you just have one or two designated areas on the map.

People had the same problem in Morrowind, by the way. =)

--JT 16:50, 27 May 2006 (EDT)


Omzy You could create a script for a SubSpace that sets a script value to 1 if the player has his x,y coordinates in the square around the center of the subspace. This could provide a good CS visual for you. Just be careful not to make your SubSpaces interfere with other actor's SubSpaces. Omzy

changing game settings by scripting

Is there any way to change game settings (FPCbasemagickamult for instance) by scripts? User runegui No.Talkie Toaster 15:17, 19 June 2006 (EDT)

AI Handling

How many different levels of AI handling are there? That is, the difference between how AI functions when the player is near the actor, far from the actor, waiting, fast travelling? What AI functions are allowed or not allowed depending on the level of AI handling? --DrGamut


Omzy This won't answer your question, but might help. There is an EvaluatePackage (evp) function that can be used at any time as long as the actor has a reference variable available. This is used to update the actor's actions from any script anywhere. Check out its usage in MS39 script (Nirnroot quest). The line is SinderionRef.evp. Omzy

Custom Classes

I've got a little question. Ever since I got the game, I've been obsessing over custom classes, as I did with Daggerfall.. and even Morrowind. But what has startled me this time is the string limiter for Custom Class names... It's set at 10. I couldn't clone the 'Witchhunte' class if I wanted to... let alone make a 'Necromance...' I realize that I could go into the CS and craft my Classes that way... but I'd rather know how to go into the CS and extend this string-limiter. If this is possible, will someone let me know? If not... expect a few new class mods, haha. User:Genesis999

Bow Damage

I'm wondering.. If i want to increase the damage that all bows do.. How would i do that?? I found a mod that was supposed to do that but i dont think it worked.. Any help would be great thanks User:Zsazoo

The most straightforward way to do this would be to edit every bow in the game manually to do increased damage. Just open the CS and navigate to the weapons heading in your Object Window and look for all bows. This is the sort of change that would very likely conflict with other mods, however, and because of that it may be better to create a new set of your increased damage bows and have a vendor sell them. Of course, if you're not planning on distributing this mod, then I wouldn't worry about that too much. JBurgess 00:38, 9 April 2006 (EDT)

Omzy Not sure if this would work, but its an idea. For an actor, you could make a script that does this type of thing:

ScriptName ActorScript

short charUsingBow

Begin OnPackageChange (Or other one-time condition like OnStartCombat)
     if GetWeaponSkillType 3  ;(Checks if actor is using marksman skill)
          Set charUsingBow to 1
     else
          Set charUsingBow to 0
     endif
End

short oldStrength
short strengthChanged

Begin GameMode
     if charUsingBow == 1
          Set oldStrength to GetActorValue strength
          SetActorValue strength (oldStrength + 50)
          Set strengthChanged to 1
     else
          if strengthChanged == 1
              SetActorValue strength (oldStrength)
              Set strengthChanged to 0
          endif
     endif
End 

Omzy

Reset Cell

Is there a way to reset a cell using script other than waiting 3 days for it to autoreset? --IMP 11:17, 3 April 2006

RevertWorld may be the command you're looking for, but I haven't tested it yet. (That is, if it's anything like Reset Actors in MWTalkie Toaster 15:53, 14 April 2006 (EDT)
Try the ResetInterior command. It may do what you're trying to do. TheImperialDragon 17:58, 1 June 2006 (EDT)

Blade & Blunt

My brother and I want to make a mod that would make Blade and Blunt weapons act differently. Unfortunately, I can see no scripting functions which would aid in this and although I've checked the settings page a couple times, it seems that any useful variables affect both Blade and Blunt. The only way I can think of at the moment would be to make enchantments and apply it to every Blade and Blunt weapon in the game, which would cause many other problems in the process.

Is there any way around this? Or if not, would it be possible to update the CS to advance its functionality?

--ZantarV


You can use GetWeaponSkillType to determine what type of weapon the player has equipped.

Scripting Question

Hey, I didn't see any discussion or question page, so I guess I can ask this here. I want to make it so if the player walks into a very large area, they will be given the option to go to a seperate worldspace and in that worldspace be at the exact same coordinates. Is it possible to set variables to the player's X, Y, and Z coordinates, load a seperate worldspace, and set the player's coordinates to those variables? If this is not possible, is it possible to do so over a very large area, like not with markers and things? Sload 18:25, 3 April 2006 (EDT)


Should work this way:

Scriptname GotoAnotherWorld

  float x
  float y
  float z
  float zRot 

begin gamemode 
  If WhatevverMustHappen == 1
    set x to player.getpos x
    set y to player.getpos y
    set z to player.getpos z
    set zRot to player.getangle z  
    player.PosWorld x, y, z, zRot,AnotherWorld 
  endif
 end

--JOG 11:11, 12 April 2006 (EDT)

Inventory Reference

I've been looking all over the place but I can't seem to find any way to reference what is in the player's inventory without knowing the specific refs to begin with. As a compromise, is there a way to return the ref for what the player has equiped or is wielding? Skrath 06:06, 4 April 2006 (EDT)

I have a similar problem. I want to get the reference of an object dropped by the player/actor for a script for that same object. The only way I can see doing this is by using GetSelf inside an onDrop block, but getSelf does not work on items that are placeable in inventory. Is there another way to do this? Teenk

Throwing items dealing damage. How?

I friend of mine have been thinking about a new spell or skill or just something that could be used to enhance the game. Like in HL2 they have the gravgun which enable you to throw items at your enemies at an incredible rate; dealing a lot of damage. And now he got this idea why not have some kind effect in Oblivion?

What I mean is being able to "throw" or "shot" items at the enemy and deal damage. How can you make that posible? Do I have to start rewriting the havok script or is there premade options that enable any item to deal damage on creatures and characters when thrown? If i have to work with scripting can I copy the effect in HL2 havok system or can I use the same script that arrows use while shooting a bow or crossbow?

--AKH|Arazand

Since traps (using physics) cause damage this probably shouldnt be a problem.Skjalg

That is true but, I've already tried that it didn't work. The items simply fell to the ground dealing no damage what so ever. And to be able to use the trap function when ever and where ever by player characters this is my problem. Since throwing items deal no damage on NPC's and only traps do how can I make players able to turn items into traps with in the game it self making it them able to deal damage that way, anywhere at anytime.
--AKH|Arazand

--User:Omzy

Here's two alternative approaches you might toy with:

Make a spell that has a graphic of the item instead of a particle effect. Launch the spell at a quick speed so it doesn't look like the item is floating.

Make a weapon called "Throw Items" that simulates the effect of a Bow but has the graphic of a hand throwing instead of a bow being plucked. Make the items have the same ability as an arrow to be shot from this weapon and follow the same physics as an arrow.

How you would do either of these, I have no clue. By aspiring to this task, I assume you know more about scripting and physics engines than I do.

--User:Omzy

Merging Plugins

Have you published any program which you can use to merge the different plugins you have? Isnt this necessary for a team of people who want to work on a mod together? Gerrie 22:49, 4 April 2006 (EDT)

Tes4's introduction of FormIds, while greatly improving mod stability, do so at a high price -- the ability to (easily) merge mods -- and even to communicate between mods. (E.g., two esps can no longer communicate through a shared global.) More info: Uesp: FormId and Uesp: Mod Integration. --Wrye 23:50, 6 April 2006 (EDT)
Concerning communication between mods through global variables I have posted an idea for a potential workaround on Wrye's thread on the TESCS forum. --xebeth 06:19, 8 April 2006 (EDT)
ScripterRon has released his Mod Merger. I have not tried it, but from communication with him, I believe that it's doing the right things. For links to more info (including other mod utilities), see UESP:Tes4 Programmers. --Wrye 17:36, 17 April 2006 (EDT)

Twitching the soulgems

Hi everyone,

I was looking to change the enchantements created by the enchantment center, I've already boosted up the charge of the grand soulgem, the charge of a grand soul, I need yet to modify the enchantement automatically created. Nothing better than an example :

I have a grand soulgem charged at 2000 (instead of 1600), a grand soul charged at 170 (instead of 85) and i still can't create a fortify intelligence greater than 10. I've tryed changing the enchantement called EnAppFortifyIntelligenceGrand but that didn't work.

And that's where I turn to you guys...

Dj23


Try going into 'Gameplay->Magic Effects' each different effect has a 'Base Cost' and a 'Constant Effect Enchantment Factor'. Increasing either of these numbers will allow you to put higher enchantments on your items (it's pretty wierd that increasing the cost increases the amount of enchantment, you'd think it would be inversed). 'Base Cost' will affect spell making and casting as well. Not really a tweak to the soulgems but I think it does what you want? - Chair5768


How did you edit the attributes of the soul gem? I can't figure out how to change the amount it can be charged, or the charge of a single soul. i.e., you have a grand soul gem charged at 2000 and a grand soul at 170. How do I do that?
Thanks!
darthbith

Island house

Hi im working on my small island house/dungeon mod and since the island is so far out to sea i dont want to keep casting waterwalk or try to script a ring to tele me back and forward i was wondering how to create a fast travel point if anyone could help me on this it would sure be nice of you --(unattributed user)


Easy! Just place a MapMarker object on the island, rotate it to where you want the player to be facing when they Fast Travel there, then double-click on it. This creates a new reference. First of all, fill out your reference name (you will probably call it something like "[YourInitials][YourPlugin]MapMarker"). Then, under the tab that says "Marker Data", click the checkbox, and fill out the necessary data. --JT 17:44, 27 May 2006 (EDT)
Or, use "Jason1_Pirate Ship.esp" a mod which gives the player his own ship. I used it and really liked sailing around Tamriel. Also there's a rowing boat mod somewhere you could use. It would be more realistic for the PC to travel there physically, not teleport, give him a book or note telling him to navigate by the stars and moons (where are Masser and Secunda in relation to your island. Plus, how does he get back? Use a boat. WaerLoga 24 June (EDT)

Cleaning up a plug-in

Seems to me there is no way to delete any of the objects you create. I've made a lot of stuff for my mod that isn't used anymore and I would like to get rid of it. Also, I somehow accidently modified some of the horses, so now my mod is not compatible with Call Steed + Saddlebags. How can I fix this?

-- Answer -- Open TES:CS, then when you're selecting your mod in the data file list, click details. Go and find the reference that you no longer want to be associated with your mod. Select it, and press delete. Accept the box saying it will be ignored. Now go into your mod, make any change to any aspect so you can save it, then save. The Ignored reference will no longer be part of your mod. -Tandem


JBurgess 23:01, 6 April 2006 (EDT) You might want to add this to the Solutions category.

Audio Settings for Dialogue Tutorial Video

I have a video tutorial made for correctly setting your .wav and .mp3 files to work with TES:CS, and how to link that to a character/dialogue route. The link is http://feinam.20megsfree.com/Oblivion/Misc/DiagTut.zip I just don't know really where to put it in this wiki. Could someone please add it for me? 3 ~ -Tandem

JBurgess 22:55, 6 April 2006 (EDT) Try the Tutorials Category on the main page - I haven't looked at your work yet but it sounds useful, and more people will find it there.

I went ahead and created a page for you in the Tutorials section. I would also recommend uploading your file to this Wiki and linking it from here. --Brainspackle 04:00, 8 April 2006 (EDT)

A not animated moving gate

I've been trying to make a gate, that would move when activated. So I've come across a problem. My question is, can "MoveTo" be used in this manner:

mySelf.MoveTo mySelf, 1, 0, 0

This should move the activator(the gate) 1 point into the positive direction of vector X. But it doesn't. Any clues, anyone?

--Lenko 09:01, 7 April 2006 (EDT)

Ok I've tried alot, and since nothing worked I presume that static objects/activators cannot be moved with a script. However the player and most likely other actors can be moved with this command. (Not sure about the items)

--Lenko 07:39, 8 April 2006 (EDT)

Try using setPos instead of moveTo since u'r just moving one axis. Also, I found moveTo very limited anyway.
--Teenk

Skill checking script

I'd like to create a script that triggers some actions when a player casts a certain spell depending on that players "something" skill level. I have tried some things but none seemed to work, any suggestions? Maybe I haven't been using the good script type so tell me what you think... Thank you in advance.

Ex: When a player would cast a custom made power-type spell there would be a text message depending on his sneak skill level and wouldn't be able to have the spell take effect if his skill level is below 95.

Hawkes

--Kkuhlmann 13:28, 8 April 2006 (EDT): You'll want to use a scripted spell effect. Some kind soul has put together a nice tutorial on scripted spells: My_First_Spell

If problems

Each time a put an if condition in a script, CS tells me there's an "End without matching Beging" error, I even copy/pasted parts from other scripts to make sure syntax was O.K. Why?

Here's one of my scripts I have tried to create in wich CS sees an error (It takes part when the player opens a book) :

      ScriptName EOLreinbook

      short read
  
      begin onActivate

	      if read == 0
		      activate
 		      set read to 1
		      ;add the spell zzreinsab in player's spell list
	      else
		      activate
	      end if
	
      end

Hawkes


try "endif" as one word ;-) Mrflippy 04:03, 8 April 2006 (EDT)

Lockable Container/Door Tutorial

Moved to How to make lockable doors & containers. --Kkuhlmann 13:24, 8 April 2006 (EDT)


Render Window Broken

So I'm working on my first dungeon after doing some spells and when I attempt to drag and drop pieces of the dungeon kit, nothing shows up. This could have something to do with the fact that the render window seems to be blank (grey background), and does not seem to have a render space loaded. Anyone know a fix for this? Issofir

Have you made a new cell, and loaded it? When the cell is loaded, the background is black, grey means it's not loaded. --Lenko 08:16, 9 April 2006 (EDT)

Okay well what I do is this: I start up the CS, load the Oblivion.esm, found a random dungeon cell and duplicated it, renamed it and deleted all of the objects out of it and I think this is where the problem is because I can find a created cell, and load objects from that cell and they work. Issofir 15:25, 9 April 2006 (EDT)

Getting GetSitting function to work

What's wrong with this script to get the "ISLSecretary" to sit?


ScriptName ISLsecretarysit

begin Gamemode
if ( GetDistance player < 50 )
	if ( getsitting == 0 )
			set ISLsecretary.GetSitting to 3
		endif
     endif
end

Treleth 00:00, 10 April 2006 (EDT)

--Kkuhlmann 08:38, 10 April 2006 (EDT): That's not how you get an NPC to sit. You can't set the value of a function -- GetSetting is a function that tells you whether the NPC is sitting or not. You can't use it to make the actor do anything. You need to create a package targeting a chair to get an NPC to sit in it (there are a number of ways that will work: Find or Travel targeting a specific (persistent) chair is probably the simplest).

Exterior Cell Location

I'm making a new city, and I made a new exterior cell, and it ends up beside a ruin, so when I flattened the land to make the city, it flattened the land beside the ruin totally messing it up, the thing is, I can't see the city from outside the walls. Basically there are 2 questions here

1.How do I choose the location of an exterior cell? -and- 2.How do I fix the affected cells? Treleth 00:04, 10 April 2006 (EDT)

-Omzy For the first question, You shouldn't create new exterior cells. Instead, modify existing exterior cells so that you know exactly where everything will be in the game. How do you select an exterior cell to modify? Go into the game and turn the console options that tell you your coordinate location and find a spot on the map that only has trees or bare landscape. Then go into the CS and find the Wilderness (x, y) cell depending on the coordinates you found in game and use that one. For the second question, well I think the first answer says it all. Just reload the Oblivion.esm in the CS and modify the existing cell to make it flat (do not mess with the edges of the cell). Somehow you're gonna need to transport your city from the old cell to the new one. Good luck figuring that one out =P

I don't think such drastic measures are required. I would advise using a walled city gate to link to your cell, put the exterior wall & city gate right up against Tamriel border so's player can't walk around the city, so you'll only have to do the front, then put the cell you built somewhere not in Tamriel World map, but linked to it via the city gate you placed against border. Look at "Pale Pass Fort" or the Painted Dream World, in Construction Set; they're exterior cells not in Tamriel, but linked to it. And as for cleaning up the mess you made at the ruin, see 16. Cleaning a plugin. (After re-locating your exterior cell, write down cell reference ID's for messed-up ruin area, (X,Y co-ords) save your esp, then before re-loading it, check Details tab, and delete the CELL references you wrote down, (being careful to make sure that's all you delete and not all your other hard work) this will restore the cell in which the ruin is located to it's original state, ie the CS will not load up the changes your esp made to that area as you have told it to ignore them. Now load it and save it again. Now it's clean. (Recommed reading Morrowind Mod Maker's Manual compiled by Edwardsmd and other tutorials for Cell creation.) WaerLoga 24 June (EDT)

Changing player start position

Where do you specify the start position of the player?
It's a rather simple question but I can't seem to find an answer.
--Trotim

I don't know if its the thing you mean, but the first lines of the Oblivion_default and Oblivion ini files start like this:
 [General]
 SStartingCell=
 
 SStartingCellY=
 SStartingCellX=
 SStartingWorld=
I haven't tried it so it may not work...
--Hawkes
I know those lines, but I wanted to know if it's possible to do without having to let the player modify the .ini... so is it?
--Trotim
Dragoon Wraith TALK 23:01, 24 June 2006 (EDT): If you want to avoid trusting the player to edit his .ini correctly, you could either provide a .ini file for him, or make the mod a .omod file, and Script it to edit the ini for you... the script would be this:
EditINI [General] SStartingCell "Cell"
EditINI [General] SStartingCellX X-coord
EditINI [General] SStartingCellY Y-coord
EditINI [General] SStartingWorld "Worldspace"
Forces you to use OBMM, though.

Black Soul Gems, Azura Style!

I'm thinking of doing a little black necromancer plug-in, and the core concept I wish to use is the re-usable Black Soul Gem. (Plus it would be pretty handy by itself)
I'm wondering if someone has a sample, or if you can point me to the re-usable part? I cannot seem to locate anything relating to allowing/dis-allowing the re-use of Azura's Star.

PS: I hope I edited this right.
- - Xero Nilson

According to Soul Gem both Azura's Star and Black Soul gems are hardcoded into the game. There may be a work around but it probaly won't be easy. --Nate1054 14:04, 23 April 2006 (EDT)

Would this workaround work around?: Say the item is called the Gem of Worms (or something). When this item is in your inventory, and empty, it adds a black soul gem to your inventory. When the game detects that you have one empty black soul gem less, and one filled black soul gem more, it removes both this filled black soul gem, and the empty Gem of Worms, and adds a filled Gem of Worms. When the Gem of Worms is emptied, the game adds another empty black soul gem to your inventory. -- Lumpy

Remove Armor Spell

I want to make a spell that would have the target only un-equip armor. I've tried the Remove item thing but that completely removes all of their inventory. How would I just have them remove their armor?

I dont want to remove weapons or such things. Just have them un-equip their armor. I want to make slightly easier kills while still having to dodge blows that do damage(unlike if they dont have any weapon) as well as being able to get their items after they die. Help!!!!!!


- - Zeratul

You could use removeitem, then add it again on death. Have you tried doing something like Armour_name.unequip?

Of course, the problem with those two is finding out what items the NPC has in their inventory, without checking for every piece of armour in the game. So it is possible, but might be very clumsy.--Evrae 15:19, 27 May 2006 (EDT)

How would i add the items back on death if they arent there anymore? could you tell me how to do that? can you use * for anything in a script? i could go *.unequip, so ill try that. [Zeratul]

--Omzy

You could create a new package that has armor unequipped for duration of an hour with the "must complete" option checked and use a spell effect script that uses the AddScriptPackage command. Since the calling actor will be the one hit with the spell, the spell's target will run the package. Will the npc keep the armor off during the fight? Not sure, but this is one avenue to pursue if you want to experiment.

--Omzy


Why not make a powerful version of the Disintegrate Armor spell? WaerLoga 24 June (EDT)

Get Current Bounty

Is there a way to get the current bounty, there is nothing about it under GetPCMiscStat, I also tried GetActorValue Bounty which didn't work, unless I am just doing something wrong.

--Nate1054 18:03, 22 April 2006 (EDT)

player.GetCrimeGold
--DragoonWraith 14:04, 14 May 2006 (EDT)

Quest Scripting Question

I have a problem with my quest script. Most is copied from the Nirnroot Quest... I need it pretty much to output Daydone == 1 after one day, so my quest works... I have little experience in scripting, but I am not too bad, yet this one has just stopped me from continuing... Here is my script

scriptname CQMeetClintonioScript

short DayDone
float CurrentDay
float CurrentTime

begin gamemode

;Wait a day to talk to Clintonio

if ( GetStage CQMeetClintonio == 30 ) && ( CurrentDay == 0 )
	set CurrentDay to GameDaysPassed
	set CurrentTime to GameHour
endif

if ( GetStage CQMeetClintonio == 30 ) && ( DayDone == 0 )
	if GameDaysPassed == ( CurrentDay + 1 )
		if GameHour >= CurrentTime
			set DayDone to 1
		endif
	elseif GameDaysPassed > ( CurrentDay + 1 )
			set DayDone to 1
	endif
endif

if ( Getstage CQMeetClintonio ==30 ) && (DayDone == 1 )
clintonioref.additem weapsilvershortsword 1
clintonioref.additem pickaxe01 5
clintonioref.additem tg11elvenhelmet 1
endif

end 

--Clintonio 4:08, 23 April 2006 (GMT)


--Omzy I don't see the problem with that script; In fact, i'm going to try it on my own mod because I have a part where you must wait two days. The only thing that I see being problematic is the last part. You need to set DayDone to 0 in the last if/endif block after you add the items or they will continually be added each frame of the game forever until the stage changes. Or you could change the quest stage there.

(update)As for the script just plain not working, I'm having the same problem. Thanks for the code, though.

--Omzy


Hmm... Maybe the game is continually setting Gamehour to CurrentTime? Perhaps you could introduce a variable that is set to 1 after the game notes when the quest started? maybe something like this?
scriptname CQMeetClintonioScript

short DoOnce
short DayDone
float CurrentDay
float CurrentTime

begin gamemode

;Put a Return if the stage is already greater than 30 here

;Wait a day to talk to Clintonio

if ( GetStage CQMeetClintonio == 30 ) && ( CurrentDay == 0 )
	if ( DoOnce == 0 )
		set CurrentDay to GameDaysPassed
		set CurrentTime to GameHour
		set DoOnce to 1
	endif
endif

if ( GetStage CQMeetClintonio == 30 ) && ( DayDone == 0 )
	if GameDaysPassed == ( CurrentDay + 1 )
		if GameHour >= CurrentTime
			set DayDone to 1
		endif
	elseif GameDaysPassed > ( CurrentDay + 1 )
			set DayDone to 1
	endif
endif

if ( Getstage CQMeetClintonio ==30 ) && (DayDone == 1 )
clintonioref.additem weapsilvershortsword 1
clintonioref.additem pickaxe01 5
clintonioref.additem tg11elvenhelmet 1
;and whatever command that sets the stage to == 40 would go here.
endif

end 
I don't know if this'll work, but let me know how it goes. TheImperialDragon 22:33, 7 June 2006 (EDT)


--Omzy

I've been working on mine and i finally got it to work. I don't know why this works and the other script doesn't, but i'll post mine exactly:

ScriptName VoduniusNucciusQuestScript

short stage

float CurrentDay
float CurrentTime
short twoDaysDone

Begin GameMode

        SetStage VoduniusNucciusQuest stage

	if stage == 21
		if CurrentDay == 0
			set CurrentDay to GameDaysPassed
			set CurrentTime to GameHour
		endif
	endif

	if stage == 21
		if twoDaysDone == 0
			if GameDaysPassed == ( CurrentDay + 2 )
				if GameHour >= CurrentTime
					set twoDaysDone to 1
				endif
			elseif GameDaysPassed > ( CurrentDay + 2 )
					set twoDaysDone to 1
			endif
		endif
	endif

	if stage == 22
		StopQuest VoduniusNucciusQuest
	endif
	
End
  • I don't reccommend using the "stage" variable in your script. I need it for a rare circumstance in my quest topic result scripts.

The change is that instead of

               if (stage == 21) && (twodaysdone == 0)
                  stuff
               endif 

I used

               if stage == 21
		      if twoDaysDone == 0
                           stuff
                      endif
               endif

The &&, even though it works in the Nirnroot script, somehow didn't do it for me. Tell me if it changes things, and perhaps why...

Also, TheImperialDragon, the local variable CurrentDay in his script is reset within the same block as the code for the CurrentTime variable. By changing that variable, the condition will not allow modification of either variable more than once...UNLESS the GameDaysPassed variable is 0 (first day?), which is unlikely if the stage of the quest is 30.


I didn't change the variable - or did I? Well, the intention was that the game check the time as soon as step 1 of the quest is completed. When the time is one day after the snapshot, the game starts step 2 of the quest. The DoOnce command was so that when the game checks the time, it doesn't do so every frame, that is to say, set step 1's beginning time every frame.
Well anyway, your script works so there's not much point in debating mine anymore. I had a look at the article If, and it would seem that there is no immediate difference between the two variants you used. Perhaps this is just a bug in the software? I can't explain why the scripting system would see a difference between them... The Imperial Dragon 23:53, 7 June 2006 (EDT)
When you use parentheses (which you usually don't need to) you need to put spaces around them.
 if ( stage == 21 ) && ( twodaysdone == 0 )
   stuff
 endif 
--JOG 13:23, 15 June 2006 (EDT)

Destroying/Removing Item/Object Created by PlaceAtMe Function

Is there an equivalent of PlaceAtMe function that will remove/destroy an item/object? I've been searching for this but all I've found is a way to disable placed item.

Teenk

--Mrflippy 04:16, 30 April 2006 (EDT): Disable is what you want to use. Read more here.

How does an object finds out in which cell it is placed, using a script attached to the object?

The purpous is simple. Lets say I have a chest that should consider by itself via a script if it is placed in a player owned cell, and if so should react accordingly. After looking at all the Cell functions only one looks promising and that is IsCellOwner. However this function need the cell id as the first parameter, what means that the object script calling it would need to know in which cell the object is placed. Unfortunately there seems to be no function to get the cell id of the cell the object is in, and therefore the forementioned function does not do the job.

Have I missed something or is it simply not possible?
If this can not be achieved, does any of you know a way around this?

XiDragon 15:02, 29 April 2006 (GMT+1)

Use "player.IsInMyOwnedCell == 1 && mycontainer.GetInSameCell player == 1". -- Nezroy 15:58, 18 May 2006 (EDT)

Changing What Attributes Do?

I've been playing with the idea of making a couple small changes to Oblivion, but can't make any headway. Initially, I wanted to change the way Willpower works; perhaps have it give a bonus to my spells (akin to the way that Strength/Endurance helps melee characters). What I thought would be a simple, 5 minute test has consumed my entire day. Maybe I missed something obvious, but I can't see any way to change what the attributes do. Am I attempting to mess with something that's out of the CS's reach?

Tamin 20:24, 8 May 2006 (EDT)

--Omzy Make a script for the player for the stat that increases the value of their spellcasting skills. For example, if my willpower increases by 1, all my skills like Destruction, Illusion, etc.. will increase by 3. In this way, those that focus on developing willpower will gain more magical ability faster. To see how much willpower has changed make sure the script knows the willpower before leveling and after leveling and find the difference. Then just AdvancePCSkill skillName (changeInStat * 3). How would you call such a script? Thats the hard part. You could attach it to an object called a Mages Stone (or words to that effect) and make sure this item is equipped before processing. This would make for an interesting mod. You could also attach it to a quest that starts at the beginning of the game and never ends (not nearly as cool).

(update)Actually, as I've learned more about global scripts, they are nearly as cool.--Omzy 13:12, 15 June 2006 (EDT)

Accessing NPC Inventory onActivate

I need to use a script to access the inventory of a mannequin NPC that is fixed in place. Any mannequin or companion mods I've looked at use a separate container object for the NPC, but surely there's not a separate container for each NPC in the game. What is the script command for onActivate that would open the NPC like a container?

Omegacron

Actually, all Actors (at least the Player and other humanoid actors) are countainers. (Or at least can pretend to be containers). Think about when you pickpocket an NPC. --Tegid 14:22, 18 May 2006 (EDT)

I have yet to find a way to activate an NPC's inventory directly. Not only is pickpocket a good example, but also when you're looting a dead corpse. For a mannequin it would be particularly handy because you could see what they actually have equipped currently (just like when looting a corpse you can see which items are equipped). It'd be nice to figure out a way to do this... -- Nezroy 15:55, 18 May 2006 (EDT)

--Jackan 21:34, 19 June 2006

I found this on wiki, dunno if it helps. But its worth a try. http://www.tescreens.be/oblivionmodwiki/index.php/Reznod%27s_Mannequins

How do I know which packages and factions a summoned creature has?

I am looking to create a spell that summons 2 - 3 monsters that act as summoned creatures. I have found that I need to use the right packages, or this creature acts like a wild one, and not a follower. I have yet to find the right package, and do not know if I need to alter its factions, so it does not get attacked, or start attacking random civilians.

--Pntm 21:42, 18 May 2006

Factions: Try using Player Faction & Imperial Legion Friend, but maybe you should look at the factions and then make your own custom version? I put scaled-down rat packs & zombies in Oblivion Worlds and made the zombies Daedra faction to stop them getting slaughtered by the Daedra. I left the rats as just Creature Faction and laughed as they attacked and got hacked to bits by Dremora. As for the Packages, I believe what you're looking for is Accompany. Look at Martin And Jauffre's packages; they follow you to Cloud Ruler Temple and fight when you fight. Or look at the Packages in one of the Companion Mods, like Ariana Trudeaux.esp. She's listed under NPC form Imperial: "CompAri"WaerLoga 24 June (EDT)

Can a script be used to rotate an object clockwise on the Z axis to create a constant spinning effect?

(This question has been moved to the Solutions page).

--Omegacron 11:06, 30 May 2006

Problem Modifying Plugins with another Plugin

I am creating a simple mod that connects all of the houses I've downloaded with teleport doors. I placed a door in each house, and then I connected them with teleporters in another cell. The problem is that every time I place a teleport in a house from a plugin, the TES Editor creates a duplicate cell just for the teleport, saying that the cell is no longer unique. I've narrowed it down to conflicts between plugins because the teleporter I placed in Rosenthorn Hall (a stock Oblivion house) works just fine. My plugin loads after the others, so I don't think it's a load order problem.

Please, how do I modify other plugins using my own? --Wahh

You can't. Oblivion's mod isolation specifically prevents this. -- Nezroy 15:02, 25 May 2006 (EDT)

How real is the find package

I am not sure how 'real' the find package is in regards to the game world.

According to the wiki if a find command is run on an object the item will be activated, causing it to be picked up.

If you look at "M'aiq the Liar" (ID:Maiqtheliar) his AI list has only 3 elements.

  • A find command to collect 20 callipers per search
  • Two travel commands

If the callipers are really being collected, why don't they end up littering his inventory? Why doesn't he end up over-burdened? There are no AI commands for selling of these objects, or putting them down anywhere.

I was trying to make a quest in which a character goes around the gameworld in search of a type of item which the player must then steal from him. But the character does not seem to keep the items he 'picks up'.

I would like to hear others opinions of this package and ways to fix my problem. Thank you.Decoup 20:33, 27 May 2006 (EDT)

In my experience, it does work, but it only works within the location of the package. NPCs won't go through doors to find items, so if you place an NPC with a Find Weapons package outside the door to a blacksmith's shop, he will search outside in the radius given, but will not enter the shop. If no valid items exist within that area, he will do nothing or default to wandering. As far as I've seen, if the items are found, they ARE placed in his inventory. I haven't looked at Maiq's packages specifically, but I imagine there just aren't any calipers in the areas he explores. Try using the console to place a set near on the ground near him; he will most likely pick them up. Side note: NPCs won't pick up items you drop from your own inventory, because they are considered 'owned' by you. This applies even to characters who would normally steal from other NPCs. Scruggs 09:13, 28 May 2006 (EDT)

Resurrect Crash

I have made a simple spell to resurrect an NPC but it does when I use it the game crashes. It is an on touch spell with the following script attached.

scriptname DCRessurect

Begin ScriptEffectStart
		resurrect
End

I don't understand why it does not work.Decoup 20:36, 27 May 2006 (EDT)

The resurrect command, to my knowledge, is not actually meant for use, only for testing, since (at least, it did, in Morrowind), it completely resets the NPC's inventory. I wouldn't be surprised if it didn't work at all in a script...
I'd suggest looking at the Staff of Worms's enchantment's script. It revives things somehow, no? --DragoonWraith 22:28, 27 May 2006 (EDT)
The staff of worms uses the spell Reanimate. This spell makes them get up and walk around but they are not alive. Their eyes are black and you can't talk to them. Their AI commands don't take effect either.
The resurrect command simple brings the actor back to life in their normal state so that they can continue to function in the game as they did before death. This way they can go back to selling me mead or repairing my items.
The resurrect command does work. It is used is 22 scripts in the game. They are listed at:
http://cs.elderscrolls.com/constwiki/index.php/List_of_function_appearances_in_scripts#Resurrect
I just don't know why I can't use it.Decoup 23:16, 27 May 2006 (EDT)
Ah, OK. I didn't realize that Reanimate was one of the default spell effects. That's kind of dumb, but understood.
And yes, those scripts do use it... so Resurrect has been given a lot more potency than it had in Morrowind. That's good, anyway. Well, how about this:
ref Self

Begin ScriptEffectStart

  set Self to GetSelf
  Self.Resurrect

End
When I looked at those scripts, they all seemed to provide a specific target, so maybe that will make the script happy. The other possibilities are that Magic Scripts aren't meant to go on dead actors (though I doubt this, since I'm currently doing it in a mod I'm working on - but [and this is interesting] killing an enemy triggered the ScriptEffectFinish portion of my script, even though the script at least seemed to continue to work on the enemy's corpse), or else resurrect doesn't work on magic scripts (that seems [to me] like a bizarre limitation, but who knows?). --DragoonWraith 23:37, 27 May 2006 (EDT)

Problem Solved
I tried using the getself method before posting. Like many of the commands in this language not including a target applies the command to the calling object/actor. It turns out that the crash stopped when I added the optional flag. So my script is now

Begin ScriptEffectStart
   Resurrect 1
End

I have updated the description of the command on the wiki with a small note that the optional flag may be required in some instances to prevent the crash. But thanks for trying to help anyway.Decoup 23:42, 27 May 2006 (EDT)

Yeah, I'd noticed you updating the other article, good work! And I know that not supplying a reference implies that it's on the calling actor, but you never know. Good work figuring it out. --DragoonWraith 23:46, 27 May 2006 (EDT)

Determine Enemy

I can't find a command that will tell you if an npc is an enemy of another. For example the GetCombatTarget function tells you who the npc is in combat with. What if you just want to know if an npc is the players enemy, or if npc a considers npc b to be an enemy.

I am specifically looking for a command that will tell you if the character will attack the player on sight. There is another command called GetShouldAttack but this does not indicate if they are an enemy, just if they are currently capable of making an attack and can see the character.Decoup 20:45, 27 May 2006 (EDT)

I think you could use this:
if ( GetDisposition player < GetActorValue Aggression )
I haven't actually tested this, but a script I've been working on by addiktive (the Danger Sense mod) uses that, and I assume it works... it certainly returns the correct value for enemies who cannot detect me, I assume that if they cannot detect me, then they do not have me as their combat target. --DragoonWraith 22:32, 27 May 2006 (EDT)

Sheathing Weapons

I cant seem to find the script command to remove thigns from your inventory when you sheath your weapon.

IE i am trying to write a alternative bound weapon script I am wanting the script to act just like the bond items liek when you sheath your weapons they disappear from your inventory and such and have a time limit on them as well to where they are remvoed from your inventory when the spell expires.

Dragoon Wraith TALK 11:37, 31 May 2006 (EDT): Use player.IsWeaponOut == 0 to determine that the player does not have their weapon out.


Specific Pathing Question

Lets say I have interior cell 1 and ineterior cell 2. They are linked by 2 doors. A and B. I have NPC Fred. He is scripted to travel between the cells. For story reasons I only want him to choose door B. Again for story reasons I only want door A to be used by the player. Because the luck of the draw, Fred always chooses door A.

I have tried many things to get him not to use door A, but have not had any luck. Removing the pathfinding just gets him to walk into a wall endlessly. Locking the door does not seem to help. Making the owner of the door the Player doesn't seem to phase him.

Vuohi 16:03, 1 June 2006 (EDT)

I believe I have the answer. You need to use path finding, but only create the paths to door B. also make sure the ai paths don't run too close to door A or the character may move to the closest point then leave the path and head straight for the door. I also suggest that you use the blue pathnodes because they take priority. See Pathing_and_Playtesting for more information.Decoup 22:23, 6 June 2006 (EDT)
I have a slightly different approach. You can use a SubSpace zone so that the NPC regonises that he/she should only use that door. See the article for specifics on how they work. Anyway, either one of these methods (mine or Decoup's) have potential, so give them both a try. TheImperialDragon 22:41, 6 June 2006 (EDT)

'F' key crashes TESCS

This appears to happen fairly randomly, but certain objects such as dungeon blocks and blood decals crash the game when 'dropped' using the F key. Could anyone suggest why?

No clue, and I'd reccomend you sign your comments in the future. One other thing I've noticed is that trying to edit too many NPCs in a row (I'm talking hundreds), causes the CS to say it failed to create a new tab, and if you still try to edit more NPCs, it crashes. --MaXiMiUS 00:20, 8 June 2006 (EDT)
This happens when non-havok'ed objects (dungeon-tiles for example) fall a long distance (500+ units) usually because there is nothing below them. My workaround is to use "T" first and drag them over existing tiles before letting them fall down.--JOG 08:10, 11 June 2006 (EDT)

Is something wrong with my CS or not

I don't know if all users are effected by this or just me, but the findin the CS 'Edit' 'Find...' does not do anything. 'Find Text' works fine, but find does nothing at all. Is it just me, and is there a solution.

I also noticed that when I open CS before I open any moduals there are some opbejcts already in the Object Window.

  • 2 spells, DefaultMarksmanParalyzeSpell and DefaultPlayerSpell
  • 3 effect shaders, effectAbsorb, effectReflect and LifeDetected
  • Some items in the misc, and clothing catagories
  • 2 containers

Could this be related and does anyone else have the same problem?

Omzy When I open my CS i have some random items in there too, not sure about the find option though.

Thanks for the help. Can someone please tell me if their find button works? In the morrowind CS my find button is functional and displays a list of objects which I can search for. Does anyone have a functioning find button in Oblivion CS?Decoup 05:11, 9 June 2006 (EDT)

Come on guys. Its a simple question. Can anyone please just open the CS and click 'Edit' 'Find...' and tell me if a window pops-up or not. I just want to know if I am the only one working without a find command.

No, Edit/Find doesn't work, it was pretty pointless in Morrowind (opened a list of objects and when you selected one opened the render window at the first place where that object was placed.) And it's completely disfunctional in Oblivion, guess they just forgot to remove the menu-entry. the "Use Info" Option in the Object Window's context menu is much more useful than Edit/Find ever was.--JOG 08:03, 11 June 2006 (EDT)
Well, considering that it has been days since you asked if anyone has a functioning Find button, I doubt anybody has got it working yet, unless they've made modifications to the program itself. As for me, yes I've got the same problem. I would just ignore it. The Imperial Dragon 12:55, 11 June 2006 (EDT)
As above. (WaerLoga) (EDT)

Revert changes in an esp file to base/master file state

Hi,

I would like to ask, if say you accidentally delete a critical path in a storyline cell (anvil fighter's guild!) but didn't realise it until the next time you open the mod to work on it further..

Is there any way you can revert the cell to its original format as per the master file?

I thought that if the .esp file was in ascii format, one could just open it and remove the lines that describe the errorneous change.. but unfortunately its in binary format.

Any suggestions/help would be appreciated!


I know how to fix something like this (and you don't even have to redo any work from after the mistake!). open the loading window, load your plug-in When your plug-in is loaded, click on the load folder again, highlight your plug-in, and click on the Details... button. Now, find your mistake in this data and delete it (set it to be ignored). You should be able to do this anytime you make a mistake with the CS. The Imperial Dragon 22:39, 8 June 2006 (EDT)

Causing NPC/Creatures to mimic an action the player takes

hey, El`derina here. I was wondering how i would cause a creature or NPC to play attack animations at the same time the Player does... i see no function for IsAttacking or something like that and no blocktypes either that would assist in this. Thanks in advance if anyone can fiqure this out.

Omzy Do you mean you want the npc to be a mirror image of the player's animations? That might be difficult. There is a function for combat-> IsInCombat. Of course, if you wanted two npc's to "fight" without hurting each other, like for training, you could create a training package that makes each actor play their combat idles during the package and set the package to run whenever you want with conditions or the AddScriptPackage function. You might also write a script for a certain actor that makes him run the script when the player is near and is in combat.

El`derina No, not quite.... im working on wolfform for my mod. what i need is for the wolf to play its attack animation whenever the player attacks- problem is that the only possible way to detect this that i know of is having the player equiped with an enchanted weapon that sets a global varible for my other scripts to run off of whenever the player hits something... and that wont even make it work all the time since you'd HAVE to have a monster there to hit it. what i need is an alternative way to detect if the animation is playing for the player, or if a keyboard stroke was made to attack/block. so far i have everything but this one thing working- may have to make it a travel form only if i cant find a way around this

As for now, there is no way to find the current animation playing. I've spent hours and hours trying to figure out when the player is blocking. I even set up a collision box that travels with the player so that when the player blocks, the shield moves into the collision box and the shield's OnCollision block runs. None of it worked. It appears that an object involved in animation does not execute its own code and does not really involve itself in the physics system, only when it's on the ground. I put in the wishlist a request for some animation functions. There are a lot of cool things to be done if this feature is implemented. --Omzy 11:10, 19 June 2006 (EDT)


I read somewhere, (maybe Scripting for Dummies by GhanBuriGhan), to use sound files to determine what the PC is doing. Check out the Sentient Weapon mod, as that weapon speaks and gives appropriate vocal reactions to enemies, (it knows what RACE it's hitting, down to specific DAEDRA, "I'll rip all your legs off insect!" for Spider Daedra and "Bad kitty!" for Khajiit, type of thing). WaerLoga 22 June (EDT)

Raising or lowering the water level using a script?

Is there any way I can have the water level change by using a script, like in Morrowind, Tribunal? I couldn't find any functions that might do this... The Imperial Dragon 22:23, 9 June 2006 (EDT)

Alright, anybody remember going against the Black Dart Gang, and pulled the torch on the wall, and the water level rising to drown every enemy in the area? How would I do that in Oblivion? The Imperial Dragon 13:01, 11 June 2006 (EDT)

Any ideas at all are very welcome... The Imperial Dragon 18:58, 12 June 2006 (EDT)

I am not quite sure where I saw this, but something in my memory tells me that there is an option somewhere in the construction set for a cell to change if the water is at normal height or not.--Omzy 19:47, 12 June 2006 (EDT)
No way to change the Waterlevel in scripts. You can define the waterlevel for each cell in the cs, but you can't change it. Drowning traps can be realized, though a bit awkwardly: instead of the water move the dungeon tiles (cf. elevator).--JOG 17:15, 13 June 2006 (EDT)
Sink the dungeon! Brilliant! What about walls closing in on PC? (WaerLoga) (EDT)
Not a bad idea, actually... The Imperial Dragon 00:15, 22 June 2006 (EDT)
Except this is what the Bethesda game designers already did in their games... The Imperial Dragon 00:27, 22 June 2006 (EDT)

Stopping Levelled Lists from spawning NPCs at night?

I can't seem to stop levelled lists from spawning NPCs at night. I only want these NPCs to spawn during certain hours of the day, and disabling them from the NPCs script is ineffective (dozens upon dozens of disabled NPCs). I've tried attaching a script to the levelled lists that should force them to disable during the night, but the NPCs continue to spawn, any ideas? --MaXiMiUS 14:19, 11 June 2006 (EDT)

How about you make a script that spawns the enemies on a special marker (using PlaceAtMe) instead of the leveled list, and using RandomPercent, and make it so that it has a Return command during the night? You'd have to make a special marker though, and do a lot of scripting... The Imperial Dragon 14:39, 11 June 2006 (EDT)
Because there's already 1540 levelled lists placed? ;) --MaXiMiUS 17:39, 11 June 2006 (EDT)
Ah, I see what you mean... These are the bandits/marauders all over Cyrodil I guess? What are you trying to do? The Imperial Dragon 18:03, 11 June 2006 (EDT)
Randomized travellers between towns, on roads. Thing is, I don't want any new ones to spawn at night, only during day. --MaXiMiUS 18:04, 11 June 2006 (EDT)
Hmm, is there any way to change the odds of a leveled list generating an enemy, similar to how the game changes the types of enemies you encounter in quest dungeons (ex: Dark Brotherhood quest-> the dungeon you find Roderic and kill him is usually a marauder lair except while the quest is active)? The Imperial Dragon 18:11, 11 June 2006 (EDT)
Probably not, maybe it just enables a disabled NPC? :-/ --MaXiMiUS 18:15, 11 June 2006 (EDT)
Then what happens to the marauders who usually populate the dungeon? The Imperial Dragon 18:18, 11 June 2006 (EDT)
Disabled? But that wouldn't make sense! That is exactly what I tried to do, and it did not work! O.o' --MaXiMiUS 18:20, 11 June 2006 (EDT)


Could you post your script code?--Omzy 18:59, 11 June 2006 (EDT)
I think I've got the solution, just a sec... The Imperial Dragon 19:03, 11 June 2006 (EDT)
Where to start? I think you have to use a global script to disable the lists by giving one of the lists an Editor Reference ID, then disable the list by typing the ID. Have a look at FortSutchinterior. At the base of the stairs going into the dungeon is a marker. Double click on it and you'll see that its Reference ID is Dark07DisableMeEmilREF. This ID gets disabled in the quest Dark07Medicine stage 10, so it is a reasonable to assume that because no other reference has such an ID, the game assumes that each list is to be disabled. The reason disabling the Editor ID wouldn't work is probably because that is not how References are treated in the game, for example, JanusHassildor is placed into the world and called JanusHassildorREF. It works in Fort Sutch because the lists have a reference ID. Such is the way of Sutch (sorry for the really bad pun). The Imperial Dragon 19:11, 11 June 2006 (EDT)
Hmm, but would there be a way to disable all of them without having over a thousand persistant references? Perhaps some sort of global-check in their script that could stop them from spawning anything? --MaXiMiUS 19:33, 11 June 2006 (EDT)
begin GameMode
if ( GameHour >= 19.5 || GameHour < 6.75 ) && GetDisabled == 0
	Disable
elseif GetDisabled
	Enable
endif
end
--MaXiMiUS 19:46, 11 June 2006 (EDT)

After reading my own code, I think I spotted how I messed up. Can't test it now, though! --MaXiMiUS 19:48, 11 June 2006 (EDT)

Nope, it doesn't work properly, and having that many levelled lists with scripts running is a massive FPS hit. I dropped 15FPS, down to 3! *scratches idea* --MaXiMiUS 22:48, 12 June 2006 (EDT)

Getting the spellID of a spell casted on the player

Any ideas? There has to be a solution somewhere.--Omzy 15:17, 12 June 2006 (EDT)

You should sign your comments, and technically there is. You can attach scripts to the Player NPC, and they will actually run. Just do some IsSpellTarget checks on the player. No idea how we'd go about with multiple scripts on the player and conflicting plugins though.. --MaXiMiUS 12:44, 12 June 2006 (EDT)

Sorry for not signing the comment above, completely slipped my mind--Omzy 15:17, 12 June 2006 (EDT)

Using IsSpellTarget not only requires the ID of the spell within the command itself, but only returns whether or not the player is being affected by the specified spell. I suppose I could write if/then statements for every single spell, but that would be very time consuming, as there are some few hundred spells. Also, this would only allow my mod to work for spells that are already created. I'm thinking of using an OnMagicEffectHit block with no specified spellID, but I've been stumped at what kind of code I would need to put inside to find the spellID. --Omzy 15:27, 12 June 2006 (EDT)

  • I'm still learning myself, but I'm pretty sure there is no way to get a collection of all the spells effecting the player at any given moment (since in 99% of such cases you would be testing it against a specific spell anyway). I'm wondering what you are trying to do generally. There may be some other way to achieve what you are after without getting a list of all the spells affecting the player. What's the end result you are after? Jduvall 20:03, 12 June 2006 (EDT)


Well, for now this is a secret project, but for this specific aspect, I need to determine the id of the spell that is casted on the player at the moment it hits. So, basically, I need the id of the spell at the ScriptEffectStart block. I've been pondering whether I should add a script block to every castable spell in the ScriptEffectStart that sets a global variable to a specific number that corresponds with the spell. That would be incredibly time consuming, but I could pay my little brother =P
See WaerLoga's reply to :"Causing NPC/Creatures to mimic an action the player takes" above WaerLoga 22 June (EDT)

Getting keystrokes

Is there a way to see if an actor presses the button for a specific command? For example, if the actor presses the block button?

I'm not sure, but you could check the article Key input. I'm not sure if it'll be any help, but it has a similar goal to this one. The Imperial Dragon 22:14, 12 June 2006 (EDT)

That article confirmed my fears. Apparently, there is no way to detect when the player presses their block button. I need an alternate method of doing this. I really think there might be a way by determining which animations the player is doing, like blockidle.kf, but does anyone know how to control these? Or even better, apply a script when a specific idle or animation plays.--Omzy 23:53, 12 June 2006 (EDT)

Detecting if a NPC is moving of their own free will?

For something I'm trying to work on, it would be very useful to tell if the NPC is moving on their own. I need to be able to differentiate between movement, and standing still/getting pushed around. I'm thinking of using GetPos commands for this, but I'm not entirely sure how I should go about it. --MaXiMiUS 23:29, 12 June 2006 (EDT)

Shader effect "PC Hitted"

If I want to use through script the graphical effect of the hit being, as I must make? As an example when it is taken the sigil stone I seal but I have not understood a lot to us in the scipt.

You could probably use a trap (with low or no damage for only the effect).--Omzy 12:36, 13 June 2006 (EDT)
TriggerHitShader--JOG 17:00, 13 June 2006 (EDT)

What happens with Travel packages?

If a NPC has multiple travel packages, and none of them have conditions, what do they do once they reach location A? Idle around a bit, then move on to location B, then once they reach location B, head back to location A as it is at the top of their list, or do they keep going through the list? I'm trying to find a way to have NPCs just walk from one location, to the next, to the next, to the next, until they get all the way back to their original location. This COULD use variables set in the NPCs script, but that would be excessively inefficient, because their starting location is random, for one, and two, there is dozens of NPCs involved. --MaXiMiUS 18:29, 13 June 2006 (EDT)

Well, I figured out the solution to my own problem. I just have the packages as "Must Reach Destination", and if they're in the same cell as the marker they were heading towards, randomly tell them to head to a new marker with EVP. --MaXiMiUS 18:44, 14 June 2006 (EDT)

Item scaling questions..

If a NPC is level 1, and the player is level 50, does the NPC get level 1 equipment, or level 50 equipment? Also: is there a reasonable way to scale a NPC via a script to the players level? Examples would be helpful, I'm trying to make a merchant that can sell stuff and still scale up with the player. --MaXiMiUS 15:38, 15 June 2006 (EDT)

For the first question, the Leveled items are correspondant to the player, think of how regular containers work, so the NPC would have level 50 items.
As for using a script to adjust the NPC's level, you'd probably have to set every stat for the NPC via a script. I'll look for an example. Perhaps it would be easier to just make a leveled list?
A possible work around is to have a bodyguard escort the merchant, but if this is the same mod you were making earlier (Stopping NPCs from spawning at night), I don't know how you'd go about it. The Imperial Dragon 16:21, 15 June 2006 (EDT)

Here's one example of a script that uses ModAV or ModActorValue...



; BetTeam 1 is Blue, BetTeam 2 is Yellow
;------controls luck affecting combatant health----

if ArenaSpectator.Lucky == 0
	if ArenaSpectator.BetTeam == 1
		if player.getav Luck >= 50 && player.getav Luck < 60
			ModAV Health 5
			set ArenaSpectator.Lucky to 1
		endif
	endif
endif


if ArenaSpectator.Lucky == 0
	if ArenaSpectator.BetTeam == 1
		if player.getav Luck >= 60 && player.getav Luck < 70
			ModAV Health 10
			set ArenaSpectator.Lucky to 1
		endif
	endif
endif

if ArenaSpectator.Lucky == 0
	if ArenaSpectator.BetTeam == 1
		if player.getav Luck >= 70 && player.getav Luck < 80
			ModAV Health 15
			set ArenaSpectator.Lucky to 1
		endif
	endif
endif

if ArenaSpectator.Lucky == 0
	if ArenaSpectator.BetTeam == 1
		if player.getav Luck >= 80 && player.getav Luck < 90
			ModAV Health 20
			set ArenaSpectator.Lucky to 1
		endif
	endif
endif


if ArenaSpectator.Lucky == 0
	if ArenaSpectator.BetTeam == 1
		if player.getav Luck >= 90 && player.getav Luck < 99
			ModAV Health 25
			set ArenaSpectator.Lucky to 1
		endif
	endif
endif

if ArenaSpectator.Lucky == 0
	if ArenaSpectator.BetTeam == 1
		if player.getav Luck == 100
			ModAV Health 30
			set ArenaSpectator.Lucky to 1
		endif
	endif
endif



End

The actor value is the value of a stat or variable on the NPC.

You could use the SetActorValue function to set the main skills of your NPC depending on the level of the player. For example: If you make a script that modifies the NPC's stats every five levels, you'd want to attach it to each NPC and it'd go something like this:


short DoOnce
short NewLevel
short level

if NewLevel == 0
	Set level to ( GetLevel player )
	set DoOnce to 0
endif

If DoOnce == 1
	Return
Endif

if ( player.getlevel >= 5 ) && ( player.getlevel <= 10 )
	SetActorValue Health 100
	;rest of stats
	set DoOnce to 1
endif

if ( player.getlevel >= 10 ) && ( player.getlevel <= 15 )
	SetActorValue Health 150
	;rest of stats
	set DoOnce to 1
endif

;etc...

Along with a variable (NewLevel) that gets reset after every time the player levels up.The Imperial Dragon 16:53, 15 June 2006 (EDT)

I think I'll use this code. --MaXiMiUS 19:06, 15 June 2006 (EDT)
	if player.GetLevel > GetLevel
		;level scaling
		if GetIsClass Commoner || GetIsClass Ostler
			Set Level2 to Player.GetLevel
		elseif GetIsClass Scout
			Set Level2 to Player.GetLevel + 1
		elseif GetIsClass Warrior
			Set Level2 to Player.GetLevel + 2
		endif
		SetLevel Level2
		Set Level to GetRandomPercent + Level2
		SetAV Strength Level
		Set Level to GetRandomPercent + Level2
		SetAV Intelligence Level
		Set Level to GetRandomPercent + Level2
		SetAV Willpower Level
		Set Level to GetRandomPercent + Level2
		SetAV Agility Level
		Set Level to GetRandomPercent + Level2
		SetAV Luck Level
		Set Level to GetRandomPercent + Level2
		SetAV Speed Level
		Set Level to GetRandomPercent + Level2
		SetAV Endurance Level
		Set Level to ( GetRandomPercent / 2 ) + ( Level2 * ( GetRandomPercent / 10 ) )
		SetAV Health Level
		Set Level to ( GetRandomPercent * 2 ) + ( Level2 * ( GetRandomPercent / 10 ) )
		SetAV Fatigue Level
		Set Level to GetRandomPercent + ( Level2 * ( GetRandomPercent / 10 ) )
		SetAV Magicka Level
	endif

Don't forget to set the skills too. The Imperial Dragon 20:18, 15 June 2006 (EDT)

Couldn't you just click the box that says "PC Level Offset" to "-1", and fill his inventory or merchant chest with items from Leveled Lists? Or am I answering the wrong question? (WaerLoga 22 June) (EDT)

Not for an NPC whose class doesn't usually sell stuff. The Imperial Dragon 00:25, 22 June 2006 (EDT)

Reskinning Interchangeable Models on NPCs/Horses

I'm noticing with NPC's and horses that the CS has a basic skeleton with several supplimental parts (like a potato head doll). I want to change the .NIF file associations of the various interchangeable parts to my own retextured .NIFs which I have already created, but I don't see any option to do so through the construction kit (at least not as apparent as for item/skeleton meshes). So how can this be done?

You need to put those files into the same folder as the skeleton, then you can choose them in the "ModelList" in the creature's stats. (Look at the goblins for a good example.--JOG 11:22, 20 June 2006 (EDT)

How to make a topic and place it in the Questions category

I know this might seem like a stupid question for a lot of you, but I'm very new to the wiki thing and I don't know how to make a new topic to put into the "Category:Questions" page. The reason I need to do this is because I don't want to fill this page up too much since I have a couple pages of code to paste. I'm sure someone will answer this quickly =P --Omzy 23:46, 21 June 2006 (EDT)

Put [[Category:Questions]] at the end of the article you want to add to the section. Now, to make a new article, just make a link to a page that doesn't exist and click Preview. The link will take you to a blank page named whatever you named the link (ex: [[My Question]]). Just don't click on save, and it doesn't matter which page you preview, but it is probably best to use your talk page. Don't worry, it may not seem like it, but I am relatively new here as well, 'bout three/four weeks. The Imperial Dragon 00:12, 22 June 2006 (EDT)

Thanks a bunch! --Omzy 00:49, 22 June 2006 (EDT)

Construction Set Version

What is the most up-to-date version of the Construction Set? How do you find out what no. the latest version is? I have version 1.0.303 Do I need to upgrade? Are there any differences, like new features?WaerLoga 23 June (EDT)

I think the only time a new CS is released is the same time as a new expansion pack, for the record, I'm running 1.0.303 as well. --MaXiMiUS 17:28, 24 June 2006 (EDT)

How to change players start location?

I want to create plugin where player start in different world, but I don't know where is defined start location of player. Is it in scripts, or in quests? Warrin(EDT)

open you Oblivion.ini(My Documents\My Games\Oblivion) at the very top is this: SStartingCell= (this is the cell you want to start in, use the editorID name)

SStartingCellY= SStartingCellX= SStartingWorld=

STestFile10= (and place here the name of you esp *ex:WorldMassTest.esp)

Moving an exterior cell to another worldspace

My problem is that i have created a new worldspace similar to the Tamriel worldspace in that i will have all the outsides of cities in this worldspace and the interiors of cities in their own worldspaces, and what i was planning on doing was creating the whole city in my large exterior worldspace and copying all the cells associated with the city into its own worldspace, how might this be done?

Using Scripts To Add Object and Raising it

What woudl I write in a script so it adds multiple objects that are aligned, e.g. a plate on the center of a table. Also I couldn't find out how to use a script to remove an object placed in the world. e.g. after you leave house, delete house.Treleth 02:05, 6 July 2006 (EDT)

Dragoon Wraith TALK 00:15, 6 July 2006 (EDT): That script would be pretty complicated, I don't think anyone would be able to write that for you, you'll have to write it yourself. Without the items in front of you, it would be very difficult to do.
Deleting items is done using Disable. By the way, by using Disable and Enable, you can make your items invisible until such a time as you want them to appear - would be much easier than spawning them and positioning them, if you can.

ok, thanks for your help! Treleth 02:05, 6 July 2006 (EDT)

ok, new problem, I got the placement to work, but now when I use the line


set zposition to GetPos Z + 10


to raise the object higher, there is no effect in-game (I din't forget to use float zposition) Treleth 23:40, 6 July 2006 (EDT)


ShadowDancer 03:33, 7 July 2006 (EDT): Moving objects to a new position is done with the SetPos command. What you did with the line of code above was to define a new position on the Z axis. Now you need to set the position. In this case, your code will go from the above to
set zposition to GetPos Z + 10
SetPos Z, zposition

The second line will move your object up 10 units on the Z axis to the new location defined by the zposition reference.

Dragoon Wraith TALK 10:05, 7 July 2006 (EDT): Alternatively, you could use MoveTo, like so:
MoveTo (object ID or ref var) 0 0 10
The Wiki recommends MoveTo over SetPos. Not entirely sure why, but in this case, the code is shorter with MoveTo.


ShadowDancer 06:06, 9 July 2006 (EDT): The Wiki also states that MoveTo "is only reliable for Actors. Using it to move other objects types, especially non-persistent references and inventor items may result in unexpected behavior." so keep that in mind as well. I haven't personally tested it for moving items so I don't know the reason for this warning, but my guess is due to possible embedding in uneven ground and/or object orientation issues.
Dragoon Wraith TALK 10:57, 9 July 2006 (EDT): You're absolutely right, forgot about that.
I think both have a tendency to remove collision data on things, though.

I forgot to mention before that I was indeed using setpos z, zposition. I tried both methods and they both didn't work, my tent was still halfway in the ground, see anything wrong with this code? or you can just remove the + 10 and add tent.moveto tent 0 0 10


scn PTTentUnpack	

float xangle
float yangle
float zangle
float xposition
float yposition
short zposition
ref tent

begin OnActivate
	if GetInWorldspace Tamriel == 1 
	if player.IsSneaking == 0
		set xangle to GetAngle X
		set yangle to GetAngle Y
		set zangle to GetAngle Z
		set xposition to GetPos X
		set yposition to GetPos Y
		set zposition to GetPos Z + 10
		set tent to placeatme PTTentExterior, 1, 10, 1
			tent.SetAngle x, xangle
			tent.SetAngle y, yangle
			tent.SetAngle z, zangle
			tent.SetPos x, xposition
			tent.SetPos y, yposition
			tent.SetPos z, zposition
		disable
	else
		player.AddItem "PTTentMaterials" 1
		Disable
		Return
	endif
endif
endif
end

Treleth 13:13, 7 July 2006 (EDT)

Dragoon Wraith TALK 13:38, 7 July 2006 (EDT): 10 is not very far. Your average person is 128 tall. I think you're just not using a big enough number.
ShadowDancer 14:35, 7 July 2006 (EDT): I agree with that being the most likely scenario. To find the accurate number to set the tent's Z-axis position what I would do is to set up a dummy cell with a floor tile with a 0 Z-axis position and then place the tent material above it at the same x & y coordinates. Use the fall function in the editor and then edit the object and look at the Z-axis position. Do the same with the object that is used to activate the tent. The difference in the Z-axis positions should be fairly close to the appropriate number to use to adjust the Z-axis position if they are sitting on the tile properly. It might take a little tweaking after that to get the exact Z-axis coordinate, but it should be fairly close. The thing to remember is that not all objects use the same X,Y,Z coordinates as the reference. Most 3D objects have the coordinates in the center of the object as opposed to at the bottom or on the corner meaning that the center position of a larger object is at a higher Z-axis position in the larger object than in a smaller object which translates to a ring sitting on the ground properly while the tent looks like its halfway in the ground at the same X,Y,Z coordinates.

It worked! Thanks guys! I was just confused about the unit of measurement. Treleth 14:38, 7 July 2006 (EDT)

Dragoon Wraith TALK 10:57, 9 July 2006 (EDT): Actually, looking at your code... Why didn't you just do this:
scn PTTentUnpack

Begin OnActivate

	if ( GetInWorldSpace Tamriel == 1 ) && ( player.IsSneaking == 0 )
		PlaceAtMe PTTentExterior 0 0 64
		Disable
	else
		player.AddItem PTTentMaterials 1
		Disable
	endif

End
That should do the same thing, much more simply. Also, with your version, if you dropped it in a non-Tamriel place, the player'd never be able to pick it up again. This way, it's just added to the player's inventory regardless of sneaking if it's not in Tamriel.

Rapid-Fire Casting

I just wanted to know how one would go about making a rapidfire casting situation, I know about making spells that cause damage over time, but I want the sound and look of a fireball being cast like a gatling gun (abeit slower) of course to balance this the magicka drain would be higher, how would a person do this? Please explain this as to a person with very little to no scripting experience.

Oh, and how do place something as a new topic? --Unclever title 23:25, 8 July 2006 (EDT)

Dragoon Wraith TALK 23:38, 8 July 2006 (EDT): Not sure how to do that, but you can create a new article by typing in the proper URL in the Address bar, and then writing the page as you like. Use Underscores (_) for spaces.
In the future, please learn how to do things properly if you expect help. Coming here, consciously messing up a page because you are "too lazy to figure out how to do it right" is not a good way to make us happy here.
--Cyax 01:05, 10 July 2006 (EDT)There is a mod in development called "Split Infinity" SI

they have a 'spell' that sounds just like it, if you watch the movie clip youll notice that it just casts a spell over you that lasts for a limited amount of time

--Unclever title 16:24, 11 July 2006 (EDT) Thank you, I found another version of it in PJ's Spell Compendium mod, [1]Merely one locale of it, but simply google it if another site is neccessary. Also thank you for the information regarding new topic placement, Indeed I was lazy but I also could not find this information here or at the wikipedia main site, I didn't read every single piece of text, but I found nothing leading to an explanation to newcomers about how one would add a new topic. But I know now, and will use this knowledge in the future, thank you.
Dragoon Wraith TALK 16:52, 11 July 2006 (EDT): I agree that the information is not as easy to find as you would expect. Well anyway, now you know.

Animations

ShadowDancer 13:57, 10 July 2006 (EDT): Does anyone know exactly how many of these that there are? And additionally, does anyone know how to alter them it someone wanted to make a new object or if they wanted to change the animation? Or if that is even possible? Ideally, I was thinking about the AREvilStonePulsar01 from the dreamscape sequence except without the complete fade to black. Or else some other stone wrapped in something similar which I am not sure is even possible.


Effect Scripts, SetActorAlpha, SetActorRefraction

ShadowDancer 13:57, 10 July 2006 (EDT): Does anyone know of any way to keep any of these values from being translated to the character when they are mounted on a horse with any/all of those effects applied to it? I managed to figure out how to keep the character from getting the effect shader on a reload of the script when fast traveling to a new area (although it is a tiny bit annoying that the character has to dismount and remount to keep the effect off the character). The other problem resulting from this is that when hit by a spell on horseback, the horse's effect shader is then applied to the character at the completion of the spell's effect shader. Then there are the problems with SetActorRefraction and SetActorAlpha which get applied the second the character mounts and don't get removed on dismount (which I thought would make a really cool effect if they were applied on mount and removed on dismount but this has proven to be very problematical).

How do I get an actor to equip a weapon

--Unclever title 17:12, 11 July 2006 (EDT) Is there a function that causes a weapon to be drawn? Or perhaps a function combination? I want to make a spell to summon a weapon that only disappears when it's sheathed, I would use a bindweapon spell, but I don't want to change any of them.

I tried an if-statement with IsWeaponOut, but it didn't work.

Scruggs 18:37, 11 July 2006 (EDT) Hi. First I have to do the wiki policeman thing and ask why you created an entirely new category for one specific question? We have a category called questions, and you can also post your own questions on your Talk page. Sorry, back to your question now.
EquipItem - use this to equip the item on the player. IsWeaponOut will tell you when the weapon is sheathed.
Dragoon Wraith TALK 19:27, 11 July 2006 (EDT): It would appear that that was a misunderstanding of me that caused that, actually. Sorry about that.
Unclever Title, for quick questions like this, it's better to add them to this page. Create a new article only if your question is more involved than "is there a function that does such and such?" or "how do I use xyz function?"
Also, the format of your article's URL should (usually) be http://cs.elderscrolls.com/constwiki/index.php/Your_Article's_Title - adding "/Your_Articles_Title" onto another article confuses things, lengthens URLs, and in the case of a category, turns your article into a category, which is worse than making an extra article. If you want to create a new Category, by the way, the format would be http://cs.elderscrolls.com/constwiki/index.php/Category:Your_Category's_Title.
Further, on the your question - there's no way to force an actor to draw his weapon. For NPC's, you can try putting them in combat with something else, then they'll draw their weapons.
ShadowDancer 19:56, 11 July 2006 (EDT): The phrasing on this question was mine, the original was "Function for Draw Weapon" without any reference to an actor. I was trying to turn it into a question for the questions section rather than something the looked like an explaination.

--Unclever title 20:55, 11 July 2006 (EDT)Thanks again for the information. Sorry if I caused any problems, all I can say is that I'm honestly new to Wiki and have little experience with URL addresses, I'll make an effort to be more cautious with how I submit my questions.

Dragoon Wraith TALK 11:11, 12 July 2006 (EDT): Not a huge problem, really, it'll get cleared up. Just trying to explain things.
For one thing, when on a discussion or talk page, generally you use :'s to indent yourself to allow easier reading.

How do I make it start up the Character Generation in a new world?

Problem... i want the character generation screen to show up when i load my mod, i cant seem to find the line of code that activates it. --Cyax 19:12, 11 July 2006 (EDT)

Dragoon Wraith TALK 18:32, July 11, 2006 (EDT): I assume you mean the Race menu. That would be ShowRaceMenu.

Player Start Point

Dominant06 00:56, July 12, 2006 (EDT): Hello. I'm new to all this modding stuff. I think it's really sweet to build my own environments for Oblivion. Anyway, I've followed the Creepy Cave tutorial and I started to playtest it, but as soon as I load Oblivion, all I see is darkness. I checked my map and it shows that my character spawned off of my map. Is there a way to fix this? ANY help, and I mean ANY, would be really appreciated. Thanks a lot.

Dragoon Wraith TALK 11:19, 12 July 2006 (EDT): As I said in your Talk page, is this a new game or a loaded savegame?
Dominant06 11:48, July 13, 2006 (EDT): Sorry, I really don't know how to use all this Wiki stuff... anyway, it was a new game. I ran the playtesting just like it told me to in the My First Dungeon: Pathing and Playtesting tutorial. My character started out as a level 1 character, just like it said it would. But he spawned outside of my map.
Dragoon Wraith TALK 16:09, 13 July 2006 (EDT): Wiki Tutorial #1: Use :'s to indent your answer to keep things organized.
Anyway, uhm... what cell are you starting in? Like, you start outside of the world, but you start in cell... open your map and see what name it says.
Dominant06 17:15, July 13, 2006 (EDT): The cell I'm starting in is still Creepy Cave, and when I open the map I still see part of the map itself, but I'm not on it.
Dragoon Wraith TALK 10:30, 14 July 2006 (EDT): Well, I don't know what you messed up with your mod, but I assume that you have little/no intention of actually using the tutorial dungeon for a real game, you are just using it to learn the CS? If so, I would recommend ignoring this crazy bug, and just using TCL in the Console to let you float back over to the map (might be a long way, though).
I haven't actually read that tutorial, though, so maybe I'm not getting something. I'll take a look at it when I get a chance.

Mercantile Skill / Quantity Sold

I'm trying to figure out a way to get the Mercantile skill to recognize the quantity of items sold when it counts for skill increases. I have the mod that removes the 'how many?' prompt right now, but that's unsatisfying; I don't want to have to click on a group of 40 arrows one at a time to get the 40 boosts to the Mercantile skill. I'd rather have something that detects how many items were sold and increases the 'use' count by that number. I've had two thoughts on that so far, and neither has panned out. The first idea was to simply feed the game a use count that was one less than the quantity of items sold (since the game would in theory account for that first one on its own). However, I couldn't figure out how to get the number of items sold captured into a variable, much less how to pass that along as skill uses. The second idea was to temporarily modify the SkillUse settings to reflect a skill boost multiplier that equated with the number of items sold. However, I saw it mentioned that you can't change this value through scripting, so that idea got shot.

Can anyone point me in the right direction? --McC 23:07, 16 July 2006 (EDT)

Dragoon Wraith TALK 10:01, 17 July 2006 (EDT): I don't think you can, sadly. You could get the number of item X sold (but you need to a specific item), but not the total number of items sold...
You could try using how much more gold the player has than before he started, but that's not so good, because it's supposed to be based on how much more gold the player got it for than it was originally offered at. Or something.

Actors and animations in scripts

I tried to make an actor play an animation on a spell (I want him to stagger) with the playGroup function:

   set target to getSelf
   target.playGroup stagger,1

with target declared as a ref. That didn't work the target doesn't play the animation. I tried to make the player play the animation :

   player.playGroup stagger,1

That didn't work, and worst, after the spell completion, the player is stuck, he can't move any more, only jump, and when he jumps, the jumping animation is not played.....

Anyone has an idea? nehon

ShadowDancer 16:24, 19 July 2006 (EDT): In order to keep the player from freezing, you need to do the following at the end of the spell in order to free the player up again from the animation that you played on the player:
PlayGroup Idle, 1
The freezing of the character you cast it on is probably due to the way that your script is written. I am going to make an educated guess that you are using the following coding in the spell (the full script would have been helpful so I wouldn't need to guess):
Begin ScriptEffectUpdate
   PlayGroup Stagger, 1
End
The only problem with this is that it is constantly interrupting the stagger animation before it plays the stagger. If this is what you have in your script, you need to change it to this:
Begin ScriptEffectUpdate
   PlayGroup Stagger, 0
End
Good Luck and if you need more help, just ask, but please include the full script so that the problem can be properly analyzed.
Sorry i didn't post the entire code, but i'm posting from my work, the snip of code i wrote in the previous post where written from what i remembered.
I do the call to playGroup in the ScriptEffectStart block, so i don't know if it's the good way to do it. The "1" parameter is because i want the stagger interupt any previous animation the target is playing.
I'll try tonight what you suggested and i will post the entire code tomorow.
Thank you for your help.
--nehon 03:15, 20 July 2006 (EDT)
ShadowDancer 11:11, 20 July 2006 (EDT): Not a prob. I just wanted you to realize that its easier for others to help if they know exactly how you are writing the script. Things as simple as typos have caused problems in otherwise perfect scripts. For what you are describing, it should look more like this:
ScriptName StaggerSpell

Begin ScriptEffectStart
	PlayGroup Stagger, 1
End
Begin ScriptEffectUpdate
	Playgroup Stagger, 0
End
Begin ScriptEffectFinish
	PlayGroup Idle, 1
End
The thing I am not completely sure about is if you need the PlayGroup Idle, 1 at the end to reset the actor. You would need to try it both ways to see if the actor is frozen after completion without the Idle being played. If it is being cast on the player though, it is definitely needed in order to stop the freeze effect of the stagger. You might also try using LoopGroup to see if that produces a better stagger on the target.

How do you edit a save file?

After installing the new patch I can no longer convert an .ess to and .esp and view it's details in the CS, (it crashes to desktop with no error message)so how do I edit a save file? I have somehow been affected by mass duplication. My save file ess.txt contains 68184 petty soul gems and thousands of Arena Heavy Blue Cuirass, though I don't know whereabouts in the game they are, or what caused these objects to mass-duplicate. I think I no longer have the defective plugin that caused this mess activated, so the duplicating has stopped at that number, but my quicksave takes too long to load, so how do I get rid of these thousands of duplicated objects from my save? Is there a SaveGame Editor anywhere? WaerLoga 19 July

"Force Push/Pull" Effect ?

Does anyone know how to get this effect with a script ? I know a guy named CuckyDoh either did it or took it from someone who did, so it is possible. But he doesn't seem inclined to share his scripts, and I haven't made any significant progress this far.Gamall 21:21, 19 July 2006 (EDT)

Dragoon Wraith TALK 23:06, 19 July 2006 (EDT): Wow, that guy's a jerk. Well, anyway, you could try MoveTo self with a small offset, used each frame to make the actor appear to actually move instead of teleport. Might look very odd, though. You'd also need GetHeadingAngle and Trigonometry to get the offsets right... Good luck, let us know how you do!
Gamall 16:07, 20 July 2006 (EDT) : I wouldn't go as far as calling him a jerk ; since I have had no answer at all this far, I can't be absolutely sure he's read my message. I just sent another one.
Like you said, using MoveTo would look very weird... and that way the player could push helpless enemies through walls and other objects. So this would be a very buggy and immersion-breaking result for a very long and complex script. Like the levitation scripts, which are still not satisfying despite all the efforts that have been put into them.
For a very cheap recoil effect, it is simpler to use a PlayGroup BackWard, 1 . Doesn't feel really "kinetic" though, and looks at weird as MoveTo, but at least the walls will stop them ;-)
I've thought about using the pushback effect of the traps, but I haven't tried it yet. This spell is not critical to the mod I'm doing, so I won't have a nervous breakdown if I can't have it, but it would have been a nice touch.
Needless to say, if I make any progress or find any useful information, I'll endeavour to post it in a place where it will be helpful.
Dragoon Wraith TALK 17:55, 20 July 2006 (EDT): Cid88's Multitude of Magecraft has several force spells, I'd recommend looking into that.
Thanks a lot ! If they work the way the readme says they do, then it will be most helpful. Gamall 22:02, 20 July 2006 (EDT)
I looked, and although it doesn't really solve the issue (use of MoveTo...in fact, Cid uses SetPos everywhere, but it amounts to the same), I found in it the PlayGroup DodgeBack, which is absolutely hilarious ;) I think with that, my "Psionic Blast" spell will look almost like I wanted it to... Thanks again. Gamall 00:37, 21 July 2006 (EDT)
I did it ! Screen in action. Playgroup DodgeBack and delayed fatigue curses did the trick ! Thanks again. (and to Cid...) Gamall 16:02, 21 July 2006 (EDT)

Can the player view be manipulated?

ShadowDancer 11:34, 20 July 2006 (EDT): Does anyone know if it is possible to change from first-person to third-person in a script? I have looked through the Wiki but I can not locate any information about it, so I was wondering if it is possible? Also, if it is possible, what would be the check to see which view is the current view?

I have no idea. If it is coherent with what you want to do, you can use paralysis, but... if you are asking the question here, I assume it is not :| I have heard of a mod that changes the animations such a reading, making potions etc to third person. I don't think they used scripts for it though. Gamall 15:43, 20 July 2006 (EDT)
Here's a link to the mod I mentioned : here Gamall 16:16, 20 July 2006 (EDT)
ShadowDancer 12:21, 22 July 2006 (EDT): Unfortunately that isn't what I am looking for. I am trying to figure out how to check for and change the camera view from first person to third person. The idea being to create a sequence of events that changes the camera view to third person so you can see the player standing there, turn the player around, and then have the player walk forward while things are happening. The 2 problems that I have encountered are: 1) not being able to stop the character from looking around and 2) not being able to assure that the camera is in 3rd person mode to begin with.
JOG 12:30, 22 July 2006 (EDT): Use another approach: make the player invisible and let a clone made withCreateFullActorCopy do the work. See the script I posted in this thread for stopping the player from looking around.
ShadowDancer 13:04, 22 July 2006 (EDT): Sweet! Thanks JOG! I think I can make this work properly now, or at least, a little less improperly. If I do a SetPos on the actor do you know if they stay up in the air like objects if they don't move?

Pre-recorded voice files?

I'm in the process of making a rather involved quest mod. Obviously, since Oblivion uses completely voice-based dialogue, this creates some complications.

However, being the son of a sound engineer, I have everything that I would need to record dialogue, from a sound-insulated voice booth to professionally trained voice artists. However, I'm in a bit of a bind considering pre-recorded voice files - i.e, dialogue not recorded with the CS's integrated sound recorder existing on seperate wave files elsewhere on my hard drive. I'm quite certain that it's possible, owing to the fact that Terrence Stamp was nowhere near an Oblivion CS when he was recording Mankar Camoran's dialogue over in England. :P

So, my question: How exactly do you use pre-recorded .wav sounds as dialogue within the Oblivion CS? The "Edit Response" dialogue box is very protective of its secrets.

Thanks.

Astion 20:23, 20 July 2006 (EDT)

To put it in a nutshell, you have to convert all your files to mp3 format (maybe with a specific rate, I don't know. As a sound ingeneer's son, you should know more than I do about mp3 ;) ) and then place them in a way imitating the folder architecture given in "Edit Response", including the file's name.
I can't tell you more than that, I haven't tried it. I hope it helps some. Gamall 22:23, 20 July 2006 (EDT)
ShadowDancer 09:11, 21 July 2006 (EDT): The answer you are looking for is to convert the .wav files to .mp3 format @ 44.1 Hz frequency, 64 Kbps bitrate and Mono channels. You also need to create .lip files for the actor to lipsync and info about that is found at Facial Animation.

OnCollide

THis is more like 2 questions, first off, is there soemthing like begin OnCollide? I want the script to begin when an arrow hits the wall, how would I go about doing this? Secondly, how do I set the ActorRef to the object hit? For example I hit some random townsperson, how do I set the ActorRef to that person? (NOTE These two questions are for 2 entirely different scripts)Treleth 01:04, 22 July 2006 (EDT)

Gamall 01:22, 22 July 2006 (EDT) : As far as I know, there is no simple way to get an impact point for a spell or an arrow, if they hit a static.
If you want to get the actorref of someone you hit with an arrow, you could put a scripted spell effect on the arrow and use getself.
There is no simple way, but there are a few somewhat complicated ways to find out when a projectile hits a wall by using trigger zones or getLOS. I am planning to add an article on how to do that to the wiki. If on the other hand, you only want to detect when an arrow hits a specific wall, you can change the wall into an activator and either check onHitWith or edit the nif to include a trigger zone, which lets you check onTrigger. Take a look at Finessing Physics for a guide to doing the latter. Scruggs 09:04, 22 July 2006 (EDT)
Gamall, the GetSelf, does not work...because wouldn't that get the weapon, not the target? This is the script I'am using, Treleth 14:39, 22 July 2006 (EDT)
scn BludgeoningStickHit

ref target
float timer
short init

begin OnHitWith BludgeoningStick
if init == 0 
		set timer to 25
		set init to 1
		set target to Getself
		target.SetUnconscious 1
	else
		if timer > 0
			set timer to timer - getSecondsPassed
		else
			 SetUnconscious 0
			 Set init to 0
		endif
	endif
end
Dragoon Wraith TALK 15:25, 22 July 2006 (EDT): You misunderstand how scripted enchantments work (as do many people, much to my confusion). The scripts do not run on the weapon, they run on the thing that the weapon hits. Think about it - does a weapon enchanted with Damage Weapon break itself? No, it breaks the target's weapon. Enchanted weapons cause the effect they're enchanted with to be transferred to the target - no matter what the effect is. In the case of Scripted Effect, it causes the script to run on the target. The GetSelf would return the target's reference.
In the case of your bludgeoning stick, I'd create a magic script that goes on the stick's enchantment, and script it like this:
scn BludgeoningStickHit

Begin ScriptEffectStart

	SetUnconscious 1

End

Begin ScriptEffectFinish

	SetUnconscious 0

End
Just make the enchantment last however long you want the target to remain unconscious. Do, however, read ScriptEffectFinish for some important warnings about it.
-- Gamall 15:29, 22 July 2006 (EDT) No no no, I said a "scripted spell effect", no "a script on the weapon". As far as I know, you can't do that from the weapon. And yes, used like that, GetSelf will yield ref to the weapon...
To avoid that, create a spell that reads like that
scn blahScript

ref Target

Begin ScriptEffectStart

  set Target to GetSelf
  ; do whatever you want with your target ref

End
and enchant your weapon with it. It will run on any actor your weapon hits. Oh, and make sure to tick the "disallow Spell Reflect/Absorb" and "Script Effect Always Applies" to avoid unpleasant surprises...
Dragoon Wraith TALK 15:35, 22 July 2006 (EDT): You don't even need to use the ref var for what he wants to do, actually, since the entire script would just run on the target.