AI behaviors

https://attnam.com/topics/AI-behaviors

The Cathedral of Attnam > Other Coding

#1 Oct 12, 2017, 9:16 am Hide

Chiko

Is there a way to make an NPC enter town, stay and roam in a lvl for some time and then make them leave town? Kinda like banana growers.

I noticed if you give NPCs enough money, and if they enter a shop, they will buy and equip armor and weapons. This could be used as a way for a shopkeeper to have a chance to sell some of his goods and get money so he can buy more of our loot.

I kinda want to add an adventurer NPC that arrives in Attnam and does that.
#2 Oct 13, 2017, 12:01 am Hide

4zb4

If there's a chance for NPCs to purchase shop contents, then the shops would need to restock every now and then. Otherwise we have a bunch of dudes clearing the place out and leaving probably only the most expensive stuff behind.

Also another fun thing with the AI is that if you kill the Attnam shopkeeper without alerting the town, the slave will just bundle up all the equipment, put it on, and make a run for it.
He doesn't actually make a break for the town limits, he just grabs the stuff because he's underequipped and it's there and starts wandering around town since he's not owned by anyone any more.
#3 Oct 13, 2017, 2:22 am Hide

Chiko

Well, yeah that works too. I usually keep shopkeepers restocked but having something like the shop restarting itself after some days would also be nice.

I noticed this behavior just now at a general store I added in New Attnam like a while ago. The husband tourist has 5k gold so he bought a lot of equipment from the store... especially stuff I was gonna buy next. xD