8 years ago
Brainstorming solution for unconventional use of visible Needs and the impact of Needs Cheats
Figured I might as well ask around for ideas on this; I think at this point, my brain is running in circles. The gist of the problem is, in my Sorcerer mod, I have a special visible "Need" (or "motive", as it's called in the code) called Alignment. Alignment doesn't decay and it's not supposed to move unless the player uses particular interactions. Up to this point, everything works perfectly fine.
The issue is when Cheats get involved of the type that fill Needs. I use both the full positive and full negative values of the Need. So, for example, -100 is full Dark, while 100 is full Light.
So if someone is playing a Dark Sorcerer and goes, "Blargh, I'm having trouble managing my sim's Needs. I'm going to use Make Happy." Now their Alignment jumps to 100, along with everything else. With the use of mods like UI Cheats Extension, someone who is aware of this being a thing that can happen may not have much of a problem; they just require an extra step to readjust to Need back to where it was.
But that's the ideal scenario. Sometimes people just aren't going to be paying attention to where the Alignment was at, or they'll forget, or won't know how to use UI Cheats Extension, much less have it installed.
Which brings me to the reason for finding a way to isolate a Need from being involved in cheats. From my understanding of how the code works for Need-filling cheats, it just does it for visible needs. Alignment needs to be visible for it to work as a part of the interface in giving the player information, so that already puts me in a bad place in terms of finding a solution.
So far, the best brainstorm I've thought up is something that will only really work if the player has one of the special traits that is supposed to "lock" their Alignment in place. Prepare your brain for the next stop: Convoluted Town. The concept is, player has a special Dark trait that makes it so that their Alignment is no longer moved by the use of spells. It can still be moved by cheats though. So to get around this, I would have one of those buffs attached to a particular Need value that you find in motive files (in this case for 100, the value that the Need ends up at after being filled by a cheat). The buff would have an on_add loot that tests for the player having special Dark trait and if they have it, it sets their Alignment back to -100.
Apart from being convoluted, I think it will work. But... it's really only a help for when the player's Alignment is supposed to be "locked" in place. For most other scenarios, I'm not thinking of a way to get around the problem. In theory, the solution would be incredibly simple; store what value the Alignment is at and only reset it if a cheat is used, or only reset it based on the player's prompting through some sort of Debug call. But that's theory. I don't know of any way with the XML functions to store a numerical value. That would probably require scripting, as would probably editing the function of the cheats themselves to handle a scenario like this that was never expected to be a thing.
The whole problem of it is making me want to get away from using Alignment as a Need at all. It may have been an inventive way to have Alignment, but it's not without its set of problems.
The issue is when Cheats get involved of the type that fill Needs. I use both the full positive and full negative values of the Need. So, for example, -100 is full Dark, while 100 is full Light.
So if someone is playing a Dark Sorcerer and goes, "Blargh, I'm having trouble managing my sim's Needs. I'm going to use Make Happy." Now their Alignment jumps to 100, along with everything else. With the use of mods like UI Cheats Extension, someone who is aware of this being a thing that can happen may not have much of a problem; they just require an extra step to readjust to Need back to where it was.
But that's the ideal scenario. Sometimes people just aren't going to be paying attention to where the Alignment was at, or they'll forget, or won't know how to use UI Cheats Extension, much less have it installed.
Which brings me to the reason for finding a way to isolate a Need from being involved in cheats. From my understanding of how the code works for Need-filling cheats, it just does it for visible needs. Alignment needs to be visible for it to work as a part of the interface in giving the player information, so that already puts me in a bad place in terms of finding a solution.
So far, the best brainstorm I've thought up is something that will only really work if the player has one of the special traits that is supposed to "lock" their Alignment in place. Prepare your brain for the next stop: Convoluted Town. The concept is, player has a special Dark trait that makes it so that their Alignment is no longer moved by the use of spells. It can still be moved by cheats though. So to get around this, I would have one of those buffs attached to a particular Need value that you find in motive files (in this case for 100, the value that the Need ends up at after being filled by a cheat). The buff would have an on_add loot that tests for the player having special Dark trait and if they have it, it sets their Alignment back to -100.
Apart from being convoluted, I think it will work. But... it's really only a help for when the player's Alignment is supposed to be "locked" in place. For most other scenarios, I'm not thinking of a way to get around the problem. In theory, the solution would be incredibly simple; store what value the Alignment is at and only reset it if a cheat is used, or only reset it based on the player's prompting through some sort of Debug call. But that's theory. I don't know of any way with the XML functions to store a numerical value. That would probably require scripting, as would probably editing the function of the cheats themselves to handle a scenario like this that was never expected to be a thing.
The whole problem of it is making me want to get away from using Alignment as a Need at all. It may have been an inventive way to have Alignment, but it's not without its set of problems.