Browser lacks capabilities required to play.
Upgrade or switch to another browser.
[[Top|Start]]
<h2>File Types</h2>
<h3>CSS</h3>
CSS-files are responsible for the appearance of next to everything.
It is usually not required to touch these files unless you know what you're doing.
<h3>JS</h3>
Javascript-files contain the core systems which everything else depends on.
They usually use more advanced programming concepts than twine-files.
<h3>TW</h3>
Twine-files contain the story, quests, menus, events, and almost everything else that is presented to users in text-form.
They also include some UI-elements.
They should be easily structured to make understanding and changing them easy.
<h3>PY</h3>
The python-files use black magic to convert qsrc-files to tw-files. Unless you're a programming wizard, you should not touch them.
<h3>QRSC</h3>
The <i>old</i> format of Girl Life, which is still under active development.
We merge the changes from the QSP-repository (maintained by Kevin Smarts) into our Edited-QSP-branch, run python over it and then merge the changes of the tw-files into our main branch.
<h3>JPG, PNG, GIF, etc.</h3>
The repository does not contain media-files. They are included in media-packages, which won't be covered here.
<h3>Everything else</h3>
Everything else might either be vital or deprecated or useless to beging with. You should better not touch it unless you know exactly what you're doing.[[Top|Start]]
<h2>Playercharacter</h2>
<h3>General</h3>
The Playercharacter-object is accessed by using the var $pc.
You usually want to get and set fields of this class.
<b>Example:</b>
<pre><nowiki>
Your name is <<=$pc.name_first>>.
<!-- This will print "Your name is Svetlana." -->
</nowiki></pre>
<pre><nowiki>
<<set $pc.name_first = 'Anna'>>
Your name is <<=$pc.name_first>>.
<!-- This will print "Your name is Anna." -->
</nowiki></pre>
<pre><nowiki>
<<set $pc.age += 1>>
Your age is <<=$pc.name_first>>.
<!-- This will increase your age by reducing your birthyear by one
and then print "Your age is 18" -->
</nowiki></pre>
You don't need to worry about boundaries when setting values. Everything happens behind the curtain.
<b>Example:</b>
<pre><nowiki>
<<if $pc.pcs_willpwr > 10>>
<<set $pc.pcs_willpwr -= 10>>
<<else>>
<<set $pc.pcs_willpwr = 0>>
<</if>>
<!-- This has the exact same effect as -->
<<set $pc.pcs_willpwr -= 10>>
</nowiki></pre>
Some fields can only be read and must not be written. They are marked with r-o below.
<h3>Fields</h3>
<table>
<tr><td colspan="4"><h4>Name</h4></td></tr>
<tr><td><b>name_first</b></td><td>string</td><td>The first name of the character.</td><td>"Svetlana"</td></tr>
<tr><td><b>name_last</b></td><td>string</td><td>The last name of the character.</td><td>"Lebedev"</td></tr>
<tr><td><b>name_nick</b></td><td>string</td><td>The nickname of the character.</td><td>"Sveta"</td></tr>
<tr><td colspan="4"><h4>Age</h4></td></tr>
<tr><td><b>birthday</b></td><td>number</td><td>The day of the month the character was born.</td><td>1</td></tr>
<tr><td><b>birthmonth</b></td><td>number</td><td>The month the character was born (1-12).</td><td>4</td></tr>
<tr><td><b>birthyear</b></td><td>number</td><td>The 4-digit year the character was born.</td><td>1999</td></tr>
<tr><td><b>birthdayDate</b></td><td>Date (r-o)</td><td>A Date-object containing the above information.</td><td></td></tr>
<tr><td><b>age</b></td><td>number</td><td>The current age of the character in years. Will change birthyear if set.</td><td>17</td></tr>
</table><h2>Overview</h2>
<h3>Preparations</h3>
[[Setup]] - Required software and how to set it up.
[[Download]] - How to get the source code to your machine.
[[Compile]] - How to compile the source code.
<h3>References</h3>
[[File Types|FileTypes]] - What which file extension tells you.
[[Playercharacter]] - How to use $pc.[[Top|Start]]
<h2>Compiling</h2>
The code is compiled by running <i>"sugarcube_compile.bat"</i>.
If you're using VSCode, you might want to create a tasks.json (glife/.vscode/tasks.json):
<pre>
{
"version": "2.0.0",
"tasks": [
{
"label": "MakeHTML",
"type": "shell",
"command": "./sugarcube_compile.bat",
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true
},
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": []
}
]
}
</pre>
This allows you to compile by hitting CTRL+B.[[Top|Start]]
<h2>Download</h2>
<h3>Step 1: Create an account</h3>
Create an account at https://git.tfgames.site
<h3>Step 2: Fork</h3>
Navigate to https://git.tfgames.site/StephanFuchs/glife
Click on the button "Fork"
In the following dialog, you can change the name of your repository to whatever you like.
<h3>Step 3: Clone</h3>
Please refer to the official documentation for how you clone an existing repository to your machine: https://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository[[Top|Start]]
<h2>Setup</h2>
The following explanation assume that you're using Windows.
They might also apply to other systems.
<h3>Git</h3>
You need to install a current version of git.
You can download it from here: <a href="https://git-scm.com/download/win">Git Homepage</a>.
<h3>Python</h3>
You need the latest version of Python 3 (minimum 3.10).
You can download it from here: <a href="https://www.python.org/downloads/">Python Homepage</a>.
<b>Important: </b> You need to add Python to PATH. If you're using an official installer, an option to do so is presented to you after the installation is done.
<h3>TweeGo</h3>
TweeGo is packaged with the other files of this project.
There is no need to install it seperately.
In case you'd like to update TweeGo, you can find it in the folder <i>"sugarcube/devTools/tweeGo"</i>.
<h3>Optional: VSCode</h3>
It is recommended that you use VSCode as your development IDE.
If you do so, you might want to use the extension <i>Twee 3 Language Tools</i>.