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] missiondef: replace hardcoded mission starts with mapgen_update JSON #26794

Closed
wants to merge 0 commits into from

Conversation

mlangsdorf
Copy link
Contributor

@mlangsdorf mlangsdorf commented Nov 21, 2018

Summary

SUMMARY: Infrastructure "missiondef: replace hardcoded mission starts with mapgen_update JSON"

Purpose of change

Use the existing parsers for mapgen and NPC dialogue to move most of the hardcoded mission starts into JSON.

Describe the solution

Mission start dialogue is fully in JSON, but most missions require hardcoded C++ support to actual function.

95% of mission starts don't actually need hardcoded C++ support. They do things that can already be defined in JSON: give the player items, set traits or effects on NPCs, and adjust maps. There just isn't any support for doing that in the mission def JSON, even though other JSON does support it.

Use the existing dialogue and mapgen JSON parsers to parse new JSON in missiondef.json and remove the hardcode functions.

Describe alternatives you've considered

Still working through that.

Additional context

I really want a way to partially update an existing overmap tile for my work on faction camps, but this is also a generally useful feature that modders have requested.

Progress:

  • Begin moving the existing hardcoded functions into JSON
  • Finish moving the existing hardcoded functions into JSON
  • Adapt the mapgen JSON parser for use in missiondef
  • Adapt the dialogue effects JSON parser for use in missiondef
  • Replace specific missionstart code with generic functions driven by JSON.
  • Add test cases.
  • Debug.
  • Clean up for submission.

Comments and suggestions on better way to organize this are appreciated.

@mlangsdorf mlangsdorf added <Enhancement / Feature> New features, or enhancements on existing [JSON] Changes (can be) made in JSON Missions Quests and missions [C++] Changes (can be) made in C++. Previously named `Code` labels Nov 21, 2018
@mlangsdorf mlangsdorf changed the title [WIP][RFC] missiondef: move more mission_start into JSON [WIP] missiondef: replace hardcoded mission starts with mapgen_update JSON Feb 25, 2019
@ifreund ifreund removed the 0.D Freeze label Mar 8, 2019
@mlangsdorf mlangsdorf force-pushed the mission_start_maps branch 2 times, most recently from a5becb4 to 96f900c Compare April 3, 2019 02:06
@mlangsdorf
Copy link
Contributor Author

mlangsdorf commented Apr 3, 2019

Currently stuck on an ordering issue: missiondef update_mapgen code needs to the npc_templates finalized before it does anything, even though normal mapgen doesn't appear to require that.

Deferred loading is a pain up my tail.

@mlangsdorf mlangsdorf force-pushed the mission_start_maps branch 4 times, most recently from b7fe378 to 76e9bd9 Compare April 5, 2019 14:32
@mlangsdorf mlangsdorf force-pushed the mission_start_maps branch from 76e9bd9 to b0206df Compare April 5, 2019 14:54
@mlangsdorf mlangsdorf closed this Apr 10, 2019
@mlangsdorf mlangsdorf deleted the mission_start_maps branch April 10, 2019 01:26
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` <Enhancement / Feature> New features, or enhancements on existing [JSON] Changes (can be) made in JSON Missions Quests and missions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants