Quick Questions -- Quick Answers, The 21st

Post » Fri May 20, 2011 4:11 am

I'm making spells that are just script effects, and in game the symbol is always just a plain Burden spell symbol, is there anyway to change what symbol it uses besides going under magic effects and changing the symbol for script effect?

Unfortunately, no. However, you can often add an additional effect with a very small value in order to change the casting icon, however this can also change the spell school and requires adding that other effect, so is not always a good solution.
User avatar
Chica Cheve
 
Posts: 3411
Joined: Sun Aug 27, 2006 10:42 pm

Post » Fri May 20, 2011 2:35 am

I'm having a problem with a script. It doesn't run in the correct order!
This is what it looks like:

Begin GameModeset FQuestDelayTime to 0.5If ( Player.IsAttacking == 1 )	Player.RemoveSpellNS HFCAbility		; Here is a long calculation which needs to be based on the player's skill WITHOUT the Ability added by this script	Player.AddSpellNS HFCAbilityEndIfEnd


What SHOULD happen is that the game very quickly removes the Ability, makes a calculation, and then adds it again, and then for the length of 0.5 seconds, nothing happens.
What DOES happen is that the game seems to remove the Ability AFTER I added it again.

I don't know why that happens, and I don't know how I can fix it. Any ideas? :(


Edit: Checked it out again, and it seems like the problem is slightly different:
It works as intended the first time. At the second time, it doesn't work and simply removes the ability. Now at the third time, it works again! And so forth (meaning everytime when the ability is NOT added to the player, the script works, but when he does have the ability, instead of removing and then adding it again the script simply removes it.)

I'm really lost here.
User avatar
Klaire
 
Posts: 3405
Joined: Wed Sep 27, 2006 7:56 am

Post » Fri May 20, 2011 12:57 am

Add a state check.

If state == 0
Player.RemoveSpellNS HFCAbility
set state to 10
endif

if state == 10
; Here is a long calculation which needs to be based on the player's skill WITHOUT the Ability added by this script
set state to 20
endif

if state == 20
Player.AddSpellNS HFCAbility
set state to 0
endif
User avatar
Sierra Ritsuka
 
Posts: 3506
Joined: Mon Dec 11, 2006 7:56 am

Post » Thu May 19, 2011 2:26 pm

That seems to help a little bit. I seem to get the ability twice in a row now sometimes. But occasionally, it still disappears. :huh:

Edit: No, my bad. It does not change anything.

I even added console messages at every stage, and they show up in the correct order. And when I use the normal AddSpell function, it even says "adding ability" every time - only that's not true every second time.

Okay I just used exactly that script of yours (showler) on an activator, with Begin OnActivate. That's as basic as it can get, but guess what - same problem. Every second time, the spell stays removed instead of getting added again.
User avatar
jess hughes
 
Posts: 3382
Joined: Tue Oct 24, 2006 8:10 pm

Post » Fri May 20, 2011 3:51 am

Sounds like it's getting partway through the script the second time.

Maybe zero isn't a good state for the removal, since it's the default value for a variable.

Is the spell supposed to be active all the time except in during an attack?
User avatar
Nana Samboy
 
Posts: 3424
Joined: Thu Sep 14, 2006 4:29 pm

Post » Thu May 19, 2011 11:00 pm

It's the other way around - it should only be active during an attack. For outside of combat, I have a timer that removes it after a certain time has passed.

The only reason I need to disable the ability is because it affects the player's skills, and I need their original values (that is, their modified values without the modification done by HFCAbility) in the calculation.

The script gets fully through even the second time, I think. Because when I activate the Activator with the simple script on it, I get the message "HFCAbility added".
User avatar
BaNK.RoLL
 
Posts: 3451
Joined: Sun Nov 18, 2007 3:55 pm

Post » Thu May 19, 2011 4:02 pm

Maybe the order is still being screwed up?

You could try a loop with a check.

Label 1
If player.hasspell HFCAbility
player.removespell HFCAbility
set state to 10
else goto 1
endif

And the same in reverse at the other end.

Make sure the script doesn't do each section until the appropriate time. It will keep trying the add or remove until it succeeds.
User avatar
BrEezy Baby
 
Posts: 3478
Joined: Sun Mar 11, 2007 4:22 am

Post » Thu May 19, 2011 2:46 pm

When I create new armor sometimes in the game they appear way to shiny, is their a way I can stop that?
User avatar
NEGRO
 
Posts: 3398
Joined: Sat Sep 01, 2007 12:14 am

Post » Thu May 19, 2011 6:40 pm

You could try a loop with a check.

Won't your example result in a loop where the game can't get out?
From my understanding of scripting, the script shouldn't even try to remove the spell if it doesn't have the spell and I make a check for that. So I can't grasp how that spell is able to disappear. I mean, I'm running it from an activator, it shouldn't run more than once, so that can't be the explanation either.

Well anyway, thank you for trying to help me. I'll keep trying.
User avatar
Noraima Vega
 
Posts: 3467
Joined: Wed Jun 06, 2007 7:28 am

Post » Thu May 19, 2011 6:53 pm

Yeah, actually that would loop infinitely. The label should be outside the "if state == 0" check so that once the spell is successfully removed it won't check true anymore.
User avatar
Jeremy Kenney
 
Posts: 3293
Joined: Sun Aug 05, 2007 5:36 pm

Post » Thu May 19, 2011 2:55 pm

Add a state check.

If state == 0
Player.RemoveSpellNS HFCAbility
set state to 10
endif

if state == 10
; Here is a long calculation which needs to be based on the player's skill WITHOUT the Ability added by this script
set state to 20
endif

if state == 20
Player.AddSpellNS HFCAbility
set state to 0
endif

I'm not sure if you have fixed the problem yet, but I would imagine that for the above code to help, you should change "if state == 10" to "elseif state == 10", and remove the endif just above it. That way, the script will run your lines in the next frame, instead of the same frame that you remove the ability.
User avatar
Crystal Clarke
 
Posts: 3410
Joined: Mon Dec 11, 2006 5:55 am

Post » Thu May 19, 2011 2:33 pm

Sometimes when I create new armor in the game they appear way to shiny, is there any way I can stop this?
User avatar
Karine laverre
 
Posts: 3439
Joined: Tue Mar 20, 2007 7:50 am

Post » Thu May 19, 2011 5:17 pm

Elldariin - What do you mean by "create new armor"? Please tell us all the steps involved in that, e.g. are you creating new textures, new meshes, etc.?

TheNiceOne - Thanks! That did the trick. :) I found a way now to make the script do what I want it to do. And it's not even overly "dirty". Just a little bit. :P
User avatar
Mrs. Patton
 
Posts: 3418
Joined: Fri Jan 26, 2007 8:00 am

Post » Thu May 19, 2011 2:16 pm

Create new armor as in textures. I don't know why but certain armors like the Imperial Watch after being retextured shine very very bright.
User avatar
T. tacks Rims
 
Posts: 3447
Joined: Wed Oct 10, 2007 10:35 am

Post » Thu May 19, 2011 9:37 pm

Shiny textures typically have a specular map that is all white, or a copy of a channel that is generally white. Specular data is in the alpha channel of the normal map, so this can happen if the normal map changes from one format to another e.g. DXT1 to DXT5 takes the unused alpha channel and makes it an all-white (max shiny) one. You probably just need to resave the normal map as DXT1, unless you really should have shiny parts, in which case the alpha channel needs editing to be more selective.
User avatar
Heather beauchamp
 
Posts: 3456
Joined: Mon Aug 13, 2007 6:05 pm

Post » Fri May 20, 2011 6:30 am

How do you add magic effect meshes to spells so that when you cast it the magic effect is shot at the opponent?
User avatar
Andrea P
 
Posts: 3400
Joined: Mon Feb 12, 2007 7:45 am

Post » Thu May 19, 2011 11:44 pm

I'm trying to use PushActorAway in a spell, with the intent of launching the target actor a good distance (think one end of the IC Market District to the other). The problem is, the "push" doesn't happen. Apparently, there's something I'm just not getting about that function. The current script I'm using is:

scn RTTPushSpellScriptref TargetBegin ScriptEffectStartSet Target to getactionrefPlayer.PushActorAway Target 10000End


What do I need to change here?
User avatar
Pawel Platek
 
Posts: 3489
Joined: Sat May 26, 2007 2:08 pm

Post » Fri May 20, 2011 1:46 am

Use getSelf instead of getActionRef - The latter only returns a valid reference inside an onActivate block.
User avatar
Claire Vaux
 
Posts: 3485
Joined: Sun Aug 06, 2006 6:56 am

Post » Thu May 19, 2011 7:27 pm

Use getSelf instead of getActionRef - The latter only returns a valid reference inside an onActivate block.

Thanks! :D It works like a charm now.
User avatar
Michelle davies
 
Posts: 3509
Joined: Wed Sep 27, 2006 3:59 am

Post » Fri May 20, 2011 5:15 am

I want to find some spells from a mod in the Construction Set, but the CS doesn't seem to have a search function like the G.E.C.K. and I can't find the spells anywhere. So I went to the NPCs the ReadMe said sold the spells, but I have no idea how to view what spells they have for sale. Can anyone tell me how to do that?
User avatar
Daniel Holgate
 
Posts: 3538
Joined: Tue May 29, 2007 1:02 am

Post » Thu May 19, 2011 9:19 pm

The find functions in the Oblivion CS don't work as well as you would think they should, however, if you use Edit: Find Text, and search for a partial string out of one of the spells, it should give ya a clue where to find the rest of them as well.
User avatar
Maeva
 
Posts: 3349
Joined: Mon Mar 26, 2007 11:27 pm

Post » Thu May 19, 2011 8:06 pm

The find functions in the Oblivion CS don't work as well as you would think they should, however, if you use Edit: Find Text, and search for a partial string out of one of the spells, it should give ya a clue where to find the rest of them as well.


Thanks, I found the spells.
User avatar
Len swann
 
Posts: 3466
Joined: Mon Jun 18, 2007 5:02 pm

Post » Fri May 20, 2011 1:07 am

Does anyone know how to modifie a creatures skeleton to make it usable as a race?
User avatar
Rachel Tyson
 
Posts: 3434
Joined: Sat Oct 07, 2006 4:42 pm

Post » Fri May 20, 2011 3:29 am

Stupid question here, but where is the code that handles lockpicking? I couldn't seem to find anything pertaining to it, and was curious.

Also, I mentioned this on a TESAlliance post but I suppose there's no harm in asking here too as I'm posting already, is there a function (vanilla or OBSE) that does either of the following?

Returns the FormID of the key to target door/container
or
Returns if the door/container was unlocked via key or via lockpick/spell

Thanks for your time!

CC
User avatar
April
 
Posts: 3479
Joined: Tue Jun 20, 2006 1:33 am

Post » Fri May 20, 2011 2:42 am

Never mind
User avatar
c.o.s.m.o
 
Posts: 3419
Joined: Sat Aug 12, 2006 9:21 am

PreviousNext

Return to IV - Oblivion