Quick Questions, Quick Answers Thread #8

Post » Mon Nov 19, 2012 8:11 am

Greetings.

I wanted to know how to make potions overwriting its effects, so that your character can only have one active effect potion.

In "HBE - Delayed Potions" in "HBE - hardcoe and Balanced Experience" you get with your plugin, but I have not figure out how.

Thank you for the answers!
User avatar
Emily Rose
 
Posts: 3482
Joined: Sat Feb 17, 2007 5:56 pm

Post » Mon Nov 19, 2012 7:24 pm

nvm Just found the answer...
User avatar
Flutterby
 
Posts: 3379
Joined: Mon Sep 25, 2006 11:28 am

Post » Mon Nov 19, 2012 5:34 am

Greetings.

I wanted to know how to make potions overwriting its effects, so that your character can only have one active effect potion.

In "HBE - Delayed Potions" in "HBE - hardcoe and Balanced Experience" you get with your plugin, but I have not figure out how.

Thank you for the answers!

I'm believe you just need to select "Peak Value Modifier" as the magic effect type. Though if your potions are doing something other than modifying actor values, you might be able to get by with an if-then-else statement in a script. Something like:

if !(actor.HasMagicEffect(myEffect))
...
...
endif

--------------

For myself, I was hoping to find out what is the best way to add a spell tome to the vendor lists without conflicting with any other mods that might want to add to or modify the vendor spell tome lists. Also, is there any way to scale a magic effect's duration with the global time scale, such that it always lasts one in-game day?
User avatar
gemma king
 
Posts: 3523
Joined: Fri Feb 09, 2007 12:11 pm

Post » Mon Nov 19, 2012 11:13 am

Spoiler

Thanks for the replies, I only need to check once so no need for a function.

Now, my next question. How do I stop the menu to choose to put points into Health, Magicka and Stamina from appearing??

Mod the UI ._.

(Seriously I don't know if that's the only way, but you can send me a pm if you decide to do that and need help with it, I'm going to be re-designing the interface completely anyway...)
User avatar
Oyuki Manson Lavey
 
Posts: 3438
Joined: Mon Aug 28, 2006 2:47 am

Post » Mon Nov 19, 2012 7:56 pm

I'm believe you just need to select "Peak Value Modifier" as the magic effect type. Though if your potions are doing something other than modifying actor values, you might be able to get by with an if-then-else statement in a script. Something like: if !(actor.HasMagicEffect(myEffect)) ... ... endif
"Peak Value Modifier" is the default type, so it is not that.
User avatar
Carys
 
Posts: 3369
Joined: Wed Aug 23, 2006 11:15 pm

Post » Mon Nov 19, 2012 6:22 pm

For myself, I was hoping to find out what is the best way to add a spell tome to the vendor lists without conflicting with any other mods that might want to add to or modify the vendor spell tome lists. Also, is there any way to scale a magic effect's duration with the global time scale, such that it always lasts one in-game day?

Okay. I solved one half of that on my own by examining the Rested perks. I can make the magic effect a constant, meaning it's permanent as long as the player "knows" the associated spell (even though you can't cast a constant spell). There's a standard script called TimedAbilityScript that automatically removes a spell from the player inventory after a certain number of in-game hours. It works for Rested, and I can't see why it won't work for me.

Now I just need a decent way to add my spell tomes to the game in a compatibility-friendly fashion.
User avatar
Russell Davies
 
Posts: 3429
Joined: Wed Nov 07, 2007 5:01 am

Post » Mon Nov 19, 2012 6:47 am

Haha, that's almost a disappointment, because LOD generated automatically as you're working would actually be an awesome improvement if it worked.
Considering how LOD generation takes forever from what I've heard and how it has so much potential to screw up, not having to worry about LOD generation and its issues would be nice. Anyway, my problem wasn't LOD-related anyway, and I think it may have happened due to hitting "Validate Loaded Data" or something. Whatever it was, it's gone now.
User avatar
A Dardzz
 
Posts: 3370
Joined: Sat Jan 27, 2007 6:26 pm

Post » Mon Nov 19, 2012 8:10 pm

Considering how LOD generation takes forever from what I've heard and how it has so much potential to screw up, not having to worry about LOD generation and its issues would be nice. Anyway, my problem wasn't LOD-related anyway, and I think it may have happened due to hitting "Validate Loaded Data" or something. Whatever it was, it's gone now.

Yeah, it's mostly the textures that have a lot of screw up potential. So you fixed it by just editing the terrain randomly and re-saving?
User avatar
Marnesia Steele
 
Posts: 3398
Joined: Thu Aug 09, 2007 10:11 pm

Post » Mon Nov 19, 2012 8:38 pm

How can I insert the player's name into a book?

The assassin letter in vanilla skyrim inserts your name into the text, using . However, when I put that note into one of my mod's character's inventories, it no longer works. It displays text up until the first <, then everything else is blank.

I guess I need to somehow create an alias for the player within my quest or something?

Any help appreciated
User avatar
Robert Bindley
 
Posts: 3474
Joined: Fri Aug 03, 2007 5:31 pm

Post » Mon Nov 19, 2012 10:10 am

The book/note needs to be an alias of a quest. You don't need to make a player alias though, will work without it.
User avatar
Tiffany Holmes
 
Posts: 3351
Joined: Sun Sep 10, 2006 2:28 am

Post » Mon Nov 19, 2012 6:33 pm

For the life of me I can't get a Kill Actor SM event to start using the condition GetIsRace HareRace. It works for all other creature races except this one lol. Basically, does anyone have any idea why?
User avatar
Lucie H
 
Posts: 3276
Joined: Tue Mar 13, 2007 11:46 pm

Post » Mon Nov 19, 2012 6:15 am

What's wrong with this? The quest specified in the properties doesn't start, objectives don't show up, it's not even in the quest tab. The script is attached to a trigger volume.

Scriptname opbStartQuestTriggerScript extends ObjectReference Quest Property opbStartQuest AutoEvent OnTriggerEnter(ObjectReference akActionRef)If (akActionRef == Game.GetPlayer())  opbStartQuest.Start()  opbStartQuest.SetStage(0)  opbStartQuest.SetObjectiveDisplayed(0,true)EndIfEndEvent
User avatar
Far'ed K.G.h.m
 
Posts: 3464
Joined: Sat Jul 14, 2007 11:03 pm

Post » Mon Nov 19, 2012 2:22 pm

Your quest can't start. The usual reason is non-optional aliases that can't be filled.
User avatar
Jack
 
Posts: 3483
Joined: Sat Oct 20, 2007 8:08 am

Post » Mon Nov 19, 2012 6:01 pm

How can I get the reference from a trigger inside a script attached to the trigger itself? I know I can get an object reference with "ObjectReference MyObject = GetReference() As ObjectReference" from it's attached script, but a trigger???
User avatar
Lyndsey Bird
 
Posts: 3539
Joined: Sun Oct 22, 2006 2:57 am

Post » Mon Nov 19, 2012 4:50 am

Is there a function/script to return the number of members in a faction? I can't seem to find one in the wiki :smile:

I want to set a global so I can use it in Text Replacement :)
User avatar
Misty lt
 
Posts: 3400
Joined: Mon Dec 25, 2006 10:06 am

Post » Mon Nov 19, 2012 7:51 pm

Yeah, it's mostly the textures that have a lot of screw up potential. So you fixed it by just editing the terrain randomly and re-saving?
Pretty much, yeah. I don't know if it works for every case, but it worked for this one. It may depend on how the terrain was glitched to begin with, and at which end the terrain glitched out at (CK or in-game). For this case, it was for terrain that was fine on the CK end, but screwing up on the in-game end, so editing the terrain must have overridden whatever problem was going on in the game.
User avatar
FirDaus LOVe farhana
 
Posts: 3369
Joined: Thu Sep 13, 2007 3:42 am

Post » Mon Nov 19, 2012 11:00 am

Hey guys, trying to write a snippet of code I can use for all of my contracts, but having trouble using a decimal number in a sum. Here is my code:

Player.AddItem(Gold, SamplePelt.GetReference().GetGoldValue() / 1.4 * HISJL0QTotal.GetValueInt())

That's what I want to do anyway, I want the base value divided by 1.4, then times the number of items needed. So 10 Bear Pelts at 30 gold each, would look like (30 / 1.4 (which = 21.4) x 10 = 214 Gold)

it's just not compiling because of the decimal. It compiles fine if the number is an integer. How do I use a decimal number like that for this script?

Thanks for any help :smile:
User avatar
gary lee
 
Posts: 3436
Joined: Tue Jul 03, 2007 7:49 pm

Post » Mon Nov 19, 2012 10:22 am

How can I insert the player's name into a book? ..............................


The book/note needs to be an alias of a quest. You don't need to make a player alias though, will work without it.
I must be doing something wrong, because it's not working. Can you please tell me how I should be doing this alias?

Specific Reference? External Alias Reference? Reference to Object? (if so, do I do "at" or "in" and what do I put in the 3rd dropdown?). Does it matter what the Alias is called? Anything else I should know?

Thanks very much.
User avatar
Bitter End
 
Posts: 3418
Joined: Fri Sep 08, 2006 11:40 am

Post » Mon Nov 19, 2012 6:39 am

I must be doing something wrong, because it's not working. Can you please tell me how I should be doing this alias?

Specific Reference? External Alias Reference? Reference to Object? (if so, do I do "at" or "in" and what do I put in the 3rd dropdown?). Does it matter what the Alias is called? Anything else I should know?

Thanks very much.

How you want the player to obtain the book will denote what type of alias you need to create. So I'll tell you exactly what to do, if you tell me how the player gets the book :)
User avatar
Catherine N
 
Posts: 3407
Joined: Sat Jan 27, 2007 9:58 pm

Post » Mon Nov 19, 2012 10:38 am

Hey guys, trying to write a snippet of code I can use for all of my contracts, but having trouble using a decimal number in a sum. Here is my code:

Player.AddItem(Gold, SamplePelt.GetReference().GetGoldValue() / 1.4 * HISJL0QTotal.GetValueInt())

That's what I want to do anyway, I want the base value divided by 1.4, then times the number of items needed. So 10 Bear Pelts at 30 gold each, would look like (30 / 1.4 (which = 21.4) x 10 = 214 Gold)

it's just not compiling because of the decimal. It compiles fine if the number is an integer. How do I use a decimal number like that for this script?

Thanks for any help :smile:

Just use GetValue() instead of GetValueInt(), GetValue() will get the value of your global as a float.
User avatar
Calum Campbell
 
Posts: 3574
Joined: Tue Jul 10, 2007 7:55 am

Post » Mon Nov 19, 2012 7:36 pm

Just use GetValue() instead of GetValueInt(), GetValue() will get the value of your global as a float.

I've tried that mate. It's the number I'm dividing by that doens't like being a decimal. The 1.4 (also tried * 0.6).
User avatar
Stacyia
 
Posts: 3361
Joined: Mon Jul 24, 2006 12:48 am

Post » Mon Nov 19, 2012 3:18 pm

Wait, GetGoldValue() returns an int so cast that as a float as well. If that does not work then multiply the top by 7 and divide by 5.
User avatar
Kieren Thomson
 
Posts: 3454
Joined: Sat Jul 21, 2007 3:28 am

Post » Mon Nov 19, 2012 1:18 pm

Wait, GetGoldValue() returns an int so cast that as a float as well. If that does not work then multiply the top by 7 and divide by 5.

That might work, make the sum longer by 1 calculation, by going the long way round... I'll give it a blast.
User avatar
Natalie Taylor
 
Posts: 3301
Joined: Mon Sep 11, 2006 7:54 pm

Post » Mon Nov 19, 2012 6:28 pm

PlayerREF.AddItem(Gold001, ((SamplePelt.GetReference().GetBaseObject()).GetGoldValue() As Float / (1.4 * HISJL0QTotal.GetValue())) As Int)

?
User avatar
Tom
 
Posts: 3463
Joined: Sun Aug 05, 2007 7:39 pm

Post » Mon Nov 19, 2012 8:43 am

PlayerREF.AddItem(Gold001, ((SamplePelt.GetReference().GetBaseObject()).GetGoldValue() As Float / (1.4 * HISJL0QTotal.GetValue())) As Int)

?

Player.AddItem(Gold, ((SamplePelt.GetReference().GetBaseObject()).GetGoldValue() As Float / 1.4 * HISJL0QTotal.GetValue()) As Int)

This works :wink: Yours is the wrong way round. Thanks mate :smile:
User avatar
Alycia Leann grace
 
Posts: 3539
Joined: Tue Jun 26, 2007 10:07 pm

PreviousNext

Return to V - Skyrim