What's new
Choice of Mods

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

How do I make games an html file

Liu_Kang

Member
Member
Welcome
Is there an explanation of how to compile games into an html file
It would be great to download WIP games and convert them to html file and play them offline
I hope someone has a way to do this
 

hilise

Well-known member
Member
Welcome
Is there an explanation of how to compile games into an html file
It would be great to download WIP games and convert them to html file and play them offline
I hope someone has a way to do this
(If you are on a pc/computer)
1. Download choicescript ide
2. Go to the WiP and in the url link add /scenes (at the end of the link)
3. You can download each scene file as .txt files
4. Open the choicescript ide and export all of them there
5. You can import the game through choicescript ide which automatically will compile it as an html file
 

Liu_Kang

Member
Member
(If you are on a pc/computer)
1. Download choicescript ide
2. Go to the WiP and in the url link add /scenes (at the end of the link)
3. You can download each scene file as .txt files
4. Open the choicescript ide and export all of them there
5. You can import the game through choicescript ide which automatically will compile it as an html file
Does it work in moody or only in dashingdon?
 

Liu_Kang

Member
Member
(If you are on a pc/computer)
1. Download choicescript ide
2. Go to the WiP and in the url link add /scenes (at the end of the link)
3. You can download each scene file as .txt files
4. Open the choicescript ide and export all of them there
5. You can import the game through choicescript ide which automatically will compile it as an html file
I tried it, I downloaded the scenes files and added them to the program, then I chose Compiled game
Indeed, the game has become compiled into an html file, but it has problems and the problem appears at the beginning of the game once the html file is opened
I can access the stats menu and access the achievements menu and it does work but the story does not exist
Tried it on two games and same problem
For example this error from Fallen Hero, Retribution
startup line 3230: Non-existent variable 'choice_is_omnibus_app'
Is there a mistake in the way I follow to convert or does it not work on all games
I apologize for the many questions and if I bothered you
 

hilise

Well-known member
Member
I tried it, I downloaded the scenes files and added them to the program, then I chose Compiled game
Indeed, the game has become compiled into an html file, but it has problems and the problem appears at the beginning of the game once the html file is opened
I can access the stats menu and access the achievements menu and it does work but the story does not exist
Tried it on two games and same problem
For example this error from Fallen Hero, Retribution
startup line 3230: Non-existent variable 'choice_is_omnibus_app'
Is there a mistake in the way I follow to convert or does it not work on all games
I apologize for the many questions and if I bothered you
it's possible that the variable is not declared in the startup.txt file
 

aquiliboo

New member
Member
Is there a way to fix this statement 'Non-existent command 'sm_init' when creating html file using compile games?
I figured out that it has something to do with the save system in the game, but I have no idea how to go about fixing the problem it is preventing the html from running. Would really appreciate the help 😟
 

birdbee

Member
Member
quick guide: https://choiceofmods.com/threads/wips-full-games-and-side-stories-not-public-ver.3/post-2169

you need to delete “sm_init” in startup.txt before you compile the game.
for quick trouble shooter about compile problem, run run-compile.bat and it's will show the problem
for example,
Error: ENOENT: no such file or directory, open 'web/mygame/pic.png'
it's mean there is no picture file so the compiler can't compile all file to html, makes compile error.
easy fix is to add *comment in front of *image pic.png in all .txt scenes to make picture not showing up
like this
*comment *image pic.png
you also can use *comment with every problematic code in .txt
easy way to replace this is to use batch text replace in something like Notepad or VScode. (ctrl+f)

How to add Save system to html:
use this before compile https://github.com/ChoicescriptIDE/ChoiceScriptSavePlugin
read Installation in github
 
Last edited:
Top