forums | blogs | polls | tutorials | downloads | rules | help

An Apology, an Update, and some DS1 Mod Talk.

Araknuum's picture

I left here abruptly, with work I'd volunteered for standing unfinished, and for that, I'm sorry. I want to apologize mainly to Iryan for having agreed to work on his mod before I vanished. Please forgive me.

I moved shortly after I started helping on ds2 Yesterhaven, and my priorities moved in turn, so that it is only now that I can make my way back to dungeon siege and modding the hell out of it.

I no longer have DS2 installed, and I doubt I will be working with it at all going forward. I found that modding DS1/LOA is more my flavor, and that there is still a ton of untapped potential in that old gem.

I've had DS installed for about 2 weeks now, and finally began modding items and monsters for it last week. I've aped a dexterity staff template, added it to pcontent/Elddim, and I've broken the balance of Ehb completely a couple times now by editing formulas.gas. I changed the base templates for Krug, Skrubb, and Krug Dog, as well as made a few tweaks in templates.gas/actor_evil. I untanked all the mods I could find and compared them to their vanilla counterparts, and I'm constantly cross referencing how things were done with what I'm trying to do. Seriously more fun than just playing ever was. Smile

My latest playthrough, up until I started modding, was in LoU. Not having played through the Utrae map before (not even once!), I don't know what all is different, but I quickly started examining how battles took place, and what I, as Player, was being asked to accomplish in order to not die. This line of inquiry led me to drop all the new party members in favor of my hero and some mules. I've played through both Ehb and Arrana as a single member party, and it is the best way to play, in my opinion, even if the AI can be duped and mobs taken apart at leisure.

I found out something tho, something that has me eager to mod DS1 again. I found out that I am a master of the vanilla campaign modes. Hard, is just not hard enough, and I've never leveled a char to play through vet/elite/etc, so I'm not sure if that's what I'm missing; how Elite Ehb feels as a game...

I just know for sure that I'm better at this game than this game is at challenging me. I have to do something to change that, and I'm not satisfied with the mods I've found which attempt to re-balance the combat.

My current project palette is something on the order of eXpertAIv06 or the AI changes in Adepts. I will attempt to balance combat in favor of a single character party playthrough of The Kingdom Of Ehb.

Currently, a single character can get all the way through Ehb on Hard Difficulty by drawing single enemies away from groups or danger zones with Explosive Powder. Another tactic I rely heavily on is running after drawing aggro on a group until they stop chasing and are spread out for easy pickings. I Have completed Ehb at least 2 full times this way as just me. The experience slows the game down a ton, while making some very boring tactics too common and mostly still Over Powered. The challenge is in being aware of mob locations and running enough.... been there.

What I love about a single char play of Ehb is that spells matter. Buffs and debuffs, as well as leveling all your skills and attributes, are vital to surviving those encounters that you are forced (or that you decide) to just bully through. I spent time at every Mana Shrine in Ehb, casting buffs on my character, and I had a donkey laden with mana potions to rebuff between shrines if needed. I had specific items for when I was casting Nature or Combat spells that I changed into, sometimes in the middle of battle.

I also love that Death matters, and quick save is my second most frequently pressed key, right after pause.

What I really want is a fresh perspective on my favorite game. I want the systems that govern the game and grant abilities to the player (like pause to give orders) to mean something in every fight. I want gear that changes my options and tactics. I want to speed up the single char playthrough, while making it more challenging than vanilla. I want enemies that don't let me get away with cheap tricks, and are generally more unpredictable.

My last attempt at these goals rendered a mixed result. I changed the difficulty damage modifier in formulas.gas, making go's hit much harder:

// Difficulty level multipliers - damage done from attackers perspective
	difficulty_easy_player	 	=	1.25;
	difficulty_easy_computer  	=	1.93;

	difficulty_medium_player	=	5.05;
	difficulty_medium_computer	=	6.15;

	difficulty_hard_player	 	=	13.42;
	difficulty_hard_computer 	=	12.15;

This set of values is the 3rd attempt. Constant since I started, Hero Life and Mana regen is doubled, armor_scalar is 0.33 (every ~3 points of defense blocks 1 dmg), and chance to hit for all go's is increased slightly (cuz whiff!):

// Variables related to determining whether or not one go was successful in
	// landing a hit on a defending go
	hit_chance		=	70.0;
	attacker_diff_scalar	=	2.3;
	victim_diff_scalar	=	1.5;
	attacker_hit_cap	=	95.0;
	defender_hit_cap	=	5.0;

	// Death threshold is used to determine how far below zero character life can
	// go before the character goes from being unconscious to dead
	death_threshold		=	1.0;

	// Radius of sphere check for when a character is unconscious and has healed
	// through natural recovery - if there is an enemy within this sphere then
	// the character will continue to lie on the ground until threat is gone
	enemy_near_sphere	=	4.0;

	// Minimum amount of time that a character will stay unconscious regardless of
	// how close to zero the character is when he went unconscious
	min_unconscious_duration=	3.0;

	// Armor scalar is used for tuning amount of damage that is done with regard
	// to the amount of armor the victim has
	armor_scalar = 0.33

The result of these changes, as well as AI changes to most mobs from the Farmhouse to the Crypt, was a damn enjoyable, tense, and more player skill oriented playthrough, all the way to the first trapped box in the Crypt, which one-shot killed me. I avoided traps up until then, but this box was a chest type and the arrow in it did massive damage.

My thought is that, of course, the damage modifier is excessive. I plan to look at trap templates to see if I can reduce their base damage to a survivable level. I plan to consider scrapping most of my changes to formulas.gas and instead, edit the life total and damage output of each evil go and trap. This presents the problem of damage based in spells that mobs use, and having to edit those too. Each mob will be revised, so damage/health/defense/AI can be edited or at least noted simultaneously.

I could use some help, mainly in basic mod best practices and useful reference material. I haven't opened or tried to use DSLOAMod.exe, mainly out of sheer ignorance, and partly because I'm still fiddling with templates.gas and formulas.gas, which I'm assuming require a restart to test. I'm likely wrong, but so far a custom shortcut res_path and restarting from scratch between edits has been my way.

The mod I intend to create will hopefully change the way Dungeon Siege is played, and add some new life to the campaign that started it all. If you have questions/comments/suggestions, please comment here, and thank you for reading this if you did.... here's a cookie!

:spider:
not a cookie, sry

blogs: 

Comments

Araknuum's picture

I scrapped all my changes to templates and formulas dot gases... My rebalancing is going to (have to) take place on a monster by monster basis for the vast majority of [mind] altering formulas. I understand that by altering base templates, I can achieve most of the mob alert level goals I have. Most mob behavior formulas seem to reside in base template [mind]'s, with exceptions usually being made for ranged/magic mob variants.

Revived/Adepts existence has simplified my task immensely when referencing how to edit [mind]s this way. eXpertAI too, but only for a good comparison of mob behavior variables. Adepts man, why you make hard so hard? Smile

On hard Ehb, no forms or temps mods, the first group of Krug act in concert thanks to increased com range and job distance, also I made Krug not give up when they reach their job distance limit. They sometimes flee at low health, then forget you were there 5 seconds later, but if they see you or still remember where to look for you, they will keep coming. Not a one seems interested in sitting out that first battle, as soon as one sees you, they all start heading your way.

This led to being surrounded and swarmed if I didn't avoid them. One Krug hacking at me as I hack at it is really no threat, they take 2-3 more damage than weapons and spells say they will... and that's right off the bat. I want all enemies to feel dangerous, so I'm thinking these [krug_scavenger]'s need a little more life, and possibly movement speed. Being swarmed, and not either running or potion chugging (impractical at start of game right?) is fatal in a very few seconds, but parting shots that land as I flee don't kill me until I'm very VERY low on health, making it possible to flee AFTER being overwhelmed, if I'm quick enough.

I want you to be quicker. Not your character, YOU. If you are running low on health, I want you to react, and I want monsters to revel in causing your death as their only reason for existing. I want there to be meaningful decisions in every moment of combat, and I want those decisions to matter when you make them. I think these few changes I've made to the Krug so far go a ways toward that, and all without my forms_and_temps.dsres, just a new set of [mind] variables... so far. Smile

Current play through notes: Legends of Utrae is AWESOME!

:spider:

Araknuum's picture

Current state of [base_krug] [mind] in my SM_Krug_AI.dsres (SM=Solo Mode):

[mind]
	{
		com_channels					= dyn_party, krug;
//Making Krug more Alert but Stupid in interesting ways. -JD
		com_range					= 15.4;
		melee_engage_range				= 14.0;
		ranged_engage_range				= 14.8;
		sight_range					= 15.0;
		sight_fov					= 90.0;
		outer_comfort_zone_range			= 6.0;
		inner_comfort_zone_range         		= 2.5;
		visibility_memory_duration			= 5.0
		on_enemy_spotted_alert_friends			= true;
		on_alert_projectile_near_missed_alert_friends	= true;
		on_enemy_spotted_attack				= true;
		on_alert_projectile_near_missed_attack		= true;
		on_enemy_entered_icz_attack			= true;
//Making Krug Relentless. -JD
		job_travel_distance_limit			= 30.0;
		on_job_reached_travel_distance_abort_attack 	= false;
		on_engaged_lost_consciousness_abort_attack	= false;
		actor_life_ratio_low_threshold  		= 0.05;
		on_life_ratio_low_flee                          = true;
		flee_distance					= 7.0;
		flee_count  					= 1;
		on_enemy_entered_icz_abort_flee			= true;
		actor_balanced_attack_preference		= 0.95;

		jat_fidget					= world\ai\jobs\common\job_fidget.skrit
			?still					= false;

		jat_flee_from_object				 = world\ai\jobs\common\job_flee_from_object.skrit
			?run_chance						 = 0.63;
	}

Most interesting to note is what on_enemy_entered_icz_abort_flee = true; does. The behavior I've noted is from the first few fights in Ehb, based solely on battles with [krug_scavenger] and [krug_grouse]. IF they are attacking you, and you remain in their inner comfort zone (icz), they won't flee at low health. If you get them to low health from outside of their icz, they will likely flee.

?run_chance = 0.63; seems to reduce their chance to flee, but when I had it plugged into [actor_evil]s [mind], it seemed to possibly be slowing mob movement speed while fleeing. Wolves seemed to stumble away hurt at very slow speed, which was kinda dope, actually. With SM_Krug_AI.dsres only, I can't discern a difference in krug flee speed, just a decrease in whether they will flee or not.

Another interesting note is that I can only get sight_fov to make some krug with their back turned ignore you until you are in their icz. MOST Krug from your farm to the next, phrak infested one, will attack and "spot" you no matter their facing, and often you will be spotted by one of their friends who will alert the dumb one. Sometimes, none of that applies and a Krug will just stand there, fidgeting until you hit it. Puzzled Not a desirable trait, but kind of unpredictable and certainly not "broken", but I'll have to experiment to see about making Krug Alert and Relentless, but also realistically Idiotic.

:spider:

Araknuum's picture

So, I'm pretty ignorant still and I can't figure out why adding a new formulas.gas to my mod should so consistently break things. I'm mad at me for this, but not too worried.

I changed the life and mana regen formulas to regain life at 0.01 every 1 second and mana at 1.5 every 3 seconds. I also, at first, changed the difficulty of hard computer damage to 1.85 from the default 1.45. Testing rendered 1 damage to everything, from everything. 1 damage for every hit landed. So, I reset the default difficulty and tried again.... Same thing. SO, I removed the global file from SM_Krug_AI.dsres, made some changes to Krug child life totals, and it worked! Krug are more apt to overwhelm you if you let them, but can be handled without excessive running or potion chugging. Running happens, but Krug die quick enough so far. Chugging can still work, which is why I wanted to nerf life regen, to make potions matter more. Spell healing can start out pretty excessive, but balances as your max life goes up.

Araknuum wrote:
So, I'm pretty ignorant still and I can't figure out why adding a new formulas.gas to my mod should so consistently break things. I'm mad at me for this, but not too worried.

I changed the life and mana regen formulas to regain life at 0.01 every 1 second and mana at 1.5 every 3 seconds. I also, at first, changed the difficulty of hard computer damage to 1.85 from the default 1.45. Testing rendered 1 damage to everything, from everything. 1 damage for every hit landed. So, I reset the default difficulty and tried again.... Same thing. SO, I removed the global file from SM_Krug_AI.dsres, made some changes to Krug child life totals, and it worked! Krug are more apt to overwhelm you if you let them, but can be handled without excessive running or potion chugging. Running happens, but Krug die quick enough so far. Chugging can still work, which is why I wanted to nerf life regen, to make potions matter more. Spell healing can start out pretty excessive, but balances as your max life goes up.


Did you try setting the priority of your mod higher than the default game. In both tank creator(DS1) and tank creator 2 (DS2) Under the Advanced button you will find Misc. and when you click on that you will see at the bottom of the menu Priority. The Maximum you can set priority at is 35767. If you set it there it will for sure place your mod and the formulas contained there in at a higher priority than DS1. I use that level for testing my modifications then reduce the number until something crashes or my changes no longer work.
Elf

Araknuum's picture

bare_elf wrote:

Did you try setting the priority of your mod higher than the default game. In both tank creator(DS1) and tank creator 2 (DS2) Under the Advanced button you will find Misc. and when you click on that you will see at the bottom of the menu Priority. The Maximum you can set priority at is 35767. If you set it there it will for sure place your mod and the formulas contained there in at a higher priority than DS1. I use that level for testing my modifications then reduce the number until something crashes or my changes no longer work.
Elf

AHA!
I was just thinking that, thank you SO much for the confirm! I didn't want to mess with priority until I knew what it was. Smile Does setting a formulas.gas mod priority require the step down process, or could it be left at 35767 without harming the game?

Araknuum wrote:
bare_elf wrote:

Did you try setting the priority of your mod higher than the default game. In both tank creator(DS1) and tank creator 2 (DS2) Under the Advanced button you will find Misc. and when you click on that you will see at the bottom of the menu Priority. The Maximum you can set priority at is 35767. If you set it there it will for sure place your mod and the formulas contained there in at a higher priority than DS1. I use that level for testing my modifications then reduce the number until something crashes or my changes no longer work.
Elf

AHA!
I was just thinking that, thank you SO much for the confirm! I didn't want to mess with priority until I knew what it was. Smile Does setting a formulas.gas mod priority require the step down process, or could it be left at 35767 without harming the game?


I often leave my armor and weapon mods set at 35767, It is just when I intend to use it with some other mod I might step it down.
Elf

Araknuum's picture

hmm... still not working. Took out my custom formulas and tried a default formulas.gas tanked both with SM_Krug_AI.dsres and as a separate .dsres. The changes I made to Krug AI might still be present, but all hits both ways only do 1 damage. Priority is either not working in TankCreator2, or something I changed in Krug templates breaks any formulas changes, or even the presence of a mod containing formulas.gas maybe?

list of stuff "to try":

1. I'll first put in a mod I know has worked before that contains a custom formulas.gas. If that works I can reasonably deduce that it is somehow MY attempts to mod formulas.gas which are faulty. I'll then move on to a new DL/install of TankCreator and go from there.

2. If that fails, I will remove a line of code from my [base_krug] [mind] and test each iteration with a default formulas.gas until it works or [base_krug] and its children are also default... At which point I'll likely start learning a different aspect of modding, to gain some distance and time away from the topic of how Krug treat themselves and others.

:spider:

MASSIVE EDIT: It's these discoveries that I love to make and hate to have not made until I do. Laughing out loud

So what had happened was the "default" formulas.gas that I was editing and including in my mod, is the the one from the Resources folder, not the DSLOA/Expansion.dsres. . . :construction: :construction: :construction:

Commencing testing with this nifty new formulas.gas I just found, which, surprise surprise, matches in many ways the forms I found in Adepts and Revived and every mod that works and edits formulas.gas.

:oops:

Side note: if I'm flooding da blogs or in general displaying undesirable siegetheday behavior by posting these, lemme know and I will save up a few and only release blog posts for major updates, utilizing the rest of the forum as it was intended. ThankS! Wink

In my humble opinion you are a LONG way from undesirable behavior :thumbup:
Quite educational for me

Insane Dwarf

your questions, comments and the process you are going through is very interesting. I wish I could help more.
Elf

Araknuum's picture

Laughing out loud ahhhhh... thx ya'll! I hope this process is worth as much to document as it's been to go through. You have to admit Elf, so much of how you are helping me is in how you've helped others here. I'm only learning because so much is available to learn from. I'm still very new to the back end of DS, so I can maybe pose the kind of questions that other new modders might also learn from?

The question of, "was that the right formulas.gas?" is answered with, HoORRAY! Krug AI is the same as from last night, but now including SM_FormsDEFAULT.dsres with only *cosmetic changes for rapid reference,

I match the indents of all equal signs and values in the document. Looks like this:

///////////////////////////////////////////////////////////////////////////////
//	combat_constants
//
//	This block contains values/coefficients used in combat related formulas
//	for calculating how much damage to take, whether or not a hit was a success
//	and other stuff of the like.
//

[combat_constants]
{
	//
	// Attack/defend rating coefficients
	//
	// rating = (skill_scalar * skill_level) + (dex_scalar * dex) + (int_scalar * int);

	[attack_rating]	{	skill_scalar = 0.45; dex_scalar = 0.55; int_scalar = 0.15; }
	[defend_rating]	{	skill_scalar = 0.45; dex_scalar = 0.55; int_scalar = 0.15; }

	// Variables related to determing whether or not one go was successfull in
	// landing a hit on a defending go
	hit_chance			=	50.0;
	attacker_diff_scalar		=	2.1;
	victim_diff_scalar		=	2.1;
	attacker_hit_cap		=	95.0;
	defender_hit_cap		=	5.0;

	// Death threshold is used to determine how far below zero character life can
	// go before the character goes from being unconscious to dead
	death_threshold			=	0.66;

	// Radius of sphere check for when a character is unconscious and has healed
	// through natural recovery - if there is an enemy within this sphere then
	// the character will continue to lie on the ground until threat is gone
	enemy_near_sphere		=	8.0;

	// Minimum amount of time that a character will stay unconscious regardless of
	// how close to zero the character is when he went unconscious
	min_unconscious_duration	=	5.0;

	// Armor scalar is used for tuning amount of damage that is done with regard
	// to the amount of armor the victim has
	armor_scalar			=	1.0;

	// Aiming error calculation constants for ranged combat
	// error_*((100 - ATan( (dex_*Dexterity + int_*Intelligence + skill_*Skill_level)/14.7 )*63)/100);
	error_scalar			=	4.0;	// +/- amount of error in degrees
	dex_scalar			=	0.35;
	int_scalar			=	0.10;
	skill_scalar			=	0.55;

	// Difficulty level multipliers - damage done from attackers perspective
	difficulty_easy_player	 	=	1.35;
	difficulty_easy_computer  	=	0.5;

	difficulty_medium_player	=	1.0;
	difficulty_medium_computer	=	1.0;

	difficulty_hard_player	 	=	0.85;
	difficulty_hard_computer 	=	1.45;

	// variables dealing with attack area.
	attack_area_radius  		=	6.0;
}

///////////////////////////////////////////////////////////////////////////////
//	recalculation_constants
//
//	Only actors that level up use these recovery rates otherwise there could be
//	a problem where a monsters was knocked unconscious instead of dying

[recalculation_constants]
{
	// If any attribute is greater than 10 then 9 points are subtracted before
	// performing this calculation:
	// max_life = (str * str_percent * constant) + (dex * dex_percent * constant )
	//			+ (int * int_percent * constant ) + max_life_base
	max_life_base		= 0.0;
	max_life_constant	= 14.0;
	max_life_str_percent	= 2.1;
	max_life_dex_percent	= 0.7;
	max_life_int_percent	= 0.7;

	// max_mana = (str-9 * str_percent * constant) + (dex-9 * dex_percent * constant)
	//			+ (int-9 * int_percent * constant) + max_mana_base
	max_mana_base		= 0.0;
	max_mana_constant	= 1.0;
	max_mana_str_percent	= 1.0;
	max_mana_dex_percent	= 4.0;
	max_mana_int_percent	= 25.0;

	// Period before synchronizing mana and life according from the server to all clients
	sync_period		= 5.0;
	sync_random		= 1.0;	// +/- amount to add to sync_period when resetting for a go
}

///////////////////////////////////////////////////////////////////////////////
//	pack_constants
//
// 	Pack animal/person related - takes the sum of all the actors skills in the
//	party and averages them together. The average of each skill is then
//	multiplied by the corresponding influence and then the pack animal/person's
//	attribute is set to that value

[pack_constants]
{
	strength_influence		=	0.9;
	intelligence_influence		=	0.2;
	dexterity_influence		=	1.5;
}

///////////////////////////////////////////////////////////////////////////////
//	actor_skills
//
//	Defines characteristics of character skills in the game - all skills are
//	based off of the amount of experience the character has received from killing
//	monsters.
//
//	Level is determined from the specified xp_table
//

[actor_skills]
{
	//
	//	Basic skills
	//

	[skill*] { name		= "Uber"; }

	[skill*] { name	= "Strength";		max_level = 180; }
	[skill*] { name	= "Intelligence"; 	max_level = 180; }
	[skill*] { name	= "Dexterity"; 		max_level = 180; }

	//
	//	Combat skills
	//
	//	Depending on how a monster/actor was attacked the weapon/spell used improves
	//	the combat skills below which also effect the innate skills of the character
	//	by redistributing a specified percentage of the experience attained.
	//

	[skill*]
	{
		name		= "Melee";
		screen_name	= "Fighter";

		max_level 	= 180;

	 	str_influence 	= 0.64;
	 	dex_influence 	= 0.27;
	 	int_influence 	= 0.09;

		[level_up_indicator*] {	level_range	= 1-5;		script	= melee_up_locked1, bip01; }
		[level_up_indicator*] { level_range	= 6-10;		script	= melee_up_locked2, bip01; }
		[level_up_indicator*] {	level_range	= 11-20;	script	= melee_up_locked3, bip01; }
		[level_up_indicator*] {	level_range	= 21-250;	script	= melee_up_locked4, bip01; }
	}

	[skill*]
	{
		name		= "Ranged";
		screen_name	= "Archer";

		max_level 	= 180;

		str_influence 	= 0.25;
		dex_influence 	= 0.62;
		int_influence 	= 0.13;

		[level_up_indicator*] { level_range	= 1-5;		script = ranged_up_locked1, bip01; }
		[level_up_indicator*] { level_range	= 6-10;		script = ranged_up_locked2, bip01; }
		[level_up_indicator*] { level_range	= 11-20;	script = ranged_up_locked3, bip01; }
		[level_up_indicator*] { level_range	= 21-250;	script = ranged_up_locked4, bip01; }
	}

	[skill*]
	{
		name		= "Nature Magic";
		screen_name	= "Nature Mage";

		max_level 	= 180;

		str_influence 	= 0.09;
		dex_influence 	= 0.18;
		int_influence 	= 0.73;

		[level_up_indicator*] {	level_range	= 1-5;		script = gmagic_up_locked1, bip01; }
		[level_up_indicator*] {	level_range	= 6-10;		script = gmagic_up_locked2, bip01; }
		[level_up_indicator*] {	level_range	= 11-20;	script = gmagic_up_locked3, bip01; }
		[level_up_indicator*] {	level_range	= 21-250;	script = gmagic_up_locked4, bip01; }
	}

	[skill*]
	{
		name		= "Combat Magic";
		screen_name	= "Combat Mage";

		max_level 	= 180;

		str_influence 	= 0.13;
		dex_influence 	= 0.17;
		int_influence 	= 0.7;

		[level_up_indicator*] {	level_range	= 1-5;		script = dmagic_up_locked1, bip01; }
		[level_up_indicator*] {	level_range	= 6-10;		script = dmagic_up_locked2, bip01; }
		[level_up_indicator*] {	level_range	= 11-20;	script = dmagic_up_locked3, bip01; }
		[level_up_indicator*] {	level_range	= 21-250;	script = dmagic_up_locked4, bip01; }
	}
}

///////////////////////////////////////////////////////////////////////////////
//  experience_table
//
//	Contains experience values for each level starting at 0 to max
//

[experience_table]
{
	* = [[	0,70,650,1450,2350,3350,4650,6650,9450,12950,17100,22000,27800,
			34300,41300,49191,58327,68882,81054,95071,111190,129706,150954,
			175317,203567,236338,274352,318449,369600,428936,497766,577609,
			670226,777662,902288,1046855,1214551,1409080,1634732,1896489,
			2200128,2552348,2960924,3434872,3984651,4622395,5362179,6220327,
			7215779,8370504,9709985,11263782,13066188,15156978,17582294,
			20395661,23659167,27444833,31836207,36930200,42839232,49780637,
			58283859,68700306,81460453,97091634,116239830,139696370,168430631,
			203630102,246749453,299570658,364276635,443541456,540640862,659587634,
			805297430,983791930,1202447693,1470301002,1798421306,2200368678,
			2692754209,3295926485,4034812522,4939947918,6048738778,7407007581,
			9070886865,11109138988,13605997839,16664649931,20411498744,
			25001388540,30624003540,37511706915,45949143550,56285003427,
			68946431776,84456681504,103456737421,126731805919,155243764829,
			190170914494,232956672834,285369226800,349574605408,428226194203,
			524574390477,642600930913,787183442946,964297020188,1181261152309,
			1447042214156,1772624014920,2171461720855,2660037910626,
			3258543743095,3991713387870,4889846202719,5990058900910,
			7337819456193,8988826136414,11011309319686,13488851219194,
			16523840046091,20241701359039,24796081467402,30375197100145,
			37209613750256,45581774146643,55837670632215,68401143827042,
			83791398490705,102644460453692,125739461358351,
			154030837466559,188687773199113,231142519471492,
			283149583655156,346858237280144,424901337970755,
			520504136316754,637617564290602,781081513558566,
			956824851411821,1172110440282060,1435835286648100,
			1758898223446500,2154650321024540,2639446640557650    ]];
}

///////////////////////////////////////////////////////////////////////////////
//	experience_limiter

[experience_limiting_factors]
{
	first_level	= 0.10;
	later_levels	= 0.025;
}


///////////////////////////////////////////////////////////////////////////////
//  multiplayer scaling stuff
//
//	Based on the number of players in a party the life and experience point
//	worth of computer controlled gos will be scaled by the values below.
//	

[mp_scaling]
{
	life	= [[ .35, .5, .8, 1, 2.15, 3.1, 4.17, 5 ]];
	xp	= [[ .35, .59, .8, 1, 1.25, 1.5, 1.75, 2 ]];
}

///////////////////////////////////////////////////////////////////////////////
//	physics_constants
//
//	This block contains global values associated with settings for physics
//	objects

[physics_constants]
{
	enemy_attach_life	=	12;
	party_attach_life	=	4;
}

///////////////////////////////////////////////////////////////////////////////
//	general_formulas
//
//	These formulas are meant for general purpose formula evaluation allowed
//  from skrit.
//
//	The function for a formula must be named the same as the formula name, take
//	no parameters and return the type that the caller is interested in. Other
//	functions can be stored in the skrit (or you can do #include) for utility
//	purposes.
//
//	If you put properties in the formula, then you can set those properties in
//	the caller by using the URL-style formatting. For example:
//
//		float f$ = ContentDb.EvalFloatFormula( "jooky?prop1=10&prop2=yo", 0.0 );
//
//	Note that the second parameter in this function is a default return value.
//	This will be used if there is an error in the function call. This parameter
//	is optional and defaults to 0.0, 0, or false depending on function.

[general_formulas]
{
	skrit =
	[[
		// Recovery rate stuff
		property float str$		 = 1.0		doc = "default strength";
		property float int$		 = 1.0		doc = "default intelligence";
		property float dex$		 = 1.0		doc = "default dexterity";

		property float melee$		 = 0 		doc = "default melee skill level";
		property float ranged$		 = 0 		doc = "default ranged skill level";
		property float nmagic$		 = 0 		doc = "default nature magic skill level";
		property float cmagic$		 = 0		doc = "default combat magic skill level";


		property float lr_unit$		 = 1.0		doc = "default life_recovery_unit";
		property float lr_period$	 = 4.0		doc = "default life_recovery_period";

		property float mr_unit$		 = 1.0		doc = "default mana_recovery_unit";
		property float mr_period$	 = 3.0		doc = "default mana_recovery_period";

		property float guts_rate_high$	 = 12.0		doc = "Number of seconds before spewing guts again, Max ObjectDetailLevel";
		property float guts_rate_low$	 = 25.0		doc = "Number of seconds before spewing guts again, Min ObjectDetailLevel";
		
		property float in_player_high$	 = 0.2		doc = "seconds between splash checks while in water with player Max LODFI";
		property float in_player_low$	 = 0.4		doc = "seconds between splash checks while in water with player Min LODFI";
		
		property float out_player_high$	 = 1.0		doc = "seconds between splash checks not in water with player Max LODFI";
		property float out_player_low$	 = 2.0		doc = "seconds between splash checks not in water with player Min LODFI";

		property float in_monster_high$	 = 0.2		doc = "seconds between splash checks while in water with monster Max LODFI";
		property float in_monster_low$	 = 0.6		doc = "seconds between splash checks while in water with monster Min LODFI";
		
		property float out_monster_high$ = 1.0		doc = "seconds between splash checks not in water with monster Max LODFI";
		property float out_monster_low$	 = 2.0		doc = "seconds between splash checks not in water with monster Min LODFI";
		
		property int skill_type$ = 0			doc = "Which skill type to check for damage lookup, 0 = melee, 1 = ranged, 2 = combat, 3 = nature";
		
		bool should_spawn_broken_container$
		{
			// $ yo, this is just test stuff i added, needs tweaking. -sb

			if ( WorldOptions.ObjectDetailLevel >= .9 )
			{
				// lod of .9+ means always show it
				return ( true );
			}
			else if ( WorldOptions.ObjectDetailLevel >= .5 )
			{
				// lod of .5+ means show it 50% of the time
				return ( Math.RandomInt( 1 ) == 1 );
			}

			// below .5 means never show it
			return ( false );
		}

		int frames_before_next_guts_spew$
		{
			// $ this formula determines now many frames must pass before an actor can play an effect when he is hit again. -ET
			return ( Math.Round( ( WorldOptions.ObjectDetailLevel * guts_rate_high$ ) + ( (1.0 - WorldOptions.ObjectDetailLevel) * guts_rate_low$ ) ) );
		}

		float water_check_time_player_in$
		{
			// $ this formula determines now much time must pass before an actor will check to see if he make a splash in the water again. -ET
			return ( WorldOptions.ObjectDetailLevel * in_player_high$ ) + ( (1.0 - WorldOptions.ObjectDetailLevel) * in_player_low$ );
		}
        
		float water_check_time_player_out$
		{
			// $ this formula determines now much time must pass before an actor will check to see if he make a splash in the water again. -ET
			return ( WorldOptions.ObjectDetailLevel * out_player_high$ ) + ( (1.0 - WorldOptions.ObjectDetailLevel) * out_player_low$ );
		}
        
		float water_check_time_monster_in$
		{
			// $ this formula determines now much time must pass before an actor will check to see if he make a splash in the water again. -ET
			return ( WorldOptions.ObjectDetailLevel * in_monster_high$ ) + ( (1.0 - WorldOptions.ObjectDetailLevel) * in_monster_low$ );
		}
        
		float water_check_time_monster_out$
		{
			// $ this formula determines now much time must pass before an actor will check to see if he make a splash in the water again. -ET
			return ( WorldOptions.ObjectDetailLevel * out_monster_high$ ) + ( (1.0 - WorldOptions.ObjectDetailLevel) * out_monster_low$ );
		}

		float life_recovery_rate$
		{
			float result$		 = 0;
			float life_recovery$ = (lr_unit$ / lr_period$);

			// Determine what formula to use based on the strength of the actor
			if ( str$ < 10 )
			{
				// The actor is below average strength so use a weak formula
				result$ = (life_recovery$ / 9) * str$;
			}
			else
			{
				// The actor is at or above average strength so use the standard formula
				result$ = (str$ - 9) * life_recovery$;
			}

			return result$;
		}

		float mana_recovery_rate$
		{
			float result$		 = 0;
			float mana_recovery$ = (mr_unit$ / mr_period$);

			// Determine what formula to used based on the intelligence of the actor
			if ( int$ < 10 )
			{
				// The actor is of below average intelligence so treat him like he is "special."
				result$ = mana_recovery$;
			}
			else
			{
				// If the actor has an intelligence above or equal to 10 then use this formula
				result$ = (int$ - 9) * mana_recovery$;
			}

   			return result$;
		}
		
		// TAT 5/28/03 - damage formulas
		float damage_blocked_amount$
		{
			//0 = melee, 1 = ranged, 2 = combat, 3 = nature
			if (skill_type$ == 0)
			{
				// melee
				return (melee$+1.552)*4.059;
			}
			else if (skill_type$ == 1)
			{
				// ranged
				return (ranged$+1.949)*3.232;
				
			}
			else if (skill_type$ == 2)
			{
				// combat
				return (cmagic$+2.177) * 2.894;				
			}
			else
			{
				// nature
				return (nmagic$+2.177) * 2.894;				
			}

			return 0;
		}		
	]];
}

///////////////////////////////////////////////////////////////////////////////
// set item constants
//	any constants dealing with set items are located here.

[set_items]
{
	// this is an integer value from 0 -> 100 where 0 will result in never
	// dropping set item for unique calls and 100 will only drop set
	// items.
	unique_drops_set	=	20;
}

/////////////////////////////////////////////////////////////////////////////
// game end information
//

[end_game_timer]
{
	// the timer that counts down after a player has beaten the game will
	// go for this length of time i want a 60 second timer, but if i set
	// it to 60 seconds it won't appear until only 10 seconds are left, so
	// i just added on a 1 second buffer.  this way it will appear when it
	// hits 60 seconds
	timer_length = 61;
}

So, this file, included as a separate .dsres Makes no changes to my Krug buddies (I call them that now), which is EXACTLY PERFECT! Smile My Krug do strange things sometimes still, but that's all in their [mind]'s. Damage is pretty dangerous, and to be avoided, hopefully by both sides of the bloodshed now. Combat speed is fast and full of stuff you could do wrong, but manageable by a single character with skill. Think Path Of Exile, which immediately reminded me of DS2. "Right Near De BEACH! BOYEE!"

Current SM_Krug_AI.dsres

[t:template,n:base_krug]
{
	  doc = "Generic Krug";
	  specializes = actor_evil;
	[actor]
	{
		race = krug;
	}
	[aspect]
	{
		model = m_c_eam_kg_pos_1;
		[voice]
		{
			[die]			{ priority = high; * = s_e_die_krug_scout;  }
			[enemy_spotted]	{ priority = high; * = s_e_call_krug_scout_SED; }
			[hit_critical]	{ priority = low; * = s_e_hit_krug_scout_SED;  }
			[hit_glance]	{ priority = low; * = s_e_hit_krug_scout_SED;  }
			[hit_solid]		{ priority = low; * = s_e_hit_krug_scout_SED;  }
		}
	}
	[body]
	{
		min_move_velocity = 1.500;
		avg_move_velocity = 2.100;
		max_move_velocity = 2.700;
		[bone_translator]
		{
			  body_anterior  = bip01_head;
			  body_mid       = Bip01_Spine3;
			  body_posterior = bip01_pelvis;
			  kill_bone      = Bip01_Spine3;
			  shield_bone    = shield_grip;
			  weapon_bone    = weapon_grip;
		}
		[chore_dictionary]
		{
			  chore_prefix = a_c_eam_kg_fs;
			[chore_attack]
			{
				  chore_stances = 0,1,3,6;
				  skrit = select_attack;
				[anim_files]
				{
					  00 = at;
					  01 = at-04;
					  02 = at-02;
					  03 = at-03;
					  qffg = dff;
				}
			}
			[chore_default]
			{
				  chore_stances = 0,1,3,6;
				  skrit = infinite_loop;
				[anim_files]
				{
					  00 = dfs;
				}
			}
			[chore_die]
			{
				  chore_stances = 0,1,3,6;
				  skrit = select_transition;
				[anim_files]
				{
					  00 = di;
					  01 = di-02;
					  02 = di-03;
					  03 = di-04;
				}
			}
			[chore_fidget]
			{
				  chore_stances = 0,1,3,6;
				  skrit = select_fidget;
				[anim_files]
				{
					  00 = dsf;
					  01 = dsf-02;
					  02 = dsf-03;
				}
			}
			[chore_magic]
			{
				  chore_stances = 0;
				  skrit = select_attack;
				[anim_files]
				{
					  00 = mg;
				}
			}
			[chore_misc]
			{
				  chore_stances = 1;
				  skrit = select_transition;
				[anim_files]
				{
					  chrg = hit;
				}
			}
			[chore_walk]
			{
				  chore_stances = 0,1,3,6;
				  skrit = select_walk;
				[anim_files]
				{
					  00 = wl;
				}
			}
		}
	}
	[guts_manager]
	{
		effect_name = melee_hit_2;
	}
	[water_effects] {}
	[common]
	{
		membership = monster;
	}
	[mind]
	{
		com_channels					= dyn_party, krug;
//Making Krug more Alert but Stupid in interesting ways. -JD
		com_range					= 16.5;
		melee_engage_range				= 14.0;
		ranged_engage_range				= 14.8;
		sight_range					= 15.0;
		sight_fov					= 90.0;
		outer_comfort_zone_range			= 6.0;
		inner_comfort_zone_range         		= 2.5;
		visibility_memory_duration			= 5.0
		on_enemy_spotted_alert_friends			= true;
		on_alert_projectile_near_missed_alert_friends	= true;
		on_enemy_spotted_attack				= true;
		on_alert_projectile_near_missed_attack		= true;
		on_enemy_entered_icz_attack			= true;
//Making Krug Relentless. -JD
		job_travel_distance_limit			= 30.0;
		on_job_reached_travel_distance_abort_attack 	= false;
		on_engaged_lost_consciousness_abort_attack	= false;
		actor_life_ratio_low_threshold  		= 0.15;
		on_life_ratio_low_flee                          = true;
		flee_distance					= 7.0;
		flee_count  					= 1;
		on_enemy_entered_icz_abort_flee			= true;
		on_engaged_lost_loiter 				= true;
		actor_balanced_attack_preference		= 0.95;

		jat_fidget					= world\ai\jobs\common\job_fidget.skrit
			?still					= false;

		jat_flee_from_object				= world\ai\jobs\common\job_flee_from_object.skrit
			?run_chance				= 0.63;
	}
	[physics]
	{
		  break_sound = s_e_meat_explosion;
		  explosion_magnitude = 1.5;
		  fire_resistance = 0.0;
          fire_burn_threshold =	20;
		  gib_gore_good = false;
		[break_particulate]
		{
			  frag_glb_krug_01 = 1;
			  frag_glb_krug_02 = 1;
			  frag_glb_krug_03 = 1;
			  frag_glb_krug_04 = 1;
			  frag_glb_krug_05 = 1;
			  frag_glb_krug_06 = 1;
			  frag_glb_krug_07 = 1;
			  frag_glb_krug_08 = 1;
		}
	}
}

[t:template,n:krug_commander]
{
	  category_name = "1W_evil_a";
	  doc = "krug commander";
	  specializes = base_krug;
	[actor]
	{
		[skills]
		{
			  dexterity 		= 12, 0;
			  intelligence 		= 9, 0;
			  melee 		= 6,  0;
			  strength 		= 16, 0;
		}
	}
	[aspect]
	{
		  experience_value 		= 151;
		  life 				= 190;
		  mana 				= 18;
		  material 			= steel;
		  max_life 			= 190;
		  max_mana 			= 18;
		  model 			= m_c_eam_kc_pos_1;
		  scale_base 			= 1.2;
		  selection_indicator_scale 	= 0.85;
		[textures]
		{
			  0 = b_c_eam_kc;
		}
	}
	[attack]
	{
		  damage_max = 34;
		  damage_min = 30;
	}
	[body]
	{
		min_move_velocity = 1.75;
		avg_move_velocity = 2;
	}
	[common]
	{
		  screen_name 	= "Krug Commander";
		  membership 	= krug, monster;
	}
	[defend]
	{
		  defense = 86;
	}
	[inventory]
	{
		[pcontent]
		{
			[oneof*]
			{
				  es_weapon_hand = ax_d_d_2h1b_avg;
			}
    		[oneof*]
			{
				[all*]
				{
					[all*]
					{
        				chance 	= 0.01;
    	        	    		il_main = #spell/2-4;
					}
					[all*]
					{
        				chance 	= 0.02;
    	        	    		il_main = #spell/5-10;
					}
					[oneof*]
					{
					chance 	= 0.40;
		           	    	il_main = #weapon/31-35;
		                	il_main = #armor/40-73;
		    			il_main = potion_mana_small;
					il_main = potion_health_small;
                    }
                    [oneof*]
					{
	                   		chance = 0.004;
	                   		il_main = #weapon/-rare(1)/32-44;
	                   		il_main = #armor/-rare(1)/55-99;
                       			il_main = #*/-rare(1)/32-44;
	            			}
					[oneof*]
					{
                       			chance = 0.002;
	                   		il_main = #weapon/-unique(2)/32-44;
	                   		il_main = #armor/-unique(2)/55-99;
                       			il_main = #*/-unique(2)/32-44;
                    			}
					[gold*]
					{
						  chance 	= 0.6;
						  max 		= 115;
						  min 		= 90;
					}
				}
			}
		}
	}
	[mind]
	{
		jat_fidget					= world\ai\jobs\common\job_fidget.skrit
			?social					= 0.35
			&still					= false;

		jat_brain					= world\ai\jobs\common\brain_hero.skrit
			?actor_creates_own_party		= true
			&form_party_on_friend_entered_ICZ	= true
			&form_party_on_friend_entered_OCZ	= true
			&party_template				= "party_krug_commander";
	}
	[physics]
	{
		  break_sound = s_e_meat_explosion;
		  explosion_magnitude = 1.5;
		[break_particulate]
		{
			  frag_glb_krug_commander_01 = 1;
			  frag_glb_krug_commander_02 = 1;
			  frag_glb_krug_commander_03 = 1;
			  frag_glb_krug_commander_04 = 1;
			  frag_glb_krug_commander_05 = 1;
			  frag_glb_krug_commander_06 = 1;
			  frag_glb_krug_commander_07 = 1;
			  frag_glb_krug_commander_08 = 1;
		}
	}
}

[t:template,n:krug_grouse]
{
	  category_name = "1W_evil_a";
	  doc = "krug grouse";
	  specializes = base_krug;
	[actor]
	{
		[skills]
		{
			  dexterity 		= 4, 0;
			  intelligence 		= 3, 0;
			  strength 		= 5, 0;
		}
	}
	[aspect]
	{
		  experience_value 		= 6;
		  life 				= 25;
		  mana 				= 6;
		  max_life 			= 25;
		  max_mana 			= 6;
		  scale_base 			= 0.9;
		  selection_indicator_scale 	= 0.85;
		[textures]
		{
			  0 = b_c_eam_ksc;
		}
	}
	[attack]
	{
		  damage_max = 4;
		  damage_min = 3;
	}

	[body]
	{
		min_move_velocity = 2.500;
		avg_move_velocity = 3.10;
		max_move_velocity = 4.8;
		[bone_translator]
		{
			  body_anterior  = bip01_head;
			  body_mid       = Bip01_Spine3;
			  body_posterior = bip01_pelvis;
			  kill_bone      = Bip01_Spine3;
			  shield_bone    = shield_grip;
			  weapon_bone    = weapon_grip;
		}
		[chore_dictionary]
		{
			  chore_prefix = a_c_eam_kg_fs;
			[chore_attack]
			{
				  chore_stances = 0,1;
				  skrit = select_attack;
				[anim_files]
				{
					  00 	= at;
					  01	= at-04;
					  02 	= at-02;
					  03 	= at-03;
					  qffg 	= dff;
				}
			}
			[chore_default]
			{
				  chore_stances = 0,1;
				  skrit = infinite_loop;
				[anim_files]
				{
					  00 = dfs;
				}
			}
			[chore_die]
			{
				  chore_stances = 0,1;
				  skrit = select_transition;
				[anim_files]
				{
					  00 = di;
					  01 = di-02;
					  02 = di-03;
					  03 = di-04;
				}
			}
			[chore_fidget]
			{
				  chore_stances = 0,1;
				  skrit = select_fidget;
				[anim_files]
				{
					  00 = dsf;
					  01 = dsf-02;
					  02 = dsf-03;
				}
			}
			[chore_magic]
			{
				  chore_stances = 0;
				  skrit = select_attack;
				[anim_files]
				{
					  00 = mg;
				}
			}
			[chore_misc]
			{
				  chore_stances = 1;
				  skrit = select_transition;
				[anim_files]
				{
					  chrg = hit;
				}
			}
			[chore_walk]
			{
				  chore_stances = 0,1;
				  skrit 	= select_walk;
				[anim_files]
				{
					  00 = rl;
				}
			}
		}
	}

	[common]
	{
		  screen_name = "Krug Scout";
		  membership = krug, party_krug_shaman, party_krug_scout_boss, monster;
	}
	[defend]
	{
		  defense = 9;
	}

	[inventory]
	{
		[pcontent]
		{
			[oneof*]
			{
				  es_weapon_hand = dg_g_c_1h_fun;
			}
    		[oneof*]
			{
				[all*]
				{
					[gold*]
					{
					chance 	= 0.15;
					max 	= 16;
				 	min 	= 8;
					}
				}
				[oneof*]
				{
					[all*]
					{
        				chance = 0.05;
    	        	    		il_main = #spell/0-2;
					}
					[all*]
					{
        				chance = 0.02;
	        	   	   	 il_main = #bow/4-7;
					}
					[oneof*]
					{
        				chance = 0.12;
	        	   	  	il_main = #melee/4-7;
       				    	il_main = potion_health_small;
					il_main = potion_mana_small;
    				}
					[all*]
					{
        				chance = 0.03;
	            	    		il_main = #armor/1-6;
					}
				}

			}
		}
	}
	[mind]
	{
		jat_brain					= world\ai\jobs\common\brain_hero.skrit
			?actor_joins_existing_party		= true;
	}
}

[t:template,n:krug_grunt]
{
	  category_name = "1W_evil_a";
	  doc = "krug grunt";
	  specializes = base_krug;
	[actor]
	{
		[skills]
		{
			  dexterity 		= 6, 0;
			  intelligence 		= 4, 0;
			  melee 		= 4, 0;
			  strength 		= 9, 0;
		}
	}
	[aspect]
	{
		  experience_value 		= 19;
		  life 				= 28;
		  mana 				= 8;
		  max_life 			= 28;
		  max_mana 			= 8;
		  selection_indicator_scale 	= 0.85;
		[textures]
		{
			  0 = b_c_eam_kg;
		}
	}
	[attack]
	{
		  damage_max = 17;
		  damage_min = 15;
	}
	[common]
	{
		  screen_name = "Krug Grunt";
		  membership = krug, party_krug_grunt_boss, monster;
	}
	[defend]
	{
		  defense = 30;
	}
	[inventory]
	{
		[pcontent]
		{
			[oneof*]
			{
				  es_weapon_hand = ax_d_d_1h1b_avg;
			}
    		[oneof*]
			{
				[gold*]
				{
					  chance 	= 0.2;
					  max 		= 29;
					  min 		= 11;
				}
				[all*]
				{
       				chance  = 0.05;
   	        	    	il_main = #spell/2-5;
				}
				[oneof*]
				{
	    		    	chance  = 0.15;
       		   	    	il_main = #weapon/12-17;
           		    	il_main = #armor/6-29;
   				il_main = potion_mana_small;
				il_main = potion_health_small;
                		}
			}
		}
	}
	[mind]
	{
		on_enemy_spotted_alert_friends 		= true;
		jat_brain				= world\ai\jobs\common\brain_hero.skrit
			?actor_joins_existing_party	= true;
		jat_fidget				= world\ai\jobs\common\job_fidget.skrit
			?social				= 0.35
			&still				= false;
	}
}

[t:template,n:krug_grunt_boss_01]
{
	  category_name = "1W_evil_a";
	  doc = "krug grunt boss 01";
	  specializes = base_krug;
	[actor]
	{
		[skills]
		{
			  dexterity 		= 8, 0;
			  intelligence 		= 6, 0;
			  melee 		= 4, 0;
			  strength 		= 10, 0;
		}
	}
	[aspect]
	{
		  experience_value 		= 90;
		  life 				= 56;
		  mana 				= 8;
		  max_life 			= 56;
		  max_mana 			= 8;
		  selection_indicator_scale 	= 1.15;
		[textures]
		{
			  0 = b_c_eam_ksc-03;
		}
	}
	[attack]
	{
		  damage_max = 17;
		  damage_min = 15;
	}
	[common]
	{
		  screen_name = "Futak the Trainer";
		  membership = krug,monster,immune_charm,immune_control,immune_freeze,immune_polymorph,immune_align_change,immune_explode;
		[template_triggers]
		{
			[*]
			{
				condition* 	= receive_world_message("WE_ENTERED_WORLD");
				single_shot 	= true;
				no_trig_bits 	= true;
				action* 	= call_sfx_script("unique_ray_red(sgx)");

			}

		}

	}
	[defend]
	{
		  defense = 90;
	}
	[inventory]
	{
		[pcontent]
		{
			[all*]
			{
				  es_weapon_hand = ax_d_d_1h1b_avg;
			}
    		[all*]
			{
				[gold*]
				{
				max 		= 40;
				min 		= 20;
				min_pile 	= 7;
				piles 		= 1-2;
				}
				[all*]
				{
       		   	    il_main = sh_w_g_c_r_s_krohar;
                }
			}
		}
	}
	[mind]
	{
		jat_brain				= world\ai\jobs\common\brain_hero.skrit
			?actor_creates_own_party	= true
			&party_template			= "party_krug_grunt_boss";
	}
}

[t:template,n:krug_guard]
{
	  category_name = "1W_evil_a";
	  doc = "krug guard";
	  specializes = base_krug;
	[actor]
	{
		[skills]
		{
			  dexterity 		= 11, 0;
			  intelligence 		= 7, 0;
			  melee 		= 4, 0;
			  strength 		= 13, 0;
		}
	}
	[aspect]
	{
		  experience_value 		= 61;
		  life 				= 55;
		  mana 				= 14;
		  material 			= steel;
		  max_life			= 55;
		  max_mana 			= 14;
		  selection_indicator_scale 	= 0.85;
		[textures]
		{
			  0 = b_c_eam_kr;
		}
	}
	[attack]
	{
		  damage_max = 26;
		  damage_min = 22;
	}
	[common]
	{
		  screen_name = "Krug Guard";
		  membership  = krug, krug_guard, party_krug_commander, party_krug_shaman, monster;
	}
	[defend]
	{
		  defense = 57;
	}
	[inventory]
	{
		[pcontent]
		{
			[oneof*]
			{
				  es_weapon_hand = ax_d_c_1h1b_avg;
			}
    		[oneof*]
			{
				[all*]
				{
					[gold*]
					{
					chance 	= 0.2;
					max 	= 75;
					min 	= 35;
					}
				}
				[all*]
				{
       				chance = 0.03;
   	        	    	il_main = #spell/3-8;
				}
				[oneof*]
				{
	    		    	chance = 0.22;
        	   	    	il_main = #weapon/15-25;
        	   	    	il_main = #*/15-25;
            	    		il_main = #armor/11-60;
    				il_main = potion_mana_small;
				il_main = potion_health_small;
				}
                [oneof*]
				{
	            		chance = 0.004;
	                	il_main = #weapon/-rare(1)/22-35;
	                	il_main = #armor/-rare(1)/28-80;
                    		il_main = #*/-rare(1)/22-35;
                		}
			}
		}
	}
	[mind]
	{
		jat_fidget				= world\ai\jobs\common\job_fidget.skrit
			?social				= 0.35
			&still				= false;

		jat_brain				= world\ai\jobs\common\brain_hero.skrit
			?actor_joins_existing_party	= true;
	}
}

[t:template,n:krug_raider]
{
	  category_name = "1W_evil_a";
	  doc = "krug raider";
	  specializes = base_krug;
	[actor]
	{
		[skills]
		{
			  dexterity 		= 8, 0;
			  intelligence 		= 6, 0;
			  melee 		= 3, 0;
			  strength 		= 11, 0;
		}
	}
	[aspect]
	{
		  experience_value 		= 36;
		  life 				= 30;
		  mana 				= 12;
		  max_life 			= 30;
		  max_mana 			= 1;
		  model 			= m_c_eam_kr_pos_1;
		  selection_indicator_scale 	= 0.85;
		[textures]
		{
			  0 = b_c_eam_kr;
		}
	}
	[attack]
	{
		  damage_max = 16;
		  damage_min = 12;
	}
	[common]
	{
		  screen_name = "Krug Raider";
	}
	[defend]
	{
		  defense = 42;
	}
	[inventory]
	{
		[pcontent]
		{
			[gold*]
			{
			chance 	= 0.1;
			max    	= 34;
			min   	= 12;
			}
			[oneof*]
			{
				  es_weapon_hand = ax_d_c_1h1b_avg;
			}
    		[oneof*]
			{
				[all*]
				{
					[gold*]
					{
					chance 	= 0.2;
					max 	= 40;
					min 	= 6;
					}
				}
				[all*]
				{
       				chance 	= 0.03;
   	        	    	il_main = #spell/4-7;
				}
				[oneof*]
				{
                    		chance 	= 0.002;
                    		il_main = #weapon/-rare(1)/15-18;
                    		il_main = #armor/-rare(1)/30-40;
               		 	}
				[oneof*]
				{
	    		    	chance 	= 0.22;
	           	    	il_main = #weapon/14-17;
	                	il_main = #armor/6-35;
	                	il_main = #*/14-17;
	    			il_main = potion_mana_small;
				il_main = potion_health_small;
				}
			}
		}
	}
	[mind]
	{
		on_enemy_spotted_alert_friends	= true;
	}
	[physics]
	{
		  break_sound = s_e_meat_explosion;
		  explosion_magnitude = 1.5;
		[break_particulate]
		{
			  frag_glb_krug_raider_01 = 1;
			  frag_glb_krug_raider_02 = 1;
			  frag_glb_krug_raider_03 = 1;
			  frag_glb_krug_raider_04 = 1;
			  frag_glb_krug_raider_05 = 1;
			  frag_glb_krug_raider_06 = 1;
			  frag_glb_krug_raider_07 = 1;
			  frag_glb_krug_raider_08 = 1;
		}
	}
}

[t:template,n:krug_scavenger]
{
	  category_name = "1W_evil_a";
	  doc = "krug scavenger";
	  specializes = base_krug;
	[actor]
	{
		[skills]
		{
			  dexterity 		= 4, 0;
			  intelligence 		= 3, 0;
			  strength 		= 5, 0;
		}
	}
	[aspect]
	{
		  experience_value 		= 4;
		  life 				= 15;
		  mana 				= 6;
		  max_life 			= 15;
		  max_mana 			= 6;
		  scale_base 			= 0.9;
		  selection_indicator_scale 	= 0.85;
		[textures]
		{
			  0 = b_c_eam_ksv;
		}
	}
	[attack]
	{
		  damage_max = 3;
		  damage_min = 2;
	}

	[common]
	{
		  screen_name 	= "Krug Scavenger";
		  membership 	= krug, party_krug_shaman, monster;
	}
	[defend]
	{
		  defense = 2.5;
	}

	[inventory]
	{
		[pcontent]
		{
			[oneof*]
			{
			es_weapon_hand = #club/2-3;
			}
    			[oneof*]
			{
				[all*]
				{
					[gold*]
					{
					chance 	= 0.15;
					max 	= 9;
					min 	= 4;
					}
				}
				[oneof*]
				{
					[all*]
					{
        				chance 	= 0.05;
    	        	            	il_main = #spell/0-2;
					}
					[all*]
					{
        				chance 	= 0.02;
	        	   	    	il_main = #bow/1-3;
					}
					[oneof*]
					{
        				chance 	= 0.12;
	        	   	    	il_main = #melee/1-3;
       				    	il_main = potion_health_small;
				    	il_main = potion_mana_small;
					}
					[all*]
					{
        				chance = 0.03;
	            	            	il_main = #body/1-6;
					}
				}
			}
		}
	}
	[mind]
	{
		jat_fidget				= world\ai\jobs\common\job_fidget.skrit
			?destructive			= 0.29
			&still				= false;

		jat_brain				= world\ai\jobs\common\brain_hero.skrit
			?actor_joins_existing_party	= true;

	}
	[physics]
	{
		break_sound = s_e_meat_explosion;
		explosion_magnitude = 1.5;
		[break_particulate]
		{
			  frag_glb_krug_scavenger_01 = 1;
			  frag_glb_krug_scavenger_02 = 1;
			  frag_glb_krug_scavenger_03 = 1;
			  frag_glb_krug_scavenger_04 = 1;
			  frag_glb_krug_scavenger_05 = 1;
			  frag_glb_krug_scavenger_06 = 1;
			  frag_glb_krug_scavenger_07 = 1;
			  frag_glb_krug_scavenger_08 = 1;
		}
	}
}

[t:template,n:krug_scavenger_boss_01]
{
	  category_name = "1W_evil_a";
	  doc = "krug scavenger boss 01";
	  specializes = base_krug;
	[actor]
	{
		[skills]
		{
			  dexterity 		= 6, 0;
			  intelligence 		= 3, 0;
			  strength 		= 6, 0;
		}
	}
	[aspect]
	{
		  experience_value 		= 10;
		  life 				= 24;
		  mana 				= 6;
		  max_life 			= 24;
		  max_mana 			= 6;
		  scale_base 			= 1.1;
		  selection_indicator_scale 	= 0.85;
		[textures]
		{
			  0 = b_c_eam_ksv-02;
		}
	}
	[attack]
	{
		  damage_max = 6;
		  damage_min = 3;
	}

	[common]
	{
		  screen_name = "Brankar the Scavenger";
		  membership  = krug,monster,immune_charm,immune_control,immune_freeze,immune_polymorph,immune_align_change,immune_explode;
		[template_triggers]
		{
			[*]
			{
				condition* 	= receive_world_message("WE_ENTERED_WORLD");
				single_shot 	= true;
				no_trig_bits 	= true;
				action* 	= call_sfx_script("unique_light_cyan(sgx)");

			}

		}

	}
	[defend]
	{
		  defense = 32;
	}

	[inventory]
	{
		[pcontent]
		{
			[oneof*]
			{
				  es_weapon_hand = #club/2-3;
			}
    		[all*]
			{
				[all*]
				{
					[gold*]
					{
					max 	= 30;
					min 	= 20;
					piles 	= 2-3;
					}
				}
				[oneof*]
				{
					[all*]
					{
        				chance 	= 0.25;
	        	   	    	il_main = #bow/3-4;
					}
					[all*]
					{
	            	    		il_main = #body/3-5;
					}
				}
			}
		}
	}
	[mind]
	{
		jat_brain				= world\ai\jobs\common\brain_hero.skrit
			?actor_creates_own_party	= true
			&party_template			= "party_krug_scavenger_boss";
	}
	[physics]
	{
		break_sound = s_e_meat_explosion;
		explosion_magnitude = 1.5;
		[break_particulate]
		{
			  frag_glb_krug_scavenger_01 = 1;
			  frag_glb_krug_scavenger_02 = 1;
			  frag_glb_krug_scavenger_03 = 1;
			  frag_glb_krug_scavenger_04 = 1;
			  frag_glb_krug_scavenger_05 = 1;
			  frag_glb_krug_scavenger_06 = 1;
			  frag_glb_krug_scavenger_07 = 1;
			  frag_glb_krug_scavenger_08 = 1;
		}
	}
}

[t:template,n:krug_scout]
{
	  category_name = "1W_evil_a";
	  doc = "krug scout";
	  specializes = base_krug;
	[actor]
	{
		[skills]
		{
			  dexterity 		= 4, 0;
			  intelligence 		= 3, 0;
			  strength 		= 5, 0;
		}
	}
	[aspect]
	{
		  experience_value 		= 6;
		  life 				= 19;
		  mana 				= 6;
		  max_life 			= 19;
		  max_mana 			= 6;
		  scale_base 			= 0.9;
		  selection_indicator_scale 	= 0.85;
		[textures]
		{
			  0 = b_c_eam_ksc;
		}
	}
	[attack]
	{
		  damage_max = 3;
		  damage_min = 1;
	}

	[body]
	{
		min_move_velocity = 2.500;
		avg_move_velocity = 3.10;
		max_move_velocity = 4.8;
		[bone_translator]
		{
			  body_anterior  = bip01_head;
			  body_mid       = Bip01_Spine3;
			  body_posterior = bip01_pelvis;
			  kill_bone      = Bip01_Spine3;
			  shield_bone    = shield_grip;
			  weapon_bone    = weapon_grip;
		}
		[chore_dictionary]
		{
			  chore_prefix = a_c_eam_kg_fs;
			[chore_attack]
			{
				  chore_stances = 0,1;
				  skrit = select_attack;
				[anim_files]
				{
					  00 = at;
					  01 = at-04;
					  02 = at-02;
					  03 = at-03;
					  qffg = dff;
				}
			}
			[chore_default]
			{
				  chore_stances = 0,1;
				  skrit = infinite_loop;
				[anim_files]
				{
					  00 = dfs;
				}
			}
			[chore_die]
			{
				  chore_stances = 0,1;
				  skrit = select_transition;
				[anim_files]
				{
					  00 = di;
					  01 = di-02;
					  02 = di-03;
					  03 = di-04;
				}
			}
			[chore_fidget]
			{
				  chore_stances = 0,1;
				  skrit = select_fidget;
				[anim_files]
				{
					  00 = dsf;
					  01 = dsf-02;
					  02 = dsf-03;
				}
			}
			[chore_magic]
			{
				  chore_stances = 0;
				  skrit = select_attack;
				[anim_files]
				{
					  00 = mg;
				}
			}
			[chore_walk]
			{
				  chore_stances = 0,1;
				  skrit = select_walk;
				[anim_files]
				{
					  00 = wl;
					  01 = rl;
				}
			}
		}
	}
	[common]
	{
		  screen_name 	= "Krug Scout";
		  membership 	= krug, party_krug_shaman, party_krug_scavenger_boss, party_krug_grunt_boss, monster;
	}
	[defend]
	{
		  defense = 9;
	}

	[inventory]
	{
		[pcontent]
		{
			[oneof*]
			{
				  es_weapon_hand = dg_g_c_1h_fun;
			}
    		[oneof*]
			{
				[all*]
				{
					[gold*]
					{
					chance 	= 0.15;
					max 	= 16;
					min 	= 8;
					}
				}
				[oneof*]
				{
					[all*]
					{
        				chance 	= 0.05;
    	        	    		il_main = #spell/0-2;
					}
					[all*]
					{
        				chance 	= 0.02;
	        	   	    	il_main = #bow/4-6;
					}
					[oneof*]
					{
        				chance 	= 0.12;
	        	   	   	il_main = #melee/4-6;
       				    	il_main = potion_health_small;
					il_main = potion_mana_small;
					}
					[all*]
					{
        				chance = 0.03;
	            	    		il_main = #armor/1-6;
					}
				}
			}
		}
	}
	[mind]
	{
		jat_fidget				= world\ai\jobs\common\job_fidget.skrit
			?curious			= 0.75
			&interest			= interest
			&still				= false;

		jat_brain				= world\ai\jobs\common\brain_hero.skrit
			?actor_joins_existing_party	= true;

		jat_attack_object_melee 		= world\ai\jobs\common\job_attack_object_melee.skrit
			?run_chance 			= 1.0;
	}

	[physics]
	{
		  break_sound = s_e_meat_explosion;
		  explosion_magnitude = 1.5;
		[break_particulate]
		{
			  frag_glb_krug_scout_01 = 1;
			  frag_glb_krug_scout_02 = 1;
			  frag_glb_krug_scout_03 = 1;
			  frag_glb_krug_scout_04 = 1;
			  frag_glb_krug_scout_05 = 1;
			  frag_glb_krug_scout_06 = 1;
			  frag_glb_krug_scout_07 = 1;
			  frag_glb_krug_scout_08 = 1;
		}
	}
}

[t:template,n:krug_scout_boss_01]
{
	  category_name = "1W_evil_a";
	  doc = "krug scout boss 01";
	  specializes = base_krug;
	[actor]
	{
		[skills]
		{
			  dexterity 		= 5, 0;
			  intelligence 		= 4, 0;
			  strength 		= 8, 0;
		}
	}
	[aspect]
	{
		  experience_value 		= 20;
		  life 				= 26;
		  mana 				= 6;
		  max_life 			= 28;
		  max_mana 			= 6;
		  scale_base 			= 1.15;
		  selection_indicator_scale 	= 0.85;
		[textures]
		{
			  0 = b_c_eam_ksc-02;
		}
	}
	[attack]
	{
		  damage_max = 9;
		  damage_min = 6;
	}

	[body]
	{
		min_move_velocity = 3.000;
		avg_move_velocity = 4.15;
		max_move_velocity = 5.5;
		[bone_translator]
		{
			  body_anterior  = bip01_head;
			  body_mid       = Bip01_Spine3;
			  body_posterior = bip01_pelvis;
			  kill_bone      = Bip01_Spine3;
			  shield_bone    = shield_grip;
			  weapon_bone    = weapon_grip;
		}
		[chore_dictionary]
		{
			  chore_prefix = a_c_eam_kg_fs;
			[chore_attack]
			{
				  chore_stances = 0,1;
				  skrit = select_attack;
				[anim_files]
				{
					  00 = at;
					  01 = at-04;
					  02 = at-02;
					  03 = at-03;
					  qffg = dff;
				}
			}
			[chore_default]
			{
				  chore_stances = 0,1;
				  skrit = infinite_loop;
				[anim_files]
				{
					  00 = dfs;
				}
			}
			[chore_die]
			{
				  chore_stances = 0,1;
				  skrit = select_transition;
				[anim_files]
				{
					  00 = di;
					  01 = di-02;
					  02 = di-03;
					  03 = di-04;
				}
			}
			[chore_fidget]
			{
				  chore_stances = 0,1;
				  skrit = select_fidget;
				[anim_files]
				{
					  00 = dsf;
					  01 = dsf-02;
					  02 = dsf-03;
				}
			}
			[chore_magic]
			{
				  chore_stances = 0;
				  skrit = select_attack;
				[anim_files]
				{
					  00 = mg;
				}
			}
			[chore_misc]
			{
				  chore_stances = 1;
				  skrit = select_transition;
				[anim_files]
				{
					  chrg = hit;
				}
			}
			[chore_walk]
			{
				  chore_stances = 0,1;
				  skrit = select_walk;
				[anim_files]
				{
					  00 = rl;
				}
			}
		}
	}
	[common]
	{
		  screen_name 	= "Klandank the Krug";
		  membership 	= krug,monster,immune_charm,immune_control,immune_freeze,immune_polymorph,immune_align_change,immune_explode;
		[template_triggers]
		{
			[*]
			{
				condition* 	= receive_world_message("WE_ENTERED_WORLD");
				single_shot 	= true;
				no_trig_bits 	= true;
				action* 	= call_sfx_script("unique_ray_green(sgx)");

			}

		}

	}
	[defend]
	{
		  defense = 35;
	}

	[inventory]
	{
		[pcontent]
		{
			[oneof*]
			{
				  es_weapon_hand = dg_g_c_1h_fun;
			}
    		[all*]
			{
				[all*]
				{
					[gold*]
					{
                			max = 80;
					min = 60;
					min_pile = 11;
					piles = 3-4;
					}
				}
				[all*]
				{
                    		il_main = #bow/6-7;
            	    		il_main = #body,f/6-8;
				}
			}
		}
	}
	[mind]
	{
		sight_range					= 19.0;
		outer_comfort_zone_range			= 9.0;
		visibility_memory_duration			= 8.0;
		on_life_ratio_low_flee                          = false;
		
		jat_brain					= world\ai\jobs\common\brain_hero.skrit
			?actor_creates_own_party		= true
			&party_template				= "party_krug_scout_boss";

		jat_attack_object_melee 			= world\ai\jobs\common\job_attack_object_melee.skrit
			?run_chance 					= 1.0;
	}
	[physics]
	{
		  break_sound = s_e_meat_explosion;
		  explosion_magnitude = 1.5;
		[break_particulate]
		{
			  frag_glb_krug_scout_01 = 1;
			  frag_glb_krug_scout_02 = 1;
			  frag_glb_krug_scout_03 = 1;
			  frag_glb_krug_scout_04 = 1;
			  frag_glb_krug_scout_05 = 1;
			  frag_glb_krug_scout_06 = 1;
			  frag_glb_krug_scout_07 = 1;
			  frag_glb_krug_scout_08 = 1;
		}
	}
}

[t:template,n:krug_shaman_base]
{
	  category_name = "1W_evil_a";
	  doc = "krug shaman base";
	  specializes = base_krug;
	[actor]
	{
		  drops_spellbook 		= false;
		  race 				= krug;
	}
	[aspect]
	{
		  model 			= m_c_eam_ks_pos_1;
		  selection_indicator_scale 	= 0.85;
	}
	[body]
	{
		min_move_velocity = 1.20;
		avg_move_velocity = 1.50;
		max_move_velocity = 1.75;

		[bone_translator]
		{
			  body_anterior = bip01_head;
			  body_mid = bip01_spine2;
			  body_posterior = bip01_pelvis;
			  kill_bone = bip01_spine2;
			  shield_bone = weapon_grip;
			  weapon_bone = shield_grip;
		}
	}
	[common]
	{
		  membership = krug, monster;
	}
	[inventory]
	{
		  selected_active_location = il_active_primary_spell;
		[other]
		{
			  il_active_primary_spell   = spell_fireshot;
			  il_active_secondary_spell = spell_resurrect_monster;
		}
	}

	[mind]
	{
		actor_weapon_preference              	= WP_MAGIC;
		
		actor_auto_switches_to_magic         	= true;
		actor_auto_reanimates_friends        	= true;
		actor_auto_uses_stored_items         	= true;

		on_mana_ratio_low_switch_to_melee	= true;
		on_enemy_entered_icz_switch_to_melee    = true;
		on_enemy_entered_icz_abort_flee		= false;
		on_life_ratio_low_flee               	= true;

		actor_life_ratio_low_threshold  	= 0.45;
		actor_mana_ratio_low_threshold		= 0.15;
		flee_count				= 2;
		flee_distance				= 9.0;

		jat_fidget				= world\ai\jobs\common\job_fidget.skrit
			?curious			= 0.75
			&interest			= interest
			&still				= false;

		jat_flee_from_object			= world\ai\jobs\common\job_flee_from_object.skrit
			?run_chance			= 1.0;

		jat_brain				= world\ai\jobs\common\brain_hero.skrit
			?actor_creates_own_party	= true
			&party_template			= "party_krug_shaman";

		jat_attack_object_melee			= world\ai\jobs\common\job_attack_object_melee.skrit
			?persistence			= 0.0;
	}
	[physics]
	{
		  break_sound = s_e_meat_explosion;
		  explosion_magnitude = 1.5;
		[break_particulate]
		{
			  frag_glb_krug_shaman_01 = 1;
			  frag_glb_krug_shaman_02 = 1;
			  frag_glb_krug_shaman_03 = 1;
			  frag_glb_krug_shaman_04 = 1;
			  frag_glb_krug_shaman_05 = 1;
			  frag_glb_krug_shaman_06 = 1;
			  frag_glb_krug_shaman_07 = 1;
			  frag_glb_krug_shaman_08 = 1;
		}
	}
}

[t:template,n:krug_shaman]
{
	  category_name = "1W_evil_a";
	  doc = "krug shaman";
	  specializes = krug_shaman_base;
	[actor]
	{
		[skills]
		{
			  combat_magic 		= 3, 0;
			  dexterity 		= 4, 0;
			  intelligence 		= 8, 0;
			  melee 		= 1, 0;
			  strength 		= 8, 0;
		}
	}
	[aspect]
	{
		  experience_value 		= 16;
		  life 				= 19;
		  mana 				= 81;
		  max_life 			= 19;
		  max_mana 			= 81;
	}
	[attack]
	{
		  damage_max = 12;
		  damage_min = 8;
	}
	[common]
	{
		  screen_name = "Krug Shaman";
	}
	[defend]
	{
		  defense = 22;
	}
	[inventory]
	{
		  selected_active_location = il_active_primary_spell;
		[other]
		{
			  il_active_primary_spell   = spell_fireshot;
			  il_active_secondary_spell = spell_resurrect_monster;
		}
		[pcontent]
		{
			[oneof*]
			{
				[gold*]
				{
				chance = 0.3;
				max = 41;
				min = 24;
				}
				[oneof*]
				{
				il_main = potion_mana_small;
				il_main = potion_health_small;
				max = 2;
				min = 1;
                      		chance = 0.3;
				}
				[all*]
				{
				chance = 0.3;
				il_main = spell_fireshot;
				}
				[oneof*]
				{
				chance = 0.1;
				il_main = book_glb_magic_01;
				il_main = #body,ro/12-17;
				}
             		}
		}
	}
}

[t:template,n:krug_shaman_boss_01]
{
	  category_name = "1W_evil_a";
	  doc = "krug shaman boss 01";
	  specializes = krug_shaman_base;
	[actor]
	{
		[skills]
		{
			  combat_magic = 4, 0;
			  dexterity = 6, 0;
			  intelligence = 10, 0;
			  melee = 2, 0;
			  strength = 10, 0;
		}
	}
	[aspect]
	{
		textures:0 			= b_c_eam_ks-02;
		experience_value 		= 85;
		life 				= 44;
		mana 				= 500;
		max_life 			= 44;
		max_mana 			= 500;
	      	selection_indicator_scale 	= 1.2;
	}
	[attack]
	{
		  damage_max = 12;
		  damage_min = 8;
	}
	[common]
	{
		  screen_name 	= "Huskar the Shaman";
		  membership 	= krug,monster,immune_charm,immune_control,immune_freeze,immune_polymorph,immune_align_change,immune_explode;
		[template_triggers]
		{
			[*]
			{
				condition* 	= receive_world_message("WE_ENTERED_WORLD");
				single_shot 	= true;
				no_trig_bits 	= true;
				action* 	= call_sfx_script("unique_ray_yellow(sgx)");

			}

		}

	}
	[defend]
	{
		  defense = 70;
	}
	[inventory]
	{
		  selected_active_location = il_active_primary_spell;
		[other]
		{
			  il_active_primary_spell   = spell_fireshot;
			  il_active_secondary_spell = spell_resurrect_monster;
		}
		[pcontent]
		{
			[all*]
			{
				[gold*]
				{
				max 		= 121;
				min 		= 84;
				min_pile 	= 10;
				piles 		= 4-6;
				}
				[all*]
				{
				il_main = #weapon/14-16;
				il_main = #body/29-35;
				il_main = #body,ro/29-35;
				max = 2;
				min = 1;
				}
             		}
		}
	}
	[mind]
	{
		jat_brain					= world\ai\jobs\common\brain_hero.skrit
			?actor_creates_own_party		= true
			&form_party_on_friend_entered_ICZ	= true
			&form_party_on_friend_entered_OCZ	= true
			&party_template				= "party_krug_shaman";
	}
}


[t:template,n:krug_apprentice]
{
	  category_name = "1W_evil_a";
	  doc = "krug Apprentice";
	  specializes = krug_shaman_base;
	[actor]
	{
		[skills]
		{
			  combat_magic 		= 1, 0;
			  dexterity 		= 4, 0;
			  intelligence 		= 8, 0;
			  melee 		= 1, 0;
			  strength 		= 8, 0;
		}
	}
	[aspect]
	{
		  experience_value 		= 12;
		  life 				= 22;
		  mana 				= 31;
		  max_life 			= 22;
		  max_mana 			= 31;
	}
	[attack]
	{
		  damage_max = 7;
		  damage_min = 4;
	}
	[common]
	{
		  screen_name = "Krug Apprentice";
	}
	[defend]
	{
		  defense = 12;
	}
	[inventory]
	{
		  	selected_active_location = il_active_primary_spell;
		[other]
		{
			il_active_primary_spell	 = spell_apprentice_zap;
		}
		[pcontent]
		{
			[oneof*]
			{
				[gold*]
				{
				chance 	= 0.3;
				max 	= 21;
				min 	= 14;
				}
				[oneof*]
				{
					  il_main 	= potion_mana_small;
					  il_main 	= potion_health_small;
					  max 		= 2;
					  min 		= 1;
                      chance = 0.3;
				}
				[oneof*]
				{
				chance = 0.1;
				il_main = book_glb_magic_01;
   				il_main = #body,ro/12-17;
				}
             		}
		}
	}
	[mind]
	{
		jat_brain					= world\ai\jobs\common\brain_hero.skrit;
	}
}


[t:template,n:krug_throw]
{
	  category_name = "1W_evil_a";
	  doc = "krug, rock thrower";
	  specializes = base_krug;
	[actor]
	{
		[skills]
		{
			  dexterity 		= 10, 0;
			  intelligence 		= 7, 0;
			  ranged 		= 2, 0;
			  strength 		= 7, 0;
		}
	}
	[aspect]
	{
		  experience_value 		= 27;
		  life 				= 23;
		  mana 				= 6;
		  max_life 			= 23;
		  max_mana 			= 6;
		  selection_indicator_scale 	= 0.85;
		[textures]
		{
			  0 = b_c_eam_kg;
		}
		[voice]
		{
			[attack]	{	                * = s_e_attack_krug_throw;  }
			[die]		{ priority = high;	* = s_e_die_krug_scout;     }
			[hit_critical]	{ priority = low;	* = s_e_hit_krug_scout_SED; }
			[hit_glance]	{ priority = low;	* = s_e_hit_krug_scout_SED; }
			[hit_solid]	{ priority = low;	* = s_e_hit_krug_scout_SED; }
		}
	}
	[attack]
	{
		  attack_range 	= 0.5;
		  damage_max 	= 9;
		  damage_min 	= 7;
		  reload_delay 	= 1;
	}
	[common]
	{
		  screen_name 	= "Krug Chucker";
		  membership 	= monster, krug;
	}
	[defend]
	{
		  defense = 22;
	}
	[inventory]
	{
		  selected_active_location = il_active_ranged_weapon;
		[equipment]
		{
			  es_shield_hand = rock_krug;
		}
		[pcontent]
		{
			[gold*]
			{
			chance 	= 0.12;
			max 	= 40;
			min 	= 10;
			}
			[oneof*]
			{
			chance 	= 0.15;
			il_main = potion_health_small;
                  	il_main = scroll_resurrect;
			}
			[all*]
			{
    			chance 	= 0.03;
   	        	il_main = #spell/2-6;
			}
			[oneof*]
			{
                   	chance 	= 0.002;
                   	il_main = #weapon/-rare(1)/15-18;
                   	il_main = #armor/-rare(1)/30-40;
            		}
			[oneof*]
			{
			chance 	= 0.10;
			il_main = #weapon/14-17;
			il_main = #*/14-17;
			il_main = #armor/7-35;
			il_main = potion_mana_small;
			il_main = potion_health_small;
			}
		}
	}
	[mind]
	{
		jat_fidget			= world\ai\jobs\common\job_fidget.skrit
			?social			= 0.35
			&still			= false;

		actor_weapon_preference		= WP_RANGED;

		actor_auto_switches_to_ranged	= true;	
	}
}

[t:template,n:temp_krug_eating]
{
	  category_name = "1W_evil_a";
	  doc = "krug eating";
	  specializes = base_krug;
	[actor]
	{
		[skills]
		{
			  dexterity 		= 6, 0;
			  intelligence 		= 4, 0;
			  melee 		= 3, 0;
			  strength 		= 9, 0;
		}
	}
	[aspect]
	{
		  experience_value 		= 88;
		  life 				= 11;
		  mana 				= 8;
		  max_life 			= 11;
		  max_mana 			= 8;
		  selection_indicator_scale 	= 0.85;
		[textures]
		{
			  0 = b_c_eam_kg;
		}
	}
	[attack]
	{
		  damage_max = 6;
		  damage_min = 4;
	}
	[body]
	{
		[chore_dictionary]
		{
			  chore_prefix = a_c_eam_kg_fs;
			[chore_attack]
			{
				  chore_stances = 1;
				  skrit = select_transition;
				[anim_files]
				{
					  00 = at;
				}
			}
			[chore_default]
			{
				  chore_stances = 1;
				  skrit = infinite_loop;
				[anim_files]
				{
					  00 = dfs;
				}
			}
			[chore_die]
			{
				  chore_stances = 1;
				  skrit = select_transition;
				[anim_files]
				{
					  00 = di;
				}
			}
			[chore_fidget]
			{
				  chore_stances = 1;
				  skrit = select_fidget;
				[anim_files]
				{
					  00 = dff-02;
				}
			}
			[chore_walk]
			{
				  chore_stances = 1;
				  skrit = select_walk;
				[anim_files]
				{
					  00 = wl;
				}
			}
		}
	}
	[common]
	{
		  screen_name = "Krug Grunt";
	}
	[defend]
	{
		  defense = 9;
	}
	[inventory]
	{
		[pcontent]
		{
			[gold*]
			{
			chance 	= 0.12;
			max 	= 15;
			min 	= 6;
			}
			[oneof*]
			{
			es_weapon_hand = meat_bone;
			}
			[oneof*]
			{
				[oneof*]
				{
				chance = 0.12;
				il_main = #weapon/4-6;
				il_main = #spell/2-5;
				il_main = #armor/7-35;
				il_main = potion_mana_small;
				il_main = potion_health_small;
				}
			}
		}
	}
	[mind]
	{
		jat_fidget		= world\ai\jobs\common\job_fidget.skrit;
	}
}

[t:template,n:temp_krug_poking]
{
	  category_name = "1W_evil_a";
	  doc = "krug poking";
	  specializes = base_krug;
	[actor]
	{
		[skills]
		{
			  dexterity = 6, 0;
			  intelligence = 4, 0;
			  melee = 3,  0;
			  strength = 9, 0;
		}
	}
	[aspect]
	{
		  experience_value 		= 88;
		  life 				= 11;
		  mana 				= 8;
		  max_life 			= 11;
		  max_mana 			= 8;
		  selection_indicator_scale 	= 0.85;
		[textures]
		{
			  0 = b_c_eam_kg;
		}
	}
	[attack]
	{
		  damage_max = 6;
		  damage_min = 4;
	}
	[body]
	{
		[chore_dictionary]
		{
			  chore_prefix = a_c_eam_kg_fs;
			[chore_attack]
			{
				  chore_stances = 1;
				  skrit = select_transition;
				[anim_files]
				{
					  00 = at;
				}
			}
			[chore_default]
			{
				  chore_stances = 1;
				  skrit = infinite_loop;
				[anim_files]
				{
					  00 = dfs;
				}
			}
			[chore_die]
			{
				  chore_stances = 1;
				  skrit = select_transition;
				[anim_files]
				{
					  00 = di;
				}
			}
			[chore_fidget]
			{
				  chore_stances = 1;
				  skrit = select_fidget;
				[anim_files]
				{
					  00 = dff-04;
				}
			}
			[chore_walk]
			{
				  chore_stances = 1;
				  skrit = select_walk;
				[anim_files]
				{
					  00 = wl;
				}
			}
		}
	}
	[common]
	{
		  screen_name = "Krug Grunt";
	}
	[defend]
	{
		  defense = 9;
	}
	[inventory]
	{
		[pcontent]
		{
			[gold*]
			{
			chance = 0.12;
			max = 15;
			min = 6;
			}
			[oneof*]
			{
			es_weapon_hand = fire_poker;
			}
			[oneof*]
			{
				[oneof*]
				{
				chance 	= 0.12;
				il_main = #weapon/4-6;
				il_main = #spell/2-6;
				il_main = #armor/7-35;
				il_main = potion_mana_small;
				il_main = potion_health_small;
				}
			}
		}
	}
	[mind]
	{
		jat_fidget		= world\ai\jobs\common\job_fidget.skrit;
	}
}

[t:template,n:temp_krug_raider_run]
{
	  category_name = "1W_evil_a";
	  doc = "temp_krug_raider_run";
	  specializes = actor_evil;
	[actor]
	{
		  race = krug;
		[skills]
		{
			  combat_magic 		= 1, 0;
			  dexterity 		= 8, 0;
			  intelligence 		= 3, 0;
			  melee 		= 3, 0;
			  strength 		= 11, 0;
		}
	}
	[aspect]
	{
		  experience_value 		= 54;
		  life 				= 18;
		  mana 				= 41;
		  max_life 			= 18;
		  max_mana 			= 41;
		  model 			= m_c_eam_kg_pos_1;
		  selection_indicator_scale 	= 0.85;
		[textures]
		{
			  0 = b_c_eam_kr;
		}
	}
	[attack]
	{
		  damage_max = 1;
		  damage_min = 1;
	}
	[body]
	{
		  avg_move_velocity = 4.956;
		[bone_translator]
		{
			  body_anterior = bip01_head;
			  body_mid = bip01_spine2;
			  body_posterior = bip01_pelvis;
			  kill_bone = bip01_spine2;
			  shield_bone = shield_grip;
			  weapon_bone = weapon_grip;
		}
		[chore_dictionary]
		{
			  chore_prefix = a_c_eam_kg_fs;
			[chore_attack]
			{
				  chore_stances = 0,1,3;
				  skrit = select_attack;
				[anim_files]
				{
					  00 = at;
					  01 = at-04;
					  02 = at-02;
					  03 = at-03;
					  qffg = dff;
				}
			}
			[chore_default]
			{
				  chore_stances = 0,1,3;
				  skrit = infinite_loop;
				[anim_files]
				{
					  00 = dfs;
				}
			}
			[chore_die]
			{
				  chore_stances = 1;
				  skrit = select_transition;
				[anim_files]
				{
					  00 = di;
					  01 = di-02;
					  02 = di-03;
					  03 = di-04;
				}
			}
			[chore_fidget]
			{
				  chore_stances = 0,1,3;
				  skrit = select_fidget;
				[anim_files]
				{
					  00 = dsf;
					  01 = dsf-02;
					  02 = dsf-03;
				}
			}
			[chore_walk]
			{
				  chore_stances = 0,1,3;
				  skrit = select_walk;
				[anim_files]
				{
					  00 = rl;
				}
			}
		}
	}
	[common]
	{
		  screen_name = "Krug Raider";
		[template_triggers]
		{
			[*]
			{
				  action* 	= call_sfx_script("melee_hit_2");
				  condition* 	= receive_world_message("we_damaged");
			}
		}
	}
	[defend]
	{
		  defense = 6;
	}
	[inventory]
	{
		[equipment]
		{
			  es_weapon_hand = ax_d_c_1h1b_avg;
		}
		[pcontent]
		{
			[gold*]
			{
			chance 	= 0.3;
			max 	= 19;
			min 	= 2;
			}
			[oneof*]
			{
			chance 	= 0.4;
			il_main = #weapon/5-8;
			il_main = #armor/7-35;
			il_main = potion_mana_small;
			il_main = potion_health_small;
			}
		}
	}
	[mind]
	{
		  com_channels = dyn_party, krug;
		  com_range = 8;
		  job_travel_distance_limit = 20;
		  melee_engage_range = 14;
		  on_enemy_spotted_alert_friends = true;
		  on_engaged_lost_loiter = true;
		  on_job_reached_travel_distance_abort_attack = true;
		  ranged_engage_range = 14;
		  sight_range = 14;
	}
	[physics]
	{
		  break_sound = s_e_meat_explosion;
		  explosion_magnitude = 1.5;
		  fire_resistance = 0.0;
          fire_burn_threshold =	20;
		[break_particulate]
		{
			  frag_glb_krug_01 = 1;
			  frag_glb_krug_02 = 1;
			  frag_glb_krug_03 = 1;
			  frag_glb_krug_04 = 1;
			  frag_glb_krug_05 = 1;
			  frag_glb_krug_06 = 1;
			  frag_glb_krug_07 = 1;
			  frag_glb_krug_08 = 1;
		}
	}
}

I suspect that on_enemy_entered_icz_abort_flee = true; currently does nothing. Reading (skimming) about skrit indicates I will have to create a custom job for this to do anything.

I further suspect that sight_fov either doesn't do what I think it should, OR is broken by the inclusion or omission of something else that affects whether field of view can be used for AI changes. I think it should make Krug only attack if they spot you, or are alerted by others about you. Currently, Krug still alert and engage with their backs turned and no friends nearby to warn them. Variables in engage_range might be too blame? Do they engage at those ranges (ranged/melee) despite not being able to see you? hmm...

:spider: