I've been heavily modding my game in simpler ways, but I'm now stuck on trying to accomplish a particular new thing:
I'm trying to add a new button to the "Talk" menu, that would change a couple of stats, inform about the stat changes on a new screen, and go back to the talk screen. I've been looking at the existing interactions already in the code to try and replicate them, but the code seems to be jumping all over the place for this particular thing to a pretty extreme extent!
What's getting me is that the attributes for "actions" are heavily reused, overwritten, and referenced by too many other functions all around the code. It's giving me a headache at this point in that I'm unable to map out the chain of the logic to figure out which lines are relevant to this goal, and which ones are attached to completely unrelated functionality (I bet Grim must sometimes feel the same way about that particular piece!). For context, it looks like there are pieces that call on attributes declared and changed numerous times across tens of thousands of rows of code apart, that are also used by unrelated functionality relying on them having a certain value at a certain unrelated time! Trying to mess with that, I'm nearly guaranteed to break something else.
Can I just set my unique action attribute, add the button, add the "ifs" and "sets" for desired attribute changes, and have a clean and "stand-alone" interaction code that works that I could move across game versions? With new attributes, with functionality contained in one or two sections of the code, so down the line I don't need to hunt down scattered pieces of code to be adjusted.
I know it's a bigger ask, but would it be possible to get a sample code of how I would go about it?
edit: Figured it out by adding new functionality to the "Actions" menus, as execommands all live in one convenient section of the code and are far cleaner. It's the way to go if you want your own buttons and resulting actions that affect the NPC (including pregnancy status, which is what led me on this quest), the world, politics, and the like in a more immersive manner (without relying on the console cheats).
edit2: also, there's an error in the code saying "$woolbus" instead of "$wroolbus" in 8.3e at least. So control isn't being reduced when the investment is made.
I'm trying to add a new button to the "Talk" menu, that would change a couple of stats, inform about the stat changes on a new screen, and go back to the talk screen. I've been looking at the existing interactions already in the code to try and replicate them, but the code seems to be jumping all over the place for this particular thing to a pretty extreme extent!
What's getting me is that the attributes for "actions" are heavily reused, overwritten, and referenced by too many other functions all around the code. It's giving me a headache at this point in that I'm unable to map out the chain of the logic to figure out which lines are relevant to this goal, and which ones are attached to completely unrelated functionality (I bet Grim must sometimes feel the same way about that particular piece!). For context, it looks like there are pieces that call on attributes declared and changed numerous times across tens of thousands of rows of code apart, that are also used by unrelated functionality relying on them having a certain value at a certain unrelated time! Trying to mess with that, I'm nearly guaranteed to break something else.
Can I just set my unique action attribute, add the button, add the "ifs" and "sets" for desired attribute changes, and have a clean and "stand-alone" interaction code that works that I could move across game versions? With new attributes, with functionality contained in one or two sections of the code, so down the line I don't need to hunt down scattered pieces of code to be adjusted.
I know it's a bigger ask, but would it be possible to get a sample code of how I would go about it?
edit: Figured it out by adding new functionality to the "Actions" menus, as execommands all live in one convenient section of the code and are far cleaner. It's the way to go if you want your own buttons and resulting actions that affect the NPC (including pregnancy status, which is what led me on this quest), the world, politics, and the like in a more immersive manner (without relying on the console cheats).
edit2: also, there's an error in the code saying "$woolbus" instead of "$wroolbus" in 8.3e at least. So control isn't being reduced when the investment is made.
Last edited: