Quick Questions, Quick Answers - Thread #24

Post » Sun May 18, 2014 6:31 am

So you are telling me that instead of simply failing to compile, the CK freezes? That is not good. The first thing I would suggest is to download and install notepad++. Help on doing that can be found http://www.creationkit.com/Notepad%2B%2B_Setup.That way you can compile outside of the CK. Regardless of any errors in your code, the CK shouldn't be freezing.

User avatar
ANaIs GRelot
 
Posts: 3401
Joined: Tue Dec 12, 2006 6:19 pm

Post » Sun May 18, 2014 11:51 am

Yes I'm trying to do it on a Water Activator.

Yes I did, but hitting the water does nothing. It works on the WETemptActivator though. Here is the script. And property window.

Spoiler
Scriptname ZapScript extends ObjectReference  import UtilityActor Property PlayerREF AutoFloat Property RandomRate Auto ; Add random delay to pulse rate, capped at this valueActivator Property TargetType Auto ; What type of object are we zapping if we're spawning a node?ObjectReference Property CurrentTarget Auto ; The actual target we're shooting atBool Property SpawnNode Auto ; Do we spawn a target? If not, zap the nearest valid target. Initializes 'False'Spell Property Zap Auto ; What spell shall we use for the effect?FormList Property TargetTypeList Auto ; List of potential targetsSPELL Property Bolt  Auto   Event OnHit(ObjectReference akAggressor, Form  akSource,Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, \  bool abBashAttack, bool abHitBlocked)if akSource == Zap	CurrentTarget = PlayerREF  	        if CurrentTarget ; it's possible that there is no target           Bolt.RemoteCast(self, Game.GetPlayer(), CurrentTarget )	        endifendifEndEvent 

Image link to my Properties Window

http://www.techpowerup.org/uploaded.php?file=130817/PropertiesWindow.jpg

Those should be the only ones I'm using atm.

User avatar
chirsty aggas
 
Posts: 3396
Joined: Wed Oct 04, 2006 9:23 am

Post » Sun May 18, 2014 11:47 am

I tried the notepad++ compiler, but my steam is in a different directory so the batch file does not work for me. I have steam in my C:\Game\ directory.

I tried modifying the batch file to

Spoiler

cd..cd..cd Gamecd Steamcd SteamAppscd Commoncd Skyrimcd Papyrus CompilerPapyrusCompiler.exe compilefolder -a -d -noasmpause 

but the compiler always tells me it cannot find the scripts (it finds the files in the folder I added, but does not see the scripts). It says:

Compiling "OMZmainScript"...<0,0>: unable to locate script OMZmainScript.Known types after parsing:No output generated for OMZmainScript. Compilation failed. 

I save the file as a .psc file

This is the content of the file I'm trying to compile. I've tried with and without the {} after the scriptname section...

Spoiler
ScriptName OMZmainScript Extends ActiveMagicEffect{Import UtilityImport MathInt OMZkeyInt OMZstageInt UpdateCountActor property playerREF AutoActor targetREF ;Form formREF ;Spell spellREF ;Spell OMZspell;MagicEffect OMZeffectEvent OnInit()playerREF = Game.GetPlayer()endEventEvent OnEffectStart(actor akTarget, actor akCaster)If playerREF == akCaster	OMZkey = 0	OMZstage = 6;	RegisterForSingleUpdate(2.2)	UpdateCount = 0	targetREF = akTarget;	If targetREF.isDead() != True;		If targetREF.GetSleepState() != 3;			Debug.notification("MainKeys...");			OMZkey = 50;			formREF = akTarget.GetRace() as form;			OMZkey += 10 * playerREF.GetRelationshipRank(akTarget);			Debug.notification("OMZkey: " + OMZkey);			OMZstage = 7;		Else;			Debug.notification("DreamKeys…");			DreamKeys(targetREF);			GoToState("Dream");		endIf;	Else;		If playerRef.GetCombatState() == 0;			Debug.notification("RitualKeys…");			RitualKeys(targetREF);			GoToState("Ritual");		Else;			Debug.notification("Combat cancels ritual.");		endIf;	endIfendIfendEvent} 

anyway, i know this is moving out of the quick question category so if there isn't a quick answer I'll move on to another thread.

User avatar
xemmybx
 
Posts: 3372
Joined: Thu Jun 22, 2006 2:01 pm

Post » Sun May 18, 2014 1:24 am

Please try the suggestion in your other thread.

The filename must be equal to the scriptname.

The {} is for the script description, so you have to remove them. Otherwise your script is just a large description.

User avatar
Jon O
 
Posts: 3270
Joined: Wed Nov 28, 2007 9:48 pm

Post » Sun May 18, 2014 12:28 am

Thank you outpost, I had not looked at your post yet. It isn't working for me though since I do not have steam in the programfiles(x86) directory and I am not sure how to modify your file to work for my setup. I had to add two cd.. lines to get out of notepad++ and programfiles(x86) and I'm playing around with the rest of the command line now.

User avatar
David Chambers
 
Posts: 3333
Joined: Fri May 18, 2007 4:30 am

Post » Sun May 18, 2014 12:51 pm

It could just be that water doesn't register OnHit events or that the activator object is missing a keyword that would allow for it. For instance, if you want to translate water (raise or lower it in game), the water object must contain the keyword Movable. That said, I looked through the possible keywords and nothing stuck out to me that seemed applicable. I know Skyrim is somewhat different than the older Bethesda games, but there are many similarities too. I know that in the older games, there would be no way that OnHit would work for water.

Bottom line: I just don't know. The best advice I can give is for you to toss a debug message in at the top of the OnHit event to see if it's firing at all. The water activator does have destruction data, so I suppose on some level, it must be hitable. What happens if you make a new water form and enable destruction on it?

User avatar
Jenna Fields
 
Posts: 3396
Joined: Mon Dec 11, 2006 11:36 am

Post » Sun May 18, 2014 6:40 am

I'm having trouble with my mine:
When player is mining, its everything fine but if an npc starts to, he is standing in the air.

Is there a way I can upload a picture here?

User avatar
Catharine Krupinski
 
Posts: 3377
Joined: Sun Aug 12, 2007 3:39 pm

Post » Sun May 18, 2014 3:12 am

Yes but by default you can make water boil by firing a spell on water. Wouldn't that be OnHit? I had set a Debug.MessageBox and nothing comes up. New water form? Like duplicate a water and make it destructible?

Also is it wise to close the Creation Kit before loading skyrim or can they both be open no harm done?

Also just tried making my water deeper by elevating it and it doesn't seem like its even creating water below it, no swimming animation either. This normal behavior? A tutorial I saw said it would deepen the water based on the height of the water layer, this is not happening for me.

User avatar
JaNnatul Naimah
 
Posts: 3455
Joined: Fri Jun 23, 2006 8:33 am

Post » Sun May 18, 2014 12:41 pm

If the game is running and you edit your esp and want to save it you get access denied error message because it is in use.

User avatar
suzan
 
Posts: 3329
Joined: Mon Jul 17, 2006 5:32 pm

Post » Sun May 18, 2014 1:45 am

in render window, press 'm' to show markers.

you'll see the markers on the mine ore items, that's where the npc will stand.

User avatar
Dragonz Dancer
 
Posts: 3441
Joined: Sat Jun 24, 2006 11:01 am

Post » Sun May 18, 2014 8:21 am

Yes, but these markers are at the ground level, so are the mine workers. What a strange issue...

User avatar
Mrs Pooh
 
Posts: 3340
Joined: Wed Oct 24, 2007 7:30 pm

Post » Sun May 18, 2014 12:54 pm

FXDA16BarrierDoor

Doesn't seem to show up in game, any thoughts on why?

Edit: If i want to retexture a face , how would I get it in the game?

User avatar
Lucy
 
Posts: 3362
Joined: Sun Sep 10, 2006 4:55 am

Post » Sat May 17, 2014 9:12 pm

1) Will importing scripts like math, utility, etc. increase the speed of a script, or is it simply for notational convenience?

2) And a related efficiency question: is accessing a property in another script as efficient as accessing an equivalent property in the current script?

For instance - in this example, are both attempts to access PlayerRef equally effective?

Spoiler
Scriptname MyAliasScript extends ReferenceAlias   Actor property PlayerRef auto   MyQuestScript property MyQuest auto   int pLevel   pLevel = PlayerRef.GetLevel()   pLevel = MyQuest.PlayerRef.GetLevel()   Scriptname MyQuestScript extends Quest   Actor property PlayerRef auto
User avatar
Katharine Newton
 
Posts: 3318
Joined: Tue Jun 13, 2006 12:33 pm

Post » Sun May 18, 2014 12:40 pm

So uh.... how do I fix it? I want to continue modding!

User avatar
JESSE
 
Posts: 3404
Joined: Mon Jul 16, 2007 4:55 am

Post » Sun May 18, 2014 6:39 am


1) It is purely a notational convenience. It makes absolutely no difference in the final compiled script.

2) Accessing a property in another script is bound to be less efficient. One of the most efficient ways to achieve what you are doing would be this:
pLevel = (Game.GetForm(0x14) as Actor).GetLevel()
especially when used on a single occasion. It is fast(*, and it requires no overhead for the property structure in terms of memory used. Still, accessing the player reference value from a variable without any function calls whatsoever is even faster, so if you use it multiple times, it is most efficient to first have it in a variable, either through a property definition or by storing the value given by Game.GetForm(0x14). Note, that GetForm() returns a 'Form' value. Depending on what you use it for, you may be able to use it directly, or you may need to include "as ObjectReference" or "as Actor" based on what the native parameter type is for the function you will be calling on it. If there is a type mismatch, sometimes the compiler may approve but just insert an additional type recast of its own, which would be needless if you can get it right yourself.

*) GetForm() is one of the few undelayed functions, that is processed immediately. In comparison, GetPlayer(), like most functions, is delayed, and it causes the script to pause until the next frame, when it will provide its return value. In this case, GetLevel() will cause just this kind of delay, so it makes practically no real difference to overall speed, whether you feed it from a property, or some other variable, or GetForm() (or even a property from another script, I would think but am not sure, as long as that property is of the auto type). The small speed differences these approaches have in getting the player reference value may make a difference, if the script engine is overburdened and struggling to process everything required during its allocated time window per frame, but not otherwise.
User avatar
maddison
 
Posts: 3498
Joined: Sat Mar 10, 2007 9:22 pm

Post » Sun May 18, 2014 1:13 pm

Did you add a work package to your npc so that he can mine? Take a look at existing miners and see what they have in their AI packages tab.

To do that you must:

1) unload your esp in your game by using the console command "fcf"

2) work on your mod in the ck and save it

3) reload your mod in your game by using the console command "hlp name of your mod without the extension .esp"

Your game might crash anyway.

User avatar
Hope Greenhaw
 
Posts: 3368
Joined: Fri Aug 17, 2007 8:44 pm

Post » Sun May 18, 2014 12:42 pm

If I use game.getplayer().addspell(spell ID here) for a custom made spell I don't get any spells

Is there a better way to do this?

User avatar
Emmi Coolahan
 
Posts: 3335
Joined: Wed Jan 24, 2007 9:14 pm

Post » Sun May 18, 2014 1:46 pm

That should work. Make sure your spell property is filled. Also make sure you assigned a magic skill (restoration, destruction, etc) if it's a spell type so it's categorized properly in the magic menu. If it's a lesser/greater power then I don't think it needs one.

User avatar
Jaylene Brower
 
Posts: 3347
Joined: Tue Aug 15, 2006 12:24 pm

Post » Sat May 17, 2014 11:13 pm

thanks mojo, I accidentally typed that wrong though. I meant the console command:

player.addspell spellID 

I want to test my spells in game and I need a way to get them. Currently, if i get my ID from the CK of a spell I make and try the addspell console command I do not get any spells added.

User avatar
Lexy Dick
 
Posts: 3459
Joined: Mon Feb 12, 2007 12:15 pm

Post » Sun May 18, 2014 12:21 am


Uh have you added any mod bsa files to your editor ini or editorprefs ini? Id start by removing them. Like Falskaar.bsa for example.

If you need a mod bsa included in those ini files, extract the source scripts into the source scripts folder.
User avatar
Shae Munro
 
Posts: 3443
Joined: Fri Feb 23, 2007 11:32 am

Post » Sat May 17, 2014 11:38 pm

Tried adding destruction data, makes no difference. Water just does not respond to attacks... UGH there has to be a way to get water to respond to attacks.

User avatar
alicia hillier
 
Posts: 3387
Joined: Tue Feb 06, 2007 2:57 am

Post » Sun May 18, 2014 3:37 am

I was afraid of that. The only other thing I can think of would be to modify the water mesh, adding what is missing to make it respond to attacks, like the ground responding to footfalls or walls responding to pick axes or weapons. Unfortunately, my knowledge of NIFs and Nifskope is far too marginal to be of any help. Perhaps if you made a new thread (can you do that yet?), other modelers would have more to offer you.

Other than that, I would ask what it is that you are ultimately trying to accomplish to see if there are any other roundabout ways of accomplishing it. :shrug:

EDIT: Oh, I see you have already made a thread on the subject.

User avatar
Karen anwyn Green
 
Posts: 3448
Joined: Thu Jun 15, 2006 4:26 pm

Post » Sun May 18, 2014 3:47 am

Only Dawnguard.bsa and Dragonborn.bsa

User avatar
Doniesha World
 
Posts: 3437
Joined: Sun Jan 07, 2007 5:12 pm

Post » Sat May 17, 2014 11:30 pm

if you are getting the ID directly from the CK, it won't be correct in game. The first two digits change depending on load order. Try typing "help " into the console while you're in-game to find the right spellID. The player.addspell command you posted should work, if you have the right ID.

Also,

Extremely helpful response, Inki, just what I was looking for. Thanks!

User avatar
jaideep singh
 
Posts: 3357
Joined: Sun Jul 08, 2007 8:45 pm

Post » Sun May 18, 2014 8:22 am

That landscape editor is killing me... is there a way i can set that the soften brush only takes effect inside the radis i have set? It really annoys me as i sometimes have to modify an area a lot of times until it looks good...

User avatar
Mimi BC
 
Posts: 3282
Joined: Sat Oct 07, 2006 10:30 pm

PreviousNext

Return to V - Skyrim