November 15 - It's Friday, so what do I have for you? A Friday Highlight - here!
November 12 - Everyone ready for November Maxis Monthly? Details here

Vampire Run

Far as I can tell, the VampireRun walkstyle is somehow hard-coded to having the Vampire Trait. Can't seem to track down in what way though. I figured maybe it's to do with the default vampire walkstyle, that they have a slightly different one on a technical level and that impacts it... but can't find any references to such a thing. I tried giving a sim the isVampire trait_asm_param, see if that makes any difference, but nothing.

Seems like the only way to get the walkstyle to work is for the sim to have the trait_OccultVampire_Manifested. Keep in mind I tried it with a custom version of Vampiric Run and it worked when the sim had trait_OccultVampire_Manifested, but didn't make a difference to their walkstyle otherwise. So I know it's not a bug with my custom Vampiric Run. It's gotta be something else.
Mods moved from MTS, now hosted at: https://triplis.github.io

Comments

  • TriplisTriplis Posts: 2,891 Member
    edited June 2017
    Wondering now if two things are related...

    Was experimenting with an ability I made a while back (and was tweaking it today)... a waypoint run ability for a particular trait of Child sim. I'd originally wanted them to run as fast as possible, so I gave them the Run walkstyle and the PANIC_HIGH priority. Weird thing I noticed today is... sometimes the sim will run really fast, like panic speed, other times they'll just jog. Can't seem to figure out what the difference is in why.

    I thought, maybe it has something to do with posture. Because I don't remember noticing this difference in the past and I'd given the sim a sort of "idle" animation... one that happens periodically and they were having some issues after doing the ani, so I had the "idle" end in a call to posture stand animation to try to "revert" them to normal after doing the "idle." That seemed to work, but now I'm wondering if that impacted how fast the sim sometimes runs when doing the interaction... and if this is the same kind of thing that's happening with the Vamp Run hangup... if maybe it's not the trait at all, it's the Vampire idle that somehow allows the Vampire Run walkstyle to work, where it won't for other sims.

    I need to learn more about animation idles and postures, apparently.

    EDIT: Ok, reveal your secrets to me, walkstyles, darn you... if I swap Run for RunPanic, it doesn't make a single recognizable difference. This just adds to the sense that walkstyles have some hidden complexity going on that I'm not understanding.

    Also, run flags you no make no sense. Why would Buff_Situation_Fire_Panic have removed_run_flags for RUN_ALLOWED_OUTDOORS. Unless... hold on, it's doing that to ensure that sims who are restricted from running outdoors will run outdoors?
    'removed_run_flags': TunableEnumFlags(description='''
    Modify a Sim\'s ability to run.

    NOTE: This is *additive* with respect to all overrides, and is
    applied to the combination of the default tuning plus
    additional_run_flags from all overrides.

    e.g.: The default behavior for a human is to exclusively run
    outdoors. A hypothetical "excitable" trait might add the ability to
    run indoors (meaning the total result is indoors+outdoors). However,
    the "pregnant" trait might remove the ability to run (both outdoors
    and indoors), effectively preventing the Sim from running at all.

    But then, wouldn't panic want to allow running indoors as well? Which it doesn't seem to have a flag for. Unless it's built into the walkstyle itself somehow...
    Post edited by Triplis on
    Mods moved from MTS, now hosted at: https://triplis.github.io
  • SimGuruEugiSimGuruEugi Posts: 503 SimGuru
    The reason you don't always see the highest priority walkstyle is that the Sim accounts for distance, and might choose a slower walkstyle. You need to look at the tuning on the Sim to override those distances for specific styles (e.g. the Grim Reaper never accounts for distance, and always uses the floating walk).
  • TriplisTriplis Posts: 2,891 Member
    edited June 2017
    @SimGuruEugi Thank you for the insight. :)

    Is this an example of what you mean by some overriding for distance (taken from toddler movement level 5):
          <V t="Override" n="run_required_segment_distance">
            <T n="Override">0</T>
          </V>
          <V n="run_required_total_distance" t="Override">
            <T n="Override">3.5</T>
          </V>
    

    Or do you mean that in the tuning for the walkstyle itself, some of them (such as WalkReaper) are set to ignore distance?

    Edit: Whoa, dunno what happened to the pasted code there. That was weird.
    Mods moved from MTS, now hosted at: https://triplis.github.io
  • AHolyToiletAHolyToilet Posts: 782 Member
    I was looking at your name and was like "This name looks familiar..."

    Then I saw your description and realized you made the awesome Sorcerer mod!

    Is this some sort of new ability you're trying to get to work?
  • TriplisTriplis Posts: 2,891 Member
    @AHolyToilet Sort of. The Child Trait ability/functionality is more or less working (it'd just be nice if I could get it to reliably do the panic run, rather than jogging). I've also been intrigued by the prospect of trying to get the Vamp Run to work beyond being a Vamp (which was the main premise of this thread), but not having much luck with it.
    Mods moved from MTS, now hosted at: https://triplis.github.io
  • AHolyToiletAHolyToilet Posts: 782 Member
    Well, best of luck regardless!
  • TriplisTriplis Posts: 2,891 Member
    @AHolyToilet Thanks! :)
    Mods moved from MTS, now hosted at: https://triplis.github.io
  • SimGuruEugiSimGuruEugi Posts: 503 SimGuru
    Triplis wrote: »
    @SimGuruEugi Thank you for the insight. :)

    Is this an example of what you mean by some overriding for distance (taken from toddler movement level 5):
          <V t="Override" n="run_required_segment_distance">
            <T n="Override">0</T>
          </V>
          <V n="run_required_total_distance" t="Override">
            <T n="Override">3.5</T>
          </V>
    

    Or do you mean that in the tuning for the walkstyle itself, some of them (such as WalkReaper) are set to ignore distance?

    Edit: Whoa, dunno what happened to the pasted code there. That was weird.

    Look at short_walkstyle_map and short_walkstyle_distance_override_map, too.
  • TriplisTriplis Posts: 2,891 Member
    @SimGuruEugi Thanks! I'll take a look at those.
    Mods moved from MTS, now hosted at: https://triplis.github.io
  • TriplisTriplis Posts: 2,891 Member
    edited June 2017
    So for anyone who may be curious, I managed to get the Child Trait part working as desired (Vamp Run I'm still not quite sure about, haven't messed with it today, but maybe something I've learned from the Child Trait will give me a necessary insight for it).

    I think part of my hangup had to do with run flags and whether a sim is considered to be running or not (thanks to Eugi for pointing me in a direction where I ended up figuring that out).

    What I did turned out to be fairly simple when I cut out complicated and misleading ideas. First of all, I forgot that it's Run walkstyle I want, not RunPanic. RunPanic just looks like the person is panicking, whereas Run (as opposed to Jog) looks like more of a Sprint (which is what I want).

    So I ended up with code like this, ultimately, inside of a trait buff:
      <V n="walkstyle" t="enabled">
        <U n="enabled">
          <E n="priority">SKILL</E>
          <T p="InGame\Locomotion\Run.walkstyle" n="walkstyle">27c01d95:00000000:000000002a72b9a8</T>
        </U>
      </V>
      <V n="walkstyle_behavior_override" t="enabled">
        <U n="enabled">
          <L n="removed_run_flags">
            <E />
            <E>RUN_ALLOWED_OUTDOORS</E>
          </L>
    	  <E n="walkstyle_behavior_priority">DEFAULT</E>
        </U>
      </V>
    

    Running indoors is already disallowed by default, as far as I'm aware, but I needed to make it so that running outdoors is disallowed, too (for the sim who has this particular trait buff). That way, they would use the Run walkstyle, no matter what, rather than trying to do Jog. Formerly, I'd been using flags like the toddler example, allowing outdoors and indoors, thinking that would somehow enable the walkstyle to work. But I think I was confusing myself on how run flags work and not taking into account that toddlers are a special case and, as far as I'm aware, don't have a default jog setting for running like most sims.

    Since I'm fine with this sim basically always running, I don't think this will cause any problems when they run into priorities like fire (and they are a child, so it won't conflict with stuff like pregnancy).

    I also tried using an override for run_walkstyle at one point, when I was still using the run flags differently, thinking that would override the Jog. But that was only working for what I'd roughly call "medium" distances. Long distance runs were still defaulting to Jog.

    I'm not sure I totally understand what was going wrong in a way I could explain, but at least 1 out of 2 problems have a solution now!

    Edit: Just realized, that's the same procedure Grim Reaper uses in its buff. I see now why it ensures the reaper walk... it's forcing the reaper not to default to jog over long distances.
    Post edited by Triplis on
    Mods moved from MTS, now hosted at: https://triplis.github.io
  • ViddeVidde Posts: 4 New Member
    How do I make vampires run inside in a panic as soon as they are outside in the sun? I would like them not causally dying in heaps around town...
Sign In or Register to comment.
Return to top