What are valid options for "target_type:"?

I am looking for ways to implement some ideas for mods which has led to me rooting through the .smod files and in particular to clerics abilities and the “target_type” line under script info. For instance, the Clerics heal aura has the target type listed as mob, which as an old world of warcraft player confuses me as to me mob has always meant enemy when the clerics heal aura only affects friendly targets. To this end, am i right in thinking that in Stonehearth mobs are your own villagers and what are the other valid options for targeting? Cleric also seems to be the only job that has that requires this script, other jobs such as archer dont seem to use it. How does the game prevent the abilities of other combat classes targetting allies or does the target type specify a targeting limitation e.g target type: mob actually means it cannot target mobs?

Mob means “mobile”.
The target is chosen based on a battle, so he know who he should aim at (enemy or ally)

This target_type is probably to avoid targeting things that match the friendly criteria (if you are trying to heal) but is not a mob (mobile), such as a door. A door can be a “friend” but should not be healed.


Mobs meaning mobile makes sense.

Have worked my way into the AI luas, combat targetting such as friend or foe seems to be handled by C++ if x=y then z style commands, not quite sure how to read into that well enough to work out exactly where, but i can work on that. The main idea i am currently running with would require me to be able to limit the possible targets for a healing ability to set jobs as opposed to friendly mobile entities. From what little C++ i know, i see no reason i would not be able to slip in a line or two to this effect somewhere in the ai packs. For instance, this could mean limiting clerics to only be able to heal combat classes such as knights and/or footmen. While this example isn’t exactly what i want to achieve, it would solve a lot of questions as to how to implement the rest of the mod content. Do you know if something like this would be possible?

You can do that in the aura_buff.lua itself. data/buffs/scripts/aura_buff.lua

Where it checks if it is ok to target the mob or not, just check the job class of the target.

1 Like

Aha, so I see. I am about to go out so will have to have a proper look through it later, a quick skim read reveals a few lines regarding target_type so i shall work from there and also just how out of my depth i am with C++ ^^. It would have taken me a while to read my way through to this particular folder so your help is greatly appreciated. TYVM.