-
Content Count
30 -
Joined
-
Last visited
-
Days Won
5
Content Type
Profiles
Forums
Blogs
Forum & Tracker Requests
Downloads
Gallery
Store
Calendar
Everything posted by blinkyzero
-
Hi Salk, just saw this thread. You're correct -- Bioware never really added functionality for those NPC scripts. There's a bunch of places in k_inc_generic and k_inc_gensupport where you can clearly see they intended to, but apparently never got around to it. Adding support for them isn't too hard, though. Just involves a lot of hooking into GN_DetermineCombatRound() and its myriad associated functions. I've got a Passive script working now in my Enemy Enhancer mod that can be selected and used just like any other. The Ranged and Melee ones shouldn't be hard, either...I just haven't had any time this week to fool around with it. :-(
-
Yup, it could always be an optional feature of some sort. I'll see what I can do.
-
Yeah, I'm a perfectionist though, heh. But you're probably right. I did just fix another irritating bug with the base game -- the tendency of enemies who have more than one medpac in their inventory to use the second one right after the first even if they're at full health. There was no check in place to prevent the healing subroutine from filling up the action queue with medpac usages.
-
Probably. The developers used the talent-finding functions a lot in the Force power combo scripting, and I've already discovered that at least one of those functions has bugs. It wouldn't surprise me at all to find that others do as well -- and that the original KotOR script writers just assumed they worked properly when this wasn't in fact the case. If you browse through the NWN Lexicon database (http://www.nwnlexicon.com/), it's not hard to find a lot of little quirks that the engine never did get patched. Honestly at this point I'm thinking of just rewriting the entire DetermineCombatRound() system and its associated functions. The original is a sloppy mess, and introducing new AI features into it (or fixing design decisions/bugs within it) is difficult because of how poorly the thing was thought out and executed in the first place.
-
I'm not familiar with that mod, but my guess would be probably not, as I expect it works by increasing the damage multiplier in difficultyopt.2da. The Enhancer makes a bunch of changes to that .2da in order to do its work, changes that the TSLPatcher can't reconcile. That said, it would be a pretty easy task to combine them, and I'd be happy to make a version that also has increased enemy damage.
-
Hmm, good ideas! Most of this is very doable. It would be a pretty simple matter to get party members who have Force Speed to use it when the active party member does so out of combat. Maybe the best quality-of-life change we can make here is to simply have Force Speed affect all members of the party while out of combat (and wipe the effects immediately from non-Jedi when combat begins). HK-47 not using his Power Shot is in fact a BioWare bug and one which I've fixed in this mod. As for enemy combat feat selection, that can also be improved, for sure. The vanilla system is downright stupid -- there's a set list of pre-determined combos that enemies can use, and the AI just randomly picks an available one (or a generic attack). I don't like these combos at all, since I think it's better to have enemies weigh their options before each individual attack, and I was planning on reworking the system. This will also affect party members, of course. Hmm, not sure something like a tooltip is possible. I could have pre-buffing trigger a descriptive dialogue pop-up of some kind -- not a full conversation that stops the action, just one of those windows you get sometimes in the corner of the screen to tell you stuff. That said, enemies can't tell what you've got pre-buffed, so why should you be able to? Party AI will definitely be improved. I myself find being able to turn it off completely now to be wonderful, but I'm a micromanager sort of person I suppose.
-
Yeah, I'm actually not a huge fan of it myself either, but it'll be easy to turn on and off (and you're right, many people do like it, which is why I figured it'd be a good inclusion).
-
Done. Also, think I might change the highest level of difficulty a bit. I got the artificial level-up system working fine (KotOR1 has no way of forcing an enemy to level up so you have to fake it), but it's sort of goofy. You end up with a lot of enemies that are significantly more powerful but don't grant any additional reward for defeating them (which is one of my problems with the lame damage multiplier of the default difficulty system). You can't change enemy Encounter Ratings on the fly in scripts, unfortunately, and though I suppose I could calculate the difference between the old level/new artificial level and award XP accordingly when enemies die, I don't really want to, since it's sort of clunky to do so and would also result in that pesky XP inflation -- always a problem in a game where the level cap is more or less hardcoded (and I'd rather not just make it harder to level; that's beyond the scope of this project). Instead, I recalled a feature of some Baldur's Gate 2 mods that I love: fast buffing. (I think the NWN series had this at some point too? It's been a long time.) Essentially the idea is that enemies capable of buffing themselves with something do it instantly at the start of combat to simulate the sort of pre-buffing that players usually engage in. Seems to me that would be a fair difficulty increase for KotOR players -- running up against pre-stimmed, pre-shielded, pre-Force buffed enemies. I also think I'll split the improved enemy feats off into a separate, complementary mod designed to work with the Enhancer, but alone if need be. The reason for this is that I'm finding the overwhelming majority of enemies in the game are either Minions or Soldiers (or Jedi Guardians, later on). There's very few Scouts or Scoundrels, which is disappointing, since those classes have some really nasty feats (Sneak Attack is absolutely brutal to have used against you). You can't change an enemy's class via scripting, unfortunately, and though I could fake it by assigning feats to them as though they were of a different class, it's not particularly elegant. I'd rather go through each module and do an overhaul of the UTCs themselves, changing classes and whatnot manually. The only concern there is with mod compatibility, but it's a minor issue -- folks could just go with another mod's module file in the case of a conflict. All they'd lose would be some relatively minor tweaks to stats and feats for enemies in that area. Additional observations: I got through Taris on a test run so far and no issues. Squishy party members definitely need to be watched out for now -- poor Mission keeps getting absolutely rekt, since most of the enemies make a beeline for her. I find myself using tactics I've never bothered with before, like stuns, slows, and mines, just to keep them off her. Also enemies with grenades are a minor nightmare, especially if a large group all lucked out and got assigned some -- they're smart enough now to toss them all in at the same time and just devastate you.
-
-
Brief update because I found some time to work on this again today and like keeping a written record of what I've done, lest I forget and do something twice. :3 I setup a few additional difficulty levels and nullified the damage decrease/increase of the old system. Now difficulties are just settings for which Enemy Enhancer features you want to use. The Impossible difficulty is for true masochists -- not only does it give all of the bonuses of the difficulties below it, it also boosts an enemy's stats (and available feats) as though they are 2 levels higher than their current level. (Maybe I should make it a random number of levels, like 0-3?) * Easy: [X] Party AI Improvements [ ] Enemy AI Improvements [ ] Enemy Stat Enhancements [ ] Enemy Equipment Bonuses [ ] Enemy Level Up Bonuses * Normal: [X] Party AI Improvements [X] Enemy AI Improvements [ ] Enemy Stat Enhancements [ ] Enemy Equipment Bonuses [ ] Enemy Level Up Bonuses * Difficult: [X] Party AI Improvements [X] Enemy AI Improvements [X] Enemy Stat Enhancements [ ] Enemy Equipment Bonuses [ ] Enemy Level Up Bonuses * Very Difficult: [X] Party AI Improvements [X] Enemy AI Improvements [X] Enemy Stat Enhancements [X] Enemy Equipment Bonuses [ ] Enemy Level Up Bonuses * Impossible: [X] Party AI Improvements [X] Enemy AI Improvements [X] Enemy Stat Enhancements [X] Enemy Equipment Bonuses [X] Enemy Level Up Bonuses
-
Oops, yeah -- I didn't even notice Salk was checking the booleans the other way. JCarter's definitely right. Use the method he described.
-
Hi Salk -- I was poking around today, trying to see if anyone had looked into this question at all since last year. No joy, looks like. However, I think that in k_inc_generic the developers (mostly) documented the local numbers they ended up using. Here's what we've got there: //LOCAL BOOLEANS RANGE FROM 0 to 96 int AMBIENT_PRESENCE_DAY_ONLY = 1; //POSSIBLE CUT int AMBIENT_PRESENCE_NIGHT_ONLY = 2; //POSSIBLE CUT int AMBIENT_PRESENCE_ALWAYS_PRESENT = 3; int SW_FLAG_EVENT_ON_PERCEPTION = 20; int SW_FLAG_EVENT_ON_ATTACKED = 21; int SW_FLAG_EVENT_ON_DAMAGED = 22; int SW_FLAG_EVENT_ON_FORCE_AFFECTED = 23; int SW_FLAG_EVENT_ON_DISTURBED = 24; int SW_FLAG_EVENT_ON_COMBAT_ROUND_END = 25; int SW_FLAG_EVENT_ON_DIALOGUE = 26; int SW_FLAG_EVENT_ON_DEATH = 27; int SW_FLAG_EVENT_ON_HEARTBEAT = 28; //int SW_FLAG_AMBIENT_ANIMATIONS = 29; located in k_inc_walkways //int SW_FLAG_AMBIENT_ANIMATIONS_MOBILE = 30; located in k_inc_walkways int SW_FLAG_FAST_BUFF = 31; //POSSIBLE CUT int SW_FLAG_ASC_IS_BUSY = 32; //POSSIBLE CUT int SW_FLAG_ASC_AGGRESSIVE_MODE = 33; //POSSIBLE CUT int SW_FLAG_AMBIENT_DAY_ONLY = 40; //POSSIBLE CUT int SW_FLAG_AMBIENT_NIGHT_ONLY = 43; //POSSIBLE CUT int SW_FLAG_EVENT_ON_SPELL_CAST_AT = 44; int SW_FLAG_EVENT_ON_BLOCKED = 45; int SW_FLAG_ON_DIALOGUE_COMPUTER = 48; int SW_FLAG_FORMATION_POSITION_0 = 49; //POSSIBLE CUT int SW_FLAG_FORMATION_POSITION_1 = 50; //POSSIBLE CUT int SW_FLAG_FORMATION_POSITION_2 = 51; //POSSIBLE CUT int SW_FLAG_FORMATION_POSITION_3 = 52; //POSSIBLE CUT int SW_FLAG_FORMATION_POSITION_4 = 53; //POSSIBLE CUT int SW_FLAG_FORMATION_POSITION_5 = 54; //POSSIBLE CUT int SW_FLAG_FORMATION_POSITION_6 = 55; //POSSIBLE CUT int SW_FLAG_FORMATION_POSITION_7 = 56; //POSSIBLE CUT int SW_FLAG_FORMATION_POSITION_8 = 57; //POSSIBLE CUT int SW_FLAG_FORMATION_POSITION_9 = 58; //POSSIBLE CUT //int SW_FLAG_TARGET_FRIEND = 59; Located in k_inc_gensupport int SW_FLAG_COMMONER_BEHAVIOR = 60; int SW_FLAG_SPECTATOR_STATE = 61; int SW_FLAG_AI_OFF = 62; int SW_CANDEROUS_COMBAT_REGEN = 63; int SW_FLAG_BOSS_AI = 64; int SW_FLAG_SHIELD_USED = 65; int SW_FLAG_EVENT_ON_DIALOGUE_END = 66; int SW_FLAG_RESISTANCES_APPLIED = 67; int SW_FLAG_EVENT_DIALOGUE_END = 68; //User defined event //This flag is set when the creature percieves a hostile for the first time. //Used to eliminate the delay a creature puts on his perception event when first seeing a hostile. int SW_FLAG_STATE_AGITATED = 69; int SW_FLAG_MALAK_AI_ON = 70; int SW_FLAG_DYNAMIC_COMBAT_ZONE = 71; int SW_FLAG_EVENT_ON_DIALOGUE_INTERRUPT = 72; I'm pretty sure those formation flags from 49 to 58 never got used, so they could very well be fine to mess with.
-
I'm not sure offhand, but the group healing really isn't difficult anyway. It's a simple matter of cycling through nearby enemies and applying a heal effect to them.
-
Right, yeah, resurrecting the enemies isn't really feasible. It can be done, but it's not really worth the headache. Instead I just rewrote the function that governs the recovery stim to heal the enemy and all of his nearby buddies, which the item also does for the player and the party when you use it. Sort of an enemy group heal.
-
Oh, good suggestion! This makes sense. I can easily include an Intelligence/subrace check.
-
Thanks for the feedback, guys! Yeah, it's a pretty broad range of changes. I'll probably have a few different installation configurations so that people can choose how many of the features they'd like to use. This is of course very easy with the TSLPatcher. The focus fire mechanic works by modifying DetermineCombatRound's target selection function. It's not hard to implement a series of checks at the beginning of every combat round to see if there's a better target available for the enemy to go after. I'm looking at potentially using the shout system to do some other things with it, too, though at the moment it seems unnecessary. Yup, this is basically how I had it implemented when I had to set the project aside last year. Yeah, unfortunately KotOR1's way of adding feats is really inelegant compared to KotOR2's. You have to have an item grant the bonus instead of using a function to directly apply it. I've also found some weird bugs with this, like GetCreatureHasTalent() being unable to detect the talents associated with combat feats when those feats are granted via item. Looks as though that function in KotOR1 only looks at the NPC's raw data from the .utc file. GetHasFeat() does pick up these added feats, though, so changing the combo selection functions to check for possession of the feat instead of possession of the talent (and then forcing the use of that feat's associated talent) works. Creature items seem ideal for this sort of thing, yup. Attributes can be modified on the fly by script commands, which I've found easier and more flexible, especially because that makes fewer items that need to be equipped to the NPC (which can cause issues considering that the only way to get the items equipped is to have an action do it -- not always ideal in hectic combat situations when the action queue is a delicate thing). I was having all kinds of little issues with them last year. I understand the DCR system much better now, though (and whoever wrote parts of it for BioWare did a sloppy job in places, I've got to admit), and I managed to fix the problems pretty easily this time around. Yup, this one was a snap. So was the Passive AI script once I figured out how to best implement it. There's actually plenty of room for more of these scripts, too -- I'm considering making some more complex ones for party members because the existing choices aren't very robust. (KotOR's party AI can be downright stupid a lot of the time as it is, which was my reason for wanting to be able to just switch it off at the drop of a hat.) Neato! Yeah, I'd like to see that. I actually got pretty much the same thing working toward the end of developing this project, but it never hurts to see more methods. The reinforcement system may never be a reality. Some of the issues it introduces are pretty awkward, like XP bloat from killing additional enemies. There are ways around this -- making reinforcement challenge ratings low or nonexistent so they grant little to no XP -- but that's just kind of goofy. As someone suggested elsewhere, though, it could be a nice addition to certain places where slews of enemies are expected, like the Leviathan or the Star Forge. It also wouldn't be hard to pick and choose only certain places in the game, like boss fights, where reinforcements have a chance to pop in. I like the idea of making specific battles more challenging, too. This would also make it much simpler to solve the issue of reinforcements messing up scripted sequences (of which KotOR has so many, and which are difficult to work around without arduous decompiling and examination of the myriad NPC scripts). Probably I'll just shelve this for now and make it part of a separate "boss mods" mod or something down the road. Thanks! It's a fun diversion. Any sort of scripting that deals with the combat system (which is frankly a tangled mess) is frustrating, but still fun. 8) I loathe level scaling, yeah. I really only want to scale enemy stats/skills up to where they should be for their class and level (a lot of the default enemies are woefully undertuned).
-
Hi folks! About a year and a half ago I was working on a mod for KotOR1 to make enemies more dangerous by improving their AI and use of feats and weapons, but I had to set it aside after a while when life got too busy. Thankfully, though, all the kind advice the good souls here at Deadly Stream gave me back then won't be wasted, as I've finally got a bit of free time coming my way this month and hope to be able to finish the project. I'll be tracking what I get done here on this WIP post. I'd be particularly grateful for any suggestions, too, especially pertaining to how we can make enemy AI smarter. So far, the focus fire feature has proven to be particularly challenging to fight against, and I suspect it could be even more fiendish with additional priorities beyond the standard "kill the one in the dress waving his hands and healing" sort of thing. 8) KotOR1 Enemy Enhancer Completed Features Player Quality of Life Changes [X] New Passive AI script. This selectable script prevents party members who have it assigned to them from performing any actions in combat other than those the player queues up. [X] Party AI toggle. Turning on Solo Mode now disables all party member AI in combat, regardless of assigned scripts. Turning Solo Mode off causes party AI to return to normal. Enemy Enhancements and Bug Fixes [X] Focus fire. Enemies now tend to seek out the party's weakest members/support characters (especially healers) and coordinate their attacks against them. [X] Guns 'n stuff. All enemies and party members with ranged attack feats now use them properly. [X] Shield happy! Enemies who possess shield units can now activate them more than once per fight and will do so when prudent. [X] Stat scaling. Enemies whose ability scores are lower than what their level would give an equivalent player will be dynamically granted bonuses to make up the difference. [X] Difficulty scaling. Instead of altering enemy damage totals, the in-game difficulty settings will instead determine the frequency and degree of the various Enemy Enhancer features. In Progress [-] Bonus equipment. Enemies will randomly be given medpacs, shield units, grenades, and other goodies to use against you in combat. [-] Extra feats. Enemies will sometimes receive a package of new feats (in line with their level and class, of course). [-] Stim junkies. Enemies will now use combat stims, including the squad recovery stim. Possibilities... [?] Enemy reinforcements. Certain enemies will have a chance to summon friends to help them.
-
-
Is the TSL Patcher for this mod broken? When I extract the archive and try to run High Quality Blasters Installer.exe, I get the error "Unable to locate the instructions text! Make sure the 'tslpatchdata' folder containing the 'info.rtf' file is located in the same folder as this application." There's no info.rtf in the tslpatchdata folder, either.
-
Hi folks. The AI/difficulty mod I'm working on needs a way to keep track of a few variables on enemies, and currently I'm using a token system that places/checks for dummy items in enemy inventories (and then removes them on death). It works just fine, but is a touch inelegant. I'd rather use local booleans. However, I can't find much information on which boolean values are unused in KotOR1. Stoffe has some info about them in KotOR2 over on LucasForums, but K1 is a different beast (the first and most pressing difference being that K1 booleans seem to cap out at 95). 95 itself doesn't like being toggled, but 92, 93, and 94 work. Anyone know if these are free for the entire game or if they're used somewhere I haven't found? The boolean defines in k_inc_generic and elsewhere don't seem to use anything above 72, but I am deeply suspicious.
-
Hmm, yeah, that's a good idea about the Leviathan and Star Forge. Also the Sith base on Taris and a few other places. I agree with Achilles, too; not every fight should be a boss fight, it's just that base KotOR1 (and KotOR2 even more so) gets ridiculously easy even on Difficult, which I at least find ruins some of the fun of becoming a powerful Jedi/Sith. Making the ion guns and shield-breaker abilities more useful was one of my original motivations for tinkering with the shields, yup. And yeah, I've got custom armbands in the dynamic script system that give bonus feats like Rapid Fire and whatnot. Between that, the shields, the medkits, and the leveled playing field that the attribute adjustments provide, the Sith ground troops are actually pretty fearsome in the early game, which I feel they should be.
-
Yeah, I can't figure it out either. It's not hard to get the shield effect itself on the Jedi -- I can always just fake it by applying the effect and providing the animation -- but that doesn't eat up charges on the shield unit, and I don't think there's any way for a script to burn charges off an item without actually activating it. Suppose I could create a ton of copies that just have depleted charges, then keep track of how many pseudo activations the Jedi uses in order to swap in a faked unit on death...but it'd be ugly and inelegant. I might just skip the shields for them completely as they're already much tougher with the mod as it is right now. Yup, I agree. Right now it all seems to work really well, making combat more tactical (and much more difficult). My aim was to make enemies more equivalent to party members, so I have a dynamic script that adjusts attributes (and, accordingly, saves) to be in line with what a player of the NPC's level would have, alters (oftentimes dramatically) Vitality and Force points to be in line with the actual ruleset, hands out free medkits, shields, grenades, etc. I had to fix Bioware's medkit code -- it chokes on itself and often orders needless double or triple uses of medkits when enemies have more than one available in their inventory -- but it works really well after a few tweaks. It's both really cool and really frustrating to be fighting Sith soldiers now who routinely get down to 20% or so health, then pop a shield and a few medkits and get right back up to full health. I'm also working on a reinforcement system that allows wounded enemies to call for help, though I might scrap that as it's turning out there's a lot of scripted battles in KotOR that even a single additional enemy sort of messes up. Once I get this done, I want to do the same thing with KotOR2, which has a lot of additional scripting power I'm sorely missing in KotOR1 -- like the ability to add feats on the fly without resorting to dumb armbands, the ability for NPCs to set mines, etc. etc.
-
It's part of a larger mod I'm making to make enemies tougher and a bit smarter. This particular part makes enemy shield use less dumb. As it is, most of those that have the units equipped in their UTC file will use them exactly once -- when combat begins -- and not again (by Bioware's design). I've rewritten some of the relevant code in the combat round calls and a couple places elsewhere to get them to use the shields repeatedly, like a player, and also to equip them from their inventories when a dynamic script distributes them. So far it works perfectly except for the Jedi classes. The failure point is here in GN_ActivateForceField() from k_inc_generic (which of course I have to recompile back into k_ai_master; that's no sweat though): int nCnt, nStop; int bValid = FALSE; talent tShield; if(GetRacialType(OBJECT_SELF) == RACIAL_TYPE_DROID) { nCnt = 110; nStop = 115; } else { nCnt = 99; nStop = 107; } while(bValid == FALSE && nCnt <= nStop) { tShield = TalentSpell(nCnt); if(GetCreatureHasTalent(tShield)) { bValid = TRUE; } else { nCnt++; } } if(GetCreatureHasTalent(tShield)) { GN_MyPrintString("GENERIC DEBUG *************** Clear 1700"); ClearAllActions(); ActionUseTalentOnObject(tShield, OBJECT_SELF); GN_SetSpawnInCondition(SW_FLAG_SHIELD_USED); return TRUE; } Quite simply, a pure Jedi class NPC fails to hit on anything during the while loop, even if the shield unit is already equipped in the UTC. The shield talent should be available to them, but they never get it.
-
Hi folks. For the life of me, I can't figure out why GetCreatureHasTalent() won't recognize armband shields equipped on Force-using classes in KotOR1 (Guardians, Sentinels, and Consulars, obviously). It's almost as though these classes are locked out of accessing the shield entries in spells.2da (99 through 107 for organics, 110 through 115 for droids, though the latter wouldn't apply here, of course). Scouts, Scoundrels, Soldiers, the two droid classes, and even Minions pick up the shield use talents just fine, and in fact so do the Force-users if I add a mundane class to them with AddMultiClass() -- though this has the bizarre effect of throwing a bunch of XP at the player character too for some reason. Is there a restriction buried somewhere in the .2da files that prevents pure Jedi classes from using shields?