Search the Community
Showing results for tags 'script'.
-
Hello guys. For the past 2 weeks I have been trying to figure out why none of the scripts I create are firing when launching the game. End goal is to create a script that can add perks to npcs, mostly temporary ones with FF Ref IDs. Tried to use SPID and NMM but neither worked. I went to chatgpt for some assistance and that just made everything more complicated but luckily I learned of some scripts that can simply send notifications. In the end though, none of them worked. Please see attached txt file for all the scripts I tested. Would love if someone could help me figure out why they don't work. Script experiments.txt
- 7 replies
-
- creation kit help
- script
-
(and 1 more)
Tagged with:
-
I am making a custom follower mod, currently working on a system where certain dialogue will increase a global variable representing a relationship level. I have gotten the script to compile just fine but it seems to have no effect in game. Here is the code: Scriptname ZA_1_RelationshipIncrease extends TopicInfo GlobalVariable Property ZA_1_ZahrumosRelationshipValue Auto Float Property Points = 1 Auto Float Points = 1.0 ; The amount to add ; Function to add points to the global variable Function SetValue() If ZA_1_ZahrumosRelationshipValue.GetValue() <= 100 ; caps relationship level to 100 Float CurrentValue = ZA_1_ZahrumosRelationshipValue.GetValue() ZA_1_ZahrumosRelationshipValue.SetValue(CurrentValue + Points) EndIf EndFunction I have tested it after talking to my NPC to get it to say the special dialogue by typing "help ZA_1_ZahrumosRelationshipValue 3" but it always returns zero, meaning it's not changing. I have also added the script to the papyrus fragment at the end of the dialogue instead of the normal script box. and it refuses to compile as a fragment. Any help is appreciated!
-
: I'll do the best to be straight and clear about this matter to avoid confusion. I've been for a long time trying to figure out a method to put a destroyed object to respawn again and reset to their original state when the dungeons resets after the 30 in-game days on Skyrim so they can be destroyed again. Many people probably are familiar with the spider webs that need to cut and the barricades seen during the Civil War that can be destroyed as well. I'm working on custom objects that follows the same principles of the Spider Webs and the Barricades, but, once they are destroyed, nothing else can be done. The "Respawn" option, even marked when double-clicking on a placed object in the Cell View window, seems to not work. I tried to use some vanilla scripts such as DefaultEnableOnReset <- (Script that self enables/disables an object when a cell reset). I tried triggers and some other small scripts by my own and even experimenting other options on the "Destruction Data" tool in Creation Kit. I tried to find a guide or topic that could explain anything about the respawn matter of an object once destroyed but I ended in empty hands. Basically what I'm trying to do is something similar as the well known Castlevania's torches, once the player destroy the torches, as soon as they leave the room and reenter the torches respawn. Or something similar to The Legend Of Zelda's breakable jars and pots. In my case I need them to respawn to a puzzle I'm working on. Everything else in the puzzle respawn correctly except the destroyed objects, which in turn breaks the puzzle in the end. I also recently noticed that even the Vanilla Barricades and the Spider Webs don't respawn after the 30 in-game days... or I might be wrong, and the case of the Barricades, the animated placed model upon the barricade's destruction, stays there forever and is not "cleaned" by the game. I'm not a papyrus expert and I have little knowledge in scripting to help this case. I've been looking for this subject almost a year basically ending with the same results and finally I gave up insisting on doing something about it by my own. I wish to know if someone has better knowledge about a method to make a destroyed object respawn or if there's already a topic talking about this matter or if there's another alternative through scripts, or, if I'm doing everything wrong. Note: I'm trying to avoid having to create Quests to handle this issue as this mod I pretend to make it Quest Free. Any advice is appreciated ;3
- 6 replies
-
- creation kit
- destructible
- (and 6 more)
-
Hello everyone. I recently uploaded my latest mod Great Khans Minor Expansion, found here: https://www.nexusmods.com/newvegas/mods/94114 However, I CAN NOT for the life of me get the quest journal to update properly. There is a quest in the mod where the player is tasked with gathering 10 pieces of scrap metal, 2 sensor modules, and a Vacuum cleaner. Once all the materials are gathered you're to give them to the NPC whom promptly takes them from you and you're rewarded with a fresh rads free water pump in Red Rock Canyon, some XP, and some fame for both the Great Khans and Followers of the Apocalypse. The starting of the quest works. The dialogue with the NPC works at every point. The NPC will see you have the items. He will take said items. The fame and XP will successfully be given and applied AND the quest will be completed But the journal will NOT update when you get the materials and additionally I've been informed that the journal will not update when the quest is complete either. Would someone be willing to look at my mod in the GECK and please tell me what I'm missing/doing wrong? I've tried adding conditions and scripts to the proper quest stage. I've tried adding scripts to the quest itself. Nothing I try seems to work.
-
Hello, It's all in the title. Because I've already tried several things. Either I add a modified version of the “Concentrated Poison” perk directly via a weapon using a script. Problem: This requires having duplicate weapons between normal weapons and “toxic” ones to simplify things. Or I create an enchantment/magic effect that links to a spell that gives a magic effect that adds the modified “Concentrated Poison” perk. Problem: The perk is global to the player, so if the player uses two weapons, it applies to both (hands) and not just the weapon with the enchantment. So my question is, is this possible in the first place? Just increase the number of charges of poison applied to my enchanted weapon as I see fit. Thank you for your answers.
-
- enchantment
- enchanting
-
(and 3 more)
Tagged with:
-
This aylied model was missing a collision mesh, 'arrdoor01ext.nif'. So, I used nifscope dev9 to add it using add collision mesh, '0.1 and 0.01'. My mod uses a script to move this nif door up, using script translate. On activate, the model moves, but not the collision mesh. The doorway is still blocked. Arcane University - Mesh Collisions, followed this tutorial I've tried using the io_niffy addon to blender 'v4.2'. Created a moving up animation 1->5 +100z. Export click on animation. NIF file has no animations. need help... been at this for about a month ardoor01extcm.nif
-
I have a spell doing 1 rad damage, and I apply it every second, but despite being applied multiple times, nothing changes. Can I just increase the magnitude and apply it all at once? The controls for it are in a quest Scriptname permRadiationFunctionScript extends Quest int Property radiationAmount = 1 Auto SPELL Property radiationSpell Auto Const Function StartRadiationEffect() Debug.Notification("Starting radiation effect with amount: " + radiationAmount) if (radiationAmount <= 0) Debug.Notification("Invalid radiation amount. Must be greater than 0.") return endif ; Set up a timer to apply radiation effect every second if ((Self as Quest).GetStage() == 20) ; Assuming stage 20 is the initial state StartTimer(1, 0) ; Start the timer to apply radiation effect every second StartTimerGameTime(24, 0) ; Start a game time timer to double radiation amount every 24 hours Debug.Notification("Radiation effect started.") (Self as Quest).SetStage(10) endif EndFunction Function WentToStage() Debug.Notification("Went To Stage 10") EndFunction Function ApplyRadiationEffect() Actor player = Game.GetPlayer() Debug.Notification("applying a radiation effect") if (radiationSpell && player) int i = 0 While(i < radiationAmount) player.AddSpell(radiationSpell, false) ; Apply the radiation spell to the player Debug.Notification("Applying radiation spell: " + radiationSpell + " i = " + i + " radiationAmount = " + radiationAmount) i = i + 1 EndWhile Debug.Notification("Radiation effect applied. Current radiation amount: " + radiationAmount) ElseIf (player == None) Debug.Notification("Player not found.") ElseIf (radiationSpell == None) Debug.Notification("Radiation spell not set.") endif EndFunction Function doubleradiationamount() if (radiationAmount >= 10000) Debug.Notification("Radiation amount cannot be doubled further.") return endif radiationAmount *= 2 Debug.Notification("Radiation amount doubled. New amount: " + radiationAmount) (Self as Quest).SetStage(10) EndFunction Function halveradiationamount() if (radiationAmount <= 1) Debug.Notification("Radiation amount cannot be halved further.") return endif radiationAmount /= 2 Debug.Notification("Radiation amount halved. New amount: " + radiationAmount) (Self as Quest).SetStage(10) EndFunction Event OnTimer(int timerID) if (timerID == 0) ; Assuming 0 is the ID for the radiation effect timer ApplyRadiationEffect() StartTimer(1, 0) ; Restart the timer for continuous effect endif EndEvent Event OnTimerGameTime(int timerID) if (timerID == 0) ; Assuming 0 is the ID for the radiation effect timer doubleradiationamount() Debug.Notification("YOUR RADIATION LEVEL HAS DOUBLED") StartTimerGameTime(24, 0) ; Restart the timer for continuous effect endif EndEvent
-
;Failed to load code for fragment Fragment_Stage_0030_Item_00 That's the message i'm getting, and whenever i try to compile previously successful script from other stages, it fails as well . It says something like The following fragments failed validation (most likely missing from script source file): Fragment_Stage_0030_Item_00 even if i'm compiling from stage 10 or 20. any idea?
- 5 replies
-
- error
- creation kit
- (and 6 more)
-
So on the discussions forum i asked if there where any mods that allows me to change the global special stats for either male or female npc's without effecting pc, and, upon further investigation, there appears to be no such thing on nexus. In which case, as someone who is butt naked new to using geck and or, making scripts, would it be possible for me to create such a mod, without having nv crapping out? Again, a complete beginner!
-
Hello! I've been working on a new hostile NPC (My RX-1) and I am really stumped on how to get him in the game and was hoping someone could help me. I've been using the Famished mod as a reference and have tried my best to reverse engineer it to see how he is injected into the RadStag level list and trying to do the same for my RX-1 with the Synth level list. I have all the templates set up appropriately leading from EncNPC01-->EncNPC02Template-->EncNPC03 through 08. I have all the leveled list together in the appropriate LChar templates (LCharRX-1, LCharRX-1Legendary, LCharRX-1AmbushLegendary, LCharRX-1Boss) under leveled list as well as having the LChar base (LCharRX-1) in a LvlNPC template. Everything mirrors a standard level list and NPC template to a T. I added the LCharRX-1 to the LCharSynth list just like it is set up in the Famished mod and can never get the RX-1 to show up in game no matter what. I can spawn all of the different variances in via console command no problem. They all have the correct weapon, skin and name as well as anatomically put together (no floating body parts, no clipping, mesh working correctly.) Is there any other key factors I'm missing or could it be that the Synth Level lists are just very picky? I don't know how to write a script and the one ActorLLInject script I found doesn't work either when set up in the creation kit via quest or created with a quest in FO4Edit. So maybe if someone knows of a good script? It's strange because I used the same script from Defective_Synth because it is very close to what I'm trying to achieve but it doesn't work when I set the public parameters in the ESP. Defective_Synth mod still works great though... When I tried the script: Load CK-->FO4.esm + DLCCoast (for robot voices) + RX-1.esp--->Quest-->New Quest-->name quest, far right tab to script-->Hit Add-->add ActorLLInject (data/scripts/ActorLLInject.pex data/scripts/source/ActorLLInject.psc)--> Set public parameters in properties--> Hit ok-->Save Plugin. side questions: Does Race and Class matter with LVL implementation because I've made my own RX-1 Race and Class and floated the values from the synth gen 1 race for the most part. Does having a custom race with the default characterassests skeleton cause problems? I wouldn't think so because most of the races use this asset and My new enemy is a full suit of armor so setting flags would cover the entire NPC.. Synths are under Raider Class. should I just keep my NPCs under Raider Class? I have armor for skin, not an outfit and do not have any ap_keywords applied to the npcs, just a single skin. Do I need to add the armor to a level list as well to get NPCs to show up at all or if the NPC injection was working and the skin wasn't I'm sure I would just see floating guns.. I apologize for the long drawn out entry and if this is in the wrong section just let me know and ill move it or delete it.
-
Hello everyone, so, we all know that new vegas has a bit of an auto aim problem in 3rd person view, you aim to the head, bullet goes wild and hits the chest, this is very noticiable with laser weapons, but happens with every proj weapon in the game. A workaround / fix for this is the console gamesetting command that goes like this setgs fautoaimscreenpercentage -100 this is effective for fixing the proj going wherever it wants and actualy hitting where the crosshair is pointing, but has 2 major flaws, one, it's a gamebryo setting so it resets to default at every game restart, even loading a quicksave reset it, that one I could live with, made a quick bat file for setting it to -100 but, the MAJOR problem is that, the setting goes to default every time you talk to an NPC, that means every time you exit a conversation, you need to run that commmand, gets old fast, so I was thinking on two ways of handling it with some help from the big brains here, I suck at scripting so. 1. Make a script that executes that line (setgs fautoaimscreenpercentage -100) after one leaves any conversation, that asumming that you can call a game setting console command on an ingame script... 2. bind the command line script to a key, so can it be pressed on demand for easier setting. Can anyone give me a hand with this one? thanks!
-
Found this treasure script here which is for Skyrim LE: https://www.nexusmods.com/skyrim/mods/85045?tab=description The concept seems simple enough,but for some odd reason it's not working for both my mod OR the OG. I'm not quite sure why, but maybe one of y'all can see it? Scriptname TR_treasuryScript extends ObjectReference ObjectReference property Vaultloot01 autoObjectReference property Vaultloot02 autoObjectReference property Vaultloot03 autoObjectReference property Vaultloot04 autoObjectReference property Vaultloot05 autoObjectReference property Vaultloot06 autoObjectReference property VaultLoot07 autoObjectReference property VaultLoot08 autoObjectReference property VaultLoot09 autoObjectReference property Vaultloot10 autoObjectReference property Vaultloot11 autoObjectReference property Vaultloot12 autoObjectReference property Vaultloot13 autoObjectReference property Vaultloot14 autoObjectReference property Vaultloot15 autoObjectReference property Vaultloot16 auto ObjectReference property GoldVault auto Form gold001 int value = 0 int Function ValueChange(Form akBaseItem, int aiItemCount){Returns the value change from moving [aiItemCount] of [akBaseItem]}If akBaseItem==gold001return aiItemCountEndIfEndFunction Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) value += ValueChange(akBaseItem, aiItemCount) if (value >= 1000) Vaultloot01.enable() elseif (value <= 999) Vaultloot01.disable() endif if (value >= 5000) Vaultloot02.enable() elseif (value <= 4999) Vaultloot02.disable() endif if (value >= 10000) Vaultloot03.enable() elseif (value <= 9999) Vaultloot03.disable() endif if (value >= 25000) Vaultloot04.enable() elseif (value <= 24999) Vaultloot04.disable() endif if (value >= 50000) Vaultloot05.enable() elseif (value <= 49999) Vaultloot05.disable() endif if (value >= 100000) Vaultloot06.enable() elseif (value <= 99999) Vaultloot06.disable() endif if (value >= 200000) VaultLoot07.enable() elseif (value <= 199999) VaultLoot07.disable() endif if (value >= 300000) VaultLoot08.enable() elseif (value <= 299999) VaultLoot08.disable() endif if (value >= 400000) VaultLoot09.enable() elseif (value <= 399999) VaultLoot09.disable() endif if (value >= 500000) Vaultloot10.enable() elseif (value <= 499999) Vaultloot10.disable() endif if (value >= 650000) Vaultloot11.enable() elseif (value <= 649999) Vaultloot11.disable() endif if (value >= 850000) Vaultloot12.enable() elseif (value <= 749999) Vaultloot12.disable() endif if (value >= 1000000) Vaultloot13.enable() elseif (value <= 999999) Vaultloot13.disable() endif if (value >= 1250000) Vaultloot14.enable() elseif (value <= 1249999) Vaultloot14.disable() endif if (value >= 1500000) Vaultloot15.enable() elseif (value <= 1499999) Vaultloot15.disable() endif if (value >= 2000000) Vaultloot16.enable() elseif (value <= 1999999) Vaultloot16.disable() endifEndevent Event OnItemRemoved(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer) value -= ValueChange(akBaseItem, aiItemCount) if (value >= 1000) Vaultloot01.enable() elseif (value <= 999) Vaultloot01.disable() endif if (value >= 5000) Vaultloot02.enable() elseif (value <= 4999) Vaultloot02.disable() endif if (value >= 10000) Vaultloot03.enable() elseif (value <= 9999) Vaultloot03.disable() endif if (value >= 25000) Vaultloot04.enable() elseif (value <= 24999) Vaultloot04.disable() endif if (value >= 50000) Vaultloot05.enable() elseif (value <= 49999) Vaultloot05.disable() endif if (value >= 100000) Vaultloot06.enable() elseif (value <= 99999) Vaultloot06.disable() endif if (value >= 200000) VaultLoot07.enable() elseif (value <= 199999) VaultLoot07.disable() endif if (value >= 300000) VaultLoot08.enable() elseif (value <= 299999) VaultLoot08.disable() endif if (value >= 400000) VaultLoot09.enable() elseif (value <= 399999) VaultLoot09.disable() endif if (value >= 500000) Vaultloot10.enable() elseif (value <= 499999) Vaultloot10.disable() endif if (value >= 650000) Vaultloot11.enable() elseif (value <= 649999) Vaultloot11.disable() endif if (value >= 850000) Vaultloot12.enable() elseif (value <= 749999) Vaultloot12.disable() endif if (value >= 1000000) Vaultloot13.enable() elseif (value <= 999999) Vaultloot13.disable() endif if (value >= 1250000) Vaultloot14.enable() elseif (value <= 1249999) Vaultloot14.disable() endif if (value >= 1500000) Vaultloot15.enable() elseif (value <= 1499999) Vaultloot15.disable() endif if (value >= 2000000) Vaultloot16.enable() elseif (value <= 1999999) Vaultloot16.disable() endif Endevent
-
I'm trying to make a spell that only works on summoned NPCs. I have everything figured out, except how to check if the NPC is a summoned NPC or not. I can't seem to find any unique keywords or factions on vanilla summoned NPCs, I'm not sure if there even is anything unique I can check for, but there should be SOMETHING. I checked out the banish spells, I thought they only worked on summoned daedra, but apparently they work on ANY daedra so that didn't help any. I appreciate any input. Edit: Just to clarify. I've got a scripted spell. I've got it fully set up to do what I want it to do to summoned NPCs. I just need some kinda "If Target.HasKeyword(SummonedCreature)" type of thing, but there appears to be no keyword specifically for summoned creatures, so I guess it'll have to be something else.... Just no idea what.
- 13 replies
-
- modding help
- creation kit
-
(and 1 more)
Tagged with:
-
Hey everyone ! So, I don't really know if I'm posting on the right place - if not, i'm sorry, this is my first time posting on any forum ever -, but I'm in need of some assistance from people more experienced than I. I'm running Skyrim AE and I encountered a problem that I've seen many people online talk about when it comes to this version: when I loaded my latest save file, I could only see a black screen, all the while still being able to hear background music and other noises. From my understanding, this stems from the fact that AE runs scripts faster and doesn't load them completely (? i'm not sure if that's the exact explanation but keep in mind I have absolutely no idea what I'm talking about and these are just abstract concepts to me); also, apparently there's no fix for this yet, at least not one that I've seen. I tried loading previous saves, but got the same result. The only save that worked was really far back, right after I started the Dawnguard DLC (and my most recent one was from when I finished the main quest after killing harkon). So, really, not all is lost, but just the thought of having to traipse around in the soul cairn and find jiub's goddamned pages all over again is enough for me to want to fix this issue by any means possible. So I set out on a mission to find out what the problem is. I opened the bad save file on resaver, hoping it would be a magical fix-all, and after running a scan it told me the file was missing two script instances of DLC1LegendaryDragonScript, as shown in the picture I uploaded. I've scoured the internet for any post with even the slightest mention of a problem similar to this, but either I'm too dumb to understand what the people in the programming community say (which is a very real possiblity) or there is no one writing specifically about this issue and, most importantly, how to fix it. I wondered if there is a way I can edit the save file to add those missing instances and make it work, but this may not even be doable since, again, I'm not a programmer and don't know what is possible/impossible to do here. Also, even if this could theoretically be done, I don't know what I would have to write/add to the save file or where to write/add it. So, with all of this said, if anyone knows what I can do to fix my problem, please help me. TLDR for you brutes: missing DLC script instances from save file. please. help.
-
Is no secret that some weapon mods out there work better on 3rd/1st person, or have some cool animations that you can only see in 1st person stuff like that, i was wondering if you can force the view for a specific weapon through scripts or something on weapon equip. thanks for any replies!
- 2 replies
-
- weapon
- firstperson
-
(and 3 more)
Tagged with:
-
Hey! I'm new to modding and I'm trying to figure out how to make a script so a weapon drains magicka while the player has it drawn. For that, I devised two scripts. One script for a magic effect that drains the player's magicka over time when they have a weapon drawn. The effect is registered to listen for the ACTOR_ACTION_DRAW_START and ACTOR_ACTION_SHEATH_END actor actions, which correspond to when the player begins or ends drawing their weapon. When the player begins drawing their weapon, the script stores the player's base magicka value and registers for updates every 2 seconds. The script then drains a percentage of the player's magicka every update until either the player's magicka reaches 0 or 30 updates have occurred. If the player sheaths their weapon, the script unregisters for updates and stops draining magicka. And also a script for adding the mentioned magic effect once the player equips the weapon (and a little bit more). Script for the magic effect: https://pastebin.com/9GiB2W11 Script for the weapon: https://pastebin.com/se3V55pB I have done the whole "attach the magic effec to a spell, attach the spell to the weapon via a script thing" but it just doesnt work :(. The message that the Drain Magicka Effect was added does show up, but it never gets added. It doesnt show up in the active effects page nor does any actual effect on the player's magicka happen. I really dont know what to do about this.
-
Hello, I am on 1500 mods/700 plugin build, it was working fine until last Friday. When I wake up Saturday and continue play from Breeze home, all in sudden I get 10,000 of script stack in my auto-save when I get out of the home. Game is then crashed when get out of Whiterun. I spent 1 whole week to figuring out what is happening, still no luck. Noticed that bloat is happening on the cell change, when I drop DynDoLOD it gets much better, but still few thousands of script stacks. Started new game with DynDoLOD, still few thousands of stacks. When I open the save in re-saver, there is actually a few thousand of null scripts are running. ---------------------------------------------------------------------------------------------------ACTIVESCRIPT Attachment ID: null Attachment element: None This thread doesn't seem to be attached to an instance. No owner was identified. ID: 0000c9cb Type: 00 Version: 0.1 Unknown (var): NULL Flag: 00000000 Unknown1 (byte): 00 Unknown2 (int): 00000000 Unknown3 (byte): 00 FragmentData (struct): null Unknown5 (byte): absent--------------------------------------------------------------------------------------------------- Very strange thing is, even when I get back to the old build (I am keeping some of the whole Skyrim folders, includes MO, DynDoLOD and everything), same thing is still happening out there. Those builds/saves were working completely fine back then. Anyone here having same kind of issue? any thoughts?
-
I can't disable a collision box that I have previously disabled in a startup script and enabled again in this script. I basically want the player to land upon the collision box and then disable it so that the player will fall into a lake of water. If I simply teleport the player in the air then the player will end up in the water without the fall. So that's why I need to enable and disable this collision box. The first disable works and and enabling it works as well but I cannot disable it again, so I end up standing in the sky. Here is the script, it's the part under the ( DoOnce == 3 ) section that doesn't work. The particular line that does not seem to work is: "ABE_FelthasCollisionBox"->disable. It worked in my other disable script and I copy pasted it into here, so the line should not be faulty. Begin ABE_FelthasUlthinScript short DoOnce float timer if ( DoOnce == 0 ) DisablePlayerControls FadeOut, 1 "ABE_DoorUlthinDome1"->disable "ABE_DoorUlthinDome2"->enable "ABE_FelthasCollisionBox"->enable PlaySound "mysticism hit" set DoOnce to 1 endif if ( DoOnce == 1 ) Set timer to ( timer + GetSecondsPassed ) if ( timer > 1 ) Player->PositionCell, -11285, -5436, 1997, 245, "West Gash Region (-2, -1)" set DoOnce to 2 endif endif if ( DoOnce == 2 ) if ( GetPCCell "West Gash Region" == 1 ) Set timer to ( timer + GetSecondsPassed ) if ( timer > 3 ) FadeIn, 1 set timer to 0 set DoOnce to 3 endif endif endif if ( DoOnce == 3 ) Set timer to ( timer + GetSecondsPassed ) if ( timer > 1 ) "ABE_FelthasCollisionBox"->disable EnablePlayerControls set DoOnce to 4 endif endif if ( DoOnce == 4 ) Stopscript "ABE_FelthasUlthinScript" endif End
- 1 reply
-
- collision box
- disable
-
(and 2 more)
Tagged with:
-
I have a lot of poisons in my inventory because I never remember to use them. I looked for a mod that would automatically apply poisons to my weapons, but I couldn't find one. Since I couldn't find one, I looked into making one on my own, but I'm struggling to figure out script writing. powerofthree's Papyrus Extender includes the functions GetEquippedWeaponIsPoisoned and SetEquippedWeaponPoison. Based on this, it seems like it would be possible to write a script that: Checks to see if your weapon is poisoned when you equip and/or draw it. If it is not poisoned, it checks to see if you have any poisons in your inventory. If it is not poisoned and you have at least one poison in your inventory, it applies the poison to the weapon.If this is possible, I would love if someone could create this mod for me. Please and thank you.
-
Hi all. I've been modding for a while now, but I've barely touched scripting until now. I'm making a requested mod in New Vegas that needs a custom hologram. I've made the model and it looks and works fine in the GECK. What I want is to be able to summon this hologram upon equipping a ring (armor piece already modeled and added), and dismiss it when the ring is unequipped, giving the illusion of an emitter. This is what my script is for. I saved an empty version of it first so I could assign it to the ring (and the hologram, if you guys tell me I need to) and now I want to add the actual function. This is what I wrote: ScriptName 00VKholosummon Begin OnEquip PlayerRef 00VKAliciaHoloRef.enable 00VKAliciaHoloRef.moveto playerRef 00VKAliciaHoloRef.AddToFaction FollowerFaction 1 00VKAliciaHoloRef.SetPlayerTeammate 1 00VKAliciaHoloRef.SetFactionRank TeammateFaction 1 00VKAliciaHoloRef.SetIgnoreFriendlyHits 1 End Begin OnUnequip PlayerRef 00VKAliciaHoloRef.disable End It won't even save, so clearly I'm doing something wrong. I added the hologram to the unplayed TestTrap cell so there's a reference, which I named 00VKAliciaHoloRef, as written above. Is this correct then? Do I even have to? Should it be simply 00VKAliciaHolo? While I more or less understand a script well enough to edit it (I have with other mods) I know next to nothing about producing a brand new one. Any advice you can offer would be GREATLY appreciated, my dudes.
-
From what I tried to figure it, it seems to modifying local variables of other scripts is not possible. (?) I'd appreciate it, if somene could confirm this for me. I also wonder about the reasons for this. Is TES scripting engine this dreadful? Externally modifying variables of other objects' scripts would be a powerful tool. Is that not something that OBSE could overcome? I have a second question I want to ask. In my mod I am using persistent activators to hold variables and do some logic on them. (In a sense, I'm trying to use them like simple objects of object-oriented programming.) I know that I can modify local variables of a persistent activator by calling it's editor ID, like: set SomePersistentID.localVar to 0 But it surprises me that I can't do the same thing by calling that same persistent object from a reference: ref someRef ... set someRef to SomePersistentID ... set someRef.localVar to 0 (Being able to use references like this would allow me a more elegant handling of persistent activators that I'm using.) Is that really the case? Am I missing something here?
-
I have a hard time getting an Activator passed as user activating another Activator. This page suggests that it should be possible: https://cs.elderscrolls.com/index.php?title=Activator Here is a line that I'm trying to use. ECTCompanionNonCombatOrderExecution.Activate ECTCompanionController01 1 - It is being called from ScriptEffectStart block of a self-cast spell. - I am 100% sure that both ECTCompanionNonCombatOrderExecution and ECTCompanionController01 are persistent references. - ECTCompanionController01 in it's OnActivate does nothing else, other than printing a debug console message. - The code line works if I replace ECTCompanionController01 with Player. Is there something I'm missing/misunderstanding about Activators? Here is the complete code that I'm trying to use: scn ECTCompanionCombatOrderMenu01Script ref companionController Begin ScriptEffectStart ;// Works - OnActivate is executed. ECTCompanionNonCombatOrderExecution.Activate Player, 1 ;// Doesnt work - nothing happens. ; set companionController to ECTCompanionController01 ; ECTCompanionNonCombatOrderExecution.Activate companionController, 1 End
-
Hello, could someone check this script for me pls, it's not working. Function should be: If the "wooden Horn" is in players inventory, remove only this. If player doesn't have the wooden one, then the "golden Horn" should be removed. If player misses both horns, just the debug message. Compile error in editor: LineX1, Col47: required (...)+ loop did not match anything at input ')' LineX2, Col51: required (...)+ loop did not match anything at input ')'
-
I'm wanting to improve I script i'm working on with a timer connected to it. What I want to happen is, on the death of the boss, A timer will count down. At certain intervals FX's will go off connected to Xmarkers. Like at the initial trigger, rocks will fall and collapsing Audio will trigger. At 10 seconds, same thing with an affect happening on a machine in the middle of the room. 15 same thing. At 20 seconds, a Massive magic explosion goes off and a triggerbox activates that takes up the whole chamber and kills the player. Speaking of the rocks, I'm trying to use the rocks from the lean-to traps, but when the initial FX goes off, using Enable parent, they appear but don't move. They just float there. I tested it with an actual movable object (bones) and it does the same thing, but when touched they fell. Am I doing something wrong?
-
If you want help with understanding how to merge scripts 100% yourself and never rely on script merger other than it creating the paths for you after a file's first merge, just private message me. We can do a screenshare over discord and in less than one hour I can show you how to do this and gain the confidence to make code changes yourself and be in control of merging to ensure accuracy and less headache. You will need to understand 100% manual merging is sometimes tedius and sometimes requires you to use your brain. You will also need to commit time needed to make the manual merges. -------------------- Understanding why script merger is just a tool and not an authority, a validator, an accurate means of merging, reliable, etc, why we have a problem with mods, why the modding community as a whole is very difficult to work with, etc. -------------------- I have been following sinitar's witcher 3 modding guide. I have never played the game and wanted my first experience to be everything it could possibly be with today's mods. I am a developer by trade so troubleshooting code related issues takes almost no effort. I know many of you want to vomit when looking at code, and I understand that. However, there are three huge issues with modding games that use script files: 1. There is no source of truth other than vanilla: In source control systems, every commit yields the 'official' code base. For you developers out there, lets just forget branches for now. In modding, there is zero source of truth and zero latest. The real source of truth is vanilla. Merged scripts are never a source of truth because there is no single goal to achieve by everyone modding files, and, because they are [if ever] rarely reviewed for accuracy by an authority. Script merger cannot help you here. It does its best to merge code but in reality, there is no concrete way of doing this accurately. Even if it says 'zero conflicts remain' that means nothing. It just means it 'merged' the code and it thinks there are no issues. YOU still have to review the code. Many times script merger will NOT merge correctly because only a human can interpret what the merge should consist of. It can easily screw stuff up because again, it does not use the source of truth (vanilla) to get alterations to merge. The cyclic merge files created from one mod to another are NOT source of truth, period. Lets say a particular script is modified by 5 mods. Assuming you merge all 5 mods together (click the file's root checkbox),what script merger does is take the first two, and merges their stuff together to make a merge file (assuming this script has never been merged before). Then for the other three that remain, it compares the merged file to the next mod, makes changes, and so on. A far more accurate but more complex way of doing this is to compare a mod file to the vanilla file to see what is different, then take those changes and merge them into the merge file. In other words, using this example, it would take the first mod and compare that to vanilla, get the changes, and create a merge file. Then go to the next mod, compare it to vanilla, get the changes, and attempt to merge them into the merge. Where it goes wrong is it doesn't get the changes each mod has from vanilla, it only 'checks' if the files are different from vanilla. 2. There are no standards. In development, there are standards for anything and everything. When you look at the Unreal Engine documentation, it mentions strict coding standards and principles Epic Games follows. It expects exactly the same from any contributor to the engine. Epic will simply refuse to accept any outside contribution if the code is not following their standards. Because the modding community is more of a 'every man for themself' approach, standards do not exist and therefore you have this wild wild west collection of mods that do a few things: a: contain only the code needed for that mod and that mod alone to function. This means all of the other code in the file is VANILLA. When you have two mods that modify the same file (almost certain), and you overwrite one with another, then the one used last will be the one used in the game because the other's changes are now back to VANILLA. This is what script merger attempts to solve. However, for some moderately complex merges, it fails to do this correctly despite saying zero conflicts remain. b: contain code to 'patch' other mods. This creates the problem of 'did the modder take all of the code from the other mod and put it in here', or 'did the modder only fix the areas they both touch', or 'is the modder's patch being updated to contain the latest stuff from the other mod it attempts to patch? Since there is this wild wild west approach of no standards, no governance, no authority, things break, don't work, and are sometimes difficult to figure out the issue. c: contain crap code. When you create an IF statement, NEVER should you just write a line of code to execute without curly braces to indicate an encapsulated block, EVER! CD Projekt Red even leaves out the curly braces. This is just pure laziness to save 2 extra lines, and is completely unacceptable. It leads to not only confusion of Script Merger, but also humans. What was the intent? Did they intend to include these other two statements to execute from the IF and forgot the curly braces??? 3. When the developer/publishers of the game put out an update, this sometimes breaks mods. This does happen because sometimes it is inevitable. Sometimes it is because some modders are just plain sloppy with their code. If you are a modder, and you create your own pointer/reference types, you should ALWAYS check if they are null in your custom routines, and have code written for those blocks to use vanilla to either inform the user something is not working (instead of the game just crashing or doing weird crap) or at the very least keep the game running. Most mods causing games to crash are the result of inexperienced developers making assumptions, period. There is no arguing that statement. If you check for null and have code in place to run vanilla if null, your game will simply not crash because you are not making any assumptions. This is literally what the Unreal Engine code does, and what their documentation tells you to do because that is the right way to develop.
-
- scriptmerger
- script
-
(and 4 more)
Tagged with:
