How To See Other Games' Code (current info posted in OP and Post 146 on 6/18/19)

Look at the keyword on the *goto command. Then, ctrl + F that keyword.


E.g.

*goto_scene hobby improve
  1. Go to hobby.txt
  2. Ctrl + F *label improve
  3. Profit
3 Likes

If you absolutely have to dig around in an *.apk files, better treat the package as a standard archive which you can open with any file manager. It’s not encrypted in any way.

If not, a disclaimer would be prudent to point out that the app in question is a third party software you download from a website not associated with google. Messing with certificates is discouraged in the first place, so use it at your own risk.

1 Like

I have some questions regarding this? I know the thread is a bit old but the question pertains to exactly this.

So, when I try to go in on a folder from Steam… from SteamLibrary/steamapps/common/(game name file)… there is no resources folder. And there are no .asar files. The only folder appearing after the game name folder is /locales, which has a bunch of .pak files in it. I don’t know if this is because of something to do with my own system configuration, something about permissions or something in general on my end, or if it’s something to do with the Steam files currently. I’m using Windows 8.1 (weird, yes, but there it is) I basically want to view published files for a sense of how authors organize their work and see if I can glean some ideas from this.

I can open the .asar files in notepad, but they’re scrambled and illegible. I’ve got 7-zip, but nothing to target with it, and none of the extensions deal with .pak files.

Actually solved this issue- using 7-zip, it turns out that right clicking on the application file in the /(game name folder) and selecting ‘open archive’ presents a scenes folder, which you can go into and simply open any of the .txt files there into notepad. Simple, and already present in the most recent 7-zip download. Just the methods for doing this need this friendly update. : )

Edit: This doesn’t work for newer games, unfortunately. There are some other methods discussed that might help regarding asar files, but I’ve not taken the time to test them.

1 Like

How to on phone?¿
Nvm i git it
Nvm cant view all the choice ;(

How can i see the game script? I wanna see how the other choice affect the stat and what happen when u reach 100 bond?

i did that but can not view all of the code

Since Dragon Racer is already published, there’s no longer any dashingdon link you can use. But still, the best way to “see the code” is through PC by unpacking the game files.

Personally, I’d do it by “pak-ing” the game in my android with some APK software, move the .pak files to my PC, and unzip it to see the /mygame/scenes content.

2 Likes

What app are you using?

Backup & Restore.
Find the archived file manually using your phone’s file manager (in my Redmi 5, it’s Internal Storage > App_Backup_Restore > Archived). Then you can put it on your PC via cable data, or upload it to drive.

Even the app itself has built-in GDrive integration. nvm, I can’t connect it to my drive.

2 Likes

finally got it. any way to make this easier to view?

Open .txt instead of .json. Also, I recommend using notepad++ instead of built in editor. Way more functionality and also free.

2 Likes

That’s weird. On my end, the codes are indented properly.
Granted, I don’t extract the .apk, but browsed the files directly using my WinRAR. The UTF-8 encoding might get “messed up,” in your case.

How do you code dive in cog games? I did it one time and can’t remember how.

Yeah I’ve skimmed this thread and obviously there have been some changes over the years, so I guess could anyone post a quick, current how-to guide on viewing code on purchased CoGs/HGs?

Through the websore, right? Because if it’s another platform, I too would be very interested to hear it.

Yeah, exactly. I am 100 percent willing and able to buy some games on the webstore if it means I can learn and look at the code.

No problem-o! I’m taking screenshots as we speak.

I think I might also wiki the first post to include them for future reference. :thinking:

1 Like

I don’t have screenshots to visualize it, but I’ve attempted to explain how to do it in the webstore here:

Finishing a how-to with screenshots will help a lot more people and will probably be more easy to understand and follow, so please finish your guide for that, impeccably-stressed!

There’s also a way to extract the app.asar file of the more modern CoG/HG games bought on Steam (there’s a different, easier method for older games like Tin Star), but it needs a bit of set up and I’d need to find the original post where that was explained to attempt to describe it in more simple words. As not every game is released on Steam in the first place though, the webstore is the way easier method, especially if you can buy in the webstore directly and don’t have to go the purchase transfer route first.

1 Like

@Eric_Moser Here ya go!


First thing you have to do is choose the game whose code you want to see!

I’m using Community College Hero 2 because I love staring at Hedonist’s beautiful nose as I work.

Click on Play Online.

You should arrive at this screen:

If you want to look at a full game's code, make certain that you are logged into the account that you bought the game with. If you are logged in, you will be able to see the option to sign out on the right-hand corner of the screen.

Note: You don’t have to be logged in to see a game’s code, but you will be blocked from seeing scenes you haven’t paid for. I don’t know how, please don’t ask me why, I’m assuming it’s actual wizardry. Ask Gandalf.

Next. Highlight the jumble of text after the game's name (excluding the forward slash).

Delete that sucker.

In its place, write the following: scenes/startup.txt

Then, of course, hit enter on that bad boy.

You should now arrive at this screen:

People experienced in code-diving or even game writers will recognize this screen, but for the newbies, this is the file that lists the game scenes and its stats (and achievement, if it has any).

Those $ in front of those scenes means that they’re locked behind a paywall. If you’re not logged into an account where you’ve bought this game then you will only be able to follow the next steps with the demo scenes (i.e. the ones without the $ in front of them).

Here's how you look at a specific scene:

I like to just copy & paste from the file itself, like so.

Highlight the startup in the url.

And replace it with the name of the scene whose file you wish to see.

Again, I just copy & paste it, but you do you. If your fingers need the workout, go for it!

Press enter and you'll be rewarded with the sweet, sweet code, oh yeah baby–


And that’s how you look at a game’s code!

Edit: I’ll be adding this to the first post for posterity’s sake. Be sure to link the first post instead if anybody asks you how you do that nifty code-diving thing they’ve been hearing around the water cooler or whatever, :stuck_out_tongue_winking_eye:

30 Likes