Quick Questions, Quick Answers - Thread #63

Post » Wed Jan 20, 2016 12:12 am

I think the universe is against my Mod :/



First the CK wiped all my Magic Effect Settings, and now 'GetName' does not seem to be working...



I have :



String MyName = Target.GetActorBase().GetName()



That should work, based on my understanding of the Wiki, but 'MyName' is coming up as a blank... I know the Actors have names; but the only thing it works on so far is MAmmoths, and I cannot see why...

User avatar
Maddy Paul
 
Posts: 3430
Joined: Wed Feb 14, 2007 4:20 pm

Post » Tue Jan 19, 2016 8:55 pm

Try narrowing things down by calling it, instead of attempting to store it?



Like make a simple string function and have it return.

User avatar
SiLa
 
Posts: 3447
Joined: Tue Jun 13, 2006 7:52 am

Post » Tue Jan 19, 2016 9:26 am

Yay, that worked :D I wonder why storing it isn't... ? Well, either way, my re-naming is fixed :D Only the bit about message-boxes to solve now :D



According to the Wiki, can be used to get an item's base name, and Text Replacement can be used in a MessageBox's title and message. But it says that an object needs to be linked to a Quest... That is where I am stuck: I want to make the name of a purchased item appear in a Message Box... Any ideas, anyone?

User avatar
Roberto Gaeta
 
Posts: 3451
Joined: Tue Nov 06, 2007 2:23 am

Post » Tue Jan 19, 2016 11:18 am

That wasnt a solution. It was a troubleshooting suggestion. Obviously storing is more efficient but there is a reason its not working for other actorbases. Perhaps the value is lost after the effect is applied? But it persists longer for mammoths?
User avatar
Sarah Knight
 
Posts: 3416
Joined: Mon Jun 19, 2006 5:02 am

Post » Tue Jan 19, 2016 6:26 pm

Ah, fair-enough :) Well, it does solve what I needed--I literally only need to store it for like, 1 second, so I can prefix it with something else. I might take a look at it later, have a mess about with my effect and see if I can find any patterns :)

User avatar
Rachel Eloise Getoutofmyface
 
Posts: 3445
Joined: Mon Oct 09, 2006 5:20 pm

Post » Tue Jan 19, 2016 7:35 pm

Hey if thats all you need it for then great lol. I originally was going to suggest getdisplayname as an alternative.



Also you asked this a while back:







A little math and some Utility.RandomFloat/Int you could probably script your own.



OR let the condition system do it without a script: http://www.creationkit.com/GetRandomPercent



I never used that though.

User avatar
Undisclosed Desires
 
Posts: 3388
Joined: Fri Mar 02, 2007 4:10 pm

Post » Tue Jan 19, 2016 5:37 pm

What are ReferenceAlias' used for generally? I can find examples that use them, but they don't explain why and although the CK wiki says ReferenceAlias extends Alias, it also says you'd almost never use Alias.

User avatar
Dustin Brown
 
Posts: 3307
Joined: Sun Sep 30, 2007 6:55 am

Post » Tue Jan 19, 2016 7:23 pm

Thanks again, Terra :)



I'm gonna have to do some experimenting later this week... According to UESP the Breton Racial DOES absorb Spells like in Oblivion (never played a Breton/used their power, so...) but the CK wiki says Absorb works on Attributes :S I'll know soon enough :)



Tip : When in doubt, try it out, haha :P

User avatar
maddison
 
Posts: 3498
Joined: Sat Mar 10, 2007 9:22 pm

Post » Tue Jan 19, 2016 11:41 am

I always use a Breton and I've never used their power.



The info on the wiki could possibly referring to the archetype being hardcoded to get the spell magnitude(damage) of the incoming spell and convert 50% of that into the player's magicka.



I once attempted a gravity based spell and while I was successful(drained 40% of health) it stopped working for some reason on later tests, even at full health.




That is good question on the part about the Alias script. Reference Aliases on the other hand are generally used for the Quest system and is one of the safest ways to manipulate any object(especially actors) without directly manipulating the form itself.

User avatar
Reven Lord
 
Posts: 3452
Joined: Mon May 21, 2007 9:56 pm

Post » Tue Jan 19, 2016 9:02 pm

@Sponge,


To tie into what Terra said:



ReferenceAliases can hold references like Actors, and can be used to let you individually add Packages, Abilities, Keyword, Items, etcetera. Or they can be used to randomly find an NPC who matches a specific requirement, like "A Redguard with a Silver Sword". In my experience, if you're making a permanent change to an Actor the best way is to use an Alias unless you absolutely have to alter the base-reference.



A good example is adding new Perks or Spells to the Player at Start-Up: you can either write a script to add the spell/perk, or put the Player in an Alias that gives them the Spell (Perks have to be added via magic Effect, but it amounts to the same).



You can also use them to create semi-generic Objects for Quests, which is cool :D



I would *assume* you would almost always use 'extends ReferenceAlias' because you're running your Script on the actual Reference being put into an Alias, rather than the Alias itself? And looking at the Wiki, that looks like the case--the ReferenceAlias functions are more about manipulating the actual thing being held in an Alias, whereas the Alias functions seem to be more generic-form stuff.

User avatar
Shirley BEltran
 
Posts: 3450
Joined: Wed Jul 26, 2006 4:14 pm

Post » Tue Jan 19, 2016 12:38 pm

Hey Is anyone here good at boolean algebra and could evaluate some Condition Functions? The CK wiki gives exampless of certain complex functions i.e. (A and B ) or (C and D) will evaluate as the sequence (A OR C AND B OR C AND A OR D AND B OR D) but not the sequence I'm looking for unfortunately.



http://www.creationkit.com/Category:Conditions



I'm not having any luck with



A or (B and C) or (B and D)



I'm having total logic failure on this one I simply cannot figure out a logical sequence that will evaluate bearing in mind OR has priority over AND



Can anyone figure out a logical sequence for me? Or point me to a calculator that will? Maths was never my strong point. :shrug:

User avatar
KU Fint
 
Posts: 3402
Joined: Mon Dec 04, 2006 4:00 pm

Previous

Return to V - Skyrim