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

Load and display mission descriptions. #32778

Merged
merged 3 commits into from
Aug 7, 2019

Conversation

Petethegoat
Copy link
Contributor

@Petethegoat Petethegoat commented Jul 31, 2019

Summary

SUMMARY: Interface "Quest descriptions will now be loaded and used correctly."

Purpose of change

Resolve #30848 - I think it's agreed that programmatically displaying the literal quest requirements isn't necessary or particularly desirable (no need to draw attention to the relatively low variety of mission objectives)

Describe the solution

Add a description field to the mission_type struct, and actually load the description from the json definition. Pass the description to the mission itself when it's created.
While I'm fixing things, improve the display so it handles wrapping correctly.

Note that this doesn't actually add any descriptions. An example is below, but it's very simple.

Describe alternatives you've considered

Totally redoing the mission front and backend. Maybe later.

Additional context

Demonstration of multiline wrapping etc working nice. Can use a 😎 cool, undescriptive quest name, and rely on the description to tell players what to actually do.
example mission description

    "id": "MISSION_BEGGAR_2_BOX_SMALL",
    "type": "mission_definition",
    "name": "Enter Sandman",
    "description": "Dave needs 40 small cardboard boxes, to keep the little things safe.",
    etc

Edited:

This only works for newly acquired quests. Getting a quest, saving, and editing the description will not be reflected in game. I haven't familiarized myself with the save system, and I assume there's some wacky stuff going on so multiple characters in the same world work nicely.
However, changing the quest name mid-save does work correctly. So maybe the description being serialized is just some obsolete old thing. 🤷‍♂️

I've applied a nicer quick fix, thanks ralree- but it should be more than adequate for now, until someone wants to look into some deeper refactor and cleanup for mission serialization.

@ZhilkinSerg ZhilkinSerg added [C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc. Missions Quests and missions labels Jul 31, 2019
@Petethegoat Petethegoat changed the title Load and display mission descriptions. [CR] Load and display mission descriptions. Aug 3, 2019
@Petethegoat Petethegoat marked this pull request as ready for review August 6, 2019 21:10
@Petethegoat Petethegoat changed the title [CR] Load and display mission descriptions. Load and display mission descriptions. Aug 6, 2019
@Petethegoat
Copy link
Contributor Author

Happy with the state of this now.

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` Info / User Interface Game - player communication, menus, etc. Missions Quests and missions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MGOAL_FIND_ITEM missions do not display COUNT in mission dialogue
3 participants