Jump to content

Search the Community

Showing results for tags 'scripting'.

  1. Hello, I was trying the IsInFaction() function to check if the Alias Actor of RelationshipMarriageWedding Quest is in my Potential Wife Faction, during the wedding confirmation dialog - The PotentialWifeFaction members are Ysolda, Jenassa (HirelingJenassa), Lydia (HousecarlWhiterun) and Camilla Valerius, but the function only returns TRUE when marrying Ysolda and Jenassa - The Alias_LoveInterestNPC property is filled with the vanilla LoveInterest Alias (filled with “GetInFaction PotentialMarriageFaction” Match Condition) Does anyone have any idea why the function returns FALSE when marrying Lydia and Camilla Valerius, even if I’m sure I put them in the Faction? Scriptname MarriageScript extends Quest Faction Property PotentialWifeFaction Auto Quest Property PlayersWifeQuest Auto ReferenceAlias Property Alias_LoveInterestNPC Auto Function OnMarriage() IF Alias_LoveInterestNPC.GetActorRef().IsInFaction(PotentialWifeFaction) PlayersWifeQuest.SetStage(20) else Debug.MessageBox("The actor is not in the Potential Wife Faction") endif EndFunction
  2. Some Dialogues use different scripts for each Dialog Topic that literally do the same thing, but they are marked as Hidden Is there any problem in removing this "Hidden" and use only one script to multiple Dialogue Topics and Prompts?
  3. Greetings So, I'm practicing the use of functions to handle properties to get a better code structure (suggested in this post https://forums.nexusmods.com/topic/13494349-how-to-avoid-this-excessive-number-of-ifelseif-statements/). But i'm getting these compile errors when adding a function to an existing vanilla script: mismatched input 'Function' expecting ENDFUNCTION missing EOF at 'EndFunction'
  4. Greetings, I'm working on my first mod that add a dialogue option to the Braig question "Do you have any family? Anyone waiting for you on the outside?" in Cidhna Mine wich allows the player to mention their adopted children (if there is any adopted child) I created a script in the Son/Daughter adoption confirmation dialogue that updates some quest stages, which will be used by the Conditional Functions of the Braig question, but i don't know how to make a decent code structure to avoid this excessive number of IF's statements Quest Property RelationshipAdoption Auto Quest Property OnlyDaughtersQuestProperty Auto Quest Property OnlySonsQuestProperty Auto Quest Property SameAmountQuestProperty Auto Quest Property MoreDaughtersQuestProperty Auto Quest Property MoreSonsQuestProperty Auto GlobalVariable Property DaughtersVariableProperty Auto GlobalVariable Property SonsVariableProperty Auto ; updates the number of daughters when completing an adoption int DaughtersCount = DaughtersVariableProperty.GetValueInt() DaughtersVariableProperty.SetValueInt(DaughtersCount + 1) ; returns the number of daughters to be used by the conditions int DaughtersCount2 = DaughtersVariableProperty.GetValueInt() ; returns the number of sons to be used by the conditions int SonsCount = SonsVariableProperty.GetValueInt() ; invalidates the ONLY SONS quest when adopting a daughter OnlySonsQuestProperty.SetStage(100) ; ONLY DAUGHTERS conditions if DaughtersCount2 == 1 OnlyDaughtersQuestProperty.SetStage(10) Elseif DaughtersCount2 == 2 OnlyDaughtersQuestProperty.SetStage(20) Elseif DaughtersCount2 == 3 OnlyDaughtersQuestProperty.SetStage(30) Elseif DaughtersCount2 == 4 OnlyDaughtersQuestProperty.SetStage(40) Elseif DaughtersCount2 == 5 OnlyDaughtersQuestProperty.SetStage(50) Elseif DaughtersCount2 == 6 OnlyDaughtersQuestProperty.SetStage(60) endif ; SAME AMOUNT of sons and daughters conditions While (DaughtersCount2 == SonsCount) if DaughtersCount2 == 1 SameAmountQuestProperty.SetStage(11) Elseif DaughtersCount2 == 2 SameAmountQuestProperty.SetStage(22) MoreSonsQuestProperty.SetStage(22) MoreDaughtersQuestProperty.SetStage(22) Elseif DaughtersCount2 == 3 SameAmountQuestProperty.SetStage(33) MoreSonsQuestProperty.SetStage(33) MoreDaughtersQuestProperty.SetStage(33) endif EndWhile ; MORE DAUGHTERS than sons conditions if (DaughtersCount2 == 2) && (SonsCount == 1) MoreDaughtersQuestProperty.SetStage(21) SameAmountQuestProperty.SetStage(15) MoreSonsQuestProperty.SetStage(12) ElseIf (DaughtersCount2 == 3) && (SonsCount == 1) MoreDaughtersQuestProperty.SetStage(31) MoreSonsQuestProperty.SetStage(13) ElseIf (DaughtersCount2 == 3) && (SonsCount == 2) MoreDaughtersQuestProperty.SetStage(32) SameAmountQuestProperty.SetStage(25) MoreSonsQuestProperty.SetStage(23) ElseIf (DaughtersCount2 == 4) && (SonsCount == 1) MoreDaughtersQuestProperty.SetStage(41) MoreSonsQuestProperty.SetStage(14) ElseIf (DaughtersCount2 == 4) && (SonsCount == 2) MoreDaughtersQuestProperty.SetStage(42) MoreSonsQuestProperty.SetStage(24) ElseIf (DaughtersCount2 == 5) && (SonsCount == 1) MoreDaughtersQuestProperty.SetStage(51) MoreSonsQuestProperty.SetStage(15) endif ; MORE SONS conditions if (SonsCount == 2) && (DaughtersCount2 == 1) MoreSonsQuestProperty.SetStage(21) SameAmountQuestProperty.SetStage(15) MoreDaughtersQuestProperty.SetStage(12) Elseif (SonsCount == 3) && (DaughtersCount2 == 1) MoreSonsQuestProperty.SetStage(31) MoreDaughtersQuestProperty.SetStage(13) ElseIf (SonsCount == 3) && (DaughtersCount2 == 2) MoreSonsQuestProperty.SetStage(32) SameAmountQuestProperty.SetStage(25) MoreDaughtersQuestProperty.SetStage(23) ElseIf (SonsCount == 4) && (DaughtersCount2 == 1) MoreSonsQuestProperty.SetStage(41) MoreDaughtersQuestProperty.SetStage(14) ElseIf (SonsCount == 4) && (DaughtersCount2 == 2) MoreSonsQuestProperty.SetStage(42) MoreDaughtersQuestProperty.SetStage(24) ElseIf (SonsCount == 5) && (DaughtersCount2 == 1) MoreSonsQuestProperty.SetStage(51) MoreDaughtersQuestProperty.SetStage(15) endif
  5. I'm trying to adjust a script me and another person were working on that isn't working. It saved, but it won't activate. Essentially it's suppose to give you a spell at a set level for my race. Maybe some fresh eyes can see what's wrong? Scriptname AAFahrnymphGiveSpellScript extends Quest Spell Property AAConjureWolfIllusion Auto quest property LevelUpQuest Auto Race property AAFahrnymphRace Auto Event OnStoryIncreaseLevel (int aiNewLevel) if (aiNewLevel >=10) endif Debug.notification("AAFahrnymphGiveSpellScript has detected the player has leveled up to level: "+aiNewLevel + "!") if (Game.Getplayer().GetRace() == AAFahrnymphRace) if(aiNewLevel >=10 && !Game.GetPlayer().HasSpell(AAConjureWolfIllusion)) Game.GetPlayer().AddSpell(AAConjureWolfIllusion) endif endif LevelUpQuest.stop() endevent
  6. Hi Nexus moderators, I have an idea about putting up an online papyrus compiler which would allow users to upload a script (.psc file) and the compiler would compile their script for them and then return it to them via a download link. The idea is similar to uploading a Word document to be converted to other formats like PDF. I think this would help a lot of users who can do simple scripting but have trouble getting the papyrus compiler to work (I certainly struggled with it). At this point the idea is just conceptual, I haven't done any development yet because I was concerned about the legality of it. A couple issues that need to be considered: 1. Many scripts require other scripts from the same mod to compile correctly. 2. Some scripts require SDK or offline scripts to compile correctly (e.g. the SkyUI SDK scripts, Honed Metal scripts, Chesko's Papyrus shared scripts, Immersive Armors scripts). Would it be legal to host those supporting scripts offsite (behind the scenes) to allow the compiler to work? And finally, I've made a lot of personal changes to scripts for my own play-through. The permissions on many of the mod pages don't allow me to distribute the changes, but if I could offer that change via an online compiler that would be cool. For example, SkyTweak doesn't allow its mod to be converted or changed, so there are YouTube videos showing how to do it yourself. I've gone beyond that by changing SkyTweak into a read-only tool that gives me all my game info but doesn't make any changes to my game. I achieved that by a simple find/replace of text in the main MCM script. But of course I can't distribute that changed script. But if an online compiler could perform that change for individual users it should be pretty easy to implement. Anyway, I would appreciate your thoughts about all this. Thanks so much for the work you all do on the Nexus.
  7. I've been working on a mod for a while now, trying to get back into understanding coding by working through Papyrus and modifying scripts. One of the issues that I have come across is within my OnSpellCast Event, as I am not too sure how I should go about detecting whether or not the caster is using a concentration spell. I'll drop the source down below: Scriptname MAS_PerkCastingFever_StacksCalc extends ActiveMagicEffect {How the perk "Casting Fever"'s stacks are calculated.} import Spell import PO3_SKSEFunctions ; Scripts that have been imported. SKSE and PO3 Extender required. GlobalVariable Property MAS_PerkCastingFever_Stacks Auto ; Actual stacks that determine the overall Magicka-reduction. Int iStackTime = 4 ; iStackTime is duration. ;------------------------------------------------------------------------------------------------ Event OnEffectStart (Actor akTarget, Actor akCaster) MAS_PerkCastingFever_Stacks.Value = 0 EndEvent ; When effect starts, stacks reset back down to zero. Event OnEffectFinish (Actor akTarget, Actor akCaster) MAS_PerkCastingFever_Stacks.Value = 0 debug.Notification("Casting Fever Stack: " + MAS_PerkCastingFever_Stacks.Value) EndEvent ; When effect ends, stacks reset back down to zero. ;------------------------------------------------------------------------------------ Event OnSpellCast (Form akSpell) If (akSpell as Spell) Spell castedSpell = akSpell as Spell If (castedSpell.GetNthEffectMagicEffect(0).GetAssociatedSkill() == "Destruction") If (MAS_PerkCastingFever_Stacks.Value < 5) ; Does not increase stacks beyond 5. ;BOTCHED CODE If (IsCasting(akSpell) == true) While IsCasting(castedSpell) == true MAS_PerkCastingFever_Stacks.Value += 1 debug.Notification("Casting Fever Stack: " + MAS_PerkCastingFever_Stacks.Value) registerForSingleUpdate(iStackTime) EndWhile Else ;BOTCHED CODE MAS_PerkCastingFever_Stacks.Value += 1 debug.Notification("Casting Fever Stack: " + MAS_PerkCastingFever_Stacks.Value) registerForSingleUpdate(iStackTime) EndIf EndIf Else MAS_PerkCastingFever_Stacks.Value = 0 debug.Notification("Casting Fever Stack: " + MAS_PerkCastingFever_Stacks.Value) EndIf EndIf EndEvent ; Whenever a casted Spell's first Magic Effect is from the Destruction school, the effect activates. It deactivates if it is from a different school. ; Next, if the Global Variable's value is lesser than 5, the stack is increased. The timer is also refreshed/triggered. ;-------------------------------------------------------------------------------------------------------- Event OnUpdate() MAS_PerkCastingFever_Stacks.Value = 0 debug.Notification("Casting Fever Stack: " + MAS_PerkCastingFever_Stacks.Value) EndEvent ;------------------------------------------------------------------------------------------------------------- Besides the code inbetween ;BOTCHED CODE, everything else stacks as it should based off of every first initial cast. However, concentration spells only trigger the OnSpellCast Event once, which is normal but not wanted. How would I be able to achieve the while loop I am aiming for within an OnSpellCast, and if it cannot be achieved within the event, what would?
  8. So I finally decided to start working on a mod idea I've had floating around in my head for years. The idea is basically my Deranged Courier mod, except instead of just ambient sounds playing randomly across the wasteland, it'll be voices in the courier's head that'll get more intense as the game progresses. It's basically a mental health system, where certain actions and events will affect the sanity of the player character, both negatively and positively. As your sanity gets worse, the voices get more frequent and aggressive. I came up with a basic outline of how the mod could theoretically work and I'm pretty sure it's doable, I just don't have the knowledge needed to write the scripts for it. Anyway, I was thinking I'd create a new ActorValue (or maybe global variable?) that would keep track of the player's current sanity level (represented by a number) and the higher the value, the worse the player's insanity is. The "voices" and their intensity would be determined by this value, meaning there would need to be a script that would check the player's sanity level and then play the corrent sound file. I want to have voices/sounds that would just play at random while traversing the wasteland (similair to Deranged Courier, except played through a script instead of the vanilla ambient sound system), but I also want voices/sounds that would play in specific moments and scenarios, like during combat or when leaving Doc Mitchell's house for example. And as for things that would actually determine the sanity value, I was thinking it would be karma, sleep depravity and player level. The idea being that bad karma results in degrading sanity because it can be assumed that you've done some terrible things to get that bad karma, sleep depravity should be obvious, and higher player level results in degrading sanity because the courier has seen some s#*&#33; when they near the end of the game. So that's the idea. All I need is someone that would help me write the scripts for this thing. Not even necessarily write the whole thing, I think I could maybe handle it myself with just some pointers and advice.
  9. New to modding (and specifically scripting!) and I'm currently trying to make a follower mod. I'd like to have approval/disapproval points using global variables, but I don't know how to add and subtract the value only how to set it to a specific value. What I'd like is 0-100 value and then certain choices would add or subtract points to the value. So for example if my GlobalVariable ID is Follower_Approval and I want it to add 5 to the already existing value, how would I go about this? Or is there another way to make an approval system work in an easier way?
  10. I'm attempting to use Configurable Hotkeys to use the included batch files to create a grenade cycle function similar to the kind found in Project Nevada for FNV. However, I can't find any reference of a script or console command that I could put into the .bat that would allow me to do that. Can anyone help me find the command/script (I'm not sure which I need, I'm not that experienced when it comes to modding) I need to call to create my own grenade cycle function? I've tried using Grenade Cycle Function, but it doesn't work with Configurable Hotkeys and is instead intended to be used with FO4 Hotkeys. I would just uninstall Configurable Hotkeys and use FO4 Hotkeys, except I'm almost 100 hours into my current save and I'd rather not uninstall for fear of breaking my save and I'd also rather not start a new save. This is a problem that has been bugging me for weeks now and I've been unable to solve it on my own. Any help would be greatly appreciated!
  11. Greetings. I recently have some ideas for a survival mod, but I am just pondering on possible time errors caused by frame-bounded functions inside recycling time functions and events. For example: Event OnTimerGameTime() BatchFunction_001() StartTimerGameTime(x, 0) End Event BatchFunction_001 contains some frame-bounded functions like GetActorValue() and GetLocation(). Will this structure beget accumulated minor time errors?
  12. The basic idea is: When you craft 3 x Dirty Water into 1 x Purified Water, I want the script to add to inventory 2 x Empty Bottles. I've found a pretty similar idea elsewhere on this forum, but the thread is over four years old, and it didn't have the resulting copy/paste code I was hoping for. If anyone can help me with this, I'd definitely be grateful. This is what I have been able to piece together so far from that thread, but it's not working. It's my very first time trying to script anything, and it's really the only thing I want to script (so far). Kind of hampering my enjoying of survival mode a bit, because it gets harder to find empty bottles. Every 1 bottle of purified water I craft/drink, that's 3 bottles gone. I guess I smash two bottles to make it, and smash the last bottle on the ground like Thor in the Diner. New ESP // New FormList with WaterPurified and BottleEmpty02 // New Quest with Start Game Enabled // New Quest Alias with Unique Actor: Player // New Script Scriptname BottlesBackMKS extends ReferenceAlias FormList Property BottlesBackList Auto Const Mandatory Potion Property WaterPurified Auto Const Mandatory MiscObject Property BottleEmpty02 Auto Const Mandatory Event OnAliasInit() RegisterForMenuOpenCloseEvent("CookingMenu") EndEvent Event OnMenuOpenCloseEvent(string asMenuName, bool abOpening) If (abOpening == TRUE) Self.AddInventoryEventFilter(BottlesBackList) ElseIf (abOpening == FALSE) Self.RemoveInventoryEventFilter(BottlesBackList) Endif EndEvent Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) If (akBaseItem == WaterPurified) Game.GetPlayer().AddItem(BottleEmpty02, 1, true) Endif EndEvent Pieced together from this thread https://forums.nexusmods.com/topic/7590877-help-item-added-after-crafting-script/ I've tried to adapt it the best I could, but idunno. It compiles just fine, but it doesn't seem to do anything.
  13. I've been working on a comprehensive guide to FNV scripting. It's meant to take people from the very, very basics up to intermediate level. Ie: everything not in the NVSE tuts. I have to put it on hold a while. In the mean time, everybody should feel free to share their thoughts and additions; it's not as if I'm the only one who knows stuff. Try to be in 'suggesting mode' if you edit the main text, otherwise use the comment system. I could especially use some input on a troublehooting chapter, near the end. It's a raw copy-paste, so the layout's not all that, but hey... https://docs.google.com/document/d/1CAI9XPfbRochTzD9m26M5VgCLEdmejXjJvRF0mds_QQ/edit?usp=sharing
  14. Hello, so I'm getting back into modding for the first time in.. like 10 or 11 years. I'm 22. Yeah. So I'm having a very dumb issue, on my first very rough script (designed to generate targets for wander packages at a set distance from the spawn point in each cardinal direction).. It doesn't seem to recognize ObjectReference as a class, or perhaps it's rejecting me setting up an array of them, I'm unsure. lemme posts the codes: Scriptname zzzDPDrifterManagementSystem {The system in charge of spawning and assigning drifters to locations, aswell as acting as a liason for the existing colony management system} GlobalVariable MaximumDrifters; int ScavengeDistance = 4056; ObjectReference SpawnPoint; Static Spawners; ObjectReference[] ScavengePoints = new ObjectReference[4]; ObjectReference[] GuardPoints = new ObjectReference[12]; Actor[] ActorArray = new Actor[MaximumDrifters]; bool initialized = false; Event OnActivate(ObjectReference akActionRef) if akActionRef == Game.GetPlayer() if initialized == false int tick = 0; while (tick < 4) int x = 0; int y = 0; if tick == 0 x = 1; y = 1; endif if tick == 1 x = 1; y = -1; endif if tick == 2 x = -1; y = -1; endif if tick ==3 x = -1; y = 1; endif ScavengePoints[tick] = spawnpoint.placeatme(Spawners); ScavengePoints[tick].MoveTo(SpawnPoint, Spawnpoint.GetPositionX() + (ScavengeDistance*x), SpawnPoint.GetPositionY() + (ScavengeDistance*y)); Game.GetPlayer().MoveTo(SpawnPoint, Spawnpoint.GetPositionX() + (ScavengeDistance*x), SpawnPoint.GetPositionY() + (ScavengeDistance*y)); Utility.Wait(6.0) tick++; endwhile Game.GetPlayer().MoveTo(SpawnPoint); Debug.MessageBox("Cardinal Scavenge Points Configured at distance "+"ScavengeDistance"); initialized = true; endif endif EndEvent and the errors: Compiling "zzzDPDrifterManagementSystem.psc"... E:\Games\steamapps\common\Fallout 4\Data\Scripts\Source\User\zzzDPDrifterManagementSystem.psc(10,35): no viable alternative at input 'new' E:\Games\steamapps\common\Fallout 4\Data\Scripts\Source\User\zzzDPDrifterManagementSystem.psc(10,54): required (...)+ loop did not match anything at input '[' E:\Games\steamapps\common\Fallout 4\Data\Scripts\Source\User\zzzDPDrifterManagementSystem.psc(10,18): Unknown user flag objectreference No output generated for zzzDPDrifterManagementSystem.psc, compilation failed. While I'm at it, is there a resource for a definition of functions library to add autocomplete to notepad++? The.. often very unhelpful wiki only has such for skyrim. Pardon if my terminology is off, I'm basically just an idiot who passed a basic java course years ago and am going off that for experience. Edit: Please ignore the functions moving the player, that is just me screwing around with it for debugging purposes and to get a more visual sense of the distances involved.
  15. I'm working on a mod that adds an NPC with some custom dialogue. The idea is that he confronts the player (which will be handled by a ForceGreet package), and will ask a series of questions. If the player quits the dialogue with him, he will attack while saying something like "how dare you ignore me!" I haven't been able to find a way to make him attack upon the player quitting the conversation, but I'm sure it's possible. Thanks in advance for any input. EDIT: Figured it out. I should have looked into it for a few more minutes before posting, but ah well. For those who might be wondering, it's accomplished through the "Walk Away" and "Walk Away Invisible" check boxes. The CK Wiki can explain the process more but it's pretty easy.
  16. If you've bought the new breeds of dogs or just taken the free offers on Creation Club, you might have noted the... sparsity of the pooches. I refer to e) LOOKUP FAILED! and r) LOOKUP FAILED! as the options for the adoption are there, but there's no frigging text. Simply put, they need fleshing out if this is happening to more people than me. Remember. Dogs are not named LOOKUP FAILED! as a rule.
  17. Hello, So I like some of the mods out there where you can trade in dragon souls for powerups or perk points, but I thought it would be interesting to do a mod where you gain power (for now let's assume that means health, magicka, stamina, unarmed damage, and power mods on each magic school) based on the number of dragon souls you possess. This way there is a tradeoff during the early - mid game where you are learning shouts, but as you approach the late game you steadily increase in power. I have been having trouble with the best implementation of such a mod though. I thought perk entry points would be my solution, since you can use number of dragon souls as multiplier for various things, however the only ones that would be remotely of interest to me were attack damage and armor rating. The others (health, magickca, etc.) aren't options for perk entry points. The remaining options I can think of are 1) Script the effect I want or 2) create a bunch of magic effects (one for every number of dragon souls I want to do) and apply them using a quest. I feel like the script would give me more the behavior I want, but I'm worried about a script constantly running and checking the number of dragon souls a player has and am not sure the best place to have the script (Perk?) A quest seems like it would work but I'll have to create a lot of magic effects unless I can apply the same magic effect over and over and have it stack (is that possible?). Is there a simpler or better method out there that I'm missing? Am I reinventing the wheel here? Any tips or advice would be greatly appreciated. Thanks!
  18. Has anyone ever had issues with OnPackageStart(), OnPackageEnd() or OnPackageChange() events? For some reason none of these events are ever called in my script. To check that Actor events are properly fired I've added OnCommandModeGiveCommand(), which works without a problem. In addition, I added a timer to poll the information about the current actor's package, to see that packages do change. Here are the relevant parts of the code: Scriptname SomeNamespace:TestScript extends ActiveMagicEffect Actor MySelf int iTestTimerID = 100 Event OnEffectStart(Actor akTarget, Actor akCaster) MySelf = akTarget StartTimer(2, iTestTimerID) EndEvent Event OnPackageChange(Package akOldPackage) Debug.Trace("********* Package changed") EndEvent Event OnPackageStart(Package akNewPackage) Debug.Trace("********* Package started") EndEvent Event OnPackageEnd(Package akOldPackage) Debug.Trace("********* Package ended") EndEvent Event OnCommandModeGiveCommand(int aeCommandType, ObjectReference akTarget) Debug.Trace("******* OnCommandModeGiveCommand event fired. aeCommandType = " + aeCommandType + " akTarget = " + akTarget) EndEvent Event OnTimer(int aiTimerID) If aiTimerID == iTestTimerID Debug.Trace("******* Current package: " + MySelf.GetCurrentPackage()) StartTimer(2, iTestTimerID) EndIf EndEvent The log that was produced: [07/03/2018 - 03:59:42PM] ******* Current package: [Package < (0002A101)>] [07/03/2018 - 03:59:44PM] ******* Current package: [Package < (0002A101)>] [07/03/2018 - 03:59:44PM] ******* OnCommandModeGiveCommand event fired. aeCommandType = 3 akTarget = None [07/03/2018 - 03:59:46PM] ******* Current package: [Package < (0002A101)>] [07/03/2018 - 03:59:46PM] ******* OnCommandModeGiveCommand event fired. aeCommandType = 3 akTarget = [ObjectReference < (FF004CA5)>] [07/03/2018 - 03:59:48PM] ******* Current package: [Package < (000D153A)>] [07/03/2018 - 03:59:50PM] ******* Current package: [Package < (000D153A)>] [07/03/2018 - 03:59:52PM] ******* Current package: [Package < (000D153A)>] Does anyone know or have any thoughts what the problem could be?
  19. Hey folks, Firstly, thanks for giving this a look. I've got a mod I'd like to make that I think is both useful and hilarious; Basically any non-robotic enemy that dies sh*ts itself, playing a nice fart-y sound and adding 1 fertilizer to their inventory. The idea being that you can take that and feed it into the Contraptions ammo plant and make yourself more bullets or explosives. Combined with a few popular mods that let you break down unwanted calibers of bullets for lead and copper, you can start filling up your favorite gun with bullets made of raider poop. Probably name it something tame like 'Bullets to Fertilizer" because I can't really put swears in the title as far as I know. Anyhow, the crux of the matter is this: for a first time modder, the task of just finding what it is you need to learn to do the mod is daunting. "You don't even know what you don't know" and all that. There's a whole lot of documentation out there, which is great, but has also been leading me on wild goose chases following wikis that turn out to have nothing to do with what I need. So I was hoping someone or someone(s) can look at what I'd need to do in order to get this mod working and kinda say: "Okay fella, you're gonna need to know X, Y and Z to pull this off". Not looking for a handout as I'd like to do the research by myself to learn, but some directions to where I'm going would be grand. Maybe a heads up or two if there's landmines en route. As far as I can figure, the way I'd do this mod would be to do a small script that plays a sound on NPC death and does an 'additem' to their inventory for 1 fertilizer. Seems kinda simple, though right away I know I'm going to have to find some way to vary the volume of the sound by how far away the player is, and find a way to exclude robotic NPCs from the sh*t list. Plus I don't know if there's a way to tie a script on just a generic death, since a lot of the on-death effects that I know seem to be keyed off of a weapon. Sooooo.... yeah. If this were you, where would you start?
  20. Hey :) So after creating custom dialogue for my vampire follower, I'm playing around with scripting now. I'm completely new to Papyrus and only did some very basic dialogue scripts, like changing Armor and so on. What I want to achieve is a script at the end of a dialogue response that makes my vampire follower to feast on dead corpses around him. I thought of using the command StartCannibal , however I have no Idea how to make it work. Can anyone help me with that? Thanks in advance!
  21. Hello fellow moders, I'm trying to add bloodskal-like effect on a greatsword I use . However my skills at modding is limited so i keep searching for tips and tutorials for it. It seems it needs some scripts to bind magic effect/spell to greatsword's heavy attacks. Does anyone can help me to create that script and organize the steps i should take? ps: I know Imbued Weapons Mod exists and I can use it but, i just want to make it unique only to that custom sword. Edit: I used two scripts . Excuse my poor scripts This one for binding it to mysword Scriptname MySwordScript extends ObjectReference Spell Property EnergyWaveSpell auto Event OnEquipped(Actor akActor) akActor.AddSpell(EnergyWaveSpell) EndEvent Event OnUnEquipped(Actor akActor) akActor.RemoveSpell(EnergyWaveSpell) EndEvent This one for casting on animation Scriptname EnergyWaveScript extends activemagiceffect Spell Property EnergyWaveSpellHoriz auto Spell Property EnergyWaveSpellVert auto Actor SelfRef Event OnEffectStart(Actor akTarget, Actor akCaster) SelfRef = akCaster registerForAnimationEvent(SelfRef, "AttackPowerStanding_FXstart") registerForAnimationEvent(SelfRef, "AttackPowerRight_FXstart") registerForAnimationEvent(SelfRef, "AttackPowerLeft_FXstart") registerForAnimationEvent(SelfRef, "AttackPowerBackward_FXstart") registerForAnimationEvent(SelfRef, "AttackPowerForward_FXstart") endEvent Event OnEffectFinish(Actor akTarget, Actor akCaster) ENDEVENT Event OnAnimationEvent(ObjectReference akSource, string EventName) if (eventName == "AttackPowerRight_FXstart") || (eventName == "AttackPowerLeft_FXstart") || (eventName == "AttackPowerBackward_FXstart") EnergyWaveSpellHoriz.cast(SelfRef) elseif (eventName == "AttackPowerStanding_FXstart") || (eventName == "AttackPowerForward_FXstart") EnergyWaveSpellVert.cast(SelfRef) endif endEVENT
  22. I'm making a spell to "animate" objects like swords. I have it so it gives a perk that allows the player to select a weapon and "animate it". It places an invisible npc that needs to be given the weapon it was placed at. Therfore I need it's actor reference. Since you can't use Actor animatedObject = akTargetRef.PlaceActorAtMe("the actor I'm placing") in skyrim's papyrus what sould I do?
  23. I have looked all over the internet and i've come up empty so it's time to ask the community! :smile: I have a mod i was creating some time ago, i have since changed my computer and wanted to work on it again, however, a lot of my scripts for terminals, quests show failed to load code fragment. I've double checked everything i can think of, all the .ini files (invalidate etc. etc.) and it all seems correct, and it is finding some of the of the scripts, but not all. I tried recreating by copying the code from the fragments, deleting the fragment from the editor and then pasting in the line from the .psc and it won't compile either, unable to find store class. I'm entirely out of ideas, any help greatly appreciated, thank you. EDIT: When trying to fully recreate the script from scratch it's actually the properties that disappear and thus makes the compile fail and I can't find a way to re-add them without touching the script. Can I create a new script by adding the properties first? i can't seem to get the form list to work at all. Harry Luck.
  24. My friend and I are trying to get our quest to work correctly, we're still novices but we've gotten some things to work. However, we're trying to make a trigger box work but for some reason we're completely stuck in our tracks. We're super open to having an extra partner in our mod development. Thanks for your time! <3
  25. I'm trying to create a perk that boosts the player's Science, Repair, and Survival skills while in the crafting menus. For starters, I created an ability that simply provides +10 to each skill. Then I went into CraftingWorkbenchRecipesScript, CraftingReloadingBenchRecipesScript, and CraftingCampfireRecipesScript and added the following lines right below "Begin OnActivate": --------------------------------------------------- If Player.HasPerk NewPerk == 1 If Player.IsSpellTargetAlt NewAbility == 0 Player.AddSpellNS NewAbility Endif Endif ---------------------------------------------------- This succeeds in giving the player a bonus to those skills. The problem I've had is trying to remove the bonus once the player leaves the crafting menu. I created a new script with the following: ---------------------------------------------- Begin GameMode If Player.IsSpellTargetAlt NewAbility == 1 Player.Dispel NewAbility Endif End ----------------------------------------------- This script apparently doesn't do anything, as the skill bonuses remain long after I've left the menu. I tried attaching a duration to the skill bonuses in the new ability. I thought back to Morrowind, and figured that time wouldn't pass in a menu, but if the bonuses only last 1 second, then they should simply expire 1 second after normal gameplay resumes. For whatever reason though, the bonuses just didn't expire. I tried attaching the condition "MenuMode 1077 == 1" to the bonuses in the ability, however it seems MenuMode just doesn't work as a conditional function.
×
×
  • Create New...