Jump to content

SandMouseAnarchy

Members
  • Posts

    347
  • Joined

  • Last visited

Everything posted by SandMouseAnarchy

  1. hi guys i have a script tied to a quest simply looking for an "OnItemEquipped" event to find if the player has a specific hat equipped and if so to change the hair style. This is what i have so far... Scriptname SM_Skytails_Equip extends ReferenceAlias Keyword Property ArmorTypeHat Auto HeadPart Property Skytails03 Auto HeadPart Property Skytails03_Hat Auto HeadPart Property Skytails03_Cap Auto Armor Property TeddyHat Auto Armor Property LongshoremanHat Auto Event Oninit() RegisterForRemoteEvent(Game.GetPlayer(), "OnItemEquipped") RegisterForRemoteEvent(Game.GetPlayer(), "OnItemUnEquipped") EndEvent Event Actor.OnItemEquipped(Actor akActor, Form akBaseObject, ObjectReference akReference) if (Utility.IsInMenuMode() == TRUE) If (akBaseObject == LongshoremanHat) Debug.notification("LongshoremanHat found") EquipCap() Else CheckEquip() EndIf EndIf EndEvent Event OnItemUnequipped(Form akBaseObject, ObjectReference akReference) if (Utility.IsInMenuMode() == TRUE) if akBaseObject.HasKeyword(ArmorTypeHat) CheckUnequip() EndIf endIf endEvent FUNCTION CheckEquip() Form Equipment = Game.GetPlayer().GetWornItem(0).Item If Equipment.HasKeyword(ArmorTypeHat) UnregisterForRemoteEvent(Game.GetPlayer(), "OnItemEquipped") If Equipment == Longshoremanhat Debug.notification("beany hat") Else EquipHat() EndIf EndIf EndFUNCTION FUNCTION CheckUnequip() Debug.notification("hat unequipped") UnequipHat() EndFUNCTION Event OnTimer(int aiTimerID) If aiTimerID == 10 if (Utility.IsInMenuMode() == TRUE) RegisterForRemoteEvent(Game.GetPlayer(), "OnItemEquipped") RegisterForRemoteEvent(Game.GetPlayer(), "OnItemUnEquipped") Debug.Notification("Done") EndIf EndIf If aiTimerID == 11 if (Utility.IsInMenuMode() == TRUE) RegisterForRemoteEvent(Game.GetPlayer(), "OnItemEquipped") Debug.Notification("Done") EndIf EndIf EndEvent FUNCTION EquipHat() ; <-- hat UnRegisterForRemoteEvent(Game.GetPlayer(), "OnItemEquipped") UnRegisterForRemoteEvent(Game.GetPlayer(), "OnItemUnEquipped") ActorBase PlayerBase = Game.GetPlayer().GetActorBase() HeadPart[] headparts = PlayerBase.GetHeadParts() Form Equipment = Game.GetPlayer().GetWornItem(0).Item If headparts.Find(SkyTails03) <1 Game.getplayer().changeHeadPart(SkyTails03, True, True) ; <--- remove normal hair Game.getplayer().changeHeadPart(SkyTails03_Hat, false, false) ; <--- force equip hat hair StartTimer(1, 10) EndIf If headparts.Find(SkyTails03_Cap) <1 Game.getplayer().changeHeadPart(SkyTails03_Cap, True, True) ; <--- remove normal hair Game.getplayer().changeHeadPart(SkyTails03_Hat, false, false) ; <--- force equip hat hair StartTimer(1, 10) EndIf EndFUNCTION FUNCTION EquipCap() <--- cap UnRegisterForRemoteEvent(Game.GetPlayer(), "OnItemEquipped") UnRegisterForRemoteEvent(Game.GetPlayer(), "OnItemUnEquipped") ActorBase PlayerBase = Game.GetPlayer().GetActorBase() HeadPart[] headparts = PlayerBase.GetHeadParts() If headparts.Find(SkyTails03_Hat) <1 Game.getplayer().changeHeadPart(SkyTails03_Hat, True, True) Game.getplayer().changeHeadPart(SkyTails03_Cap, false, false) StartTimer(1, 10) EndIf If headparts.Find(SkyTails03) <1 Game.getplayer().changeHeadPart(SkyTails03, True, True) Game.getplayer().changeHeadPart(SkyTails03_Cap, false, false) StartTimer(1, 10) EndIf EndFUNCTION FUNCTION UnequipHat() UnRegisterForRemoteEvent(Game.GetPlayer(), "OnItemEquipped") UnRegisterForRemoteEvent(Game.GetPlayer(), "OnItemUnEquipped") ActorBase PlayerBase = Game.GetPlayer().GetActorBase() HeadPart[] headparts = PlayerBase.GetHeadParts() If headparts.Find(SkyTails03_Hat) >0 Game.getplayer().changeHeadPart(SkyTails03_hat, True, True) ; <--- remove hat hair Game.getplayer().changeHeadPart(SkyTails03_Cap, True, True) ; <--- remove cap hair Game.getplayer().changeHeadPart(SkyTails03, false, false) StartTimer(1, 11) EndIf If headparts.Find(SkyTails03_Cap) >0 Game.getplayer().changeHeadPart(SkyTails03_hat, True, True) ; <--- remove hat hair Game.getplayer().changeHeadPart(SkyTails03_Cap, True, True) ; <--- remove cap hair Game.getplayer().changeHeadPart(SkyTails03, false, false) StartTimer(1, 11) EndIf ENDFUNCTION But both ways of trying to find the hat fail, and i dont know why... If (akBaseObject == LongshoremanHat) Form Equipment = Game.GetPlayer().GetWornItem(0).Item If Equipment == Longshoremanhat The "GetWornItem" line seems to detect that the hat in slot 0 has the "ArmorTypeHat" keyword Form Equipment = Game.GetPlayer().GetWornItem(0).Item If Equipment.HasKeyword(ArmorTypeHat) but it wont detect if the worn item is the LongshoremanHat. does anyone know why? or how to fix the script so that it wil find the LongshoremanHat if its equipped?
  2. Hi guys, I'm messing with hairstyles at the moment, I'm trying to get parts of the hair to disappear when a hat is equipped - I've added the correct subindexing sections in outfit studio and I made the necessary edits in nifscope and I've found a field called "start index" in the subindex menu of the mesh in nifscope - the higher the number in this field the more of the hair section disappears, but if I set the number too high the game will ctd with an error about my graphics driver crashing. Does anyone know anything about this field? Is there a maximum value to put in there that cannot be exceeded? Does the value have to match the poly count or something like that? Any info would be great :)
  3. Hi guys, i have a script that shows an options message when a piece of clothing is equipped, it works great but the message shows every time i exit power armor or exit a workbench or anything like that that updates the player invintory. Does anyone know how i can contain the Options message to only show when the player has their pipboy open and not at any other time? ((ive tried listening for onmenuopenclose event and the ontutorial event for the pipboy invintory screen, but neither seem to be working or even detecting the pipboy being open and my options message wont show...)) This is the base script that i have so far without any menu event registration etc... Scriptname SM_Equip extends ObjectReference Message Property OptionsMESG Auto Mandatory Const ObjectMod Property Mod_NoCollar Auto Mandatory Const ObjectMod Property Mod_Collar Auto Mandatory Const Bool CurrentlyAttachingMod = False Event OnEquipped(Actor akActor) If !CurrentlyAttachingMod && akActor == Game.GetPlayer() && !akActor.IsInPowerArmor() If !NewGameStarted && !CurrentlyAttachingMod && akActor == Game.GetPlayer() && !akActor.IsInPowerArmor() CurrentlyAttachingMod = True Int iButton = OptionsMESG.Show() ; Shows your menu. If iButton == 0 ; Nocollar AttachMod(Mod_Nocollar) Debug.Notification("No collar selected") ElseIf iButton == 1 ; collar AttachMod(Mod_collar) Debug.Notification("collar selected") ElseIf iButton == 2 ; cancel Debug.Notification("Style unchanged") EndIf CurrentlyAttachingMod = False EndIf EndEvent If anyone has any ideas or suggestions i would love to hear 'em. ^.^
  4. Just a note for anyone following these bread crumbs in the future... So after some experimenting iv found that the frame has to be enabled after the armor has been added by the other script and that the enable command should be "EnableNoWait()". Something like this... NearestPowerArmor.DisableNoWait() NearestPowerArmor.Moveto(akCaster) NearestPowerArmor.Moveto(NearestWorkbench) :____________________________________________ ;Other script adds armor to frame here ;____________________________________________ Utility.Wait(0.5) NearestPowerArmor.EnableNoWait() Im now going to try this method with OnTutorialEvent("Modding Success") and OnItemRemoved Events to ensure that the ghost armor parts wont show after the armor has been removed from the frame or modified at the workbench. Thanks again for the help SKK50! its a shame i couldnt get your solution to work this time though ^.^
  5. Wicked idea! It would be cool to have a vault dweller faction, and a comie Chinese faction ^.^
  6. ah i see, thanks for the insight SKK50 but i cant find a way to solve my problem using those keywords :( ill have to look for another solution
  7. ah that sounds like the same kind of problem im having ^.^ but unfortunately i have tried messing with those keywords and it doesnt seem to solve the problem for me. Can i ask how you used those keywords exactly to stop the random armor parts staying? This is the method im trying at the moment. i have this bit of script in a magic effect -> If NearestPowerArmor.HasKeyword(MFrameKW) Int iButton = OptionsMESG_Armor.Show() ; Show menu If iButton == 0 Game.GetPlayer().AddKeyword(Isfitting) NearestPowerArmor.RemoveItem(M_PA_FormList, 7, true, akOtherContainer = Game.GetPlayer()) NearestPowerArmor.RemoveItem(Vanilla_PA_FormList, 7, true, akOtherContainer = Game.GetPlayer()) Game.GetPlayer().RemovePerk(fit_Armor_WorkbenchKW) ;______________________________________________________________________ ; This is where my quest script adds armor pieces to the frame ;______________________________________________________________________ ; this bit definately gets rid of random pieces showing, but after this section runs the armor added by my quest script is invisible NearestPowerArmor.DisableNoWait() NearestPowerArmor.Moveto(akCaster) NearestPowerArmor.Moveto(NearestWorkbench) NearestPowerArmor.Enable() Debug.MessageBox("test Complete") ;_______________________________________________________________________ ;i put this section in to test to see if those keywords will make the power armor pieces visible again. Utility.Wait(5) nearestPowerArmor.AddKeyword( workbenchKeyword ) nearestPowerArmor.RemoveKeyword( powerArmorFurnitureKW ) Utility.Wait(3) debug.notification("removing keywords...") nearestPowerArmor.AddKeyword( powerArmorFurnitureKW ) nearestPowerArmor.RemoveKeyword( workbenchKeyword ) ;_______________________________________________________________________ ElseIf iButton == 1 ; Cancel Debug.Notification("fit cancelled") Else Debug.Notification("fit cancelled") EndIf EndIf i then have another script in a quest that looks for power armor being added to the player invintory from the above script - and then it re adds a corisponding piece of power armor back onto the frame. Unfortunately my armor is still invisible whether or not i have the workbench keyword or powerarmorfurniture keyword on the frame at the time it gets added :/
  8. Oh, thats so strange... 0.0 So a power armor frame becomes a workbench when the player enters the actual power armor workbench menu? Then maybe by adding the workbench keyword and removing the powerarmorfurniture keyword will force the frame to update and show the actual currently equipped armor? great idea, SKK50 you are a legend! im going to try that staight away! :)
  9. Hi guys, im pretty stuck here... My power armor mod has a strange problem, when i take armor from the power armor container some of the armor stays visible on the frame even though the armor is now in my invintory and not on the frame. its also happening when previewing armor mods in the power armor workbench, im not sure why. To get around this issue i can disable the power armor furniture, move to player, move back to original location and the enable() ((this gets rid of any extra pieces of armor that stay on the frame even though theyre not in the power armor container anymore)) But now, after disabling, moving and enabling the frame again, if i add a piece of power armor to the frame by script the piece of armor stays invisible until i manually add or remove something from the container in game or until i enter the armor or until i enter the power armor workbench. Can anyone help me understand why the armor wont show on a power armor frame after it has been disabled and then enabled again? Or does anyone have an idea how i can force the frame to update when its container is changed so that there are no strange ghost armor pieces left on the frame after they are all removed?
  10. Try this mate if you specifically want max :) https://www.autodesk.com/education/free-software/3ds-max
  11. hi everyone, yet another problem with attach points... i have a mesh that i need to attach to the "chest" node on an outfit - so i made a ConnectPoint:Child for the mesh in its nif and set it to "not skinned" (the mesh doesnt have skin data) and in my outfit i made a ConnectPoint:Parent and i named the "chest" node as the parent bone, so the mesh should now attach to the parent point and follow the chest bone... but it doesnt,.. ...The mesh just floats there like it would if i didnt specify the "chest" node as the parent. stranger still... if i do the same procedure on say the power armor frame, it will work no problem, the only difference between the frame and my outfit is that the outfit has a flat hirarchy ( everything loose under 0NiNode ) and the frame has a full hirarchy (0NiNode>Root>Com>Pelvis. etc) Why is that? and is there a way around this without skinning the mesh?
  12. I have two ObjectMod Collections in ck - wheel1 and wheel2, wheel1 is set to appear by default in the power armor object template, but when i try to build wheel2 at the power armor workbench - nothing happens, the equip button greys out and the old wheel1 mod is still applied. the only way i can replace wheel1 with wheel 2 at the workbench is if i take all the OMods out of the collection leaving the collections blank... its almost as if the game is making wheel1 collection manditory, i dont know why and i dont know how to stop it. Does anyone know whats going wrong here? ((Note - both collections each have two OMods inside, and all use the same attach point, and ModAssociation keywords, just like the wiki says)) (((Details - each collection has an OMod for the power armor furniture object and another one for the power armor apparal item. the OMod for the Furniture Object has a parrent attach point with the "wheel" node specified as its parrent, and the OMod for the Apparal Item has a mesh skinned to "chest" node. i have tried variations of each OMod in each collection, but still i cant build wheel2 at the workbench)) **EDIT** It turns out that each OMod needs a CObj which is a shame because the mod then shows in the workbench menu which I didn't want - I'll have to look for another solution
  13. Is it possible to set a negative value to the SpeedMult property in an ObjectMod? I can't seem to get the player to move any slower no matter what value I put in, I've tried ADD and MULT and put in -0.900 (incase the value was between 0 and 1) but nothing happens in game, I've tried -200 and -400 but nothing happens, and I've tried -20 and -40 but still nothing happens in game.
  14. That's excellent - I've found the SpeedMult, but I didn't see the f4se GetInvintoryWeight() function ^.^ I wonder if GetInvintoryWeight() will pick up the weight of power armor when it's being worn? As far as I know - power armor is weightless when worn, but I definitely need to calculate the weight of power armor aswell.
  15. It could be a few random things really - it would be best to test your build/export procedure again in marvelous desinger with the mesh from max that you know works for sure. You could also try importing and then exporting the mesh from max instead of marvellous designer to see if it's just marvelous desinger that's the problem. So, ideas of what it could be - it could be mismatched biped slots. It could be corrupt data in the mesh (import it into outfit studio, then export as OBJ to ensure its clean) It could be that the pivot point for the mesh isn't at 0,0,0. It could be an invalid texture(?) or material path. It could be a missing attach point keyword if your outfit uses OMod Object mods. It's usually one of these issues for me if I get invisible meshes ^.^
  16. Does anyone know how to dynamically change the players run/walk speed based on how much they're carrying? Id like it so that the heavier the player is, the slower they move, but cant find anything usefull on google.
  17. Really cool idea! I think it would also be pretty cool to be able to hand her holotape over to maxson or someone to get her fired where she will travel the commonwealth looking for somewhere to settle, or put in the brig to later be freed when taking down the brotherhood ^.^
  18. Do you mean the receiver mesh goes invisible after removing the mod association? The "receiver" mesh and p-reciever attach point are essential for a gun when following the vanilla naming convention. The receiver attach point is where the gun receiver mesh attaches, the receiver mesh/entry has all the other attach points for the gun, so removing receiver will stop everything else showing properly. It might also help, if you're making a custom weapon to strip back the weapons object template so only your mods will show. If you're changing the ap attach points to new names etc then you will need the corresponding attach point keyword in the nif as well as in ck :)
  19. Well I believe Idiot savant is a constant effect spell, so as soon as it's added to the player it will be active :)
  20. Do you mean that you need to stop a category showing up in the weapons workbench menu? If so, take the (ma_) Mod Association keyword away from the Base weapon or Object Mod (OMod), that will prevent the category or mod showing up in the menu without breaking anything :)
  21. Hmm, you know it may very well be the opposite, it has been ages since I touched hairs ^.^ and because I never put hats on my character I added extra part and hairline to each hair record so that the full hair is always visible. There is subindex ids for hair, maybe that will help? - Open the hair in outfit studio and check how the vanilla style is subindexed ^.^ other than that, I'm really not sure what's going on mate sorry, it's usually just a case of dropping in a hairline mesh and then making an extra part. If none of that works, maybe there is data left in the 3D that is confusing ck, you could try exporting your mesh from outfit studio as an obj, then make a new project with a vanilla style as the reference, reimport the obj, line it up, skin it etc that should insure that there is just the mesh and no extra data, from there it would be best to make a test hairline, no extra part and see if that stays when wearing a hat and go on from there ^.^
  22. Just like DieFeM says, it would probably be best to add an objectmod to your weapon that has an explosive enchantment :) You'll need an (ap_) attach point keyword (make sure to name it, this will be the category name that shows up in the workbench) and a (ma_) mod association keyword in the weapons record (the mod association tells the game which mods can go on this weapon), then you'll need to put both of those keywords in an (OMod) ObjectMod - and to the right of the OMod window there is a field where you can add enchantments, keywords etc - this is where you specify the explosive enchantment that you want, one of the vanilla ones will probably work nicely - then make a (CObj) Constructible object for your OMod so that you can build the weapons mod at the workbench, and you're all done :)
  23. I might need correcting here, but I think hairline meshes take the hair long slot and the hair "extra" part takes the hair top slot. So, if you want to get rid of the top of the hair when a hat is worn, make it so that your hairline mesh is the model you want to show under a hat and then make your hair top to be what is seen when not wearing a hat :)
  24. Try increasing the frequency value in the nif to 2.0 or 3.0 :) the frequency dictates how many times the animation plays within a given time :) As far as I know, that should be the only value you need to change to get things moving faster
×
×
  • Create New...