Quick Question -- Quick Answer, Part Fifteen

Post » Fri May 27, 2011 8:56 am

Ok, having another problem on the next part of the script. I'm trying to make an enchantment that does 1 of xx number of effects. I'm using the rand function to get the variables, but the problem I'm running into is how to damage the target within the script.

Basically, if the script returns a value >= 1 but <2, I want it to do, say, 10 fire damage. This is what I attempted

Scriptname MVRandomSpellEffectScriptfloat numref selfBegin ScriptEffectStart	set num to rand 1 5	set self to getself	if num >= 1 && num < 6		cast MVRandomEffectFire self	endifEnd


MVRandomEffectFire is a fire damage on touch spell I made. Unfortunately, all this did was cause the target to have the visual fire effect on him, and then cast the fire spell himself >.< Where am I failing here? D:
User avatar
JERMAINE VIDAURRI
 
Posts: 3382
Joined: Tue Dec 04, 2007 9:06 am

Post » Fri May 27, 2011 1:49 am

Ok, I've got the program, but now I'm having a new issue:

If I make a new Item and I click "ok", the item does not appear in the list.
An item that did appear in the list before is gone now too...
User avatar
jenny goodwin
 
Posts: 3461
Joined: Wed Sep 13, 2006 4:57 am

Post » Fri May 27, 2011 6:32 am

Ok, having another problem on the next part of the script. I'm trying to make an enchantment that does 1 of xx number of effects. I'm using the rand function to get the variables, but the problem I'm running into is how to damage the target within the script.

Basically, if the script returns a value >= 1 but <2, I want it to do, say, 10 fire damage. This is what I attempted

Scriptname MVRandomSpellEffectScriptfloat numref selfBegin ScriptEffectStart	set num to rand 1 5	set self to getself	if num >= 1 && num < 6		cast MVRandomEffectFire self	endifEnd


MVRandomEffectFire is a fire damage on touch spell I made. Unfortunately, all this did was cause the target to have the visual fire effect on him, and then cast the fire spell himself >.< Where am I failing here? D:


Your spell script is telling its target to cast the spell itself with the cast MVRandomEffectFire self command. Just script whatever effects you want the spell to do and it will apply them to whatever the target of your spell is without having to grab references. Also, I think the best way to apply an enchantment or disease to a target is to use the addspell command (ex: ref.addspell spellID).
User avatar
Rik Douglas
 
Posts: 3385
Joined: Sat Jul 07, 2007 1:40 pm

Post » Fri May 27, 2011 11:32 am

Besides the conditions being incorrect, what may keep a quest log from triggering?
User avatar
Grace Francis
 
Posts: 3431
Joined: Wed Jul 19, 2006 2:51 pm

Post » Fri May 27, 2011 4:36 am

Your spell script is telling its target to cast the spell itself with the cast MVRandomEffectFire self command. Just script whatever effects you want the spell to do and it will apply them to whatever the target of your spell is without having to grab references. Also, I think the best way to apply an enchantment or disease to a target is to use the addspell command (ex: ref.addspell spellID).


Yeah, I realized what I made the script do when I took a closer look at it. What I don't know how to do is actually using magic effects in a script. Like, how would I script Fire Damage with a magnitude of 20 and an area of 10? I'm running around the wiki trying to find something, but can't x_x
User avatar
Jani Eayon
 
Posts: 3435
Joined: Sun Mar 25, 2007 12:19 pm

Post » Thu May 26, 2011 11:49 pm

I'm having another issue when creating an item (New akaviri longsword). When adding a .NIF file, I'm getting the message "invalid directory".
User avatar
Andres Lechuga
 
Posts: 3406
Joined: Sun Aug 12, 2007 8:47 pm

Post » Thu May 26, 2011 11:19 pm

I'm having another issue when creating an item (New akaviri longsword). When adding a .NIF file, I'm getting the message "invalid directory".


The mesh MUST be in the meshes folder. That's the only thing I can think of.
User avatar
Stacyia
 
Posts: 3361
Joined: Mon Jul 24, 2006 12:48 am

Post » Fri May 27, 2011 4:45 am

hi community im looking for a way how to rename a .esp properly. actually its an .esm. didnt find anything in the wiki. please help!
User avatar
..xX Vin Xx..
 
Posts: 3531
Joined: Sun Jun 18, 2006 6:33 pm

Post » Fri May 27, 2011 12:54 am

I'm having another issue when creating an item (New akaviri longsword). When adding a .NIF file, I'm getting the message "invalid directory".


Are you talking about adding the ICON in the CS ? - if so it will give you that if the texture file is not in a sub directory of the Textures\Menus\Icons\ folder !! (that is the only one that usually gives that error if you try assigning a Nif to it instead or if the texture is in another folder !)
User avatar
priscillaaa
 
Posts: 3309
Joined: Sat Dec 30, 2006 8:22 pm

Post » Fri May 27, 2011 9:45 am

hi community im looking for a way how to rename a .esp properly. actually its an .esm. didnt find anything in the wiki. please help!




For as far as I know, there is only one .esm file and that is "oblivion.esm". This should remain so. When you click "save" for the first time, after having only opened the .esm file, you can just type in a name, and the .esp file is created.
User avatar
Lindsay Dunn
 
Posts: 3247
Joined: Sun Sep 10, 2006 9:34 am

Post » Fri May 27, 2011 4:27 am

Is there a limit to the numbers of masters an esp can have?
User avatar
Jose ordaz
 
Posts: 3552
Joined: Mon Aug 27, 2007 10:14 pm

Post » Thu May 26, 2011 9:41 pm

I'm having trouble getting a variable to set (I think).

This is just the relevant part of my script, I can post the whole thing, if necessary:
 	if ( GetPCInfamy >= 10 && GetPCInfamy < 20 )		set aaaVampHuntSpawn to 2	elseif ( GetPCInfamy >= 30 && GetPCInfamy < 50 )		set aaaVampHuntSpawn to 10	elseif ( GetPCInfamy >= 50 && GetPCInfamy < 80 )		set aaaVampHuntSpawn to 20	elseif ( GetPCInfamy >= 80 && GetPCInfamy < 100 )		set aaaVampHuntSpawn to 30	elseif ( GetPCInfamy >= 100 )		set aaaVampHuntSpawn to 40	endif

The whole script is meant to spawn a vampire hunter if certain conditions are meant. This particular (problem) part of the script is meant to check the PC's infamy and increase the chance a Vampire Hunter will attack them accordingly (by comparing "aaaVampHuntSpawn" to another variable in a later part of the script, that part works).

The script is a quest script. The variable "aaaVampHuntSpawn" is a short global variable (I've tried setting it to float as well, if that's even relevant).

The script, as a whole appears to function correctly aside from this part of it. It appears as if aaaVampHuntSpawn is never being set. If I use the console to change the value of aaaVampHuntSpawn then the hunter will spawn if it's supposed to. If I don't, nothing happens. I've tried using a regular variable in the script instead of a global, but that didn't work either. Any suggestions as to how I fix this?
User avatar
matt
 
Posts: 3267
Joined: Wed May 30, 2007 10:17 am

Post » Fri May 27, 2011 10:50 am

hi community im looking for a way how to rename a .esp properly. actually its an .esm. didnt find anything in the wiki. please help!


No, I am talking about adding a .NIF file:
[img]http://i516.photobucket.com/albums/u328/Plasma_Wolf/erroroblivion.jpg[/img]
The "selected" button is what I'm talking about, I get the error there, after selecting a .NIF file and then clicking "ok" in this screen

I also get this error when closing the construction set:
[img]http://i516.photobucket.com/albums/u328/Plasma_Wolf/erroroblivion.jpg[/img]

How do I add images in this screen, I know how to do it in other forums and this one is very similar, but no effect?
User avatar
Krystal Wilson
 
Posts: 3450
Joined: Wed Jan 17, 2007 9:40 am

Post » Fri May 27, 2011 5:04 am

I'm having another issue when creating an item (New akaviri longsword). When adding a .NIF file, I'm getting the message "invalid directory".
The mesh MUST be in the meshes folder. That's the only thing I can think of.



Ok, the .NIF files are put under "...\Data\Textures\meshes\weapons\akaviri weapon"

I still get the error.

EDIT: And why do my newly created items disappear in the list of items?
User avatar
Philip Rua
 
Posts: 3348
Joined: Sun May 06, 2007 11:53 am

Post » Thu May 26, 2011 9:26 pm

I'm getting a very odd value when calling GetArmorAR. Basically this is what I am doing:

Set Helmet to Player.GetEquippedObject 1...Set OldAR to GetArmorAR HelmetPrintC "OldAR == %.2f" OldAR


For some reason the console gives me "OldAR == 300.00" :blink: I was testing while wearing a Guard Helmet (1 AR). This is frustrating because I'm doing a lot of math after I get the armor's AR. It is probably because of some stupid mistake I've made, but no matter what I do I get this odd result. :ahhh:

EDIT: the value is apparently multiplied by 100 <_< of course they don't explain this in the OBSE command documentation so I had no idea :mellow:
User avatar
Davorah Katz
 
Posts: 3468
Joined: Fri Dec 22, 2006 12:57 pm

Post » Fri May 27, 2011 9:35 am

Is there a limit to the numbers of masters an esp can have?
If yes, it's probably at the range of 1 byte ( same as the LO limit ).
User avatar
Anthony Diaz
 
Posts: 3474
Joined: Thu Aug 09, 2007 11:24 pm

Post » Fri May 27, 2011 5:45 am

How should one go about making a texture for a model? I mean if someone uploaded a model and requested a texture how should I start making the texture? Surely if I just start building it'll end up misaligned or something like that.
User avatar
Dalley hussain
 
Posts: 3480
Joined: Sun Jun 18, 2006 2:45 am

Post » Fri May 27, 2011 12:53 am

I remember seeing a few people with this similar probelm, but cannot remember how they resolved it. My CS suddenly won't update any textures I change on my models. I retexured the interior of an Anvil house using NifSkope. At first it looked great in Nifskope AND in the CS. Every time I changed the texture, it would update in nifskope AND the CS AND even in the game. Here's the weird part: I go to bed, leaving my computer on overnight with EVERYTHING still open. The CS was still open, nifskope was still open, GIMP was still open....everything. I come back down the next morning to find my computer in sleep mode. I hit the spacebar to wake it up which takes me to my desktop, click on the CS window to make it the active window, and the house interior in the middle of my Render Window is back to its original vanilla textures. WTF? I click on nifskope and all my custom textures are there, but not in the CS. I load up the game, and all my custom textures are there but not in the CS. The only way I can get the CS to update any texture changes I make to a mesh is to close out of the program completely and reopen it. What the hell happened? Everything was working fine the night before.
User avatar
Rebecca Dosch
 
Posts: 3453
Joined: Thu Jan 18, 2007 6:39 pm

Post » Fri May 27, 2011 12:08 pm

@RedSand: As far as I know that's the way the CS works. The textures just wont update unless you reload the esp. There is a workaround which I use. What I do is set the reference to a different Nif (any Nif will do) click ok and then set it back to the Nif your working on.

It updates the texture most of the time, for me anyway. However, eventually it just stops updating and I have to restart the CS, annoying! :brokencomputer:


Also in case someone missed it...

What needs to be edited in the watertypes dialogue to remove the "nuclear glow" that water seems to have indoors. Or, is that just a hard coded shader that I have to put up with. OR Still, can it be removed via textures.


Thanks
User avatar
Marie
 
Posts: 3405
Joined: Thu Jun 29, 2006 12:05 am

Post » Fri May 27, 2011 1:25 am

For me, it used to be I could reload the same nif in the same reference to update the textures. That's what I was doing last night and every texture I changed would update when I reloaded just the nif into the same reference. But for some reason, it just suddenly stopped working that way. I'll give your workaround a try and see that helps at all. Thanks.
User avatar
Isaac Saetern
 
Posts: 3432
Joined: Mon Jun 25, 2007 6:46 pm

Post » Thu May 26, 2011 10:41 pm

How should one go about making a texture for a model? I mean if someone uploaded a model and requested a texture how should I start making the texture? Surely if I just start building it'll end up misaligned or something like that.


First step is to export a UV template (load the NIf into Nifskope and click on the Nitristrip of the model and do a Texture - Export Template (repeat for each tristrip if the model has more than one) - this will export a .tga file that has a wireframe model of the UVMap that you can then use to design the texture by importing those into a photo editing program like (GIMP or photoshop) - combine them if there are more than one tristrip and the layout of the UVmap will allow it (or make seperate textuures for each tristrip but that causes the model to require more than one texture !) - THis assumes the creator of the model made a UVMap for it in the 3d program (if not you'll need to do that first !)

Create your texture using that map and creating the texture for the various parts of the model Here are some screenshots of the process I use in Photoshop for example :


http://i212.photobucket.com/albums/cc189/JDFanning_bucket/Templateoutline.jpg
I then make a selection template by using the magic wand tool to select the white background - inverting the selection to get all of the wireframes selected - expand the selection by 2 pixels to give some margin of error in placement around the edges and then adjust the lightness to make it black - http://i212.photobucket.com/albums/cc189/JDFanning_bucket/UVtemplatecompleted.jpg - Doing this then allows me to go to that layer and select the piece or pieces I want to texture easily using the magic wand tool (or select by color and delte he pieces I do not want selected)
For example I then select the boxes for the gold portions of the throne and using a gold texture I made paste it into the selection - http://i212.photobucket.com/albums/cc189/JDFanning_bucket/Goldpasted.jpg - I then repeat those steps for the rest of the pieces (go to the selection template layer select the piece(s) that I am working on - move to a new layer and paste the texture in the selection - repeat for the next piece ) Until I wind up with sometthing like http://i212.photobucket.com/albums/cc189/JDFanning_bucket/completed.jpg
Save that texture and then use it as a base to create your normal map

For the Normal map :

Open the .dds texture and do a select all - Copy (to place a copy of the image into the clipboard)
Then run the Nvidia tools Normal Map FIlter on the texture ( http://i212.photobucket.com/albums/cc189/JDFanning_bucket/Normalmapsettings.jpg )
After it runs go to the channels tab and paste the image from the clipboard into the alpha channel (create aa new alpha channel if one does not yet exist) - It will greyscale the image automatically when pasted. and adjust the brightness (I usually darken by about 50 -60 % to reduce the reflectivity of the model in game but the setting will vary depending on the object (Note you can also darken just portions to make some parts reflect more\less light as desired) - http://i212.photobucket.com/albums/cc189/JDFanning_bucket/Alphachannel.jpg
Save the normal map with the same name as the texture but with the _n.dds extension and be sure to save as DXT3 or DXT5 (I use DXT5 in most cases). (http://s212.photobucket.com/albums/cc189/JDFanning_bucket/?action=view¤t=normalmapcompleted.jpg)

Load the model in Nifskope and change the texture paths to point to your newly created .dds file and save the new NIF - load up the CS create the item using your new NIF and place in game !

http://i212.photobucket.com/albums/cc189/JDFanning_bucket/SNAKETHRONE.jpg

This is a fairly quick rundown f the process for creating a texture and getting a proper textre may take several attempts and adjustments during the process but should at least give you a starting point !!
User avatar
Miss Hayley
 
Posts: 3414
Joined: Tue Jun 27, 2006 2:31 am

Post » Fri May 27, 2011 3:57 am

Another quick question from me: Does the mesh or texture control the shininess/glossiness of a 3d object? For example: If I want to edit an interior wall to look like it has a shiny paint job, do I make the change in the mesh properties or texture properties?
User avatar
Phillip Brunyee
 
Posts: 3510
Joined: Tue Jul 31, 2007 7:43 pm

Post » Fri May 27, 2011 7:24 am

Another quick question from me: Does the mesh or texture control the shininess/glossiness of a 3d object? For example: If I want to edit an interior wall to look like it has a shiny paint job, do I make the change in the mesh properties or texture properties?


That is controlled by the alpha channel of the Normal map (darker = less shiny\reflective) and\or the material properties in the NIf (ie. Changing the material property to apply highlight will cause a glossy look instead of Apply modulate which will look flatter with the amount of glossiness again based on the lightness\darkness of the Alpha channel of the normal map !)
User avatar
gemma king
 
Posts: 3523
Joined: Fri Feb 09, 2007 12:11 pm

Post » Fri May 27, 2011 9:05 am

First step is to export a UV template (load the NIf into Nifskope and click on the Nitristrip of the model and do a Texture - Export Template (repeat for each tristrip if the model has more than one) - this will export a .tga file that has a wireframe model of the UVMap that you can then use to design the texture by importing those into a photo editing program like (GIMP or photoshop) - combine them if there are more than one tristrip and the layout of the UVmap will allow it (or make seperate textuures for each tristrip but that causes the model to require more than one texture !) - THis assumes the creator of the model made a UVMap for it in the 3d program (if not you'll need to do that first !)


Ok so how do I make a UV map? It doesn't have one.
User avatar
Laura Simmonds
 
Posts: 3435
Joined: Wed Aug 16, 2006 10:27 pm

Post » Fri May 27, 2011 11:00 am

I'm placing a few NPCs into the wilderness. What's the general rule for when to make NPCs a persistent REF vs non-persistent. I'm running into some troubles and want to make sure I'm not setting this incorrectly.

Thanks.
User avatar
louise hamilton
 
Posts: 3412
Joined: Wed Jun 07, 2006 9:16 am

PreviousNext

Return to IV - Oblivion