Jump to content

Compiling Script Problem


Guest

Recommended Posts

Posted

I'm very new to scripting but I think I have a general idea of how it works.  I wanted to make an effect to grow certain body nodes like breasts, belly, butt, when consuming an item.  I wanted to try my luck on one of my custom race mods and just add breast growth effect to it for now.  However, as stated, I'm new to this and really didn't know where to start.  Someone here on LL graciously provided me a script to help.  When I add the entire script (copy and paste) as new script, it crashes.  But, if I start adding the script in one line at a time it's ok until it reaches the first "EndIf" line.  Anything I add after that line, no matter what it is, results in the CK crashing.  As a test, I created the entire script into a .PSC file.  Then using the Compile Papyrus Scripts in the CK, I selected the PSC file I created but it says Failed when I try to compile it.  Below is part of the script and I'm wondering if anyone else is having the same issue with the CK crashing or not being able to compile.

 

 

Scriptname CoBMsVavavooommmStaPotGrow extends ActiveMagicEffect  
 
; NiNodes names (according to XPSE)
String _BIGMELONS = "Breast"
String _PUSHUPL = "CME L PreBreastRoot"
String _VOLUMEL = "NPC L PreBreast"
String _BACKVOLL = "CME L PreBreast"
String _ROUNDNESSL = "NPC L Breast"
String _PERKYNESSL = "CME L Breast"
String _PUFFYNESSL = "NPC L Breast01"
String _PUSHUPR = "CME R PreBreastRoot"
String _VOLUMER = "NPC R PreBreast"
String _BACKVOLR = "CME R PreBreast"
String _ROUNDNESSR = "NPC R Breast"
String _PERKYNESSR = "CME R Breast"
String _PUFFYNESSR = "NPC R Breast01"
 
float origWbm = 1.0
float origWpu = 1.0
float origWvo = 1.0
float origWbv = 1.0
float origWro = 1.0
float origWpe = 1.0
float origWpf = 1.0
 
Event OnEffectStart(Actor akTarget, Actor akCaster)
 if (akTarget.GetLeveledActorBase().GetSex()!=1) ; Only females
  return ; Nothing to do here
 EndIf
 
 ; Save the original values, may be used later
 origWbm = NetImmerse.GetNodeScale(akTarget, _BIGMELONS, false)
 origWpu = NetImmerse.GetNodeScale(akTarget, _PUSHUPL, false)
 origWvo = NetImmerse.GetNodeScale(akTarget, _VOLUMEL, false)
 origWbv = NetImmerse.GetNodeScale(akTarget, _BACKVOLL, false)
 origWro = NetImmerse.GetNodeScale(akTarget, _ROUNDNESSL, false)
 origWpe = NetImmerse.GetNodeScale(akTarget, _PERKYNESSL, false)
 origWpf = NetImmerse.GetNodeScale(akTarget, _PUFFYNESSL, false)
 
 ; do the actual resizing
 doResizeTits(akTarget, origWbm, origWpu, origWvo, origWbv, origWro, origWpe, origWpf, 1.05, 1.2, 1.1, 1.05, 1.1, 1.2, 1.3)
EndEvent

Posted

Hello,

 

about the crashing of CK. Try this:

* Create an empty psc file inside CK (inside the magic Effect, for example), save it (empty, just the first line should be there.

Then from outside CK run Notepad++ and open the .psc file.

Add all the code you want (in the example you posted there is a function called "doResizeTits()" that is not here in the code, you need it after the EndEvent line.

 

Then go back in CK, open the script in CK, and just do Ctrl+S to save/compile it.

 

If you have compiling errors, just post them here and I will try to help.

 

Posted

Ah-hah...That created the PEX file.  I did not receive any errors.  The only thing different I saw is after I created the new, almost blank script and saved it in the CK, after that when I opened it up in Notepad++, it added an additional line in squiggly brackets that had the same information as the very first and only line I enter in it from before.  Once again you're super, CPU.

Posted

You welcome Booceefus.

Let me know if the script does what you want.

Posted

I think I got it compiling properly now.  When making the new script, I had to not enter anything in the Document String field but only fill out the Name and Extends fields.  Then I proceeded like you mentioned.  No extra squiggly bracketed lines of code.  As far as compiling is concerned, I think this is how it has to be done for this script.

 

I'm testing it now in game and the effect shows up in the last tab of the gui under Magic (using SkyUI) but no visual effect happening to the breasts.  I'm using a potion as the consumable item so I'm toying around with the configuration of the Effect under the Results.  Do I need to set a specific Magnitude?

 

 

Posted

The script has no magnitude, but as a timing for the effect: you drink and the breasts are resized, then when the time for the effect expires the breasts g back to the normal size.

 

You can try to put some debug lines at the begin of Event OnEffectStart() and Event OnEffectFinish().

Something like:

Debug.trace("Booceefus: The effect starts on " + target.getLeveledActorBase().getName())

 

And then check your papyrus log to see if the line is executed.

 

Posted

I added the debug.trace line under both Events, but I don't see anything related to the script in my papyrus log (considering my papyrus log looks horrid with all the errors of other mods).  I'm going to guess and say that if there was an error, it would mention the name of my script somewhere in there?  Perhaps I didn't enter in the debug command correctly.  Does there need to be a space in front of it to make the alignment with the rest of the programming inside the events?  I'll try that now actually.

Posted

Hello, the "alignment" (it is called indentation) is not required, it is for the developer to better understand the blocks.

 

The debug line I advised was to check if your magic effect actually starts or not.

 

I explicitly added your name at the begin of the debug trace, so you can just search for your name inside the papyrus log.

 

Actually I don't think you have a script error that is blocking the script to be executed. My educated guess is that the effect is not started (can be a configuration problem 

of the potion in CK.)

 

Posted

I dig more digging around.  I was checking out your Notepad++ Papyrus config things too.

 

I finally configured Notepad++ to compile PSC files.  By default, the ScriptCompile.bat file is pointed to different paths for the dev's, so I reconfigured them.  Then I found out that the compiler doesn't line UNC path (which could of also been part of my problem before).  However, it failed with compiling still.  Several "variable NetImmerse is undefined" as well as some type mismatches on several lines.

 

More researching ensued.  I found a little tid-bit here on the forums with the same error that pointed to the NetImmerse script files.  I look in my \scripts and \scripts\source folder and I can't find any files named NetImmerse.  Even more researched happened and found another gem here on LL.  Supposedly, SKSE has the NetImmerse script files in it's compressed package on the SKSE page.  I've been using the execute file from SKSE which doesn't seem to install several other script files that the compressed package has.  I copied over all the additional script files from the compressed SKSE file to my Skyrim script folders.  I was able to compile the script with Notepad++.  Configure the item in CK without crashing.  Started up the game and tested.  It is working ... and yes, as you mentioned to me before I may have to adjust the numbers because they do make Ms. V's race breast pretty big (but why not? :D )

 

Thank you very much for your time, CPU.  This has been one heck of a learning experience.

Posted

You welcome Booceefus.

If you need any further help fell free to contact me.

 

Funny part I just notice:

In Italian "Bocce" is a way to refer to tits. Your avatar and your name are really close if you speak Italian.

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...