Commit e75b076c authored by cobaltcore's avatar cobaltcore
Browse files

Switch to poetry for package management

parent 75f7c845
......@@ -20,24 +20,26 @@ It is very ==important== to highlight stuff once in a while.
**I am bold** *while I am Italic* and I am neither!
!!! example
```python hl_lines="5 6" tab="test 1"
import requests
=== "Test 1"
```python hl_lines="5 6"
import requests
print("Hello World!")
print("Hello World!")
def test():
pass
def test():
pass
print("After method definition")
```
print("After method definition")
```
```python hl_lines="5 6" tab="test 2"
import requests
=== "Test 2"
```python hl_lines="5 6"
import requests
print("Goodybe World!")
print("Goodybe World!")
def test():
pass
def test():
pass
print("After method definition")
```
print("After method definition")
```
......@@ -6,20 +6,22 @@ The default transitions do not allow one to easily change their respective durat
Student Transfer extends these transitions such that they can be given a user-defined delay like so:
```tab="Syntax"
hide <target_character:character> with st_<transition_name>(<delay:float>)
```
=== "Syntax"
```
hide <target_character:character> with st_<transition_name>(<delay:float>)
```
```python tab="Example"
show john a_0 at center
=== "Example"
```python
show john a_0 at center
"I'm really just stalling here."
"I'm really just stalling here."
# Will play the 'easeoutright' transition over 3.5 seconds
hide john with st_easeoutright(3.5)
```
# Will play the 'easeoutright' transition over 3.5 seconds
hide john with st_easeoutright(3.5)
```
The delay-capable version of the respective original transition can be accessed by adding the prefix `st_` to the original name, i.e. `easeouttop` becomes `st_easeouttop`.
The delay-capable version of the respective original transition can be accessed by adding the prefix `st_` to the original name, i.e. `easeouttop` becomes `st_easeouttop`.
==Note that the Student Transfer versions of these commands **must** be called with parenthesis, otherwise they will crash the game. Do not do this: `st_easeouttop`. Always do this: `st_easeouttop(0.5)`==
These transitions are available:
......@@ -35,7 +37,7 @@ These transitions are available:
* `st_easeouttop`
## Showing the same image multiple times
Sometimes it might become necessary to show the same image on the screen multiple times, be it for characters, backgrounds, CG's or other image assets. This can be achieved via a construct inherent to Ren'Py itself: `as`.
Sometimes it might become necessary to show the same image on the screen multiple times, be it for characters, backgrounds, CG's or other image assets. This can be achieved via a construct inherent to Ren'Py itself: `as`.
This keyword can be used in conjunction with `show` statements to rename an existing sprite to something different. Due to the way Ren'Py works, an image with a specific name can only be on-screen once during a specific timeframe. If that name is changed to something that is not used however, it is possible to show it multiple times. Let's see how this works with the help of a simple example:
```python
# Show the original image at the center of the screen
......@@ -73,7 +75,7 @@ john "Hey!"
Do note that the new name you give the image has no bearing on the characters who speak the dialogue, so you will not be able to say `john2 "Hey yourself!"` as that will produce an error.
## Skip Proofing your Animations
Something that you might run into while doing more complex animations is that skipping or quickly clicking through the script will lead to your characters ending up at the wrong positions, half-transparent, weirdly rotated or warped into the hideous form of an eldritch horror from another dimension. These things are all results of a lack of skip proofing.
Something that you might run into while doing more complex animations is that skipping or quickly clicking through the script will lead to your characters ending up at the wrong positions, half-transparent, weirdly rotated or warped into the hideous form of an eldritch horror from another dimension. These things are all results of a lack of skip proofing.
Ren'Py tries its best to predict where sprites will end up, but if the player "cancels" an animation by clicking past it before it has finished (or even worse, skips past it at ludicrous speeds), sometimes the animation just stops in the middle of whatever it was doing. Take for example this small snippet:
```python
show john a_0 at center:
......
......@@ -26,250 +26,306 @@ If a value can contain multiple values, it is enclosed by `&&`, e.g. `&<value_a>
## `timedchoice`
```tab="Syntax"
timedchoice <timeout:float> <fail_label:label>
```
=== "Syntax"
```
timedchoice <timeout:float> <fail_label:label>
```
```python tab="Example"
timedchoice 5.0 day2
=== "Example"
```python
timedchoice 5.0 day2
menu:
"Which letter of the alphabet is better?"
menu:
"Which letter of the alphabet is better?"
"A":
"Nice!"
"A":
"Nice!"
"B":
"Not so nice."
"B":
"Not so nice."
"Continuation of the main script."
"Continuation of the main script."
label day2:
"You failed that choice pretty badly!"
```
label day2:
"You failed that choice pretty badly!"
```
## `gameover`
```tab="Syntax"
gameover <title:string>
```
```python tab="Example"
gameover "This is the end, my friend."
```
=== "Syntax"
```
gameover <title:string>
```
=== "Example"
```python
gameover "This is the end, my friend."
```
## `text`
```tab="Syntax"
# To start a text message conversation
text start <from_character:character>
# To set the title of a text message conversation
text title <title:string>
=== "Syntax"
```
# To start a text message conversation
text start <from_character:character>
# To set the title of a text message conversation
text title <title:string>
# To end a text message conversation
text end
```
# To end a text message conversation
text end
```
```python tab="Example"
text start john
text title "Connie"
=== "Example"
```python
text start john
text title "Connie"
msg john "Connie, we need to break up."
msg john "Connie, we need to break up."
think "That should do it. Short and to the point."
think "That should do it. Short and to the point."
show john a_0
john "And it's sent."
show john a_0
john "And it's sent."
text end
```
text end
```
## `msg`
```tab="Syntax"
msg <from_character:character> <message:string>
```
```python tab="Example"
msg john "Connie, we need to break up."
```
=== "Syntax"
```
msg <from_character:character> <message:string>
```
=== "Example"
```python
msg john "Connie, we need to break up."
```
## `title`
```tab="Syntax"
title <header:string> [<subtitle:string>]
```
```python tab="Example"
title "Day 1"
=== "Syntax"
```
title <header:string> [<subtitle:string>]
```
title "Day 1" "It's a wonderful world"
```
=== "Example"
```python
title "Day 1"
title "Day 1" "It's a wonderful world"
```
## `outfit`
```tab="Syntax"
outfit <target_character:character> <target_outfit:outfit>
```
```python tab="Example"
outfit john uniform
```
=== "Syntax"
```
outfit <target_character:character> <target_outfit:outfit>
```
=== "Example"
```
outfit john uniform
```
## `accessory`
```tab="Syntax"
accessory <target_character:character> (<clear,add,remove,set>) &<accessory_name:accessory>&
```
```python tab="Example"
# To clear all accessories
# This command does not support listing accessories in it
# since it clears them anyway
accessory sandra clear
=== "Syntax"
```
accessory <target_character:character> (<clear,add,remove,set>) &<accessory_name:accessory>&
```
# To add a new accessory
accessory sandra add glasses
=== "Example"
```
# To clear all accessories
# This command does not support listing accessories in it
# since it clears them anyway
accessory sandra clear
# To remove an accessory
accessory sandra remove glasses
# To add a new accessory
accessory sandra add glasses
# To replace all current accessories
accessory sandra set bedhead, glasses
```
# To remove an accessory
accessory sandra remove glasses
# To replace all current accessories
accessory sandra set bedhead, glasses
```
## `body`
```tab="Syntax"
body <from_character:character> <to_character:character> [<target_outfit:outfit>]
```
```python tab="Example"
# To set the body with the default outfit
body john katrina
=== "Syntax"
```
body <from_character:character> <to_character:character> [<target_outfit:outfit>]
```
=== "Example"
```
# To set the body with the default outfit
body john katrina
# To set the body with a custom outfit
body john katrina uniform
```
# To set the body with a custom outfit
body john katrina uniform
```
## `swap`
```tab="Syntax"
swap [(<float,zap>)] <character_from:character> <start_expr:expression> : <end_expr:expression>, <character_to:character> <start_expr:expression> : <end_expr:expression>
```
```python tab="Example"
# To swap with the default effect
swap john a_0 : a_3, katrina a_0 : a_8
=== "Syntax"
```
swap [(<float,zap>)] <character_from:character> <start_expr:expression> : <end_expr:expression>, <character_to:character> <start_expr:expression> : <end_expr:expression>
```
=== "Example"
```
# To swap with the default effect
swap john a_0 : a_3, katrina a_0 : a_8
# To swap with an alternative effect
swap zap john a_0 : a_3, katrina a_0 : a_8
```
# To swap with an alternative effect
swap zap john a_0 : a_3, katrina a_0 : a_8
```
## `clone`
```tab="Syntax"
clone <from_character:character> <to_character:character>
```
```python tab="Example"
clone john katrina
```
=== "Syntax"
```
clone <from_character:character> <to_character:character>
```
=== "Example"
```
clone john katrina
```
## `morph`
```tab="Syntax"
morph begin (<magic,alien>) <from_character:character> <to_character:character> <target_outfit:outfit> <target_expression:expression>
morph do <target_character:character>
morph end <target_character:character>
morph finish <target_character:character>
```
```python tab="Example"
# To show the full morph animation
morph begin alien rachel yui uniform b_2
=== "Syntax"
```
morph begin (<magic,alien>) <from_character:character> <to_character:character> <target_outfit:outfit> <target_expression:expression>
morph do <target_character:character>
morph end <target_character:character>
morph finish <target_character:character>
```
=== "Example"
```python
# To show the full morph animation
morph begin alien rachel yui uniform b_2
rachel "What is happening to me?!"
rachel "What is happening to me?!"
morph do rachel
morph do rachel
"Finally, the transformation ground to a halt."
"Finally, the transformation ground to a halt."
morph end rachel
morph end rachel
# To quickly finish the morph
morph begin alien rachel yui uniform b_2
# To quickly finish the morph
morph begin alien rachel yui uniform b_2
rachel "What the hell?!"
rachel "What the hell?!"
morph finish rachel
```
morph finish rachel
```
## `exspirit`
```tab="Syntax"
exspirit <target_character:character> <target_expression:expression>
```
```python tab="Example"
exspirit john a_0
```
=== "Syntax"
```
exspirit <target_character:character> <target_expression:expression>
```
=== "Example"
```
exspirit john a_0
```
## `possess`
```tab="Syntax"
possess <from_character:character> <to_character:character> <target_expression:expression>
```
```python tab="Example"
possess john mina a_3
```
=== "Syntax"
```
possess <from_character:character> <to_character:character> <target_expression:expression>
```
=== "Example"
```
possess john mina a_3
```
## `scry`
```tab="Syntax"
scry (<into,outof>) <target_character:character>
```
```python tab="Example"
scry into john
"Everything went black as I was pulled out of my body."
scene black
show yui a_0 at center
scry outof yui
```
=== "Syntax"
```
scry (<into,outof>) <target_character:character>
```
=== "Example"
```python
scry into john
"Everything went black as I was pulled out of my body."
scene black
show yui a_0 at center
scry outof yui
```
## `placeholder`
```tab="Syntax"
placeholder
```
```python tab="Example"
"And thus the path ended abruptly."
=== "Syntax"
```
placeholder
```
=== "Example"
```python
"And thus the path ended abruptly."
placeholder
```
placeholder
```
## `routename`
```tab="Syntax"
routename <title:string>
```
```python tab="Example"
routename "Hello, World!"
```
=== "Syntax"
```
routename <title:string>
```
=== "Example"
```python
routename "Hello, World!"
```
## `resetstate`
```tab="Syntax"
resetstate
```
```python tab="Example"
resetstate
```
=== "Syntax"
```
resetstate
```
=== "Example"
```
resetstate
```
## `phone_call`
```tab="Syntax"
phone_call <from_character:character> @ <location:background> : <to_character:character> @ <location:background>
```
```python tab="Example"
phone_call john @ bg main room day shut : katrina @ bg school entrance day
```
=== "Syntax"
```
phone_call <from_character:character> @ <location:background> : <to_character:character> @ <location:background>
```
=== "Example"
```
phone_call john @ bg main room day shut : katrina @ bg school entrance day
```
## `FIXME`
```tab="Syntax"
FIXME <message:string>
```
```python tab="Example"
FIXME "This is broken as fuck."
```
=== "Syntax"
```
FIXME <message:string>
```
=== "Example"
```python
FIXME "This is broken as fuck."
```
......@@ -3,16 +3,18 @@
## Making Silhouettes
It is possible to turn any valid image that already exists into a silhouette via the `create_silhouette` method, which looks like this:
```python tab="Syntax"
create_silhouette("<name of image>", r=0, g=0, b=0, a=1)
```
=== "Syntax"
```python
create_silhouette("<name of image>", r=0, g=0, b=0, a=1)
```
```python tab="Example"
# Create a black silhouette (default)
image john_silhouette = create_silhouette("john a_0")
=== "Example"
```python
# Create a black silhouette (default)
image john_silhouette = create_silhouette("john a_0")
# Create a white silhouette
image john_silhouette = create_silhouette("john a_0", 1, 1, 1)
```
# Create a white silhouette
image john_silhouette = create_silhouette("john a_0", 1, 1, 1)
```
In addition to specifying the image to turn into a silhouette you can also optionally add four number values which are one part of an RGBA color (Red, Green, Blue, Alpha/Opacity) each. The method will use this color to fill the silhouette. The values range from 0 (black) to 1 (white).
......@@ -56,119 +56,121 @@ The pose grouping is followed by a second layer of folders (which you can also s
???+ info
To make this a bit easier to understand, let's take a look at a few example characters: Yui and Cornelia. The following snippets have been shortened for your convenience by removing some face files, but other than that they are actual snapshots from what any character added to the game will look like.
```tab="Yui"
yui/
├── a/
│   ├── faces/
│   │   ├── blush/
│   │   │   ├── 0.png
│   │   │   └── 1.png
│   │   └── face/
│   │   ├── 0.png
│   │   └── 1.png
│   └── outfits/
│   ├── casual.png
│   ├── gym.png
│   ├── nude.png
│   └── uniform.png
├── b/
│   ├── faces/
│   │   ├── blush/
│   │   │   ├── 0.png
│   │   │   └── 1.png
│   │   └── face/
│   │   ├── 0.png
│   │   └── 1.png
│   └── outfits/
│   ├── casual.png
│   ├── nude.png
│   ├── swimsuit.png
│   ├── swimsuit_covered.png
│   └── uniform.png
└── character.json
```
```tab="Cornelia"
cornelia/
├── a/
│   ├── faces/
│   │   ├── blush/
│   │   │   ├── 0.png
│   │   │   └── 1.png
│   │   ├── face/
│   │   │   ├── 0.png
│   │   │   └── 1.png
│   │   └── mutations/
│   │   └── twintails/
│   │   ├── blush/
│   │   │   ├── 0.png