Skip to content

Commit

Permalink
Пофиксил *.chr-файлы
Browse files Browse the repository at this point in the history
Какая-то странная, но достаточно забавная механика. Собирать еще не пробовал...

* Игра теперь не зависит от файла firstrun
* Игра теперь не зависит от *.chr-файлов
* .gitignore
  • Loading branch information
saber-nyan committed Nov 24, 2017
1 parent 8e8ccb3 commit 8f3bbcf
Show file tree
Hide file tree
Showing 8 changed files with 100 additions and 100 deletions.
77 changes: 39 additions & 38 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,39 +1,40 @@
*.rpy[bc]

This comment has been minimized.

Copy link
@saber-nyan

saber-nyan Nov 24, 2017

Author Owner

Что происходит с моим diff?!

*.rpymc
*.bak
**/tmp/*
**/game/saves/*
**/log.txt
**/errors.txt
**/traceback.txt
*-dists/*
*.py[co]

*~
*.bak

*.cab
*.msi
*.msm
*.msp
*.lnk

.DS_Store
.AppleDouble
.LSOverride
._*

.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns

.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

*.rpy[bc]
*.rpymc
*.bak
**/tmp/*
**/game/saves/*
**/log.txt
**/errors.txt
**/traceback.txt
*-dists/*
*.py[co]

*~
*.bak

*.cab
*.msi
*.msm
*.msp
*.lnk

.DS_Store
.AppleDouble
.LSOverride
._*
desktop.ini

.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns

.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

**/game/firstrun
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Doki Doki Literature Club! для Android
[![Latest release](https://github-release-version.herokuapp.com/github/saber-nyan/ddlc-android/release.svg?style=flat)](https://github.com/saber-nyan/ddlc-android/releases/latest)<br/>
**ВНИМАНИЕ: в репозитории могут присутствовать спойлеры! Даже в названиях файлов!**

Мои попытки портировать "[Doki Doki Literature Club!](https://vndb.org/v21905)" на Android.<br/>
Спасибо, *Ren`Py*!

Для клонирования репозитория необходим [git-lfs](https://github.com/git-lfs/git-lfs/wiki/Installation).

Понятия не имею, что у них за лицензия...

## TODO
- [x] Распаковать, декомпилировать, проверить работу
- [x] Пофиксить поэму
- [ ] Пофиксить интересные вещи, связанные с `*.chr`-файлами (**spoilers!**)
- [ ] Пофиксить диалоговое окно (или посмотреть, как ведет себя на других устройствах?)
- [ ] Собрать тест
- [ ] Полностью прочитать ВН, поймать баги и вылеты
- [ ] Собрать релиз
# Doki Doki Literature Club! для Android
[![Latest release](https://github-release-version.herokuapp.com/github/saber-nyan/ddlc-android/release.svg?style=flat)](https://github.com/saber-nyan/ddlc-android/releases/latest)<br/>
**ВНИМАНИЕ: в репозитории могут присутствовать спойлеры! Даже в названиях файлов!**

Мои попытки портировать "[Doki Doki Literature Club!](https://vndb.org/v21905)" на Android.<br/>
*Спасибо, [Ren`Py](https://github.com/renpy/renpy), [unrpa](https://github.com/Lattyware/unrpa), [unrpyc](https://github.com/CensoredUsername/unrpyc)!*

Для клонирования репозитория необходим [git-lfs](https://github.com/git-lfs/git-lfs/wiki/Installation).

Понятия не имею, что у игры за лицензия... но разработчики, вроде бы, не против.

## TODO
- [x] Распаковать, декомпилировать, проверить работу
- [x] Пофиксить поэму
- [x] Пофиксить интересные вещи, связанные с `*.chr`-файлами (**spoilers!**)
- [ ] Пофиксить диалоговое окно (или посмотреть, как ведет себя на других устройствах?)
- [ ] Собрать тест
- [ ] Полностью прочитать ВН, поймать баги и вылеты
- [ ] Собрать релиз
20 changes: 8 additions & 12 deletions game/definitions.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,15 @@ init python:
def delete_all_saves():
for savegame in renpy.list_saved_games(fast=True):
renpy.unlink_save(savegame)
def delete_character(name):
import os
try: os.remove(config.basedir + "/characters/" + name + ".chr")
except: pass
def delete_character(name): # TO!DONE: character fix!
setattr(persistent, name, "deleted")
renpy.save_persistent()
def restore_character(name): # TO!DONE: character fix!
setattr(persistent, name, "restored")
def restore_all_characters():
try: renpy.file("../characters/monika.chr")
except: open(config.basedir + "/characters/monika.chr", "wb").write(renpy.file("monika.chr").read())
try: renpy.file("../characters/natsuki.chr")
except: open(config.basedir + "/characters/natsuki.chr", "wb").write(renpy.file("natsuki.chr").read())
try: renpy.file("../characters/yuri.chr")
except: open(config.basedir + "/characters/yuri.chr", "wb").write(renpy.file("yuri.chr").read())
try: renpy.file("../characters/sayori.chr")
except: open(config.basedir + "/characters/sayori.chr", "wb").write(renpy.file("sayori.chr").read())
for char in ("monika", "natsuki", "yuri", "sayori"): # TO!DONE: character fix!
restore_character(char)
renpy.save_persistent()
def pause(time=None):
if not time:
renpy.ui.saybehavior(afm=" ")
Expand Down
1 change: 1 addition & 0 deletions game/firstrun
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
6 changes: 4 additions & 2 deletions game/script-ch0.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ label ch0_main:
play music t2

python:
try: renpy.file("../characters/monika.chr")
except: renpy.jump("ch0_kill")
if persistent.monika is None or persistent.monika == "restored":
pass
else:
renpy.jump("ch0_kill") # TO!DONE: character fix!

$ restore_all_characters()
s "Heeeeeeeyyy!!"
Expand Down
12 changes: 6 additions & 6 deletions game/script-ch30.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ init python:

def slow_nodismiss(event, interact=True, **kwargs):
if not persistent.monika_kill:
try:
renpy.file("../characters/monika.chr")
except:
if persistent.monika is None or persistent.monika == "restored": # TO!DONE: character fix!
pass
else:
persistent.tried_skip = True
config.allow_skipping = False
_window_hide(None)
Expand Down Expand Up @@ -847,9 +847,9 @@ label ch30_loop:
$ waittime = renpy.random.randint(4, 8)
label ch30_waitloop:
python:
try:
renpy.file("../characters/monika.chr")
except:
if persistent.monika is None or persistent.monika == "restored": # TO!DONE: character fix!
pass
else:
persistent.tried_skip = True
config.allow_skipping = False
_window_hide(None)
Expand Down
5 changes: 2 additions & 3 deletions game/script-ch40.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ label ch40_main:

python:
if not persistent.monika_back:
try:
renpy.file("../characters/monika.chr")
if persistent.monika is None or persistent.monika == "restored": # TO!DONE: character fix!
renpy.call_screen("dialog", message="Please stop playing with my heart.\nI don't want to come back.", ok_action=Return())
persistent.monika_back = True
except:
else:
pass

$ delete_character("monika")
Expand Down
41 changes: 21 additions & 20 deletions game/splash.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,12 @@ label splashscreen:


python:
firstrun = ""
try:
firstrun = renpy.file("firstrun").read(1)
except:
with open(config.basedir + "/game/firstrun", "wb") as f:
pass
firstrun = "1" # TO!DONE: 'firstrun' should always contain "1"
# try:
# firstrun = renpy.file("firstrun").read(1)
# except:
# with open(config.basedir + "/game/firstrun", "wb") as f:
# pass
if not firstrun:
if persistent.first_run:
$ quick_menu = False
Expand All @@ -246,7 +246,8 @@ label splashscreen:
with open(config.basedir + "/game/firstrun", "w") as f:
f.write("1")
except:
renpy.jump("readonly")
#renpy.jump("readonly")
pass # TO!DONE

if not persistent.first_run:
python:
Expand All @@ -273,20 +274,20 @@ label splashscreen:
python:
s_kill_early = None
if persistent.playthrough == 0:
try: renpy.file("../characters/sayori.chr")
except: s_kill_early = True
if persistent.sayori is not None and persistent.sayori == "deleted": # TO!DONE: character fix!
s_kill_early = True
if not s_kill_early:
if persistent.playthrough <= 2 and persistent.playthrough != 0:
try: renpy.file("../characters/monika.chr")
except: open(config.basedir + "/characters/monika.chr", "wb").write(renpy.file("monika.chr").read())
if persistent.monika is not None and persistent.monika == "deleted":
persistent.monika = "restored"
if persistent.playthrough <= 1 or persistent.playthrough == 4:
try: renpy.file("../characters/natsuki.chr")
except: open(config.basedir + "/characters/natsuki.chr", "wb").write(renpy.file("natsuki.chr").read())
try: renpy.file("../characters/yuri.chr")
except: open(config.basedir + "/characters/yuri.chr", "wb").write(renpy.file("yuri.chr").read())
if persistent.natsuki is not None and persistent.natsuki == "deleted":
persistent.natsuki = "restored"
if persistent.yuri is not None and persistent.yuri == "deleted":
persistent.yuri = "restored"
if persistent.playthrough == 4:
try: renpy.file("../characters/sayori.chr")
except: open(config.basedir + "/characters/sayori.chr", "wb").write(renpy.file("sayori.chr").read())
if persistent.sayori is not None and persistent.sayori == "deleted":
persistent.sayori = "restored"

if not persistent.special_poems:
python hide:
Expand Down Expand Up @@ -507,10 +508,10 @@ label quit:
pause 0.01
return

label readonly:
label readonly: # TO!DONE: find usages!
scene black
"The game cannot be run because you are trying to run it from a read-only location."
"Please copy the DDLC application to your desktop or other accessible location and try again."
"Fuck, please contact saber-nyan!"
"https://github.com/saber-nyan"
$ renpy.quit()
return
# Decompiled by unrpyc: https://github.com/CensoredUsername/unrpyc

0 comments on commit 8f3bbcf

Please sign in to comment.