What's new
Choice of Mods

Join our amazing community to find Choicescript games and modifications to improve your gameplay!

How to code dive any Choice Script game

Medivh

Member
Member
Hello! I was trying to find a way to transform the html files back to scene files when I came upon a very interedting post in the CoG forum.
It turns out that you can get the code for any choicescript game if you paste this code into the developer console:

allScenes['startup'].lines.join('\n');

The startup part can be replaced by the scene of your choice, if you are on mobile you can use kiwi browser (the one in github, not google play) to access it. If it is an itch.io game it too can be done, simply open a developer console, select this icon: 1000012212.jpg
And then select the IF inside itch.io, if you are on mobile you might need to use desktop mode due to the default fullscreen on mobile. Now you can go back to the developer console and the command should work.

Of course now you have a bunch of unformated gibberish, what to do? You can use the replace tool on google docs and replace \n with a line spacing and the \t with normal spaces (I had to copy and paste the line spacing into the input field as enter refused to appear in my phone instead of the checkmark). But it can actually be easier than that.

You must just click copy string contents and then paste it in a document, and that's it, to do so you must hold click in your phone in the text or presumably right click on desktop.
Hope this helps you!
Signing out.
Medivh.
 

Medivh

Member
Member
I will post a drive with the PoMA code once I am done with it as proof/trophy/bragging right/sign of goodwil
 

nevaeh

New member
Member
I can't seem to succeed on doing it on itch.io lol. Do you think you could also share the code for Sherlock Holmes : Affairs of the heart, if you have time of course?
 

Medivh

Member
Member
Edit: If you want to do the manual method in which you do the formatting yourself, some seem to use different formats PoMA seems to need you to replace "," with line spaces and \ with nothing. I don't know why I did it in retrospective, since I already had the code.
 

Medivh

Member
Member
I can't seem to succeed on doing it on itch.io lol. Do you think you could also share the code for Sherlock Holmes : Affairs of the heart, if you have time of course?
Sure, although it did work for me, are you using the method I recommended for itch.io? Remember, go to your console, press the icon, then press on the IF itself (in the itch.io page). Now it should work. I will upload it anyways to a drive.
 

Medivh

Member
Member
I can't seem to succeed on doing it on itch.io lol. Do you think you could also share the code for Sherlock Holmes : Affairs of the heart, if you have time of course?
Sherlock Holmes
Done! Hope you enjoy, by the way, maybe I wasn't clear in my above post, but it s easier if you delete the startup'] part and leave only the rest including [' then copy that and start typing after the ' it should give you the option to autocomplete and everything should be fine.
 

Capella_Auriga

Active member
Member
Another suggestion for turning the one hell of a JSON string into something readable is by using a JSON parser. There is a bunch on Google so you can search it up. By the way, thanks for teaching me another way on how to code dive 🥰 Appreciate it!
 
Top