Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPC jobs at camps #34289

Merged
merged 8 commits into from Oct 11, 2019
Merged

NPC jobs at camps #34289

merged 8 commits into from Oct 11, 2019

Conversation

ghost
Copy link

@ghost ghost commented Sep 27, 2019

Summary

SUMMARY: Features "NPC jobs at camps"

Purpose of change

Fixes #34402
This allows NPCs to be assigned jobs at camp, then they will periodically scan for multi-activities that they can do, thats their job and they will keep doing it until told otherwise.

Describe the solution

Adds a UI to the bulletin board - under "assign jobs" entry, which will allow you to give each NPC stationed at that camp a job, this job will have a list of activity types that it will go through periodically ( every 30 minutes currently whilst testing impact on performance ), otherwise theyll hang around the camp waiting for the next moment they check if theres something to do.

To support this ive changed how "assign to camp" works, previously anyone asked to guard , whilst they were at a camp, were considered "stationed" there, now you have to explicitly say tht you want them to be assigned to this camp.

They will then act similar to an NPC on guard, they will be stationary ( pending future work in NPC being idle and getting food/drink in their downtime etc ), until they find work to do.

There is no priority currently to the list of activities per job category, it just checks a random one every checking interval, some sort of priority queue to work through would be ideal eventually.

I would like eventually some feedback on why the NPC dosnt complete their task, there are a lot of reasons why the work isnt possible, but often it just looks like the NPC stands there and dosnt move, because no feedback is given as to why.

The problem with this is that if it did a message every time they discounted a tile to work on, the message log would have horrendous spam, so im going to eventually work out a way to feed the activity code failure reasons into a seperate UI , like a basecamp work log, where you can search for why the NPC didnt have the skills to repair that vehicle, or the tools to build that wall.

Describe alternatives you've considered

N/A

Additional context

N/A

@ZhilkinSerg ZhilkinSerg added [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON NPC / Factions NPCs, AI, Speech, Factions, Ownership Player Faction Base / Camp All about the player faction base/camp/site labels Sep 28, 2019
src/faction_camp.cpp Outdated Show resolved Hide resolved
Co-Authored-By: Jianxiang Wang (王健翔) <[email protected]>
@ghost ghost changed the title [WIP]NPC jobs at camps NPC jobs at camps Oct 7, 2019
@ZhilkinSerg ZhilkinSerg merged commit 126c27b into CleverRaven:master Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON NPC / Factions NPCs, AI, Speech, Factions, Ownership Player Faction Base / Camp All about the player faction base/camp/site
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NPC disappeared after telling them to do construction
2 participants