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: add a bunch of new options to JSON #27734

Merged
merged 5 commits into from
Jan 22, 2019

Conversation

mlangsdorf
Copy link
Contributor

Summary

SUMMARY: Infrastructure "npctalk: add a bunch of new options to JSON"

Purpose of change

Add a variety of new options:

  • and dynamic lines
  • u_driving, npc_driving, and no_vehicle dynamic lines
  • has_pickup_list dynamic line
  • mission_goal, mission_complete, mission_incomplete conditions
  • npc_following, npc_friend, npc_hostile conditions
  • npc_train_styles, npc_train_skills conditions
  • add_debt effect
  • mission_opinion opinion modifiers

Describe the solution

and is implemented as a vector of dynamic_line_t and each entry in the vector is called and the result is concatenated together.

u_driving and npc_driving check if the player or NPC is currently in control of a moving vehicle. no_vehicle is true if both of the previous are false.

has_pickup_list checks if the NPC has a pickup list in their follower rules.

mission_goal checks if the current selected mission for the conversation matches the specific type.

All the others are straightforward boolean checks of the relevant attribute.

Additional Context

Long term plan is at #27643

mlangsdorf and others added 5 commits January 20, 2019 09:35
Add a new response option for response text, "truefalsetext", which
takes a condition and displays a "true" text if the condition is true
and false otherwise.  The response trial, effects, etc. are the same
for both texts.
Add a new type of trial, "CONDITION" which always succeeds or fails based
on the value of a condition object.
Add a new version of the `opinion` effect called `mission_opinion`.
`mission_opinion` adjusts NPC `op_of_u` according to the mission value.
Add an `and` option, which joins multiple other dynamic lines together.
Add a variety of new options:
* `and` dynamic lines
* `u_driving`, `npc_driving`, and `no_vehicle` dynamic lines
* `has_pickup_list` dynamic line
* `mission_goal`, `mission_complete`, `mission_incomplete` conditions
* `npc_following`, `npc_friend`, `npc_hostile` conditions
* `npc_train_styles`, `npc_train_skills` conditions
* `add_debt` effect
@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 Missions Quests and missions [C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style labels Jan 20, 2019
@ZhilkinSerg ZhilkinSerg added the Code: Tests Measurement, self-control, statistics, balancing. label Jan 22, 2019
@ZhilkinSerg ZhilkinSerg self-assigned this Jan 22, 2019
@ZhilkinSerg ZhilkinSerg merged commit ab702bc into CleverRaven:master Jan 22, 2019
@ZhilkinSerg ZhilkinSerg removed their assignment Jan 22, 2019
@mlangsdorf mlangsdorf deleted the npctalk_misc_json branch January 22, 2019 23:07
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 Code: Tests Measurement, self-control, statistics, balancing. <Enhancement / Feature> New features, or enhancements on existing [JSON] Changes (can be) made in JSON Missions Quests and missions NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants