-
Posts
59 -
Joined
-
Last visited
Everything posted by hexef
-
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?
-
Nexus Mods Giveaway #15 - £35 (~$50) Steam Gift Card
hexef replied to Pickysaurus's topic in Site Updates
Cool. -
How to stop this NPC behaviour/bug?
hexef replied to KiCHo666's topic in Fallout New Vegas's Mod Troubleshooting
Alright, that's cool. So you discovered that it has to do with ingestible items being in their inventory. A good workaround would be to store all of their ingestibles and quantity in an array and remove them from their inventory. Then you would add them back when they die or when you open up their container menu(1008) via pickpocketing or OpenTeammateContainer command, followed by removing them again when closing these menus. I'd suggest using the OnStartCombat event handler to remove their ingestibles, so you won't have to continuously scan the NPC inventories all the time. -
How to stop this NPC behaviour/bug?
hexef replied to KiCHo666's topic in Fallout New Vegas's Mod Troubleshooting
It's their "healing" animation. I noticed that too, they're HP is increasing everytime right after the "pick up" animation is finished. It seems to happen when they are crippled mostly, but I also noticed it happening on non-crippled ones. I guess it's a feature that Obsidian tried to implement but they didn't have time to fully integrate it and what we're seeing is leftover code. It's possible that many more healing animations would have been played under certain conditions. I've also observed that non-crippled NPCs sometimes use the "inject" stimpak animation when they are hurt, however that animation is pretty uncommon and haven't seen it play too frequently in my playthoughs. I'm pretty sure these 2 animations are linked somehow. -
Fallout 4-style Companion Essentialism
hexef replied to SirDanest's topic in Fallout New Vegas's Mod Ideas
I've been thinking of implementing this behavior for quite a while but I've never gotten down to it, as I'm currently focused on other projects at the moment. I love hardcore mode but I hate the fact that companions have permadeath, but I also don't like that in the non-hardcore version when they get knocked out, they revive themselves after 30 seconds. I like how it is implemented in FO4, where you have to use a stimpak to revive your teammates otherwise they get teleported back to their place. I am thinking of linking the Medicine skill with this system as well, so with a low Medicine you have to use more stimpaks while at max Medicine only one would suffice. I'll leave a reply here whenever I start working on it. -
The idea of us carrying our ancestors' knowledge through our genes is just a myth created by the AC series mostly. This theory does not sound plausible to me. In the next decade, supercomputers will be able to simulate an entire human brain in realtime, my wild guess would be in the late 2020s. Even after they succeed in properly simulating it, another decade would be needed for our best neurologists to analyze all of this data and possibly discover many of our brains' secrets. So, until then, all we can do is to speculate how the brain works. Still, the "knowledge through genes" theory is just too silly in my opinion. Also, all of these stories with getting hit in the head and suddenly becoming skilled in something sound fake to me. Since I've never found a reliable source of these stories I came to the conclusion that they are made up.
-
I didn't win!
-
Do I qualify as a mod author? I'd like Shadow of Mordor if possible, thanks.
-
Making NPC Use Specific Weapons?
hexef replied to EPDGaffney's topic in Fallout New Vegas's GECK and Modders
GetSecondsPassed will only work in Quest scripts and inside the GameMode and MenuMode blocks of an Object/Effect script. They always return 0 inside UDFs. My suggestion is to use either a token or JIP's Auxvars on the NPC to store both the baseform of the removed weapon and the timer. -
I cannot seem to be able to add brackets in the title of my mods, even though the error that pops up when adding a bracket character says the following: The file name can only contain letters, numbers, spaces, brackets, periods, hyphens " - " and underscores " _ " Could you guys fix this problem, please? Or maybe the brackets in a mod's title are not supported at all and the error message is outdated?
-
So, there's this UI component that shows the name of the item/NPC under your crosshair within the "activation" distance. It's UI path is the following: "HudMainMenu/Info/justify_center_text". My script makes that component invisible under certain conditions, and also injects a custom component, let's call it "ChangedName", inside "HudMainMenu/Info", which copies most of the traits of "HudMainMenu/Info/justify_center_text". It's basically a new sibling of "justify_center_text", if I understand this concept correctly. This is the exact raw XML of the new "ChangedName" component, injected under a MenuMode 4 block's GetGameRestarted condition, through JIP's InjectUIComponent: <text name="ChangedName"> <x> <copy src="sibling(justify_center_text)" trait="x" /> </x> <y> <copy src="sibling(justify_center_text)" trait="y" /> </y> <justify> <copy src="sibling(justify_center_text)" trait="justify" /> </justify> <font> <copy src="sibling(justify_center_text)" trait="font" /> </font> <systemcolor> <copy src="sibling(justify_center_text)" trait="systemcolor" /> </systemcolor> <string> <copy src="io()" trait="string" /> </string> </text> In game, the new "ChangedName" component seems to have copied most of the traits of "justify_center_text" properly, with the exception of the "y" trait. I have no idea why is this happening, and it's frustrating beyond belief. If I check the X coordinate of both elements in-game using GetUIFloat, it returns the same coordinates for both "justify_Center_text" and "ChangedName", which are 160. But the Y coordinate has different results, 0 for "justify_center_text" and 65 for "ChangedName". Where the hell would that 65 be coming from?
-
Understood, thanks.
-
What does this button do?
-
How to add semicolons to string values?
hexef replied to hexef's topic in Fallout New Vegas's GECK and Modders
I don't want my mod to refer to custom-made ini or xml files, it's why I use InjectUIComponent instead of InjectUIXML. I just ended up using AsciiToChar instead and it does the job. Thanks for telling me about this function, wasn't even aware that something like this existed in NVSE. -
How to add semicolons to string values?
hexef posted a topic in Fallout New Vegas's GECK and Modders
I am trying to inject some XML code using JIP's InjectUIComponent. The problem I encountered is that I cannot for the life of me figure out how to inject a "justify" table, due to the fact that a semicolon is required at the end of the align parameter. For example, if I want to inject some XML that justifies the text to the left, I'd have to inject the following thing: "<justify>&left;</justify>" See that semicolon over there? Well, GECK flips out when trying to compile this, probably because GECK reads that semicolon as a comment, expecting quotation marks to the left of that semicolon. How can I do this? -
Thank you for having the patience to share this stuff. It cleared some things up for me, no doubt about that. So basically from what I understood, say I have something like this: Ar_Append arMain Ar_List <something> Ar_Append arMain Ar_List <something_else> Ar_Append arMain Ar_List <some_other_things> let arMain := Ar_NullThat ar_null deletes all the contents of arMain, because the sub-arrays are not referenced by anything else. But if I have something like this: Ar_Append arMain arSub1 Ar_Append arMain arSub2 Ar_Append arMain arSub3 let arMain := Ar_NullThis Ar_Null instance only "disassembles" arMain but the sub-arrays are not deleted because they are referenced by other array_var type of variables. Am I right? Also, That's good to know. I always forget that NVSE's arrays are automatically rearranged.
-
That's really good to know. Now I gotta remove all the foreach instructions that only targeted the string vars for destruction from arrays and replace everything with just ar_null. What about an array that is composed of arrays? Is ar_null safe when used only on the main array or do I have to foreach like how I did with string vars?
-
I'd like to know which game settings make the DT/DR penalties of an armor kick in at 49% of it's condition or less or how much of it's base DT/DR gets reduced at a certain condition. Currently, the DT/DR of an armor starts to get reduced at 49% of it's condition or less, I want to make it at 90%. Also, an armor at 0% condition has it's DR/DT only halved and I'd like that to be at 1/10 of it's base DT/DR instead of 1/2. EDIT: After a lot of fiddling with armor game settings I've came to the conclusion that those values are hardcoded. Weird how an weapon's damage output based on it's condition can be altered using fDamageGunWeapCondBase and fDamageGunWeapCondMult but there is nothing for armors.
-
Replacing the : with %3A did the trick for me. I had no idea that conventions like encoded url parameters even existed. That explains why the URL on a google search has so many %20s instead of spaces. Today I learned something new I suppose. Did some research about this subject and found this web page which contains all the encoded characters: https://www.w3schools.com/tags/ref_urlencode.asp. Thanks for the help.