NPC Forgiveness

A place to post your add ons and ideas for them

Moderator: Moderator

Post Reply
Message
Author
Hachem_Muche
Uruivellas
Posts: 744
Joined: Thu Nov 18, 2010 6:42 pm

NPC Forgiveness

#1 Post by Hachem_Muche »

This addon adjusts the way friendly NPC's react to hostile actions by the player.

In most cases, the personal reaction of an NPC to the player (friendly/neutral/hostile) will slowly recover (by 10% each turn, minimum 1 point) back to it's default value over time. If the player doesn't further aggravate the NPC, it will eventually become neutral/friendly again. (Though it will still probably have the player targeted, depending on its ai settings which are not addressed in this addon.) The exception is if the player kills another friendly NPC within LOS, which will result in the NPC becoming permanently hostile to the player in most cases.

Putting a detrimental status effect on the NPC will create a -25 (negative) reaction to the player (in addition to the penalties from any damage caused).

Files affected:
mod.class.NPC.lua (M:timedEffects, _M:onTakeHit, _M:die)

It can be downloaded at http://te4.org/games/addons/tome/npc-forgiveness
Last edited by Hachem_Muche on Tue Sep 10, 2013 11:17 pm, edited 1 time in total.
Author of the Infinite 500 and PlenumTooltip addons, and the joys of Scaling in ToME.

Suslik
Spiderkin
Posts: 481
Joined: Wed Aug 22, 2012 4:41 pm

Re: NPF Forgiveness

#2 Post by Suslik »

I dont like the idea of changing NPC's attitude gradually with time. What? Are they going to forget you've almost killed them 10 turns ago? Its also looks exploitable. I think there should be an ability to disarm/give up/show excuse. For example in Fable III if you accidentally harmed someone but did not kill and did not steal anything you have an option to confess and remove hostility. If the crime is more serious it won't work though.

I see major problems with hostility gradual reduction like your summons/shades will attack the NPC you accidentally hit and it will become hostile permanently. AoE effects that normally dont hurt allies like mindstar DoT aura will harm the NPC as well further increasing their hostility. That's why I think having an activatable excuse/lay down hands ability is the only option.

Hachem_Muche
Uruivellas
Posts: 744
Joined: Thu Nov 18, 2010 6:42 pm

Re: NPC Forgiveness

#3 Post by Hachem_Muche »

Last edited by Hachem_Muche on Tue Sep 10, 2013 11:14 pm, edited 1 time in total.
Author of the Infinite 500 and PlenumTooltip addons, and the joys of Scaling in ToME.

Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

Re: NPF Forgiveness

#4 Post by Doctornull »

Awesome. I'm installing this in the firm hopes that I don't need it.

Thank you!
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

Hachem_Muche
Uruivellas
Posts: 744
Joined: Thu Nov 18, 2010 6:42 pm

Re: NPC Forgiveness

#5 Post by Hachem_Muche »

I have pushed version 2.0 for ToME 1.0.5 at http://te4.org/sites/default/files/game ... rgive.teaa and on steam.

The new version will prevent friendly npcs from targeting the player and should prevent friendly towns folk from following the player around in most cases.

PS: This is still not fully compatible with Draconians. This would require a new hook in actor:die.
Author of the Infinite 500 and PlenumTooltip addons, and the joys of Scaling in ToME.

Crim, The Red Thunder
Sher'Tul Godslayer
Posts: 2000
Joined: Fri May 07, 2004 8:26 pm
Location: Nahgharash

Re: NPC Forgiveness

#6 Post by Crim, The Red Thunder »

It might be worth mentioning that preventing townfolk from following one around rather breaks any chance at 'Never Look Back and There Again' (the achievement for winning without going west), since drowning Aeryn seems to be the only way to logically start that.
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
SadistSquirrel wrote:DarkGod has two arms, one with an opened hand, one with a closed fist. You got the fist.

grooog
Higher
Posts: 52
Joined: Fri Nov 01, 2013 5:54 pm

Re: NPC Forgiveness

#7 Post by grooog »

Hachem_Muche wrote:I have pushed version 2.0 for ToME 1.0.5 at http://te4.org/sites/default/files/game ... rgive.teaa and on steam.

The new version will prevent friendly npcs from targeting the player and should prevent friendly towns folk from following the player around in most cases.

PS: This is still not fully compatible with Draconians. This would require a new hook in actor:die.
Does this remove the need for the silly undead cloak?

Hachem_Muche
Uruivellas
Posts: 744
Joined: Thu Nov 18, 2010 6:42 pm

Re: NPC Forgiveness

#8 Post by Hachem_Muche »

Crim, I just checked, and you can still drown Aeryn. You just need to be a little more persistent.

Groog, you still need the cloak or else your "Undead" faction will make most friendly npc's hostile to you. If you forget to wear it and walk into town, you can get the townsfolk to stop pursuing you if you put it on, though.
Author of the Infinite 500 and PlenumTooltip addons, and the joys of Scaling in ToME.

Hachem_Muche
Uruivellas
Posts: 744
Joined: Thu Nov 18, 2010 6:42 pm

Re: NPC Forgiveness

#9 Post by Hachem_Muche »

I've just uploaded version 2.1 to http://te4.org/sites/default/files/game ... ive_1.teaa and to steam.

This fixes a possible bug with boss agro.
Author of the Infinite 500 and PlenumTooltip addons, and the joys of Scaling in ToME.

Hachem_Muche
Uruivellas
Posts: 744
Joined: Thu Nov 18, 2010 6:42 pm

Re: NPC Forgiveness

#10 Post by Hachem_Muche »

I've uploaded version 2.2 to http://te4.org/sites/default/files/game ... ive_2.teaa and to Steam.

This follows the changes for ToME 1.2.0
Author of the Infinite 500 and PlenumTooltip addons, and the joys of Scaling in ToME.

Hachem_Muche
Uruivellas
Posts: 744
Joined: Thu Nov 18, 2010 6:42 pm

Re: NPC Forgiveness

#11 Post by Hachem_Muche »

I've uploaded version 2.3 to http://te4.org/sites/default/files/game ... ive_3.teaa and to steam.

This is just an update to be compatible with ToME 1.2.4.
Author of the Infinite 500 and PlenumTooltip addons, and the joys of Scaling in ToME.

Hachem_Muche
Uruivellas
Posts: 744
Joined: Thu Nov 18, 2010 6:42 pm

Re: NPC Forgiveness

#12 Post by Hachem_Muche »

I've just uploaded version 2.4 for ToME 1.3.0 at (http://te4.org/download-addon/3161/tome-NPCForgive) and to steam.

This fixes a bug that can cause NPC's to become hostile from detrimental effects that don't land, and ensures that neutral NPC's will untarget the player eventually.
Author of the Infinite 500 and PlenumTooltip addons, and the joys of Scaling in ToME.

btonassse
Cornac
Posts: 41
Joined: Mon Mar 02, 2015 12:43 pm

Re: NPC Forgiveness

#13 Post by btonassse »

Hi, is there a way of activating this for an existing character save? My blink blade skill accidently hit Yeek Wayist and now he's hostile to my Shaloren chronomancer.

Hachem_Muche
Uruivellas
Posts: 744
Joined: Thu Nov 18, 2010 6:42 pm

Re: NPC Forgiveness

#14 Post by Hachem_Muche »

You can change the addons an existing character uses by updating desc.lua file in your character's save directory. Find the line

addons = {...}

containing a list of your addons and add

, 'NPCForgive'

to the list. (This will not work for all addons, but should be OK for NPCForgiveness.)

I haven't tested this scenario specifically, but don't see any reason this should not work.
Author of the Infinite 500 and PlenumTooltip addons, and the joys of Scaling in ToME.

Hachem_Muche
Uruivellas
Posts: 744
Joined: Thu Nov 18, 2010 6:42 pm

Re: NPC Forgiveness

#15 Post by Hachem_Muche »

I have uploaded version 2.5 (for ToME 1.5.0) at: http://te4.org/download-addon/4530/tome-NPCForgive and to Steam.

This adds some safeguards to prevent NPC's from becoming angry at themselves.
Author of the Infinite 500 and PlenumTooltip addons, and the joys of Scaling in ToME.

Post Reply