Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

JOWILDER

Links:

key description link
original base game https://jowilder-master.netlify.app/?script_type=original
nohumor no humor https://jowilder-master.netlify.app/?script_type=nohumor
nosnark no snark https://jowilder-master.netlify.app/?script_type=nosnark
dry no snark or humor https://jowilder-master.netlify.app/?script_type=dry

Logging Events

Each log is sent with a number of fields required by simplelog. Simple log allows for a custom field called event_data_complex along with its category enumerator: event_custom: category enumerator event_data_complex: JSON.stringify(log_data) Each log_data is a JSON object for that specific category as defined below. Note: Note: event_custom will always map to a string of the event name. For example, if an event called FOO had a field of "event_custom", its value would be a string "FOO". Not all events have this field.

Change Log

Versions:

  1. Original
  2. Restructured to flatten logging objects (which originally contained many sub-objects)
  3. Simple log now sends player_id (if present) from the URL to log.php (9/24/2019)
  4. Change name, type, and subtype to representitive strings instead of numbers (11/12/2019)
  5. Intermediate Change. (11/26/2019)
  6. Big Change. Will update readme later with all that has been changed (11/26/2019).
  7. Add "script_type" and "script_version" to startgame (7/22/2020).
  8. Add "quiz_number" to quiz (7/23/2020). Quiz questions subject to change, but now there is a quiz after each chapter end.
  9. Add quizquestion log (#22) (7/29/2020).
  10. Add quizstart and quizend logs (#23,#24) (8/03/2020).

Event Categories

  1. checkpoint
  2. startgame
  3. endgame
  4. navigate_click
  5. notebook_click
  6. map_click
  7. notification_click
  8. object_click
  9. observation_click
  10. person_click
  11. cutscene_click
  12. wildcard_click
  13. navigate_hover
  14. notebook_hover
  15. map_hover
  16. notification_hover
  17. object_hover
  18. observation_hover
  19. person_hover
  20. cutscene_hover
  21. wildcard_hover
  22. quiz
  23. quizquestion
  24. quizstart
  25. quizend

Enumerators and Constants

  1. Event Categories
  2. Log Types
  3. Log Subtypes
  4. Log Names
  5. Script Types
  6. Script Versions

Generating Scripts

  1. Generating Scripts

checkpoint (index=0)

event Name Description Note
room_fqid fully qualified id of the room
type type name
subtype subtype name
fqid fqid of the interaction, with the room_fqid subtracted
event_custom event enum
name event name
level enum for current checkpoint

startgame (index=1)

event Name Description Note
room_fqid fully qualified id of the room
type type name
subtype subtype name
fqid fqid of the interaction, with the room_fqid subtracted
event_custom event enum
save_code
fullscreen
music
hq
script_type enum of which script is being used. See script_types for details and mappings from enum to type. v7+
script_version Version of the script v7+
name event name
level enum for current checkpoint

endgame (index=2)

event Name Description Note
room_fqid fully qualified id of the room
type type name
subtype subtype name
fqid fqid of the interaction, with the room_fqid subtracted
event_custom event enum
name event name
level enum for current checkpoint

navigate_click (index=3)

event Name Description Note
room_fqid fully qualified id of the room
type type name
subtype subtype name
fqid fqid of the interaction, with the room_fqid subtracted
event_custom event enum
screen_coor x,y integer array of where the mouse is in current room
room_coor x,y integer array of where the mouse is in the game screen
level enum for current checkpoint

notebook_click (index=4)

event Name Description Note
room_fqid fully qualified id of the room
type type name
subtype subtype name
fqid fqid of the interaction, with the room_fqid subtracted
event_custom event enum
screen_coor x,y integer array of where the mouse is in current room
room_coor x,y integer array of where the mouse is in the game screen
name event name
page
level enum for current checkpoint

map_click (index=5)

event Name Description Note
room_fqid fully qualified id of the room
type type name
subtype subtype name
fqid fqid of the interaction, with the room_fqid subtracted
event_custom event enum
screen_coor x,y integer array of where the mouse is in current room
room_coor x,y integer array of where the mouse is in the game screen
name event name
level enum for current checkpoint

notification_click (index=6)

event Name Description Note
room_fqid fully qualified id of the room
type type name
subtype subtype name
fqid fqid of the interaction, with the room_fqid subtracted
event_custom event enum
screen_coor x,y integer array of where the mouse is in current room
room_coor x,y integer array of where the mouse is in the game screen
name event name
level enum for current checkpoint
text_fqid c.fqid Text fqid (v6+)
text c_text Text (v6+)

object_click (index=7)

event Name Description Note
room_fqid fully qualified id of the room
type type name
subtype subtype name
fqid fqid of the interaction, with the room_fqid subtracted
event_custom event enum
screen_coor x,y integer array of where the mouse is in current room
room_coor x,y integer array of where the mouse is in the game screen
name event name
level enum for current checkpoint

observation_click (index=8)

event Name Description Note
room_fqid fully qualified id of the room
type type name
subtype subtype name
fqid fqid of the interaction, with the room_fqid subtracted
event_custom event enum
screen_coor x,y integer array of where the mouse is in current room
room_coor x,y integer array of where the mouse is in the game screen
name event name
level enum for current checkpoint
text_fqid obs_fqid Text fqid (v6+)
text obs_text Text (v6+)

person_click (index=9)

event Name Description Note
room_fqid fully qualified id of the room
type type name
subtype subtype name
fqid fqid of the interaction, with the room_fqid subtracted
event_custom event enum
screen_coor x,y integer array of where the mouse is in current room
room_coor x,y integer array of where the mouse is in the game screen
name event name
level enum for current checkpoint
text_fqid speak.fqid Text fqid (v6+)
text speak_text (v6+)

cutscene_click (index=10)

event Name Description Note
room_fqid fully qualified id of the room
type type name
subtype subtype name
fqid fqid of the interaction, with the room_fqid subtracted
event_custom event enum
screen_coor x,y integer array of where the mouse is in current room
room_coor x,y integer array of where the mouse is in the game screen
name event name
level enum for current checkpoint
text_fqid cutscene.fqid Text fqid (v6+)
text txt Either cutscene text or 'undefined' (v6+)

wildcard_click (index=11)

event Name Description Note
room_fqid fully qualified id of the room
type type name
subtype subtype name
fqid fqid of the interaction, with the room_fqid subtracted
event_custom event enum
screen_coor x,y integer array of where the mouse is in current room
room_coor x,y integer array of where the mouse is in the game screen
name event name
level enum for current checkpoint

|correct | correct answer to the problem (only exists for event name CHOICE) - sometimes doesn't exist?? | Only exists in versions 1-4. (v4-)| |answer | selected answer (only exists for event name CHOICE) | Only exists in versions 1-4. (v4-)| |cur_cmd_fqid| cmd_type == 1 ? cur_cmd.speak_fqid : wc.cur_command.entry_fqid|Only exists in versions 6+ (v6+)| |cur_cmd_type| cmd_type| Only exists in versions 6+ (v6+)| |text| cmd_txt| Only exists in versions 6+ (v6+)| |name| wc.cmd_type == 1 ? LOG_NAME_BASIC : LOG_NAME_CHOICE| Only exists in versions 6+ (v6+)| |interacted_fqid| clicked_fqid| Only exists in versions 6+ (v6+)|

navigate_hover (index=12)

event Name Description Note
room_fqid fully qualified id of the room
type type name
subtype subtype name
fqid fqid of the interaction, with the room_fqid subtracted
event_custom event enum
start_time client side timestamp for the time the hover started
end_time client side timestamp for the time the hover ended
name event name
level enum for current checkpoint

notebook_hover (index=13)

event Name Description Note

map_hover (index=14)

event Name Description Note
room_fqid fully qualified id of the room
type type name
subtype subtype name
fqid fqid of the interaction, with the room_fqid subtracted
event_custom event enum
start_time client side timestamp for the time the hover started
end_time client side timestamp for the time the hover ended
name event name
level enum for current checkpoint

notification_hover (index=15)

event Name Description Note

object_hover (index=16)

event Name Description Note
room_fqid fully qualified id of the room
type type name
subtype subtype name
fqid fqid of the interaction, with the room_fqid subtracted
event_custom event enum
start_time client side timestamp for the time the hover started
end_time client side timestamp for the time the hover ended
level enum for current checkpoint
name event name - sometimes doesn't exist??

observation_hover (index=17)

event Name Description Note

person_hover (index=18)

event Name Description Note

cutscene_hover (index=19)

event Name Description Note

wildcard_hover (index=20)

event Name Description Note
room_fqid fully qualified id of the room
type type name
subtype subtype name
fqid fqid of the interaction, with the room_fqid subtracted
event_custom event enum
start_time client side timestamp for the time the hover started
end_time client side timestamp for the time the hover ended
name event name - sometimes doesn't exist??
level enum for current checkpoint
correct correct answer to the problem (only exists for event name CHOICE) - sometimes doesn't exist?? Only exists in versions 1-4. (v4-)
answer selected answer (only exists for event name CHOICE) Only exists in versions 1-4. (v4-)
cur_cmd_fqid cmd_type == 1 ? cur_cmd.speak_fqid : wc.cur_command.entry_fqid Only exists in versions 6+ (v6+)
cur_cmd_type cmd_type Only exists in versions 6+ (v6+)
text cmd_txt Only exists in versions 6+ (v6+)
name wc.cmd_type == 1 ? LOG_NAME_BASIC : LOG_NAME_CHOICE Only exists in versions 6+ (v6+)
interacted_fqid clicked_fqid Only exists in versions 6+ (v6+)

quiz (index=21)

Only exists in logs v6+. quiz_number only exists in logs v8+. Replaced by quizquestion in v9+

event Name Description Note
room_fqid fully qualified id of the room
type type enum
subtype subtype enum
fqid fqid of the interaction, with the room_fqid subtracted
name event name enum
level enum for current checkpoint
event_custom event enum
questions array of question objects, each has question, response, and response_index
quiz_number numerical id of the quiz sent (default startgame quiz is number 0)

quizquestion (index=22)

Only exists in logs v9+. Replaces quiz.

event Name Description Note
room_fqid fully qualified id of the room
type type enum
subtype subtype enum
fqid fqid of the interaction, with the room_fqid subtracted
name event name enum
level enum for current checkpoint
event_custom event enum
quiz_number numerical id of the quiz sent
question ques.q text of the question
question_index question_index index of the question within the quiz
response ques.a[ques.response] question response text
response_index ques.response index of the response

quizstart (index=23)

Only exists in logs v10+. Logs when a player starts a given quiz.

event Name Description Note
room_fqid fully qualified id of the room
type type enum
subtype subtype enum
fqid fqid of the interaction, with the room_fqid subtracted
event_custom event enum
name event name enum
level enum for current checkpoint
quiz_number numerical id of the quiz sent

quizend (index=24)

Only exists in logs v10+. Logs when a player ends a given quiz.

event Name Description Note
room_fqid fully qualified id of the room
type type enum
subtype subtype enum
fqid fqid of the interaction, with the room_fqid subtracted
event_custom event enum
name event name enum
level enum for current checkpoint
quiz_number numerical id of the quiz sent

Enumerators and Constants

Event Categories

Index Name Description
0 checkpoint
1 startgame
2 endgame
3 navigate_click
4 notebook_click
5 map_click
6 notification_click
7 object_click
8 observation_click
9 person_click
10 cutscene_click
11 wildcard_click
12 navigate_hover
13 notebook_hover
14 map_hover
15 notification_hover
16 object_hover
17 observation_hover
18 person_hover
19 cutscene_hover
20 wildcard_hover
21 quiz
22 quizquestion
23 quizstart
24 quizend

Log Types

Index Name Description
0 checkpoint
1 startgame
2 endgame
3 click
4 hover
5 quiz
6 quizquestion
7 quizstart
8 quizend

Log Subtypes

Index Name Description
0 basic
1 navigate
2 notebook
3 map
4 notification
5 object
6 observation
7 person
8 cutscene
9 wildcard

Log Names

Index Name Description
0 basic
1 open
2 close
3 choice
4 next
5 prev

Script Types

Starting in v7, multiple scripts were added to the game for AB tests on snark and humor. The game will randomly choose between 4 different data files: data_dry.js, data_nohumor.js, data_nosnark.js, and the original data.js. They are each built from their respective data folder in assets. The type of script used is only logged once, in startgame.

Index Name Description
0 dry no humor or snark
1 nohumor no humor (includes snark)
2 nosnark no snark (includes humor). No snark can also be thought of as "obedient"
3 normal base script (includes snark and humor)

Script Versions

Starting in v7. The version of script used is only logged once, in startgame. Different script types may have different versions, but for now they are all uniform.

Version Description
0 Base game, all script types were the same as the original script (type 3: normal).
1 Changed the script for Chapter 1 to reflect the different types. Type 3 stays the same.
2 Updated survey questions (8/26/2020).
3 Changed the script of rest of chapters to reflect the different types (10/8/2020).

Generating Scripts

Configuring the Script Generator File

In /engine, edit the first few lines of gen_data.sh based on the script you want to edit:

  1. original (data)
ENGINE_DD=../assets/data
GAME_DD=assets/data
STUB_D=stubs
OUT=data.js
  1. no humor (nohumor)
ENGINE_DD=../assets/dataNoHumor
GAME_DD=assets/dataNoHumor
STUB_D=stubs
OUT=data_nohumor.js
  1. no snark (nosnark)
ENGINE_DD=../assets/dataNoSnark
GAME_DD=assets/dataNoSnark
STUB_D=stubs
OUT=data_nosnark.js
  1. no snark and no humor (dry)
ENGINE_DD=../assets/dataDry
GAME_DD=assets/dataDry
STUB_D=stubs
OUT=data_dry.js

Generating Script

  1. In terminal, navigate to /engine.
  2. Run . quickgen.sh (Windows users: run sh quickgen.sh). If you get an error about \r characters, run dos2unix on the erroring file and retry.
  3. If generating the nosnark, nohumor, and dry versions, replace the code in /src/data_nosnark, /src/data_nohumor, and /src/data_dry respectively:
tmp_animcycle = new animcycle();
tmp_animcycle.id = "notebook_baked";
tmp_animcycle.fqid = "tunic.notebook_baked";
{
tmp_animcycle.w = 0;
tmp_animcycle.h = 0;
tmp_animcycle.frame_t = 10;
tmp_animcycle.offset_t = 0;
tmp_animcycle.loop = 1;

tmp_animcycle.frame_files = [];
tmp_animcycle.frames = [];
tmp_animcycle.frame_files.push("assets/dataDry/levels/tunic/animcycles/notebook_baked/0.png");
}
tmp_level.animcycles.push(tmp_animcycle);

with

tmp_animcycle = new animcycle();
tmp_animcycle.id = "notebook_baked_no_monster";
tmp_animcycle.fqid = "tunic.notebook_baked_no_monster";
{
tmp_animcycle.w = 0;
tmp_animcycle.h = 0;
tmp_animcycle.frame_t = 10;
tmp_animcycle.offset_t = 0;
tmp_animcycle.loop = 1;

tmp_animcycle.frame_files = [];
tmp_animcycle.frames = [];
tmp_animcycle.frame_files.push("assets/dataDry/levels/tunic/animcycles/notebook_baked_no_monster/0.png");
}
tmp_level.animcycles.push(tmp_animcycle);

if necessary.

  1. Optionally, delete any data files generated in the engine folder.
  2. If you changed the script, please increment the versions of the script in /src/log_events.js, and add a comment of what the version changes. Also add similar documetation to /README.md in the Script Versions section.