Forum Discussion

TriplisTrip's avatar
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.
  • MR_TURBODRIVER's avatar
    MR_TURBODRIVER
    Seasoned Newcomer
    My solution might be too simple, but what about making a cheat that allows you to set the 'Alignment' motive as either light, dark or in between? Since the user is cheating already, make them cheat even more.
  • This would really have to be scripted. You would need to disallow the alignment need manually I think. It can be done, though.

    "Triplis;d-919564" wrote:

    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.


    I figured, if you make the sorcerer a proper occult type, the alignment stat would make for a GREAT experience statistic IMO ;)
    You'd just need to start the stat at the middle :)

    "TURBODRIVER;c-15819854" wrote:
    My solution might be too simple, but what about making a cheat that allows you to set the 'Alignment' motive as either light, dark or in between? Since the user is cheating already, make them cheat even more.


    ...but that still doesn't solve the OP's problem of "make happy" maxing out alignment. Ideally, the 'locked_stats' argument should be changed to allow this:



    16315149634101581229
    -100



    ...But you'd have to override the 'INSTANCE_TUNABLES' list in the buff class. Again, doable, but it really depends on how much work you want to put into it.

  • @TURBODRIVER @Hadron1776 Thanks for your input guys. :) I've thought about it a lot more and I keep coming back to the same idea: That the ideal would to edit things on the actual python end, so that there's some kind of additional "exception" case built into the motive filling cheats (in addition to "is visible"). Called something like, I dunno, "is_static" or something. Some kind of new tunable (I think that's what they're called?) that would be included in the various places in the code where it checks if the motive should be filled by the cheat and then that line would default to false, but could be added to a motive to indicate that it shouldn't be affected by the needs-filling-cheats.

    If that makes sense.

    Not that it'd be easy to do even if it does make sense. It just seems to me like it'd be the cleanest way to avoid problems with motive filling cheats.

About The Sims 4 Mods & Custom Content

Find expert tips, troubleshooting help, tutorials for mods and custom content, and The Sims 4 patch files in our forum.4,704 PostsLatest Activity: 9 hours ago