Skip to content
Snippets Groups Projects

Slave Stat History Plotting

Merged CapeSnake requested to merge CapeSnake/fc-pregmod-snaked:expense_history into pregmod-master

I wanted to see more stats so I made a simple plot to show some numbers changing over 5 weeks. With 20+ slaves it gets difficult to tell if their devotion is actually going up.

I added a slaveHistory variable to Experimental and everywhere I thought it was relevant.

endWeek.js will store the last weeks data into the new slave.History at the start of the end.

  • calls historyChange.js
  • May need to add new variables to slave to story (lastWeekAssignment, lastWeekExpenses)
  • If these number change before we end the week, it will change the numbers for last week. I think these are minor enough to ignore. If we do anything with the lastWeekAssignment we'll need to write that in.

slaveHistoryGraph.js

  • uses a Canvas to plot instead of importing a new plotting module; D3, Plotly... Only problem is that it automatically scales the text. It’s readable on my mobile device at 16px.

Other Notes:

  1. With 5 weeks of income, we could consider changing the Underperforming Slaves to use a 5 week rolling average instead of just the previous week. Should probably track the reputation/dollar as well.
  2. What is the preferred way to get the default font style? I couldn't find the magic to apply the font correctly into the canvas text.

Merge request reports

Merged by PregmodderPregmodder 2 months ago (Jan 31, 2025 7:00am UTC)

Loading

Pipeline #93224 passed

Pipeline passed for 32ed892c on pregmod-master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading