stoffe Posted August 19, 2005 Share Posted August 19, 2005 Do we still have to add the line(s) to enable the hardcore mod? Yes, I don't use the hardcore mod myself, and since it's not my mod I can't make a version that uses it. If you want to use it along with these scripts you will have to add it in and recompile. I've been changing things in the k_ai_master.nss script, so you should add the call to the hardcore mod function at line 141 in this version. Link to comment Share on other sites More sharing options...
maaneeack Posted August 19, 2005 Share Posted August 19, 2005 I found it a few mins after I posted, been too busy playing through nar shadda for the first time in 3 characters (my other two kept crashing at the exile holorecord and my edits to GLOBALVARS.res made things worse, heh). great mod. Link to comment Share on other sites More sharing options...
SpaceAlex Posted August 19, 2005 Share Posted August 19, 2005 I'll try this one out. Great job as always. Link to comment Share on other sites More sharing options...
Janan Pacha Posted August 20, 2005 Share Posted August 20, 2005 This is an interesting thread - especially where the droids are concerned, let me first state thoguh that I'm no help with scripting (I'm only typing all of this because there's a chance someone here may find the work interesting). I did however have a conversation on AIM with a person from the Bioware forums back before TSL came out. - You see we both disliked how they'd made the droid special weapons be depleted permanently (in TSL at least there's exceptions to that) but what the guy was trying to figure out how to do was this: Instead of have charges, it worked just like Jedi powers, the droids would have an energy level (force points) just like Jedi and everything - and equiped special droid weapons would take "amount of force points" out of that pool - but would recharge. (possible spoilers bellow . . . not sure anyone here doesn't know this stuff though) There were two reasons for this, one because - like I said, he disliked the way charges worked, but more importantly because he was trying to add an option for the Revan character to customize HK and T3 after realizing that s/he was Revan. The change would have been a lot like the character replacers some people came up with - HK would have been replaced with a light or darkside HK (the color would change but not the characters responses) that could equip new droid weaponry that would tap into an energy packet (ie - force points). Both droids had light and darkside textures, and both had light and dark side special equipable items (in theory) that were rstricted to light and dark sides (not a force point penalty, actual 'no-use' restrictions). They weren't major things, T3 got versions of shock and plague - shock looked the same, but they were trying to make plague look like a glowing poisoned dart was shot at the oponent. There were other things for the light side T3 could heal and cure poison - the whole idea was to make driods less useless - because anything not wielding a saber in the late game seemed rather "meh". HK was more melee based, the idea was to make it able to wield a saber and have droid equipables - light or dark - that augmented that fact (like force speed). - The guy couldn't figure out how to get it all working though, which is disapointing I was really worked up about it at the time. I even tried learning how to make it happen - but I'm just not capable of that sort of stuff. I get the ideas, but the actual technical details make me go total zombie-like. Link to comment Share on other sites More sharing options...
countzero Posted August 25, 2005 Share Posted August 25, 2005 Hey this is exactly what I was looking , but I have a question... Is it compatible with the holowan plugin? The holowan plugin has the hardcore mod that uses the file: "K_ai_master.ncs" same as this mod. If I left this file as it is (from the hardcore mod) and put all the other files from the aitweak would it work? Damn ,I really want to use this mod but I also want the hardcore mod to make the game more challenging... Link to comment Share on other sites More sharing options...
stoffe Posted August 25, 2005 Share Posted August 25, 2005 Is it compatible with the holowan plugin? The holowan plugin has the hardcore mod that uses the file: "K_ai_master.ncs" same as this mod. If I left this file as it is (from the hardcore mod) and put all the other files from the aitweak would it work? I don't know if there are other incompatibilities with the Holowan Plugin since I don't use it, but k_ai_master is the main creature AI script and is essential for this AI tweak to work. Since the Hardcore mod only adds 3 lines to this file however it's fairly easy to add the Hardcore mod to the k_ai_master.nss file that comes with this mod and then recompile it. There are instructions for how to do this posted above in this thread. See this post. But as for if it's compatible with the rest of the Holowan plugin, I'm afraid I have no idea... Link to comment Share on other sites More sharing options...
countzero Posted August 25, 2005 Share Posted August 25, 2005 Thanks stoffe , I read the post but to tell you the truth I'm a real noob when it comes to editing/compiling game files. I would REALLY appreciate it if you or someone else could post the recompiled file. Since there are other people who have made both mods compatible I hope that someone could do this. Link to comment Share on other sites More sharing options...
maaneeack Posted August 25, 2005 Share Posted August 25, 2005 I'm using the holowan plugin as well, I just downloaded the hardcore mod from pcgamemods and dropped it's nss files in with stoffe's, made the changes above, and complied. No problems so far as far as I can see. Link to comment Share on other sites More sharing options...
stoffe Posted August 26, 2005 Share Posted August 26, 2005 Thanks stoffe , I read the post but to tell you the truth I'm a real noob when it comes to editing/compiling game files. I would REALLY appreciate it if you or someone else could post the recompiled file. Since there are other people who have made both mods compatible I hope that someone could do this. Sorry, I'm afraid I am not allowed to modify and upload the hardcore mod for public download without beancounter's permission since it's not my mod. I can only tell you how to do it yourself for your own private use. Link to comment Share on other sites More sharing options...
stoffe Posted September 10, 2005 Share Posted September 10, 2005 Since I haven't heard from anyone about any odd behavior resulting from the recent major changes to the targeting routines, it would mean that either nobody has run into any problems, or nobody else uses this AI hack. In case someone is interested, I have just uploaded another new version of this generic AI tweak where I have added some changes I did for a Mod I made, and squashed a few more bugs I discovered. You can get it here if you want to try it out. ANOTHER EDIT: I've uploaded a version with an automatic installer adepted to make the modified AI work with my High Level Force Powers mod. You can get that one here. EDIT: Uploaded another update, see this post for details. This is new in this update: Improved the new targeting routines a little more, and adjusted the criteria for picking a target. Improved Force Power/Feat usage filters further, hopefully getting rid of the behavior with Jedi using Stasis Field on an already paralyzed opponent. Made some changes to AI for party members set to Jedi Support, which hopefully will reduce the instances where they just stand around and won't attack enemies even though they were in range. Made a workaround for a bug that would prevent AI-controlled creatures from activating Wookiee rage. They'd just stand there doing nothing while trying previously. Fixed a few bugs that occasionally would make Non-party NPCs drop out of combat and just stand there until they were hit with a weapon again. Don't know if you can be flatfooted in this game, but if you can that behavior would be really bad. Made ranged weapon users react a little more intelligently when they lose sight of their target. Numerous other minor tweaks and fixes. Don't remember them all. Warning: Since it's difficult to spot any potential quirks a creature combat AI can contain without extensive playtesting, it's possible that some bugs and odd behavior has resulted or has been amplified by these modifications. When I learn of such cases I will look into them and try to fix them. Please let me know if you spot any odd behavior resulting from these changes. As a reference, this remains since earlier versions: 1) General changes: Characters will only use the best they have in a family of active combat feats. I.e. if they have Flurry and Improved Flurry, they will only use Improved Flurry, never Flurry, like the standard AI often would. NPCs will only use the best force power in a tier of force powers. I.e. if the character knows Wound, Choke and Kill they will only use Kill, unlike the standard AI. There are a few exceptions to this, where lower tier powers still are useful. For example they will still use Whirlwind occasionally even if they know Force Wave. While Non-partymembers also are affected by this, occasionally some of them may fall back to the old behavior briefly if they have any custom AI scripts assigned to them in the game. Added some sanity checks and usability filters to force powers. For example if a target is already horrified the character will not continue to spam Force Insanity on them, and they won't use Stasis/Stasis Field on targets who are already held in stasis. A creature with Wookiee Rage (Hanharr etc) will enter Rage every now and then during battle. Non-party NPCs set to use the BOSS AI should now use Force Crush on occasion if they know it. If Bao-Dur is fighting unarmed, he will use his Shield Breaker combat feat if the enemy he is fighting has an energy shield activated. Modified the AI to be a little more varied in its behavior when the creature becomes injured. Previously a force user with Drain Life would stop doing anything else but use Drain until they got back above 50% health again. They will still try to heal often, but no longer exclusively, when injured. Completely changed how the AI picks an opponent to fight, in order to make them a bit more focused on who they are attacking, and hopefully a tiny bit more intelligent. The AI will now check all nearby opponents and rank them according to a series of criteria before deciding who to attack. Fixed bug where the AI would try to use the first tier Heal force power to cure poisons, which that power isn't capable of. Fixed bug/oddity with AI using buff/defense powers that affect the whole party. If, for example, Visas knows Master Energy Resistance and Kreia has Energy Resistance, and Visas has activated Master Energy Resist, the AI wouldn't check that the higher power than what she knows was already active, and Kreia would try to cast the best she had (Energy Resistance). Since the script of that power checks if a better power in the same tier is already active on the caster and if so does nothing, she would cast the power, but it wouldn't do anything. Next round the AI would see that the buff wasn't there and decide to try to use it again... and again... and again, until the Master Energy Resist wore off and the script would trigger. It now checks if an equal or better power in the same tier is already active before trying to use a force power. Fixed bug for non-party droid AI, they will no longer try to use poisoning droid weapons (like Toxin Emitters) against droid party members, as droids are immune to poison. Fixed some odd behavior were party members sometimes refused to attack enemies who were incapacitated. Re-wrote the target selection code quite a bit for AI controlled party members. It should now be less prone to rush away into yet unexplored rooms and try to attack enemies behind closed doors etc. Added optional rudimentary support for the AI to use some of the new force powers in the High Level Force Powers mod I released a while ago. This is turned off by default since you need to manually set which lines in your spells.2da is occupeid by these new powers. If you wish to use it, open the include file st_inc_powers.nss and change the values assigned to the globals at the top to match the line numbers in your 2DA file, and set the ST_GLOBAL_ENABLE_POWERS global to TRUE. Make very certain you set the correct numbers, or odd behavior may occur. Then recompile all the scripts listed in the compileall.bat file. Added support for making the big boss-type opponents in the game use some High Level force powers if you have that mod installed. This is disabled by default, to enable it, change the ST_GLOBAL_ENABLE_BOSS_POWERS global in the st_inc_powers.nss file to TRUE and recompile. Be warned that this may make those fights a lot harder. 2) Changed to the Jedi Support Style (partymembers only): AI controlled characters will stay within 10 meters of the party leader and only attack targets they can reach from there with its currently equipped weapons or selected force powers. 3) Changes to the Grenadier Style (partymembers only): Droids will occasionally use their equipped special droid weapons during combat. T3M4 will use its Shock Arm more often since it has unlimited charges. If T3M4 is equipped with its Renewable Shield, it will automatically activate the shield when entering combat, and re-activate it whenever it drops during the battle. If G0T0 is in the party and you are fighting droids, it will use its Droid Scrambler ability occasionally. Droids will use their combat feats (Rapid Shot, Power Blast...) more often than before. AI controlled characters will stay within 10 meters of the party leader and only attack targets they can reach from there with its currently equipped weapons. If a party member is equipped with a wrist rocket launcher (only Mira normally), she will use it to lob grenades and launch rockets every now and then in battle. Other party members will not use grenades in battle when set to this style any more. 4) Changes to the Ranged Style (partymembers only): If a party member is equipped with a wrist rocket launcher (only Mira normally), she will use it to lob grenades and launch rockets occasionally when in battle. 5) Changes to the Aggressive Style (partymembers only): Force users set to this will use their buffing/defense powers on occasion, though a lot more rarely than those set to Jedi Support. Link to comment Share on other sites More sharing options...
TheOssusKeeper Posted September 11, 2005 Share Posted September 11, 2005 cool, downloading now, thanks Stoffe, nice work Link to comment Share on other sites More sharing options...
Achilles Posted September 11, 2005 Share Posted September 11, 2005 stoffe -mkb-, I love your mods and usually install your work on the day that you release it. Unfortunately, I've been much to busy playing Vampire: The Masquerade - Bloodlines to fire up TSL. Once I get back into my Star Wars mindset, I'll be happy to offer feedback on your tweaks. Link to comment Share on other sites More sharing options...
stoffe Posted September 21, 2005 Share Posted September 21, 2005 Even though it wasn't too long since I uploaded a new variant of this tweaked combat AI, I figured I may just as well integrate the most recent changed I did for the AI in the Combat Arena mod (which I use a somewhat modified variant of this AI in) in this generic AI tweak as well. While not much has changed it still makes some impact in enemy behavior. I have just uploaded this new version, anyone interested can get it here. As usual, if anyone encounters any problems when using this, please let me know, since I haven't had the time to test it enough (i.e. a full playthrough of the game) to guarantee that it's bug free. New in this version: Non-jedi, non-partymember creatures who have performance enhancing drugs (stimulants) in their inventory will now have a chance to use these during combat to buff up. Creatures equipped with a lightsaber who knows any of the Force Jump feats, who are more than 10 meters from their target who they have a clear line to will actively use Force Jump instead of combat feats when initiating a melee attack. Creatures with a rocket launcher will now use projectiles without a blast radius (darts, buster rockets, concussion rockets...) even at pointblank range or if allies are near the selected target. Since they only damage the target anyway there's no point in holding back with those. Force Users will now use any Force or Saber Forms assigned to their template. If they have no force/saber forms assigned and are high enough level, they will be given one to use semi-randomly depending on their class and level. Link to comment Share on other sites More sharing options...
vanir Posted September 22, 2005 Share Posted September 22, 2005 Wow. You're awesome with these tailor made tweaks, stoffe. Wanna be my roomie? Last AI tweak ran like a dream, I'll let you know if this one gives any troubles promptly. Link to comment Share on other sites More sharing options...
Dyliak Posted September 23, 2005 Share Posted September 23, 2005 Even though it wasn't too long since I uploaded a new variant of this tweaked combat AI, I figured I may just as well integrate the most recent changed I did for the AI in the Combat Arena mod (which I use a somewhat modified variant of this AI in) in this generic AI tweak as well. While not much has changed it still makes some impact in enemy behavior. I have just uploaded this new version, anyone interested can get it here. As usual, if anyone encounters any problems when using this, please let me know, since I haven't had the time to test it enough (i.e. a full playthrough of the game) to guarantee that it's bug free. NEW IN THIS VERSION: * Non-jedi, non-partymember creatures who have performance enhancing drugs (stimulants) in their inventory will now have a chance to use these during combat to buff up. * Creatures equipped with a lightsaber who knows any of the Force Jump feats, who are more than 10 meters from their target who they have a clear line to will actively use Force Jump instead of combat feats when initiating a melee attack. * Creatures with a rocket launcher will now use projectiles without a blast radius (darts, buster rockets, concussion rockets...) even at pointblank range or if allies are near the selected target. Since they only damage the target anyway there's no point in holding back with those. * Force Users will now use any Force or Saber Forms assigned to their template. If they have no force/saber forms assigned and are high enough level, they will be given one to use semi-randomly depending on their class and level. I already tried this last version, and for what I saw the only problem is that sometimes the party jedi members that can use force jump, start ever before your pc also if they are "late" seeing the enemy. This get you blocked behind them, so that you have to walk around them for hit the enemy or, more strange, you see the damage you made to enemy, but being a your party member in front the enemy, your pc begin to be dragged to the enemy without be able to defend himself or do anything!! I don't know if I'm been able to explain myself, but if you need more info ask freely. Link to comment Share on other sites More sharing options...
stoffe Posted September 23, 2005 Share Posted September 23, 2005 I already tried this last version, and for what I saw the only problem is that sometimes the party jedi members that can use force jump, start ever before your pc also if they are "late" seeing the enemy. This get you blocked behind them, so that you have to walk around them for hit the enemy or, more strange, you see the damage you made to enemy, but being a your party member in front the enemy, your pc begin to be dragged to the enemy without be able to defend himself or do anything!! I don't know if I'm been able to explain myself, but if you need more info ask freely. This is "normal" behavior for Force Jump, that if the path gets blocked after a jump has been initiated the jumper will visually bump into the obstacle, interrupting the jump, but it will still hit the target for damage even if they are still far away. Since Force Jump AFAIK is not scripted I don't think there is anything that can be done about this. As for party members being quicker than your controlled character to jump, if it gets too annoying I could make the new code that substitutes picked combat feats with a Jump only work for non-party members. That way they'll only Force Jump if they choose to initiate a standard attack as usual. They would still jump, but not as often. Link to comment Share on other sites More sharing options...
Dyliak Posted September 23, 2005 Share Posted September 23, 2005 This is "normal" behavior for Force Jump, that if the path gets blocked after a jump has been initiated the jumper will visually bump into the obstacle, interrupting the jump, but it will still hit the target for damage even if they are still far away. Since Force Jump AFAIK is not scripted I don't think there is anything that can be done about this. As for party members being quicker than your controlled character to jump, if it gets too annoying I could make the new code that substitutes picked combat feats with a Jump only work for non-party members. That way they'll only Force Jump if they choose to initiate a standard attack as usual. They would still jump, but not as often. Yes I think that's better, else you risk to see too many times your pc dragged and defenseless. (yes, in these cases the enemy attack your party member and not you, but it's annoying) I don't know if could be possible to be ever the first that strike, I mean if you haven't hit (ora attacked at least once) the target, your party member doesn't begin to attack. I don't remember if I already asked, but it is possible that the party member attack different target than your? (I'm old and my memory often fail... -.-) Link to comment Share on other sites More sharing options...
stoffe Posted September 23, 2005 Share Posted September 23, 2005 I don't know if could be possible to be ever the first that strike, I mean if you haven't hit (ora attacked at least once) the target, your party member doesn't begin to attack. I don't remember if I already asked, but it is possible that the party member attack different target than your? (I'm old and my memory often fail... This is one of the things I haven't been able to figure out yet. Unless the script doing this is well concealed behind some illogical name, I strongly suspect that this is hardcoded. I'm talking about the fact that your party attacks your target if you aren't fighting anyone and initiates an attack. The microsecond you click on the Attack/combat feat button on the GUI all your partymembers will initiate an attack against this target. This attack does not use the standard k_ai_master AI script, and thus can not be interrupted that way. So, it's either hardcoded or uses a poorly named script that's compiled with the default version of the k_inc_generic include directly. At any rate it's quite annoying when you have your party members set to "stay close" AI. Sometimes you can fool it though by initiating an attack against the opponent you want them to fight, then quickly abort your own attack, wait for a few seconds (to give them time to get into combat) and then attack the target you wish to fight yourself. Link to comment Share on other sites More sharing options...
Q Posted May 29, 2006 Share Posted May 29, 2006 Stoffe: Please keep in mind that my questions are born of my almost complete ignorance of the subject matter. I'm trying to merge this mod with Beancounter's HCM (as I'm sure many already have). I'm using the text editor in KotOR Tool and I see that you have already entered the lines you mentioned in your previous posts (very thoughtful, thank you). 1. You mention "uncommenting" these lines (22&158). By "uncommenting" do you mean deleting the slashes (//) in front of and around the code (not your comments)? I'm guessing this because these slashes aren't present in the examples you gave in your posts. 2. The HCM has 4 levels of difficulty to choose from (4 different "k_ai_master.ncs" files, 1 for each difficulty level), so how would I choose the level of difficulty? Also: WHO'S "k_ai_master.ncs" do I place in the override folder-yours or one of the HCM's? 3. Your "source (for humans)" folder contains the file "compileall.bat". Do I just add the ".nss" files from the HCM "source" folder, along with the changed and recompiled "k_ai_master.nss" file, and "nwscript.nss" and run "compileall.bat", or do I still have to add "nwnnsscomp.exe" and use it? Obviously, I've never done anything like this before, and I haven't a clue as to how any of this stuff works. I hope these questions don't sound too stupid. Q Link to comment Share on other sites More sharing options...
stoffe Posted May 29, 2006 Share Posted May 29, 2006 1. You mention "uncommenting" these lines (22&158). By "uncommenting" do you mean deleting the slashes (//) in front of and around the code (not your comments)? I'm guessing this because these slashes aren't present in the examples you gave in your posts. Yes, remove the double-slashes in front of the script code below the comment text to uncomment the code. 2. The HCM has 4 levels of difficulty to choose from (4 different "k_ai_master.ncs" files, 1 for each difficulty level), so how would I choose the level of difficulty? I don't know how the difficulty selection is made since I don't use the hardcore mod myself (too difficult and unrealistic IMHO), but I would assume there is a separate NSS file for each configuration. If so, pick the one that matches your preferred difficulty level. Also: WHO'S "k_ai_master.ncs" do I place in the override folder-yours or one of the HCM's? The one that gets created when you recompile the modified k_ai_master.nss code after removing the comments before the two marked sections. NSS = Script Source Code, not used by the game but by human developers. NCS = Script Byte Code, used by the game. Compilation turns an NSS file into an NCS file that the game can use. 3. Your "source (for humans)" folder contains the file "compileall.bat". Do I just add the ".nss" files from the HCM "source" folder, along with the changed and recompiled "k_ai_master.nss" file, and "nwscript.nss" and run "compileall.bat", or do I still have to add "nwnnsscomp.exe" and use it? You are using the "some assembly required" version that got was uploaded some time last year, and not the one with the automatic installer adapted for use with the High Level Force powers mod, correct? If so, put all the relevant NSS source code files (except k_ai_master.nss) from the Hardcore mod into the same folder as the NSS files that came with the AI tweak. Then modify the k_ai_master.nss (that came with the AI tweak) to uncomment the lines activating the hardcore mod. Then, using NWNNSSCOMP, recompile all the scripts listed in the compileall.bat file. You'll likely have to do it by hand, since the bat file shouldn't work unless you've placed the files in the same folder structure as me, and use the same version of NWNNSSCOMP as I did. Then take the NCS files that are produced by the compilation and put them in the override folder. If you use the version adapted for HighLevelForcePowers with the Installer, the procedure is similar. Dump all the NSS files from the hardcore mod into the tslpatchdata folder of the "Modified AI" installer. Do not let it replace any existing files if it asks. Then find the k_ai_master.nss script inside the tslpatchdata folder and uncomment the relevant lines like before. After that it should be enough to run the installer, as it should recompile the scripts on its own and put the resulting files in the override folder. (Provided you use the install option that says it's for the "High Level Force Powers" mod. The other install option won't recompile the scripts.) Link to comment Share on other sites More sharing options...
Q Posted May 29, 2006 Share Posted May 29, 2006 Thanks for the quick response, Stoffe. You're right: There's an .nss file for each difficulty setting (don't know why I didn't see that before-duh!), so that answers that question! I figured there would be a version of this AI hack that uses your installer; I just followed the link on this thread. Where might I find the updated version? I greatly appreciate all your help and patience! Q Link to comment Share on other sites More sharing options...
stoffe Posted May 29, 2006 Share Posted May 29, 2006 I figured there would be a version of this AI hack that uses your installer; I just followed the link on this thread. Where might I find the updated version? I posted about it in the High Level Force powers thread, since I couldn't find this thread and it was related to that topic. (Didn't notice this thread had been moved from Holowan for some reason... ) Anyway, you can find the relevant post here. Remember that you'll need to have the High Level Force Powers Mod installed first for that installer to work (since the other install option uses pre-compiled scripts). Link to comment Share on other sites More sharing options...
Q Posted May 29, 2006 Share Posted May 29, 2006 Hey, Stoffe: Thanks to your instruction, I got this to work (one small step for man)! I'll DL the updated version and use it, but I don't regret the time spent on the older version because of what I learned about recompiling. It also makes a BIG difference in the game. I tried it out in the Dxun Tomb and the plain old Sith soldiers (usually very easy) became vicious, using special feats with both ranged and melee weapons and chucking lots of grenades at my party. It also vastly improves the behavior of my party members, so great job all around. Ever consider tinkering with KotOR1? Just a thought. Thanks again! Q Link to comment Share on other sites More sharing options...
Q Posted May 31, 2006 Share Posted May 31, 2006 Stoffe: I just DL'ed the new version and am ready to install. Will I have to edit the "st_inc_powers.nss" and the "spells.2da" files like I did in the older version to get NPC's to use your HLFP's? Q Link to comment Share on other sites More sharing options...
angelstandings Posted May 31, 2006 Share Posted May 31, 2006 This is an awsome idea, as the game's virgin AI needs a lot of work. I'm using this code now, and so far I've noticed a big improvement in how droids make use of their special attacks and grenade usage (I just started TSL). I'm not using the hardcore mod with this, as I believe that the game *could* be made challenging in other ways -- one of them is by increasing the AI's intelligence. I played through KOTOR I with the hardcore mod, and it just became too tedious on the Starforge area, so I remved it and ended up having a blast. Keep up the good work. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.