Play Home Contribute GitHub Join Us Discourse Staff Members GitHub Contribution Guides Team

Dev env localhost: how to sandbox into God mode?


I’m not sure how it’s properly called… I just forked it and set my developer environment, and got it working with much ease. Awesome job there!

Now, there must be a simple way I could play as a “God Player” with all gems and levels opened. Isn’t there? I couldn’t find out how.

How do you achieve "God Mode"?
Can I cheat ? Or skip levels in some way?

Subscription, perhaps?


Not sure about simple but you could probably just modify the database record for your player

Make code editor larger?

You can pretend to buy a subscription or gems using Stripe’s test mode cards. I think they have a link to the instructions from the test mode label that shows up.


That worked great, thanks! :slight_smile:

Any other such simple solution for getting play levels and hero levels?


You could comment out this line to not lock any levels:

If the line numbers change, it’s this one:

  level.locked = not me.ownsLevel level.original


Commenting out

level.locked = not me.ownsLevel level.original

worked great!

Now just missing hero levels… :stuck_out_tongue_winking_eye:


You can get that by doing a test Stripe purchase of a subscription.


Hmm, sorry I’m sure I’ll feel even dumber after this, but how does a subscription help with that? I just did it, but can’t see any difference. Nor could I find a list of what subscriptions actually do, other than this:

Get access to new levels, heroes, items, and bonus gems with a CodeCombat subscription!

I meant my hero is at level 1 and I can’t equip any item until I keep playing to get XP or hack in DB.


Hmm, right. You could open up your local Mongo console and do something like this:

var me = db.users.findOne({slug: 'my-username-slug'});
me.points = 9001;;


Perfect, thanks!

To whoever might read this later, the mongo that comes with CodeCombat by default is under ~/coco/bin/mongo so, to complement your hints:

$ cd ~/coco/bin/mongo
$ ./mongo
> use coco
> var me = db.users.findOne({"email": ""})
> me.points = 23456


@nick, commenting out this line of code seems to be causing some uncaught type error


Also need to make sure that items aren’t locked, maybe by making ownsItem always return true.


I dont get it. How to get in the code