[WIP] missiondef: replace hardcoded mission starts with mapgen_update JSON #26794
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
Comments and suggestions on better way to organize this are appreciated.