[B18] Shoo!

Started by jamaicancastle, February 20, 2018, 08:23:15 PM

Previous topic - Next topic

jamaicancastle


First-time modder here for Shoo!, an idea from the community Discord.

This mod adds a new designator that tells your colonists to harmlessly direct animals out of your base if they become trapped inside or are just inconvenient. (Cooperation not guaranteed, especially for large or very wild animals.) Animals that you shoo will pass through doors, allowing you to push them out of buildings with a minimum of micromanagement.

Compatibility: Shoo! should be safe to add to games currently in progress. It should be safe to remove as long as no pawns are in the process of shooing animals, no animals are marked for shooing, and no animals are currently fleeing from having been shooed.

This mod includes the Harmony patching library. No additional download is needed.

Thanks to the RW modding Discord for their help. Special thanks to Mehni for an excellent guide to the inner workings of jobs, and for heroic efforts in fixing the Inexplicable Herd Animals Bug.

Workshop: http://steamcommunity.com/sharedfiles/filedetails/?id=1307441653
Dropbox [B19]: https://www.dropbox.com/s/zqb708lysi4hyzm/Shoo%21.zip?dl=0
Dropbox [B18]: https://www.dropbox.com/s/ip67qrj1rb3vek3/Shoo%21%20B18.zip?dl=0

Edit 9/10: updated for B19 release.

Kori

I have already added this to my modlist, it sounds very useful. :)

VincentJ

I tried to direct ratalopes out of my base with longbows, don't do the same at home children

can't wait to check this mod

Harry_Dicks

This is awesome. Thank you :)

So, how far does this "shooing" work? If you have a huge deep mountain labyrinth base, and an animal is in a deep corner of it, do you just have to shoo them once and then they will find their way out of the whole complex? Or will it be just moving away from that colonist far enough?

Guess I'm just interested in more specifics from scenarios if you have any from your tests :) Like what actually defines "out of your base" does that mean into an unroofed courtyard in my base or home area or how is this defined exactly?

Zakhad

Well done, awesome idea - this reminds me of the old might and magic games where you'd shout at people who kept blocking hallways/doors lol.

jamaicancastle

Quote from: Harry_Dicks on February 20, 2018, 10:37:18 PM
So, how far does this "shooing" work? If you have a huge deep mountain labyrinth base, and an animal is in a deep corner of it, do you just have to shoo them once and then they will find their way out of the whole complex? Or will it be just moving away from that colonist far enough?

Guess I'm just interested in more specifics from scenarios if you have any from your tests :) Like what actually defines "out of your base" does that mean into an unroofed courtyard in my base or home area or how is this defined exactly?
"Out of your base" in this case means "not in any room that isn't huge". "Huge" is defined in terms of regions, which are a bit technical, but as a general guideline anything smaller than around 100x100 should qualify as part of your base. I actually chose that qualification specifically so that it would count courtyards or walled enclosures.

The maximum search radius for the animal is about 50 tiles around it, so if your base is very large animals might not be able to find their way out. In that case, they'll just run away in a random direction (this is also what they do if you're out in the open somewhere). If you want them to keep going out of your base, you'll have to redesignate them. (I'd be interested in your opinion on whether it would be worth making it only remove the designation if the animal makes it outdoors, rather than any time it flees.)

Note that for performance reasons, the 50 tiles is pure distance rather than path distance; if an animal sees a spot within the radius but has to go 10x out of its way to get there, well, that's what it'll do.

RyanRim

Very useful. I dont restrict animal movement usually, so they keep crashing in my leisure areas, although I have a barn built lol. Good job.

✯✯✯✯✯✯✯✯✯✯✯✯✯

Harry_Dicks

Quote from: jamaicancastle on February 23, 2018, 04:48:28 AM
"Out of your base" in this case means "not in any room that isn't huge". "Huge" is defined in terms of regions, which are a bit technical, but as a general guideline anything smaller than around 100x100 should qualify as part of your base. I actually chose that qualification specifically so that it would count courtyards or walled enclosures.
Awesome. I was curious what your specific numbers where to define this.

Quote from: jamaicancastle on February 23, 2018, 04:48:28 AM
The maximum search radius for the animal is about 50 tiles around it, so if your base is very large animals might not be able to find their way out. In that case, they'll just run away in a random direction (this is also what they do if you're out in the open somewhere). If you want them to keep going out of your base, you'll have to redesignate them. Note that for performance reasons, the 50 tiles is pure distance rather than path distance; if an animal sees a spot within the radius but has to go 10x out of its way to get there, well, that's what it'll do.
I like this approach better than a 50 tile pathfind, so this should cut down on any calculations it would have to do. Curious, but would it be appropriate to say that your mod adds virtually nothing onto the CPU load, except when you pawn go to actually "shoo" an animal, and/or when the animal is being "shooed"?

Quote from: jamaicancastle on February 23, 2018, 04:48:28 AM
I'd be interested in your opinion on whether it would be worth making it only remove the designation if the animal makes it outdoors, rather than any time it flees.
Are you referring to the designation of an animal being "shooed", and having it only be removed when one of those conditions are met? Hmm, that is something interesting to think about. I'll have to come back to this question after a little bit of thinking on it and different possible scenarios :)

Simstu

Hi, really good idea, I like it. Any chance it will work on A17?

Canute

Shoo,shoo!
Get out of A17 ! 
Shoo,shoo !
:-)

Harry_Dicks

Quote from: Canute on February 24, 2018, 02:32:26 AM
Shoo,shoo!
Get out of A17 ! 
Shoo,shoo !
:-)

It's the [CURRENT YEAR] and we're on the [CURRENT BETA], get with the times, Simstu! :P

Call me Arty

 Good job on the mod, I've been wanting this for a while and am absolutely able to look past the fact that you got it from the discord.

Not too salty, and I'm not taking credit for the idea. It works great, though. Thanks!
Why are you focusing on having a personal life rather than updating a mod that you're not paid to work on?

If there's a mistake in my post, please message me so I can fix it!

temple_wing

Would you please provide mediafire download? dropbox is not accessible from china