Skip to content

Commit

Permalink
Updated android icons. Fixed bug where stats.rpy was from the dse and…
Browse files Browse the repository at this point in the history
… lost custom stuff.
  • Loading branch information
qirien committed Jun 16, 2021
1 parent f521613 commit 1cc413f
Show file tree
Hide file tree
Showing 12 changed files with 120 additions and 112 deletions.
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified License.html
100644 → 100755
Empty file.
Empty file modified README.txt
100644 → 100755
Empty file.
Empty file modified Renpy-help.html
100644 → 100755
Empty file.
Empty file modified android-icon.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified android-presplash.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions game/options.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ init -1 python hide:
# These control the name and version of the game, that are reported
# with tracebacks and other debugging logs.
config.name = "Our Personal Space"
config.version = "1.21"
config.version = "1.22"

config.window_icon = "GUI/window-icon.png"
config.windows_icon = "GUI/windows-icon.png"
Expand Down Expand Up @@ -239,7 +239,7 @@ init -1 python hide:
config.nvl_adv_transition = zoomout

# add a default dissolve transition between each say if no other transition is speficied
config.say_attribute_transition = dissolve
config.say_attribute_transition = { "master" : Dissolve(0.5, alpha=True) }


#########################################
Expand Down Expand Up @@ -282,7 +282,7 @@ init python:
## The name that's used for directories and archive files. For example, if
## this is 'mygame-1.0', the windows distribution will be in the
## directory 'mygame-1.0-win', in the 'mygame-1.0-win.zip' file.
build.directory_name = "OurPersonalSpace-1.21"
build.directory_name = "OurPersonalSpace-1.22"

## The name that's uses for executables - the program that users will run
## to start the game. For example, if this is 'mygame', then on Windows,
Expand Down
88 changes: 48 additions & 40 deletions game/script.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ init:
define note = Character("note", kind=nvl, ctc="ctc_blink", ctc_position="nestled")

# defaults used for debugging purposes
define his_name = "Jack"
define her_name = "Kelly"
define his_nickname = "dear"
define her_nickname = "lover"
default his_name = "Jack"
default her_name = "Kelly"
default his_nickname = "dear"
default her_nickname = "lover"


# Variables about emotional state. -100 is minimum, 100 is maximum
define relaxed = 0 # negative = stressed
define loved = 0 # negative = neglected
define made_love = 0 # Counter of lovemaking, used for pregnancy calculation
define community_level = 0 # how successful is the colony?
default relaxed = 0 # negative = stressed
default loved = 0 # negative = neglected
default made_love = 0 # Counter of lovemaking, used for pregnancy calculation
default community_level = 0 # how successful is the colony?

# This definition needs to happen before our transitions are defined
init -201 python:
Expand Down Expand Up @@ -134,39 +134,47 @@ label splashscreen:
label start:
# Initializing Variables
# Variables about our characters and their relationship
define month = 0
define local_month = 0
define year = 1
define earth_year = 1
define earth_month = 0
define save_name = "Intro" #name for the saved game
default month = 0
default local_month = 0
default year = 1
default earth_year = 1
default earth_month = 0
default save_name = "Intro" #name for the saved game

define known_each_other = ""
define profession = ""
define father_attitude = ""
define favorite_wedding_gift = ""
define want_kids = False
define have_goat = False
define is_pregnant = False
define is_pregnant_later = False
define wearing_dress = False
define is_nude = False
define slacked_off = 0 #number of times slacked off at work
define has_grass = False
define times_worked = 1
define he_hunts = False
define brennan_relationship = 0
define trimester = "None"
define season = "spring"
define weather = "calm and cool"
define cheated_on_him = False
define exposed_brennan = False
define discovered_qec = False
define ocean_character = ""
define wants_to_leave = False
define hated_food = "turnips"
define baby_name = "Terra"
define notified_stat_max = False
default known_each_other = ""
default profession = ""
default father_attitude = ""
default favorite_wedding_gift = ""
default want_kids = False
default have_goat = False
default is_pregnant = False
default is_pregnant_later = False
default wearing_dress = False
default is_nude = False
default slacked_off = 0 #number of times slacked off at work
default has_grass = False
default times_worked = 1
default he_hunts = False
default brennan_relationship = 0
default trimester = "None"
default season = "spring"
default weather = "calm and cool"
default cheated_on_him = False
default exposed_brennan = False
default discovered_qec = False
default ocean_character = ""
default wants_to_leave = False
default hated_food = "turnips"
default baby_name = "Terra"
default notified_stat_max = False

default skill_domestic = 0
default skill_creative = 0
default skill_technical = 0
default skill_spiritual = 0
default skill_social = 0
default skill_knowledge = 0
default skill_physical = 0


scene bg stars with fade
Expand Down
138 changes: 69 additions & 69 deletions game/stats.rpy
Original file line number Diff line number Diff line change
@@ -1,109 +1,109 @@
# stats.rpy
# Keeps track of and displays the stats for the DSE.
#
# To change styles, look for the dse_stats_* blocks in styles.rpy

# To change styles, add a style block for the element you want
# preceded by "dse_stats_" down below

init -100 python:

__dse_stats = [ ]
dse_stats = [ ]

class __Stat(object):

def __init__(self, name, var, default, max, hidden=False):
def __init__(self, name, var, default, max):
self.name = name
self.var = var
self.default = default
self.max = max
self.hidden = hidden

def __init_stats():
for s in __dse_stats:
for s in dse_stats:
setattr(store, s.var, s.default)

config.start_callbacks.append(__init_stats)

# Call this function to add a stat to keep track of.
# Arguments:
# Name: name of stat. Will be displayed in the Stats screen
# var: name of variable to use to keep track of stat.
# default: starting value for the stat
# max: maximum value for the stat
# hidden: Is this stat hidden from the user? Hidden stats will not be displayed in the stats screen.
def register_stat(name, var, default=0, max=100, hidden=False):
__dse_stats.append(__Stat(name, var, default, max, hidden))

def register_stat(name, var, default, max):
dse_stats.append(__Stat(name, var, default, max))

def normalize_stats():
for s in __dse_stats:
if hasattr(store, s.var):
v = getattr(store, s.var)
for s in dse_stats:

v = getattr(store, s.var)

if v > s.max:
v = s.max
if v < 0:
v = 0
if v > s.max:
v = s.max
if v < 0:
v = 0

setattr(store, s.var, v)
setattr(store, s.var, v)

# Whenever a python statement is executed, we will ensure our stats
# stay within range.
config.python_callbacks.append(normalize_stats)


# Function to save skills for New Game +, up to SKILL_SAVED_MAX,
# if they are greater than what has already been saved.
def save_skill(current_saved_value, new_skill_value):
if (new_skill_value <= SKILL_SAVED_MAX):
if (not current_saved_value):
return new_skill_value
else:
if (current_saved_value < new_skill_value):
return new_skill_value
else:
return current_saved_value
else:
return SKILL_SAVED_MAX

def highest_stat():
normalize_stats()

highest_stat = 0
highest_stat_name = ""

for curr_stat in dse_stats:
stat_value = getattr(store, curr_stat.var)
if (stat_value > highest_stat):
highest_stat_name = curr_stat.name
highest_stat = stat_value
return highest_stat_name


# Here you can change the style of any elements in the Stats screen you want.
# As an example, here is a style defined for the label text to make sure it is not bold.
style dse_stats_label_text:
bold False

# Display the stats in a frame.
# name - display the stat's name
# bar - display a bar indicating the value of the stat
# value - display the numerical value of the stat
# max - display the maximum value of the stat
screen display_stats(name=True, bar=True, value=True, max=True):
$ dse_stat_length = len(__dse_stats)

#The number of rows is the number of stats that are not hidden
for s in __dse_stats:
if s.hidden:
$ dse_stat_length -= 1

$ dse_stat_length = len(dse_stats)
frame:
style_group "dse_stats"
style_group "dse_stats"
yalign 0.0
xalign 0.5


vbox:
yalign 0.0
xalign 0.5
label "Statistics" xalign 0.5

# Depending on what the user chooses to display, calculate how many columns we need
$ num_columns = 0
if name:
$ num_columns+=1
if bar:
$ num_columns+=1
if value or max:
$ num_columns+=1

# Make a grid with up to 3 columns and as many rows as there are stats.
grid num_columns dse_stat_length:
grid 3 dse_stat_length:
xalign 0.5
yalign 0.5
spacing 5

for s in __dse_stats:
#Skip if the stat is a hidden stat
if (not s.hidden):
$ v = getattr(store, s.var)


if name:
label s.name

if bar:
bar value v range s.max xmaximum 150 xalign 0.0

if value and max:
label ("%d/%d" % (v, s.max)) xalign 1.0
elif value:
label ("%d" % (v,)) xalign 1.0
elif max:
label ("%d" % (s.max,)) xalign 1.0


for s in dse_stats:
$ v = getattr(store, s.var)

if name:
label s.name

if bar:
bar value v range s.max xmaximum 150 xalign 0.0

if value and max:
label ("%d/%d" % (v, s.max)) xalign 1.0
elif value:
label ("%d" % (v,)) xalign 1.0
elif max:
label ("%d" % (max,)) xalign 1.0
Empty file modified gpl-3.0.txt
100644 → 100755
Empty file.
Empty file modified icon.ico
100644 → 100755
Empty file.
Empty file modified installer.nsi
100644 → 100755
Empty file.

0 comments on commit 1cc413f

Please sign in to comment.