RimWorld

RimWorld

VPE Auto Cast Buffs
66 Comments
CtrlAltFunk 12 Jul @ 9:51pm 
Hey @Netzach Sloth are you planning on updating this for 1.6 ?
Toby 9 Oct, 2024 @ 11:59am 
@Avos my fork handles those :⁾
Avarice 9 Oct, 2024 @ 7:15am 
Possible to make Psychic Sooth: Male/Female autocast?
Netzach Sloth  [author] 16 Apr, 2024 @ 10:41pm 
@Toby, that's fine, no problem.
@slurpme223300, look a couple comments down, looks like Toby already updated it, and added config options.
slurpme223300 11 Apr, 2024 @ 4:33pm 
1.5 1.5 1.5 1.5
ShauaPuta 28 Mar, 2024 @ 2:40pm 
Hey, I have two questions
Does this mod allow NPCs to autocast the buffs, or is it just the player pawns?
and second
I've been working with VE abilities for a while but never got autocasting to work for non-targeted abilities. Do you mind if I take a look at your code?
Toby 26 Mar, 2024 @ 4:05pm 
@Netzach Sloth I hope this was okay ^^; neglected to ask permission first
@bashnako I've forked the mod (including my patch) https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3199585285
bashnako 17 Mar, 2024 @ 2:11pm 
Is there somewhere build/release with this patch included, i want to test it: https://github.com/djkacevedo/VPE-Auto-Cast-Buffs/pull/1
Luminous 9 Mar, 2024 @ 5:03am 
Incredible mod! I have a suggestion, but I have no idea if it's doable: auto-casting enthrall on corpses in a specific stockpile, in order to easily make an undead army
master.of.herb 31 Jan, 2024 @ 5:34pm 
Awesome mod! Since you asked for suggestions:
Invisibility while drafted when invisibility lasts less than 5 seconds.
Word of Healing / Immunity on pawns that are injured/sick.
Avoid autocasting during rituals would also be nice.
But, what I think you should focus on next are mod options.
Toby 23 Jan, 2024 @ 11:45am 
@Netzach Sloth I just opened a PR. Didn't open Steam for a while so sorry it took so long ^^;
Toby 23 Jan, 2024 @ 11:45am 
@indrageerts might cause problems with blindsight?
indrageerts 19 Jan, 2024 @ 5:20pm 
Autocast the regrow limbs ability from the protector line? Ive got a hundred colonists, figuring out who is missing a limb is extremely difficult, I would rather the pawn just deal with it.
Netzach Sloth  [author] 18 Jan, 2024 @ 11:17am 
@Toby, I just uploaded to github
https://github.com/djkacevedo/VPE-Auto-Cast-Buffs
Toby 14 Jan, 2024 @ 9:49am 
@Netzach Sloth `Ability_IncreaseQuality.MaxQuality`
Is the source anywhere I could open a PR for this?
Skullywag 8 Jan, 2024 @ 6:38am 
as I said I dont use that other mod at all, just VPE.
Mike Oxlong 7 Jan, 2024 @ 12:34am 
Actually, VPE got updated back in September to have Enchant Quality scale with the caster's psychic sensitivity, with the maximum quality going as high as Masterwork with 250% sensitivity.
Netzach Sloth  [author] 3 Jan, 2024 @ 12:18pm 
`hes wearing apparel that boosts his psychic sensitivity and this has pushed his enchant ability to "excellent"`

That's not VPE, that's EnchantQualityPlus. Base VPE, sensitivity has no impact of how high you can enchant things, that's good by default, but with a configuration option.

I don't know how to check the config option, so I just check for good right now.
Skullywag 3 Jan, 2024 @ 5:34am 
I dont use EnchantQualityPlus, this is base level VPE, you can get to excellent by default. Its not a big deal I can manually tell him to do the excellent ones when I spot something in the stockpile.
Netzach Sloth  [author] 2 Jan, 2024 @ 6:26pm 
@Skullywag I haven't added support for EnchantQualityPlus yet, so yeah, it'll only go up to good on enchant. This is hardcoded, so even if you changed the max level in VPE settings, it'll still cap out on good; I gotta figure out how to access the settings.

When I have time, I'll look at fixing that and adding compatibility with EnchantQualityPlus. I have to go through EnchantQualityPlus' code to see how max enchant is handled, and depending on how that's written, it could either be easy or hard. Don't know yet.
Skullywag 2 Jan, 2024 @ 2:26pm 
Ok he will echant "normal" items up to good, but definitely is ignoring anything at or over his "natural" enchant level, i assume this is a bug somewhere in your mod where you dont take into account the full calculated enchant level and only the natural???
Skullywag 2 Jan, 2024 @ 1:18pm 
Ive got a technomancer who wont cast enchant on items in a stockpile zone called "Enchant zone", he will cast Mend just fine on items in a "Mend zone" however, not sure why this is the case, im going to test but my best guess is possibly hes wearing apparel that boosts his psychic sensitivity and this has pushed his enchant ability to "excellent" when hed naturally be "good" and the item in the enchant zone are all "good" so he doesnt bother. Ill go test this theory but I cannot see any other reason he would just ignore that zone.
Helios 27 Dec, 2023 @ 12:13pm 
Will second the Batteries with Recharge, nice idea to keep your base up with "magic" :D
Oxirane 25 Dec, 2023 @ 10:19pm 
Autocasting Recharge from Staticlord on batteries with a "keep it up" strategy would be a cool addition. Power your base through Psycasting.
adamok5002 23 Dec, 2023 @ 9:09pm 
@SilDaBirb best way i could think of for that would be to set a seperate stockpile for just the souls set to critical and not named mend
SilDaBirb 22 Dec, 2023 @ 6:33pm 
Is there a way to exclude certain apparel from the mend psycast? I have an item with no hp set to it and they keep casting it on them instead of actual damaged gear. Its the souls from A Rim Reborn if curious
Luminous 20 Dec, 2023 @ 4:04pm 
Doing an empire playthrough rn and this mod makes managing all my psycaster nobles SO much easier, great mod!
PunisherT1000 20 Dec, 2023 @ 1:33am 
@Netzach Sloth It's a shame that it doesn't work with this mod, EnchantQualityPlus https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2961996244 , it was very cool if they complemented each other. I would also like to leave a wish that repairs and quality improvements could be added by checkboxes in the settings of zones such as remelting, biocaded, etc.
Oxirane 19 Dec, 2023 @ 7:53pm 
The Harmonist tree has a psycast called Transmutation which rerolls an object into something else of equal value. Maybe that could work like Mend and Enchant? We could have a stockpile with "transmute" in the name to automate transmitting stuff into (random) other stuff. Might be useful on a stockpile of junk?

If it's easy to add I think this would be neat and would appreciate it. If not, it's okay, it's a silly idea anyhow.
KyoNeko 17 Dec, 2023 @ 4:32am 
It might be worth noting tht Mend and Enchant quality only work on stockpile zones. I spend far to long attempting to figure it out assuming that you mend allowed areas like most mods use.

Any chance to add that functionality to areas instead of just stockpile zones? Since now shelves and other storage options cannot be used even if they are renamed.
Pfc. Hungry P Tiredman 16 Dec, 2023 @ 3:53pm 
Thanks for the response! I hope you can get around to it, I've greatly enjoyed the mod.
Netzach Sloth  [author] 11 Dec, 2023 @ 5:49pm 
@Mcgee and Tiredman, I just got back from vacation, once I'm caught up at work, I'll think about those.

@a quality meme; I don't think that's my mod causing that. I don't touch the Transcendent stuff at all. If you can reproduce it with minimal list, just Transcendent, my mod, and all the pre-reqs, give me the steps, and I'll check it out when I have time.
a quality meme 11 Dec, 2023 @ 2:32pm 
Autocasting Transcendent casts seems to really like to softlock the character when he gets under a certain percentage. Instead of not casting it, if they choose to next autocast a transcendent cast, they will freeze themselves in a loop only escapable by undrafting.
Bleeding Eyes Mcgee 11 Dec, 2023 @ 10:37am 
It'd be cool if we could automate psycasts like Ice Crystal or Solar Pinhole by having casters replace them whenever they wear off. Maybe casting them with autocast on could leave behind a target or something?
Pfc. Hungry P Tiredman 6 Dec, 2023 @ 12:32pm 
Could we get autocasting for the healing buffs like Word of Healing and Word of Immunity, casting one on already tended people with injuries and the other on anyone with an infection? Stabilize would also be good, casting on people with a concerning amount of bleeding.
Netzach Sloth  [author] 5 Dec, 2023 @ 1:14pm 
Updated. I made speed boost work undrafted.

I still think it's kinda bad though. They cast it, get the speed boost, then because of how meditation works, they immediately use the speed boost to go meditate for a few hours.

Once I figure out mod options, I might make an option to disable mediation during certain short buffs.
Sucram 4 Dec, 2023 @ 9:19am 
@Netzach Sloth I see. No, I didn't have any performance issues.

Related to the speedbooster being able to be used even when pawns are not drafted, in my colony the pawns that have the Warlord path are pawns capable of combat and not many other things, so as other people said, the speedbooster helps a lot for them to help with hauling things. Thus, the cost per meditation is lower than the benefits, taking into account that sensitivity can be increased with equipment/weapons/implants/etc and that it only takes 2 points to unlock it, as it is the warlord's path first buff, makes it excellent for any other pawns as well. That said, it would be great if these buffs could also be used even when undrafted. The other buffs are more combat oriented, so I understand they are only used automatically when drafted.
The Blind One 3 Dec, 2023 @ 3:26pm 
@Netzach Sloth

I've used the speed boost in the past for pawns to quickly get things done in emergencies. That's why I hoped it was autocastable so that I didn't need to babysit them to utilize their speed boost. I'd really be grateful if you added it as an undraftable option for those that are interested in it but I understand if you'd rather not.
Adam Smasher™ 3 Dec, 2023 @ 7:53am 
Hey Netzlach, that was exactly the biggest reason I opened your mod - the speedboost autocast while not drafted. That would be a gamechanger, thanks a lot !
Netzach Sloth  [author] 2 Dec, 2023 @ 11:06pm 
The main issue with setting it to do those short buffs for both drafted and undrafted, is that I don't currently have, or know how to make, a way to let you choose that in game.

A useful way would be different auto modes. Like right click once for drafted, twice for undrafted, three times for both, and four times and your back to autoCast off.

That would be good, but I don't know how to make that happen yet.
Netzach Sloth  [author] 2 Dec, 2023 @ 11:02pm 
Yes, but not useful for haulers. It'll only do it if drafted. If you think it's worth changing that so that it'll also autocast when undrafted, i can do that.

The main reason I didn't was because of the short duration combined with the way meditation for psyfocus works and it's not insignificant cost.

For a pawn at 100% psyfocus, it's completely worthless.

They'll cast it auto and get the buff for three hours. At base meditation that's 50% per day, aka, it'll take six hours of meditation for that three hour buff to speed.

For a better pawn, I'll use a heavily modded one I have right now as an example.

The speed boost costs 11%, lasts for 10 hours for them at 350% sensitivity, and they meditate at 400% per day.

Is an hour of meditation worth a ten hour buff to speed? I don't think so, but maybe it is.

So far, I've been limiting auto cast for undrafted to abilities that last a day or longer at 100% sensitivity.
The Blind One 2 Dec, 2023 @ 10:46pm 
Neat, do I understand that the speed boost cast from warlord path is now autocastable?

That would be amazing for some haulers that use that psypath.
Netzach Sloth  [author] 2 Dec, 2023 @ 9:32pm 
@sucram

Turned out pretty easy, so I added it. All warlord buffs are now autocast when drafted. Drafted gets checked every half second instead of every ten seconds, and it'll cast as long as possible, unlike undrafted, which will only auto cast above 50% psycast, I might change undrafted to also do things that way, or make it configurable.

I'll probably also add those shield spells, if there's anything else you think would be good to add let me know.
Netzach Sloth  [author] 2 Dec, 2023 @ 7:41pm 
@sucram, I reread your previous and my previous comments, I actually wrote a reply to you before, and I guess I didn't hit post?

The performance issue isn't as big a deal as I made out. It could be, if I start doing things more often, but it still wouldn't be that noticable, that's mostly resolved by doing what I mentioned, separate autocast rates for drafted and not drafted, high tick rates aren't as important while drafted anyway, so the minimal loss in performance from upping the rate from 1/600 to 1/30 even, isn't really going to be noticeable.

The more I think about it, the more I like the idea of doing that. If I have time, I'll probably do what you asked and add the Warlord abilities, as well as some of the other combat buffs.
Netzach Sloth  [author] 2 Dec, 2023 @ 7:36pm 
@a quality meme, the first version was pretty buggy, I'm pushing a new version out in a few minutes, let me know how it goes. No new features, but it should behave a lot more consistently, and I refactored the code to be more readable, if you're interested in that.

@Sucram, are you seeing a significant performance impact? I streamlined a few of my methods in the new update, so check again, and let me know if it still has performance issues. If it does, check with Dubs Performance Analyzer under the Harmony Patches tab for the methods eating up your ticks, and I'll see if I can fix it.

I don't think that'll be needed though, my performance is fine with the new version. But there might be bug making interactions with mods that I don't know about, so you might see different results.
a quality meme 2 Dec, 2023 @ 4:31pm 
Instead of not trying to autocast anything while under 50%, my casters will instead attempt to cast something, be blocked by that requirement, and softlock themselves out of doing anything until I deselect all autocasts.
Sucram 28 Nov, 2023 @ 10:02pm 
Some of these buffs last longer depending on the psychic sensitivity the pawns have, so maybe it wouldn't affect performance much if they had a check to only cast when the effect ends?!
Netzach Sloth  [author] 28 Nov, 2023 @ 5:51pm 
@Tropicanid, I thought about it, but with how meditation works and focus, it might not make sense, that added time saving from skipping around is gonna be lost by the added time in mediation, bonus points, if the skip lowers psyfocus enough, they might cancel their current job altogether, and just go meditate.

It works in RWoM because Mana slowly rises, instead of slowly falling like for psyfocus.

If you can think of a way to make that work logically, I might do it. It'll take more time though than the others.

@Sucram, maybe having them autocast if drafted, that would be convenient; it'd need to be at a higher rate though to be useful. Right now, to avoid burning performance, autocasting is only done once every ten seconds, it'd need to be much more often than that to be useful for combat buffs when drafted.

Maybe a check for if they're drafted, and to do it every half second instead, and to do a different set altogether for drafted buffs. That could work. I might do that.
Sucram 27 Nov, 2023 @ 6:01pm 
Can you please add buffs from the Warlord's path and focus from the Protector path?
ddogg 27 Nov, 2023 @ 4:01pm 
Is skip something that could be made into an auto cast? Rimworld of Magic has an autocast skip feature that i've never seen replicated outside of the mod, where the pawn with the ability continuously auto selfcasts skip to where ever they are going upon cool down