Can this be done so when using certain skill type against certain troops (like humans in town) would get the character become wanted, but you're still free to use it outside town.
For examples, if I cast necromancy type in town, I get the necromancer switch turned on and once combat is finished, the patrol npc become enemies (due to switch is turned on) immediately.
If I cast necromancy against wild animals, monsters, or random enemies outside of town, no switch is turned on.
If I cast necromancy outside the town against road patrol or traveling peasant troops, I turn on the switch as well but after winning I can choose to remove the witness (as none random combats) to turn off the switch so when going back to town I don't become wanted. I'm looking at the troop event involving conditional branch but cannot really figure out anything.
if you want to do that onMap (abs) and not against enemies (random encounter)
or onMap encounter, than it can be done, but it require some scripting.
otherwise, it require a plugin that read notetag or comment tag on the said event
to trigger the switch (as enemies dont use this tag, it wont trigger a switch).
but I think it needs a plugin mostly though to control things easier.
depending on what effects you want this can be done even without a plugin.
there is absolutely no problem with monitoring actions to turn switches or count variables to store the results. this can be done in several ways like a common event attached to a skill or javascript code in the damage formula and so on.
The problem comes with the effects you want to achieve.
For example the random encounter table is static per map and can only be turned on or off completely. If your entire map is the town and you are satisfied with an all-or-nothing reaction then that is OK.
for a more varied effect you either have to use evented encounters only, or to use a plugin for dynamic encounter tables.
and other form of directions are the same - some can be done by events, and others will require tricks or plugins due to limitations of the engine.
Is there a plugin you'd recommend for this? I've checked the script call list but only found if character has skill/learns/forget type of command and $gameParty.BattleMembers.
Yeah, I know the more basic ones for troop events such as add a kill count variable whenever an enemy is death state inflicted but making it a conditional effect related to skill type used seems much harder.
Originally I was attempting to make all certain limited skills add a state to characters so can use state inflicted but some skills (like summoning and damage core plugin don't work well with this), making a preparation skill that gives a state that grants skill would make the situtation become the characters become wanted before they use the forbidden skills.
I would probably try and control it via the troop event. Since you're in control where exactly each battle happens, it should be easy to just add the "if necromancy in town" check to the troops where this would be possible.
Can't you just control a variable to 1 when in town (gates or region IDs), 0 otherwise, then put all your human troops in the beginning. Then in your necromancy skill have it run a common event:
*IF town variable = 1
->necromancer switch ON
*ELSE
->get troop ID
*IF troop ID is < X (meaning human troops)
->necromancer switch ON
->witness event switch ON
*
I think I got the idea. Thanks for the hints.
Each npc outside town encounter needs it own switch since they're individual from each other , so meeting 5 party doesn't get all the switch turn off by killing just one or two of them but defeating all.
Killing randoms without using necro don't turn off others switches. Using event replicate plugin also don't work well with this. And there is another switch required to remove the fallen npc if players didn’t kill them to show they go to report the crime.
If witchery, demonlogy, thievery, or some other crimes are also in, they would all need to be done the same way or combine all of them to one single misbehaviour.
Bigger games that have a crime system (none rpg makers) seem to use the later, variable (bounty money) and switches (eyewitness like skyrim chicken) for this.
All crimes simply add to the same bounty pool rather than individual type of crime, so players characters crime don't get recognized for its type but sum.
Maybe have a none influential variable that increase each time the type of skills is cast so npc recognizes the character for his deeds, although I don't think major rpgs use this.
Didn't realize it would be this complex just to have character recognized for the deeds, seems to be huge amount of work that shouldn't be put in priority. AAA games most likely do this with time count down for bounty degradation without the switches, modern well received crpgs also don't pay attention to this.
Sure AAA games do it, but its not as easy as you think. There's a reason it was years before games added it. The coding was probably one persons entire job and took days.
Remember AAA games have a huge team of coders, artists and such. So something they have had for years still could take you many days to make as you are one person.
As for how to do it, I'd make things more static. At start of battle, turn on a switch if the monster is one you don't want to use the skill on. If skill used, call a common event and if that first switch is on, turn on the 2nd that would relate to the witnesses around. Keep the fights around those witnesses at all times so its an all or nothing.
If you want line of sight and other things though to factor in then yes it would be a plugin. Which is again why older games had all or nothing systems where any bad deed got the entire town after you, witness or none. I remember playing one that stealing an item that no one could have seen had the entire town, every man woman child dog cat and chickens coming after me.
The part where skills are illegal in certain combat was rather easy, though. Stealing items when undetected is a bit harder. Luckily there are already very useful plugins for this. Look at Yanfly's YEP_EventChasePlayer.js plugin and its add-on YEP_X_EventChaseStealth.js
With those plugins you can check if the player is in line of sight of an event when looting a chest for example. And if your player indeed is in line of sight, you can make them wanted.