설명 없음

Stephan Fuchs 24564b7821 Merge branch 'Edited-TW' into Readme 11 달 전
isample_mod 401e873e5b allow update also the mod data 3 년 전
locations 5e7979181d Merge branch 'Edited-QSP9' into Edited-TW 1 년 전
mods 36ba763444 Example Mod 1 년 전
readme 3322a633bd add `NewLocation` to `Readme` 11 달 전
sugarcube 47d48b1cd9 test `twee3-language-tools`-fix of version 25.3 11 달 전
.gitignore c10798be51 sort unsorted files 1 년 전
beverage_convert.py f4fcd6c807 Random Images Fix in Beverages 1 년 전
glife.code-workspace b37a5ad722 refactor `sleep` 1 년 전
glife.qproj c8d86613e9 [changed] removal of old booty_call files from the proj file - keeping the files themselves on the git for posterity and backup 1 년 전
npcs_convert.py c81bc6a651 NPC Names Fixed 1 년 전
outfits_convert.py 7d31de05a5 Market Clothes 1 년 전
qrsc_to_tw.py 1d3bd84893 Merge branch 'Edited-QSP9' into SchoolOverhaul 1 년 전
readme.html 3322a633bd add `NewLocation` to `Readme` 11 달 전
sortFiles.py 7539d53f51 add `sortFiles.py` 1 년 전
sugarcube_compile.bat 0683238a6b Adding Adult Tag 1 년 전
sugarcube_postCompile.py 0683238a6b Adding Adult Tag 1 년 전
tw_update.py 2cac2f4b57 Getting rid of getvar where it isn't needed 1 년 전
variables.py f4a61e881e Restored Fame Var 1 년 전

readme.html
























Browser lacks capabilities required to play.

Upgrade or switch to another browser.


Loading…


[[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 begin 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.age>>.
<!-- 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>Common objectives</h3>
[[Add a new location|NewLocation]] - Could be a room, street or anything else one could physically be located at.

<h3>References</h3>
[[File Types|FileTypes]] - What which file extension tells you.
[[Playercharacter]] - How to use $pc.[[Top|Start]]
<h2>New Location</h2>
<h3>What is a location?</h3>
A location is a physical location a person could be at. This could be a room, a hallway or a park.
A location persists over time. Therefore, events, such as a birthday party, are not a location.

<h3>1. Create a new file (optional)</h3>
This step is optional. You can add your location to an exisintg file, if there is a reasonable connection with the existing ones.
The file needs to have the extension tw and can be located anywhere in the src-folder.

<h3>2. Create a new passage</h3>
Every passage starts with :: followed by a single space and then a name (without whitespaces).
<pre><nowiki>Example: :: yourPassageName</nowiki></pre>
The name you choose needs to be unique in the whole project. Don't worry: the compiler will inform you if it isn't.

<h3>3. Add Tags</h3>
You add tags after the name of your passage in []-brackets.
<pre><nowiki>Example: :: yourPassageName[tag1 tag2 tag3]</nowiki></pre>
Every location-passage needs to declare at least two tags: private or public and indoors or outdoors.
Here is a list of common tags:
<table>
<tr>
<th>Tag</th>
<th>Effect</th>
</tr>
<tr>
<td>private</td>
<td>This is a private location where only a small selection of people has access, such as a private home. Used by events and other tags.</td>
</tr>
<tr>
<td>public</td>
<td>This is a public place where, in theory, anybody could show up, such as public streets and parks and shops. Many random events can only happen at public places.</td>
</tr>
<tr>
<td>indoors</td>
<td>You are not affected by weather.</td>
</tr>
<tr>
<td>outdoors</td>
<td>You are affected by weather (temperature and rain).</td>
</tr>
<tr>
<td>bathroom</td>
<td>Add actions, such as using the toilet, brushing your hair and apllying make-up. More options (such as shaving) are available if the tag private is included as well.</td>
</tr>
<tr>
<td>car</td>
<td>Enables the player to park and retrieve a car.</td>
</tr>
<tr>
<td>street</td>
<td>Enable events which can only happen on the street.</td>
</tr>
<tr>
<td>tv_medium</td>
<td>Adds an action to use a medium-quality TV.</td>
</tr>

</table>
<pre><nowiki>Example: :: southStreet[public outdoors street car]</nowiki></pre>

<h3>4. Add Connections</h3>
Where can you go from your new location?
For every other location one can reach, add a ConnectedLocation-command to your passage.
<pre><nowiki>Example:
<<ConnectedLocation 'Label' 'Passage' 'PassageArgument' 'Image' Duration `AdditionalSettings`>></nowiki></pre>
Label is the text you want to display to the player.
Passage is the name of the passage where you want the player to send.
PassageArgument is an argument you want the destination passage to receive. Use an empty string if you are unsure what to use here.
Image is the path of the preview-image for the destination passage.
Duration is a duration in minutes which you need to walk to reach your destination.
AdditionalSettings is an optional object which can be used to further customize the behavior. The most common one is indecencyBlocked, which prevents the player from using the connection if he is naked, covered in cum, etc.

<pre><nowiki>Example:
<<ConnectedLocation 'Leave' 'city_center' '' 'locations/city/citycenter/down.jpg' 5 `{indecencyBlocked:true}`>></nowiki></pre>

Of course you also need to add connections to your new location to other passages, so it can be reached from there.

<h3>5. Add a headline</h3>
The headline is displayed to the players as the title/name of your location. Use h2-tags to do so.
<pre><nowiki>Example:
<h2>South Street</h2></nowiki></pre>

<h3>6. Add an image</h3>
Add an image using the image-command.
<pre><nowiki>Example:
<<image 'locations/city/citycenter/down.jpg'>></nowiki></pre>

You can change between two images depending on the day-night-cycle. In this case, use imageDayNight-command.
<pre><nowiki>Example:
<<imageDayNight "#" "locations/city/citycenter/down.jpg" "locations/city/citycenter/down_night.jpg">></nowiki></pre>
The second argument replaces every # in the first argument if it is day. The third argument does the same in case it is night.

In case you want to change between images depending on the time of the year, you need to use the $time-object.
<pre><nowiki>Example:
<<if $time.isWinter>>
<<image "locations/pavlovsk/school/building/schoolwinter.jpg">>
<<else>>
<<image "locations/pavlovsk/school/building/gschool.jpg">>
<</if>>
</nowiki></pre>
Of course you can combine this with the imageDayNight-command.

<h3>7. Add a description</h3>
Describe your location in any number of words. Use the p-tag to separate between paragraphes.
<pre><nowiki>Example:
<p>Describtion part 1</p>
<p>Describtion part 2</p>
</nowiki></pre>

<h3>Complete Example</h3>

<pre><nowiki>
:: southStreet[public outdoors street car]
<<ConnectedLocation 'City Center' 'city_center' '' 'locations/city/citycenter/down.jpg' 10>>
<h2>South Street</h2>
<<if $time.isWinter>>
<<image "locations/city/southStreet/streetWinter.jpg">>
<<else>>
<<image "locations/city/southStreet/street.jpg">>
<</if>>
<p>Just another street.</p>
<<if $time.isWinter>>
<p>It's covered in snow.</p>
<</if>>
</nowiki></pre>

<h3>Further Customization</h3>
Depending on your goals, you might to continue reading here:
<ul>
<li>[[Add actions to passages|NewAction]]</li>
<li>[[Add events to locations|NewEvent]]</li>
</ul>[[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>.