Jump to content

Quick Questions, Quick Answers


Mattiewagg

Recommended Posts

Question re:getting item position after it's havoked.

 

After running the havok sim, an object retains its original position data, though the 3d appears to be in the new place. This is a known problem (documented in the notes here: http://www.creationkit.com/ApplyHavokImpulse_-_ObjectReference).

 

I'm trying to get the position data for an object that the player drops on the ground from their inventory. I've gone through the possible solutions. TranslateToRef just sends it back to its original location (hanging in the air in front of the player).

 

Using MoveToNode with a dummy object appears promising, but I can't find the node string! I don't have any experienced with meshes or nifscope in Skyrim, so I may be approaching this all wrong...

 

But, for example, for a cheese wheel, I've opened it up in NifScope, and here is what it looks like:

http://i57.tinypic.com/w7h3ki.jpg

 

None of these looks terribly promising as nodes, but I've tried them anyways. I always (unsurprisingly) get the papyrus log error: [02/06/2015 - 10:54:18AM] Error: (0901EE63): does not have a node named 'BSFadeNode'.

I'd appreciate any thoughts on finding the node string or another way to get position data for a havoked item. Thanks!
Link to comment
Share on other sites

  • Replies 2.6k
  • Created
  • Last Reply

Top Posters In This Topic

Really don't know how to help you achieve what you want. Just wanted to state that I suspect what papyrus is looking for in a node is the name given to the node (i.e. the TXT value). It is this value that shows up in the Creation Kit when assigning texture sets to the various nodes in the mesh... so it makes sense that it would be the same.

Link to comment
Share on other sites

Really don't know how to help you achieve what you want. Just wanted to state that I suspect what papyrus is looking for in a node is the name given to the node (i.e. the TXT value). It is this value that shows up in the Creation Kit when assigning texture sets to the various nodes in the mesh... so it makes sense that it would be the same.

 

Oh -- that didn't occur to me to try the TXT strings. Unfortunately if that works, it means that I could find the location of a cheese wheel, but to do it with anything a player might drop, I'd need to know every possible string... The examples I've seen using the MoveToNode() method have used it with specific known objects that are havoked. I haven't seen it used in the more generic sense I'm trying to, and maybe this is why.

 

I'm working on a mod that moves a ship from port to port, including anything the player might put on it. The best workaround I've come up with is to take any object the player drops and move it to a specific known location (an open crate). Then encourage users to use Jaxonz repositioner if they want to position objects themselves... Not ideal, but better than having cheese wheels floating around the deck :)

 

Thanks for your help

Link to comment
Share on other sites

Here´s my quick question. Is it possible to have lights with dynamic shadows in outdoor areas?. I have tried to set this up in the editor but lights that cast shadows only seems to work in indoor cells for some reason.

 

 

(Edit) Nevermind I have solved it. You must set "DeferredShadows=0" in your SkyrimPrefs.ini

Then it works

Edited by Bhelk
Link to comment
Share on other sites

I'm having a brain fart (and it stinks :P )....

 

How does Papyrus handle rounding when the output of an equation using integers would result in a float?

Int Max
Int Min                
Int Step = (Max - Min) / 4
Int SR1 = Max - Step
Int SR2 = SR1 - STep
Int SR3 = SR2 - Step

If I set Max to 7 and Min to 1, I get a float of 1.5. Will this become 2 or 1?

 

These values are used to randomize an integer depending upon player's skill level in the following manner

Max

Max - SR1

SR1 - SR2

SR2 - SR3

SR3 - Min

 

I would THINK it would round up, but Papyrus has proven to be a bit crazy at times.... Better to ask than to screw it up.... :P

Link to comment
Share on other sites

I have a script that I cannot add properties to (it is a stock script and it would be a compatibility nightmare if I did). I know I can use GetFormFromFile (GFFF) to obtain global variables from other aspects of the mod. Question is how do I set it up to use bool variables from a MCM script? I can use GFFF to access the quest but not sure how to get the script from that. I'm assuming it would be "method two" from here. Method one I understand, but two has confused me.

 

So I'll stumble through, if someone could let me know if I'm wrong or not...

outside of events & functions
Quest MCMQuest
MyMCMQuestScript  MCMScript

some event/function()
MCMQuest = Game.GetFormFromFile(0x01234567,"My Mod.esp") as Quest
MyMCMQuestScript  MCMScript = MCMQuest as MyMCMQuestScript

later on
MCMScript.SomeFunction()
MCMScript.SomeVar
Link to comment
Share on other sites

 

I have a script that I cannot add properties to (it is a stock script and it would be a compatibility nightmare if I did). I know I can use GetFormFromFile (GFFF) to obtain global variables from other aspects of the mod. Question is how do I set it up to use bool variables from a MCM script? I can use GFFF to access the quest but not sure how to get the script from that. I'm assuming it would be "method two" from here. Method one I understand, but two has confused me.

 

So I'll stumble through, if someone could let me know if I'm wrong or not...

outside of events & functions
Quest MCMQuest
MyMCMQuestScript  MCMScript

some event/function()
MCMQuest = Game.GetFormFromFile(0x01234567,"My Mod.esp") as Quest
MyMCMQuestScript  MCMScript = MCMQuest as MyMCMQuestScript

later on
MCMScript.SomeFunction()
MCMScript.SomeVar

The casting is right, though I've never seen it stored in a variable. I usually see it castes each time you want to use it.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...