Sorry if this is churlish. I ran the script today but it stopped saying:
Item CSA bravery badge: 20 turns of Standard Issue Bravery: 0.23809523809523808 efficiency
You need 1 more CSA bravery badge to continue.
Having seen what that does (+30 all stats) I think I probably could have done without it. Any chance this could be optional, or that the script could buy what it needs from the mall (they currently cost 100 meat)?

This is possibly something I could try to edit myself. Gosh, I really am quite lazy now that I think about it

Edit to add: I bought some badges from the mall, then re-ran and it finished perfectly. Thanks again for the script