Jump to content
⚠ Known Issue: Media on User Profiles ×

SamHe11

Premium Member
  • Posts

    30
  • Joined

  • Last visited

Everything posted by SamHe11

  1. Found it. Had to go back and dig around in the CK wiki a little more. I was flippantly wanting a button or list field to drag and drop objects into. According to this page, you add a Target Selector parameter and an ObjectList parameter in the Package Data field. then add a Sequence branch to the Procedure Tree with a Find procedure followed by a Flee procedure. In the Find procedure's Target Selector Input Data drop-down, you link to the Target Selector parameter you defined in the Package Data field above. Then in the Flee procedure's Flee From target drop-down, link to the ObjectList you added to to the Package Data. During the "Find" phase of the package, the NPC will scan the designated radius for anything that matches what was selected for the Target Selector's value in the Package Data field and silently adds that to the ObjectList. Once the "Flee" phase kicks in, the NPC will run away from anything it added to the ObjectList during the "Find" phase. Everything is listed on the CK wiki page, which I admit I should've checked before throwing my hands up and coming here. Que sera, sera.
  2. Like the title says....so far the way I've gone about it is to pass the creatures and the fleeing NPC into quest aliases. The fleeing NPC's alias would also have a "Flee from" package attached to it pointing to the other creature aliases. The Flee From package is pretty self explanatory except for one element...the "Selected Package Data" Type has Target Selector, which accepts one single target to flee from and lets me select one of my quest aliases as that target. But I need a range of targets, not just one. There is also a Type called Object List, which I would assume functions similar to a formlist and would let me add multiple targets (aliases) for the NPC to flee from. However, I see nowhere to actually define this list. The only value input for Object List under Package Data is Radius, which has a [Empty] next to the value you enter for the Radius. I'm guessing it says [Empty] b/c I'm suppose to fill this list somewhere, but I can't figure out where. Can anyone help me with this?
  3. I'm looking for a way to create a visual effect that remains temporarily in the camera view regardless of the player's activity. Sort of a quick and dirty HUD element. My end goal is to keep track of the number of critical hits the player scores with a specific dagger and then, one way or another, flash a little graphic of the running total on the screen momentarily. I've got the first part scripted and running beautifully, but I have no way to show on screen the running total aside from using debug messages. And I don't want to spam Notification messages this way. That's done to death and rather distracting from what I've observed around the community over the years. I'm thinking more of using an art object in the form of a nif or visual effect particle. I've gotten pretty good with scripting and nif editing, but I'm unfamiliar with a couple of the other elements I'm trying to implement here, namely effect shaders, particle emitters, AddOnNodes, etc...which is why I'm looking for help now. I've also looked into adding custom HUD elements, but from I've seen that would require SKSE and I'm trying to avoid that. Some things I've considered and/or experimented with: That's all I have for now. I've spent hours experimenting with different methods and I have no idea if I'm wasting my time or not. I think the Visual Effect or Camera node methods would work best. But the systems used by each are complex and confusing. I'm hoping someone else has had experience getting this to work or can at least point me in the right direction. Thanks.
  4. That makes sense. I can think of a couple other scripting dead ends this method might also help with. Thanks for the response.
  5. There is no papyrus field for these objects to attach scripts to them. I'd like to be able to call some events on a scroll I've made (OnContainerChange, OnEquip, OnUnequip, etc) like any other base weapon or item, but can't figure out how to do it. There isn't much documentation floating on the Creation kit or Google to accomplish this either. Any suggestions? NOTE: I'm not asking how to attach a script to the Magic Effect of the spell the scroll casts.... I'm trying to attach a script to the actual base object of the scroll itself. Thanks.
  6. That's a good point and is another reason I like this method. The Summon effect cleans itself up after the spell wears off so there aren't any corpses lying around. The way I have it setup now is with a duration of 1 second on the spell. This is more than enough time to spawn in the invisible NPC and execute its OnLoad() event with the contained script. Then the spell ends and the invisible NPC unloads. The most glaring problem I can see with this right now is that it (ever so briefly) ties up one of the player's summon "slots", which I believe in vanilla Skyrim is just 1 creature until you obtain the summon perk that allows more "slots". And if the player already has their maximum allowed summons active when this spell is cast, this would unintentionally interrupt one of those summons. Of course the easy fix would just be to download a mod that increases this cap, but I don't want to paint players into a corner like that. What I'm thinking of trying is to circumvent this as un-intrusively as possible by adding a conditional somewhere that checks if the player has the spell readied and quietly grants them an additional summon slot, then removes said extra slot after the spell wears off. This way, simply using the spell won't unsummon any other creatures the player had active if they were already at their max summons when the spell was cast. It's been fun to play around with so far.
  7. Hi thanks for the info. As I mentioned in the first post, I've used that method before and wasn't happy with the results b/c of the collision issues and rigid pre-defined distancing from the player in the code. You even said so yourself in the thread you referenced... I'd like to point again that my way, while certainly not perfect, avoids issues like these in that uses the Summon spell mechanic to let you drop anything right onto any object in the environment (walls, rocks, rooftops, etc..) from any distance and all with the flexibility of pointing and clicking with your mouse where you want it, not relying on pre-defined values in the code and risking the activator (in my case, or shrine in the case you mentioned) getting stuck out in the "void". By doing it this way, I've put the decision of where to place the object dynamically in the hands of the player, not the code. Hope that clarifies. Thanks.
  8. I've had success with what I wanted to do. Maybe this is common knowledge by now (the game is nearly 10 years old), or maybe a better way to do it has been discovered, but hits on searches for this kind of topic were non existant, and maybe some other poor soul another 10 years from now will be trying to solve this same issue and stumble across this old post. Oh and none of this requires SKSE (in case you also like to mod and play on Xbox like me :thumbsup: ) The invisible NPC route was the way to go. There is already an Invisible NPC race in the vanilla resources. Just duplicate that one and give it a unique ID, then make sure the form is as blank as possible. No traits, voices, packages, etc. Make sure its Summonable box is checked. Then attach a script to it with whatever you want to happen when this "spell" is cast. I suggest putting your code inside an OnLoad() event so it fires as soon as it's summoned. Next is to make the custom Magic Effect. The easiest way is to just duplicate a vanilla summon effect like SummonFlameAtronach. This effect will already come with the Summon archetype and Target Location delivery types plus a few extra settings required of summon spells that may not be immediately evident. Anyway, select your Invisible NPC in the Assoc. Item 1 dropdown box and give this edited magic effect a new ID. Now attach the magic effect to a spell and go in game and try it out. There, you now have a targetable invisible marker that respects the environment that you can attach some scripted effects to. One drawback is the campy groans and grunts the invisible NPC makes when he/she dies after the spell wears off. There's an easy fix for this: Under the traits tab of your invisible NPC's Actor window, there is a box labeled Voice Type. You need to make a new Voice Type (found under Character in the Object Window) with a unique ID, then reopen the NPC window and select that empty Voice Type in the box. Now all the zombie impersonations are a thing of the past. You may also notice right away that the sounds and visuals of the Magic Effect itself aren't what you're looking for. At this point, you can change any FX you want when the spell is cast, but (as I mentioned above) there is one caveat to changing a Summon effect's visuals and that is linked to the Hit Effect Art setting under Visual Effects. If you change that to anything else that doesn't use the SummonTargetFX.nif file in its Art Object, your invisible NPC won't be summoned. The actual code that spawns NPCs with the "summonable" flag is baked into the nif file. This may not bother you, but remember, we're not making a legit summon spell here, we just want this particular magic effect for the Target Location delivery type that comes with it. Therefore, the visual FX that come with the required Hit Effect Art may be a major turnoff to you. We can fix this with nifskope. Extract the SummonTargetFX.nif file from the Skyrim - Meshes1.bsa in your data folder and open it in Nifskope (I'm using Nifskope 2.0 Dev 7, that's probably an old one but it's what works for me atm). What you're looking for in the node tree on the left side of the screen are the BSTriShape blocks found under the NiBillboardNode. When you click on the individual BSTriShape blocks, their corresponding wireframes should highlight in the render window. Give each one a look over and consider if you want to save any of them or not. To remove one, simply right click it and select Block -> Remove. Doing this to every BSTriShape block will remove the visual 3D portion of the nif file while leaving the important code intact that the summon effect from the game wants to see. This is found over several entries in the Sting block under the Header tab (also on the left side of the screen). After you've removed the BSTriShape blocks, save the nif with a new file name, drop it in your Data/Magic/ folder and load it into a new Art Object with a new ID in the Creation Kit. Now go back to your custom Magic Effect and select your new Art Object in the Hit Effect Art box. Load up a game and try it out again and voila, a nice new blank slate for your own scripted AoE spells with stable, reliable targeting on any part of the environment without any accidental ghosting through walls or other unpredictable collision issues.
  9. Been trying for a few hours to figure out how to script a spell to affect a specific area of the environment (wall, ground, rock, etc...) that the player can target. Think along the lines of the Target Location delivery type in Magic Effects that summon and rune spells use. Runes can stick to walls, summons can be cast on the ground in a place the player targets with the crosshair. But I'm looking to place an activator object this way and the summon creature and hazard Effect archetypes only let you choose those specific types of objects to add to your magic effect. And from the scripting side, OnEffectStart wants specific actor references to apply the script's functions to, not an actual targetable area on the ground (like with the aforementioned summon effect). I'd rather not use the Ref.MoveTo() or TranslateTo() functions with invisible markers to do this. I've tried those before and there are drawbacks to going that route. The targeting is not as flexible and collision isn't updated very effectively (if at all) and you could fire off your spell and watch it float right through the games geometry and out into limbo if you're not careful. I tried the Light magic effect (like in MageLight) where it's shot with a projectile that sticks to the environment set with impact data properties. It uses a Light base object, so I tired making one with a script attached to the light using OnLoad() but the script never fires when the Light spell hits something. Another work around I've thought of is using an invisible NPC with the summon effect and an OnLoad/PlaceAtMe script snippet attached to said NPC, but now we're just getting ridiculous. I think there should be an easier way to do this that I'm not thinking of. I've also seen an option in Explosions to place an object reference at the point of impact of the explosion. I tried that using my activator object on an explosion that I placed on a magic effect with a projectile, but couldn't successfully get the activator ref to generate when the projectile hit something and triggered the explosion. Anyway that's how far I've gotten with this. I'm starting to run out of ideas. I hope someone else can point me in the right direction. Thanks.
  10. Thought I'd mention my findings in case anyone is interested. I don't think this has received much attention in the past as searches have come up basically fruitless. Been playing around off and on with this and I've gotten the effect I was looking for. The trick is to make a light object with Pulse effect. The key values to make this work are Fade, Period and Intensity Amplitude. As defined on the Creation Kit's website: Fade - The intensity of the base light object (higher = brighter). This isn't quite as important as the next two. It's more useful for just fine tuning. Period - The time in seconds for the function (pulse of the light) to do a complete cycle. This is like the period of a clock's pendulum and how long it takes to make one complete back-and-forth swing. Or in this case, from full light intensity -> complete fade out -> back to full light intensity. As implied, this setting will be used to manipulate the length of time of this effect. Intensity Amplitude (IA) - The amount the function (again, pulse of the light) can dim below the light's fade value. This is perhaps the most important of the 3 settings. An Intensity Amplitude that is greater than the Fade value will dip into "negative" lighting. It will literally start absorbing surrounding light up to the limit of it's radius, causing a shadow effect. The higher the IA, the darker your shadow will be. This also has an impact on overall length of time of the effect, as described below. The thing to keep in mind here is that the relationship between Period and IA (and possibly Fade?) is proportional. Meaning, the higher the IA value, the longer it's going to draw out a full pulse cycle. Which makes sense. Remember the pendulum analogy? The longer the length of the pendulum, the greater the time it will take to complete it's period. I'm no math expert, but just through observation, I'd say it's somewhere in the ballpark of AI / Period = Total seconds of complete cycle. If you test this equation in the CK, you'll see in game that a 2/2 ratio will give you about a 1-2 second pulse, whereas a 10/2 ratio will result in about a 5 second pulse and so on. You can use the Fade setting as well as the light object's color to fine tune this further. With a higher Fade and brighter color, the time spent in darkness/light can be skewed more to the light side over the course of the pulse, meaning you'll have a shorter time in darkness and more time in light. With a lower Fade and darker color, you get the opposite effect. So if you want a more permanent shadow effect, use very low Fade value (0 will even work for more immediate effects) and a very dark shade of gray. Interestingly, Black will not work for the color. The game sees this as no light value at all and therefore won't apply any changes (kind of like nothing from nothing is still nothing). I tested this out in game by equipping a helmet with an enchantment using GetLightLevel that posted a debug notification of the value every 3 seconds. Sure enough, it had an impact on the Player's Light Level value, meaning that this could be used as legitimate gameplay utility, not just for visual candy. Unfortunately, going this route would imply that "negative" lights created this way aren't permanent. You just have to fudge around with the settings mentioned above to get the best shadow "intensity" per second that you need. This would best be implemented with things like Fire and Forget magic effects and other quick and dirty visuals. But play around with it and have fun. If anyone has seen this done in another mod in a better way, please let me know. Lighting is one of my favorite things to play around with.
  11. Confirmed it's not SKSE dependent. I couldn't fix it on the old install so wiped it out and reinstalled to a pathway similar to the one on my other PC and now it works. I'll have to pay closer attention to that in the future. Still not sure why though. I'm sticking with my game/ini settings theory.
  12. Thanks. That's something I'd never considered before and will utilize in the future. Unfortunately, I'm nowhere closer to solving this. I've removed all mods, going back to vanilla SSE with a brand new save, created a completely new mod with a brand new script and brand new objects and it still won't work. It always returns 0.0000 no matter where I'm standing. I've tried it on items, on activators, quest scripts, etc...I've tried different conditionals in the script in case I wasn't calling the variable's value in the messagebox correctly....no luck. I'm at a complete loss. It should be such a simple thing to pull off. EDIT: Interestingly, I tried THIS MOD, and it doesn't work either. The result always comes back as 0 light level. So wtf?? Are graphic settings coming into play here or something? EDIT 2: Tried loading it up on an install on a different rig of mine and it actually works. So......something wrong with the install on my original setup? Would Game/ini settings have an impact on this? I'm scratching a bald spot on my head over this.
  13. I actually tried Game.GetPlayer() first and was getting the same result so switched to akActor. Neither seem to work. I've had an issue before where a simple script like this acts in an unexpected way, and no amount of editing seems to fix it. Yet if I copy and paste it into a new script with a new name, it will suddenly start working. Same thing with objects I've attached scripts to....the script won't work as expected on the object, but if I delete the object's reference from the cell and drag a new reference of the same object into the cell, then add the same script onto that new reference, suddenly the script will work. Is there some way scripts and variables get "baked" into a mod? It's been a few years since I've modded Skyrim, but I don't recall having this kind of petty trouble simply editing/updating my scripts/mods before.
  14. Just playing around trying to make a quick and dirty script to return the player's current Light Level in a messagebox. I attached it to a ring that grabs the value when equipped, then is supposed to display it when the ring is unequipped.... Scriptname SamHellsLightDetectTestScript extends ObjectReference {Script to detect the light level of the player.} float lLevel int EquipCount ;-------------------------------------------------------------------------- Event OnEquipped(Actor akActor) EquipCount = EquipCount + 1 lLevel = akActor.GetLightLevel() EndEvent Event OnUnequipped(Actor akActor) debug.messagebox("Your Light Level is currently " + lLevel + " and you have equipped this ring " + EquipCount + " times.") EndEventThe result is that the Light Level always returns 0.000 no matter where I'm at. I tested it in caves, houses, out in direct sunlight, day or night. It always returns 0.000. The other variable (EquipCount) I just threw in as a backup to double check that things are firing correctly. It returns the correct value, counting up the times I equip and unequip the ring. Is there something else I should know or do to return the correct Player light level?
  15. I remember in the Oblivion construction kit, the Light object window had a box called "Negative" that, when checked, would cause your light source to absorb light from its radius rather than emit it. So it was like you could create your own placeable shadows. It was a cool trick. However, there is no such option in Skyrim's Creation Kit. So I'm wondering if there is still a way to do this with some combination of light object settings. I've played around a bit with some combinations of settings but haven't had much luck. Anyone else know of a way to do this?
  16. Thanks. I've clearly forgotten more about scripting than I remember. I didn't realize it would be that complex. I'll have to brush up more. That name wasn't already unique enough?? Geez....
  17. I haven't scripted in years and I thought this would be as simple as they come, but I can't for the life of me get it to work. I want a custom container to only open if the player has enough of a certain item. So I made a script that looks like this.... Scriptname RedsShrineSafeScript extends ObjectReference {Script to check player for Pockets of Darkness and unlock the safe if they have enough.} miscobject property DarkPocket auto ;property value defined in reference window, script tab int DPTotal ;--------------------------------------------------------------------------------------------- Event OnAcivate(ObjectReference akActionRef) DPTotal = Game.GetPlayer().GetItemCount(DarkPocket) ;Only open the safe if the player has 3 or more dark pockets. if DPTotal < 3 debug.messagebox("Not enough DPs") elseif DPTotal > 2 debug.messagebox("You've got enough DPs") akActionRef.Activate(Game.GetPlayer()) endif EndEventMy result is that clicking on the container just opens it normally, as if the script isn't even there. It doesn't matter whether I have enough of the specified item or not. Even if I've messed up setting up the object property, based on how I set up the syntax, shouldn't I at least get the debug msg to pop up saying I don't have enough of the item since the variable would be 0 by default? The item under question is a custom Misc item. The object's property value was set in the Object reference window, script tab, "Properties" button. I've even tried the script with the vanilla gold001 Misc object with no luck. I've also tried the script on a simple activator object (the one from the first tutorial on the CK website) with no luck. I'm extremely confused here...I would think at the very least that the debug messages would pop up.
  18. I'll never know what the issue was, but I managed to fix it by straight up copying directory for directory from my older laptop that had it all working fine 2 years ago, to this new laptop. Now things seem to work fine. It must have had something to do with where I was installing Blender's user files to and where the NifScripts needed go (install directory vs user files directory)? I know the error message above was referring to files, or lack thereof, in user\appdata\roaming\Blender......etc.....idk. Tech these days is just passing me by. Now I just need to bronze this setup and save it forever :P
  19. I had this working great years ago. Now I'm trying to get back into modelling and modding for Skyrim SE and all the new versions of everything don't seem to be syncing well for me. And even the older versions I was used to are acting....sporadic at best. Anyway..... Using Blender 2.79, NifScripts 2.5.9, & Python 2.6.6/PyFII 2.1.11, I'm getting an error message when trying to activate the Nifscripts add-on in Blender (put a little check mark in the little box). It looks like this: I've never had this problem before so my searches to fix have been all over the board and it's quite a chunk of text to go pasting into google. Are these versions not compatible with each other? Or does my newer hardware and OS (Acer Nitro 5 w/ Windows 10) require some kind of workaround to function correctly? I'd appreciate any help.
  20. Is it as simple as copying the corresponding blocks of one nif and pasting them into the tree of another nif? Does it matter if the nifs are of different types or does it need to be "apples to apples" (ie: weapons to weapons, activators to activators) in the game/CS? I've got the basics down in terms of modeling/texturing and am interested in jumping into animation/particles. If possible, I'd like to dip my feet in first by just getting some quick and dirty results to see how different systems look on different models and how they work before plunging into building a PS from scratch. Thanks.
  21. I've got the basics down in terms of modeling in Blender (2.49 & above) and applying a single material and base texture and getting my items, weapons, etc into the CS and, ultimately, into my game. I'd like to now take a stab at doing some more advanced things like adding bump maps and glow maps to give my new toys a finishing touch. So I'm going through some Blender tutorials to do just that. Most of them seem to always finish with "export your nif from Blender, then open up your nif and look at it in NIfskope and poke around with some settings in there." Is Nifskope really necessary to get your nifs into Morrowind? I find it a little confusing with all those nodes and block properties and my head spins just looking at it. With the basics I mentioned above (not doing bump or glow maps yet), I have no problem exporting with Blender and going straight into the game. Is it imperative that after additional maps in Blender, I open the nif in Nifskope to tweak it around some more? I've seen some map tutorials exclusively use Nifskope, changing and adding settings/filters on blocks to create the desired maps. For instance, this tutorial mentions adding the glow map in the texture properties in the BSShaderTextureSet block. But none of my custom nifs exported from Blender have this property. When I tried the Blender tutorials and looked at my nifs in Nifskope, they do, however, have a NiTextureProperty & NiMaterialProperty that my glow map falls under. So I guess I'm ok? I loaded up the meshes in game and they seemed to work fine. Is there some kind of advantage to running your meshes through Nifskope after finishing them in a separate modeling program? Like, does it make your mesh more compatible for Morrowind or Oblivion to render? Thanks
  22. I'm trying to script a message to pop up when the PC hits any enemies with a specific weapon. So I've started a script that I've attached to the weapon itself, but I'm looking for something like an OnHit to call with the weapon when it connects with any NPC/Creature so the message can trigger. I've found HitOnMe, but my understanding is that's for scripts on the calling object (the NPCs/Creatures themselves). I also tried the MWSE function xGetPCTarget to reference the enemy in the PCs crosshairs (which I've gotten to work fine), and then use that ref in the HitOnMe function in the sword's script. But I'm not having much luck with it. My code looks like this: short doonce long pcTargetHit long pcTarget long temp Setx pcTarget to xGetPCTarget ifx ( pcTarget ) ;GAME CRASHES IF YOU CALL A FUNCTION WHILE TARGET IS 0 if ( doonce == 0 ) MessageBox, "You are currently targeting something" ;DEBUG MESSAGE set doonce to 1 endif setx pcTargetHit to ( pcTarget -> HitOnMe, test_sword ) ifx ( pcTargetHit ) MessageBox, "You have hit the enemy with this sword" ;DEBUG MESSAGE endif else if ( doonce == 0 ) MessageBox, "You are not targeting anything" ;DEBUG MESSAGE Set doonce to 0 endif endif The error that comes up when I try to compile is: Syntax Error: Expected 'Unknown' but found '(' (()!Any help with this would be greatly appreciated. Thanks
  23. How would I make an Actor walk, for example to the player, with a script attached to said Actor? I'm trying to use the function PathToReference, but the script is getting a single compiler error. What I have so far is this: Scriptname myActorSCRIPT extends ObjectReference ACTOR PlayerRef EVENT ONINIT() PlayerRef = Game.GetPlayer() RegisterForSingleUpdate(1.0) ENDEVENT EVENT ONUPDATE() self.PathToReference(PlayerRef, 0.5) ENDEVENT ...and this gives the error: PathToReference is not a function or does not existCan I not use "self" in this way? How do I get the Actor to refer to itself within its own script? Thanks
  24. I'm trying to find the nearest actor to the player in a given radius with a script. According to the wiki, an example of PlayerRef.FindClosestActor(0.0, 0.0, 0.0, 100.0) would return the player as the closest actor since the player is an actor. How would I work in conditions to exclude certain actors that are returned with this function? Such as actors that are: not the player, not a follower of the player, etc.... Thanks.
×
×
  • Create New...