feat(core): add default player stats variables
Introduce a new `values.rpy` file defining initial game state variables: `day_time`, `hunger`, `durst`, and `hygiene`. These defaults provide baseline stats for the player at game start.
This commit is contained in:
BIN
game/gui/overlay/status/frame.png
Normal file
BIN
game/gui/overlay/status/frame.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 318 B |
BIN
game/gui/overlay/status/frame_b.png
Normal file
BIN
game/gui/overlay/status/frame_b.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 892 B |
BIN
game/gui/overlay/status/frame_l.png
Normal file
BIN
game/gui/overlay/status/frame_l.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 958 B |
BIN
game/gui/overlay/status/frame_r.png
Normal file
BIN
game/gui/overlay/status/frame_r.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 934 B |
76
game/screens/overlay/status.rpy
Normal file
76
game/screens/overlay/status.rpy
Normal file
@@ -0,0 +1,76 @@
|
||||
style status_text is interface_text:
|
||||
align (0.5, 0.5)
|
||||
style status_frame is interface_frame:
|
||||
ysize 53
|
||||
xminimum 80
|
||||
background Frame("gui/overlay/status/frame.png", 2, 2)
|
||||
padding (10, 5)
|
||||
style status_bar is interface_bar
|
||||
style status_vbar is interface_vbar
|
||||
style status_scrollbar is interface_scrollbar
|
||||
style status_vscrollbar is interface_vscrollbar
|
||||
style status_slider is interface_slider:
|
||||
thumb None
|
||||
right_bar None
|
||||
align (0.5, 0.5)
|
||||
ysize None
|
||||
style status_button is interface_button:
|
||||
ysize 53
|
||||
xminimum 80
|
||||
background Frame("gui/overlay/status/frame.png", 2, 2)
|
||||
padding (10, 5)
|
||||
style status_button_text is interface_button_text
|
||||
style status_label is interface_label
|
||||
style status_label_text is interface_label_text
|
||||
style status_bar is status_slider
|
||||
|
||||
init:
|
||||
define day_time_verboses = {
|
||||
0: _("MORNING"),
|
||||
1: _("DAY"),
|
||||
2: _("EVENING"),
|
||||
3: _("NIGHT"),
|
||||
}
|
||||
|
||||
python:
|
||||
def get_current_time_string():
|
||||
return day_time_verboses.get(day_time, _("UNKNOWN"))
|
||||
|
||||
|
||||
screen status:
|
||||
|
||||
style_prefix "status"
|
||||
zorder 999
|
||||
|
||||
hbox:
|
||||
pos (20, 40)
|
||||
button:
|
||||
background Frame("gui/overlay/status/frame_l.png", 2, 2)
|
||||
text get_current_time_string()
|
||||
button:
|
||||
text _("QUESTS")
|
||||
frame:
|
||||
padding (1, 1)
|
||||
xsize 300
|
||||
bar:
|
||||
value AnimatedValue(hunger, 100)
|
||||
text _("HUNGER")
|
||||
frame:
|
||||
padding (1, 1)
|
||||
xsize 300
|
||||
bar:
|
||||
value AnimatedValue(durst, 100)
|
||||
text _("DURST")
|
||||
frame:
|
||||
padding (1, 1)
|
||||
xsize 300
|
||||
bar:
|
||||
value AnimatedValue(hygiene, 100)
|
||||
text _("HYGIENE")
|
||||
button:
|
||||
background "gui/overlay/status/frame_r.png"
|
||||
text "?"
|
||||
|
||||
init python:
|
||||
|
||||
config.overlay_screens.append("status")
|
||||
@@ -0,0 +1,5 @@
|
||||
|
||||
default day_time = 0
|
||||
default hunger = 100
|
||||
default durst = 100
|
||||
default hygiene = 100
|
||||
Reference in New Issue
Block a user