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

Npctalk ally rules #27859

Merged
merged 1 commit into from
Jan 27, 2019
Merged

Conversation

mlangsdorf
Copy link
Contributor

Summary

SUMMARY: Infrastructure "npctalk: move NPC follower AI rules to JSON"

Purpose of change

Make it slightly easier to adjust NPC follower AI rules by moving the dialogue to change them into JSON.

Describe the solution

Change all the npc_follower_rules booleans into enum bitfields, so that they can be checked and changed with simple has_flag, set_flag, clear_flag, toggle_flag functions instead of multiple nested templates.

Add JSON parsing for options to check and set npc_follower_rules.

Move most NPC follower dialogue into a new JSON file.

Additional context

Requires #27858
See #27643 for the long term plan.

@mlangsdorf mlangsdorf added NPC / Factions NPCs, AI, Speech, Factions, Ownership [JSON] Changes (can be) made in JSON [C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style labels Jan 25, 2019
@ZhilkinSerg ZhilkinSerg added the <Documentation> Design documents, internal info, guides and help. label Jan 25, 2019
Change npc_follower_rules to use a enum bitfield instead of individual
booleans to make it easier to write a single function to toggle the
rules.

Then create functions to toggle NPC follower AI rules and move all that
dialogue into JSON.
@ZhilkinSerg ZhilkinSerg merged commit 7e78b20 into CleverRaven:master Jan 27, 2019
@mlangsdorf mlangsdorf deleted the npctalk_ally_rules branch January 27, 2019 14:00
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` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style <Documentation> Design documents, internal info, guides and help. [JSON] Changes (can be) made in JSON NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants