Cawas
January 11, 2015, 7:59pm
1
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.
1 Like
Not sure about simple but you could probably just modify the database record for your player
nick
January 12, 2015, 4:35pm
4
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.
2 Likes
Cawas
January 12, 2015, 9:16pm
5
That worked great, thanks!
Any other such simple solution for getting play levels and hero levels?
nick
January 13, 2015, 5:49am
6
You could comment out this line to not lock any levels: https://github.com/codecombat/codecombat/blob/master/app/views/play/CampaignView.coffee#L142
If the line numbers change, it’s this one:
level.locked = not me.ownsLevel level.original
3 Likes
Cawas
January 13, 2015, 1:10pm
7
Commenting out
level.locked = not me.ownsLevel level.original
worked great!
Now just missing hero levels…
nick
January 13, 2015, 8:14pm
8
You can get that by doing a test Stripe purchase of a subscription.
Cawas
January 13, 2015, 8:50pm
9
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.
nick
January 13, 2015, 8:58pm
10
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;
db.users.save(me);
1 Like
Cawas
January 14, 2015, 1:58am
11
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": "caue.rego@gmail.com"})
> me.points = 23456
> db.users.save(me)
2 Likes
@nick , commenting out this line of code seems to be causing some uncaught type error
nick
January 31, 2015, 5:22pm
13
Also need to make sure that items aren’t locked, maybe by making ownsItem
always return true
.
1 Like
I dont get it. How to get in the code
1 Like
same I’ve been looking for an hour and I can’t figure it out
@Chaboi_3000 should be able to help you witht the dev setup.
Danny
3 Likes
@craftingdead261 what OS are you using?
2 Likes