Potential Functions
See show_goal_points and record_goal_points in the goal documentation.
Description
Ok, one of the sticking points of my new goal structure is how to award
points and how to print those points out.
Part of the problem is that there are ways to get points that do not have
associated goals (pop quiz tutor) and there are goal messages that we want
printed (in showscore at least) that have no associated points.
The other part of the problem is that our current system requires that we
change "stable" code in order to add scoring opportunities for players that
are not already in the game. Every new point opportunity requires a couple
lines of code in player:showscore, and player:gui_status, and a whole new
.history.goal entry. If I remember correctly, there is also a replay_history
function or something that must be changed for the true snoops of the group
who want to know everything players do.
The two options are to leave everything as it is or to change it somehow. I
personally feel that option 1 is out of the question.
Option 2 has 3 suboptions.. We can either 1) keep the current system and add
something on the top of it, 2) change the current system to adhere to the new
system, but leave the old system intact, or 3) change the old system into the
new system (by going through everyone's history entries)
Here is my present course of action. I would like to go with suboption 2.
There will now be a standard .history.goal entry that looks as follows.
{date, goal object number, integer, goal_information...}
The date is for compatibility (it was a good idea to begin with), goal object
number is the goal object that knows what to do with the list, the integer stores the number of
points for this entry, and the goal information is a variable amount of entries (from 1 to n) describing the goal
to the show_goal_points function of the goal object who prints it out.
In order to create these new goal entries, simply make the following function call from your goal object's record_goal_points function.
$g.game_player:update_history(explorer, "module", points, {goal_information})
Present goal structre (and its replacement):
{date, "goal", goal object number, 0}
Unachieved primary ID goal, when the goal was assigned
into:
{date, goal object number, 0, "goal assigned"}
{date, "goal", goal object number, 100}
Achieved primary ID goal
Will be removed to be replaced with the syntax below. (used to be the "correct" entry, below)
{date, "guess", sample object number, museum sample number, 0}
Incorrect guess (could be either primary or secondary ID goal)
to
{date, guess goal object number, 0, "incorrect guess", sample object number,
museum sample number}
A new module was created under $g.goals called Secondary Rock/Mineral ID Scoring Module.
It will never be assigned as a goal, but will control scoring of secondary goals.
{date, "guess", sample object number, museum sample number, 25}
Achieved secondary ID goal
into:
{date, guess goal object number, 25, "correct", sample object number, museum sample number}
{date, "correct", sample object number, museum sample number, 0}
When primary ID goal was achieved and with what
into:
{date, goal object number, 100, "goal achieved", sample object number, museum sample number}
The big problem here is the reverse lookup of the "goal" object from before. (Solved in $g.id_goals:record_goal_points)
{date, "pop quiz", goal object number, location, 0}
Incorrectly answered pop quiz tutor
into:
{date, pop quiz goal object number, 0, "incorrect", "question", "answer", goal object number, location}
As with the guess secondary goal, there will be a pop quiz tutor secondary
goal created and used solely for scoring purposes. (And perhaps an
implementation of complete_goal as well)
{date, "pop quiz", goal object number, location, 10}
Correctly answered pop quiz tutor
into:
{date, pop quiz goal object number, 10, "correct answer", "question", "answer", goal object number, location}
{date, "guessrightagain", sample object number, museum sample number, 0}
Correctly answered secondary goal again, no points scored.
into:
{date, guess goal object number, 0, "correct again", sample object number, museum sample number}
{date, "guessrightagain", sample object number, museum sample number, 25}
I have no idea why this entry even exists, you shouldn't get points from guessing right again. (May be a
anomaly in oborcher's history (of which there are quite a few...))
{date, "guesscontact", list of contacts in room, contact guessed, 0}
Correctly (or incorrectly) idenitfied IM contact
Guessing contacts is no longer a part of the interpretive module
{date, "endgame", location, exit in location, integer}
Completed a portion of the endgame, receiving integer points
into:
{date, endgame goal object number, points, "completed stage", location}
The endgame can be an assignable module. It hasn't been created yet.
|