lfnetwork.com mark read register faq members calendar

Thread: Random Enemy Enhancement and Reinforcement Mod
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 12-02-2014, 09:49 AM   #1
blinkyzero
Rookie
 
blinkyzero's Avatar
 
Join Date: Nov 2014
Posts: 19
Random Enemy Enhancement and Reinforcement Mod

Hi folks! I'm a long-time lurker on the Holowan forums who just got around to registering recently. I've come up with an idea for a mod that will hopefully increase KotOR1's replay value and general difficulty. I think the concept holds true for KotOR2 as well, but we'll see. I'm calling it the Random Enemy Enhancement and Reinforcement mod, because, uh, mods need names and "REER" is close enough to "rear" and let's be honest, KotOR enemies are generally like children who desperately need a little rearing.

Right now I've got a lot of the basic scripting done and all of the features working in rudimentary fashions (much thanks to Fair Strides 2 for helping me out with some of that!). Now I'm looking for ideas from the community that might make things flashier/work better. Toward that end, here's what the mod does at present:

First, it randomly adds statistics to every enemy that you encounter and does this dynamically when combat begins. There's some level scaling involved (a higher level PC will face enemies whose minimum bonuses are appropriately higher), but you can never quite be certain if the guy you're attacking is just another chump or some monster with a bunch of Strength and a ton of VP. I like the unpredictable quality this gives to fights -- it means you have to reassess your strategy on the fly, once it's obvious that a particular enemy is unexpectedly dangerous. (It also means that saving and reloading won't necessarily make a fight easier, as everything gets re-randomized.) I think it lends some degree of realism, too; not every Sith soldier is just your average bum with a gun (or a clone of some average bum with a gun). Even in the lower ranks, there are going to be exceptional and deadly fighters. The same holds true for pretty much every other enemy. This part of the mod is methodologically similar to the old hardcore mod that Talchia created and subsequent variations from folks like Qui-Gon Glenn. Much thanks to them and stoffe, whose mods, posts, and discussions have helped a lot in figuring out the best way to script these enhancements.

Second, the mod adds random, helpful equipment to enemies. So far I've only gone as far as handing out varieties of shields, medpacks, and grenades, but maybe stims and other gear would be helpful. There's that nifty group heal stim that would be fun to have used against you (needs some modifications, though; right now if you have an enemy use it, it heals your party, lol). It's easy to script in weapons, armor, and other gear as well, but maybe this would be going a bit overboard? I'm not sure.

Third, and perhaps the most fun so far in my testing, is the reinforcement system. Basically what this does is give enemies a random chance to call for help, causing more enemies to spawn and join the fight. It helps add unpredictability to combat -- and, again, defeats the save-reload syndrome, as you never know if the enemies will call for help the second time around, or, if they do, how many friends will show up, or even exactly what those friends will be/how difficult they are (as they, too, are randomized, statistically and otherwise). I'd like to create a wide range of templates that can be called in as reinforcements and then tie these templates to factions, meaning that the Sith will call in other Sith, underworld elements like the Vulkars/Hidden Beks will call in gangsters, Mandalorians more Mandalorians, and so on. I'm also going to include small chances for reinforcements to be mini-bosses with unusual loot which you can pick off their bodies...if you can kill them! If you can't and you die instead, you missed your shot -- since reloading won't guarantee that the mini-boss shows up again. If the community could help provide NPC templates that it would like to see included, I think that would be awesome!

I'd love to see any thoughts folks might have about these features and how to improve them. Two things have already occurred to me. One is making the reinforcements spawn outside of the player's sight (even if that just means a couple meters behind him) to break immersion less. I'm not quite certain how to do that, though; right now I've got them just popping in near the guy who called for help with a text box announcement indicating that this has happened. I'll have to toy around with using GetObjectSeen() and see what I can do. The other is the potential for XP inflation, as killing reinforcements will allow players to level up even faster. I think this can be circumvented by diminishing (or even eliminating) the XP rewards they give, but I'd like to hear thoughts on it. (I'd rather not do an across-the-board decrease.) Maybe just getting the extra loot from the reinforcements is reward enough?

Again, much thanks to Fair Strides 2 who has already been very helpful in a more limited thread that I posted here.

For humor, here's what happened when I first tested the reinforcement system and forgot to include a sanity check in the script...


Last edited by blinkyzero; 12-02-2014 at 11:13 AM.
blinkyzero is offline   you may: quote & reply,
Old 12-02-2014, 08:01 PM   #2
DeathScepter
Rookie
 
Join Date: Aug 2011
Posts: 210
wow that looks like a fun battle on the endar spire.
DeathScepter is offline   you may: quote & reply,
Old 12-02-2014, 08:23 PM   #3
blinkyzero
Rookie
 
blinkyzero's Avatar
 
Join Date: Nov 2014
Posts: 19
Quote:
Originally Posted by DeathScepter View Post
wow that looks like a fun battle on the endar spire.
You're invincible until Trask goes away, too, so you'd win...

...eventually.
blinkyzero is offline   you may: quote & reply,
Old 12-02-2014, 10:06 PM   #4
Fair Strides 2
Witty Programmer
 
Fair Strides 2's Avatar
 
Join Date: Jan 2012
Location: Oregon, United States
Posts: 625
Current Game: Master of Orion 2
Helpful! 
Quote:
Originally Posted by blinkyzero View Post
You're invincible until Trask goes away, too, so you'd win...

...eventually.
If you want, I can modify that group heal stim to heal the user and the two nearest members of the same faction...

As for spawning reinforcements, I could probably help you out. Do you have Skype?


All of my mods are available on Deadlystream.

Always remember modders: "Quality= Effort*Time"

KSE 3.3.4 is LIVE!!! Check it out here.

Check out WalkSwitch, the Walkmesh-changing tool!
Fair Strides 2 is offline   you may: quote & reply,
Old 12-03-2014, 12:48 AM   #5
blinkyzero
Rookie
 
blinkyzero's Avatar
 
Join Date: Nov 2014
Posts: 19
Quote:
Originally Posted by Fair Strides 2 View Post
If you want, I can modify that group heal stim to heal the user and the two nearest members of the same faction...

As for spawning reinforcements, I could probably help you out. Do you have Skype?
I probably have Skype somewhere, but I'm not really free for any halfway decent length of time these days, sadly. Christmas season. I'm tinkering with this mod (and this post, lol) in between assignments from the boss.

Modifying the heal stim would be really neat. I looked at its script briefly earlier and beyond the obvious player-or-enemy check it seems like it only needs a way of targeting all nearby allies. I figured some kind of while loop that went through and identified them would work.

The reinforcement system works fine as it is, mechanically speaking, but currently I'm limited to spawning the backups at the caller's location (looks kinda silly and unrealistic) or dropping a few points off the player's Y vector to get them in behind him. I don't like either solution. Even by randomizing the vector a bit, it's not ideal, as it's still pretty predictable...and there's a halfway decent chance the backup will spawn somewhere impossible. I haven't found a function that lets me check if a given location is actually viable for a creature to be created at. I tried rigging a system that cycles through nearby objects/creatures and finds one not in view of the player, but it didn't work well at all. I'm not sure if GetObjectSeen() even works with the player as its source. Basically I need a routine that searches the nearby area for a viable spawn point that is outside the player's visibility so the reinforcements don't seem to just pop out of thin air...if that's even possible. Not having much luck figuring out how yet.

There is one problem with the reinforcements, actually...I've noticed that there's a potential conflict with some scripted scenes. The backups don't always stop fighting the player if he's forced into dialogue. I thought that automatically cancelled all combat, but it looks like it's not always the case.

I've also noticed that perhaps SendMessageToPC doesn't always seem to work quite right. I'm using it for debug purposes to let me know when the AI master script fires the enhancer script for an enemy, and it doesn't always print to the feedback log like it should...but the enhancer script runs fine otherwise. I had to setup some visual cues instead to make sure everything was running correctly.

I'm messing around with using the heartbeat event to fire the enhancer script, too. It seems more reliable than perception. Not sure why. Here's the hook from the end of k_ai_master's 1001 case...seems to work perfectly thus far. I put in checks preventing neutrals and allies from getting benefits in order to prevent breaking cutscenes that seem to rely on exact amounts of damage getting dealt. I'm probably being overly cautious, though.

Code:
if (!IsObjectPartyMember(OBJECT_SELF) && !GetLocalBoolean(OBJECT_SELF, 63) && !GetPlayerRestrictMode() && GetIsInCombat(OBJECT_SELF) && GetIsEnemy(GetFirstPC(), OBJECT_SELF))
{
	SendMessageToPC(GetFirstPC(),"Firing enhancer script from heartbeat...");
	ExecuteScript("bz_enhancer", OBJECT_SELF);
	SetLocalBoolean(OBJECT_SELF, 63, TRUE);
}
And here's the random enhancement script at the moment. I've got the feedback log debug messages commented out because they weren't always working for some reason, even though the script itself was otherwise.

Code:
#include "k_inc_generic"

// generates a random number between iMax and iMin. function created by bead-v. thanks!
int RandomInt(int iMax=1, int iMin=0)
{
	int Malo = iMin;
	if(iMin>iMax) Malo=iMax;
	int iRandom = Malo + Random(abs(iMax-iMin));
	return iRandom;
}

void main()
{

//********************************************************************************
//
// Enemy Stats Enhancer
//
//********************************************************************************

	// get enemy's level
	int EnemyLevel = GetHitDice(OBJECT_SELF);

	// define hitpoint and Force point boost variables
	int AdjustedVitalityPoints;
	int AdjustedForcePoints;

	// for debugging; this block indicates that the enemy has seen you and reports its current stats in the feedback log
	/*
	SendMessageToPC(GetFirstPC(),"Perceived you: "+GetName(OBJECT_SELF));
	SendMessageToPC(GetFirstPC(),"Old Str score: "+IntToString(GetAbilityScore(OBJECT_SELF, ABILITY_STRENGTH)));
	SendMessageToPC(GetFirstPC(),"Old Dex score: "+IntToString(GetAbilityScore(OBJECT_SELF, ABILITY_DEXTERITY)));
	SendMessageToPC(GetFirstPC(),"Old Con score: "+IntToString(GetAbilityScore(OBJECT_SELF, ABILITY_CONSTITUTION)));
	SendMessageToPC(GetFirstPC(),"Old Int score: "+IntToString(GetAbilityScore(OBJECT_SELF, ABILITY_INTELLIGENCE)));
	SendMessageToPC(GetFirstPC(),"Old Wis score: "+IntToString(GetAbilityScore(OBJECT_SELF, ABILITY_WISDOM)));
	SendMessageToPC(GetFirstPC(),"Old Cha score: "+IntToString(GetAbilityScore(OBJECT_SELF, ABILITY_CHARISMA)));
	SendMessageToPC(GetFirstPC(),"Old hit points: "+IntToString(GetMaxHitPoints(OBJECT_SELF)));
	SendMessageToPC(GetFirstPC(),"Old Force points: "+IntToString(GetMaxForcePoints(OBJECT_SELF)));
	*/

	// apply random stat boosts; minimum 0, maximum 10
	ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectAbilityIncrease(ABILITY_STRENGTH, RandomInt(0, 10)), OBJECT_SELF);
	ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectAbilityIncrease(ABILITY_DEXTERITY, RandomInt(0, 10)), OBJECT_SELF);
	ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectAbilityIncrease(ABILITY_CONSTITUTION, RandomInt(0, 10)), OBJECT_SELF);
	ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectAbilityIncrease(ABILITY_INTELLIGENCE, RandomInt(0, 10)), OBJECT_SELF);
	ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectAbilityIncrease(ABILITY_WISDOM, RandomInt(0, 10)), OBJECT_SELF);
	ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectAbilityIncrease(ABILITY_CHARISMA, RandomInt(0, 10)), OBJECT_SELF);

	// determine new maximum hitpoints for soldiers, Jedi guardians, combat droids, and beasts
	if ((GetLevelByClass(CLASS_TYPE_SOLDIER) > 0) || (GetLevelByClass(CLASS_TYPE_JEDIGUARDIAN) > 0) || (GetLevelByClass(CLASS_TYPE_COMBATDROID) > 0) || (GetSubRace(OBJECT_SELF) == 2))
	{
		AdjustedVitalityPoints = (EnemyLevel * 10);
	}
	// determine new maximum hitpoints for scouts, Jedi sentinels, and expert droids
	else if ((GetLevelByClass(CLASS_TYPE_SCOUT) > 0) || (GetLevelByClass(CLASS_TYPE_JEDISENTINEL) > 0) || (GetLevelByClass(CLASS_TYPE_EXPERTDROID) > 0))
	{
		AdjustedVitalityPoints = (EnemyLevel * 8);
	}
	// determine new maximum hitpoints for scoundrels and Jedi consulars
	else if ((GetLevelByClass(CLASS_TYPE_SCOUNDREL) > 0) || (GetLevelByClass(CLASS_TYPE_JEDICONSULAR) > 0))
	{
		AdjustedVitalityPoints = (EnemyLevel * 6);
	}
	// determine new maximum hitpoints for anything we've missed using a charitable formula
	else
	{
		AdjustedVitalityPoints = (EnemyLevel * 10);
	}

	// apply hitpoint boost
	SetMaxHitPoints(OBJECT_SELF, AdjustedVitalityPoints);

	// determine new maximum Force points for Jedi guardians
	if ((GetLevelByClass(CLASS_TYPE_JEDIGUARDIAN) > 0))
	{
		AdjustedForcePoints = (EnemyLevel * 4) + (EnemyLevel * GetAbilityModifier(ABILITY_CHARISMA, OBJECT_SELF));
	}
	// determine new maximum Force points for Jedi sentinels
	else if ((GetLevelByClass(CLASS_TYPE_JEDISENTINEL) > 0))
	{
		AdjustedForcePoints = (EnemyLevel * 6) + (EnemyLevel * GetAbilityModifier(ABILITY_CHARISMA, OBJECT_SELF));
	}
	// determine new maximum Force points for Jedi consulars
	else if ((GetLevelByClass(CLASS_TYPE_JEDICONSULAR) > 0))
	{
		AdjustedForcePoints = (EnemyLevel * 8) + (EnemyLevel * GetAbilityModifier(ABILITY_CHARISMA, OBJECT_SELF));
	}

	// clear out the enemy's force points, then grant 40 for free (just like the player character gets from the Force Sensitive feat), and then adjust the enemy's new maximum
	if (AdjustedForcePoints > 0)
	{
		ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamageForcePoints(GetMaxForcePoints(OBJECT_SELF)), OBJECT_SELF);
		AdjustedForcePoints = AdjustedForcePoints + 40;
		ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectTemporaryForcePoints(AdjustedForcePoints), OBJECT_SELF);
	}

	// for debugging; this block reports the enemy's new and improved stats to the feedback log
	/*
	SendMessageToPC(GetFirstPC(),"New Str score: "+IntToString(GetAbilityScore(OBJECT_SELF, ABILITY_STRENGTH)));
	SendMessageToPC(GetFirstPC(),"New Dex score: "+IntToString(GetAbilityScore(OBJECT_SELF, ABILITY_DEXTERITY)));
	SendMessageToPC(GetFirstPC(),"New Con score: "+IntToString(GetAbilityScore(OBJECT_SELF, ABILITY_CONSTITUTION)));
	SendMessageToPC(GetFirstPC(),"New Int score: "+IntToString(GetAbilityScore(OBJECT_SELF, ABILITY_INTELLIGENCE)));
	SendMessageToPC(GetFirstPC(),"New Wis score: "+IntToString(GetAbilityScore(OBJECT_SELF, ABILITY_WISDOM)));
	SendMessageToPC(GetFirstPC(),"New Cha score: "+IntToString(GetAbilityScore(OBJECT_SELF, ABILITY_CHARISMA)));
	SendMessageToPC(GetFirstPC(),"New hit points: "+IntToString(GetMaxHitPoints(OBJECT_SELF)));
	SendMessageToPC(GetFirstPC(),"New Force points: "+IntToString(GetMaxForcePoints(OBJECT_SELF)));
	*/
}
edit: jeez, looking through that again now it occurs to me that I don't need the custom random number function any longer and there's a few places where I could streamline variables

edit2: hmm, actually it appears there's something wrong with how I'm setting up that trigger in the AI script

Last edited by blinkyzero; 12-03-2014 at 01:43 AM.
blinkyzero is offline   you may: quote & reply,
Old 12-03-2014, 02:03 AM   #6
Fair Strides 2
Witty Programmer
 
Fair Strides 2's Avatar
 
Join Date: Jan 2012
Location: Oregon, United States
Posts: 625
Current Game: Master of Orion 2
Helpful! 
For the SendMessageToPC(), add a "DelayCommand(0.1, " after the first, and increment the 0.1 by 0.1 each time.


All of my mods are available on Deadlystream.

Always remember modders: "Quality= Effort*Time"

KSE 3.3.4 is LIVE!!! Check it out here.

Check out WalkSwitch, the Walkmesh-changing tool!
Fair Strides 2 is offline   you may: quote & reply,
Old 12-03-2014, 12:21 PM   #7
blinkyzero
Rookie
 
blinkyzero's Avatar
 
Join Date: Nov 2014
Posts: 19
Yup, that worked, for the most part. Looks like the messages sometimes get eaten up somehow by combat spam. I suppose it doesn't matter so long as the script fires normally.

Now I'm working on letting the player adjust the new mechanics in-game by toggling the difficulty settings. I thought I'd level out the damage scaling at 1.0 across the board and use Easy, Normal, and Difficult instead merely to determine the maximum stat bonuses that enemies receive and their chance to call for help (with Easy being vanilla Normal with all the new stuff disabled so that people could switch it off for particularly hard fights if they'd like).

Considering that GetGameDifficulty() exists, I figured this would be easy, but for some reason this function always seems to return 2 no matter what you've got the setting at. I assume it's just a busted routine? I think I can still use GetDifficultyModifier() to differentiate between the settings, though, as it does faithfully report the values from difficultyopt.2da.

It's kinda neat, as it opens up the possibility of having stuff appear on one difficulty level that doesn't on another.
blinkyzero is offline   you may: quote & reply,
Old 12-03-2014, 05:38 PM   #8
Christos K
Veteran
 
Christos K's Avatar
 
Join Date: Mar 2007
Posts: 752
Looking forward to this. It would greatly improve our beloved yet aging game.


"It's the one that says Bad Mother ****er." - Jules Winnfield... Describing his wallet, Pulp Fiction.
Christos K is online now   you may: quote & reply,
Old 12-03-2014, 06:13 PM   #9
blinkyzero
Rookie
 
blinkyzero's Avatar
 
Join Date: Nov 2014
Posts: 19
I've had some more free time than I expected today, so I got a fair amount done. I fleshed out the stat enhancement system some more by adding a chance for Feat-like bonuses to get applied. I wanted to simply apply the Feats themselves, but, frustratingly, it seems as though KotOR1 lacks the versatility to do this in its script. Not a huge problem, though, as stuff like Toughness and Conditioning isn't hard to mimic with plain old effects.

Adjusting the difficulty on the fly works well, too. Easy is completely vanilla, Normal has the enhancements going, and so does Difficult -- with a twist. I removed the lame damage modifier (always hated that; felt like an afterthought) and instead gave enemies on Difficult a greater chance to acquire pseudo-Feats, deadlier grenades, more potent shields, and so on. I also increased their level for the purposes of calculating hitpoints and Force points -- which in turn gives them earlier access to better pseudo-Feats. Sith troopers on the Endar Spire with Toughness II and concussion grenades? Yeah, that kept me on my toes. I want Difficult to be actually difficult, but rewarding too -- maybe with special loot only available at that level.

Right now I've got a lot of parallelism setup between the modified enemies and the PC/party: the guys you fight have their stats readjusted to function much like yours would at their level, and they can only acquire Feat bonuses that their level allows. I'm debating mixing it up and adding some wild, unexpected effects, though. We'll see. I want to make a bunch of rare loot to get distributed too. Every enemy will have a chance at carrying something neat, and the minibosses will be guaranteed loot (but utter bastards to deal with, naturally). Still need to figure out how to spawn them in a way that doesn't annoy me.
blinkyzero is offline   you may: quote & reply,
Old 12-03-2014, 06:45 PM   #10
Sith Holocron
M4-78
 
Sith Holocron's Avatar
 
Join Date: Mar 2006
Location: Pasadena, MD(Nar Shaddaa East)
Posts: 1,352
Current Game: The Old Republic
Forum Veteran Folder extraordinaire Helpful! Alderaan News Holopics contributor 
I wonder what you will do for the "Impossible " setting that was restored via K1R.




Considering trying out (or returning to) SWTOR? You may as well go through my link and help get me some SWTOR referral points!
Sith Holocron is offline   you may: quote & reply,
Old 12-03-2014, 09:00 PM   #11
Fair Strides 2
Witty Programmer
 
Fair Strides 2's Avatar
 
Join Date: Jan 2012
Location: Oregon, United States
Posts: 625
Current Game: Master of Orion 2
Helpful! 
Quote:
Originally Posted by Sith Holocron View Post
I wonder what you will do for the "Impossible " setting that was restored via K1R.
As a helpful aid, SH, Impossible is twice Hard's scaling... This mod would really make it Impossible.


All of my mods are available on Deadlystream.

Always remember modders: "Quality= Effort*Time"

KSE 3.3.4 is LIVE!!! Check it out here.

Check out WalkSwitch, the Walkmesh-changing tool!
Fair Strides 2 is offline   you may: quote & reply,
Old 12-03-2014, 09:10 PM   #12
blinkyzero
Rookie
 
blinkyzero's Avatar
 
Join Date: Nov 2014
Posts: 19
Quote:
Originally Posted by Fair Strides 2 View Post
As a helpful aid, SH, Impossible is twice Hard's scaling... This mod would really make it Impossible.
Yeah, this is pretty much what I was thinking, heh. I'm only half finished writing the mod and it's already punishing as hell on Difficult. Fun, though. Definitely going to enjoy making a bunch of rare loot for people to chase. (They'll need it!)

Oh, I think I figured out how to bring in the reinforcements without seeming too cheesy about it: I'll have them show up out of stealth/invisibility near their buddies. I've tinkered with the visual effects just a little and I think it can be made to work.

Also, do any enemies in the vanilla game really use Sneak Attack? I designed a miniboss that pops in behind you and jeez is it ever devastating.
blinkyzero is offline   you may: quote & reply,
Old 12-03-2014, 10:00 PM   #13
Fair Strides 2
Witty Programmer
 
Fair Strides 2's Avatar
 
Join Date: Jan 2012
Location: Oregon, United States
Posts: 625
Current Game: Master of Orion 2
Helpful! 
Quote:
Originally Posted by blinkyzero View Post
Yeah, this is pretty much what I was thinking, heh. I'm only half finished writing the mod and it's already punishing as hell on Difficult. Fun, though. Definitely going to enjoy making a bunch of rare loot for people to chase. (They'll need it!)

Oh, I think I figured out how to bring in the reinforcements without seeming too cheesy about it: I'll have them show up out of stealth/invisibility near their buddies. I've tinkered with the visual effects just a little and I think it can be made to work.

Also, do any enemies in the vanilla game really use Sneak Attack? I designed a miniboss that pops in behind you and jeez is it ever devastating.
As a helpful tip:

If you want to give people feats, you can make custom implants. Just add the Bonus Feat property.


All of my mods are available on Deadlystream.

Always remember modders: "Quality= Effort*Time"

KSE 3.3.4 is LIVE!!! Check it out here.

Check out WalkSwitch, the Walkmesh-changing tool!
Fair Strides 2 is offline   you may: quote & reply,
Old 12-03-2014, 10:43 PM   #14
blinkyzero
Rookie
 
blinkyzero's Avatar
 
Join Date: Nov 2014
Posts: 19
Quote:
Originally Posted by Fair Strides 2 View Post
As a helpful tip:

If you want to give people feats, you can make custom implants. Just add the Bonus Feat property.
Yeah, this actually occurred to me after I'd finished scripting a bunch of similar effects in. I was thinking armbands, though.

Can NPCs take implants without having an Implant feat? I think the last time I tried to equip an implant like that with an ActionEquipItem() it failed.

Also I'm bummed that EffectDamageShield() doesn't seem to work right, or at all really. That would have been fun to tinker with.
blinkyzero is offline   you may: quote & reply,
Old 12-08-2014, 02:06 AM   #15
blinkyzero
Rookie
 
blinkyzero's Avatar
 
Join Date: Nov 2014
Posts: 19
Well, I've got the reinforcement system working nicely now, after much fooling around. Manipulating the way stealth works for enemies is a real headache. I can spawn in stealthed reinforcements now though and they'll even pop out correctly with the nice uncloaking graphic and whack you with a Sneak Attack.

I noticed that there are some occasional quirks with the way the engine runs enemy commands, so I had to get a bit creative/hacky. If I spawned the reinforcements in around the player with their stealth stuff active from their unique spawn script, once in a while the system would be too slow and you'd see them for a second or so before the cloak activated. That was annoying and unacceptable, so I figured spawning the reinforcements at the module starting location, leaving them there for a couple seconds so their stealth gets sorted out, and then warping them over to you might work. Turns out it does -- quite well, in fact.

I accidentally stumbled into a solution for randomizing where the enemies show up around you, too. I should've thought of it earlier. Basically I just take the initial location of the reinforcement, then run it through a bunch of randomized locations established off the player's vector. After each attempt to warp the enemy, I check the enemy's new position. If it's the same as before, then clearly the module geometry made that JumpToLocation() impossible, and the loop repeats until a suitable spot is found. This would be easier if JumpToLocation() returned data on a failure (maybe it does and I'm overlooking it?), but it's still doable.

Now I'm trying to get melee enemies not to dump their stealth as soon as they see you by initiating a default attack. I want them to creep up on the party and inflict horrible Sneak Attack pain. I suppose I could cheat and just make sure the melee-equipped reinforcements spawn right next to a target, but that's corny, and I'm trying to make Awareness actually useful.

edit: actually it seems like the Sneak Attack damage only triggers when the enemies hit you from behind like usual. It's not being applied to the first stealth attack an enemy makes. I wonder if that's an engine limitation.

Last edited by blinkyzero; 12-08-2014 at 03:50 AM.
blinkyzero is offline   you may: quote & reply,
Old 12-11-2014, 06:01 PM   #16
Phildevil
Junior Member
 
Phildevil's Avatar
 
Join Date: Jan 2006
Location: Québec, Canada
Posts: 457
Interesting mod! I'll follow its progress even if ultimately, I'm not enough of a hardcore player to try this, unless it works at easier difficulty, that is :P


[TSL]Twin Sun to Asari mod: http://lucasforums.com/showthread.php?t=215135
My Mass Effect 3 Let's Play with great mods:
https://www.youtube.com/playlist?lis...2ABayfc2whWsP-
Phildevil is offline   you may: quote & reply,
Old 12-11-2014, 06:51 PM   #17
blinkyzero
Rookie
 
blinkyzero's Avatar
 
Join Date: Nov 2014
Posts: 19
Quote:
Originally Posted by Phildevil View Post
Interesting mod! I'll follow its progress even if ultimately, I'm not enough of a hardcore player to try this, unless it works at easier difficulty, that is :P
Currently I've got it setup that Easy is equivalent to vanilla KotOR's Normal, without any of the extra bells and whistles that the mod offers, so that folks can quickly and easily switch everything off if it gets too hard. Normal has the reinforcements and stat/feat-like bonuses for the enemies, with Difficult being more of the same, but with higher ceilings for stat improvements and what random items get distributed. Normal and Difficult also disable the free healing that you get for transiting back to the Ebon Hawk/hideout, because I want to encourage medpack use (which there will be more of, since many enemies will be carrying them now).

Open to suggestions on how to tweak it, though! I think I could implement the unused fourth difficulty level to put in another tier. Maybe a rank that has no stat bonuses or reinforcements, but just the added items.

Right now I've just finished up implementing "depleted" energy shields, which are basically one-shot versions of the usual shields. Handing out the usual mostly-charged ones to enemies got ridiculous in a hurry because you'd have like 30 of them before the end of Taris as the enemies only use one activation at a time. I think it makes sense from a gameplay and realism perspective...if someone has a shield, they've probably used it at least a few times already, especially if they're a Sith soldier in a war.

Also working on making a bunch of new loot and gear for the reinforcements to use (and perhaps normal enemies too) because who doesn't like new loot?
blinkyzero is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Editing / Modding > Holowan Laboratories > Random Enemy Enhancement and Reinforcement Mod

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:34 AM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.