There's DisableAI() action in EE v2.0+.
GeN1e's Content
There have been 127 items by GeN1e (Search limited from 18-May 23)
#596742 Any way to find out if an area has been cleared?
Posted by GeN1e on 23 August 2017 - 12:52 PM in IE Help
SoD does exactly that, activating random spawn points after player clears all manually placed encounters.
IF Global("BD_SPWN_ACTIVE","MYAREA",1) !AreaCheckAllegiance(ENEMY) THEN RESPONSE #100 SetGlobal("BD_SPWN_ACTIVE","MYAREA",2) SetGlobalTimer("BD_TIMER_SPWN","MYAREA",ONE_DAY) END IF Global("BD_SPWN_ACTIVE","MYAREA",2) GlobalTimerExpired("BD_TIMER_SPWN","MYAREA") THEN RESPONSE #100 SetGlobal("BD_SPWN_ACTIVE","MYAREA",3) SpawnPtActivate("Spiders01") SpawnPtActivate("Wolves01") SpawnPtActivate("Hobgoblins01") SpawnPtActivate("Trolls01") SpawnPtActivate("Boars01") SpawnPtActivate("Spiders02") SpawnPtActivate("Hobgoblins02") SpawnPtActivate("Boars02") SpawnPtActivate("Trolls02") END
#596751 Any way to find out if an area has been cleared?
Posted by GeN1e on 23 August 2017 - 05:46 PM in IE Help
Depends on what you want, I guess? If you want to fully respawn an area and teleport everyone towards the party, then yeah, you have to force the spawn points do their work somehow first. Assuming GOODCUTOFF works, and I don't know whether it does, you can also spawn them directly over the points, though you'll need to automate it with WeiDU or collect the coordinates manually. If it doesn't, hm... nothing comes to mind off the top of my head, other than reading up the spawn groups' composition at install time and generating scripts on the fly, but you'll need about three points in WeiDU proficiency to automate that.
If you don't need a teleport, then just reactivate the points and let party walk into monsters on the backtrack.
#599106 Are door animations extractable from TIS files?
Posted by GeN1e on 26 December 2017 - 09:20 PM in IE Help
Door graphics are part of the tileset. Theoretically you could decompress tileset, read the desired tiles and then construct a BAM from the data, but practically this is slightly above the average WeiDU sorcery you can find around the forums, so I doubt there's anyone who'd even think about trying it.
#600777 How to send a creature to the nearest enemy?
Posted by GeN1e on 03 March 2018 - 08:00 PM in IE Help
As for actions, JumpToObject and MoveToObject only take script names or other definite objects.
I do believe it's your local environment playing tricks again. MoveToObject(LastBlah()) is an AI cornerstone, and I bet JumpToObject behaves no differently.
NearestXXX() does have a small problem of ignoring non-visible objects, however, maybe that's the case?
#601548 Range and creatures with reduced personal space
Posted by GeN1e on 06 April 2018 - 12:01 PM in IE Help
You can also use range checks to the nearest viable target. I've seen some mild delays in script processing when using it for melee/ranged weapon switching, but nothing crucial.
Strange that MoveToObject() doesn't work, though. MoveToSavedLocation()/MoveToPoint() should work, but I guess you can't really use that when both actors move freely.
#595475 Different kinds of damage
Posted by GeN1e on 18 June 2017 - 04:00 PM in IE Help
177 undead with reverse effect (heal for Cause Wounds, damage for Cure), and follow that with another 177 to 206 the remainder of spell's effects.
Of course, I provide zero guarantee it won't create bizarre AI behavior somewhere. Pretty sure Bodhi has been using Heal in some cutscene (or maybe not).
#600631 When is the party stripped during the BG saga?
Posted by GeN1e on 26 February 2018 - 09:27 AM in IE Help
You also get stripped of equipment in SoD epilogue, when they put you into jail, but you can get it back as soon as you're out of cage. This is basically just one scene.
The SCS mod also has an optional mod component that produces a party strip during the Spellhold story arc
I came to honestly believe it was vanilla
#601786 changing item abilities
Posted by GeN1e on 17 April 2018 - 07:53 AM in IE Help
If an item has multiple abilities, you just select one from the backpack/equipment menu button.
The quickslot toggle is just a UI feature designed to save you time selecting between fireball or scorcher whenever you use the wand.
And, if possible, condition the ability to toggle it on some characteristic of the character.
I very much doubt it, even if you tried modding the UI.
#601727 Silencing attack feedback
Posted by GeN1e on 15 April 2018 - 12:27 AM in IE Help
This action only dispenses with the battlecry.
It does suppress attack rolls display completely, we used it for archers training in the background in SoD.
There is still the saving throw info.
Try moving the save effect inside of a child EFF/SPL (i.e. 177 or 146). It should delay the save roll until the projectile hits the target.
But actually, I managed to use this problem and make it into a feature.
Well, if it works out for you, then I suppose it's fine
#599104 Door script extension?
Posted by GeN1e on 26 December 2017 - 09:08 PM in IE Help
But how can I target doors with Weidu, given that they have different names (though all start with "Door", I believe) and may appear in any order among info triggers and containers?
I'm not sure how can they be mixed up with triggers/containers, since they're all different structures.
MKDIR ~my_mod/door_scripts~ // or just make your own folder <<<<<<<<door_extention.baf IF Range(Player1,15) THEN RESPONSE #100 DisplayStringHead(Myself,~Player1 detected.~) END >>>>>>>> OUTER_SET door_count = 0 COPY_EXISTING ar1000.are override GET_OFFSET_ARRAY doors 0xa8 4 0xa4 4 0 0 0xc8 PHP_EACH doors AS i => r BEGIN READ_ASCII r+0x80 door_script (8) NULL PATCH_IF FILE_EXISTS_IN_GAME ~%door_script%.bcs~ BEGIN INNER_ACTION BEGIN EXTEND_TOP ~%door_script%.bcs~ ~door_extention.baf~ END END ELSE BEGIN door_count += 1 INNER_ACTION BEGIN COPY ~door_extention.baf~ ~my_mod/door_scripts/ag#%door_count%.baf~ // use your own prefix instead of ag# END WRITE_ASCIIE r+0x80 ~ag#%door_count%~ END END BUT_ONLY COMPILE ~my_mod/door_scripts~
MKDIR is not really needed, since you can make a folder yourself, but without it this example wouldn't compile standalone.
Doors do take useful scripts and can See()
They can, but they can't. Doors have unhealthy tendency to block their own line of sight, so See(), Detect() and Range([PC],30) will all fail about half the time. Only Range() targeting non-dynamic object - i.e. Player1 or LastSummonerOf(), but not [PC] - will work on both sides.
PS I f-ing hate this stupid forum shitware
#599112 Door script extension?
Posted by GeN1e on 27 December 2017 - 12:08 PM in IE Help
though it would be even better if only those whose names start with "Door" would be affected.
Not very reliable because you'll miss things here and there, but I think this will work
READ_ASCII r door_name (32) NULL PATCH_IF !(~%door_name%~ STRING_CONTAINS_REGEXP ~[Dd][Oo][Oo][Rr]~) BEGIN // PATCH_IF FILE_EXISTS_IN_GAME ... END
Is this check really necessary - whether they have a script? Why not just extend the top of the script without a check? I've done this for area scripts, if there is no script, the baf becomes the script.
If EXTEND works with non-existing files, then I was unaware of it.
Also I haven't had any problems with doors' vision so far.
I guess you've been lucky then... I've had several bugs in SoD due to door's body blocking its own vision.
- Spellhold Studios
- → GeN1e's Content
- Guidelines