I’ve been a reader since 2019 and now I’ve taken this step to write my own story. Yesterday I started my own project and I am quite new to choicesript so I started writing with the help of tutorials from Youtube and Choicescript fandom. Right now I’m still trying to get the hang of coding and still in the dark about many things.
I am using CSIDE to write but the problem is that, To understand coding more thoroughly and to clear my doubts I want to read the code of an already published game. CSIDE lets you play while you code right? so I want to play that game while looking at the code of the author.
So is it possible for me to import an already published story into CSIDE and see the code?(Just for my own CS understanding and nothing unethical) And if it is possile then please guide me how do I do that? because I’ll choose a project that has similar genre as my story.
If you own any of the steam releases you can extract the scene files and open them in CSIDE. To do that you need to install node.js, run npm install -g asar in powershell. Then still in powershell run asar extract PathToGame\resources\app.asar PathToDestination.
For example: asar extract "D:\SteamLibrary\steamapps\common\Vampire The Masquerade — Parliament of Knives\resources\app.asar" "D:\Interactive Fiction\Scene Files\Vampire The Masquerade — Parliament of Knives\"
You can use whatever destination you want, but for the path to the game the easiest way to find it is right click on the game in steam, select properties, installed files, Browse. That should open file explorer to the game directory, at the top of that window is a path, right click select copy as text then paste that inside the first set of of " ". To the end add a \resources\app.asar. Also there should be one space between asar and extract, one space between extract and the target path and one space between the target path and destination path, besides that the only spaces should be from the path like in the example between Vampire and The, if you have extra spaces it will cause issue.
In CSIDE you just click folder labeled add new scenes in the top left, then select the scene files from the extracted archive, which should be located in a path like destinationtarget\deploy\scenes
To view the code of an already published ChoiceScript game, you’ll need access to the game’s source files, which are not typically available for commercial games. However, many authors share their code on platforms like GitHub or within ChoiceScript communities for learning purposes. You can search for open-source ChoiceScript projects online. Once you have the source files, you can import them into CSIDE by creating a new project and adding the script files. This will allow you to play and view the code simultaneously.
This is not true for ChoiceScript games if purchased - you can access the text files for games that you’ve bought (and GitHub isn’t typically used all that much by ChoiceScript writers).