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

New tutorial #2451

Closed
wants to merge 17 commits into from
Closed

New tutorial #2451

wants to merge 17 commits into from

Conversation

olanti-p
Copy link
Contributor

@olanti-p olanti-p commented Mar 20, 2023

Summary

SUMMARY: Content "Reworked the tutorial"

Purpose of change

Rework the tutorial.
It's been on the list for years, the time has come.

Describe the solution

Loosely inspired by CleverRaven/Cataclysm-DDA#50991
Change tutorial from "here's a room of random stuff for you to poke" to "guided tour through basic game mechanics".
In new tutorial, you have to walk through some corridors, and popups periodically show up and explain stuff.

Things changed:

  1. Tutorial room reworked into a complex of tunnels, now also contains training dummies to practice against
  2. Starting overmap is pristine, the only structure on it is the tutorial complex (may revert this later)
  3. Got rid of on-action and complex conditional triggers, popups show up only when you move through the corridors
  4. The popups now show actual keybinds defined for actions
  5. The popups now save their message to the message log
  6. Moved everything to JSON, the only hardcoded logic left is the worldgen and the code to show messages when entering specific zones
  7. Tutorial world no longer shows up in main menu in "Load" and "World" tabs
  8. Starting new tutorial when tutorial world already exists now properly re-creates the world
  9. Trying to save or quicksave in tutorial or defense now prompts to exit instead

Lessons have been kept as short text prompts, but were reworded from in-game mechanics explanations to more cut-and-dry controls and mechanics explanations. Mostly because I don't know how to word it without causing further information overload, but also because gameplay has changed quite a bit after a decade. Another attempt to make it easier was done by separating most of the lessons into optional branches the player could take or walk past.

New lessons:

  1. Viewing message log
  2. Reach attacks
  3. Injuries
  4. Sleeping
  5. Morale and Focus
  6. Starting fire
  7. Boiling water
  8. Hauling items (newbies frequently activate it by accident and don't understand what's going on)
  9. Dragging vehicles & furniture
  10. How turns work, how speed works
  11. Watches let you see precise time
  12. Movement modes and their downsides, example on how crouching blocks vision in vehicles (popular accident as well)
  13. Warmth
  14. Encumbrance, armor layers
  15. Comparing items

TODO list (old lessons that yet to be re-added):

  1. Butcher
  2. Hit to stun
  3. Gasmask
  4. Traps

TODO list (new lessons):

  1. Controlling view offset and resetting it (another popular accident)
  2. Starting & steering vehicles
  3. AIM
  4. Zones
  5. Peeking
  6. Autotravel, travel mode

Describe alternatives you've considered

TODO

Testing

WIP for now, contains bugs

@github-actions github-actions bot added JSON related to game datas in JSON format. src changes related to source code. tests changes related to tests labels Mar 20, 2023
@cataclysmbnteam cataclysmbnteam deleted a comment from github-actions bot Mar 28, 2023
@cataclysmbnteam cataclysmbnteam deleted a comment from github-actions bot Mar 28, 2023
@github-actions github-actions bot added the mods PR changes related to mods. label Mar 28, 2023
@olanti-p olanti-p marked this pull request as draft April 6, 2023 19:38
@scarf005 scarf005 changed the title [WIP] New tutorial New tutorial Apr 22, 2023
@Vollch
Copy link
Contributor

Vollch commented Oct 10, 2023

If someone could come up with better snippets I'm all for it

Lua?
Instead of bunch of hardcode scattered around codebase there could be lua hooks allowing to implement all needed things externally. This way tutorial stuff won't clutter code, and it'll solve one of fundamental lua problems("not used in main game"). And defense mode also could be migrated to lua.
I see only one problem in this approach which need to be solved somehow: tutorial(and same for defense mode) adds new starting option right in main menu, before any mods loaded. That might need introducing entities of higher order than regular mods. Or partial preloading of mods, to check whether they have callbacks for lua-driven quickstart.
As a bonus it'll open possibilities for easier adding new game modes.

@olanti-p
Copy link
Contributor Author

Yeah, Lua is the reason the PR is still a draft. This functionality is what Lua would be great for, but unfortunately Lua is still optional, and tutorial should work regardless of build configuration.

Regarding game modes, their declarations could be added to the MOD_INFO object - it'd be a hack, but the game already parses mod info before showing the title screen, so it shouldn't be hard to populate the game modes list from list of all loadable mods.

@olanti-p olanti-p closed this Jul 4, 2024
@olanti-p
Copy link
Contributor Author

olanti-p commented Jul 4, 2024

To clarify, I won't be working on this PR anymore.

IIRC it was functional for the most part. I haven't gotten around to porting things to Lua (which is optional), or polishing how the marker zones work, or implementing many useful "lessons", but the core of it - explaining what's about to happen rather than what has happened, separating tutorial into steps, providing useful and up to date information - was all there. Just needs resolving conflicts and tidying up some loose ends, and it'll already be better than the current tutorial.

If anyone feels up to the task - feel free to take over the code and resurrect this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JSON related to game datas in JSON format. mods PR changes related to mods. src changes related to source code. tests changes related to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants