Major Incident Medical Management System serious game for Wegas React
_commonfolder, which contains all the elements common to all scenarios and modelsbasic_scenario, which is a standalone scenario. Use it for developmentmodel: an empty model with appropriate (INHERITED & PROTECTED) rights on variables
- Server and client scripts
- CSS
- Themes settings
- Pages
- a gamemodel.json that has basic playable content; all variables are set to PRIVATE rights to simplify development
- content files (mainly icons and maps data)
- filesmeta.json: a descriptor for each file
- gamemodel.json: empty model variables with appropriate visibility rights
- content files (mainly icons and maps data)
- filesmeta.json: a descriptor for each file
Use the basic_scenario for development. Most development will take place in the _common directory, except Wegas variables and media files, which will modify the basic_scenario when updating from Wegas.
When done, report the relevant changes done in basic_scenario to the model folder
New variable declarations should be reported to the model.Check their visibility value and their default content.
Deleted variables should also be deleted from the model.
In both deletion and creation cases update the types/VariablesTypes.d.ts, which is used for compilation.
Report the changes in the translations or other relevant variables.
New and deleted files must be reflected in the model, including their file metadata, and their required visibility must be evaluated.
Releases should be done from the dev or main branch.
Double check that the model works fine by doing a full deployment on wegas-dev.
- Tag the commit
git tag vX.Y.Z -m "short comment" - Create an empty model and patch it, name it after the version
vX.Y.Z - Link it to a
basic_scenario - Do some player and scenarist testing
If everything goes well, and the release is validated for production.
- confirm with the team and clients that the new release can be patched on existing scenarios
- patch the model on prod and propagate
- test a little more :)
Before you apply the export, make sure to check out the commit you started from to create or update the game model/scenario in Wegas. If you apply the export onto a newer commit, it can silently overwrite changes made in the repository since then.
Download the zip from Wegas (Gamemodel settings -> "export" tab -> export ZIP).
Then, run ./updateFromZip.sh <EXPORT.zip> [target].
target is the folder you want to update: either model or basic_scenario. It defaults to basic_scenario.
Use when developing and testing features
- Run
./createZip.sh(defaults tobasic_scenario) - In Wegas, patch a scenario (Gamemodel settings -> "export" tab -> update from ZIP).
Use when testing the model
- Run
./createZip.sh model - (If creating a new model, go to admin -> create an empty React model)
- Patch the model (Gamemodel settings -> "export" tab -> update from ZIP)
- If patching a model that has linked scenarios, open the model and click "Propagate" at the top left
Note: you cannot duplicate an existing model and patch it (newly generated refIds will conflict). You can either start from an empty model, or patch an existing (non-duplicated) one.
Use when doing a full test model + scenario
- Create your model following the steps above (Patch a Model in Wegas)
- Run
./createZip.sh -pto packagebasic_scenariowith variable visibilities matching the model - In Wegas, create a new scenario derived from your model
In the last step you should not see any variable visibility change. If you do, something is wrong.
A few helper tools to verify the integrity of the scenarios.
When running updateFromZip, all checks run automatically. You can also run them manually.
Runs a tsc build
Checks that imports in page scripts have a match in the client scripts. This does not type check the parameters of function calls.
Checks that the library files on disk in _common/gameModel/libs/ match the libraries descriptors
declared in every <scenario>/gameModel/gamemodel.json.
Can be run with --fix to fix both model and basic_scenario
Checks that each filesmeta.json matches its files/ folder, and that model has the same files and metadata
as basic_scenario (visibility aside).
Can be run with --fix to apply basic_scenario to model
Checks that model has the same translations as basic_scenario (the localization tables): missing, added and
different ones.
Can be run with --fix to copy the translations of basic_scenario to model
See checkTranslations/README.md
Tools to keep basic_scenario and model coherent, in terms of refs and visibility
Used to overwrite the refIds of basic_scenario with the respective refIds of the model. Use it if refIds have diverged.
Use only through ./createZip.sh -p: this applies the model's visibility of each variable to the basic_scenario when building a zip