Quick CK questions Thread #2

Post » Tue Jun 19, 2012 8:58 pm

i'v tried several varius combinations. at the moment i'm working with the code "457FC" which is GenericWoodElf. just for testing purposes, so i dont go spawning dragons everywhere XD

i'm almost sure this is a case of simply not using the correct command, but i'm not sure what the command to use would be, and cant navigate the wiki well enough to find said command.

PlaceAtme expects you to pass it a type of object to place, and a quantity. You can pass this information to your script in a property.

For example:
Scriptname custDragonSummon extends ObjectReference  {a dragon summon test}ObjectReference property DragonTypeToPlace Auto ; Set this from the properties button on the thing the script is attached to.Actor BM_TriggeringActorEvent OnTriggerEnter(objectReference triggerRef)  	if BM_TriggeringActor == game.GetPlayer()		BM_TriggeringActor = triggerRef as Actor	BM_TriggeringActor.placeatme(DragonTypeToPlace,1)				endif	endEvent
User avatar
Sabrina garzotto
 
Posts: 3384
Joined: Fri Dec 29, 2006 4:58 pm

Post » Tue Jun 19, 2012 6:00 am

Efrim Black: Unless there are dialogue lines in a Sounds\Voices\YourMod.esp folder, supplemental plugins dependent upon YourPlugin.esp, or you're using a YourPlugin.ini to alter settings, you should be able to rename the plugin without issues save for users having to re-obtain the spells or any other YourPlugin.esp specific forms as they'll be lost if the plugin name changes. You could have a transition plugin with both as masters, having the users load the update plugin and save, then disposing of the old and update plugins after it has added anything's updated equivalent.
User avatar
Ricky Meehan
 
Posts: 3364
Joined: Wed Jun 27, 2007 5:42 pm

Post » Tue Jun 19, 2012 11:44 am

Efrim Black: Unless there are dialogue lines in a Sounds\Voices\YourMod.esp folder, supplemental plugins dependent upon YourPlugin.esp, or you're using a YourPlugin.ini to alter settings, you should be able to rename the plugin without issues save for users having to re-obtain the spells or any other YourPlugin.esp specific forms as they'll be lost if the plugin name changes. You could have a transition plugin with both as masters, having the users load the update plugin and save, then disposing of the old and update plugins after it has added anything's updated equivalent.

Wait what? My question is about whether Encounter Zones or Actor properties dictate the levels of NPCs. o_O
User avatar
KU Fint
 
Posts: 3402
Joined: Mon Dec 04, 2006 4:00 pm

Post » Tue Jun 19, 2012 6:24 am

Q: What is the .egt texture entry for races under Body Data and how do I find it to change it?
User avatar
carly mcdonough
 
Posts: 3402
Joined: Fri Jul 28, 2006 3:23 am

Post » Tue Jun 19, 2012 5:54 am

Revised Question : In the leveled lists, if I check the 'Calculate from all levels <= PC's level' box, but none of the NPCs it is pulling are = to or below the player level, will they not spawn? or will it simply pull randomly? IT is extremely important someone tell me this, because I am knee deep in a leveling mod and I can't figure out if this is the case based on the CK website.
User avatar
Sheila Reyes
 
Posts: 3386
Joined: Thu Dec 28, 2006 7:40 am

Post » Tue Jun 19, 2012 9:25 am

Probably should have asked this before creating 6+ plants, but oh well.

While I'm aware you'll run into potential legal issues if you rip something directly from one Bethesda game and put it in Skyrim, what if it was just an 'inspired by' object.

For example, would there be any problems if you recreate a Gold Kanet, a plant from Morrowind, using just googled images, and put that recreation in Skyrim? Neither would it be an exact copy from the images either.
User avatar
Sara Lee
 
Posts: 3448
Joined: Mon Sep 25, 2006 1:40 pm

Post » Tue Jun 19, 2012 5:54 am

Probably should have asked this before creating 6+ plants, but oh well.

While I'm aware you'll run into potential legal issues if you rip something directly from one Bethesda game and put it in Skyrim, what if it was just an 'inspired by' object.

For example, would there be any problems if you recreate a Gold Kanet, a plant from Morrowind, using just googled images, and put that recreation in Skyrim? Neither would it be an exact copy from the images either.

I still can't find a viable link explaining in simple "haven't used Blender or Python before" terms how to import/export NIF files...they all tell me to "Just go out and install a half dozen things you don't understand" that may or may not cripple Blender for any other purpose...
User avatar
Ross
 
Posts: 3384
Joined: Thu Aug 10, 2006 7:22 pm

Post » Tue Jun 19, 2012 6:26 am

I can't help you with either Blender or Python, unfortunately.

I use the Fallout Mod Manager to extract both .nif and .dds, sometimes just to find what file path to drop the new creations into. FMM is the easiest of the programs to use, since all you have to do is install it, then the next time you visit Skyrim's Data folder you'll see a bunch of new folders that you can just click on and extract what you want.

NifSkope for changing values in a .nif and etc.

Gimp + plug-ins to create textures, normal maps, etc.

3ds Max for more complicated shapes, though not so much 3ds Max, since most of the time I can find an existing model to then, uh, creatively alter the texture maps of. New flora, for example, is one of the easiest things to do, not even requiring 3ds Max.

And after typing all that, I can see how having to use all those programs can be intimidating for somebody completely new to this sort of thing. If you want more step-by-step guidance, feel free to shoot me a PM.

Now if only somebody will anser my question. >.>
User avatar
Kill Bill
 
Posts: 3355
Joined: Wed Aug 30, 2006 2:22 am

Post » Tue Jun 19, 2012 7:12 am

Probably should have asked this before creating 6+ plants, but oh well.

While I'm aware you'll run into potential legal issues if you rip something directly from one Bethesda game and put it in Skyrim, what if it was just an 'inspired by' object.

For example, would there be any problems if you recreate a Gold Kanet, a plant from Morrowind, using just googled images, and put that recreation in Skyrim? Neither would it be an exact copy from the images either.

Yep, if its the original model/textures, copies of etc, you'll have problems as its not allowed at all. You can see models from the Witcher games, but that is because the Developers gave permission for them to be used in other games.

But if you recreate a model/texture from a past game, totally from scratch, i dont think thats a problem at all. You can probably find countless armour/weapon remakes etc from past games.
Though im no expert in this, but im pretty sure your safe.

I cant find any examples for skyrim, though i believe i have seen them, but in Oblivion i used a mod that added in Morrowind creatures, Guars etc, just custom ones
User avatar
Laura Cartwright
 
Posts: 3483
Joined: Mon Sep 25, 2006 6:12 pm

Post » Tue Jun 19, 2012 8:08 am

nevermind
User avatar
Alyce Argabright
 
Posts: 3403
Joined: Mon Aug 20, 2007 8:11 pm

Post » Tue Jun 19, 2012 3:11 pm

Script question.

If I want something to happen to an actor while he is dead and the result of his death was from a spell from which this script is attached,

Do I use http://www.creationkit.com/OnDeath_-_Actor?

Just making sure.
User avatar
Aman Bhattal
 
Posts: 3424
Joined: Sun Dec 17, 2006 12:01 am

Post » Tue Jun 19, 2012 10:23 am

Script question.

If I want something to happen to an actor while he is dead and the result of his death was from a spell from which this script is attached,

Do I use http://www.creationkit.com/OnDeath_-_Actor?

Just making sure.

You can only catch the OnDeath event from a script attached to the actor. So you would probably need to create an ActivemagicEffect that you would apply to the targets of your spell (you could do this in the OnEffectStart event, since it passes you the target of the effect) and have your OnDeath event in the script for that effect. Unfortunately, magic effects are removed when an actor dies, so you will have to do some fiddling, perhaps saving references to the targets of your spell temporarily in a global reference in a quest script, and check for the OnDeath event there.
User avatar
Poetic Vice
 
Posts: 3440
Joined: Wed Oct 31, 2007 8:19 pm

Post » Tue Jun 19, 2012 4:45 pm

Thanks alot.
User avatar
The Time Car
 
Posts: 3435
Joined: Sat Oct 27, 2007 7:13 pm

Post » Tue Jun 19, 2012 7:14 pm

is there a way to delete something in the mod you created? when i click on delete after the rightclick it's maked *D but it's still there...?
is there a way then to make the mod cleaner?
What happen if i delete in the More info box something? It's say it ignores something, but i don't understand its meaning...
User avatar
Kelvin
 
Posts: 3405
Joined: Sat Nov 17, 2007 10:22 am

Post » Tue Jun 19, 2012 9:35 am

is there a way to delete something in the mod you created? when i click on delete after the rightclick it's maked *D but it's still there...?
Only upon saving your mod and restarting CK all those records flagged with *D will be removed.
User avatar
Tasha Clifford
 
Posts: 3295
Joined: Fri Jul 21, 2006 7:08 am

Post » Tue Jun 19, 2012 1:57 pm

I have a quick question about the CK's scripting system.

Are these commands still possible, impossible, or is written differly now?
If ( ..... =X Y ) {X being =, <, or > and Y being any numbers and .... being a command }-- Example: If ( Gethealth =< 5 ) And with "Endif" part?

GetHealth Command? I used this Command within my If Commands a lot back in Morrowind and might need to do so again.

Disable Command? I know it is possible to use in-game now but is it possible to use it in a script in the same way?

MessageBox or PlaySound? I most likely gonna use MessageBox, if I cannot make the proper Sound Files needed.

PlaceItem Command? Like PlaceItem, "CODE", 120, 120, 120, 0

Short DoOnce Command? Which can be use for If ( DoOnce == 0 ) and so on. Helps a lot to make things happen only once and can DoOnce be replaced by any other word, like in Morrowind?

The Return Command which will make the script goes back to the beginning?

Also; GetItemCount, AddItem, and RemoveItem possible in Scripts? I know AddItem and RemoveItem is possible in-game.

Lastly, Player-> works in scripts? I know it works in-game as well, which isn't surprising.

I'm asking cause these are all the scripts I normally used and I can create so much fun for Skyrim if I can use them again.
User avatar
JAY
 
Posts: 3433
Joined: Fri Sep 14, 2007 6:17 am

Post » Tue Jun 19, 2012 4:57 pm

I'm not sure that "=<" and "=>" will work, but I know that "<=" and ">=" do.

You will have to use GetActorValue("Health").

You can use MessageBox. For sounds, you have to first define them as a property before you can play them:

Sound property MySound auto;;;MySound.Play()

Yes, it's possible to have a variable like that, and you don't need to name it DoOnce. Not sure if you can use Short, but you can use Int.

Yes, there's a Return command.

GetItemCount(), AddItem() and RemoveItem() are all available as scripting functions.

In scripts, you need to use "Game.GetPlayer()".
User avatar
rae.x
 
Posts: 3326
Joined: Wed Jun 14, 2006 2:13 pm

Post » Tue Jun 19, 2012 8:41 pm

I'm not sure that "=<" and "=>" will work, but I know that "<=" and ">=" do.

You will have to use GetActorValue("Health").

You can use MessageBox. For sounds, you have to first define them as a property before you can play them:

Sound property MySound auto;;;MySound.Play()

Yes, it's possible to have a variable like that, and you don't need to name it DoOnce. Not sure if you can use Short, but you can use Int.

Yes, there's a Return command.

GetItemCount(), AddItem() and RemoveItem() are all available as scripting functions.

In scripts, you need to use "Game.GetPlayer()".

Ah. Can you give me a few short examples how they would work together? All I need is a small idea and I can do something big.

~Edit~

OMG. I did it again. I keep accidentally typing in "=<" and "=>" instead of what you've said. The game reads "=<" and "=>" as "==" I keep forgetting that >.<

I'm thinking of
Spoiler
If (DoOnce==0)
If (Game.GetPlayer(GetItemCount(ID==#)))
PlaceItem.ID.X.Y.Z.R
Set.DoOnce.1
Endif
Endif
If (DoOnce==1)
Return
Endif
Am I correct with that?
User avatar
Jerry Cox
 
Posts: 3409
Joined: Wed Oct 10, 2007 1:21 pm

Post » Tue Jun 19, 2012 8:25 am

I don't have Morrowind so I have no idea if this will look familiar or not:

Scriptname MyMagicEffectScript extends ActiveMagicEffectSound property MySound autoPotion property StrongHealPotion autoPotion property MediumHealPotion autoPotion property WeakHealPotion autoMiscObject property Gold autoInt wealthEvent OnEffectStart(Actor akTarget, Actor akCaster)    if (akTarget != Game.GetPlayer())        Return    endif        if (akTarget.GetActorValue("Health") <= 25)        MySound.Play()        Debug.MessageBox("You conjure a strong healing potion out of thin air.")        akTarget.AddItem(StrongHealingPotion, 1)    elseif (akTarget.GetActorValue("Health") >= 100)        MySound.Play()        Debug.MessageBox("You conjure a weak healing potion out of thin air.")        akTarget.AddItem(WeakHealingPotion, 1)    else        MySound.Play()        Debug.MessageBox("You conjure a medium healing potion out of thin air.")        akTarget.AddItem(MediumHealingPotion, 1)    endif        wealth = akTarget.GetItemCount(Gold)        if (wealth >= 500)        akTarget.RemoveItem(Gold, 500)    else        akTarget.RemoveItem(Gold, wealth)    endifEndEvent

This should have examples of almost everything you asked about.
User avatar
Noely Ulloa
 
Posts: 3596
Joined: Tue Jul 04, 2006 1:33 am

Post » Tue Jun 19, 2012 8:06 am

I'm a little confused. The akTarget is basicly "Player->"? Like how it is set?

I also forgot to ask. What about "OnActivate"?
User avatar
Miss Hayley
 
Posts: 3414
Joined: Tue Jun 27, 2006 2:31 am

Post » Tue Jun 19, 2012 2:49 pm

Well you see that part where I put
if (akTarget != Game.GetPlayer())    Returnendif
?

That means that it'll stop running if the target of the spell wasn't the player. And in the rest of the script I just used "akTarget" because that's shorter than typing out "Game.GetPlayer()".

The akTarget is set by the event. If you don't know how an event works, I'm not sure I can explain it well.

Basically, almost anything that happens in the game sets off an event, and every event has parameters that come with it. In this case, the script is listening for an "OnEffectStart" event. So when the effect that this script is attached to receives this event, it also receives the parameters for who was the target, and who was the caster.

In the beginning line of the event, I had

Event OnEffectStart(Actor akTarget, Actor akCaster)

which tells the game that the script is listening for this event, and that we are assigning the name akTarget to the first parameter, and akCaster to the second parameter. (The first parameter is always the target, and the second parameter is always the caster). I could have used

Event OnEffectStart(Actor IGotHit, Actor IHitYou)

just as well. Do note, however, that "akTarget" is only a valid variable inside this event. So if we were planning to use the information elsewhere in the script, we should have declared a variable at the beginning of the script and then assigned it the value of akTarget.

And OnActivate is also an event. It comes with a parameter pointing to the activating reference. Check the http://www.creationkit.com/OnActivate_-_ObjectReference on it.
User avatar
Sarah Edmunds
 
Posts: 3461
Joined: Sat Jul 08, 2006 8:03 pm

Post » Tue Jun 19, 2012 1:03 pm

Well you see that part where I put
if (akTarget != Game.GetPlayer())	Returnendif
?

That means that it'll stop running if the target of the spell wasn't the player. And in the rest of the script I just used "akTarget" because that's shorter than typing out "Game.GetPlayer()".

The akTarget is set by the event. If you don't know how an event works, I'm not sure I can explain it well.

Basically, almost anything that happens in the game sets off an event, and every event has parameters that come with it. In this case, the script is listening for an "OnEffectStart" event. So when the effect that this script is attached to receives this event, it also receives the parameters for who was the target, and who was the caster.

In the beginning line of the event, I had

Event OnEffectStart(Actor akTarget, Actor akCaster)

which tells the game that the script is listening for this event, and that we are assigning the name akTarget to the first parameter, and akCaster to the second parameter. (The first parameter is always the target, and the second parameter is always the caster). I could have used

Event OnEffectStart(Actor IGotHit, Actor IHitYou)

just as well. Do note, however, that "akTarget" is only a valid variable inside this event. So if we were planning to use the information elsewhere in the script, we should have declared a variable at the beginning of the script and then assigned it the value of akTarget.

And OnActivate is also an event. It comes with a parameter pointing to the activating reference. Check the http://www.creationkit.com/OnActivate_-_ObjectReference on it.

My dial-up refuses to load CK wiki Page, ha ha. This Event stuff wasn't in Morrowind and I'm taking a guess that you aren't able to go to an Item on the list and then open it up and able to set a script on it? This can make things a little harder on me if you can't do it that cause I'm gonna need to make a script that is made for more than one NPC, which in Morrowind. If you type something out without an NPC ID (Like GetHealth) then the script will use the NPC that currently have that Script as their own. And each Script can be set for any amount of NPCs, basicly...

Hmm.. Can I just PM you a Morrowind then you can translate it into Skyrim scripting system? This may help you understand what I am going for which will increase the help you can give me. Thx for the help so far though, I am learning a few new things and getting ideas.
User avatar
Holli Dillon
 
Posts: 3397
Joined: Wed Jun 21, 2006 4:54 am

Post » Tue Jun 19, 2012 11:11 am

Well, like I said, I don't even have Morrowind so if you send me a script, it would be me asking you questions. :biggrin:

And you can put a script on practically anything. It's just that this is a magic effect script, so it will only work for magic effects. If you put a script on the player, for example, then yes all functions default to targeting the player unless you specify otherwise.
User avatar
Heather Kush
 
Posts: 3456
Joined: Tue Jun 05, 2007 10:05 pm

Post » Tue Jun 19, 2012 9:45 am

Well, like I said, I don't even have Morrowind so if you send me a script, it would be me asking you questions. :biggrin:

And you can put a script on practically anything. It's just that this is a magic effect script, so it will only work for magic effects. If you put a script on the player, for example, then yes all functions default to targeting the player unless you specify otherwise.

Well.. I'll just put it in a spoiler and you can tell me what you can make of it, okay? The Scripting Systems between the two aren't too different. The major thing is the whole Event thing you've said and I need to know how to set the correct Events. This script I'ma show you is one that should be used on an item that you activate, like a Standing Stone. Also, _ is used in place of a "Tab"

Spoiler
Begin Test <-- Used to begin and name the Script
If ( OnActivate == 0 ) <-- if it currently not being activated
_Return
Endif
If ( OnActivate == 1 ) <--- The item is only Activated for one quick second then goes back to "0" thus effect happens only once.
_If ( Player-> GetItemCount "DraugrSword" >= 1 )
__PlaceItem, "Draugr", #, #, #, 0
__PlaceItem, "Draugr", #, #, #, 0
__PlaceItem, "Draugr", #, #, #, 0
__PlaceItem, "Draugr", #, #, #, 0
__PlaceItem, "Draugr", #, #, #, 0
__PlaceItem, "Draugr", #, #, #, 0 <--If player has the item in their inventory then it will spawn 6 Draugrs in the current Cell
__Return <--- Make sures only one effect happens and not all effects on the list.
_EndIf
_If ( Player-> GetItemCount "WoodenMask" >= 1 )
__If ( Player-> GetItemCount "9thMask" >= 1 )
___PlaceItem, "DragonPriest1", #, #, #, 0
___PlaceItem, "DragonPriest2", #, #, #, 0
___PlaceItem, "DragonPriest3", #, #, #, 0
___PlaceItem, "DragonPriest4", #, #, #, 0
___PlaceItem, "DragonPriest5", #, #, #, 0
___PlaceItem, "DragonPriest6", #, #, #, 0
___PlaceItem, "DragonPriest7", #, #, #, 0
___PlaceItem, "DragonPriest8", #, #, #, 0 <--If Player has the 2 items in their inventory then it will spawn all 8 masked priests
__Return
__Endif
_Endif
Endif
End Test
User avatar
Kristina Campbell
 
Posts: 3512
Joined: Sun Oct 15, 2006 7:08 am

Post » Tue Jun 19, 2012 12:02 pm

I would write it like this using Skyrim's scripting language:

Spoiler
ScriptName Test extends ObjectReferenceActorBase property Draugr autoActorBase property DragonPriest01 autoActorBase property DragonPriest02 autoActorBase property DragonPriest03 autoActorBase property DragonPriest04 autoActorBase property DragonPriest05 autoActorBase property DragonPriest06 autoActorBase property DragonPriest07 autoActorBase property DragonPriest08 autoWeapon property DraugrSword autoArmor property WoodenMask autoArmor property NinthMask autoEvent OnActivate(ObjectReference akActivatingRef)	if (akActivatingRef != Game.GetPlayer())		Return	;ignore the activation if it's not from the player	endif		if (Game.GetPlayer().GetItemCount(DraugrSword) >= 1)		PlaceAtMe(Draugr, 6)	elseif (Game.GetPlayer().GetItemCount(WoodenMask) >= 1) && (Game.GetPlayer().GetItemCount(NinthMask) >= 1)		PlaceAtMe(DragonPriest01, 1)		PlaceAtMe(DragonPriest02, 1)		PlaceAtMe(DragonPriest03, 1)		PlaceAtMe(DragonPriest04, 1)		PlaceAtMe(DragonPriest05, 1)		PlaceAtMe(DragonPriest06, 1)		PlaceAtMe(DragonPriest07, 1)		PlaceAtMe(DragonPriest08, 1)	endifEndEvent
User avatar
phil walsh
 
Posts: 3317
Joined: Wed May 16, 2007 8:46 pm

PreviousNext

Return to V - Skyrim