Quick Questions -- Quick Answers, The Eleventh

Post » Fri May 27, 2011 12:52 am

Where can I learn how to make .ini file for a mod?
User avatar
Petr Jordy Zugar
 
Posts: 3497
Joined: Tue Jul 03, 2007 10:10 pm

Post » Fri May 27, 2011 8:10 am

Amateur question: I've been whacked with the http://www.uesp.net/wiki/Oblivion:Glitches#Permanent_Enchantments glitch. Are there any console commands to remove these effects?

The wiki says not. You could, though, create a script to walk through all active effects and remove teh faulty ones.

Hmmm... I don't think so. But I found this: GetWeaponSkillType! Maybe that will do!

Well, in my experience, that returns true even when you have staff equipped. I suggest you use getEquippedObject 19 and check if it returns a null, like it was suggested.

Where can I learn how to make .ini file for a mod?

Pretty easy : Just readup on the http://cs.elderscrolls.com/constwiki/index.php/RunBatchScript function and look up a mod which uses an INI ( Supreme Magicka, for instance ).
User avatar
Averielle Garcia
 
Posts: 3491
Joined: Fri Aug 24, 2007 3:41 pm

Post » Fri May 27, 2011 1:12 am

How do I reference the target of vampire feeding? For example, when my vampire character feeds on an NPC I want to make a little counter on them so if the player feeds on them too much they might die or become a vampire, seek a chapel for healing, etc.
User avatar
Philip Lyon
 
Posts: 3297
Joined: Tue Aug 14, 2007 6:08 am

Post » Fri May 27, 2011 9:22 am

How do I reference the target of vampire feeding? For example, when my vampire character feeds on an NPC I want to make a little counter on them so if the player feeds on them too much they might die or become a vampire, seek a chapel for healing, etc.

Easiest approach would be using http://obse.silverlock.org/obse_command_doc.html#GetCrosshairRef to keep track of whatever the player is looking at (including his or her feeding target).
User avatar
Ian White
 
Posts: 3476
Joined: Thu Jul 19, 2007 8:08 pm

Post » Fri May 27, 2011 5:06 am

Imagine: HAve you tried RemoveSpell EnchantmentID already?

I just gave it a shot. The removespell command works with neither editorid nor formid for the enchantment. It seems that the formid I gave it (856ee - the enchantment on the Jewel of the Rumare) is recognized as a valid object, but Oblivion complains that it is not the correct type of parameter for the removespell command, whereas bogus formid's or editorid's result in an id "not found" error.

Am I making some stupid mistake?
User avatar
Emma Parkinson
 
Posts: 3401
Joined: Wed Jul 26, 2006 5:53 pm

Post » Thu May 26, 2011 10:53 pm

Easiest approach would be using http://obse.silverlock.org/obse_command_doc.html#GetCrosshairRef to keep track of whatever the player is looking at (including his or her feeding target).

Ok that sounds like a place to start. But how do you store that information for a few game days, like say I want to keep track of how many times i've fed on an NPC. I might feed on other NPC's besides the one I fed on and come back to them the next night.
User avatar
Rob Davidson
 
Posts: 3422
Joined: Thu Aug 02, 2007 2:52 am

Post » Fri May 27, 2011 12:40 am

Ok that sounds like a place to start. But how do you store that information for a few game days, like say I want to keep track of how many times i've fed on an NPC. I might feed on other NPC's besides the one I fed on and come back to them the next night.

Once you have a ref to the current victim you can give it a token for each time he was fed upon.
User avatar
Stephanie Nieves
 
Posts: 3407
Joined: Mon Apr 02, 2007 10:52 pm

Post » Fri May 27, 2011 3:35 am

I just gave it a shot. The removespell command works with neither editorid nor formid for the enchantment. It seems that the formid I gave it (856ee - the enchantment on the Jewel of the Rumare) is recognized as a valid object, but Oblivion complains that it is not the correct type of parameter for the removespell command, whereas bogus formid's or editorid's result in an id "not found" error.

Am I making some stupid mistake?

the formid has to be a 8 digit number (the 6 digit enchantment formid plus the load order corrected mod index (which is the first two hexadecimal chars of the 8 digit formid)).
Pacific Morrowind
User avatar
Amber Ably
 
Posts: 3372
Joined: Wed Aug 29, 2007 4:39 pm

Post » Fri May 27, 2011 4:37 am

Read up on FormIDs - http://www.uesp.net/wiki/Tes4Mod:Formid. Note that in-CS formID's are different from those in-game.
User avatar
sam
 
Posts: 3386
Joined: Sat Jan 27, 2007 2:44 pm

Post » Fri May 27, 2011 1:56 am

the formid has to be a 8 digit number (the 6 digit enchantment formid plus the load order corrected mod index (which is the first two hexadecimal chars of the 8 digit formid)).

Read up on FormIDs - http://www.uesp.net/wiki/Tes4Mod:Formid. Note that in-CS formID's are different from those in-game.

Thanks for the response guys. I knew about this issue, and just out of spite, I had also tested 10856ee, 20856ee, and 30856ee.

I checked my entire esp list in tes4edit today and found that none of the esp's change the record for this enchantment (it is the humble Jewel of the Rumare after all) so the appropriate mod index should still be 00, no?
User avatar
Daramis McGee
 
Posts: 3378
Joined: Mon Sep 03, 2007 10:47 am

Post » Thu May 26, 2011 11:51 pm

Once you have a ref to the current victim you can give it a token for each time he was fed upon.

Ok I read up on tokens, and I think I can handled that. But I'm still confused as to how to capture the victim I am feeding on versus some other object at any given moment with GetCrosshairRef. I mean that could be anything at any time, how would you use it to get the npc at the right moment? When feeding, the camera is locked anyway, and there is no way to get the actor you are feeding on I don't think since you can look at anything, most likely your own player's back, the bed, the room, etc.

What I do have to work with is HasVampireFed and if it == 1 then if I could somehow query my last activated object that should get me the right target. Is there a GetLastActivated command or something like that?

The other thing I thought might work is IsAnimGroupPlaying but I couldn't find the vampire feed animation in the list.
User avatar
Chavala
 
Posts: 3355
Joined: Sun Jun 25, 2006 5:28 am

Post » Fri May 27, 2011 11:26 am

Ok I read up on tokens, and I think I can handled that. But I'm still confused as to how to capture the victim I am feeding on versus some other object at any given moment with GetCrosshairRef. I mean that could be anything at any time, how would you use it to get the npc at the right moment? When feeding, the camera is locked anyway, and there is no way to get the actor you are feeding on I don't think since you can look at anything, most likely your own player's back, the bed, the room, etc.

What I do have to work with is HasVampireFed and if it == 1 then if I could somehow query my last activated object that should get me the right target. Is there a GetLastActivated command or something like that?

The other thing I thought might work is IsAnimGroupPlaying but I couldn't find the vampire feed animation in the list.

A GetLastActivated command doesn't exist, so you'll have to keep track of the last activated NPC yourself. Then when you've determined that the player is feeding or has just fed, you can add a token to the last activated NPC.

The feeding animation is a SpecialIdle, so it uses the http://cs.elderscrolls.com/constwiki/index.php/Idle_Manager. The idle manager uses a tree with conditions to determine which SpecialIdle to play. If there's no magic happening behind the scenes you should be able to find the conditions in the idle manager and use them in your script to find out when the player is feeding.
User avatar
SamanthaLove
 
Posts: 3565
Joined: Mon Dec 11, 2006 3:54 am

Post » Fri May 27, 2011 6:12 am

I checked my entire esp list in tes4edit today and found that none of the esp's change the record for this enchantment (it is the humble Jewel of the Rumare after all) so the appropriate mod index should still be 00, no?

That's correct, everything in Oblivion.esm has modindex 00.
User avatar
Curveballs On Phoenix
 
Posts: 3365
Joined: Sun Jul 01, 2007 4:43 am

Post » Fri May 27, 2011 9:30 am

Thanks for the response guys. I knew about this issue, and just out of spite, I had also tested 10856ee, 20856ee, and 30856ee.

I checked my entire esp list in tes4edit today and found that none of the esp's change the record for this enchantment (it is the humble Jewel of the Rumare after all) so the appropriate mod index should still be 00, no?


The Jewel of Rumare is a quest reward item and is not set as a quest item so should not be affected by the Glitch !! Are you sure it is the item cuasing your problem ?? - The glitch happens because quest items can not be removed from you in normal circumstances so the forceable removal causes the glitch but the Jewel of Rumare is not a quest item and therfore the forceable removal of it will not cause such a glitch - it must be something else causing it !!
User avatar
ezra
 
Posts: 3510
Joined: Sun Aug 12, 2007 6:40 pm

Post » Fri May 27, 2011 1:20 am

A GetLastActivated command doesn't exist, so you'll have to keep track of the last activated NPC yourself. Then when you've determined that the player is feeding or has just fed, you can add a token to the last activated NPC.

The feeding animation is a SpecialIdle, so it uses the http://cs.elderscrolls.com/constwiki/index.php/Idle_Manager. The idle manager uses a tree with conditions to determine which SpecialIdle to play. If there's no magic happening behind the scenes you should be able to find the conditions in the idle manager and use them in your script to find out when the player is feeding.

I tried the animation suggestion but I couldn't get it to return a 1. Here is my code:

	;vampire anim test to see if we can capture when the player is feeding		If VampireFeedBedLeft.IsAnimPlaying == 1		messagebox "vamire left bed feed anim playing"		EndIf		If VampireFeedBedRight.IsAnimPlaying == 1		messagebox "vamire left bed feed anim playing"		EndIf		If VampireFeedBedRollSide.IsAnimPlaying == 1		messagebox "vamire left bed feed anim playing"		EndIf		If VampireFeedBedRollCrawl.IsAnimPlaying == 1		messagebox "vamire left bed feed anim playing"		EndIf


Mainly I just need to deposit a token into the npc I fed on. Since they would be the closest NPC to me at the time I fed and I know GetVampireFed works right, can I cast a short area damage spell that deposits the token?
User avatar
Miss Hayley
 
Posts: 3414
Joined: Tue Jun 27, 2006 2:31 am

Post » Fri May 27, 2011 4:16 am

I tried the animation suggestion but I couldn't get it to return a 1. Here is my code:

;vampire anim test to see if we can capture when the player is feeding		If VampireFeedBedLeft.IsAnimPlaying == 1		messagebox "vamire left bed feed anim playing"		EndIf		If VampireFeedBedRight.IsAnimPlaying == 1		messagebox "vamire left bed feed anim playing"		EndIf		If VampireFeedBedRollSide.IsAnimPlaying == 1		messagebox "vamire left bed feed anim playing"		EndIf		If VampireFeedBedRollCrawl.IsAnimPlaying == 1		messagebox "vamire left bed feed anim playing"		EndIf


Mainly I just need to deposit a token into the npc I fed on. Since they would be the closest NPC to me at the time I fed and I know GetVampireFed works right, can I cast a short area damage spell that deposits the token?


could you add to the feed script so that the token is added as part of the feeding process ? Not sure how the feeding script is written but it tests to make sure the target is an NPC I believe and resets the player vamp level so perhaps it can be adapted in that portion of the script to add the token to the NPC being fed on. :shrug:
User avatar
SexyPimpAss
 
Posts: 3416
Joined: Wed Nov 15, 2006 9:24 am

Post » Fri May 27, 2011 8:15 am

could you add to the feed script so that the token is added as part of the feeding process ? Not sure how the feeding script is written but it tests to make sure the target is an NPC I believe and resets the player vamp level so perhaps it can be adapted in that portion of the script to add the token to the NPC being fed on. :shrug:

I don't think there is a script for that, it is hard coded or hidden somewhere. I could be wrong but I have never been able to find it.
User avatar
Katey Meyer
 
Posts: 3464
Joined: Sat Dec 30, 2006 10:14 pm

Post » Fri May 27, 2011 5:27 am

I tried the animation suggestion but I couldn't get it to return a 1. Here is my code:


IsAnimPlaying doesn't work like that. It returns 1 if any animation is playing on the calling reference. To find out which animation is playing you'll have to use the OBSE function http://obse.silverlock.org/obse_command_doc.html#AnimPathIncludes. This looks like a good answer to your problem.

Mainly I just need to deposit a token into the npc I fed on. Since they would be the closest NPC to me at the time I fed and I know GetVampireFed works right, can I cast a short area damage spell that deposits the token?

You could either use a scripted area of effect spell or you could loop through all actors in the current cell with http://cs.elderscrolls.com/constwiki/index.php/GetNextRef. I'd go for the last option, it's less messy (you can keep everything in one script).
User avatar
james reed
 
Posts: 3371
Joined: Tue Sep 18, 2007 12:18 am

Post » Thu May 26, 2011 11:25 pm

The Jewel of Rumare is a quest reward item and is not set as a quest item so should not be affected by the Glitch !! Are you sure it is the item cuasing your problem ?? - The glitch happens because quest items can not be removed from you in normal circumstances so the forceable removal causes the glitch but the Jewel of Rumare is not a quest item and therfore the forceable removal of it will not cause such a glitch - it must be something else causing it !!

Good catch. I had used the OBSE command "setquestitem" to make the Jewel of Rumare a quest item and test some things out. This gave the item a modindex of ff (created a new item with modindex ff?), but there is no corresponding ff0856ee enchantment (formid not found error trying to reference it in console).

I've also got a stuck enchantment from the Ring of the Vipereye, a legitimate case of the glitch, and haven't been able to remove that either. I have the feeling this problem doesn't qualify for the modding-questions express checkout line anymore.:wacko: Should I start a new thread for this issue to avoid cluttering up this one?
User avatar
(G-yen)
 
Posts: 3385
Joined: Thu Oct 11, 2007 11:10 pm

Post » Fri May 27, 2011 11:48 am

I don't think there is a script for that, it is hard coded or hidden somewhere. I could be wrong but I have never been able to find it.


There is a script called vampire script that has the following in it :

;SCRIPTING FOR STATE CHANGES AS A VAMPIRE;--------------------------------------------------------------------------------------------------------------------;First things first. If player has fed, reset Vampirism level to 25 and start the counters over againIf ( PCVampire >= 1 )	if ( Player.HasVampireFed == 1 )		Set PCVampire to 1


so it looks like there is a Player.HasVampireFed variable that gets set once the player feeds so perhaps adjusting this script to do the adding of your token to the closest NPC or creating a new global and setting it to =1 inside that script and then creating a quest script to add the token once this variable is set and resetting it to =0 :shrug:
User avatar
Rob Davidson
 
Posts: 3422
Joined: Thu Aug 02, 2007 2:52 am

Post » Fri May 27, 2011 12:55 am

For Imagine:
Have you tried DispelNthAE? ( player.dispelnae [index] ) Of course you'd need to figure out the index of the active effect you want to dispel. If you don't want to deal with writing a script, you could just jump to the console and do some good old guess and check.

I've never used it on glitched active effects though.
User avatar
Jordan Moreno
 
Posts: 3462
Joined: Thu May 10, 2007 4:47 pm

Post » Thu May 26, 2011 10:38 pm

I've finally solved my not-so-quick http://www.uesp.net/wiki/Oblivion:Glitches#Permanent_Enchantments question. :wacko:

The console command "player.Dispel EnchantmentID" will kill the stuck enchantment effect. Curiously enough, the related "DispelAllSpells" command does not work for enchantment effects.

I'll update the CS and UESP wiki with this fix.
User avatar
Chris Jones
 
Posts: 3435
Joined: Wed May 09, 2007 3:11 am

Post » Thu May 26, 2011 8:40 pm

Hello everyone,

I hope no-one minds me asking these stupid questions, but ...

1) In the CS, why does the "Edit>Find" (ctrl+F) function NOT work? It would be so useful when I want to locate a particular Item.

2) Why does all the NPC's (including the Player) only have "Holes" for eyes? (You see only the background showing in the eye sockets, but no eyes.)

3) How do I take a Screenshot in Oblivion?

4) and finally, can any moderator please tell me why, when I "change pages" AND I am logged-in as a user (eg: Preview Post) it says..
Error .. Sorry, you are not permitted to use this board ... You are not logged in .. Please register or Log In below.
(but if I go back one page and try again, it works 80% of the time)? Very Confusing!

Any answers would be welcome.

Many Thanks

Aerial
User avatar
Keeley Stevens
 
Posts: 3398
Joined: Wed Sep 06, 2006 6:04 pm

Post » Fri May 27, 2011 5:21 am

1) In the CS, why does the "Edit>Find" (ctrl+F) function NOT work? It would be so useful when I want to locate a particular Item.

2) Why does all the NPC's (including the Player) only have "Holes" for eyes? (You see only the background showing in the eye sockets, but no eyes.)

3) How do I take a Screenshot in Oblivion?

4) and finally, can any moderator please tell me why, when I "change pages" AND I am logged-in as a user (eg: Preview Post) it says..
Error .. Sorry, you are not permitted to use this board ... You are not logged in .. Please register or Log In below.
(but if I go back one page and try again, it works 80% of the time)? Very Confusing!


1. Try "Find text" instead. I don't know the why of it, but I think that's what you're looking for.
2. Because at some point you installed (or tried to) a mod that changes eyes or faces or hairs or something like that, and it went badly. Try uninstalling any beauty mods, updated OBMM's archive invalidation, and see how that goes.
3. Find the "allowscreenshots" line in the Oblivion.ini in your \My Games\Oblivion folder. Change its value from 0 to 1. Use the PrintScreen key to take shots in game; be aware that you must have anti-aliasing turned off.
4. I'm not a moderator, but it sounds like your browser is losing tabs on your session cookie. Wierd.

This gave the item a modindex of ff (created a new item with modindex ff?), but there is no corresponding ff0856ee enchantment (formid not found error trying to reference it in console).


As a note... "ff" IDs are the expendable ones the game assigns for new references created during gameplay (user-created potions, enchanted items, etc) and not by the editor, which is why you got that message. ...I think.
User avatar
Susan
 
Posts: 3536
Joined: Sun Jun 25, 2006 2:46 am

Post » Thu May 26, 2011 11:16 pm

1. Try "Find text" instead. I don't know the why of it, but I think that's what you're looking for.
2. Because at some point you installed (or tried to) a mod that changes eyes or faces or hairs or something like that, and it went badly. Try uninstalling any beauty mods, updated OBMM's archive invalidation, and see how that goes.
3. Find the "allowscreenshots" line in the Oblivion.ini in your \My Games\Oblivion folder. Change its value from 0 to 1. Use the PrintScreen key to take shots in game; be aware that you must have anti-aliasing turned off.
4. I'm not a moderator, but it sounds like your browser is losing tabs on your session cookie. Wierd.

Thanks Khettienna,

I will try what you suggest, and see if that works (Re: Q's 1, 2, and 3)

Regarding my question 4, I have logged in with 1) IE ver 8, and 2) Mozilla Firefox ver 3.09 and BOTH get the "same error" on on this site!
i.e: "as per stated in my original question" whilst I "surf" the forums. WEIRD! (I am REALLY TIRED of having to "LOG-IN" ALL THE TIME !)

SO .. Administrators, Site Controller, Whoever .. Can you PLEASE help ?

I would be ever so gratefull.
User avatar
Javaun Thompson
 
Posts: 3397
Joined: Fri Sep 21, 2007 10:28 am

PreviousNext

Return to IV - Oblivion