Improved NPC Targeting
Moderator: Moderator
-
- Uruivellas
- Posts: 744
- Joined: Thu Nov 18, 2010 6:42 pm
Improved NPC Targeting
This addon is a buff for NPC's.
It improves the way NPC's locate and keep track of the player when they can't see or otherwise detect him/her.
Tracking is less random, has a limited amount of error, and is more consistent from turn to turn.
The tooltip for NPC's has been updated to give stealthed/invisible players a hint about which enemies have successfully detected them.
This addon is compatible with ToME 1.0.5, commit a801604d1610f49560862d15dfaecd03fda8ab40
It includes changes to:
engine.interface.ActorAI.lua
mod.class.NPC.lua
It can be downloaded at:
http://te4.org/games/addons/tome/npc-ta ... provements
In debug mode the tooltip will show where NPC's think a stealthed/invisible player is if they've lost track.
It improves the way NPC's locate and keep track of the player when they can't see or otherwise detect him/her.
Tracking is less random, has a limited amount of error, and is more consistent from turn to turn.
The tooltip for NPC's has been updated to give stealthed/invisible players a hint about which enemies have successfully detected them.
This addon is compatible with ToME 1.0.5, commit a801604d1610f49560862d15dfaecd03fda8ab40
It includes changes to:
engine.interface.ActorAI.lua
mod.class.NPC.lua
It can be downloaded at:
http://te4.org/games/addons/tome/npc-ta ... provements
In debug mode the tooltip will show where NPC's think a stealthed/invisible player is if they've lost track.
Last edited by Hachem_Muche on Sun Sep 15, 2013 5:56 pm, edited 1 time in total.
-
- Thalore
- Posts: 151
- Joined: Mon Oct 24, 2011 8:05 pm
Re: Improved NPC Targeting
I don't think npcs need to be buffed in this way. they already pretty much autodetect you unless you have crazy high lvls of the skill(stealth) and if buffed, invis will be even more useless then it already is.
Re: Improved NPC Targeting
That would depend on whether the current targeting method uses any cheating.
If so, this change would make it much fairer.
If so, this change would make it much fairer.
My feedback meter decays into coding. Give me feedback and I make mods.
-
- Uruivellas
- Posts: 744
- Joined: Thu Nov 18, 2010 6:42 pm
Re: Improved NPC Targeting
This addon doesn't change the chance for NPC's to detect you, it makes them guess better where you are when they lose track of you. In addition, it gives the player a hint which way the NPC's are looking on the tooltip.
NPC's already cheat a little bit (The game knows where you are exactly, but gives the NPC's a pretty large fuzz radius depending on how long it's been since they last saw you). This addon keeps them from being helpless just around a corner because their guesses are too random.
NPC's already cheat a little bit (The game knows where you are exactly, but gives the NPC's a pretty large fuzz radius depending on how long it's been since they last saw you). This addon keeps them from being helpless just around a corner because their guesses are too random.
Re: Improved NPC Targeting
I'm getting endless lua errors, even when all other addons are removed:
Code: Select all
error = "Lua Error: .../addons/NPCTarget/superload/engine/interface/ActorAI.lua:39: attempt to call method 'clearAITarget' (a nil value)\
At [C]:-1 clearAITarget\
At .../addons/NPCTarget/superload/engine/interface/ActorAI.lua:39 doAI\
At /mod/class/NPC.lua:61 act\
At /engine/GameEnergyBased.lua:126 tickLevel\
At /engine/GameEnergyBased.lua:62 tick\
At /engine/GameTurnBased.lua:46 tick\
At /mod/class/Game.lua:1054 "
seen = true
reported = true
MADNESS rocks
-
- Sher'Tul Godslayer
- Posts: 2000
- Joined: Fri May 07, 2004 8:26 pm
- Location: Nahgharash
Re: Improved NPC Targeting
Is this inability to find and path to you related to enemies being stuck in walls and not pathing their way out, or is that a completely unrelated problem? And would enabling this addon solve the problem of things like sandworm queen/Telos/Aletta/etc getting stuck in walls?
And in the hope that the answer is yes, If I edit this addon into a savefile, will it apply the new pathing algorithms to creatures already in existence? Or only creatures generated afterwards?
And in the hope that the answer is yes, If I edit this addon into a savefile, will it apply the new pathing algorithms to creatures already in existence? Or only creatures generated afterwards?
Currently playing under the name Aura of the Dawn 4 down, 227 to go!
Proud author of Orc Pit Restoration Project, Faction Allies, Dwarven Adventurer addons
Proud author of Orc Pit Restoration Project, Faction Allies, Dwarven Adventurer addons
SadistSquirrel wrote:DarkGod has two arms, one with an opened hand, one with a closed fist. You got the fist.
-
- Uruivellas
- Posts: 744
- Joined: Thu Nov 18, 2010 6:42 pm
Re: Improved NPC Targeting
I've uploaded an revised version at http://te4.org/games/addons/tome/npc-ta ... ovements-0jenx wrote:I'm getting endless lua errors, even when all other addons are removed:
Code: Select all
error = "Lua Error: .../addons/NPCTarget/superload/engine/interface/ActorAI.lua:39: attempt to call method 'clearAITarget' (a nil value)\ At [C]:-1 clearAITarget\ At .../addons/NPCTarget/superload/engine/interface/ActorAI.lua:39 doAI\ At /mod/class/NPC.lua:61 act\ At /engine/GameEnergyBased.lua:126 tickLevel\ At /engine/GameEnergyBased.lua:62 tick\ At /engine/GameTurnBased.lua:46 tick\ At /mod/class/Game.lua:1054 " seen = true reported = true
No idea how I missed that obvious error before.
-
- Uruivellas
- Posts: 744
- Joined: Thu Nov 18, 2010 6:42 pm
Re: Improved NPC Targeting
Adding this addon into the desc.lua file in the save folder will enable the new detection algorithms as soon as you reload the character.Crim, The Red Thunder wrote:Is this inability to find and path to you related to enemies being stuck in walls and not pathing their way out, or is that a completely unrelated problem? And would enabling this addon solve the problem of things like sandworm queen/Telos/Aletta/etc getting stuck in walls?
And in the hope that the answer is yes, If I edit this addon into a savefile, will it apply the new pathing algorithms to creatures already in existence? Or only creatures generated afterwards?
I'm not sure what the problem is with certain NPCs (like the Sandworm Queen) in walls not finding the player, but this addon should help them find you once they get you targeted. So it's worth a try and it won't hurt anything. I suspect that the problem is an issue with level generation and NPC placement.
Re: Improved NPC Targeting
I'm getting bad addon message with the latest versionof this.
MADNESS rocks
-
- Uruivellas
- Posts: 744
- Joined: Thu Nov 18, 2010 6:42 pm
Re: Improved NPC Targeting
I've posted a new version (configured for ToME version 1.0.4), but the server appears to be slow to update.
You can download it here: http://te4.org/sites/default/files/game ... et1.2.teaa
Let me know if there's still problems getting it to validate.
You can download it here: http://te4.org/sites/default/files/game ... et1.2.teaa
Let me know if there's still problems getting it to validate.
Re: Improved NPC Targeting
new lua errors all the time, e.g. with deep below boss:Hachem_Muche wrote:I've posted a new version (configured for ToME version 1.0.4), but the server appears to be slow to update.
You can download it here: http://te4.org/sites/default/files/game ... et1.2.teaa
Let me know if there's still problems getting it to validate.
Code: Select all
error = "Lua Error: .../addons/NPCTarget/superload/engine/interface/ActorAI.lua:93: attempt to index local 'LSeen' (a number value)\
At [C]:-1 __index\
At .../addons/NPCTarget/superload/engine/interface/ActorAI.lua:93 aiSeeTargetPos\
At .../addons/NPCTarget/superload/engine/interface/ActorAI.lua:50 doAI\
At /mod/class/NPC.lua:61 act\
At /engine/GameEnergyBased.lua:126 tickLevel\
At /engine/GameEnergyBased.lua:62 tick\
At /engine/GameTurnBased.lua:46 tick\
At /mod/class/Game.lua:1054 "
seen = true
reported = true
MADNESS rocks
-
- Uruivellas
- Posts: 744
- Joined: Thu Nov 18, 2010 6:42 pm
Re: Improved NPC Targeting
I'm having trouble reproducing this error. Is this under 1.0.4 or git and do you have any other addons running?
Re: Improved NPC Targeting
I have better tactical ai, tough dumb ai, store wish list, rest tweaks.Hachem_Muche wrote:I'm having trouble reproducing this error. Is this under 1.0.4 or git and do you have any other addons running?
running 1.0.4
MADNESS rocks
-
- Uruivellas
- Posts: 744
- Joined: Thu Nov 18, 2010 6:42 pm
Re: Improved NPC Targeting
Still can't get this error.
Started a new character (rogue) with NPC Targeting and the latest versions of better tactical ai, tough dumb ai, store wish list, and rest tweaks. Ran around in the Trollmire and The Deep Bellow (against the boss).
Started a new character (rogue) with NPC Targeting and the latest versions of better tactical ai, tough dumb ai, store wish list, and rest tweaks. Ran around in the Trollmire and The Deep Bellow (against the boss).
Re: Improved NPC Targeting
Last edited by Jeoshua on Mon Sep 16, 2013 11:42 pm, edited 1 time in total.