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

[WIP] npctalk: move more stuff to JSON #27643

Closed
wants to merge 2 commits into from

Conversation

mlangsdorf
Copy link
Contributor

@mlangsdorf mlangsdorf commented Jan 15, 2019

Summary

SUMMARY: Infrastructure "npctalk: move more stuff to JSON"

Purpose of change

Move even more NPC dialogue out of the C++ hardcode and into JSON. This round deals with the main follower dialogue, mission dialogue, and NPC rules.
Fixes #25374 - checking an NPC status now shows approximately how long until they need to eat, drink, and sleep
Fixes #27637 - response snippets will now be logged in their final form
Fixes #27397 - most of the requests have already been completed, just waiting on conditional trials

Describe the solution

Creates a bunch of new conditions, a few new effects, and a few new dynamic lines.

Alternatives I didn't really consider

conditional functions need to stop being lambdas and start being top level functions so they can eventually be used by the base camp and mission code, but while that is going to be a huge refactor, it's also going to be trivial. I'll do it later after this functionality gets merged.

Additional context

2400 lines is too large for sensible review, so I'll break this up into multiple PRs after I add a bunch of new test cases.

@mlangsdorf mlangsdorf added <Enhancement / Feature> New features, or enhancements on existing 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 15, 2019
@mlangsdorf mlangsdorf force-pushed the more_npctalk_json branch 7 times, most recently from eacb718 to 5e54eec Compare January 18, 2019 16:37
@mlangsdorf mlangsdorf force-pushed the more_npctalk_json branch 2 times, most recently from 0bf7770 to f876bef Compare January 20, 2019 20:02
@mlangsdorf mlangsdorf force-pushed the more_npctalk_json branch 2 times, most recently from 405357c to e27330d Compare January 25, 2019 12:13
This was referenced 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.
move mission responses and sharing equipment, along with a few other
items, into JSON now that all the infrastructure is in place.
@mlangsdorf
Copy link
Contributor Author

Closed as the component parts have been merged.

@mlangsdorf mlangsdorf closed this Jan 28, 2019
@mlangsdorf mlangsdorf deleted the more_npctalk_json branch March 9, 2019 01:21
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 <Enhancement / Feature> New features, or enhancements on existing [JSON] Changes (can be) made in JSON NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
None yet
1 participant