Using GetCurrentTime as a Perk Condition

Post » Sun Nov 18, 2012 3:20 am

Simply. I want to give the player an Ability which is constant and applies a created perk. The perk entry has a condition to check that the current time is between 22-4. It doesn't seem to be working. Where else could I apply the conditions?
User avatar
Erika Ellsworth
 
Posts: 3333
Joined: Sat Jan 06, 2007 5:52 am

Post » Sun Nov 18, 2012 2:47 am

Would giving the player a timed package that applies the perk not do?
User avatar
Dawn Farrell
 
Posts: 3522
Joined: Thu Aug 23, 2007 9:02 am

Post » Sat Nov 17, 2012 7:02 pm

Use GetGlobalValue with GameHour global variable.

If this is sunlight related, also do a check for IsInInterior == 0. If you want to take the Dawnguard darkening in account also check for the Global called DLC1EclipseActive.
User avatar
Verity Hurding
 
Posts: 3455
Joined: Sat Jul 22, 2006 1:29 pm

Post » Sun Nov 18, 2012 1:01 am

@ ingenue, don't really know how to do that.

I have the same GetCurrentTime conditions on a series of magic effects tied to an ability spell and those do not work either.


I want to take a look at a effect or perk that does use the getcurrenttime condition but I honestly can't find any


Edit: @ Maegfaer, I'll try it. What makes that different from GetCurrentTime?
User avatar
Matt Fletcher
 
Posts: 3355
Joined: Mon Sep 24, 2007 3:48 am

Post » Sat Nov 17, 2012 9:02 pm

Double click on the GetCurrentTime condition, a window pops up. Where it says GetCurrentTime is a drop down menu. Find GetGlobalValue in the list instead. Now click on the button to the right where it says INVALID. A pop up window with a list shows up. In that list find GetGameHour.
User avatar
CHARLODDE
 
Posts: 3408
Joined: Mon Apr 23, 2007 5:33 pm

Post » Sat Nov 17, 2012 5:57 pm

Double click on the GetCurrentTime condition, a window pops up. Where it says GetCurrentTime is a drop down menu. Find GetGlobalValue in the list instead. Now click on the button to the right where it says INVALID. A pop up window with a list shows up. In that list find GetGameHour.

Thanks haha, my post that said I didn't know how to do that was actually directed at ingenue, I guess I took too long writing my post! I do in fact know what I am doing when it comes to dealing with conditionals.

I do keep running into problems where certain condtions simply don't work or I misunderstand their title or parameters and thus, use it wrong. Case in point, would make sense that to have a condition that checks if you are in a timeframe you would established the current time (and the end/start point of the timeframe) and check if you were in-between the two.
User avatar
Claire
 
Posts: 3329
Joined: Tue Oct 24, 2006 4:01 pm

Post » Sat Nov 17, 2012 9:25 pm

Okay so assuming this works I have another question.

RIght now I have the perk checking to make sure I am in the correct timeframe. Meanwhile, I have a magic effect which is meant to attach the perk for the duration of the effect; which, since the spell that uses the effect is a constant ability, is as long as the player has that spell.

Where would the conditions be best suited?
User avatar
Jose ordaz
 
Posts: 3552
Joined: Mon Aug 27, 2007 10:14 pm

Post » Sun Nov 18, 2012 2:12 am

@ ingenue, don't really know how to do that.

No worries, it was a terrible idea :)
User avatar
lacy lake
 
Posts: 3450
Joined: Sun Dec 31, 2006 12:13 am

Post » Sat Nov 17, 2012 8:53 pm

Edit: @ Maegfaer, I'll try it. What makes that different from GetCurrentTime?

The difference is that it will work for sure. ;)

Add the conditions to the Perk object.
User avatar
Matt Bee
 
Posts: 3441
Joined: Tue Jul 10, 2007 5:32 am

Post » Sun Nov 18, 2012 8:10 am

Okay I added the GetGameHour > 5 AND GetGameHour<8 to the Perk Object that I want to add, I also removed any time condition from the magic effect which adds the perk. What happened was when the spell was added to the player the magic effect appeared in my Current Effects list, I don't know if the perk triggered or not, but I waited until 5 in the morning to see if it would work. When I went to check my active effects, the effect was gone from the list.

As a sidenote, I made another Spell with GetGameHour conditions. This one had an effect which was supposed to increase sneak by 30 between the game hours of 22 and 2 . No effect ever appeared and when the appropriate time came, no stat change occured.

Really don't know what the deal is
User avatar
Paul Rice
 
Posts: 3430
Joined: Thu Jun 14, 2007 11:51 am

Post » Sun Nov 18, 2012 6:25 am

Make sure the condition runs on Subject. Check the <= and >= signs that they are correct. Also check the conditions on the Sneak increase Perk that is added by your Spell, perhaps something old is still there and is blocking the effect.
User avatar
Craig Martin
 
Posts: 3395
Joined: Wed Jun 06, 2007 4:25 pm

Post » Sun Nov 18, 2012 8:44 am

The condition is set to run on Subject. And I've looked at no other conditions exist that would block either of these spells from working.
User avatar
Ymani Hood
 
Posts: 3514
Joined: Fri Oct 26, 2007 3:22 am

Post » Sat Nov 17, 2012 10:15 pm

The condition isn't affecting the Sneak buff ability at all. II removed the restriction and the effect still didn't appear, But be some sort of spell or magic effect property is set wrong. Doesn't help that they are confusing as hell/
User avatar
Tasha Clifford
 
Posts: 3295
Joined: Fri Jul 21, 2006 7:08 am

Post » Sun Nov 18, 2012 7:12 am

Can't get most of my magic effects that have conditonals work right.

I made a Life Detect lesser power that checks in the effect if the actor haskeyword animal. I cast the spell in the middle of a group of wolves and it doesn't do jack.
User avatar
Steven Hardman
 
Posts: 3323
Joined: Sun Jun 10, 2007 5:12 pm

Post » Sat Nov 17, 2012 8:39 pm

Nevermind scratch that. I dont know what I tweaked but I managed to get the Detect Animal lesser power working.

Anyway, after some additonal testing on my initial problem I have a report, heres my test...

-Activate the testshrine which adds all of the spells I am trying to test. I do this at game hour 12.
- All of the spells are added to me, a AoE power that does fire damage, fear, and encumbers the player works fine, the detect life on animal lesser power works fine.
These next two spells use the getgamehour condition in one way or another
-The spell with effects that are meant to increase the players Sneak skill doesn't appear.(The bonus is only supposed to occur after game hour 10 and before game hour 2)
-The spell with an effect that adds a perk to increase damage by 25% doesnt appear. ( again, perk bonus is only meant to be applied to the player between 5-8 am)

I wait until the expected time for each of these spells and neither effect appears in my active effect and no stat bonuses are applied.

I reactive the shrine between 5-8. I get the damage bonus blessing. ( Which for testing I set to have a duration of 3 days, even though its marked as an ability and thus should be constant)


I did reactive the shrine during the correct hours to try and get the sneak bonus blessing but it failed to add it to my active effects.

I don't know what any of this means, the only thing I can think of is that marking a spell as an Ability simply doesn't work if you have conditions on it.
User avatar
jessica robson
 
Posts: 3436
Joined: Mon Oct 09, 2006 11:54 am

Post » Sun Nov 18, 2012 1:52 am

I don't know what any of this means, the only thing I can think of is that marking a spell as an Ability simply doesn't work if you have conditions on it.

I have not done much with magic effects so should not really talk about them at all. But, ploughing on regardless: I should have expected the conditions to be evaluated at the time the effect was supposed to be applied, and not afterwards - and it seems like that could be what is happening? In which case I think you need to use a script and call RegisterForSingleUpdateGameTime to apply and remove the perk at the appropriate time.
User avatar
Ashley Hill
 
Posts: 3516
Joined: Tue Jul 04, 2006 5:27 am


Return to V - Skyrim