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

Error message

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in remember_me_form_alter() (line 78 of /var/www/siegetheday.org/sites/all/modules/contrib/remember_me/remember_me.module).

BW Auto Engage Mod (Beta)

version: 
v0.9

Auto Engage mod beta v0.9 for Broken World
main download link
alternate download link @ mediafire

This mod causes your character to behave more aggressively by automatically attacking enemies that come within range just like in DS1. This mod also improves the autocast spell AI algorithm. Spells in the autocast slots *may* sometimes take higher casting priority than the currently selected active spell. It also causes your character to auto drink (can be turned off) a health or mana potion (if there is one in the respective character's inventory) when low on health/mana. It also prevents dialogue from being skipped whenever you or your party is attacked.

Also includes a new AI behaviour routine. This behaviour improves the survivability of combat magic summons (by up to 50%) by making them run away from enemies who get too close.

--------------------------------------------------------

This mod is in Beta stage meaning there are bugs in it. This mod is for the Broken World expansion. It will invalidate your savefile, therefore you must use elys' allsaves fix for Broken World. also, do NOT use my DS2 Auto Engage mod with this mod. it will cause a mod conflict.

--------------------------------------------------------

*UPDATED* to v0.9

Fixes in v0.9:-

1. fixed the gpg auto-healing AI behaviour so that PCs only start healing summons which are badly injured i.e. less than 5% of total hp remaining. I did this cuz i never bothered to heal summons since they are mainly used for distraction and it costs less mana to summon a new one than to fully heal your existing summon.

2. fixed the job permissions of all the pets to have the same code as the heroes so that they can enjoy the benefits of the improved auto engage as well.

3. increased PC ranged engage range radius from 13 to 14

4. increased PC looting radius from 7 to 12.

5. separated the mod into 2 parts again. one with auto drinking and the other without.

--------------------------------------------------------

*UPDATED* to v0.8

Fixes in v0.8:-

1. updated the mod for use in the DS2 expansion, Broken World.

2. cleaned up some possibly redundant and useless code in brain_hero.skrit that was taking up extra memory and cpu power.

--------------------------------------------------------

*UPDATED* to v0.7

Fixes in v0.7:-

1. heavily beefed up the auto engage algorithm. Auto engage should now work 99% of the time except when you use a summoned creature. BEWARE!!! Using summons has been found to break the auto engage algorithm due to a gpg template read error caused by using summons. In this version (v0.7), there is a 10-20% chance that using summons will break the auto engage. This bug occurs at random so your mileage may vary. Previous versions had an even higher chance of a broken auto engage algorithm when u use summoned creatures. I tried to reduce the likelihood of summons breaking the auto engage as best as i could... Sad

2. fixed a debugOutput$ error that was causing ds2mod.exe to refuse to compile the auto engage skrits thereby making the mod useless.

3. fixed an annoying skrit runtime error with CALLFUBI Go::GetGoid that kept popping up in the mod version which was also potentially breaking the auto engage algorithm. Thanks to Frilly Wumpus for his FUBI chm help file which enabled me to track the issue down.

4. fixed the State (Unconscious) in the hero brain skrit to have the exact same code as the unmodified version.

5. added a State (Conversation) to the hero brain skrit just like the unmodified version.

6. increased the hero character sensor scan period from 0.1 to 0.5 to reduce cpu load and speed up the frame rate. There *may* be a short pause before your char resumes auto engaging after killing her current target or when an enemy suddenly comes into view from behind a wall, rock, hill etc.

7. forced the combat magic summons in the fleeing summons mod to be on alignment aa_good.

--------------------------------------------------------

*UPDATED* to v0.6

Fixes in v0.6:-

1. further toughened the auto engaging algorithm to defeat bug#2.

2. separated the mod into 2 types. One with auto engage AND drinking and another with just auto engaging (no automatic potion drinking).

3. included a separate mod (filename is "CM Summon AI Flee.ds2mod") based on the new AI scripting routines of the auto engage mod. This mod improves the survivability of combat magic summons (by up to 50%) by making them run away from enemies who get too close. NOTE: This mod must be used together with my auto engage or auto engage drink mod to work!!!

4. improved the default DS2 autocasting algorithm. Now, your char will attempt to autocast both spells in the autocast slots BEFORE going in to shoot at the enemy. Best used if u put buffs and summons in the autocast slot. If u have a heal spell in the autocast slot, the currently selected char will auto cast healing spells more "aggresively". However, be careful of what u put in the autocast slot as it may cause your char to get jammed up trying to autocast. This will happen with healing spells if the party is taking too much damage and the healers get jammed up trying to heal everyone and refuse to accept other orders like running away etc. You have to experiment what is best for your particular playstyle. However, many pro gamers advise against putting curses in the autocast slot (even in un-modded DS2).

5. fixed the NPC dialogue behaviour so that it is no longer skipped whenever you or your party is attacked by a monster. However, you are advised to quickly finish up the dialogue if u are attacked as GPG might have made the dialogue abort for a reason. One, of which, it *may* cause bugs and/or unexplained behaviour. make backup saves more often and keep more backup saves!

6. added an option to turn off the auto engage algorithm and revert back to the default DS2 character behaviour while still in-game. Now, turning off selected hero attack automation will also deactivate the auto engage algorithm. NOTE: only the currently selected char will stop auto engaging. non-selected party members will still auto engage enemies as per the default DS2 char behaviour.

--------------------------------------------------------

*UPDATED* to v0.5 bug#3 should be fixed. Many Thanks to Iryan for squashing this bug!!!

Other fixes in v0.5:-

1. chars will no longer autocast EVERY spell in the spellbook. only the selected active spell and spells in the autocast slot.

2. more robust auto-attacking algorithm.

3. preserved the rampage and mirror mode party orders. previous versions caused the 2 party orders to become useless. Thanks to Iryan for his help on this. However, do take note that this mod makes your chars more aggresive so they will auto-attack if they spot an enemy even on Wait/Mirror Mode and are not already occupied instead of standing around like dummies.

--------------------------------------------------------

Known Issues(Bugs):

1. Sometimes your character wont auto-drink a potion. you have to manually hit the drink key or button to make them drink. This is due to that character not having the required potion in her inventory to drink. yes, potions are shared between party members in DS2 but this is only true for the manual drink function. In order for auto-drink to work, that party member MUST have the required potion (health, mana or rejuv) in her inventory. This also occurs when your char is using up health/mana faster than the potion can replenish. Otherwise, auto drink should work 99% of the time.

2. sometimes your character wont auto-attack enemies that come within range. you have to manually right-click on the enemy to attack. This occurs mainly on enemies with teleporting abilities, e.g. Hak'u Shamans, SpearMasters, Hunters; Snow Va'arth Glacial Avalanchers (what a mouthful for a monster name!); Uhn Miners etc. and on enemies your char doesnt have a clear line of sight to, e.g. enemies hiding behind walls, pillars, hills, top/bottom of slopes and staircases etc.
This also occurs at the beginning of the DS2 World Tutorial with the bracken defenders and the shell. After tinkering with the Siege Editor, i found this was due to gpg disabling the hero's and drevin's mind so that the player can learn how to attack real enemies manually instead of combat dummies. Because of this, the party cannot auto engage the brackens so u must click on them to attack them manually. Also, i found that using summoned creatures sumhow breaks the auto engage algorithm. In v0.7 or later, this should occur only about 10-20% of the time. This bug appears to occur randomly so your mileage may vary.

3. This bug should already be fixed in v0.5 or later of the auto engage mod.
WARNING: *most annoying bug* each time your character is hit by a melee or ranged attack while casting a spell your character will stop casting (without firing the spell) then start to cast again. This can be dangerous if u are continuously being hit as your character will keep stopping casting then resuming. In the end, the spell doesnt "fire" at your attackers and it "locks" your character up, meaning it wont accept any orders from you. So if you are playing a spellcaster, BEWARE of those archers/throwing weapon monsters. Thus, avoid rushing too many monsters at 1 time.
Melee monsters wont give u problems if u keep running away from them when they get too close. Personally, when i play spellcasters i usually keep running away from monsters that get too close to me.
If you are doing the Aman'lu arena, REMOVE the mod before doing the arena as i got killed several times cuz of this bug Sad grrrr....

4. sometimes your char will keep changing targets when you are hit. this might mess up mirror mode. if this bothers u, i found that turning off selected hero defend automation takes care of this bug for the most part. in fact, it is better to turn selected hero defend automation off as you dont really need it for the most part now that the selected char can auto-attack more aggresively.

5. sometimes the auto engage just stops working after a nis, movie or conversation. to fix this issue, i've found that going back to town via a town portal and talking to a shop npc or any npc and then properly exiting the convo thru the dialogue options seems to cause the auto engage to reset itself and it works again.

--------------------------------------------------------

Installation:-

1. If u want auto potion drinking, extract the BW Auto Engage Drink v0_9.ds2res file to your Broken World Resources folder OR If u want just auto engaging (without auto potion drinking), extract the BW Auto Engage No Drink v0_9.ds2res file to your Broken World Resources folder.

2. WARNING!!! make sure u do NOT have both auto engage files in the resources folder or it will cause a mod conflict!!!

3. Run DungeonSiege2.exe or DS2BWAllSaves.exe to play.

--------------------------------------------------------

Uninstallation: delete or move the BW Auto Engage files out of your resources folder.

--------------------------------------------------------

mod categories: 

Comments

You apparently submitted this mod recently, but i already have the 0.9 version.
Any chance for a version 1.0 any time soon?

well, their is nothing much to improve or update in the mod unless u have summore char automation constructive suggestions. the auto engage is functioning *almost* just like in ds1 and loa.

the only thing to fix/update/improve on further in v1.0 is the damned summoned creature bug breaking the auto engage.

i have tried fixing this accursed bug but it is still present in unmodded ds. therefore, this bug is possibly a flaw with the game code... ppl have reported to me, their chars sometimes just stand around not attacking even when being hit by monsters in unmodded ds. this is especially apparent if u use 6 mages and all of them using summons.

i noticed that part of the bug arises when there are dead bodies near the char. the ae breaks sumtimes cuz its trying to target dead bodies and having summons somehow creates this "ae targeting the dead body and confused by the summon" bug.

if i move the char away from the dead body and the hostile monster is closer to the char than the dead body, the ae works again.

unless a way is found to fix this summon creature + dead body bug, there isnt going to be any update.

I've used this mod a lot since the current version was released and for the most part it's quite stable apart from the mentioned bug. I tend not to use summons so I don't have problems with it.

However on occasion the auto engage algorithm can break for the selected hero after a NIS sequence or movie. All the other characters attack properly but you have to use right click for the selected hero. Easily fixed by reloading the game and everything goes back to normal.

But as Lady Femme suggests this is probably as a result of the buggy underlying code in DS2. GPG carefully stripped out most of the good code (even worse for monsters with random spell casting from a selection of spells, switching to melee from ranged when appropriate, able to randomly select from a pool of different armor/weapons, etc) from the game and left the buggy stuff.

If it wasn't for this mod I wouldn't still be playing DS2 after all of this time. I can't see the attraction in continually clicking on monsters to attack them.

yes i have noticed that the ae sometimes doesnt work after a nis sequence, movie or conversation with an npc.

i believe this bug is likely caused by the game not properly resetting the brain state back to thinking$ after a convo/movie/nis. so the brain stays stuck in the state InConversation$ mode where auto engaging is expressly disallowed as it can break stuff if the char is allowed to continue fighting while the nis, movie or conversation is still running.

for me, i've found that taking a town portal back to town and talking to a shop npc or any npc and then properly exiting the convo thru dialogue options seems to work for the most part in resetting the brain state back to thinking$ so the ae ProcessSensors$ code can function again. this is a better alternative to resetting the brain rather than exiting and reloading as u *might* lose ur progress if the ae breaks halfway while travelling to the next checkpoint aka teleporter.

i also updated the main post above to reflect this reported issue. thanks to iryan again for reporting this. i thought im the only one who got this nis/movie/convo issue... keke~ :mrgreen:

I think you're absolutely right there about the brain state not resetting after a convo/movie or nis. GPG state in Siege University 2 that whenever you capture an actor it should be released at the end of the flick (there's commands for both of these).

However they often break their own rules on this and while the capture command is always present (otherwise the flick wouldn't work) the release command isn't always present.

There's far too many flicks to update them all (and risk breaking them) but if during testing I encounter this bug I'll attempt to track down the offending flick and try to adjust it and see what happens.

Did some more testing with one known place where the auto engage algorithm will always fail (at least for me)- The first time you leave Eirulan in Mercenary Mode after having witnessed the Jail NIS.

As you know as soon you leave the elevator Jera the Dryad Escort will greet you and begin moving towards the outpost where Kirani and two other Dryads are being held hostage by 3 Morden. Jera will be killed, you'll kill the Morden and then must release Kirani and the Dryads from the Prison to continue the game.

While not absolutely, positively certain I believe in this occasion it's Jera's talk flick which is causing the auto engage algorithm to fail. For those interested it's Act1_escort_to_outpost.flick found in global\flick\sequences\ds2_world\act1_jnglight.

The talk flick captures Jera but never releases her and interestingly it explicitly states in the flick itself that this is deliberate and intentional in this case as it's quite possible for the player to decide to do something else instead of following Jera so she needs to be kept primed and ready to move, and Jera's character is deleted anyhow when the fight with the Morden begins.

I don't know how the above flick could be modified without breaking it and possibly having a situation where Jera both survives and yet is killed by the Morden (once you step over the trigger starting the fight with the Morden).

It's also possible that modifying job_listen.skrit so to flush the hero's ai brain better in such situations may solve the bug but it's more likely it's something we have to live with and just save/reload the game when convenient so to reset the auto engage algorithm again.

cant seem to reproduce the bug on my side. the ae still works fine after jera dies in the cutscene regardless if i follow her or not and regardless if i skip the nis or not. the ae also works fine if i dont follow jera and go off and kill some haku in the caves instead.

did u reproduce the bug by starting a new char from the jail? if so, then its likely that its the celia-amren jail nis that glitches out the ae not the jera scene. and since u said the flick captures jera, then it shud only be jera that has her ai brain bugged, not the PC's brain.

since this appears to be an intermittent bug and the same nis will not always glitch out, then fixing the flicks might not necessarily fix this bug and it will probably break things instead and introduce more bugs.

therefore, the only flexible solution is to take note of your idea to reset the brain state at regular intervals. i was thinking of where to code a check to query the game's world event global data at every brain sensor scan period to see if a nis, convo or movie is running. if not, it will reset the PC's brain state back to thinking$. this is a much better solution as it prempts any buggy flick coding by ppl who did not read the SU2 article.

It's probably a specific bug confined to DS2 Adepts for the Eirulan occurence. It appears whether you use the bypass portal and start in Eirulan or fight through the tutorial. Even though there's no conflicting files in DS2 Adepts and the auto engage mod (obviously as it's a part of DS2 Adepts) there's something in one or more of the other files that exacerbates the bug.

I'll keep track of when this occurs as there may be a clue to what causing it and thus a hint to a general fix but the resetting of the brain may solve it regardless and be a more robust solution if it can be coded correctly. Another messier alternative is if there was a command that could be triggered as the party left town that automatically reset the brain state, that was linked to a change_mood trigger or something similar.

Hi Iryan.
Unless it is something that has just occurred with the latest version of Adepts and a new player I have not seen this bug. The auto engage seems to function on leaving the outpost.

Elf

It only occurs after certain NIS sequences seen for the first time. I probably notice it in Eirulan the most since I've started something like 12 new games in the past couple of weeks testing various things (most of these games never progress pass recruiting Taar and getting access to the other towns).

It does also occur at several other places as well but I never kept notes on exactly where.

It is possible it has only manifested in Eirulan since implementing the alternative tutorial. I have only just restored the quest progression for that tutorial and have still yet to restore it for the bypass portal so that may fix the issue. Weirder things have happened.

i think the best place to test out nis bug fixes is at the beginning of the tut with the bracken and the shell which iryan reported to me ages ago at siegemods. this is where the ae simply doesnt work at all and is consistently reproducible.

however, im just grasping in the dark as i havent looked at the tut nis with the bracken and the shell. im just blindly guessing the ae doesnt work at that part cuz the nis captures the PC and drevin and doesnt release them until the shell is destroyed. on one very rare occasion, i got the ae to work but i was thereafter unable to reproduce how i got the ae working at the bracken shell encounter. im guessing it was a once-only flaw in the game code that allowed the ae to work when it wasnt supposed to... kekekeke~ :mrgreen:

therefore, to improve the ae mod, it wud be a good idea to first figure out exactly why the ae doesnt work at the beginning of the tut with the bracken and the shell. my previous report of a template or faction error with the bracken may be flawed... once the reason is properly found, validated and scientifically proven, it might open the floodgates to a bunch of fixes (hopefully?) for the ae mod... Insane

The bracken shell NIS is a complicated setup for such a short battle, being comprised of 2 flicks. There's a0_tutarena_forced_combat.flick and a0_tutarena_forced_combat_nis.flick.

Indeed in a0_tutarena_forced_combat_nis.flick the CatalystPrimaryHero is captured and never released. However this doesn't explain how drevin is also effected and how everything goes back to normal after this battle. I did put in a release line without either breaking the flick or having any noticeable effect.

What did have an effect was commenting out the change_disable_mind = true; lines in command.gas in tutarena region's object folder for the bracken in that battle. Now the characters did randomly attack bracken on occasions, especially if attacked.

This was similarly to other battles in the tutorial where other npcs were involved (there's more of these in the alternative tutorial than the regular tutorial). The characters would randomly attack sometimes and other times just watch.

So I think it's a result of different ai minds at work. I'll try giving the mercenaries and heroes the same membership and see if that makes any difference.

Incidentally in one of my previous tests with DS2 Adepts the broken auto engage algorithm occurs even if I leave turning on the DS1 automation until after I leave town and all NIS sequences have played.

IceLancer's picture

I noticed that this two mods clash.So i did something about it.
I merged scripts ,so they don't clash.

This one also consists of some other work as well,including huge 1920x1080 inventory.(still working on inventory tho)
Can't post all changes atm,once i am totally finished i will dump svn log for changes.

https://mega.co.nz/#!d0BWXabD!Ty_SJDF4am8uWvMq6hiEd83JHhTfcD683IuS5YA_8qU
Important is that you do not use Ely's Sucubuss modlet and or Original Aranna Legacy mod.
This is for DSBW2 only.

I'm not seeing a link for the mod. Is it still available for download?

The mod is still on the site, however I can not get the download link to work correctly. Once we have finished updating the site to the new software the link should be active again. I will talk to the web master and see if he can get the file then I will post the link for you
Elf

IceLancer wrote:

I noticed that this two mods clash.So i did something about it.

I merged scripts ,so they don't clash.

This one also consists of some other work as well,including huge 1920x1080 inventory.(still working on inventory tho)
Can't post all changes atm,once i am totally finished i will dump svn log for changes.

https://mega.co.nz/#!d0BWXabD!Ty_SJDF4am8uWvMq6hiEd83JHhTfcD683IuS5YA_8qU
Important is that you do not use Ely's Sucubuss modlet and or Original Aranna Legacy mod.
This is for DSBW2 only.

Please can you share with your merged version? The link is down. These two mods are the best and I can't play with hotfix / aranna legacy because auto engage and drink doesn't work with it

Quote:

Please can you share with your merged version? The link is down. These two mods are the best and I can't play with hotfix / aranna legacy because auto engage and drink doesn't work with it

Hi demoix . The link probably doesn't exist anymore. The post you are referring to is almost seven years old. Maybe somebody might have a copy of the mod, but don't count on it. Sorry about that.

The attachment BW Auto Engage No Drink v0_9 is for DSBW2 only, I've no idea if it works or not because I never tested it.

Moros wrote:

The attachment BW Auto Engage No Drink v0_9 is for DSBW2 only, I've no idea if it works or not because I never tested it.


It works but only for broken world. I have used it from time to time.

I hope that you are able to download the mod and that it will work for you. I thought some folks might have the mod but I didn't want to give false hope. Thanks Moros for uploading the file.