Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upNPC AI + interaction update #13486
Conversation
Coolthulhu
added some commits
Sep 4, 2015
This comment has been minimized.
This comment has been minimized.
stk2008
commented
Sep 4, 2015
|
Wow dude thank you so much :) I love npc fixes etc :)
|
This comment has been minimized.
This comment has been minimized.
So no more killing/driving off NPCs using traps? I hope this is a temporary thing. |
This comment has been minimized.
This comment has been minimized.
|
Just pathfinding, they still can be murdered by pushing them into traps and it still won't credit the player for the murder with -100 morale. This was mostly to make them not blunder into open air and pits. |
This comment has been minimized.
This comment has been minimized.
|
Interesting. If there was a way to make them ignore undiscovered traps without adding to complexity or lag, though... |
This comment has been minimized.
This comment has been minimized.
|
Shouldn't be hard, the method we use with players should scale to NPCs
doing the same thing just fine.
|
This comment has been minimized.
This comment has been minimized.
|
Ah. Now if we further made a distinction between "spotted by player" and "spotted by NPC" that would be useful. However, that would add more code to juggle. Simply one list for players and one for NPC would be a step up and not too complex, but giving EVERY NPC their own detection list would get out of hand rapidly. |
This comment has been minimized.
This comment has been minimized.
|
No, it would be just fine to give each NPC a separate list, no problem.
|
This comment has been minimized.
This comment has been minimized.
|
Hmm. I do wonder how many traps, and how many NPCs, it takes to cause problems using that method. X3 |
This comment has been minimized.
This comment has been minimized.
|
IIRC they're stored in unordered lists, so it'll be fine until we run out
of ram.
|
This comment has been minimized.
This comment has been minimized.
|
Ah right. And compared to map data and other stats, guess it wouldn't be a substantial addition to the amount of data tracked and saved. |
This comment has been minimized.
This comment has been minimized.
|
I <3 this, @Coolthulhu! |
Coolthulhu commentedSep 4, 2015
Characterand got rid of a page worth of redundant code (per-limb code was literally ctrl+c+v, 4 times)