Quick Questions, Quick Answers Thread #6

Post » Sun Nov 18, 2012 5:03 pm

Yes, they can. FormLists can bear any form, even other FormLists.

I thought there was a difference between a Form and a Reference, and that Formlists could only contain the former. (See what I did thar, FORMer?)
User avatar
Dean Brown
 
Posts: 3472
Joined: Fri Aug 31, 2007 10:17 pm

Post » Sun Nov 18, 2012 5:04 pm

Price denied!

Unfortunately the game handles the rigging of the two different weapon types differently, so the staff is treated in a completely different manner. So while he has made it a weapon, it won't work as a staff... though I will download it, then maybe I will make a custom model of my guitar :wink:

https://p.twimg.com/AsBCDMQCAAA3LBk.jpg:large

Who doesnt want to club a skeleton with a 58' style explorer

Dude, do it.
User avatar
Nicholas
 
Posts: 3454
Joined: Wed Jul 04, 2007 12:05 am

Post » Sun Nov 18, 2012 11:02 pm

I thought there was a difference between a Form and a Reference, and that Formlists could only contain the former. (See what I did thar, FORMer?)
References are Forms, despite them being mere references to their base objects. You can add REFR/ACHR forms to FLSTs just like anything else with a FormID (ReferenceAliases cannot be in FormLists but the REFRs they're filled with can).
User avatar
Isaiah Burdeau
 
Posts: 3431
Joined: Mon Nov 26, 2007 9:58 am

Post » Sun Nov 18, 2012 5:04 pm

Huh, I had thought Forms=Base Objects.
Color me corrected.
User avatar
Emzy Baby!
 
Posts: 3416
Joined: Wed Oct 18, 2006 5:02 pm

Post » Sun Nov 18, 2012 4:23 pm

All base objects are forms as are their references, but references are not base objects. From a scripting stance, everything stems from Form including the ObjectReference and Actor derivatives. From the plugin/CK/game's perspective, a placed reference to any object is its own Form and a reference to its base object with its own FormID whether ACHR, PGRE, PHZD, or REFR. LAND and NAVM forms also bear their own FormIDs, but are special forms and not references to base objects.

RiftenHorseMarkerRef [REFR:00000E85] (places HorseMarker [STAT:00000012] in GRUP Cell Persistent Children of [CELL:00000D74] (in Tamriel "? " [WRLD:0000003C] at 0,0))

Any part of that with a FormID can be added to a FormList.
User avatar
CHANONE
 
Posts: 3377
Joined: Fri Mar 30, 2007 10:04 am

Post » Sun Nov 18, 2012 5:06 pm

Can anybody elaborate on this for me:
"Unable to call X - no native object bound to the script object, or object is of incorrect type"
This error appears when native function X, which is non-global, is called on an object variable which does not point at an actual object in game. This usually happens in ActiveMagicEffect scripts which can have their effect deleted out from under them, or during an event that may be sent after the game has cleaned up the object (like OnUnload)

How can an effect be deleted out from under the script, and how do you check for it? I already have so much sanity checking in place it's not funny. My "X" is RegisterForAnimationEvent(), in the OnEffectStart block of a magic effect, and it happens so rarely and intermittently it's been impossible to test well.
User avatar
Josee Leach
 
Posts: 3371
Joined: Tue Dec 26, 2006 10:50 pm

Post » Sun Nov 18, 2012 11:04 am

Can anybody elaborate on this for me:


How can an effect be deleted out from under the script, and how do you check for it? I already have so much sanity checking in place it's not funny. My "X" is RegisterForAnimationEvent(), in the OnEffectStart block of a magic effect, and it happens so rarely and intermittently it's been impossible to test well.

An effect is deleted the very next frame it is no longer required to be active. Papyrus tends to not be fast enough to keep up with that and may attempt to run the script attached to that effect after the effect has been removed from existence (the effect is gone, but the script attached to it is still in the VM). This will result in a large number of Null Pointer related errors because all of the non-persistent data the script needed to function got dumped from memory, despite the fact the script still needed the data (the game is dumb like that).

That's what is meant by the effect being "deleted out from under the script." Papyrus is occasionally too slow and won't run the OnEffectFinish() event in time, so when it does get fired, the effect is already gone and data the script needed was lost with it.
User avatar
Lucy
 
Posts: 3362
Joined: Sun Sep 10, 2006 4:55 am

Post » Sun Nov 18, 2012 8:44 pm

That's what is meant by the effect being "deleted out from under the script." Papyrus is occasionally too slow and won't run the OnEffectFinish() event in time, so when it does get fired, the effect is already gone and data the script needed was lost with it.
Would it possibly alleviate this to check the "No Death Dispel" for the effect and then in the script just go to a "Dead" state upon receiving OnDying or OnDeath? I believe dying is the last thing left that forcibly dispels my effect.
User avatar
Everardo Montano
 
Posts: 3373
Joined: Mon Dec 03, 2007 4:23 am

Post » Sun Nov 18, 2012 2:06 pm

Would it possibly alleviate this to check the "No Death Dispel" for the effect and then in the script just go to a "Dead" state upon receiving OnDying or OnDeath? I believe dying is the last thing left that forcibly dispels my effect.

Unload also forcibly dispels effects. That would be much harder to account for, for obvious reasons.
User avatar
meg knight
 
Posts: 3463
Joined: Wed Nov 29, 2006 4:20 am

Post » Sun Nov 18, 2012 9:39 pm

I have a mod that adds a script to certain containers. The .psc file is not included, I have no idea if that matters.

I want to add this script to some containers in another mod. Can I just add the script in the second mod, autofill the variables and call it good? Not for upload, just for personal use.
User avatar
Misty lt
 
Posts: 3400
Joined: Mon Dec 25, 2006 10:06 am

Post » Sun Nov 18, 2012 6:40 pm

I have a mod that adds a script to certain containers. The .psc file is not included, I have no idea if that matters.

I want to add this script to some containers in another mod. Can I just add the script in the second mod, autofill the variables and call it good? Not for upload, just for personal use.

Without the PSC file, you won't be able to do much of anything with that script. You'll need to contact the author and ask for the source code files.
User avatar
Adam Porter
 
Posts: 3532
Joined: Sat Jun 02, 2007 10:47 am

Post » Sun Nov 18, 2012 2:02 pm

Without the PSC file, you won't be able to do much of anything with that script. You'll need to contact the author and ask for the source code files.

I was afraid of that, thanks.
User avatar
Cheryl Rice
 
Posts: 3412
Joined: Sat Aug 11, 2007 7:44 am

Post » Sun Nov 18, 2012 12:47 pm

"AdvanceSkill is not a function or does not exist
No output generated for AAspellEffectLevelup, compilation failed."

The only line with Advanceskill::
   	 Game.AdvanceSkill(fakeLevelingSkill, 1.0)

Changing fakeLevelingSkill to the literal "Enchanting" makes no difference.

Importing game also makes no difference

Why is this happening?


Edit: Nevermind, it was actually on two lines in the script and I forgot about the second one, which was incorrectly written.
User avatar
Louise Lowe
 
Posts: 3262
Joined: Fri Jul 28, 2006 9:08 am

Post » Sun Nov 18, 2012 5:51 pm

Alright quick question, hopefully quick answer, I have generated a new texture (which is actually quite [censored]en) and I am pleased with it, however it looks slightly awkward with the current normal map on the weapon it is on. How does one go about making a normal map, or is there some way to generate them. I mean I could use the current normal map, it just looks slightly wrong in one spot.
User avatar
Sakura Haruno
 
Posts: 3446
Joined: Sat Aug 26, 2006 7:23 pm

Post » Sun Nov 18, 2012 10:36 am

Alright quick question, hopefully quick answer, I have generated a new texture (which is actually quite [censored]en) and I am pleased with it, however it looks slightly awkward with the current normal map on the weapon it is on. How does one go about making a normal map, or is there some way to generate them. I mean I could use the current normal map, it just looks slightly wrong in one spot.

They are supposed to be generated from a higher-poly 3D model. If you don't have that (which it seems like you don't), you can download a normal map filter for photoshop or gimp and use it on the new texture, and just erase everything but the bad looking area.
User avatar
Sammi Jones
 
Posts: 3407
Joined: Thu Nov 23, 2006 7:59 am

Post » Sun Nov 18, 2012 5:35 pm

They are supposed to be generated from a higher-poly 3D model. If you don't have that (which it seems like you don't), you can download a normal map filter for photoshop or gimp and use it on the new texture, and just erase everything but the bad looking area.
Thanks, found the normal map generator pretty quickly, works alright, thanks for the help.
User avatar
CORY
 
Posts: 3335
Joined: Sat Oct 13, 2007 9:54 pm

Post » Sun Nov 18, 2012 9:35 pm

Another quick question, where in the creator kit do you assign a weapons sheath? or is it done in nifscope in a location I didn't notice...
User avatar
Arrogant SId
 
Posts: 3366
Joined: Sat May 19, 2007 11:39 am

Post » Sun Nov 18, 2012 8:30 pm

Sheathes are a part of the weapon's mesh. The Skeleton.NIF has slots set up for weapons, the sheathes are displayed where those slots are located.
User avatar
Rebecca Clare Smith
 
Posts: 3508
Joined: Fri Aug 04, 2006 4:13 pm

Post » Sun Nov 18, 2012 10:02 am

Sheathes are a part of the weapon's mesh. The Skeleton.NIF has slots set up for weapons, the sheathes are displayed where those slots are located.
Hate to be a bother, but I can't seem to find the sheath in the weapon mesh, under which thing on the block list would i find it.
User avatar
Judy Lynch
 
Posts: 3504
Joined: Fri Oct 20, 2006 8:31 am

Post » Sun Nov 18, 2012 4:58 pm

I'm working on an interior and when I try to set lighting template and imagespace by right-clicking my interior to edit it (from the cell view window) the lighting tab is just greyed out, and I cannot click OK, just "apply", but that doesn't help. It doesn't help if I toggle light on/off either.

I tried to load another cell and reload my own, and I also tried to exit the CK and restart and reload, but none of that helped. Is there anything I might have accidentially toggled off?

EDIT: OK, when I went through the World-Cell-menu I accidentially entered "a" while having my cell loaded, which probably meant I loaded or entered a different cell by accident, which suddenly fixed my problem. It was so annoying to not even be able to change imagespace, argh...
User avatar
Makenna Nomad
 
Posts: 3391
Joined: Tue Aug 29, 2006 10:05 pm

Post » Sun Nov 18, 2012 11:21 am

I'm working on an interior and when I try to set lighting template and imagespace by right-clicking my interior to edit it (from the cell view window) the lighting tab is just greyed out, and I cannot click OK,...
...when I went through the World-Cell-menu I accidentially entered "a" while having my cell loaded, which probably meant I loaded or entered a different cell by accident, which suddenly fixed my problem. It was so annoying to not even be able to change imagespace, argh...
You have to make sure that the cell you want to edit the imagespace for, is not active in the render window. Then you can right click > edit (*in the Cell View window) and you'll then be allowed to change values for your chosen cell. Then, double click the cell to bring it back into the render window and view your changes.

This is a minor bug that crept in a while ago and hasn't been fixed yet
User avatar
Da Missz
 
Posts: 3438
Joined: Fri Mar 30, 2007 4:42 pm

Post » Sun Nov 18, 2012 10:48 am

I don't know if this is the right place, but... is there somewhere I can make the LOD draw distance higher? I have an 8192^2 worldspace, and I can't see the whole LOD at once, because stuff over about 200,000 units away is clipped.
User avatar
Kate Norris
 
Posts: 3373
Joined: Mon Nov 27, 2006 6:12 pm

Post » Sun Nov 18, 2012 1:19 pm

I have another quick question. How can I enforce a new speedmult with a script? If I change a player's speedmult, they have to "sprint" first before it will apply.

Maybe I can just play the sprinting animation for a very short time? If so, how would I do that?
User avatar
phil walsh
 
Posts: 3317
Joined: Wed May 16, 2007 8:46 pm

Post » Sun Nov 18, 2012 4:56 pm

Is there some special way to add ObjectReferences to FormLists?

Basically I have a perk that does some neato stuff under the condition that the weapon being used IsInList. I have another script that basically does TheFormList.addForm(SomeReferenceAlias.GetReference()), and while it doesn't throw any errors, I can't seem to actually gain the benefits of the perk upon picking up and equipping the weapon. Very aggravating.
User avatar
Donald Richards
 
Posts: 3378
Joined: Sat Jun 30, 2007 3:59 am

Post » Sun Nov 18, 2012 10:57 pm

Nevermind, the thing is in the List okay. The problem is that perk weapon conditions look at the Form, not the objectreference. Which is stupid.
User avatar
LijLuva
 
Posts: 3347
Joined: Wed Sep 20, 2006 1:59 am

PreviousNext

Return to V - Skyrim