Search the Community
Showing results for tags 'reference'.
-
Hello all, I have a question about scripting that I can't quite wrap my head around. In a mod I am working on, I have a "daily schedule" scripted out for 3 NPC's. Due to the way I have created it, each NPC has a script attached that can sometimes make a call for a different NPC (using their persistent reference ID I set up in the CS) to perform an action (I.E. something like NPCRef1.addscriptpackage TravelToSpecificLocation). Using this as an example, all of these scripts currently refer to specific NPC's (again, using their persistent reference ID) - I'd like to make it more dynamic if possible and switch out NPCs as needed. For context - I set it up this janky way (instead of using something like a single quest script) because each script uses a number of "OnPackageDone" blocks that (as I understand it) have to be run on the NPC performing the package. What I'm trying to do now is come up with a scripted spell that, when cast on an NPC, would pass that reference (preferably only if they are set as a persistent ref, not sure if that's possible or not) to a "global" reference variable which in turn could be used in place of the specific reference IDs to each NPC I am currently using. For the scripted spell, here's a VERY rough draft: scn MyScript ref MyRef1 ref MyRef2 ref MyRef3 short counter begin ScriptEffectStart if counter == 0 && isActor == 1 set MyRef1 to getself set counter to 1 elseif counter == 1 && isActor == 1 && getself == MyRef1 Message "This NPC has already been selected. Please choose another", 5 elseif counter == 1 && isActor == 1 && getself != MyRef1 set MyRef2 to getself set counter to 2 elseif counter == 2 && isActor == 1 && (getself == MyRef1 || getself == MyRef2) Message "This NPC has already been selected. Please choose another", 5 elseif counter == 2 && isActor == 1 && getself != MyRef1 && getself != MyRef2 set MyRef3 to getself set counter to 0 endif end I know the code above is missing some reset logic, but this just gives an idea of what I have in mind. Where I am struggling with though is how do I (using the example above) use "MyRef1", "MyRef2" & "MyRef3" in other scripts? Or is this even possible? I'd prefer to not use OBSE if possible, but I'd make a consideration if there's no other way with vanilla commands. Also, if you have any comments/tweaks/suggestions to my code above - I would highly appreciate them!
-
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?
-
Hello. I'm trying to add several linked references at once to add a keyword for them. My idea is to use an elevator packin but it comes with three buttons (lower, upper, and middle) and i want to add two more so they can be activated in opposite sides on top and bottom to call for the elevator as shown in the pic below: When i check the properties window in the comment it says for the LinkCustom02 keyword "Link (chain) to the buttons that can move the elevator" But i don't know how to "Link Chain" references. Please help!
- 5 replies
-
- creation_kit
- script
-
(and 5 more)
Tagged with:
-
Just an ask around to see if anyone is willing to take some time and make this mod. For reference, it's these guys https://dishonored.fandom.com/wiki/Whalers from Dishonored. I can provide files for them (and their sword); I'm not sure if they'll work because I have 0 experience with this sort of thing.
-
I'm fairly new to modding and I have tried installing SMIM using NMM. It will allow me to choose which package I want but when it gets to 100% installed it then says there was a problem to do with an object reference. Any help?
-
- smim
- installation
-
(and 3 more)
Tagged with:
-
Hello, something i want to discuss the positives and negatives of the two methodes to apply scripts to objects. my thoughts: Reference Alias+Update Script Quest + "Less memory" / less bloat + Easier to handle/distribute + Set a maximum of applied scripts - needs to be reapplied - inconsistent when refreshed/reapplied Cloak Effect + Scripts are attached permamently - more scripts -> more memory used -> larger savegames/savegame bloat - less convient to handle/apply and keep track Really would like to know, what you guys think and if i'm wrong and forgetting something
-
Can't say if this has been adressed recently but I'm getting this error message upon installing certain mods, or trying at least. "Object reference not set to an instance of an object". I recently had to reinstal Fallout 4 but since I didn't have to reinstall Skyrim, I didn't bother uninstalling the Nexus Mod Manager. Now, this message appears when I try to install certain mods. It started with the CBBE body type but after a while, I managed... somehow... then a gun, the MP40. Didn't bother trying again. Now, with Do it Yourshelf and Movies of the Wasteland. OCDecorator was acting up but, again, out of nowhere, it installed correctly. If anyone can help, I'd be grateful. And no, do not direct me to that locked 5 year old thread. That's as out of date as troglodytes.
-
I feel so dumb posting about this but I've looked literally everywhere I can think of and just simply can't get this right for some reason. I basically want an item from a character's house to appear over his head using the MoveTo command and then he runs over and picks it up using an activate package. However, I cannot for the life of me figure out how to set up the reference aliases in the actual script. Again I feel dumb for asking because it seems like common knowledge, but how exactly do I go about this?
-
Hi ! I started making mods one week ago , and i think i can make a portable terminal. But when i wan't to save script it won't let me to save , i think there is no problem because in other script it's the same and it saves !.Look at this and tell me if i do something bad.... ALt1 is my Terminal If i change terminal to one from other mod , it works ! But my terminal not work. scn alcssSCRIPT short PPTDoOnce float fTimer Begin OnEquip set fTimer to 0.5set PPTDoOnce to 1 End Begin GameMode if PPTDoOnce == 1if fTimer > 0set fTimer to fTimer - GetSecondsPassedelseALt1REF.Activate Player, 1set PPTDoOnce to 0endifendif End ALt1 is my TerminalALt1 is my Terminal
-
So I'm having a huge issue with a mod I'm making. I thought everything was going good until I actually loaded up the mod in game to do some testing and I found that something strange had happened. So in the CK my cell looks fine as far as layout and everything, but when I went in game to test, my character was stuck inside objects. So I used tcl to fly outside of the part I was stuck in and then I discovered that all the objects I had added to my cell are converging to a single area inside the cell. So I loaded the mod back up in the CK and everything still looks good in the render window, so then I did some digging in the warnings box. I found errors for every single object I had placed that is saying they all have "Potentially Invalid Y Value on reference". I've never had this happen before and I'm not sure if I accidentally clicked something in the CK that I shouldn't have that cause this, but needless to say I don't know how to fix it. I'm really hoping there's some fix for this, otherwise I will have to start my mod all the way over Can anyone help me out? I'd much appreciate it
-
- creation kit
- cells
-
(and 2 more)
Tagged with:
-
LE RegisterForKey from a inventory item?
FrankFamily posted a topic in Skyrim's Creation Kit and Modders
So, RegisterForKey is part of the Form script, ObjectReference extends Form, so in theory RegisterForKey should be available to object references, right? But i'm trying to call it from an item in my inventory (extending object reference) and i'm getting this on the log "Unable to call RegisterForKey - no native object bound to the script object, or object is of incorrect type" Testing this on a book, added to my inventory through an alias for testing purposes, but it's not working. Does RegisterForKey simply cannot work for an inventory item? I'd prefer to not need to call it on a quest or something, would be quite limiting. Scriptname lalal extends ObjectReference Event OnRead() RegisterForKey(2) EndEvent- 18 replies
-
- registerforkey
- inventory
- (and 6 more)
-
I'm working on a mod that needs to have several Constructible Objects that give the player multiple of several types of item. Having failed to get this to work using FLSTs and LLs, I'm going to have to use a script instead. So the plan is to have the created object be a misc item with a script to give the final items to the player, and then delete it's parent object. I've already done a script that has the items it gives hard coded; but I want this mod to be easily expandable by other modders. Having a script that instead looks at the components declared under the misc item means that not only do I have to write less code, but anyone wanting to expand it doesn't need to write any code, just attach this script and declare the items they want it to give in the components section. The issue is that I have no idea how to reference an items components when calling the additem function. I've been unable to find any up to date or detailed Papyrus references for FO4, and either my Google-Fu is weak, or there is no info on how to do this. I am using Sublime Text 3 with the official PapyrusF4 plugin.
-
Problem is, all the objects starting with DLCxx have the xx messed up so Contraptions (DLC04) objects characters etc are grouped as DLC05 Vault-Tec (DLC05) objects characters etc are grouped as DLC06 NukaWorld (DLC06) objects characters etc are grouped as DLC06 Strangely this does not happen to the first three DLC, Automatron, Wasteland and Far Harbor. Probably the more evident effect is that in building mode you see the wrong DLC icon. I don't think there are problems about quests, at least I haven't met any while playing NukaWorld. Still I'd wish to change the wrong Group prefix to everything in the above DLCs, probably caused by a mod but I am not sure about this, as I deleted Fallout4 folder to replace it with my clean backup, and deleted both Loot and Fo4Edit folders just to be sure, but problem remains. As an example: Nuka World potential companion Porter Gage's ID is DLC04Gage Any suggestion on how I can change all the DLC Group references into the correct ones? Thank you.
-
TLDR version: If I need an activator handling a puzzle to point to 8 references, what's a better practice: A) Have 8 forever persistent objectreference properties on it. B) Make 8 keywords, 8 properties for the keywords, add those references to my activator as linked references and call GetLinkedRef(KeywordX) when i need to point to them on my script. And second question: If a quest stops running is persistence originated from it's objectreference properties lost or the objects stay persistent forever? ----------------------------------------------- Full story: I'm working on another artifact mod and as usual I want to include a custom maze/puzzle like the micro-chess i did for my paladin mod. This micro-chess is handled from a quest that points to a bunch of objects references, tiles, pieces, markers, etc and therefore all of it it's persistant. Since they are properties they are essentially persistent forever as far as i know, which doesn't really hurt that much but it's better to avoid it whenever possible. The problem is how to avoid it? So, i was looking at vanilla stuff and realized that all traps and puzzles have linked references with keywords when more than one is needed, so that within the script GetLinkedRef(Keyword) is called to get the reference needed without making it persistent. But how to apply this when the thing handling everything is a quest, if the quest stops running i guess persistence is lost, is that right? If so then my micro-chess isn't all that problematic. Now the current dilema, new puzzle. And i'm making this one handled through activators. And need it to point to 8 references more or less. It's better to make persistent properties or use GetLinkedRef(KeywordX)? For the later i'd need to make 8 keywords, 8 properties for the keywords (or a keyword array to keep it cleaner?) and add the 8 linked references to my activators, is it worth it? Or is it like magic effect conditions, that when you have to make way to many it's better to make a script for it instead?
-
Hey all, I feel like this is basic, but it's just not clicking in my head. Here's the simple outline: Player casts spell which summons a doorway in front of them -- this door is now a NEW reference, since it was created at runtime, in-game. It's just an activator with a door mesh to keep it simple. This door has a spell, just uses the OnActivate event to teleport them to a pre-defined x-marker in a cell, which is a reference passed directly into the script that is running on the door. Simple stuff here. Once I'm in the cell, there is another activator object statue that I want to have return the player back to where they summoned the door. However, since the door was summoned in-game, I have no idea how to get that newly created reference passed into the statue return activator script inside the cell, to bring them back.Do I need to do this with a quest and an alias? (For some reason I can never get my head around those.) Or is there some way to link a newly created reference to an existing reference dynamically? Thanks in advance! SOLVED! Used this as a basis with some restructuring: http://forums.nexusmods.com/index.php?/topic/3105920-script-help-summoning-a-door/
- 4 replies
-
- solved
- creation kit
- (and 4 more)
-
Hey guys, how can I remove/disable the dust whirlwinds? I guess I have to tinker with FXDust*-entries in the data files. Can I just remove the FormID or reference or something? Or can I replace the animation with a "blank"? Any help appreciated :smile: greetings jedi93
-
I have some plans in developing some Fallout 4 mods soon, and I'm only interested in the scripting side of the modding environment. I have zero experience with the scripting engine from FO4 and Skyrim. I am a veteran scripter in the scripting language that powers both Fallout 3 and Fallout: New Vegas, with thousands of lines of written code as well as a couple of published mods. One thing that I couldn't find about the Papyrus scripting engine is how do you bind a custom variable to a reference that exists in the game world. It really baffles me that I couldn't find any docs/tutorials/questions from other scripters regarding this process, considering the fact that Papyrus exists since the release of Skyrim. There are many ways to safely bind variables to references in FO3 and FNV, as long as the reference is persistent and can not be stored inside containers(e.g. NPCs placed in the editor). Dynamic references(e.g. pickable items or object refs spawned via PlaceAtMe) can still have custom variables, but the only safe way to do this is via the script attached to their base form(if present), as the variables inside their script retain their values even if they are added or removed from containers - script variables are not tied to their refid. My question: Is Papyrus powerful enough in such a way that allows me to bind custom variables to dynamic references, like weapon references from across the game world? What I'd like to do is implement a weapon condition system like in FO3 and FNV as a first mod. Obviously, a "condition" variable would be needed to be linked to every weapon in order to monitor their condition status. Is this viable in Papyrus?
-
Hello all, So I recently have bought and downloaded the GOTY version of Oblivion from Steam. I was allll too familiar with the Reference Bug from the Xbox360 version, and knew the 1.2.0416 patch was necessary to fix it. I read that my Steam version already had this, confirmed by the comforting v1.2.0416 in the bottom left corner of my game. HOWEVER, lo and behold - 120+ hours into possibly my funnest, RP driven character I've ever created in Oblivion - I load up my game and ALL of my custom created gear (essentially EVERYTHING I was wearing/using) is gone from my character, right out of my inventory, right off my character. I'm playing Oblivion GOTY, no Mods, and is downloaded from Steam, WITH the Official Patch. Has anyone else experienced this?!? I thought I was safe, and now I'm terrified of playing any of my save games at all for fear of driving them into the ground and making them unplayable. It would take me 20-30 hours to even get the mats and recreate all the gear that I've already lost. ! What can I do? Help!
-
I was wondering what would happen if two quests in Skyrim pointed to the same object reference. For example, what if I had a quest that uses Sebastion Lort from Rimerock Burrow and the Clavicas Vile quest as a reference? In the Clavicus Vile quest, Lort gets reserved as a reference, but my quest will most likely begin before Calvicus Vile's quest does (not reserving Lort as a reference), but there is a chance that they might be running at the same time. Another question I have is whether or not two quests play nicely together if they both point to the same object reference but one quest is designed to create an NPC at that reference. The example for this is Movarth's Lair in Morthal. Say that, this time, my quest uses Movarth (actually the generic vampire boss that spawns in the Lair before the Morthal quest) as a reference, not reserving him, but the player does not complete my quest before he goes to Morthal and starts the quest to kill Movarth. Movarth gets created at the boss reference for the location. Would my quest's reference then get screwed up not knowing where to point, or would it happily change its reference to point to Movarth?
-
I've always thought that these futuristic computers were pretty lame as they barely do much of anything, so I've been trying to configure a terminal to exercise various functions. The question is, how? I'm still pretty new to the whole modding world and have been watching and reading tutorials every chance I get. I know how to configure a terminal to do various things, but I can't figure out how to set one to control more than one object and its children. This is fine if all you want your terminal to do is unlock something, but how would I go about setting a terminal to control door locks, container locks, lights AND turrets? If each terminal can only have one linked reference, how would I go about accomplishing this task? Can you linkedref to and from a sub-menu terminal? If so, wouldn't there need to be an instance of the sub-menu terminal in the cell? And if there IS an instance of the sub-menu terminal in the cell, how would you get that instance to activate its linkedref rather than that of the main terminal? Any insight and/or theories to this dilemma would be greatly appreciated. Thanks in advance, - NNG
-
Is there any tool or method to change for example armor rating for multiple items? Lets say I have a mod with 200 armor references. I want to change their armor rating to a global number like 26. Do I have to change them one by one, or is there a script that does the hard work automatically? I know automation tool's armor builder for TES5edit, but it builds a completely new armor mod. I mean I need some much simpler thing. Edit: sorry for typo in the topic name, I meant: "Edit multiple items"
-
I was wondering if it is possible to define a reference to a base object in an external file, an .ini file, for example, that only contains text. The idea would be to allow the user to define a base object to copy stats and mesh paths from to another object using some OBSE functions. The stats and other things will only be copied once when a savegame is loaded. I have tried something like the following: Create an .ini file with the following line: set ExampleQuest.BaseHelmet to XWhere I have tried to replace the X with both FormIDs (the ones like 00000ABC) and EditorIDs (like HelmetMadeOfCheese). The quest has a script that runs the batch script (the .ini) and it has something like the following in it: ScriptName ExampleQuestScript ref BaseHelmet Begin GameMode If GetGameLoaded RunBatchScript "Data\Example.ini" EndIf Call ExampleFnChangeThings BaseHelmet EndIt now runs the function every time the quest is updated, as I am only testing it. Also, the GetGameLoaded section will be expanded a lot and moved to a different function. Perhaps combined with the stat and other changing function. But at least the idea can be seen... The function looks a bit like that: ScriptName ExampleFnChangeThings ref BaseHelmet Begin Function { BaseHelmet } CopyMaleBipedPath BaseHelmet TargetHelmet EndWhere TargetHelmet is a base record or object... the ones created in the Construction Set. For some reason, I cannot get the 'external' base record definition to work. It works if I set the BaseHelmet in the quest script, for example. Like that: set BaseHelmet to ElvenHelmetI would like to make it possible for the user to define the base objects to copy mesh paths and stats from to a new set of armour without editing the actual plugin. But is it impossible?
-
When, for example, you have an object effect on an explosion and it is applied to actors who come into contact with it, using GetSelf in the script will return a reference to the affected actor. Is it possible to get a reference to the explosion that applied the effect to the actor?
-
Hey guys, I'm using the PlaceAtMe function in fallout 3 to place npcs at xmarkers during the gameplay. The command is firing in my quest scripts, npc attached scripts etc as part of my mod. I know in skyrim creation kit there is a parameter that says whether or not the spawned reference is persistent or not which is really handy. However I need to spawn persistent references in fallout 3 now but there is no parameter for that in the fallout3 geck. neither is the setpersist function available in the FOSE. This is a problem for me because my npcs that I command to wait a a specific location in the game world are disappearing from the game when I leave and re-enter the cell (due to the fact they are not persistent and vanish when a cell is unloaded/reloaded/reset) They are not saved. Any help is much appreciated, thank you
- 1 reply
-
- persistent
- spawn
-
(and 3 more)
Tagged with:
