├── .github ├── FUNDING.yml └── workflows │ └── devskim.yml ├── .gitignore ├── .gitmodules ├── .vscode ├── NQTR-Action.code-snippets ├── NQTR-Navigation.code-snippets ├── NQTR-Quest.code-snippets ├── NQTR-Routine.code-snippets ├── NQTR-Talk.code-snippets ├── NQTR-TimeHandler.code-snippets ├── extensions.json ├── launch.json └── settings.json ├── CHANGELOG.md ├── LICENSE ├── README.md ├── SECURITY.md ├── bin └── renpy.ps1 ├── console └── debug.rpy ├── game ├── core.rpy ├── flags_value.rpy ├── gui.rpy ├── gui │ ├── bar │ │ ├── bottom.png │ │ ├── left.png │ │ ├── right.png │ │ └── top.png │ ├── button │ │ ├── check_foreground.png │ │ ├── check_selected_foreground.png │ │ ├── choice_hover_background.png │ │ ├── choice_idle_background.png │ │ ├── hover_background.png │ │ ├── idle_background.png │ │ ├── quick_hover_background.png │ │ ├── quick_idle_background.png │ │ ├── radio_foreground.png │ │ ├── radio_selected_foreground.png │ │ ├── slot_hover_background.png │ │ └── slot_idle_background.png │ ├── frame.png │ ├── game_menu.png │ ├── main_menu.png │ ├── namebox.png │ ├── notify.png │ ├── nvl.png │ ├── overlay │ │ ├── confirm.png │ │ ├── game_menu.png │ │ └── main_menu.png │ ├── phone │ │ ├── bar │ │ │ ├── bottom.png │ │ │ ├── left.png │ │ │ ├── right.png │ │ │ └── top.png │ │ ├── button │ │ │ ├── check_foreground.png │ │ │ ├── check_selected_foreground.png │ │ │ ├── choice_hover_background.png │ │ │ ├── choice_idle_background.png │ │ │ ├── hover_background.png │ │ │ ├── idle_background.png │ │ │ ├── radio_foreground.png │ │ │ ├── radio_selected_foreground.png │ │ │ ├── slot_hover_background.png │ │ │ └── slot_idle_background.png │ │ ├── nvl.png │ │ ├── overlay │ │ │ ├── game_menu.png │ │ │ └── main_menu.png │ │ ├── scrollbar │ │ │ ├── horizontal_hover_bar.png │ │ │ ├── horizontal_hover_thumb.png │ │ │ ├── horizontal_idle_bar.png │ │ │ ├── horizontal_idle_thumb.png │ │ │ ├── vertical_hover_bar.png │ │ │ ├── vertical_hover_thumb.png │ │ │ ├── vertical_idle_bar.png │ │ │ └── vertical_idle_thumb.png │ │ ├── slider │ │ │ ├── horizontal_hover_bar.png │ │ │ ├── horizontal_hover_thumb.png │ │ │ ├── horizontal_idle_bar.png │ │ │ ├── horizontal_idle_thumb.png │ │ │ ├── vertical_hover_bar.png │ │ │ ├── vertical_hover_thumb.png │ │ │ ├── vertical_idle_bar.png │ │ │ └── vertical_idle_thumb.png │ │ └── textbox.png │ ├── scrollbar │ │ ├── horizontal_hover_bar.png │ │ ├── horizontal_hover_thumb.png │ │ ├── horizontal_idle_bar.png │ │ ├── horizontal_idle_thumb.png │ │ ├── vertical_hover_bar.png │ │ ├── vertical_hover_thumb.png │ │ ├── vertical_idle_bar.png │ │ └── vertical_idle_thumb.png │ ├── skip.png │ ├── slider │ │ ├── horizontal_hover_bar.png │ │ ├── horizontal_hover_thumb.png │ │ ├── horizontal_idle_bar.png │ │ ├── horizontal_idle_thumb.png │ │ ├── vertical_hover_bar.png │ │ ├── vertical_hover_thumb.png │ │ ├── vertical_idle_bar.png │ │ └── vertical_idle_thumb.png │ ├── textbox.png │ └── window_icon.png ├── images.rpy ├── images │ ├── Alice │ │ ├── roomsleep0A.webp │ │ ├── terrace0A.webp │ │ └── terrace0At.webp │ ├── action-key.webp │ ├── icon │ │ ├── Alice.webp │ │ └── Ann.webp │ └── location │ │ ├── aliceroom-0.webp │ │ ├── aliceroom-1.webp │ │ ├── aliceroom-2.webp │ │ ├── aliceroom-3.webp │ │ ├── annroom-0.webp │ │ ├── annroom-1.webp │ │ ├── annroom-2.webp │ │ ├── annroom-3.webp │ │ ├── bathroom.webp │ │ ├── gym.webp │ │ ├── loc-0.webp │ │ ├── loc-1.webp │ │ ├── loc-2.webp │ │ ├── loc-3.webp │ │ ├── lounge-0.webp │ │ ├── lounge-1.webp │ │ ├── lounge-2.webp │ │ ├── lounge-3.webp │ │ ├── map-0.webp │ │ ├── map-1.webp │ │ ├── map-2.webp │ │ ├── map-3.webp │ │ ├── myroom-0.webp │ │ ├── myroom-1.webp │ │ ├── myroom-2.webp │ │ ├── myroom-3.webp │ │ ├── nightcity.webp │ │ ├── terrace-0.webp │ │ ├── terrace-1.webp │ │ ├── terrace-2.webp │ │ └── terrace-3.webp ├── nqtr_interface │ ├── alarm.psd │ ├── alarm.webp │ ├── alarmmodern.psd │ ├── alarmmodern.webp │ ├── box.webp │ ├── coffe.webp │ ├── college.webp │ ├── gym.webp │ ├── help.webp │ ├── home-00.webp │ ├── home-01.webp │ ├── home-02.webp │ ├── home-03.webp │ ├── home-04.webp │ ├── home-05.webp │ ├── home-06.webp │ ├── home-07.webp │ ├── home-08.webp │ ├── home-09.webp │ ├── home-10.webp │ ├── home-11.webp │ ├── hotel.webp │ ├── inventory.webp │ ├── laptop.webp │ ├── map.webp │ ├── memo.webp │ ├── options.webp │ ├── pc.webp │ ├── phone.webp │ ├── shopping.webp │ ├── sleep.webp │ ├── spa.webp │ ├── talk.webp │ ├── user.webp │ └── wait.webp ├── nqtr_screens │ ├── screens_memo.rpy │ ├── screens_nqtr.rpy │ ├── screens_nqtr_component.rpy │ ├── screens_value.rpy │ └── screens_value_fix.rpy ├── nqtr_tool │ ├── action_value_fix.rpy │ ├── conversation_fun.rpy │ ├── conversation_label_fun.rpy │ ├── conversation_value.rpy │ ├── conversation_value_fix.rpy │ ├── nav_label_fun.rpy │ ├── nav_value_fix.rpy │ ├── nav_value_fun.rpy │ ├── quest_fun.rpy │ ├── quest_value_fix.rpy │ ├── quest_value_fun.rpy │ ├── routine_label_fun.rpy │ ├── routine_value_fix.rpy │ ├── routine_value_fun.rpy │ ├── time_fun.rpy │ ├── time_label_fun.rpy │ └── time_value_fix.rpy ├── nqtr_values │ ├── action_label.rpy │ ├── action_talk_label.rpy │ ├── action_value.rpy │ ├── event_label.rpy │ ├── nav_value.rpy │ ├── quest_value.rpy │ ├── routine_value.rpy │ └── time_value.rpy ├── options.rpy ├── screens.rpy └── script.rpy └── pythonpackages ├── __init__.py └── nqtr ├── __init__.py ├── action.py ├── button.py ├── conversation.py ├── conversation_fun.py ├── disabled_solution.py ├── locals.py ├── navigation.py ├── quest.py ├── routine.py └── time.py /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: BlackRam-oss # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: DRincsProductions # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: drincsproductions # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 13 | buy_me_a_coffee: drincsproductions 14 | custom: [ # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 15 | "https://drincs-website.web.app/support", "https://www.paypal.com/paypalme/DRincsProductions" 16 | ] 17 | -------------------------------------------------------------------------------- /.github/workflows/devskim.yml: -------------------------------------------------------------------------------- 1 | # This workflow uses actions that are not certified by GitHub. 2 | # They are provided by a third-party and are governed by 3 | # separate terms of service, privacy policy, and support 4 | # documentation. 5 | 6 | name: DevSkim 7 | 8 | on: 9 | push: 10 | branches: [ "main" ] 11 | pull_request: 12 | branches: [ "main" ] 13 | schedule: 14 | - cron: '23 14 * * 5' 15 | 16 | jobs: 17 | lint: 18 | name: DevSkim 19 | runs-on: ubuntu-20.04 20 | permissions: 21 | actions: read 22 | contents: read 23 | security-events: write 24 | steps: 25 | - name: Checkout code 26 | uses: actions/checkout@v3 27 | 28 | - name: Run DevSkim scanner 29 | uses: microsoft/DevSkim-Action@v1 30 | 31 | - name: Upload DevSkim scan results to GitHub Security tab 32 | uses: github/codeql-action/upload-sarif@v2 33 | with: 34 | sarif_file: devskim-results.sarif 35 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | pip-wheel-metadata/ 24 | share/python-wheels/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | MANIFEST 29 | 30 | # PyInstaller 31 | # Usually these files are written by a python script from a template 32 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 33 | *.manifest 34 | *.spec 35 | 36 | # Installer logs 37 | pip-log.txt 38 | pip-delete-this-directory.txt 39 | 40 | # Unit test / coverage reports 41 | htmlcov/ 42 | .tox/ 43 | .nox/ 44 | .coverage 45 | .coverage.* 46 | .cache 47 | nosetests.xml 48 | coverage.xml 49 | *.cover 50 | *.py,cover 51 | .hypothesis/ 52 | .pytest_cache/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | target/ 76 | 77 | # Jupyter Notebook 78 | .ipynb_checkpoints 79 | 80 | # IPython 81 | profile_default/ 82 | ipython_config.py 83 | 84 | # pyenv 85 | .python-version 86 | 87 | # pipenv 88 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 89 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 90 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 91 | # install all needed dependencies. 92 | #Pipfile.lock 93 | 94 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 95 | __pypackages__/ 96 | 97 | # Celery stuff 98 | celerybeat-schedule 99 | celerybeat.pid 100 | 101 | # SageMath parsed files 102 | *.sage.py 103 | 104 | # Environments 105 | .env 106 | .venv 107 | env/ 108 | venv/ 109 | ENV/ 110 | env.bak/ 111 | venv.bak/ 112 | 113 | # Spyder project settings 114 | .spyderproject 115 | .spyproject 116 | 117 | # Rope project settings 118 | .ropeproject 119 | 120 | # mkdocs documentation 121 | /site 122 | 123 | # mypy 124 | .mypy_cache/ 125 | .dmypy.json 126 | dmypy.json 127 | 128 | # Pyre type checker 129 | .pyre/ 130 | .DS_Store 131 | errors.txt 132 | log.txt 133 | traceback.txt 134 | *.rpyc 135 | *.rpymc 136 | game/saves 137 | game/cache 138 | *.bak 139 | 140 | # Templete files 141 | .renpy-sdk 142 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "NQTR-System.wiki"] 2 | path = wiki 3 | url = https://github.com/DRincs-Productions/NQTR-System.wiki.git 4 | branch = master 5 | [submodule "game/renpy_utility_tool"] 6 | path = game/renpy_utility_tool 7 | url = https://github.com/DRincs-Productions/renpy-utility-lib 8 | branch = renpy-lib 9 | [submodule "pythonpackages/renpy_utility"] 10 | path = pythonpackages/renpy_utility 11 | url = https://github.com/DRincs-Productions/renpy-utility-lib 12 | branch = python-lib 13 | [submodule "game/screens_style"] 14 | path = game/screens_style 15 | url = https://github.com/DRincs-Productions/renpy-screens-style 16 | branch = main 17 | [submodule "game/tl"] 18 | path = game/tl 19 | url = https://github.com/BlackRam-oss/NQTR-translations 20 | -------------------------------------------------------------------------------- /.vscode/NQTR-Action.code-snippets: -------------------------------------------------------------------------------- 1 | { 2 | "DRincs Add an Action": { 3 | "scope": "renpy", 4 | "prefix": "DR_ActionAdd", 5 | "body": [ 6 | "python:", 7 | " actions[\"${1:action_id}\"] = Act(", 8 | " name = _(\"${2:Name}\"),", 9 | " button_icon = \"${3:/icon_url.webp}\",", 10 | " label_name = \"${4:label_be_started}\",", 11 | " room_ids = [\"${5:room_id_1\", \"room_id_2}\"],", 12 | " hour_start = ${6:0}, hour_stop = ${7:24}", 13 | " )", 14 | "", 15 | ], 16 | "description": "Add an Action" 17 | }, 18 | "DRincs Add an Action in dictionary": { 19 | "scope": "renpy", 20 | "prefix": "DR_ActionAdd_in_dict", 21 | "body": [ 22 | "\"${1:action_id}\" : Act(", 23 | " name = _(\"${2:Name}\"),", 24 | " button_icon = \"${3:/icon_url.webp}\",", 25 | " label_name = \"${4:label_be_started}\",", 26 | " room_ids=[\"${5:room_id_1\", \"room_id_2}\"],", 27 | " hour_start=${6:0}, hour_stop=${7:24}", 28 | "),", 29 | ], 30 | "description": "Add an Action in dictionary" 31 | }, 32 | "DRincs Remove an Action": { 33 | "scope": "renpy", 34 | "prefix": "DR_ActionRemove", 35 | "body": [ 36 | "$ actions.pop(\"${1:action_id}\")", 37 | "", 38 | ], 39 | "description": "Remove an Action" 40 | }, 41 | "DRincs Add an Action with Picture in background": { 42 | "scope": "renpy", 43 | "prefix": "DR_ActionAdd_inBG", 44 | "body": [ 45 | "python:", 46 | " actions[\"${1:action_id}\"] = Act(", 47 | " name = _(\"${2:Name}\"),", 48 | " picture_in_background = \"${3:/icon_url.webp}\",", 49 | " label_name = \"${4:label_be_started}\",", 50 | " room_ids=[\"${5:room_id_1\", \"room_id_2}\"],", 51 | " hour_start=${6:0}, hour_stop=${7:24}", 52 | " )", 53 | "", 54 | ], 55 | "description": "Add an Action" 56 | }, 57 | "DRincs Add an Action with Picture in background in dictionary": { 58 | "scope": "renpy", 59 | "prefix": "DR_ActionAdd_inBG_in_dict", 60 | "body": [ 61 | "\"${1:action_id}\" : Act(", 62 | " name = _(\"${2:Name}\"),", 63 | " picture_in_background = \"${3:/icon_url.webp}\",", 64 | " label_name = \"${4:label_be_started}\",", 65 | " room_ids=[\"${5:room_id_1\", \"room_id_2}\"],", 66 | " hour_start=${6:0}, hour_stop=${7:24}", 67 | "),", 68 | ], 69 | "description": "Add an Action in dictionary" 70 | }, 71 | } -------------------------------------------------------------------------------- /.vscode/NQTR-Navigation.code-snippets: -------------------------------------------------------------------------------- 1 | { 2 | "DRincs Add a Room in list": { 3 | "scope": "renpy", 4 | "prefix": "DR_RoomAdd_in_list", 5 | "body": [ 6 | "Room(id=\"${1:room_id}\", location_id=\"${2:house}\", name=_(\"${3:My room}\"), button_icon=\"icon ${4:myroom}\", background =\"bg ${4:myroom}\", action_ids = []),", 7 | ], 8 | "description": "Add a Room in dictionary" 9 | }, 10 | "DRincs Change Room": { 11 | "scope": "renpy", 12 | "prefix": "DR_ChangeRoom", 13 | "body": [ 14 | "call change_room(room_id = \"${1:room_id}\")", 15 | "", 16 | ], 17 | "description": "Change Room" 18 | }, 19 | "DRincs Add a Location in list": { 20 | "scope": "renpy", 21 | "prefix": "DR_LocationAdd_in_list", 22 | "body": [ 23 | "Location(id = \"${1:house_id}\", key_map=\"${2:map}\", name=_(\"${3:My house}\"), picture_in_background=\"${4:icon map home}\", external_room_id=\"${1:house_id}_external_room\", xalign=0.5, yalign=0.5),", 24 | ], 25 | "description": "Add a Location in dictionary" 26 | }, 27 | "DRincs Add a Map in dict": { 28 | "scope": "renpy", 29 | "prefix": "DR_MapAdd_in_dict", 30 | "body": [ 31 | "\"${1:map_id}\": Map(", 32 | " name = _(\"${2:Map Name}\"), background = \"bg ${1:map_id}\",", 33 | " map_id_north = None,", 34 | " map_id_south = None,", 35 | " map_id_west = None,", 36 | " map_id_east = None,", 37 | "),", 38 | ], 39 | "description": "Add a Map in dictionary" 40 | }, 41 | } -------------------------------------------------------------------------------- /.vscode/NQTR-Quest.code-snippets: -------------------------------------------------------------------------------- 1 | { 2 | "DRincs Start a Quest": { 3 | "scope": "renpy", 4 | "prefix": "DR_QuestStart", 5 | "body": [ 6 | "if(not quest_start(\"${1:quest_id}\"))", 7 | " $ log_error(\"The quest ${1:quest_id} has not started\", renpy.get_filename_line())", 8 | "", 9 | ], 10 | "description": "Start a Quest" 11 | }, 12 | "DRincs Next Stage": { 13 | "scope": "renpy", 14 | "prefix": "DR_QuestNextStage", 15 | "body": [ 16 | "$ quest_next_stage(\"${1:quest_id}\")", 17 | "", 18 | ], 19 | "description": "Next Stage" 20 | }, 21 | "DRincs Next Stage Only it is completed": { 22 | "scope": "renpy", 23 | "prefix": "DR_QuestNextStageIfCompleted", 24 | "body": [ 25 | "$ quest_next_stage_only_if_completed(\"${1:quest_id}\")", 26 | "", 27 | ], 28 | "description": "Next Stage Only it is completed" 29 | }, 30 | "DRincs If Number of Stages completed in Quest": { 31 | "scope": "renpy", 32 | "prefix": "DR_QuestIfNumberOfStagesCompleted", 33 | "body": [ 34 | "if (number_stages_completed_in_quest[\"${1:quest_id}\"] \"${2:==}\" \"${3:2}\")", 35 | " ", 36 | ], 37 | "description": "If Number of Stages completed in Quest" 38 | }, 39 | "DRincs Add a Quest": { 40 | "scope": "renpy", 41 | "prefix": "DR_QuestAdd", 42 | "body": [ 43 | "\"${1:quest_id}\" : Quest(", 44 | " id = \"${1}\",", 45 | " title = _(\"${2:Help [a]}\"),", 46 | " info_image = \"${3:quest ${1}}\",", 47 | " stage_ids = [\"${4:stages_id_1\", \"stages_id_2}\"],", 48 | " description = _(\"${5:Long Description}\"),", 49 | " development = True", 50 | "),", 51 | ], 52 | "description": "Add a Quest" 53 | }, 54 | "DRincs Add a Stage": { 55 | "scope": "renpy", 56 | "prefix": "DR_QuestStageAdd", 57 | "body": [ 58 | "\"${1:stage_id}\" : Stage(quest_id = \"${2:quest_id}\", title = _(\"${3:Help [a]}\"), days_required_to_start = ${4:2},", 59 | " description = _(\"${5:Long Description}\"),", 60 | " advice = _(\"${6:Advice}\"),", 61 | " request_description = _(\"${7:Request Description}\"),", 62 | " start_label_name=${8:\"stagestart_${1:stage_id}\"},", 63 | " required_number_completed_stages = {", 64 | " ${9:\"quest_1\" : 2,}", 65 | " }", 66 | "),", 67 | ], 68 | "description": "Add a Stage" 69 | }, 70 | } -------------------------------------------------------------------------------- /.vscode/NQTR-Routine.code-snippets: -------------------------------------------------------------------------------- 1 | { 2 | "DRincs Add an Routine": { 3 | "scope": "renpy", 4 | "prefix": "DR_RoutineAdd", 5 | "body": [ 6 | "python:", 7 | " routine[\"${1:routine_id}\"] = Commitment(", 8 | " characters = [],", 9 | " conversations = [", 10 | " Conversation(", 11 | " characters = ${6:character_name},", 12 | " name=\"${7:talk_${1}}\",", 13 | " label_name=\"${7:${6}_${1}_label}\",", 14 | " conversation_background = \"${8:bg ${6} ${1} ${4} talk}\"", 15 | " ),", 16 | " },", 17 | " hour_start=${2:0}, hour_stop=${3:24},", 18 | " room_id=\"${4:room_id}\", location_id=\"${5:home}\",", 19 | " background =\"${9:bg ${6} ${1} ${4}}\",", 20 | ")", 21 | "", 22 | ], 23 | "description": "Add an Routine" 24 | }, 25 | "DRincs Add an Routine in dictionary": { 26 | "scope": "renpy", 27 | "prefix": "DR_RoutineAdd_in_dict", 28 | "body": [ 29 | "\"${1:routine_id}\" : Commitment(", 30 | " characters = [],", 31 | " conversations = [", 32 | " Conversation(", 33 | " characters = ${6:character_name},", 34 | " name=\"${7:talk_${1}}\",", 35 | " label_name=\"${7:${6}_${1}_label}\",", 36 | " conversation_background = \"${8:bg ${6} ${1} ${4} talk}\"", 37 | " ),", 38 | " },", 39 | " hour_start=${2:0}, hour_stop=${3:24},", 40 | " room_id=\"${4:room_id}\", location_id=\"${5:home}\",", 41 | " background =\"${9:bg ${6} ${1} ${4}}\",", 42 | "),", 43 | ], 44 | "description": "Add an Routine in dictionary" 45 | }, 46 | "DRincs Add an Event": { 47 | "scope": "renpy", 48 | "prefix": "DR_EventAdd", 49 | "body": [ 50 | "python:", 51 | " routine[\"${1:routine_id}\"] = Commitment(", 52 | " characters=[],", 53 | " event_label_name = \"${6:${1}_event_label}\"", 54 | " hour_start=${2:0}, hour_stop=${3:24},", 55 | " room_id=\"${4:room_id}\", location_id=\"${5:home}\",", 56 | " )", 57 | "", 58 | ], 59 | "description": "Add an Event" 60 | }, 61 | "DRincs Add an Event in dictionary": { 62 | "scope": "renpy", 63 | "prefix": "DR_EventAdd_in_dict", 64 | "body": [ 65 | "\"${1:routine_id}\" : Commitment(", 66 | " characters=[],", 67 | " event_label_name = \"${6:${1}_event_label}\"", 68 | " hour_start=${2:0}, hour_stop=${3:24},", 69 | " room_id=\"${4:room_id}\", location_id=\"${5:home}\",", 70 | "),", 71 | ], 72 | "description": "Add an Event in dictionary" 73 | }, 74 | } -------------------------------------------------------------------------------- /.vscode/NQTR-Talk.code-snippets: -------------------------------------------------------------------------------- 1 | { 2 | "DRincs Add an Talk Choice in DEFAULT_LABEL_TALK": { 3 | "scope": "renpy", 4 | "prefix": "DR_TalkChoiceAdd", 5 | "body": [ 6 | "$ add_conversation_choice(choice_character = ${1:character_name}, choice_text = _(\"${2:Name}\"), label_name = \"${3:label_be_started}\"", 7 | "", 8 | ], 9 | "description": "Add an Action in DEFAULT_LABEL_TALK" 10 | }, 11 | "DRincs Delete an Talk Choice in DEFAULT_LABEL_TALK": { 12 | "scope": "renpy", 13 | "prefix": "DR_TalkChoiceDel", 14 | "body": [ 15 | "$ del_conversation_choice(choice_character = ${1:character_name}, choice_text = _(\"${2:Name}\")", 16 | "", 17 | ], 18 | "description": "Delete an Action in DEFAULT_LABEL_TALK" 19 | }, 20 | } -------------------------------------------------------------------------------- /.vscode/NQTR-TimeHandler.code-snippets: -------------------------------------------------------------------------------- 1 | { 2 | "DRincs New Day": { 3 | "scope": "renpy", 4 | "prefix": "DR_NewDay", 5 | "body": [ 6 | "call new_day${1:(time_of_new_day=${2:9})}", 7 | "", 8 | ], 9 | "description": "New Day" 10 | }, 11 | "DRincs Wait": { 12 | "scope": "renpy", 13 | "prefix": "DR_Wait", 14 | "body": [ 15 | "call wait${1:(wait_hour=${2:1})}", 16 | "", 17 | ], 18 | "description": "Wait" 19 | }, 20 | "DRincs Now is between": { 21 | "scope": "renpy", 22 | "prefix": "DR_NowIsBetween", 23 | "body": [ 24 | "if (now_is_between(start=${1:0}, end=${2:24})):", 25 | " ", 26 | ], 27 | "description": "Check if now is between: start & end" 28 | }, 29 | } -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=827846 3 | // for the documentation about the extensions.json format 4 | "recommendations": [ 5 | "luquedaniel.languague-renpy", 6 | "ms-python.python", 7 | "ms-vscode.powershell", 8 | "mrorz.language-gettext", 9 | "ms-python.black-formatter" 10 | ] 11 | } -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Usare IntelliSense per informazioni sui possibili attributi. 3 | // Al passaggio del mouse vengono visualizzate le descrizioni degli attributi esistenti. 4 | // Per altre informazioni, visitare: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Ren'Py: Setup", 9 | "type": "PowerShell", 10 | "request": "launch", 11 | "script": "echo \"${input:RenPySdk}\" > .renpy-sdk", 12 | }, 13 | { 14 | "name": "Ren'Py: Run", 15 | "type": "PowerShell", 16 | "request": "launch", 17 | "script": "bin/renpy.ps1 run", 18 | "cwd": "${workspaceFolder}" 19 | }, 20 | { 21 | "name": "Ren'Py: Recompile & Run", 22 | "type": "PowerShell", 23 | "request": "launch", 24 | "script": "bin/renpy.ps1 compile; bin/renpy.ps1 run", 25 | "cwd": "${workspaceFolder}" 26 | }, 27 | { 28 | "name": "Ren'Py: Delete Persistent", 29 | "type": "PowerShell", 30 | "request": "launch", 31 | "script": "bin/renpy.ps1 rmpersistent", 32 | "cwd": "${workspaceFolder}" 33 | }, 34 | { 35 | "name": "Ren'Py: Lint", 36 | "type": "PowerShell", 37 | "request": "launch", 38 | "script": "bin/renpy.ps1 lint", 39 | "cwd": "${workspaceFolder}" 40 | }, 41 | { 42 | "name": "Ren'Py: Distribute", 43 | "type": "PowerShell", 44 | "request": "launch", 45 | "script": "bin/renpy.ps1 distribute", 46 | "cwd": "${workspaceFolder}" 47 | }, 48 | ], 49 | "inputs": [ 50 | { 51 | "id": "RenPySdk", 52 | "description": "Paste the path to your Ren'Py SDK folder", 53 | "type": "promptString", 54 | } 55 | ] 56 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | // format 3 | "[renpy]": { 4 | "editor.defaultFormatter": "ms-python.python", 5 | }, 6 | "[python]": { 7 | "editor.defaultFormatter": "ms-python.black-formatter" 8 | }, 9 | "python.formatting.provider": "none", 10 | "editor.formatOnSave": true, 11 | // reorganise imports 12 | "editor.codeActionsOnSave": { 13 | "source.organizeImports": "explicit" 14 | }, 15 | // hide 16 | "files.exclude": { 17 | "**/*.rpyc": true, 18 | "**/*.rpa": true, 19 | "**/*.rpymc": true, 20 | "**/cache/": true 21 | }, 22 | // olther 23 | "extensions.ignoreRecommendations": false, 24 | "diffEditor.ignoreTrimWhitespace": false, 25 | "python.analysis.typeCheckingMode": "basic", 26 | // color 27 | "editor.tokenColorCustomizations": { 28 | "textMateRules": [ 29 | { 30 | "scope": "renpy.meta.plain", 31 | "settings": { 32 | "fontStyle": "" 33 | } 34 | }, 35 | { 36 | "scope": "renpy.meta.i", 37 | "settings": { 38 | "fontStyle": "italic" 39 | } 40 | }, 41 | { 42 | "scope": "renpy.meta.b", 43 | "settings": { 44 | "fontStyle": "bold" 45 | } 46 | }, 47 | { 48 | "scope": [ 49 | "renpy.meta.u", 50 | "renpy.meta.a" 51 | ], 52 | "settings": { 53 | "fontStyle": "underline" 54 | } 55 | }, 56 | { 57 | "scope": "renpy.meta.s", 58 | "settings": { 59 | "fontStyle": "strikethrough" 60 | } 61 | }, 62 | { 63 | "scope": "renpy.meta.i renpy.meta.b", 64 | "settings": { 65 | "fontStyle": "italic bold" 66 | } 67 | }, 68 | { 69 | "scope": "renpy.meta.i renpy.meta.u", 70 | "settings": { 71 | "fontStyle": "italic underline" 72 | } 73 | }, 74 | { 75 | "scope": "renpy.meta.i renpy.meta.s", 76 | "settings": { 77 | "fontStyle": "italic strikethrough" 78 | } 79 | }, 80 | { 81 | "scope": "renpy.meta.b renpy.meta.u", 82 | "settings": { 83 | "fontStyle": "bold underline" 84 | } 85 | }, 86 | { 87 | "scope": "renpy.meta.b renpy.meta.s", 88 | "settings": { 89 | "fontStyle": "bold strikethrough" 90 | } 91 | }, 92 | { 93 | "scope": "renpy.meta.u renpy.meta.s", 94 | "settings": { 95 | "fontStyle": "underline strikethrough" 96 | } 97 | }, 98 | { 99 | "scope": "renpy.meta.i renpy.meta.b renpy.meta.u", 100 | "settings": { 101 | "fontStyle": "italic bold underline" 102 | } 103 | }, 104 | { 105 | "scope": "renpy.meta.i renpy.meta.b renpy.meta.s", 106 | "settings": { 107 | "fontStyle": "italic bold strikethrough" 108 | } 109 | }, 110 | { 111 | "scope": "renpy.meta.i renpy.meta.u renpy.meta.s", 112 | "settings": { 113 | "fontStyle": "italic underline strikethrough" 114 | } 115 | }, 116 | { 117 | "scope": "renpy.meta.b renpy.meta.u renpy.meta.s", 118 | "settings": { 119 | "fontStyle": "bold underline strikethrough" 120 | } 121 | }, 122 | { 123 | "scope": "renpy.meta.i renpy.meta.b renpy.meta.u renpy.meta.s", 124 | "settings": { 125 | "fontStyle": "italic bold underline strikethrough" 126 | } 127 | }, 128 | { 129 | "scope": "renpy.meta.color.text", 130 | "settings": { 131 | "foreground": "#ffffff" 132 | } 133 | }, 134 | { 135 | "scope": "renpy.meta.color.#cfc", 136 | "settings": { 137 | "foreground": "#cfc" 138 | } 139 | }, 140 | { 141 | "scope": "renpy.meta.color.#fcc", 142 | "settings": { 143 | "foreground": "#fcc" 144 | } 145 | }, 146 | { 147 | "scope": "renpy.meta.color.#fff", 148 | "settings": { 149 | "foreground": "#fff" 150 | } 151 | }, 152 | { 153 | "scope": "renpy.meta.color.#570058", 154 | "settings": { 155 | "foreground": "#570058" 156 | } 157 | }, 158 | { 159 | "scope": "renpy.meta.color.#cc5dcd", 160 | "settings": { 161 | "foreground": "#cc5dcd" 162 | } 163 | }, 164 | { 165 | "scope": "renpy.meta.color.#ff0000", 166 | "settings": { 167 | "foreground": "#ff0000" 168 | } 169 | }, 170 | { 171 | "scope": "renpy.meta.color.#f00", 172 | "settings": { 173 | "foreground": "#f00" 174 | } 175 | }, 176 | { 177 | "scope": "renpy.meta.color.#00ff00", 178 | "settings": { 179 | "foreground": "#00ff00" 180 | } 181 | }, 182 | { 183 | "scope": "renpy.meta.color.#e59400", 184 | "settings": { 185 | "foreground": "#e59400" 186 | } 187 | }, 188 | { 189 | "scope": "renpy.meta.color.#ffbe00", 190 | "settings": { 191 | "foreground": "#ffbe00" 192 | } 193 | }, 194 | { 195 | "scope": "renpy.meta.color.#00ccff", 196 | "settings": { 197 | "foreground": "#00ccff" 198 | } 199 | }, 200 | { 201 | "scope": "renpy.meta.color.#f5bc02", 202 | "settings": { 203 | "foreground": "#f5bc02" 204 | } 205 | }, 206 | { 207 | "scope": "renpy.meta.color.#ffffff", 208 | "settings": { 209 | "foreground": "#ffffff" 210 | } 211 | }, 212 | { 213 | "scope": "renpy.meta.color.#ffff", 214 | "settings": { 215 | "foreground": "#ffff" 216 | } 217 | }, 218 | { 219 | "scope": "renpy.meta.color.#000000", 220 | "settings": { 221 | "foreground": "#000000" 222 | } 223 | }, 224 | { 225 | "scope": "renpy.meta.color.#00008b", 226 | "settings": { 227 | "foreground": "#00008b" 228 | } 229 | }, 230 | { 231 | "scope": "renpy.meta.color.e is", 232 | "settings": { 233 | "foreground": "e is" 234 | } 235 | }, 236 | { 237 | "scope": "renpy.meta.color.{/color", 238 | "settings": { 239 | "foreground": "{/color" 240 | } 241 | }, 242 | { 243 | "scope": "renpy.meta.color. is an ", 244 | "settings": { 245 | "foreground": " is an " 246 | } 247 | }, 248 | { 249 | "scope": "renpy.meta.color./color}", 250 | "settings": { 251 | "foreground": "/color}" 252 | } 253 | } 254 | ] 255 | } 256 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 DRincs Productions 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Navigation Quest Time Routine System for Ren'Py 2 | 3 | ![Last commit](https://img.shields.io/github/last-commit/DRincs-Productions/NQTR-System) 4 | ![License](https://img.shields.io/github/license/DRincs-Productions/NQTR-System) 5 | 6 | Discord 7 | 8 | 9 | A complete system introducing the concepts of location, time and event, producing the framework of a not-quite-point-and-click adventure game. 10 | 11 | This repo is a complete set of tools to create a game where you can explore and relate to characters. 12 | 13 | Feel free to contribute, fork this and send a pull request. 😄 14 | 15 | Itch.io Page: https://drincs-productions.itch.io/nqtr-system 16 | 17 | ---- 18 | 19 | ## TO DOWNLOAD THIS TEST PROJECT 20 | 21 | ```shell 22 | # Basic command to download projects from git 23 | git clone https://github.com/DRincs-Productions/NQTR-System 24 | # IMPORTANT -> Will add the libraries needed to run the program 25 | cd NQTR-System 26 | git submodule update --init --recursive 27 | 28 | ``` 29 | 30 | ---- 31 | 32 | ## Documentation 33 | 34 | **[Wiki](https://github.com/DRincs-Productions/NQTR-System/wiki)** 35 | 36 | ## Code snippets ([VSCode](https://code.visualstudio.com/)) 37 | 38 | (all begin with `DR_`) 39 | 40 | Download the: [link](https://github.com/DRincs-Productions/NQTR-System/releases/tag/code-snippets%2Fv2.0.0) 41 | 42 | ![ezgif com-gif-maker (1)](https://user-images.githubusercontent.com/67595890/179365279-0d0b6d45-0048-4a0d-8c6d-9571b9c328f4.gif) 43 | 44 | ## Install LTS Version 45 | 46 | To install a precise version install it manually: [Releases](https://github.com/DRincs-Productions/NQTR-System/releases). 47 | 48 | But I recommend you to use git submodule: 49 | 50 | ```bash 51 | # renpy-utility-lib 52 | git submodule add -b python-lib -- https://github.com/DRincs-Productions/renpy-utility-lib 'pythonpackages/renpy_utility' 53 | git submodule add -b renpy-lib -- https://github.com/DRincs-Productions/renpy-utility-lib 'game/renpy_utility_tool' 54 | # renpy-utility-lib 55 | git submodule add -b main -- https://github.com/DRincs-Productions/renpy-screens-style 'game/screens_style' 56 | # NQTR-System 57 | git submodule add -b python-lib -- https://github.com/DRincs-Productions/NQTR-System 'pythonpackages/nqtr' 58 | git submodule add -b renpy-lib -- https://github.com/DRincs-Productions/NQTR-System 'game/nqtr_tool' 59 | git submodule add -b screens -- https://github.com/DRincs-Productions/NQTR-System 'game/nqtr_screens' 60 | git submodule add -b interface-images -- https://github.com/DRincs-Productions/NQTR-System 'game/nqtr_interface' 61 | 62 | ``` 63 | 64 | **AND** create a empty file `__init__.py` into `pythonpackages/` so `pythonpackages/__init__.py`. 65 | 66 | add `after_load` into `core.rpy` for update values after game update: 67 | 68 | ```renpy 69 | label after_load: 70 | # ... 71 | 72 | # renpy-utility-lib 73 | call update_current_flags(update_dictionary = True) 74 | 75 | # nqtr 76 | python: 77 | # timeHandler update: if you update TimeHandler settings into a new version, you can use this function to update the old save files. 78 | updateTimeHandler(tm) 79 | # clear the expired actions and routine 80 | from pythonpackages.nqtr.action import clear_expired_actions 81 | from pythonpackages.nqtr.routine import clear_expired_routine 82 | clear_expired_actions(actions, tm.day) 83 | clear_expired_routine(routine, tm) 84 | # recheck the character's events and commitments in current location 85 | from pythonpackages.nqtr.routine import characters_events_in_current_location 86 | from pythonpackages.nqtr.routine import characters_commitment_in_current_location 87 | cur_events_location = characters_events_in_current_location(cur_location.id, routine, tm, flags) 88 | commitments_in_cur_location = characters_commitment_in_current_location(cur_location.id, routine | df_routine, tm, flags) 89 | # update the quest levels, if ypu add a new stage in the quest, you can use this function to start the new stage 90 | update_quests_levels() 91 | return 92 | ``` 93 | 94 | ## Update new version 95 | 96 | ```bash 97 | git submodule update --init --recursive 98 | 99 | ``` 100 | 101 | ## Preview 102 | 103 | ![Navigation](https://github.com/DRincs-Productions/NQTR-System/assets/67595890/6b493f40-d809-46f1-80ee-b2a905f1951d) 104 | 105 | ![Map](https://user-images.githubusercontent.com/67595890/178110045-34cd7b96-5010-48bb-89a0-5598d5848fb0.jpg) 106 | 107 | ![Routine](https://github.com/DRincs-Productions/NQTR-System/assets/67595890/f1d04e2a-d38c-443b-a1a7-49e774efb513) 108 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | Use this section to tell people about which versions of your project are 6 | currently being supported with security updates. 7 | 8 | | Version | Supported | 9 | | ------- | ------------------ | 10 | | 5.1.x | :white_check_mark: | 11 | | 5.0.x | :x: | 12 | | 4.0.x | :white_check_mark: | 13 | | < 4.0 | :x: | 14 | 15 | ## Reporting a Vulnerability 16 | 17 | Use this section to tell people how to report a vulnerability. 18 | 19 | Tell them where to go, how often they can expect to get an update on a 20 | reported vulnerability, what to expect if the vulnerability is accepted or 21 | declined, etc. 22 | -------------------------------------------------------------------------------- /bin/renpy.ps1: -------------------------------------------------------------------------------- 1 | param( 2 | [string] $Command = "run" 3 | ) 4 | $RenPy = Get-Content (Resolve-Path ".renpy-sdk") 5 | $RenPy = [string]::join("", ($RenPy.Split("`n"))) 6 | 7 | if ($IsWindows -or $IsLinux -or $IsMacOS) { 8 | if ($IsWindows) { 9 | Write-Output "Renpy will run on a Windows system" 10 | Write-Output "Using Ren'Py SDK: $RenPy\renpy.exe" 11 | Start-Process -FilePath "$RenPy\renpy.exe" -ArgumentList ". $Command" -Wait 12 | } 13 | if ($IsLinux) { 14 | Write-Output "Renpy will run on a Linux system" 15 | Write-Output "Using Ren'Py SDK: $RenPy/renpy.sh" 16 | Start-Process -FilePath "$RenPy/renpy.sh" -ArgumentList ". $Command" -Wait 17 | } 18 | if ($IsMacOS) { 19 | Write-Output "Renpy will run on a MacOS system" 20 | Write-Output "Using Ren'Py SDK: $RenPy/renpy.sh" 21 | Start-Process -FilePath "$RenPy/renpy.sh" -ArgumentList ". $Command" -Wait 22 | } 23 | } 24 | else { 25 | Write-Output "Renpy will run on an unknown system, may not work" 26 | Write-Output "Using Ren'Py SDK: $RenPy/renpy.sh" 27 | Start-Process -FilePath "$RenPy/renpy.sh" -ArgumentList ". $Command" -Wait 28 | } 29 | 30 | -------------------------------------------------------------------------------- /console/debug.rpy: -------------------------------------------------------------------------------- 1 | init python: 2 | from inspect import getargspec 3 | config.debug = True 4 | config.developer = True 5 | 6 | def scan_(s, *types): 7 | for k, v in globals().items(): 8 | if ( 9 | s.lower() in k.lower() 10 | # and (not exclude or not isinstance(v, exclude)) 11 | and (not types or isinstance(v, types)) 12 | ): 13 | yield k, v 14 | 15 | def l_(s, *types): 16 | results = list(scan_(s, *types)) 17 | width = max(map(lambda (k, v): len(k), results or [('', None)])) 18 | print "-", s, types, "found", len(results), "----------------" 19 | for k, v in results: 20 | print k.ljust(width), v_(v) 21 | print "Done." 22 | 23 | def v_(v): 24 | if callable(v): 25 | try: 26 | return getargspec(v) 27 | except Exception as e: 28 | return repr(v) + " -- Exception: " + repr(e) 29 | return repr(v) 30 | -------------------------------------------------------------------------------- /game/core.rpy: -------------------------------------------------------------------------------- 1 | define config.log = "log.txt" 2 | 3 | label after_load: 4 | # renpy-utility-lib 5 | call update_current_flags(update_dictionary = True) 6 | 7 | # nqtr 8 | python: 9 | # timeHandler update: if you update TimeHandler settings into a new version, you can use this function to update the old save files. 10 | updateTimeHandler(tm) 11 | # clear the expired actions and routine 12 | from pythonpackages.nqtr.action import clear_expired_actions 13 | from pythonpackages.nqtr.routine import clear_expired_routine 14 | clear_expired_actions(actions, tm.day) 15 | clear_expired_routine(routine, tm) 16 | # recheck the character's events and commitments in current location 17 | from pythonpackages.nqtr.routine import characters_events_in_current_location 18 | from pythonpackages.nqtr.routine import characters_commitment_in_current_location 19 | cur_events_location = characters_events_in_current_location(cur_location.id, routine, tm, flags) 20 | commitments_in_cur_location = characters_commitment_in_current_location(cur_location.id, routine | df_routine, tm, flags) 21 | # update the quest levels, if ypu add a new stage in the quest, you can use this function to start the new stage 22 | update_quests_levels() 23 | return 24 | -------------------------------------------------------------------------------- /game/flags_value.rpy: -------------------------------------------------------------------------------- 1 | # Wiki: https://github.com/DRincs-Productions/renpy-utility-lib/wiki/Flags 2 | define flag_keys = [ 3 | # Block all spend_time 4 | "not_can_spend_time", 5 | "goout", 6 | "weekend", 7 | ] 8 | 9 | # Wiki: https://github.com/DRincs-Productions/renpy-utility-lib/wiki/Flags#update_current_flags 10 | label update_current_flags_custom: 11 | # Custom code 12 | if tm.is_weekend: 13 | $ set_flags("weekend", True) 14 | else: 15 | $ set_flags("weekend", False) 16 | return 17 | -------------------------------------------------------------------------------- /game/gui/bar/bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/bar/bottom.png -------------------------------------------------------------------------------- /game/gui/bar/left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/bar/left.png -------------------------------------------------------------------------------- /game/gui/bar/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/bar/right.png -------------------------------------------------------------------------------- /game/gui/bar/top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/bar/top.png -------------------------------------------------------------------------------- /game/gui/button/check_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/button/check_foreground.png -------------------------------------------------------------------------------- /game/gui/button/check_selected_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/button/check_selected_foreground.png -------------------------------------------------------------------------------- /game/gui/button/choice_hover_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/button/choice_hover_background.png -------------------------------------------------------------------------------- /game/gui/button/choice_idle_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/button/choice_idle_background.png -------------------------------------------------------------------------------- /game/gui/button/hover_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/button/hover_background.png -------------------------------------------------------------------------------- /game/gui/button/idle_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/button/idle_background.png -------------------------------------------------------------------------------- /game/gui/button/quick_hover_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/button/quick_hover_background.png -------------------------------------------------------------------------------- /game/gui/button/quick_idle_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/button/quick_idle_background.png -------------------------------------------------------------------------------- /game/gui/button/radio_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/button/radio_foreground.png -------------------------------------------------------------------------------- /game/gui/button/radio_selected_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/button/radio_selected_foreground.png -------------------------------------------------------------------------------- /game/gui/button/slot_hover_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/button/slot_hover_background.png -------------------------------------------------------------------------------- /game/gui/button/slot_idle_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/button/slot_idle_background.png -------------------------------------------------------------------------------- /game/gui/frame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/frame.png -------------------------------------------------------------------------------- /game/gui/game_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/game_menu.png -------------------------------------------------------------------------------- /game/gui/main_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/main_menu.png -------------------------------------------------------------------------------- /game/gui/namebox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/namebox.png -------------------------------------------------------------------------------- /game/gui/notify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/notify.png -------------------------------------------------------------------------------- /game/gui/nvl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/nvl.png -------------------------------------------------------------------------------- /game/gui/overlay/confirm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/overlay/confirm.png -------------------------------------------------------------------------------- /game/gui/overlay/game_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/overlay/game_menu.png -------------------------------------------------------------------------------- /game/gui/overlay/main_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/overlay/main_menu.png -------------------------------------------------------------------------------- /game/gui/phone/bar/bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/bar/bottom.png -------------------------------------------------------------------------------- /game/gui/phone/bar/left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/bar/left.png -------------------------------------------------------------------------------- /game/gui/phone/bar/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/bar/right.png -------------------------------------------------------------------------------- /game/gui/phone/bar/top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/bar/top.png -------------------------------------------------------------------------------- /game/gui/phone/button/check_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/button/check_foreground.png -------------------------------------------------------------------------------- /game/gui/phone/button/check_selected_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/button/check_selected_foreground.png -------------------------------------------------------------------------------- /game/gui/phone/button/choice_hover_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/button/choice_hover_background.png -------------------------------------------------------------------------------- /game/gui/phone/button/choice_idle_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/button/choice_idle_background.png -------------------------------------------------------------------------------- /game/gui/phone/button/hover_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/button/hover_background.png -------------------------------------------------------------------------------- /game/gui/phone/button/idle_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/button/idle_background.png -------------------------------------------------------------------------------- /game/gui/phone/button/radio_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/button/radio_foreground.png -------------------------------------------------------------------------------- /game/gui/phone/button/radio_selected_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/button/radio_selected_foreground.png -------------------------------------------------------------------------------- /game/gui/phone/button/slot_hover_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/button/slot_hover_background.png -------------------------------------------------------------------------------- /game/gui/phone/button/slot_idle_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/button/slot_idle_background.png -------------------------------------------------------------------------------- /game/gui/phone/nvl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/nvl.png -------------------------------------------------------------------------------- /game/gui/phone/overlay/game_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/overlay/game_menu.png -------------------------------------------------------------------------------- /game/gui/phone/overlay/main_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/overlay/main_menu.png -------------------------------------------------------------------------------- /game/gui/phone/scrollbar/horizontal_hover_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/scrollbar/horizontal_hover_bar.png -------------------------------------------------------------------------------- /game/gui/phone/scrollbar/horizontal_hover_thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/scrollbar/horizontal_hover_thumb.png -------------------------------------------------------------------------------- /game/gui/phone/scrollbar/horizontal_idle_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/scrollbar/horizontal_idle_bar.png -------------------------------------------------------------------------------- /game/gui/phone/scrollbar/horizontal_idle_thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/scrollbar/horizontal_idle_thumb.png -------------------------------------------------------------------------------- /game/gui/phone/scrollbar/vertical_hover_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/scrollbar/vertical_hover_bar.png -------------------------------------------------------------------------------- /game/gui/phone/scrollbar/vertical_hover_thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/scrollbar/vertical_hover_thumb.png -------------------------------------------------------------------------------- /game/gui/phone/scrollbar/vertical_idle_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/scrollbar/vertical_idle_bar.png -------------------------------------------------------------------------------- /game/gui/phone/scrollbar/vertical_idle_thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/scrollbar/vertical_idle_thumb.png -------------------------------------------------------------------------------- /game/gui/phone/slider/horizontal_hover_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/slider/horizontal_hover_bar.png -------------------------------------------------------------------------------- /game/gui/phone/slider/horizontal_hover_thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/slider/horizontal_hover_thumb.png -------------------------------------------------------------------------------- /game/gui/phone/slider/horizontal_idle_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/slider/horizontal_idle_bar.png -------------------------------------------------------------------------------- /game/gui/phone/slider/horizontal_idle_thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/slider/horizontal_idle_thumb.png -------------------------------------------------------------------------------- /game/gui/phone/slider/vertical_hover_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/slider/vertical_hover_bar.png -------------------------------------------------------------------------------- /game/gui/phone/slider/vertical_hover_thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/slider/vertical_hover_thumb.png -------------------------------------------------------------------------------- /game/gui/phone/slider/vertical_idle_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/slider/vertical_idle_bar.png -------------------------------------------------------------------------------- /game/gui/phone/slider/vertical_idle_thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/slider/vertical_idle_thumb.png -------------------------------------------------------------------------------- /game/gui/phone/textbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/phone/textbox.png -------------------------------------------------------------------------------- /game/gui/scrollbar/horizontal_hover_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/scrollbar/horizontal_hover_bar.png -------------------------------------------------------------------------------- /game/gui/scrollbar/horizontal_hover_thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/scrollbar/horizontal_hover_thumb.png -------------------------------------------------------------------------------- /game/gui/scrollbar/horizontal_idle_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/scrollbar/horizontal_idle_bar.png -------------------------------------------------------------------------------- /game/gui/scrollbar/horizontal_idle_thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/scrollbar/horizontal_idle_thumb.png -------------------------------------------------------------------------------- /game/gui/scrollbar/vertical_hover_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/scrollbar/vertical_hover_bar.png -------------------------------------------------------------------------------- /game/gui/scrollbar/vertical_hover_thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/scrollbar/vertical_hover_thumb.png -------------------------------------------------------------------------------- /game/gui/scrollbar/vertical_idle_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/scrollbar/vertical_idle_bar.png -------------------------------------------------------------------------------- /game/gui/scrollbar/vertical_idle_thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/scrollbar/vertical_idle_thumb.png -------------------------------------------------------------------------------- /game/gui/skip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/skip.png -------------------------------------------------------------------------------- /game/gui/slider/horizontal_hover_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/slider/horizontal_hover_bar.png -------------------------------------------------------------------------------- /game/gui/slider/horizontal_hover_thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/slider/horizontal_hover_thumb.png -------------------------------------------------------------------------------- /game/gui/slider/horizontal_idle_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/slider/horizontal_idle_bar.png -------------------------------------------------------------------------------- /game/gui/slider/horizontal_idle_thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/slider/horizontal_idle_thumb.png -------------------------------------------------------------------------------- /game/gui/slider/vertical_hover_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/slider/vertical_hover_bar.png -------------------------------------------------------------------------------- /game/gui/slider/vertical_hover_thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/slider/vertical_hover_thumb.png -------------------------------------------------------------------------------- /game/gui/slider/vertical_idle_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/slider/vertical_idle_bar.png -------------------------------------------------------------------------------- /game/gui/slider/vertical_idle_thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/slider/vertical_idle_thumb.png -------------------------------------------------------------------------------- /game/gui/textbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/textbox.png -------------------------------------------------------------------------------- /game/gui/window_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/gui/window_icon.png -------------------------------------------------------------------------------- /game/images.rpy: -------------------------------------------------------------------------------- 1 | # rooms 2 | image pre icon myroom = Transform("location/myroom-[tm.timeslot_number].webp", xysize=(gui.sprite_size_x, gui.sprite_size)) 3 | image icon myroom = LayeredImageMask("pre icon myroom", 4 | Transform(crop=(gui.sprite_size_padding_x, 0, gui.sprite_size, gui.sprite_size)), 5 | mask="sprite mask", 6 | foreground="sprite foreground", 7 | background="sprite background" 8 | ) 9 | image pre icon aliceroom = Transform("location/aliceroom-[tm.timeslot_number].webp", xysize=(gui.sprite_size_x, gui.sprite_size)) 10 | image icon aliceroom = LayeredImageMask("pre icon aliceroom", 11 | Transform(crop=(gui.sprite_size_padding_x, 0, gui.sprite_size, gui.sprite_size)), 12 | mask="sprite mask", 13 | foreground="sprite foreground", 14 | background="sprite background" 15 | ) 16 | image pre icon annroom = Transform("location/annroom-[tm.timeslot_number].webp", xysize=(gui.sprite_size_x, gui.sprite_size)) 17 | image icon annroom = LayeredImageMask("pre icon annroom", 18 | Transform(crop=(gui.sprite_size_padding_x, 0, gui.sprite_size, gui.sprite_size)), 19 | mask="sprite mask", 20 | foreground="sprite foreground", 21 | background="sprite background" 22 | ) 23 | image pre icon bathroom = Transform("location/bathroom.webp", xysize=(gui.sprite_size_x, gui.sprite_size)) 24 | image icon bathroom = LayeredImageMask("pre icon bathroom", 25 | Transform(crop=(gui.sprite_size_padding_x, 0, gui.sprite_size, gui.sprite_size)), 26 | mask="sprite mask", 27 | foreground="sprite foreground", 28 | background="sprite background" 29 | ) 30 | image pre icon lounge = Transform("location/lounge-[tm.timeslot_number].webp", xysize=(gui.sprite_size_x, gui.sprite_size)) 31 | image icon lounge = LayeredImageMask("pre icon lounge", 32 | Transform(crop=(gui.sprite_size_padding_x, 0, gui.sprite_size, gui.sprite_size)), 33 | mask="sprite mask", 34 | foreground="sprite foreground", 35 | background="sprite background" 36 | ) 37 | image pre icon terrace = Transform("location/terrace-[tm.timeslot_number].webp", xysize=(gui.sprite_size_x, gui.sprite_size)) 38 | image icon terrace = LayeredImageMask("pre icon terrace", 39 | Transform(crop=(gui.sprite_size_padding_x, 0, gui.sprite_size, gui.sprite_size)), 40 | mask="sprite mask", 41 | foreground="sprite foreground", 42 | background="sprite background" 43 | ) 44 | image pre icon courtyard = Transform("location/courtyard-[tm.timeslot_number].webp", xysize=(gui.sprite_size_x, gui.sprite_size)) 45 | image icon courtyard = LayeredImageMask("pre icon courtyard", 46 | Transform(crop=(gui.sprite_size_padding_x, 0, gui.sprite_size, gui.sprite_size)), 47 | mask="sprite mask", 48 | foreground="sprite foreground", 49 | background="sprite background" 50 | ) 51 | image pre icon gym = Transform("location/gym.webp", xysize=(gui.sprite_size_x, gui.sprite_size)) 52 | image icon gym = LayeredImageMask("pre icon gym", 53 | Transform(crop=(gui.sprite_size_padding_x, 0, gui.sprite_size, gui.sprite_size)), 54 | mask="sprite mask", 55 | foreground="sprite foreground", 56 | background="sprite background" 57 | ) 58 | 59 | # locations 60 | image pre map home = Transform("/nqtr_interface/home-00.webp", xysize=(gui.sprite_size, gui.sprite_size)) 61 | image icon map home = LayeredImageMask("pre map home", 62 | Transform(crop=(0, 0, gui.sprite_size, gui.sprite_size)), 63 | mask="sprite mask", 64 | foreground="sprite foreground", 65 | background="sprite background" 66 | ) 67 | image pre map gym = Transform("/nqtr_interface/gym.webp", xysize=(gui.sprite_size, gui.sprite_size)) 68 | image icon map gym = LayeredImageMask("pre map gym", 69 | Transform(crop=(0, 0, gui.sprite_size, gui.sprite_size)), 70 | mask="sprite mask", 71 | foreground="sprite foreground", 72 | background="sprite background" 73 | ) 74 | 75 | image pre icon alice = Transform("icon/Alice.webp", xysize=(gui.sprite_elaborate_size, gui.sprite_elaborate_size)) 76 | image icon alice = LayeredImageMask("pre icon alice", 77 | Transform(crop=(0, 0, gui.sprite_elaborate_size, gui.sprite_elaborate_size)), 78 | mask="sprite mask elaborate", 79 | foreground="sprite foreground elaborate", 80 | background="sprite background elaborate" 81 | ) 82 | image icon ann = "icon/Ann.webp" 83 | 84 | image bg map = "location/map-[tm.timeslot_number].webp" 85 | image bg nightcity = "location/nightcity.webp" 86 | 87 | image bg myroom = "location/myroom-[tm.timeslot_number].webp" 88 | image bg aliceroom = "location/aliceroom-[tm.timeslot_number].webp" 89 | image bg annroom = "location/annroom-[tm.timeslot_number].webp" 90 | image bg bathroom = "location/bathroom.webp" 91 | image bg lounge = "location/lounge-[tm.timeslot_number].webp" 92 | image bg terrace = "location/terrace-[tm.timeslot_number].webp" 93 | image bg courtyard = "location/courtyard-[tm.timeslot_number].webp" 94 | image bg gym = "location/gym.webp" 95 | 96 | image bg alice roomsleep = "Alice/roomsleep0A.webp" 97 | image bg alice terrace = "/Alice/terrace0A.webp" 98 | image bg alice terrace talk = "/Alice/terrace0At.webp" 99 | 100 | # Action 101 | image pre action alarm = Transform("/nqtr_interface/alarm.webp", xysize=(gui.sprite_size, gui.sprite_size)) 102 | image action alarm = LayeredImageMask("pre action alarm", 103 | Transform(crop=(0, 0, gui.sprite_size, gui.sprite_size)), 104 | mask="sprite mask", 105 | foreground="sprite foreground", 106 | background="sprite background" 107 | ) 108 | image pre action sleep = Transform("/nqtr_interface/sleep.webp", xysize=(gui.sprite_size, gui.sprite_size)) 109 | image action sleep = LayeredImageMask("pre action sleep", 110 | Transform(crop=(0, 0, gui.sprite_size, gui.sprite_size)), 111 | mask="sprite mask", 112 | foreground="sprite foreground", 113 | background="sprite background" 114 | ) 115 | image pre action box = Transform("/nqtr_interface/box.webp", xysize=(gui.sprite_size, gui.sprite_size)) 116 | image action box = LayeredImageMask("pre action box", 117 | Transform(crop=(0, 0, gui.sprite_size, gui.sprite_size)), 118 | mask="sprite mask", 119 | foreground="sprite foreground", 120 | background="sprite background" 121 | ) 122 | image pre action pc = Transform("/nqtr_interface/pc.webp", xysize=(gui.sprite_size, gui.sprite_size)) 123 | image action pc = LayeredImageMask("pre action pc", 124 | Transform(crop=(0, 0, gui.sprite_size, gui.sprite_size)), 125 | mask="sprite mask", 126 | foreground="sprite foreground", 127 | background="sprite background" 128 | ) 129 | -------------------------------------------------------------------------------- /game/images/Alice/roomsleep0A.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/Alice/roomsleep0A.webp -------------------------------------------------------------------------------- /game/images/Alice/terrace0A.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/Alice/terrace0A.webp -------------------------------------------------------------------------------- /game/images/Alice/terrace0At.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/Alice/terrace0At.webp -------------------------------------------------------------------------------- /game/images/action-key.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/action-key.webp -------------------------------------------------------------------------------- /game/images/icon/Alice.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/icon/Alice.webp -------------------------------------------------------------------------------- /game/images/icon/Ann.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/icon/Ann.webp -------------------------------------------------------------------------------- /game/images/location/aliceroom-0.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/location/aliceroom-0.webp -------------------------------------------------------------------------------- /game/images/location/aliceroom-1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/location/aliceroom-1.webp -------------------------------------------------------------------------------- /game/images/location/aliceroom-2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/location/aliceroom-2.webp -------------------------------------------------------------------------------- /game/images/location/aliceroom-3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/location/aliceroom-3.webp -------------------------------------------------------------------------------- /game/images/location/annroom-0.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/location/annroom-0.webp -------------------------------------------------------------------------------- /game/images/location/annroom-1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/location/annroom-1.webp -------------------------------------------------------------------------------- /game/images/location/annroom-2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/location/annroom-2.webp -------------------------------------------------------------------------------- /game/images/location/annroom-3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/location/annroom-3.webp -------------------------------------------------------------------------------- /game/images/location/bathroom.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/location/bathroom.webp -------------------------------------------------------------------------------- /game/images/location/gym.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/location/gym.webp -------------------------------------------------------------------------------- /game/images/location/loc-0.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/location/loc-0.webp -------------------------------------------------------------------------------- /game/images/location/loc-1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/location/loc-1.webp -------------------------------------------------------------------------------- /game/images/location/loc-2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/location/loc-2.webp -------------------------------------------------------------------------------- /game/images/location/loc-3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/location/loc-3.webp -------------------------------------------------------------------------------- /game/images/location/lounge-0.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/location/lounge-0.webp -------------------------------------------------------------------------------- /game/images/location/lounge-1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/location/lounge-1.webp -------------------------------------------------------------------------------- /game/images/location/lounge-2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/location/lounge-2.webp -------------------------------------------------------------------------------- /game/images/location/lounge-3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/location/lounge-3.webp -------------------------------------------------------------------------------- /game/images/location/map-0.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/location/map-0.webp -------------------------------------------------------------------------------- /game/images/location/map-1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/location/map-1.webp -------------------------------------------------------------------------------- /game/images/location/map-2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/location/map-2.webp -------------------------------------------------------------------------------- /game/images/location/map-3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/location/map-3.webp -------------------------------------------------------------------------------- /game/images/location/myroom-0.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/location/myroom-0.webp -------------------------------------------------------------------------------- /game/images/location/myroom-1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/location/myroom-1.webp -------------------------------------------------------------------------------- /game/images/location/myroom-2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/location/myroom-2.webp -------------------------------------------------------------------------------- /game/images/location/myroom-3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/location/myroom-3.webp -------------------------------------------------------------------------------- /game/images/location/nightcity.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/location/nightcity.webp -------------------------------------------------------------------------------- /game/images/location/terrace-0.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/location/terrace-0.webp -------------------------------------------------------------------------------- /game/images/location/terrace-1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/location/terrace-1.webp -------------------------------------------------------------------------------- /game/images/location/terrace-2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/location/terrace-2.webp -------------------------------------------------------------------------------- /game/images/location/terrace-3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/images/location/terrace-3.webp -------------------------------------------------------------------------------- /game/nqtr_interface/alarm.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/alarm.psd -------------------------------------------------------------------------------- /game/nqtr_interface/alarm.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/alarm.webp -------------------------------------------------------------------------------- /game/nqtr_interface/alarmmodern.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/alarmmodern.psd -------------------------------------------------------------------------------- /game/nqtr_interface/alarmmodern.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/alarmmodern.webp -------------------------------------------------------------------------------- /game/nqtr_interface/box.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/box.webp -------------------------------------------------------------------------------- /game/nqtr_interface/coffe.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/coffe.webp -------------------------------------------------------------------------------- /game/nqtr_interface/college.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/college.webp -------------------------------------------------------------------------------- /game/nqtr_interface/gym.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/gym.webp -------------------------------------------------------------------------------- /game/nqtr_interface/help.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/help.webp -------------------------------------------------------------------------------- /game/nqtr_interface/home-00.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/home-00.webp -------------------------------------------------------------------------------- /game/nqtr_interface/home-01.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/home-01.webp -------------------------------------------------------------------------------- /game/nqtr_interface/home-02.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/home-02.webp -------------------------------------------------------------------------------- /game/nqtr_interface/home-03.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/home-03.webp -------------------------------------------------------------------------------- /game/nqtr_interface/home-04.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/home-04.webp -------------------------------------------------------------------------------- /game/nqtr_interface/home-05.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/home-05.webp -------------------------------------------------------------------------------- /game/nqtr_interface/home-06.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/home-06.webp -------------------------------------------------------------------------------- /game/nqtr_interface/home-07.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/home-07.webp -------------------------------------------------------------------------------- /game/nqtr_interface/home-08.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/home-08.webp -------------------------------------------------------------------------------- /game/nqtr_interface/home-09.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/home-09.webp -------------------------------------------------------------------------------- /game/nqtr_interface/home-10.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/home-10.webp -------------------------------------------------------------------------------- /game/nqtr_interface/home-11.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/home-11.webp -------------------------------------------------------------------------------- /game/nqtr_interface/hotel.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/hotel.webp -------------------------------------------------------------------------------- /game/nqtr_interface/inventory.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/inventory.webp -------------------------------------------------------------------------------- /game/nqtr_interface/laptop.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/laptop.webp -------------------------------------------------------------------------------- /game/nqtr_interface/map.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/map.webp -------------------------------------------------------------------------------- /game/nqtr_interface/memo.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/memo.webp -------------------------------------------------------------------------------- /game/nqtr_interface/options.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/options.webp -------------------------------------------------------------------------------- /game/nqtr_interface/pc.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/pc.webp -------------------------------------------------------------------------------- /game/nqtr_interface/phone.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/phone.webp -------------------------------------------------------------------------------- /game/nqtr_interface/shopping.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/shopping.webp -------------------------------------------------------------------------------- /game/nqtr_interface/sleep.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/sleep.webp -------------------------------------------------------------------------------- /game/nqtr_interface/spa.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/spa.webp -------------------------------------------------------------------------------- /game/nqtr_interface/talk.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/talk.webp -------------------------------------------------------------------------------- /game/nqtr_interface/user.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/user.webp -------------------------------------------------------------------------------- /game/nqtr_interface/wait.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/game/nqtr_interface/wait.webp -------------------------------------------------------------------------------- /game/nqtr_screens/screens_memo.rpy: -------------------------------------------------------------------------------- 1 | # Id of the task selected in the menu 2 | default cur_task_menu = "" 3 | # quest level based on the task selected in the menu 4 | default cur_quest_menu = "" 5 | 6 | screen menu_memo(close_actions = [ Hide("menu_memo") ]): 7 | 8 | roll_forward True 9 | tag menu 10 | 11 | ## Avoid predicting this screen, as it can be very large. 12 | predict False 13 | 14 | modal True 15 | style_prefix "game_menu" 16 | add "gui/overlay/game_menu.png" 17 | 18 | use menu_tile(_("Memo")) 19 | 20 | # Synchronize number_stages_completed_in_quest with quests 21 | $ update_quests_levels() 22 | 23 | use close_button(close_actions) 24 | 25 | frame: 26 | ypos gui.dr_drawer_ypos 27 | xpos gui.dr_drawer_xpos 28 | ysize gui.dr_drawer_ysize 29 | xsize gui.dr_drawer_xsize 30 | background None 31 | # task title list 32 | viewport mousewheel True draggable True id 'menu_memo_task_title_list': 33 | has vbox 34 | spacing 5 35 | for task_id in current_quest_stages.keys(): 36 | button: 37 | xpos gui.interface_text_size 38 | xsize 390 39 | background None 40 | action [ 41 | SetVariable('cur_task_menu', task_id), 42 | SetVariable('cur_quest_menu', number_stages_completed_in_quest[task_id]) 43 | ] 44 | xpadding 0 45 | ypadding 0 46 | xmargin 0 47 | ymargin 0 48 | textbutton quests[task_id].title: 49 | action [ 50 | SetVariable('cur_task_menu', task_id), 51 | SetVariable('cur_quest_menu', number_stages_completed_in_quest[task_id]), 52 | ] 53 | selected cur_task_menu == task_id 54 | # scroll bar 55 | vbar value YScrollValue('menu_memo_task_title_list') style 'dr_menu_vscroll' 56 | 57 | # Information on the current quest 58 | if cur_task_menu != '': 59 | $ quest_menu = quest_stages[quests[cur_task_menu].stage_ids[cur_quest_menu]] 60 | vbox: 61 | xalign 0.72 62 | yalign 0.6 63 | # Image 64 | if quest_menu.info_image != '' and quest_menu.info_image != None: 65 | add Frame(quest_menu.info_image, Borders(0,0,0,0)): 66 | xsize gui.nqtr_menu_memo_image_xsize 67 | ysize gui.nqtr_menu_memo_image_ysize 68 | xalign 0.5 69 | yalign 0 70 | elif quests[cur_task_menu].info_image != '' and quests[cur_task_menu].info_image != None: 71 | add Frame(quests[cur_task_menu].info_image, Borders(0,0,0,0)): 72 | xsize gui.nqtr_menu_memo_image_xsize 73 | ysize gui.nqtr_menu_memo_image_ysize 74 | xalign 0.5 75 | yalign 0 76 | 77 | text quest_menu.title: 78 | size gui.interface_text_size 79 | xalign 0.5 80 | 81 | frame: 82 | # area (0, 0, 1190, 400) 83 | xsize gui.nqtr_menu_memo_frame_xsize 84 | ysize gui.nqtr_menu_memo_frame_ysize 85 | background None 86 | 87 | has hbox 88 | viewport mousewheel True draggable True id 'vp2': 89 | has vbox spacing 30 90 | if cur_task_menu in quests_descriptions: 91 | text quests_descriptions[cur_task_menu] size gui.dr_normal_text_size color gui.accent_color 92 | else: 93 | text quests[cur_task_menu].description size gui.dr_normal_text_size color gui.accent_color 94 | if (current_quest_stages[cur_task_menu].active): 95 | text quest_menu.description size gui.dr_normal_text_size 96 | text quest_menu.advice size gui.dr_big_normal_text_size 97 | for item in quest_menu.goals: 98 | text item.description size gui.dr_big_normal_text_size 99 | if quests[cur_task_menu].is_completed(current_quest_stages, number_stages_completed_in_quest): 100 | if quests[cur_task_menu].development: 101 | text _("It is currently the end of this story, unfortunately you have to wait for an update to continue this story.") size gui.dr_big_normal_text_size 102 | else: 103 | text _("You have completed all the quests.") size gui.dr_big_normal_text_size 104 | else: 105 | text quest_menu.request_description size gui.dr_normal_text_size color gui.accent_color 106 | vbar value YScrollValue('vp2') style 'dr_menu_vscroll' 107 | 108 | if (cur_task_menu != '' and number_stages_completed_in_quest[cur_task_menu] > 0): 109 | # increases and decreases cur_quest menu 110 | imagebutton align (680/1920, 340/1080): 111 | idle "/screens_style/images/next_button.webp" 112 | focus_mask True 113 | sensitive (cur_quest_menu > 0) 114 | action [ 115 | SetVariable('cur_quest_menu', cur_quest_menu - 1), 116 | ] 117 | at dr_button_next_transform(180) 118 | imagebutton align (1580/1920, 340/1080): 119 | idle "/screens_style/images/next_button.webp" 120 | focus_mask True 121 | sensitive (cur_quest_menu < number_stages_completed_in_quest[cur_task_menu]) 122 | action [ 123 | SetVariable('cur_quest_menu', cur_quest_menu + 1), 124 | ] 125 | at dr_button_next_transform(0) 126 | -------------------------------------------------------------------------------- /game/nqtr_screens/screens_nqtr.rpy: -------------------------------------------------------------------------------- 1 | init python: 2 | from pythonpackages.nqtr.navigation import is_closed_room 3 | from pythonpackages.nqtr.routine import commitment_background 4 | from pythonpackages.nqtr.action import current_button_actions, current_picture_in_background_actions 5 | from pythonpackages.nqtr.conversation_fun import current_button_conversations, current_picture_in_background_conversations 6 | 7 | screen room_navigation(): 8 | modal True 9 | # More information by hovering the mouse 10 | $ (x,y) = renpy.get_mouse_pos() 11 | 12 | # Map 13 | if (map_open and cur_map_id): 14 | use map(maps, cur_map_id) 15 | 16 | for location in locations: 17 | # If the Map where I am is the same as the Map where the room is located 18 | use location_button(location) 19 | 20 | else: 21 | # Action and Room with Picture in background 22 | for room in rooms: 23 | if room.is_picture_in_background and not room.is_hidden(flags = flags): 24 | use room_picture_in_background(room) 25 | # Adds the button list of possible actions in that room 26 | if (cur_room and room.id == cur_room.id and not room.id in closed_rooms): 27 | for act in current_picture_in_background_actions(actions= actions | df_actions, room = room, now_hour = tm.hour , current_day = tm.day, tm = tm, flags = flags): 28 | use action_picture_in_background(act) 29 | # Talk 30 | # Adds a talk for each ch (NPC) and at the talk interval adds the icon for each secondary ch 31 | for conversation, comm in current_picture_in_background_conversations(commitments_in_cur_location, room, cur_room): 32 | use conversation_picture_in_background(conversation, comm.conversation_background(conversation.character)) 33 | 34 | # Rooms 35 | use room_button_list(rooms, commitments_in_cur_location) 36 | 37 | # Normal Actions (with side button) 38 | vbox: 39 | yalign 0.95 40 | xalign 0.99 41 | spacing 2 42 | for room in rooms: 43 | # Adds the button list of possible actions in that room 44 | if (cur_room and room.id == cur_room.id): 45 | for act in current_button_actions(actions= actions | df_actions, room = room, now_hour = tm.hour , current_day = tm.day, tm = tm, flags = flags): 46 | use action_button(act) 47 | 48 | # Talk 49 | # Adds a talk for each ch (NPC) and at the talk interval adds the icon for each secondary ch 50 | for conversation, comm in current_button_conversations(commitments_in_cur_location, room, cur_room): 51 | use conversation_button(conversation, comm.conversation_background(conversation.character)) 52 | 53 | # Fixed button to wait 54 | use wait_button() 55 | 56 | # Time 57 | use time_text(tm, show_wait_button = map_open) 58 | 59 | # Tools 60 | hbox: 61 | align (0.01, 0.01) 62 | spacing 2 63 | 64 | imagebutton: 65 | idle nqtr_menu_icon_options 66 | focus_mask True 67 | action ShowMenu('save') 68 | if renpy.variant("pc"): 69 | tooltip _("Settings") 70 | at dr_button_menu_transform 71 | 72 | if renpy.has_label("open_characters_info"): 73 | imagebutton: 74 | idle nqtr_menu_icon_characters_info 75 | focus_mask True 76 | action [ 77 | Call("after_return_from_room_navigation", label_name_to_call = "open_characters_info"), 78 | ] 79 | if renpy.variant("pc"): 80 | tooltip _("Characters info") 81 | at dr_button_menu_transform 82 | 83 | if len(current_quest_stages) > 0 : 84 | imagebutton: 85 | idle nqtr_menu_memo 86 | focus_mask True 87 | action [ 88 | SetVariable('cur_task_menu', ""), 89 | SetVariable('cur_quest_menu', ""), 90 | Show('menu_memo'), 91 | ] 92 | if renpy.variant("pc"): 93 | tooltip _("Memo") 94 | at dr_button_menu_transform 95 | 96 | imagebutton: 97 | idle nqtr_menu_icon_help 98 | focus_mask True 99 | action ShowMenu('help') 100 | if renpy.variant("pc"): 101 | tooltip _("Help") 102 | at dr_button_menu_transform 103 | 104 | hbox: 105 | align (0.99, 0.01) 106 | spacing 2 107 | 108 | # Money 109 | text "$20": 110 | align(1.0, 0.5) 111 | size gui.interface_text_size 112 | drop_shadow [(2, 2)] 113 | 114 | if renpy.has_label("open_inventory"): 115 | imagebutton: 116 | idle nqtr_menu_icon_inventory 117 | focus_mask True 118 | action [ 119 | Call("after_return_from_room_navigation", label_name_to_call = "open_inventory"), 120 | ] 121 | if renpy.variant("pc"): 122 | tooltip _("Backpack") 123 | at dr_button_menu_transform 124 | 125 | if renpy.has_label("open_smartphone"): 126 | imagebutton: 127 | idle nqtr_menu_icon_phone 128 | focus_mask True 129 | action [ 130 | Call("after_return_from_room_navigation", label_name_to_call = "open_smartphone"), 131 | ] 132 | if renpy.variant("pc"): 133 | tooltip _("Smartphone") 134 | at dr_button_menu_transform 135 | 136 | imagebutton: 137 | idle nqtr_menu_icon_map 138 | focus_mask True 139 | action [ 140 | Call("after_return_from_room_navigation", label_name_to_call = "open_map"), 141 | ] 142 | if renpy.variant("pc"): 143 | tooltip _("Map") 144 | at dr_button_menu_transform 145 | 146 | # More information by hovering the mouse 147 | if renpy.variant("pc"): 148 | $ text = GetTooltip() 149 | if text: 150 | text "[text]": 151 | xpos x-20 152 | ypos y-20 153 | size gui.dr_little_text_size 154 | drop_shadow [(2, 2)] 155 | outlines [(2, "#000", 0, 1)] 156 | 157 | label set_background_nqtr: 158 | if (not map_open): 159 | if(is_closed_room(room_id= cur_room.id, closed_rooms= closed_rooms, now_hour= tm.hour, tm = tm)): 160 | # Change the background image to the current room image. 161 | call closed_room_event 162 | else: 163 | $ sp_bg_change_room = commitment_background(commitments_in_cur_location, cur_room.id) 164 | call set_room_background(sp_bg_change_room) 165 | return 166 | 167 | label set_room_background(sp_bg_change_room = ""): 168 | if (not isNullOrEmpty(sp_bg_change_room)): 169 | call set_background(sp_bg_change_room) 170 | else: 171 | call set_background(cur_room.background) 172 | return 173 | 174 | # making calls safely: 175 | # Why? Because if I use Call("label") in sleep mode from the room_navigation 176 | # and in the "label" I use "return" an almost all cases the game will end. 177 | label after_return_from_room_navigation(label_name_to_call = ""): 178 | if isNullOrEmpty(label_name_to_call): 179 | $ log_error("label_name_to_call is empty", renpy.get_filename_line()) 180 | elif not renpy.has_label(label_name_to_call): 181 | $ log_error("label_name_to_call: " + label_name_to_call + " not found", renpy.get_filename_line()) 182 | else: 183 | $ renpy.call(label_name_to_call) 184 | call set_background_nqtr 185 | call screen room_navigation 186 | $ log_error("thera is a anomaly in room_navigation. value: " + label_name_to_call, renpy.get_filename_line()) 187 | jump after_return_from_room_navigation 188 | -------------------------------------------------------------------------------- /game/nqtr_screens/screens_nqtr_component.rpy: -------------------------------------------------------------------------------- 1 | screen wait_button(small = False): 2 | imagebutton: 3 | idle nqtr_menu_icon_wait 4 | focus_mask True 5 | action [ 6 | Call("after_return_from_room_navigation", label_name_to_call = "wait"), 7 | ] 8 | if renpy.variant("pc"): 9 | tooltip _("Wait") 10 | if small: 11 | at nqtr_button_location_transform 12 | else: 13 | at nqtr_button_action_transform 14 | 15 | screen character_icon_screen(icon, my_action = []): 16 | if icon: 17 | imagebutton: 18 | idle icon 19 | focus_mask True 20 | action my_action 21 | at dr_small_face_transform 22 | 23 | screen time_text(tm, show_wait_button = False): 24 | hbox: 25 | align (0.5, 0.01) 26 | vbox: 27 | align (0.5, 0.01) 28 | text "[tm.hour]:00": 29 | xalign (0.5) 30 | size gui.nqtr_hour_text_size 31 | drop_shadow [(2, 2)] 32 | text tm.weekday_name: 33 | xalign (0.5) 34 | size gui.dr_normal_text_size 35 | drop_shadow [(2, 2)] 36 | line_leading -16 37 | 38 | if (show_wait_button): 39 | # Fixed button to wait 40 | use wait_button(small = True) 41 | 42 | screen button_picture_in_background(button, my_actions = []): 43 | imagebutton: 44 | align (button.xalign, button.yalign) 45 | idle button.picture_in_background 46 | hover button.picture_in_background_selected 47 | focus_mask True 48 | action my_actions 49 | if renpy.variant("pc"): 50 | tooltip button.name 51 | if button.picture_in_background_selected == button.picture_in_background: 52 | at nqtr_button_picture_transform 53 | 54 | screen action_button(act): 55 | imagebutton: 56 | idle act.button_icon 57 | hover act.button_icon_selected 58 | focus_mask True 59 | action [ 60 | Call("after_return_from_room_navigation", label_name_to_call = act.label_name), 61 | ] 62 | if renpy.variant("pc"): 63 | tooltip act.name 64 | at nqtr_button_action_transform 65 | 66 | screen action_picture_in_background(act): 67 | use button_picture_in_background(act, [ 68 | Call("after_return_from_room_navigation", label_name_to_call = act.label_name), 69 | ]) 70 | 71 | screen conversation_button(conversation, background): 72 | python: 73 | my_action = [ 74 | SetVariable('current_conversation_character', conversation.character), 75 | SetVariable('conversation_image', background), 76 | Call("after_return_from_room_navigation", label_name_to_call = conversation.label_name), 77 | ] 78 | if not conversation.is_hidden(flags = flags, check_if_has_icon = False): 79 | frame: 80 | xysize (gui.nqtr_button_action_size, gui.nqtr_button_action_size + gui.nqtr_button_action_size_error) 81 | background None 82 | 83 | imagebutton: 84 | align (0.5, 0.0) 85 | if conversation.is_button: 86 | idle conversation.button_icon 87 | hover conversation.button_icon_selected 88 | else: 89 | idle nqtr_menu_icon_talk 90 | focus_mask True 91 | action my_action 92 | at nqtr_button_action_transform 93 | if renpy.variant("pc"): 94 | tooltip _("Talk") 95 | 96 | use character_icon_screen(conversation.character_icon, my_action) 97 | 98 | screen conversation_picture_in_background(conversation): 99 | use button_picture_in_background(conversation, [ 100 | SetVariable('current_conversation_character', conversation.character), 101 | SetVariable('conversation_image', background), 102 | Call("after_return_from_room_navigation", label_name_to_call = conversation.label_name), 103 | ]) 104 | 105 | screen location_button(location): 106 | if (location.map_id == cur_map_id and not location.is_hidden(flags = flags)): 107 | vbox: 108 | align (location.yalign, location.xalign) 109 | imagebutton: 110 | if location.is_picture_in_background: 111 | idle location.picture_in_background 112 | selected_idle location.picture_in_background_selected 113 | selected_hover location.picture_in_background_selected 114 | selected location == cur_location 115 | sensitive not location.is_hidden(flags) 116 | focus_mask True 117 | action [ 118 | SetVariable('cur_location', location), 119 | Call("after_return_from_room_navigation", label_name_to_call = "change_location"), 120 | ] 121 | at nqtr_button_location_transform 122 | 123 | # Locations name 124 | text location.name: 125 | size gui.dr_little_text_size 126 | drop_shadow [(2, 2)] 127 | xalign 0.5 128 | text_align 0.5 129 | line_leading 0 130 | line_spacing -2 131 | 132 | screen map_button(map_id, map, align_value, rotation): 133 | if not map.is_hidden(flags = flags, check_if_has_icon = False): 134 | hbox: 135 | align align_value 136 | imagebutton: 137 | idle "gui triangular_button" 138 | focus_mask True 139 | sensitive not map.is_disabled(flags) 140 | action [ 141 | SetVariable('cur_map_id', map_id), 142 | Call("after_return_from_room_navigation", label_name_to_call = "set_image_map"), 143 | ] 144 | if renpy.variant("pc"): 145 | tooltip map.name 146 | at nqtr_button_map_transform(rotation) 147 | 148 | screen map(maps, cur_map_id): 149 | $ map_id_north = maps[cur_map_id].map_id_north 150 | $ map_id_south = maps[cur_map_id].map_id_south 151 | $ map_id_east = maps[cur_map_id].map_id_east 152 | $ map_id_west = maps[cur_map_id].map_id_west 153 | 154 | # North map 155 | if not isNullOrEmpty(map_id_north): 156 | use map_button(map_id = map_id_north, map = maps[map_id_north], align_value = (0.5, 0.1), rotation = 270) 157 | # South map 158 | if not isNullOrEmpty(map_id_south): 159 | use map_button(map_id = map_id_south, map = maps[map_id_south], align_value = (0.5, 0.99), rotation = 90) 160 | # West map 161 | if not isNullOrEmpty(map_id_west): 162 | use map_button(map_id = map_id_west, map = maps[map_id_west], align_value = (0.001, 0.5), rotation = 180) 163 | # East map 164 | if not isNullOrEmpty(map_id_east): 165 | use map_button(map_id = map_id_east, map = maps[map_id_east], align_value = (0.999, 0.5), rotation = 0) 166 | 167 | screen room_button_list(rooms, commitments_in_cur_location): 168 | $ key_room = 0 169 | # Rooms 170 | hbox: 171 | yalign 0.99 172 | xalign 0.01 173 | spacing 2 174 | 175 | for room in rooms: 176 | # Check the presence of ch in that room 177 | $ there_are_ch = False 178 | for comm in commitments_in_cur_location.values(): 179 | # If it is the selected room 180 | if comm != None and room.id == comm.room_id: 181 | # I insert hbox only if they are sure that someone is there 182 | $ there_are_ch = True 183 | 184 | # If the Locations where I am is the same as the Locations where the room is located 185 | if (room.location_id == cur_location.id and room.is_button and not room.is_hidden(flags)): 186 | $ key_room += 1 187 | use room_button(room, cur_room, key_room, there_are_ch) 188 | 189 | screen room_button(room, cur_room, key_room, find_ch = False): 190 | python: 191 | room_action = [ 192 | SetVariable('prev_room', cur_room), 193 | SetVariable('cur_room', room), 194 | Call("after_return_from_room_navigation", label_name_to_call = "change_room"), 195 | ] 196 | vbox: 197 | frame: 198 | xysize (gui.nqtr_button_room_size, gui.nqtr_button_room_size + gui.dr_little_text_size) 199 | background None 200 | 201 | # Room icon 202 | imagebutton: 203 | align (0.5, - 0.15) 204 | if room.is_button: 205 | idle room.button_icon 206 | selected_idle room.button_icon_selected 207 | selected_hover room.button_icon_selected 208 | selected (True if cur_room and cur_room.id == room.id else False) 209 | sensitive not room.is_disabled(flags) 210 | focus_mask True 211 | action room_action 212 | at nqtr_button_room_transform 213 | 214 | # Character icon 215 | if find_ch: 216 | hbox: 217 | align (0.5, 0.6) 218 | for comm in commitments_in_cur_location.values(): 219 | # If it is the selected room 220 | if room.id == comm.room_id: 221 | use character_icon_screen(comm.character_icon, room_action) 222 | 223 | # Room name 224 | text room.name: 225 | align (0.5, 0.99) 226 | size gui.dr_little_text_size 227 | drop_shadow [(2, 2)] 228 | text_align 0.5 229 | line_leading 0 230 | line_spacing -2 231 | 232 | if key_room < 10: 233 | key str(key_room) action room_action 234 | elif key_room == 10: 235 | key str(0) action room_action 236 | 237 | screen room_picture_in_background(room): 238 | use button_picture_in_background(room, [ 239 | SetVariable('prev_room', cur_room), 240 | SetVariable('cur_room', room), 241 | Call("after_return_from_room_navigation", label_name_to_call = "change_room"), 242 | ]) 243 | -------------------------------------------------------------------------------- /game/nqtr_screens/screens_value.rpy: -------------------------------------------------------------------------------- 1 | define gui.nqtr_icon_small = convert_to_int(gui.sprite_size - (100 * gui.dr_multiplicateur)) 2 | define gui.nqtr_icon_small_crop = convert_to_int(- 50 * gui.dr_multiplicateur) 3 | 4 | image pre nqtr_icon options = Transform("/nqtr_interface/options.webp", xysize=(gui.nqtr_icon_small, gui.nqtr_icon_small)) 5 | image nqtr_icon options = LayeredImageMask("pre nqtr_icon options", 6 | Transform(crop=(gui.nqtr_icon_small_crop, gui.nqtr_icon_small_crop, gui.sprite_size, gui.sprite_size)), 7 | mask="sprite mask", 8 | foreground="sprite foreground", 9 | background="sprite background" 10 | ) 11 | image pre nqtr_icon characters info = Transform("/nqtr_interface/user.webp", xysize=(gui.nqtr_icon_small, gui.nqtr_icon_small)) 12 | image nqtr_icon characters info = LayeredImageMask("pre nqtr_icon characters info", 13 | Transform(crop=(gui.nqtr_icon_small_crop, gui.nqtr_icon_small_crop, gui.sprite_size, gui.sprite_size)), 14 | mask="sprite mask", 15 | foreground="sprite foreground", 16 | background="sprite background" 17 | ) 18 | image pre nqtr_icon memo = Transform("/nqtr_interface/memo.webp", xysize=(gui.nqtr_icon_small, gui.nqtr_icon_small)) 19 | image nqtr_icon memo = LayeredImageMask("pre nqtr_icon memo", 20 | Transform(crop=(gui.nqtr_icon_small_crop, gui.nqtr_icon_small_crop, gui.sprite_size, gui.sprite_size)), 21 | mask="sprite mask", 22 | foreground="sprite foreground", 23 | background="sprite background" 24 | ) 25 | image pre nqtr_icon help = Transform("/nqtr_interface/help.webp", xysize=(gui.nqtr_icon_small, gui.nqtr_icon_small)) 26 | image nqtr_icon help = LayeredImageMask("pre nqtr_icon help", 27 | Transform(crop=(gui.nqtr_icon_small_crop, gui.nqtr_icon_small_crop, gui.sprite_size, gui.sprite_size)), 28 | mask="sprite mask", 29 | foreground="sprite foreground", 30 | background="sprite background" 31 | ) 32 | image pre nqtr_icon inventory = Transform("/nqtr_interface/inventory.webp", xysize=(gui.sprite_size, gui.sprite_size)) 33 | image nqtr_icon inventory = LayeredImageMask("pre nqtr_icon inventory", 34 | Transform(crop=(0, 0, gui.sprite_size, gui.sprite_size)), 35 | mask="sprite mask", 36 | foreground="sprite foreground", 37 | background="sprite background" 38 | ) 39 | image pre nqtr_icon phone = Transform("/nqtr_interface/phone.webp", xysize=(gui.nqtr_icon_small, gui.nqtr_icon_small)) 40 | image nqtr_icon phone = LayeredImageMask("pre nqtr_icon phone", 41 | Transform(crop=(gui.nqtr_icon_small_crop, gui.nqtr_icon_small_crop, gui.sprite_size, gui.sprite_size)), 42 | mask="sprite mask", 43 | foreground="sprite foreground", 44 | background="sprite background" 45 | ) 46 | image pre nqtr_icon map = Transform("/nqtr_interface/map.webp", xysize=(gui.nqtr_icon_small, gui.nqtr_icon_small)) 47 | image nqtr_icon map = LayeredImageMask("pre nqtr_icon map", 48 | Transform(crop=(gui.nqtr_icon_small_crop, gui.nqtr_icon_small_crop, gui.sprite_size, gui.sprite_size)), 49 | mask="sprite mask", 50 | foreground="sprite foreground", 51 | background="sprite background" 52 | ) 53 | image pre nqtr_icon wait = Transform("/nqtr_interface/wait.webp", xysize=(gui.nqtr_icon_small, gui.nqtr_icon_small)) 54 | image nqtr_icon wait = LayeredImageMask("pre nqtr_icon wait", 55 | Transform(crop=(gui.nqtr_icon_small_crop, gui.nqtr_icon_small_crop, gui.sprite_size, gui.sprite_size)), 56 | mask="sprite mask", 57 | foreground="sprite foreground", 58 | background="sprite background" 59 | ) 60 | -------------------------------------------------------------------------------- /game/nqtr_screens/screens_value_fix.rpy: -------------------------------------------------------------------------------- 1 | init -1 python: 2 | if not "nqtr_menu_icon_options" in locals() | globals(): 3 | nqtr_menu_icon_options = "nqtr_icon options" 4 | if not "nqtr_menu_icon_characters_info" in locals() | globals(): 5 | nqtr_menu_icon_characters_info = "nqtr_icon characters info" 6 | if not "nqtr_menu_memo" in locals() | globals(): 7 | nqtr_menu_memo = "nqtr_icon memo" 8 | if not "nqtr_menu_icon_help" in locals() | globals(): 9 | nqtr_menu_icon_help = "nqtr_icon help" 10 | if not "nqtr_menu_icon_inventory" in locals() | globals(): 11 | nqtr_menu_icon_inventory = "nqtr_icon inventory" 12 | if not "nqtr_menu_icon_phone" in locals() | globals(): 13 | nqtr_menu_icon_phone = "nqtr_icon phone" 14 | if not "nqtr_menu_icon_map" in locals() | globals(): 15 | nqtr_menu_icon_map = "nqtr_icon map" 16 | if not "nqtr_menu_icon_wait" in locals() | globals(): 17 | nqtr_menu_icon_wait = "nqtr_icon wait" 18 | -------------------------------------------------------------------------------- /game/nqtr_tool/action_value_fix.rpy: -------------------------------------------------------------------------------- 1 | init -1 python: 2 | if not "df_actions" in locals() | globals(): 3 | df_actions = {} 4 | 5 | # dictionary editable at runtime, but it is strongly discouraged to pre-enter elements (dictionary contents are based only on saves) 6 | default actions = {} 7 | -------------------------------------------------------------------------------- /game/nqtr_tool/conversation_fun.rpy: -------------------------------------------------------------------------------- 1 | init python: 2 | def add_conversation_choice(choice_character, choice_text: str, label_name: str, dict_choices: dict[str, list] = None) -> None: 3 | """Wiki: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Conversation-system#add-an-talk-choice-in-default_label_talk """ 4 | if not dict_choices: 5 | dict_choices = conversations 6 | if get_value_by_character_key(choice_character, dict_choices): 7 | dict_choices[choice_character].append((choice_text, label_name)) 8 | else: 9 | talk_choices = [] 10 | talk_choices.append((choice_text, label_name)) 11 | dict_choices[choice_character] = talk_choices 12 | del talk_choices 13 | return 14 | 15 | 16 | def del_conversation_choice(choice_character: str, choice_text: str, dict_choices: dict[str, list] = None) -> None: 17 | """Wiki: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Conversation-system#delete-an-action-in-default_label_talk """ 18 | val = 0 19 | if not dict_choices: 20 | dict_choices = conversations 21 | ch_to_del = choice_character 22 | for cur_choice in get_value_by_character_key(choice_character, dict_choices): 23 | if cur_choice[0] == choice_text: 24 | ch_to_del = choice_character 25 | break 26 | else: 27 | val = val+1 28 | dict_choices[choice_character].pop(val) 29 | del val 30 | del ch_to_del 31 | return 32 | -------------------------------------------------------------------------------- /game/nqtr_tool/conversation_label_fun.rpy: -------------------------------------------------------------------------------- 1 | define current_conversation_character = None 2 | default conversation_image = None 3 | # used in talk_menu, internally there are the possible choices that you can make in a dialog with a certain ch 4 | # is structured like this: 5 | # 'alice' : [("Choice 1", "label_one"), ("Choice 2", "label_two")] 6 | default conversations = {} 7 | 8 | # Opens the choice menu, with the various dialogs you can currently do with a ch 9 | label talk_menu: 10 | # check if there is already a list of menu choices for current_conversation_character 11 | # if it does not exist it creates it 12 | $ talk_choices = get_value_by_character_key(current_conversation_character, conversations) 13 | if not talk_choices: 14 | $ talk_choices = [] 15 | 16 | $ talk_choices.append((_("Back"), "talk_back")) 17 | $ menu_result = menu(talk_choices) 18 | # remove the item because otherwise every time I talk to a character more "Back" will be added (even if I have not understood why) 19 | $ talk_choices.remove((_("Back"), "talk_back")) 20 | $ del talk_choices 21 | call expression menu_result 22 | return 23 | 24 | # label nqtr_talk: is a label used to give the possibility to customize the dialog even more. 25 | label nqtr_talk: 26 | if (conversation_image != None): 27 | scene expression (conversation_image) as bg 28 | 29 | if(current_conversation_character == None): 30 | $ log_error("current_conversation_character is None", renpy.get_filename_line()) 31 | return 32 | 33 | call talk_menu 34 | return 35 | 36 | # Display a random phrase and then end the conversation 37 | label talk_back: 38 | if renpy.has_label("talk_back_custom"): 39 | call talk_back_custom 40 | return 41 | -------------------------------------------------------------------------------- /game/nqtr_tool/conversation_value.rpy: -------------------------------------------------------------------------------- 1 | image pre nqtr_icon talk = Transform("/nqtr_interface/talk.webp", xysize=(gui.nqtr_icon_small, gui.nqtr_icon_small)) 2 | image nqtr_icon talk = LayeredImageMask("pre nqtr_icon talk", 3 | Transform(crop=(gui.nqtr_icon_small_crop, gui.nqtr_icon_small_crop, gui.sprite_size, gui.sprite_size)), 4 | mask="sprite mask", 5 | foreground="sprite foreground", 6 | background="sprite background" 7 | ) 8 | -------------------------------------------------------------------------------- /game/nqtr_tool/conversation_value_fix.rpy: -------------------------------------------------------------------------------- 1 | init -1 python: 2 | if not "nqtr_menu_icon_talk" in locals() | globals(): 3 | nqtr_menu_icon_talk = "nqtr_icon talk" 4 | -------------------------------------------------------------------------------- /game/nqtr_tool/nav_label_fun.rpy: -------------------------------------------------------------------------------- 1 | init python: 2 | from pythonpackages.nqtr.navigation import get_room_by_id 3 | 4 | # if in a room there is a different bg (taken in routine) than usual, use this one 5 | default sp_bg_change_room = None 6 | # Image of a closed door 7 | define bg_loc = "location/loc-[tm.timeslot_number].webp" 8 | ## Check if mc can come out 9 | define block_goout_dialogue = _("Now is not the time to go outside") 10 | 11 | # Wiki: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Navigation-and-Map#change-room 12 | label change_room(room_id = None): 13 | if room_id: 14 | $ new_room = get_room_by_id(room_id = room_id, rooms = rooms) 15 | if new_room is None: 16 | $ log_error("Room with id [room_id] not found", renpy.get_filename_line()) 17 | return 18 | python: 19 | prev_room = cur_room 20 | cur_room = new_room 21 | del new_room 22 | if cur_location.id != cur_room.location_id: 23 | python: 24 | new_location = get_location_by_id(location_id = cur_room.location_id, locations = locations) 25 | prev_location = cur_location 26 | cur_location = new_location 27 | del new_location 28 | call after_spending_time(is_check_event=True) 29 | return 30 | 31 | # Wiki: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Navigation-and-Map#change-location 32 | label change_location(location_id = None, close_map = True): 33 | if location_id: 34 | python: 35 | new_location = get_location_by_id(location_id = location_id, locations = locations) 36 | prev_location = cur_location 37 | cur_location = new_location 38 | del new_location 39 | call change_room(cur_location.external_room_id) 40 | call close_map 41 | return 42 | 43 | # Wiki: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Navigation-and-Map#go-previous-room 44 | label go_previous_room: 45 | python: 46 | temp_room = cur_room 47 | cur_room = prev_room 48 | prev_room = temp_room 49 | del temp_room 50 | return 51 | 52 | ## Open the map or close the map 53 | label open_map: 54 | if(not get_flags("goout")): 55 | "[block_goout_dialogue]" 56 | return 57 | 58 | if not cur_location: 59 | call change_room(room_id = cur_room.location_id) 60 | 61 | $ cur_map_id = cur_location.map_id 62 | 63 | if (not map_open): 64 | call set_image_map 65 | $ map_open = True 66 | call screen room_navigation 67 | return 68 | 69 | ## Close the map 70 | label close_map: 71 | python: 72 | map_open = False 73 | return 74 | 75 | # Is opened in change_room when a room id is in closed rooms 76 | label closed_room_event: 77 | if renpy.has_label("closed_room_event_custom"): 78 | call closed_room_event_custom 79 | scene expression (bg_loc) as bg 80 | return 81 | 82 | label set_image_map: 83 | scene expression maps[cur_map_id].background as bg 84 | return 85 | -------------------------------------------------------------------------------- /game/nqtr_tool/nav_value_fix.rpy: -------------------------------------------------------------------------------- 1 | init python: 2 | from pythonpackages.nqtr.navigation import Room 3 | from pythonpackages.nqtr.navigation import Location 4 | from pythonpackages.nqtr.navigation import Map 5 | 6 | if not "rooms" in locals() | globals(): 7 | rooms = [] 8 | rooms.append(Room(id="empty", name="empty", location_id="empty")) 9 | if not "locations" in locals() | globals(): 10 | locations = [] 11 | locations.append(Location(id = "empty", name="empty", map_id="empty", external_room_id="empty")) 12 | if not "maps" in locals() | globals(): 13 | maps = { 14 | "empty": Map( 15 | name="empty", 16 | background = "", 17 | ) 18 | } 19 | -------------------------------------------------------------------------------- /game/nqtr_tool/nav_value_fun.rpy: -------------------------------------------------------------------------------- 1 | default prev_room = None 2 | default cur_room = rooms[0] 3 | default prev_location = None 4 | default cur_location = locations[0] 5 | default cur_map_id = cur_location.map_id 6 | # Variable to check the map screen: if it is True then the player is viewing the map. 7 | default map_open = False 8 | 9 | # list of closed rooms is checked change_room 10 | # is composed of id = room_id and Commitment() 11 | # expired elements are checked in after_spending_time, if you don't want an expiration: hour_stop = None 12 | # TODO: Wiki 13 | default closed_rooms = {} 14 | -------------------------------------------------------------------------------- /game/nqtr_tool/quest_fun.rpy: -------------------------------------------------------------------------------- 1 | define new_quest_notify = _("A new quest began") 2 | define quest_updated_notify = _("The quest has been updated") 3 | 4 | init python: 5 | from pythonpackages.nqtr.quest import Stage 6 | 7 | 8 | def update_quests_levels() -> None: 9 | """Synchronize number_stages_completed_in_quest with quests. 10 | After this function I suggest to use check_inactive_stage().""" 11 | # check if there are less elements than flag_keys 12 | # in case you add them set with False 13 | for x in quests.keys(): 14 | if (not (x in number_stages_completed_in_quest)): 15 | number_stages_completed_in_quest[x] = 0 16 | # check if there are more elements than flag_keys 17 | # in case it eliminates them 18 | for x in number_stages_completed_in_quest.keys(): 19 | if (not (x in quests)): 20 | del number_stages_completed_in_quest[x] 21 | return 22 | 23 | def check_inactive_stage(current_stages: dict[str, Stage]) -> None: 24 | """Check if the inactive Stage have the requirements to be activated, if so, activate them.""" 25 | for k in current_stages.keys(): 26 | current_stages[k].start(number_stages_completed_in_quest, tm, flags) 27 | return 28 | 29 | def is_quest_existing(id: str) -> bool: 30 | if (not (id in quests)): 31 | log_warn("the Quest: " + id + " does not exist", renpy.get_filename_line()) 32 | return False 33 | return True 34 | 35 | def is_quest_in_number_stages(id: str) -> bool: 36 | if (not is_quest_existing(id)): 37 | return False 38 | if (not (id in number_stages_completed_in_quest)): 39 | log_warn("the Quest: " + id + " not is in number_stages_completed_in_quest, so i update it", renpy.get_filename_line()) 40 | quests[id].update(current_quest_stages, number_stages_completed_in_quest) 41 | if (not (id in number_stages_completed_in_quest)): 42 | log_warn("the Quest: " + id + " not is in number_stages_completed_in_quest, not even after the update", renpy.get_filename_line()) 43 | return False 44 | return True 45 | 46 | def is_quest_in_current_task_stages(id: str) -> bool: 47 | if (not is_quest_existing(id)): 48 | return False 49 | if (not (id in current_task_stages)): 50 | log_warn("the Quest: " + id + " not is in current_task_stages, so i update it", renpy.get_filename_line()) 51 | quests[id].update(current_quest_stages, current_task_stages) 52 | if (not (id in current_task_stages)): 53 | log_warn("the Quest: " + id + " not is in current_task_stages, not even after the update", renpy.get_filename_line()) 54 | return False 55 | return True 56 | 57 | def is_quest_in_current_quest_stages(id: str) -> bool: 58 | if (not is_quest_existing(id)): 59 | return False 60 | if (not (id in current_quest_stages)): 61 | log_warn("the Quest: " + id + " not is in current_quest_stages, so i update it", renpy.get_filename_line()) 62 | quests[id].update(current_quest_stages, current_quest_stages) 63 | if (not (id in current_quest_stages)): 64 | log_warn("the Quest: " + id + " not is in current_quest_stages, not even after the update", renpy.get_filename_line()) 65 | return False 66 | return True 67 | 68 | def quest_percentage_completion(id: str) -> int: 69 | """Returns the percentage of completion""" 70 | log_info("quest_getPercentageCompletion", renpy.get_filename_line()) 71 | if (not is_quest_in_number_stages(id)): 72 | return 0 73 | return quests[id].percentage_completion(number_stages_completed_in_quest[id]) 74 | 75 | def quest_add_required_days_to_start(id: str, day: int) -> None: 76 | """Wiki: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Quest#add-days-waiting-before-start """ 77 | log_info("quest_setDayNumberRequiredToStart", renpy.get_filename_line()) 78 | if (not is_quest_in_current_task_stages(id)): 79 | return 80 | return current_task_stages[id].is_completed(dayNumberRequired, tm) 81 | 82 | def quest_start(id: str, n_stage: int = 0) -> bool: 83 | """Wiki: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Quest#start-a-quest """ 84 | log_info("quest_start", renpy.get_filename_line()) 85 | if (not is_quest_existing(id)): 86 | return False 87 | quests[id].start(quest_stages, current_quest_stages, number_stages_completed_in_quest, tm, flags, n_stage) 88 | if (n_stage == 0): 89 | notify_add(new_quest_notify) 90 | return True 91 | 92 | def quest_next_stage_only_if_completed(id: str) -> None: 93 | """Wiki: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Quest#next-stage-only-if-is-completed """ 94 | if (id in current_task_stages): 95 | if (not current_task_stages[id].is_completed(number_stages_completed_in_quest, tm, flags)): 96 | log_info(" The stage is not completed, so it is not possible to go to the next stage.", renpy.get_filename_line()) 97 | return 98 | elif (id in current_quest_stages): 99 | if (not current_task_stages[id].is_completed(number_stages_completed_in_quest, tm, flags)): 100 | log_info(" The stage is not completed, so it is not possible to go to the next stage.", renpy.get_filename_line()) 101 | return 102 | quest_next_stage(id) 103 | return 104 | 105 | def quest_next_stage(id: str) -> None: 106 | """Wiki: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Quest#next-stage """ 107 | log_info("quest_nextStage", renpy.get_filename_line()) 108 | if (not is_quest_existing(id)): 109 | return 110 | quests[id].next_stage(quest_stages, current_quest_stages, number_stages_completed_in_quest, current_task_stages, tm, flags) 111 | notify_add(quest_updated_notify) 112 | return 113 | 114 | def quest_is_started(id: str) -> bool: 115 | log_info("quest_isStarted", renpy.get_filename_line()) 116 | if (not is_quest_in_current_quest_stages(id)): 117 | return False 118 | return (id in current_quest_stages) 119 | 120 | def quest_is_completed(id: str) -> bool: 121 | """Check if all stages have been completed.""" 122 | log_info("quest_isCompleted", renpy.get_filename_line()) 123 | if (not is_quest_existing(id)): 124 | return 125 | if (not (id in number_stages_completed_in_quest)): 126 | update_quests_levels() 127 | return False 128 | return quests[id].is_completed(current_quest_stages, number_stages_completed_in_quest) 129 | 130 | def quest_current_quest_id(id: str) -> str: 131 | """Return the id of this current""" 132 | log_info("quest_currentQuestId", renpy.get_filename_line()) 133 | if (not (id in number_stages_completed_in_quest)): 134 | quest_update(id) 135 | return quests[id].quest_id(number_stages_completed_in_quest) 136 | 137 | def quest_complete_stages_number(id: str) -> int: 138 | """Returns the number of completed stages""" 139 | log_info("quest_completeStagesNumber", renpy.get_filename_line()) 140 | if (not (id in number_stages_completed_in_quest)): 141 | quest_update(id) 142 | return quests[id].completed_stages_number(number_stages_completed_in_quest) 143 | 144 | def quest_update(id: str) -> int: 145 | """Function to update the various values, 146 | If it is a completed Quest and a Stage has been added in a new update, the new Stage begins. 147 | Prevent errors like blocked Quests.""" 148 | log_info("quest_update", renpy.get_filename_line()) 149 | return quests[id].update(quest_stages, current_quest_stages, number_stages_completed_in_quest, tm, flags) -------------------------------------------------------------------------------- /game/nqtr_tool/quest_value_fix.rpy: -------------------------------------------------------------------------------- 1 | init -1 python: 2 | if not "quests_descriptions" in locals() | globals(): 3 | quests_descriptions = {} 4 | if not "quests" in locals() | globals(): 5 | quests = {} 6 | if not "quest_stages" in locals() | globals(): 7 | quest_stages = {} 8 | -------------------------------------------------------------------------------- /game/nqtr_tool/quest_value_fun.rpy: -------------------------------------------------------------------------------- 1 | # the number of stages completed in a quest 2 | default number_stages_completed_in_quest = {} 3 | default current_quest_stages = {} 4 | default current_task_stages = {} 5 | -------------------------------------------------------------------------------- /game/nqtr_tool/routine_label_fun.rpy: -------------------------------------------------------------------------------- 1 | label check_event: 2 | if renpy.has_label("check_event_custom"): 3 | call check_event_custom 4 | 5 | # I check if there is an event in this room, if so I start the event and then delete it 6 | if (cur_room.id in cur_events_location.keys()): 7 | # if I put python: here "call expression" doesn't work 8 | $ event_room = cur_room.id 9 | $ ev = cur_events_location[cur_room.id] 10 | call expression ev.event_label_name 11 | python: 12 | if (event_room == cur_room.id): 13 | # delete the event in cur_events_location 14 | del cur_events_location[cur_room.id] 15 | # delete the event in routine 16 | sp_routine_to_del = [] 17 | for k, v in routine.items(): 18 | if (v.room_id == ev.room_id and v.is_event): 19 | sp_routine_to_del.append(k) 20 | for k in sp_routine_to_del: 21 | del routine[k] 22 | del sp_routine_to_del 23 | $ del event_room 24 | $ del ev 25 | call after_spending_time(is_check_event=True) 26 | return 27 | -------------------------------------------------------------------------------- /game/nqtr_tool/routine_value_fix.rpy: -------------------------------------------------------------------------------- 1 | init -1 python: 2 | if not "routine" in locals() | globals(): 3 | routine = {} 4 | if not "df_routine" in locals() | globals(): 5 | df_routine = {} 6 | 7 | # dictionary editable at runtime, but it is strongly discouraged to pre-enter elements (dictionary contents are based only on saves) 8 | default routine = {} 9 | -------------------------------------------------------------------------------- /game/nqtr_tool/routine_value_fun.rpy: -------------------------------------------------------------------------------- 1 | # are the routines of the CHs in the current place 2 | # it is changed after waiting for some time or when moving from one location to another 3 | default commitments_in_cur_location = {} 4 | 5 | # possible events in the current location 6 | default cur_events_location = {} 7 | -------------------------------------------------------------------------------- /game/nqtr_tool/time_fun.rpy: -------------------------------------------------------------------------------- 1 | init python: 2 | def now_is_between(end: int, start: int = 0, now=None) -> bool: 3 | """Wiki: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Time-system#now-is-between """ 4 | return tm.now_is_between(end=end, start=start, now=now) 5 | 6 | init -8 python: 7 | from pythonpackages.nqtr.time import TimeHandler 8 | 9 | def updateTimeHandler(tm: TimeHandler) -> None: 10 | """If you update TimeHandler settings into a new version, you can use this function to update the old save files. 11 | Is used to update timeslot_names and weekday_names""" 12 | hour_of_new_day = tm.hour_of_new_day 13 | hour = tm.hour 14 | weekday_weekend_begins = tm.weekday_weekend_begins 15 | day = tm.day 16 | int_timeslot_names = tm.timeslot_names 17 | int_weekday_names = tm.timeslot_names 18 | if "timeslot_names" in locals() | globals(): 19 | int_timeslot_names = timeslot_names 20 | if "weekday_names" in locals() | globals(): 21 | int_weekday_names = weekday_names 22 | tm = TimeHandler( 23 | hour_of_new_day=hour_of_new_day, 24 | hour=hour, 25 | weekday_weekend_begins=weekday_weekend_begins, 26 | day=day, 27 | timeslot_names = int_timeslot_names, 28 | weekday_names = int_weekday_names 29 | ) 30 | del hour_of_new_day 31 | del hour 32 | del weekday_weekend_begins 33 | del day 34 | return 35 | -------------------------------------------------------------------------------- /game/nqtr_tool/time_label_fun.rpy: -------------------------------------------------------------------------------- 1 | init python: 2 | from pythonpackages.nqtr.action import clear_expired_actions 3 | from pythonpackages.nqtr.routine import clear_expired_routine 4 | from pythonpackages.nqtr.routine import characters_events_in_current_location 5 | from pythonpackages.nqtr.routine import characters_commitment_in_current_location 6 | 7 | # Wiki: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Time-system#defalut-value 8 | # pressing the hold button will increase the time of: 9 | define DEFAULT_WAIT_HOUR = 1 10 | # using the default new day function the time of the next day will be: 11 | define DEFAULT_BLOCK_SPENDTIME_DIALOGUE = _("You can't do that now") 12 | 13 | # Wiki: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Time-system#new-day 14 | label new_day(time_of_new_day = None, is_check_event=True): 15 | if(not get_flags("not_can_spend_time")): 16 | python: 17 | tm.new_day() 18 | # removes expired Commitments 19 | clear_expired_routine(routine, tm) 20 | clear_expired_actions(actions, tm.day) 21 | check_inactive_stage(current_stages= current_quest_stages | current_task_stages) 22 | if (time_of_new_day is not None): 23 | tm.hour = time_of_new_day 24 | else: 25 | tm.hour= tm.hour_of_new_day 26 | call after_spending_time(is_check_event = is_check_event) 27 | else: 28 | "[DEFAULT_BLOCK_SPENDTIME_DIALOGUE]" 29 | return 30 | 31 | # Wiki: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Time-system#wait 32 | label wait(wait_hour=DEFAULT_WAIT_HOUR, is_check_event=True): 33 | if(not get_flags(flag_id = "not_can_spend_time")): 34 | if(tm.new_hour(wait_hour)): 35 | if (not map_open): 36 | call after_spending_time(is_check_event = is_check_event) 37 | else: 38 | "(It's late, you have to go to bed)" 39 | else: 40 | "[DEFAULT_BLOCK_SPENDTIME_DIALOGUE]" 41 | return 42 | 43 | # is a label that is called always after spending time, 44 | # or into special cases before checking the event, or routine... 45 | # this label is used to update all the variables that are used in the time system 46 | label after_spending_time(is_check_event=False, is_check_routines=True): 47 | call update_current_flags 48 | if(is_check_routines): 49 | # this step is to change the background based on the presence of a ch 50 | $ commitments_in_cur_location = characters_commitment_in_current_location(cur_location.id, routine | df_routine, tm, flags) 51 | # check event 52 | if (is_check_event): 53 | $ cur_events_location = characters_events_in_current_location(cur_location.id, routine, tm, flags) 54 | call check_event 55 | call set_background_nqtr 56 | return 57 | -------------------------------------------------------------------------------- /game/nqtr_tool/time_value_fix.rpy: -------------------------------------------------------------------------------- 1 | init -1 python: 2 | if not "tm" in locals() | globals(): 3 | tm = TimeHandler( 4 | hour_of_new_day = 5, 5 | hour = 8, 6 | weekday_weekend_begins = 6, 7 | day = 0, 8 | timeslot_names = [], 9 | weekday_names = [] 10 | ) 11 | -------------------------------------------------------------------------------- /game/nqtr_values/action_label.rpy: -------------------------------------------------------------------------------- 1 | ## Actions they do are meant to pass time 2 | 3 | menu nap: 4 | "Nap for 3 hours": 5 | call wait(3) 6 | return 7 | "Sleep": 8 | jump sleep 9 | return 10 | "Return": 11 | return 12 | 13 | menu sleep: 14 | "What time do you want to set the alarm?" 15 | "[tm.hour_of_new_day]:00": 16 | call new_day(is_check_event=True) 17 | return 18 | "7:00": 19 | call new_day(time_of_new_day = 7, is_check_event=True) 20 | return 21 | "9:00": 22 | call new_day(time_of_new_day = 9, is_check_event=True) 23 | return 24 | "Return": 25 | return 26 | 27 | ## Various actions 28 | 29 | label order_product: 30 | mc "OK! Let's see, let's look for a book...." 31 | mc "Here's R****, for $1. Just the thing for me." 32 | $ del actions['order_product'] 33 | $ quest_next_stage(id = "alice") 34 | return 35 | 36 | label add_product: 37 | $ actions["take_product"] = Act(name = _("Take product"), button_icon = "action box", label_name = "take_product", room_ids=['terrace']) 38 | return 39 | 40 | label take_product: 41 | $ del actions['take_product'] 42 | $ quest_next_stage(id = "alice") 43 | return 44 | 45 | label take_key: 46 | mc "Are these the car keys?! Well... I should try to access the car!" 47 | $ set_flags("goout", True) 48 | $ del actions['take_key'] 49 | $ quest_next_stage(id = "ann") 50 | return 51 | 52 | menu talk_sleep: 53 | "zZz zZz ..." 54 | "Try waking up": 55 | # will lock the room 56 | a "[mc]!!!! What are you doing?!!" 57 | a "Get out of here! Now!" 58 | $ closed_rooms[cur_room.id] = df_routine["alice_sleep"] 59 | call after_spending_time 60 | return 61 | "Leave her alone": 62 | return 63 | 64 | label alice_talk_menu: 65 | if(current_conversation_character == a): 66 | mc "Hi [a]" 67 | a "Hi, can you tell me something?" 68 | else: 69 | "Now is busy test later." 70 | 71 | call talk_menu 72 | 73 | ## Development Label 74 | 75 | label open_smartphone: 76 | "In development" 77 | return 78 | 79 | label open_characters_info: 80 | "In development in another repo: {a=https://github.com/DRincs-Productions/DS-toolkit}DS toolkit{/a}" 81 | return 82 | 83 | label open_inventory: 84 | "In development in another repo: {a=https://github.com/DRincs-Productions/Inventory-System-toolkit}Inventory System{/a}" 85 | return 86 | -------------------------------------------------------------------------------- /game/nqtr_values/action_talk_label.rpy: -------------------------------------------------------------------------------- 1 | # Display a random phrase and then end the conversation 2 | label talk_back_custom: 3 | $ num = renpy.random.randint(1, 7) 4 | if num == 1: 5 | mc "OK, I'm off. See you." 6 | elif num == 2: 7 | mc "It's getting late. See you." 8 | elif num == 3: 9 | mc "Sorry, but I have to go now. Bye." 10 | elif num == 4: 11 | mc "Good talk. We should do this more often." 12 | elif num == 5: 13 | mc "I just remembered something. Gotta go! Bye." 14 | elif num == 6: 15 | mc "I won't keep you any longer. Bye." 16 | elif num == 7: 17 | mc "I was supposed to tell you something else.... But I can't remember." 18 | mc "When it comes back to me I'll let you know, bye." 19 | 20 | $ del num 21 | return 22 | 23 | # Quest "alice" 24 | 25 | label stage_talkalice: 26 | if (number_stages_completed_in_quest["alice"] == 0): 27 | show bg alice terrace talk 28 | a "Hi can you order me a new book from pc?" 29 | mc "Ok" 30 | a "Thanks" 31 | 32 | $ add_conversation_choice(choice_character = a, choice_text = _("About the book"), label_name = "stage_talkalice") 33 | 34 | $ actions["order_product"] = Act(name = _("Order product"), button_icon = "action pc", label_name = "order_product", room_ids=["my_room"]) 35 | 36 | $ quest_next_stage(id = "alice") 37 | elif (number_stages_completed_in_quest["alice"] == 1): 38 | mc "What book do you want me to order?" 39 | a "For me it is the same." 40 | jump talk_menu 41 | elif (number_stages_completed_in_quest["alice"] == 2): 42 | mc "I ordered the Book, hope you enjoy it." 43 | a "Great, when it arrives remember to bring it to me." 44 | jump talk_menu 45 | elif (number_stages_completed_in_quest["alice"] == 3): 46 | mc "Here's your book." 47 | a "Thank you, I can finally read something new." 48 | $ quest_next_stage(id = "alice") 49 | $ del_conversation_choice(choice_character = a, choice_text = _("About the book")) 50 | return 51 | 52 | # Quest "ann" 53 | 54 | label stage_talkalice_aboutann: 55 | show bg alice terrace talk 56 | mc "Alice, I was thinking of visiting Ann. can you lend me your car?" 57 | a "Yes, of course. You can find the keys on the keyhole in the hall." 58 | mc "Thanks!" 59 | a "Don't ruin it..." 60 | $ actions["take_key"] = Act(name = _("KEY"), picture_in_background = "/action-key.webp", label_name = "take_key", room_ids=['lounge'], 61 | xalign = 608/1920, yalign = 667/1080) 62 | 63 | $ quest_next_stage(id = "ann") 64 | $ del_conversation_choice(choice_character = a, choice_text = _("About the Ann")) 65 | return 66 | -------------------------------------------------------------------------------- /game/nqtr_values/action_value.rpy: -------------------------------------------------------------------------------- 1 | init python: 2 | from pythonpackages.nqtr.action import Act 3 | 4 | # habitual actions 5 | # dictionary that cannot be modified at runtime, only by modifying the code. (content is not based on saves, but from the code) 6 | # Wiki: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Action#add-an-action-in-dictionary 7 | define df_actions = { 8 | "nap" : Act(name = _("Nap"), button_icon = "action sleep", label_name = "nap", hour_start=5, hour_stop=23), 9 | "sleep" : Act(name = _("Sleep"), button_icon = "action alarm", label_name = "sleep", hour_start=23, hour_stop=5), 10 | } 11 | -------------------------------------------------------------------------------- /game/nqtr_values/event_label.rpy: -------------------------------------------------------------------------------- 1 | label check_event_custom: 2 | # Custom code 3 | # if (cur_room == ...): 4 | # ... 5 | return 6 | 7 | label closed_room_event_custom: 8 | # Custom code 9 | # if (cur_room == ...): 10 | # ... 11 | return 12 | -------------------------------------------------------------------------------- /game/nqtr_values/nav_value.rpy: -------------------------------------------------------------------------------- 1 | init python: 2 | from pythonpackages.nqtr.navigation import Room 3 | from pythonpackages.nqtr.navigation import Location 4 | from pythonpackages.nqtr.navigation import Map 5 | 6 | # Wiki: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Navigation-and-Map#room 7 | define rooms = [ 8 | Room(id="my_room", location_id="house", name=_("MC room"), button_icon="icon myroom", background ="bg myroom",action_ids = ["sleep","nap",]), 9 | Room(id="alice_room", location_id="house", name=_("[a] room"), button_icon="icon aliceroom", background ="bg aliceroom"), 10 | Room(id="bathroom", location_id="house", name=_("Bathroom"), button_icon="icon bathroom", background ="bg bathroom"), 11 | Room(id="lounge", location_id="house", name=_("Lounge"), button_icon="icon lounge", background ="bg lounge"), 12 | Room(id="terrace", location_id="house", name=_("Terrace"), button_icon="icon terrace", background ="bg terrace"), 13 | Room(id="ann_room", location_id="house_Ann", name=_("Ann room"), button_icon="icon annroom", background ="bg annroom"), 14 | Room(id="courtyard", location_id="house_Ann", name=_("Courtyard"), button_icon="icon courtyard", background ="bg courtyard"), 15 | Room(id="gym_room", location_id="gym", name=_("Gym"), button_icon="icon gym", background ="bg gym"), 16 | ] 17 | 18 | # Wiki: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Navigation-and-Map#location 19 | define locations = [ 20 | Location(id = "house", map_id="map", external_room_id="terrace", name=_("MC house"), picture_in_background="icon map home", xalign=0.3, yalign=0.2), 21 | Location(id = "gym", map_id="map", external_room_id="gym_room", name=_("Gym"), picture_in_background="icon map gym", xalign=0.5, yalign=0.3), 22 | ] 23 | 24 | # Wiki: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Navigation-and-Map#map 25 | define maps = { 26 | "map": Map( 27 | name = _("Map"), background = "bg map", 28 | map_id_north = "nightcity", 29 | map_id_south = None, 30 | map_id_west = None, 31 | map_id_east = None, 32 | ), 33 | "nightcity": Map( 34 | name = _("Night City"), background = "bg nightcity", 35 | map_id_north = None, 36 | map_id_south = "map", 37 | map_id_west = None, 38 | map_id_east = None, 39 | ), 40 | } 41 | -------------------------------------------------------------------------------- /game/nqtr_values/quest_value.rpy: -------------------------------------------------------------------------------- 1 | init python: 2 | from pythonpackages.nqtr.quest import Stage 3 | from pythonpackages.nqtr.quest import Quest 4 | 5 | # if you need a description of the quest that true over time this dictionary seemed to me the best way to do it 6 | default quests_descriptions = {} 7 | 8 | define quests = { 9 | "alice" : Quest( 10 | id = "alice", 11 | title = _("Help [a]"), 12 | info_image = "bg alice terrace talk", 13 | stage_ids = ["talk alice1", "order products", "take products", "talk alice2"], 14 | description = _("To learn more about how the repo works, Talk to [a]. \nGoing when she is there will automatically start an \"Event\" (see routine*.rpy to learn more). \nAfter that an action (action*.rpy) will be added to open the pc, in MC room. \n\n(during the quest you can talk to [a] and you will see her talking during the quests of the same Quest)"), 15 | development = False, 16 | ), 17 | "ann" : Quest( 18 | id = "ann", 19 | title = _("Help [an]"), 20 | info_image = None, 21 | stage_ids = ["talk al about ann", "take the key"], 22 | description = _("Long Description"), 23 | development = True, 24 | ), 25 | } 26 | define quest_stages = { 27 | # Quest "alice" 28 | "talk alice1" : Stage(quest_id = "alice", title = _("Talk [a]"), description = _("Talk [a] on the terrace."), start_label_name="stagestart_talkalice"), 29 | "order products" : Stage(quest_id = "alice", title = _("Order products"), description = _("Order the products with your PC.")), 30 | "take products" : Stage(quest_id = "alice", title = _("Take products"), description = _("Take products on the Terrace."), request_description = _("Wait for the products you ordered to arrive (2 day)"), days_required_to_start = 2, start_label_name="add_product"), 31 | "talk alice2" : Stage(quest_id = "alice", title = _("Talk [a]"), description = _("Talk [a].")), 32 | # Quest "ann" 33 | "talk al about ann" : Stage(quest_id = "ann", title = _("Talk [a]"), description = _("Talk [a]."), start_label_name="stagestart_talkalice_aboutann"), 34 | "take the key" : Stage(quest_id = "ann", title = _("take the key"), description = _("take the key.")), 35 | } 36 | 37 | # Quest "alice" 38 | label stagestart_talkalice: 39 | $ routine["stagealice1"] = Commitment(characters=a, hour_start=14, hour_stop=20, location_id="house", room_id="terrace", event_label_name="stage_talkalice") 40 | return 41 | 42 | # Quest "ann" 43 | label stagestart_talkalice_aboutann: 44 | $ add_conversation_choice(choice_character = a, choice_text = _("About the Ann"), label_name = "stage_talkalice_aboutann") 45 | return 46 | -------------------------------------------------------------------------------- /game/nqtr_values/routine_value.rpy: -------------------------------------------------------------------------------- 1 | init python: 2 | from pythonpackages.nqtr.routine import Commitment 3 | from pythonpackages.nqtr.conversation import Conversation 4 | 5 | # habitual routine 6 | # dictionary that cannot be modified at runtime, only by modifying the code. (content is not based on saves, but from the code) 7 | define df_routine = { 8 | "alice_sleep" : Commitment( 9 | conversations = [ 10 | Conversation( 11 | name="talk_alice_sleep", 12 | label_name="talk_sleep", 13 | characters=a, 14 | conversation_background = None, 15 | ), 16 | ], 17 | hour_start=20, hour_stop=10, 18 | location_id="house", room_id="alice_room", 19 | background ="bg alice roomsleep", 20 | ), 21 | # alice_go_school have more priority than alice_read, because it is before in the dictionary 22 | "alice_go_school" : Commitment( 23 | characters=a, # characters can be a string or a list of strings 24 | hour_start=10, hour_stop=14, 25 | location_id="school", 26 | disabled="weekend", 27 | ), 28 | "alice_read" : Commitment( 29 | conversations = [ 30 | Conversation( 31 | name="talk_alice_read", 32 | characters=a, 33 | conversation_background ="bg alice terrace talk" 34 | ), 35 | ], 36 | hour_start=10, hour_stop=20, 37 | location_id="house", room_id="terrace", 38 | background ="bg alice terrace", 39 | ), 40 | } 41 | -------------------------------------------------------------------------------- /game/nqtr_values/time_value.rpy: -------------------------------------------------------------------------------- 1 | define timeslot_names = [ 2 | (8, _("Morning")), 3 | (14, _("Afternoon")), 4 | (19, _("Evening")), 5 | (22, _("Night")), 6 | ] 7 | define weekday_names = [ 8 | _("{#weekday}Monday"), 9 | _("{#weekday}Tuesday"), 10 | _("{#weekday}Wednesday"), 11 | _("{#weekday}Thursday"), 12 | _("{#weekday}Friday"), 13 | _("{#weekday}Saturday"), 14 | _("{#weekday}Sunday") 15 | ] 16 | # ATTENTION here it is initialized 17 | # when a save is loaded it is created with the updateTimeHandler() function 18 | default tm = TimeHandler( 19 | hour_of_new_day = 5, 20 | hour = 8, 21 | weekday_weekend_begins = 6, 22 | day = 0, 23 | timeslot_names = timeslot_names, 24 | weekday_names = weekday_names 25 | ) 26 | -------------------------------------------------------------------------------- /game/options.rpy: -------------------------------------------------------------------------------- 1 | ## This file contains options that can be changed to customize your game. 2 | ## 3 | ## Lines beginning with two '#' marks are comments, and you shouldn't uncomment 4 | ## them. Lines beginning with a single '#' mark are commented-out code, and you 5 | ## may want to uncomment them when appropriate. 6 | 7 | 8 | ## Basics ###################################################################### 9 | 10 | ## A human-readable name of the game. This is used to set the default window 11 | ## title, and shows up in the interface and error reports. 12 | ## 13 | ## The _() surrounding the string marks it as eligible for translation. 14 | 15 | define config.name = _("Navigation Quest Time Routine System") 16 | 17 | 18 | ## Determines if the title given above is shown on the main menu screen. Set 19 | ## this to False to hide the title. 20 | 21 | define gui.show_name = True 22 | 23 | 24 | ## The version of the game. 25 | 26 | define config.version = "1.0" 27 | 28 | 29 | ## Text that is placed on the game's about screen. Place the text between the 30 | ## triple-quotes, and leave a blank line between paragraphs. 31 | 32 | define gui.about = _p(""" 33 | """) 34 | 35 | 36 | ## A short name for the game used for executables and directories in the built 37 | ## distribution. This must be ASCII-only, and must not contain spaces, colons, 38 | ## or semicolons. 39 | 40 | define build.name = "NQTR-toolkit" 41 | 42 | 43 | ## Sounds and music ############################################################ 44 | 45 | ## These three variables control, among other things, which mixers are shown 46 | ## to the player by default. Setting one of these to False will hide the 47 | ## appropriate mixer. 48 | 49 | define config.has_sound = True 50 | define config.has_music = True 51 | define config.has_voice = True 52 | 53 | 54 | ## To allow the user to play a test sound on the sound or voice channel, 55 | ## uncomment a line below and use it to set a sample sound to play. 56 | 57 | # define config.sample_sound = "sample-sound.ogg" 58 | # define config.sample_voice = "sample-voice.ogg" 59 | 60 | 61 | ## Uncomment the following line to set an audio file that will be played while 62 | ## the player is at the main menu. This file will continue playing into the 63 | ## game, until it is stopped or another file is played. 64 | 65 | # define config.main_menu_music = "main-menu-theme.ogg" 66 | 67 | 68 | ## Transitions ################################################################# 69 | ## 70 | ## These variables set transitions that are used when certain events occur. 71 | ## Each variable should be set to a transition, or None to indicate that no 72 | ## transition should be used. 73 | 74 | ## Entering or exiting the game menu. 75 | 76 | define config.enter_transition = dissolve 77 | define config.exit_transition = dissolve 78 | 79 | 80 | ## Between screens of the game menu. 81 | 82 | define config.intra_transition = dissolve 83 | 84 | 85 | ## A transition that is used after a game has been loaded. 86 | 87 | define config.after_load_transition = None 88 | 89 | 90 | ## Used when entering the main menu after the game has ended. 91 | 92 | define config.end_game_transition = None 93 | 94 | 95 | ## A variable to set the transition used when the game starts does not exist. 96 | ## Instead, use a with statement after showing the initial scene. 97 | 98 | 99 | ## Window management ########################################################### 100 | ## 101 | ## This controls when the dialogue window is displayed. If "show", it is always 102 | ## displayed. If "hide", it is only displayed when dialogue is present. If 103 | ## "auto", the window is hidden before scene statements and shown again once 104 | ## dialogue is displayed. 105 | ## 106 | ## After the game has started, this can be changed with the "window show", 107 | ## "window hide", and "window auto" statements. 108 | 109 | define config.window = "auto" 110 | 111 | 112 | ## Transitions used to show and hide the dialogue window 113 | 114 | define config.window_show_transition = Dissolve(.2) 115 | define config.window_hide_transition = Dissolve(.2) 116 | 117 | 118 | ## Preference defaults ######################################################### 119 | 120 | ## Controls the default text speed. The default, 0, is infinite, while any other 121 | ## number is the number of characters per second to type out. 122 | 123 | default preferences.text_cps = 0 124 | 125 | 126 | ## The default auto-forward delay. Larger numbers lead to longer waits, with 0 127 | ## to 30 being the valid range. 128 | 129 | default preferences.afm_time = 15 130 | 131 | 132 | ## Save directory ############################################################## 133 | ## 134 | ## Controls the platform-specific place Ren'Py will place the save files for 135 | ## this game. The save files will be placed in: 136 | ## 137 | ## Windows: %APPDATA\RenPy\ 138 | ## 139 | ## Macintosh: $HOME/Library/RenPy/ 140 | ## 141 | ## Linux: $HOME/.renpy/ 142 | ## 143 | ## This generally should not be changed, and if it is, should always be a 144 | ## literal string, not an expression. 145 | 146 | define config.save_directory = "NQTR-toolkit" 147 | 148 | 149 | ## Icon ######################################################################## 150 | ## 151 | ## The icon displayed on the taskbar or dock. 152 | 153 | define config.window_icon = "gui/window_icon.png" 154 | 155 | 156 | ## Build configuration ######################################################### 157 | ## 158 | ## This section controls how Ren'Py turns your project into distribution files. 159 | 160 | init python: 161 | 162 | ## The following functions take file patterns. File patterns are case- 163 | ## insensitive, and matched against the path relative to the base directory, 164 | ## with and without a leading /. If multiple patterns match, the first is 165 | ## used. 166 | ## 167 | ## In a pattern: 168 | ## 169 | ## / is the directory separator. 170 | ## 171 | ## * matches all characters, except the directory separator. 172 | ## 173 | ## ** matches all characters, including the directory separator. 174 | ## 175 | ## For example, "*.txt" matches txt files in the base directory, "game/ 176 | ## **.ogg" matches ogg files in the game directory or any of its 177 | ## subdirectories, and "**.psd" matches psd files anywhere in the project. 178 | 179 | ## Classify files as None to exclude them from the built distributions. 180 | 181 | build.classify('**~', None) 182 | build.classify('**.bak', None) 183 | build.classify('**/.**', None) 184 | build.classify('**/#**', None) 185 | build.classify('**/thumbs.db', None) 186 | 187 | ## To archive files, classify them as 'archive'. 188 | 189 | # build.classify('game/**.png', 'archive') 190 | # build.classify('game/**.jpg', 'archive') 191 | 192 | ## Files matching documentation patterns are duplicated in a mac app build, 193 | ## so they appear in both the app and the zip file. 194 | 195 | build.documentation('*.html') 196 | build.documentation('*.txt') 197 | 198 | 199 | ## A Google Play license key is required to download expansion files and perform 200 | ## in-app purchases. It can be found on the "Services & APIs" page of the Google 201 | ## Play developer console. 202 | 203 | # define build.google_play_key = "..." 204 | 205 | 206 | ## The username and project name associated with an itch.io project, separated 207 | ## by a slash. 208 | 209 | # define build.itch_project = "renpytom/test-project" 210 | -------------------------------------------------------------------------------- /game/script.rpy: -------------------------------------------------------------------------------- 1 | # The script of the game goes in this file. 2 | 3 | # Declare characters used by this game. The color argument colorizes the 4 | # name of the character. 5 | 6 | init -1: 7 | default a_name = "Test" 8 | define mc = Character("Player") 9 | define a = Character("[a_name]", icon = "icon alice") 10 | define an = Character("Ann", icon = "icon ann") 11 | 12 | 13 | # The game starts here. 14 | 15 | label start: 16 | $ block_goout_dialogue = _("To get out you have to take the car keys, (talk to Alice)") 17 | 18 | call change_room(room_id = "my_room") 19 | $ prev_room = rooms[5] 20 | if(not quest_start(id = "alice")): 21 | $ log_error("The quest alice has not started", renpy.get_filename_line()) 22 | if(not quest_start(id = "ann")): 23 | $ log_error("The quest ann has not started", renpy.get_filename_line()) 24 | 25 | # enable a notify screen 26 | call enable_notifyEx 27 | 28 | # the first time it opens room navigation screen use after_spending_time 29 | # for update routine, event... 30 | call after_spending_time 31 | "Hello, this is a test of NQTR-System." 32 | $ a_name = "Alice" 33 | # open the room navigation screen 34 | call screen room_navigation 35 | return 36 | -------------------------------------------------------------------------------- /pythonpackages/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/pythonpackages/__init__.py -------------------------------------------------------------------------------- /pythonpackages/nqtr/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DRincs-Productions/NQTR-System/06582259881fbd0f7162e1c79282aaae1d5f3464/pythonpackages/nqtr/__init__.py -------------------------------------------------------------------------------- /pythonpackages/nqtr/action.py: -------------------------------------------------------------------------------- 1 | from typing import Optional, Union 2 | 3 | from pythonpackages.nqtr.button import Button 4 | from pythonpackages.nqtr.navigation import Room 5 | from pythonpackages.nqtr.time import MAX_DAY_HOUR, TimeHandler 6 | from pythonpackages.renpy_utility.renpy_custom_log import * 7 | 8 | 9 | class Act(Button): 10 | """Wiki: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Action""" 11 | 12 | def __init__( 13 | self, 14 | # Requirement Button params 15 | name: str, 16 | label_name: str, 17 | # Act params 18 | room_ids: list[str] = [], 19 | hour_start: int = 0, 20 | hour_stop: Union[int, float] = MAX_DAY_HOUR + 1, 21 | day_start: Optional[int] = None, 22 | day_deadline: Optional[int] = None, 23 | # Button params 24 | button_icon: Optional[str] = None, 25 | button_icon_selected: Optional[str] = None, 26 | picture_in_background: Optional[str] = None, 27 | picture_in_background_selected: Optional[str] = None, 28 | xalign: Optional[int] = None, 29 | yalign: Optional[int] = None, 30 | disabled: Union[bool, str] = False, 31 | hidden: Union[bool, str] = False, 32 | ): 33 | # Button init 34 | super().__init__( 35 | name=name, 36 | label_name=label_name, 37 | button_icon=button_icon, 38 | button_icon_selected=button_icon_selected, 39 | picture_in_background=picture_in_background, 40 | picture_in_background_selected=picture_in_background_selected, 41 | xalign=xalign, 42 | yalign=yalign, 43 | disabled=disabled, 44 | hidden=hidden, 45 | ) 46 | # Act init 47 | self.hour_start = hour_start 48 | self.hour_stop = hour_stop - 0.1 49 | self.day_deadline = day_deadline 50 | self.day_start = day_start 51 | self.room_ids = room_ids 52 | if isinstance(self.day_start, int) and self.day_start < 0: 53 | self.day_start = None 54 | log_info( 55 | "You have set day_start < 0, so it will be ignored", 56 | "nqtr.action.Act.__init__", 57 | ) 58 | if isinstance(self.day_deadline, int) and self.day_deadline < 0: 59 | self.day_deadline = None 60 | log_info( 61 | "You have set day_deadline < 0, so it will be ignored", 62 | "nqtr.action.Act.__init__", 63 | ) 64 | 65 | @property 66 | def room_ids(self) -> list[str]: 67 | """List of room ids where this act can be done""" 68 | return self._room_ids 69 | 70 | @room_ids.setter 71 | def room_ids(self, value: list[str]): 72 | self._room_ids = value 73 | 74 | @property 75 | def rooms(self) -> list[str]: 76 | """Deprecated, use room_ids""" 77 | return self._room_ids 78 | 79 | @rooms.setter 80 | def rooms(self, value: Optional[list[str]]): 81 | """Deprecated, use room_ids""" 82 | self._room_ids = value if value else [] 83 | 84 | @property 85 | def hour_start(self) -> int: 86 | """Start hour of the action""" 87 | return self._hour_start 88 | 89 | @hour_start.setter 90 | def hour_start(self, value: int): 91 | self._hour_start = value 92 | 93 | @property 94 | def hour_stop(self) -> Union[int, float]: 95 | """Stop hour of the action""" 96 | return self._hour_stop 97 | 98 | @hour_stop.setter 99 | def hour_stop(self, value: Union[int, float]): 100 | self._hour_stop = value 101 | 102 | @property 103 | def day_start(self) -> Optional[int]: 104 | """Start day of the action""" 105 | return self._day_start 106 | 107 | @day_start.setter 108 | def day_start(self, value: Optional[int]): 109 | self._day_start = value 110 | 111 | @property 112 | def day_deadline(self) -> Optional[int]: 113 | """Deadline day of the action""" 114 | return self._day_deadline 115 | 116 | @day_deadline.setter 117 | def day_deadline(self, value: Optional[int]): 118 | self._day_deadline = value 119 | 120 | def is_deadline(self, current_day: int) -> bool: 121 | """Return True if the deadline is passed""" 122 | if self.day_deadline and self.day_deadline <= current_day: 123 | return True 124 | return False 125 | 126 | def have_valid_day(self, current_day: int) -> bool: 127 | """Return True if the action is valid for the current day""" 128 | if self.day_start and self.day_start >= current_day: 129 | return False 130 | return not self.is_deadline(current_day) 131 | 132 | 133 | def clear_expired_actions(actions: dict[str, Act], current_day: int) -> None: 134 | """Delete Expired Actions""" 135 | actions_to_del = [] 136 | for id, act in actions.items(): 137 | if act.is_deadline(current_day): 138 | actions_to_del.append(id) 139 | for act_id in actions_to_del: 140 | del actions[act_id] 141 | del actions_to_del 142 | return 143 | 144 | 145 | def current_actions( 146 | actions: dict[str, Act], 147 | room: Room, 148 | now_hour: int, 149 | current_day: int, 150 | tm: TimeHandler, 151 | flags: dict[str, bool] = {}, 152 | ) -> list[Act]: 153 | """Return a action list for the current room and available for the current time""" 154 | acts: list[Act] = [] 155 | for act_id, act in actions.items(): 156 | if not act.is_hidden(flags): 157 | if is_action_in_current_room(act_id, act, room, now_hour, current_day, tm): 158 | acts.append(act) 159 | return acts 160 | 161 | 162 | def is_action_in_current_room( 163 | act_id: str, 164 | action: Act, 165 | room: Room, 166 | now_hour: int, 167 | current_day: int, 168 | tm: TimeHandler, 169 | ) -> bool: 170 | """Return True if the action is in the current room and available for the current time""" 171 | if room.id in action.room_ids or act_id in room.action_ids: 172 | if action.have_valid_day(current_day) and tm.now_is_between( 173 | start=action.hour_start, end=action.hour_stop, now=now_hour 174 | ): 175 | return True 176 | return False 177 | 178 | 179 | def current_button_actions( 180 | actions: dict[str, Act], 181 | room: Room, 182 | now_hour: int, 183 | current_day: int, 184 | tm: TimeHandler, 185 | flags: dict[str, bool] = {}, 186 | ) -> list[Act]: 187 | """Return a button action list for the current room and available for the current time""" 188 | acts: list[Act] = [] 189 | for act_id, act in actions.items(): 190 | if act.is_button and not act.is_hidden(flags): 191 | if is_action_in_current_room(act_id, act, room, now_hour, current_day, tm): 192 | acts.append(act) 193 | return acts 194 | 195 | 196 | def current_picture_in_background_actions( 197 | actions: dict[str, Act], 198 | room: Room, 199 | now_hour: int, 200 | current_day: int, 201 | tm: TimeHandler, 202 | flags: dict[str, bool] = {}, 203 | ) -> list[Act]: 204 | """Return a picture in background action list for the current room and available for the current time""" 205 | acts: list[Act] = [] 206 | for act_id, act in actions.items(): 207 | if act.is_picture_in_background and not act.is_hidden(flags): 208 | if is_action_in_current_room(act_id, act, room, now_hour, current_day, tm): 209 | acts.append(act) 210 | return acts 211 | -------------------------------------------------------------------------------- /pythonpackages/nqtr/button.py: -------------------------------------------------------------------------------- 1 | from typing import Optional, Union 2 | from pythonpackages.nqtr.disabled_solution import DisabledClass 3 | 4 | from pythonpackages.renpy_utility.flags import * 5 | from pythonpackages.renpy_utility.renpy_custom_log import * 6 | from pythonpackages.renpy_utility.utility import * 7 | 8 | 9 | class Button(DisabledClass): 10 | """Wiki: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Button""" 11 | 12 | def __init__( 13 | self, 14 | name: Optional[str] = None, 15 | label_name: Optional[str] = None, 16 | button_icon: Optional[str] = None, 17 | button_icon_selected: Optional[str] = None, 18 | picture_in_background: Optional[str] = None, 19 | picture_in_background_selected: Optional[str] = None, 20 | xalign: Optional[Union[int, float]] = None, 21 | yalign: Optional[Union[int, float]] = None, 22 | disabled: Union[bool, str] = False, 23 | hidden: Union[bool, str] = False, 24 | default_label_name: Optional[str] = None, 25 | ): 26 | # DisabledClass init 27 | super().__init__(disabled=disabled) 28 | # Button init 29 | self.align = None 30 | 31 | self.name = name 32 | self.label_name = label_name 33 | self.button_icon = button_icon 34 | self.button_icon_selected = button_icon_selected 35 | self.picture_in_background = picture_in_background 36 | self.picture_in_background_selected = picture_in_background_selected 37 | if not xalign == None: 38 | self.xalign = xalign 39 | if not yalign == None: 40 | self.yalign = yalign 41 | self.hidden = hidden 42 | self.default_label_name = default_label_name 43 | 44 | @property 45 | def name(self) -> str: 46 | """Button name or id, is used to identify the button and in logs""" 47 | return self._name 48 | 49 | @name.setter 50 | def name(self, value: Optional[str]): 51 | self._name = value or "" 52 | if isNullOrEmpty(self._name): 53 | log_warn("You have set name to None or empty", "nqtr.button.Button.name") 54 | 55 | @property 56 | def label_name(self) -> Optional[str]: 57 | """onClick label name""" 58 | if not isNullOrEmpty(self._label_name): 59 | return self._label_name 60 | elif not isNullOrEmpty(self.default_label_name): 61 | return self.default_label_name 62 | else: 63 | log_warn( 64 | "In the button " + self.name + ", label_name is null or empty", 65 | "nqtr.button.Button.label_name", 66 | ) 67 | return 68 | 69 | @label_name.setter 70 | def label_name(self, value: Optional[str]): 71 | self._label_name = value 72 | 73 | @property 74 | def button_icon(self) -> Optional[str]: 75 | """Button icon""" 76 | if not isNullOrEmpty(self._button_icon): 77 | return self._button_icon 78 | else: 79 | log_warn( 80 | "In the button " 81 | + self.name 82 | + ", button_icon is null or empty, use is_button_icon to check if it is a button icon button", 83 | "nqtr.button.Button.button_icon", 84 | ) 85 | return None 86 | 87 | @button_icon.setter 88 | def button_icon(self, value: Optional[str]): 89 | self._button_icon = value 90 | 91 | @property 92 | def button_icon_selected(self) -> Optional[str]: 93 | """Selected button icon""" 94 | if not isNullOrEmpty(self._button_icon_selected): 95 | return self._button_icon_selected 96 | else: 97 | return self.button_icon 98 | 99 | @button_icon_selected.setter 100 | def button_icon_selected(self, value: Optional[str]): 101 | self._button_icon_selected = value 102 | 103 | @property 104 | def picture_in_background(self) -> Optional[str]: 105 | """Picture in background: Is an button that is started by clicking on an image in the room.""" 106 | if not isNullOrEmpty(self._picture_in_background): 107 | return self._picture_in_background 108 | else: 109 | return None 110 | 111 | @picture_in_background.setter 112 | def picture_in_background(self, value: Optional[str]): 113 | self._picture_in_background = value 114 | 115 | @property 116 | def picture_in_background_selected(self) -> Optional[str]: 117 | """Selected picture in background""" 118 | if not isNullOrEmpty(self._picture_in_background_selected): 119 | return self._picture_in_background_selected 120 | else: 121 | return self.picture_in_background 122 | 123 | @picture_in_background_selected.setter 124 | def picture_in_background_selected(self, value: Optional[str]): 125 | self._picture_in_background_selected = value 126 | 127 | @property 128 | def align(self) -> Optional[tuple[Union[int, float], Union[int, float]]]: 129 | """X align""" 130 | return self._align 131 | 132 | @align.setter 133 | def align(self, value: Optional[tuple[Union[int, float], Union[int, float]]]): 134 | self._align = value 135 | 136 | @property 137 | def xalign(self) -> Union[int, float]: 138 | """X align""" 139 | if self._align != None: 140 | return self._align[0] 141 | else: 142 | return 0 143 | 144 | @xalign.setter 145 | def xalign(self, value: Optional[Union[int, float]]): 146 | if value == None: 147 | log_warn( 148 | "In the button " 149 | + self.name 150 | + ", you have set xalign to None, use 0 instead", 151 | "nqtr.button.Button.xalign", 152 | ) 153 | value = 0 154 | if self._align == None: 155 | self._align = (value, 0) 156 | else: 157 | self._align = (value, self._align[1]) 158 | 159 | @property 160 | def yalign(self) -> Union[int, float]: 161 | """Y align""" 162 | if self._align != None: 163 | return self._align[1] 164 | else: 165 | return 0 166 | 167 | @yalign.setter 168 | def yalign(self, value: Optional[Union[int, float]]): 169 | if value == None: 170 | log_warn( 171 | "In the button " 172 | + self.name 173 | + ", you have set yalign to None, use 0 instead", 174 | "nqtr.button.Button.yalign", 175 | ) 176 | value = 0 177 | if self._align == None: 178 | self._align = (0, value) 179 | else: 180 | self._align = (self._align[0], value) 181 | 182 | @property 183 | def hidden(self) -> Union[bool, str]: 184 | """Hidden""" 185 | return self._hidden 186 | 187 | @hidden.setter 188 | def hidden(self, value: Union[bool, str]): 189 | self._hidden = value 190 | 191 | @property 192 | def default_label_name(self) -> Optional[str]: 193 | """Default label name""" 194 | return self._default_label_name 195 | 196 | @default_label_name.setter 197 | def default_label_name(self, value: Optional[str]): 198 | self._default_label_name = value 199 | 200 | @property 201 | def is_button(self) -> bool: 202 | """This is a button?""" 203 | return not isNullOrEmpty(self._button_icon) 204 | 205 | @property 206 | def is_picture_in_background(self) -> bool: 207 | """This is a is picture in background?""" 208 | return not isNullOrEmpty(self._picture_in_background) 209 | 210 | def is_hidden( 211 | self, flags: dict[str, bool] = {}, check_if_has_icon: bool = True 212 | ) -> bool: 213 | """ "If hidden is a string: get the value of the flags system""" 214 | if isinstance(self.hidden, str): 215 | return get_flags(self.hidden, flags) 216 | elif ( 217 | check_if_has_icon 218 | and not self.is_button 219 | and not self.is_picture_in_background 220 | ): 221 | return True 222 | else: 223 | return self.hidden 224 | -------------------------------------------------------------------------------- /pythonpackages/nqtr/conversation.py: -------------------------------------------------------------------------------- 1 | from typing import Optional, Union 2 | 3 | from pythonpackages.nqtr.button import Button 4 | from pythonpackages.renpy_utility.renpy_custom_log import * 5 | from pythonpackages.renpy_utility.utility import * 6 | import renpy.character as character 7 | 8 | # TODO to move in renpy 9 | DEFAULT_LABEL_TALK = "nqtr_talk" 10 | 11 | 12 | class Conversation(Button): 13 | """Wiki: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Conversation-system""" 14 | 15 | def __init__( 16 | self, 17 | # only Conversation 18 | conversation_background: Optional[str] = None, 19 | characters: Optional[ 20 | Union[list[character.ADVCharacter], character.ADVCharacter] 21 | ] = [], 22 | # Button 23 | name: Optional[str] = None, 24 | label_name: Optional[str] = None, 25 | button_icon: Optional[str] = None, 26 | button_icon_selected: Optional[str] = None, 27 | picture_in_background: Optional[str] = None, 28 | picture_in_background_selected: Optional[str] = None, 29 | xalign: Optional[int] = None, 30 | yalign: Optional[int] = None, 31 | disabled: Union[bool, str] = False, 32 | hidden: Union[bool, str] = False, 33 | ): 34 | super().__init__( 35 | name=name, 36 | label_name=label_name, 37 | button_icon=button_icon, 38 | button_icon_selected=button_icon_selected, 39 | picture_in_background=picture_in_background, 40 | picture_in_background_selected=picture_in_background_selected, 41 | xalign=xalign, 42 | yalign=yalign, 43 | disabled=disabled, 44 | hidden=hidden, 45 | default_label_name=DEFAULT_LABEL_TALK, 46 | ) 47 | 48 | if characters: 49 | if isinstance(characters, character.ADVCharacter): 50 | characters = [characters] 51 | else: 52 | characters = [] 53 | if len(characters) == 0: 54 | log_error( 55 | f"Conversation {self.name} has no characters. This not work.", 56 | filename_line="pythonpackages/nqtr/conversation.py:Conversation.__init__", 57 | ) 58 | self.characters = characters 59 | self.conversation_background = conversation_background 60 | 61 | @property 62 | def background(self) -> Optional[str]: 63 | "Deprecation: use conversation_background" 64 | return self.conversation_background 65 | 66 | @background.setter 67 | def background(self, value: Optional[str]): 68 | "Deprecation: use conversation_background" 69 | self.conversation_background = value 70 | 71 | @property 72 | def conversation_background(self) -> Optional[str]: 73 | "Image path shown during a conversation." 74 | return self._bg 75 | 76 | @conversation_background.setter 77 | def conversation_background(self, value: Optional[str]): 78 | self._bg = value 79 | 80 | @property 81 | def characters(self) -> list[character.ADVCharacter]: 82 | """List of characters involved in the conversation.""" 83 | return self._characters 84 | 85 | @characters.setter 86 | def characters(self, value: list[character.ADVCharacter]): 87 | self._characters = value 88 | 89 | @property 90 | def character(self) -> Optional[character.ADVCharacter]: 91 | """The first character involved in the conversation.""" 92 | if len(self.characters) > 0: 93 | return self.characters[0] 94 | else: 95 | return None 96 | 97 | @property 98 | def character_icons(self) -> list[str]: 99 | """List of character icons involved in the conversation.""" 100 | icons: list[str] = [] 101 | for ch in self.characters: 102 | # if ch have a property icon 103 | if "icon" in ch.who_args and isinstance(ch.who_args["icon"], str): 104 | icons.append(ch.who_args["icon"]) 105 | return icons 106 | 107 | @property 108 | def character_icon(self) -> Optional[str]: 109 | """Returns the first icon of the characters in the commitment.""" 110 | for ch in self.characters: 111 | # if ch have a property icon 112 | if "icon" in ch.who_args and isinstance(ch.who_args["icon"], str): 113 | return ch.who_args["icon"] 114 | return None 115 | -------------------------------------------------------------------------------- /pythonpackages/nqtr/conversation_fun.py: -------------------------------------------------------------------------------- 1 | from pythonpackages.nqtr.conversation import Conversation 2 | from pythonpackages.nqtr.navigation import Room 3 | from pythonpackages.nqtr.routine import Commitment 4 | from pythonpackages.renpy_utility.renpy_custom_log import * 5 | from pythonpackages.renpy_utility.utility import * 6 | import renpy.character as character 7 | 8 | 9 | def current_button_conversations( 10 | commitments_in_cur_location: dict[character.ADVCharacter, Commitment], 11 | room: Room, 12 | cur_room: Room, 13 | ) -> list[tuple[Conversation, Commitment]]: 14 | """Return a list of conversation buttons for the current room and available for the current time""" 15 | conversations: list[tuple[Conversation, Commitment]] = [] 16 | for comm in commitments_in_cur_location.values(): 17 | if cur_room and comm and room.id == comm.room_id and room.id == cur_room.id: 18 | # Insert in talk for every ch, main in that room 19 | for conversation in comm.conversations: 20 | if conversation: 21 | conversations.append((conversation, comm)) 22 | return conversations 23 | 24 | 25 | def current_picture_in_background_conversations( 26 | commitments_in_cur_location: dict[character.ADVCharacter, Commitment], 27 | room: Room, 28 | cur_room: Room, 29 | ) -> list[tuple[Conversation, Commitment]]: 30 | """Return a list of conversation picture in background for the current room and available for the current time""" 31 | conversations: list[tuple[Conversation, Commitment]] = [] 32 | for comm in commitments_in_cur_location.values(): 33 | if cur_room and comm and room.id == comm.room_id and room.id == cur_room.id: 34 | # Insert in talk for every ch, main in that room 35 | for conversation in comm.conversations: 36 | if conversation and conversation.is_picture_in_background: 37 | conversations.append((conversation, comm)) 38 | return conversations 39 | -------------------------------------------------------------------------------- /pythonpackages/nqtr/disabled_solution.py: -------------------------------------------------------------------------------- 1 | from typing import Union 2 | 3 | from pythonpackages.renpy_utility.flags import * 4 | from pythonpackages.renpy_utility.renpy_custom_log import * 5 | from pythonpackages.renpy_utility.utility import * 6 | 7 | 8 | class DisabledClass(object): 9 | def __init__( 10 | self, 11 | disabled: Union[bool, str] = False, 12 | ): 13 | self.disabled = disabled 14 | 15 | @property 16 | def disabled(self) -> Union[bool, str]: 17 | """Disabled""" 18 | return self._disabled 19 | 20 | @disabled.setter 21 | def disabled(self, value: Union[bool, str]): 22 | self._disabled = value 23 | 24 | def is_disabled(self, flags: dict[str, bool] = {}) -> bool: 25 | """ "If disabled is a string: get the value of the flags system""" 26 | if isinstance(self.disabled, str): 27 | return get_flags(self.disabled, flags) 28 | else: 29 | return self.disabled 30 | -------------------------------------------------------------------------------- /pythonpackages/nqtr/locals.py: -------------------------------------------------------------------------------- 1 | from pythonpackages.nqtr.action import Act, clear_expired_actions, current_actions 2 | from pythonpackages.nqtr.conversation import Conversation 3 | from pythonpackages.nqtr.button import Button 4 | from pythonpackages.nqtr.navigation import ( 5 | Location, 6 | Map, 7 | Room, 8 | get_room_by_id, 9 | is_closed_room, 10 | ) 11 | from pythonpackages.nqtr.quest import Quest, Stage 12 | from pythonpackages.nqtr.routine import ( 13 | Commitment, 14 | clear_expired_routine, 15 | commitment_background, 16 | characters_commitment_in_current_location, 17 | characters_events_in_current_location, 18 | ) 19 | from pythonpackages.nqtr.time import TimeHandler 20 | 21 | __all__ = [ 22 | # action 23 | "Act", 24 | "clear_expired_actions", 25 | "current_actions", 26 | # conversation 27 | "Conversation", 28 | # button 29 | "Button", 30 | # navigation 31 | "Location", 32 | "Map", 33 | "Room", 34 | "get_room_by_id", 35 | "is_closed_room", 36 | # quest 37 | "Quest", 38 | "Stage", 39 | # routine 40 | "Commitment", 41 | "clear_expired_routine", 42 | "commitment_background", 43 | "characters_commitment_in_current_location", 44 | "characters_events_in_current_location", 45 | # time 46 | "TimeHandler", 47 | ] 48 | -------------------------------------------------------------------------------- /pythonpackages/nqtr/navigation.py: -------------------------------------------------------------------------------- 1 | from typing import Optional, Union 2 | 3 | from pythonpackages.nqtr.button import Button 4 | from pythonpackages.nqtr.routine import Commitment 5 | from pythonpackages.nqtr.time import TimeHandler 6 | from pythonpackages.renpy_utility.renpy_custom_log import * 7 | 8 | 9 | class Room(Button): 10 | """Wiki: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Navigation-and-Map#room""" 11 | 12 | def __init__( 13 | self, 14 | # Requirement Button params 15 | name: str, 16 | # Requirement 17 | id: str, 18 | location_id: str, 19 | # Room params 20 | background: Optional[str] = None, 21 | action_ids: list[str] = [], 22 | # Button params 23 | button_icon: Optional[str] = None, 24 | button_icon_selected: Optional[str] = None, 25 | picture_in_background: Optional[str] = None, 26 | picture_in_background_selected: Optional[str] = None, 27 | xalign: Optional[int] = None, 28 | yalign: Optional[int] = None, 29 | disabled: Union[bool, str] = False, 30 | hidden: Union[bool, str] = False, 31 | ): 32 | # Button init 33 | super().__init__( 34 | name=name, 35 | button_icon=button_icon, 36 | button_icon_selected=button_icon_selected, 37 | picture_in_background=picture_in_background, 38 | picture_in_background_selected=picture_in_background_selected, 39 | xalign=xalign, 40 | yalign=yalign, 41 | disabled=disabled, 42 | hidden=hidden, 43 | ) 44 | # Room init 45 | self.id = id 46 | self.location_id = location_id 47 | self.background = background 48 | self.action_ids = action_ids 49 | 50 | @property 51 | def id(self) -> str: 52 | """Room id""" 53 | return self._id 54 | 55 | @id.setter 56 | def id(self, value: str): 57 | self._id = value 58 | 59 | @property 60 | def location_id(self) -> str: 61 | """Location id where the Room is located""" 62 | return self._location_id 63 | 64 | @location_id.setter 65 | def location_id(self, value: str): 66 | self._location_id = value 67 | 68 | @property 69 | def background(self) -> Optional[str]: 70 | """Image path shown when standing at the Room""" 71 | return self._bg 72 | 73 | @background.setter 74 | def background(self, value: Optional[str]): 75 | self._bg = value 76 | 77 | @property 78 | def action_ids(self) -> list[str]: 79 | """List of action ids that can be performed in the Room""" 80 | return self._action_ids 81 | 82 | @action_ids.setter 83 | def action_ids(self, value: list[str]): 84 | self._action_ids = value 85 | 86 | 87 | class Location(Button): 88 | """Wiki: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Navigation-and-Map#location""" 89 | 90 | def __init__( 91 | self, 92 | # Requirement 93 | id: str, 94 | map_id: str, 95 | external_room_id: str, 96 | # Requirement Button params 97 | name: str, 98 | # Button params 99 | button_icon: Optional[str] = None, 100 | button_icon_selected: Optional[str] = None, 101 | picture_in_background: Optional[str] = None, 102 | picture_in_background_selected: Optional[str] = None, 103 | xalign: Optional[int] = None, 104 | yalign: Optional[int] = None, 105 | disabled: Union[bool, str] = False, 106 | hidden: Union[bool, str] = False, 107 | ): 108 | # Button init 109 | super().__init__( 110 | name=name, 111 | button_icon=button_icon, 112 | button_icon_selected=button_icon_selected, 113 | picture_in_background=picture_in_background, 114 | picture_in_background_selected=picture_in_background_selected, 115 | xalign=xalign, 116 | yalign=yalign, 117 | disabled=disabled, 118 | hidden=hidden, 119 | ) 120 | self.id = id 121 | self.map_id = map_id 122 | self.external_room_id = external_room_id 123 | 124 | @property 125 | def id(self) -> str: 126 | """Location id""" 127 | return self._id 128 | 129 | @id.setter 130 | def id(self, value: str): 131 | self._id = value 132 | 133 | @property 134 | def map_id(self) -> str: 135 | """Map id where the Location is located""" 136 | return self._map_id 137 | 138 | @map_id.setter 139 | def map_id(self, value: str): 140 | self._map_id = value 141 | 142 | @property 143 | def external_room_id(self) -> str: 144 | """Room id where the Location is located. 145 | Will be set this room when a location is changed""" 146 | return self._external_room_id 147 | 148 | @external_room_id.setter 149 | def external_room_id(self, value: str): 150 | self._external_room_id = value 151 | 152 | 153 | class Map(Button): 154 | """Wiki: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Navigation-and-Map#map""" 155 | 156 | def __init__( 157 | self, 158 | # Requirement Button params 159 | name: str, 160 | # Map params 161 | background: str, 162 | map_id_north: Optional[str] = None, 163 | map_id_south: Optional[str] = None, 164 | map_id_west: Optional[str] = None, 165 | map_id_east: Optional[str] = None, 166 | # Button params 167 | disabled: Union[bool, str] = False, 168 | hidden: Union[bool, str] = False, 169 | ): 170 | # Button init 171 | super().__init__( 172 | name=name, 173 | button_icon=None, 174 | button_icon_selected=None, 175 | picture_in_background=None, 176 | picture_in_background_selected=None, 177 | xalign=None, 178 | yalign=None, 179 | disabled=disabled, 180 | hidden=hidden, 181 | ) 182 | self.background = background 183 | self.map_id_north = map_id_north 184 | self.map_id_south = map_id_south 185 | self.map_id_west = map_id_west 186 | self.map_id_east = map_id_east 187 | 188 | @property 189 | def background(self) -> str: 190 | """Image path shown when standing at the Map""" 191 | return self._bg 192 | 193 | @background.setter 194 | def background(self, value: str): 195 | self._bg = value 196 | 197 | @property 198 | def map_id_north(self) -> Optional[str]: 199 | """Map id where the Map is located""" 200 | return self._map_id_north 201 | 202 | @map_id_north.setter 203 | def map_id_north(self, value: Optional[str]): 204 | self._map_id_north = value 205 | 206 | @property 207 | def map_id_south(self) -> Optional[str]: 208 | """Map id where the Map is located""" 209 | return self._map_id_south 210 | 211 | @map_id_south.setter 212 | def map_id_south(self, value: Optional[str]): 213 | self._map_id_south = value 214 | 215 | @property 216 | def map_id_west(self) -> Optional[str]: 217 | """Map id where the Map is located""" 218 | return self._map_id_west 219 | 220 | @map_id_west.setter 221 | def map_id_west(self, value: Optional[str]): 222 | self._map_id_west = value 223 | 224 | @property 225 | def map_id_east(self) -> Optional[str]: 226 | """Map id where the Map is located""" 227 | return self._map_id_east 228 | 229 | @map_id_east.setter 230 | def map_id_east(self, value: Optional[str]): 231 | self._map_id_east = value 232 | 233 | 234 | # TODO: Move in Room class 235 | def is_closed_room( 236 | room_id: str, closed_rooms: dict[str, Commitment], now_hour: int, tm: TimeHandler 237 | ) -> bool: 238 | """Wiki: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Navigation-and-Map#is-closed-room""" 239 | cur_room_is_closed = False 240 | closed_rooms_to_del = [] 241 | for id, item in closed_rooms.items(): 242 | if id == room_id and tm.now_is_between( 243 | start=item.hour_start, end=item.hour_stop, now=now_hour 244 | ): 245 | cur_room_is_closed = True 246 | elif item.hour_stop != None and not tm.now_is_between( 247 | start=item.hour_start, end=item.hour_stop, now=now_hour 248 | ): 249 | closed_rooms_to_del.append(id) 250 | for id in closed_rooms_to_del: 251 | del closed_rooms[id] 252 | del closed_rooms_to_del 253 | return cur_room_is_closed 254 | 255 | 256 | def get_room_by_id(room_id: str, rooms: list[Room]) -> Optional[Room]: 257 | """Wiki: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Navigation-and-Map#change-room""" 258 | if not room_id: 259 | log_warn("room_id is None", "nqtr.navigation.get_room_by_id()") 260 | return 261 | for room in rooms: 262 | if room.id == room_id: 263 | return room 264 | log_warn(f"Room with id {room_id} not found", "nqtr.navigation.get_room_by_id()") 265 | return 266 | 267 | 268 | def get_location_by_id( 269 | location_id: str, locations: list[Location] 270 | ) -> Optional[Location]: 271 | """Wiki: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Navigation-and-Map#change-location""" 272 | if not location_id: 273 | log_error("location_id is None", "nqtr.navigation.get_location_by_id()") 274 | return 275 | for location in locations: 276 | if location.id == location_id: 277 | return location 278 | return 279 | -------------------------------------------------------------------------------- /pythonpackages/nqtr/routine.py: -------------------------------------------------------------------------------- 1 | from typing import Optional, Union 2 | 3 | from pythonpackages.nqtr.conversation import Conversation 4 | from pythonpackages.nqtr.disabled_solution import DisabledClass 5 | from pythonpackages.nqtr.time import MAX_DAY_HOUR, MIN_DAY_HOUR, TimeHandler 6 | from pythonpackages.renpy_utility.utility import find_character_into_list 7 | import renpy.character as character 8 | 9 | 10 | class Commitment(DisabledClass): 11 | """Wiki: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Routine-system#commitment 12 | event_label_name: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Routine-system#events 13 | """ 14 | 15 | def __init__( 16 | self, 17 | hour_start: Union[int, float] = MIN_DAY_HOUR, 18 | hour_stop: Union[int, float] = MAX_DAY_HOUR, 19 | characters: Optional[ 20 | Union[list[character.ADVCharacter], character.ADVCharacter] 21 | ] = [], 22 | conversations: Optional[Union[list[Conversation], Conversation]] = [], 23 | background: Optional[str] = None, 24 | location_id: Optional[str] = None, 25 | room_id: Optional[str] = None, 26 | day_deadline: Optional[int] = None, 27 | event_label_name: Optional[str] = None, 28 | disabled: Union[bool, str] = False, 29 | ): 30 | # Button init 31 | super().__init__(disabled=disabled) 32 | # Fix a character values 33 | if characters: 34 | if isinstance(characters, character.ADVCharacter): 35 | characters = [characters] 36 | else: 37 | characters = [] 38 | if conversations: 39 | if isinstance(conversations, Conversation): 40 | conversations = [conversations] 41 | else: 42 | conversations = [] 43 | 44 | for item in conversations: 45 | for ch in item.characters: 46 | if ch not in characters: 47 | characters.append(ch) 48 | 49 | # Commitment init 50 | self.background = background 51 | self.conversations = conversations 52 | self.characters = characters 53 | self.hour_start = hour_start 54 | self.hour_stop = hour_stop - 0.1 55 | self.location_id = location_id 56 | self.room_id = room_id 57 | self.day_deadline = day_deadline 58 | self.event_label_name = event_label_name 59 | 60 | @property 61 | def hour_start(self) -> Union[int, float]: 62 | """The hour when the commitment starts.""" 63 | return self._hour_start 64 | 65 | @hour_start.setter 66 | def hour_start(self, value: Union[int, float]): 67 | self._hour_start = value 68 | 69 | @property 70 | def hour_stop(self) -> Union[int, float]: 71 | """The hour when the commitment ends.""" 72 | return self._hour_stop 73 | 74 | @hour_stop.setter 75 | def hour_stop(self, value: Union[int, float]): 76 | self._hour_stop = value 77 | 78 | @property 79 | def conversations(self) -> list[Conversation]: 80 | """Dictionary of characters and their Conversation.""" 81 | return self._ch_talkobj_dict 82 | 83 | @conversations.setter 84 | def conversations(self, value: list[Conversation]): 85 | self._ch_talkobj_dict = value 86 | 87 | @property 88 | def characters(self) -> list[character.ADVCharacter]: 89 | """List of characters""" 90 | return self._characters 91 | 92 | @characters.setter 93 | def characters(self, value: list[character.ADVCharacter]): 94 | self._characters = value 95 | 96 | @property 97 | def background(self) -> Optional[str]: 98 | "Image path shown when standing at the Commitment site. And it is also the image shown before and after the conversation with a character" 99 | return self._bg 100 | 101 | @background.setter 102 | def background(self, value: Optional[str]): 103 | self._bg = value 104 | 105 | @property 106 | def location_id(self) -> Optional[str]: 107 | """The location where the commitment takes place.""" 108 | return self._location_id 109 | 110 | @location_id.setter 111 | def location_id(self, value: Optional[str]): 112 | self._location_id = value 113 | 114 | @property 115 | def room_id(self) -> Optional[str]: 116 | """The room where the commitment takes place.""" 117 | return self._room_id 118 | 119 | @room_id.setter 120 | def room_id(self, value: Optional[str]): 121 | self._room_id = value 122 | 123 | @property 124 | def day_deadline(self) -> Optional[int]: 125 | """The day when the commitment expires.""" 126 | return self._day_deadline 127 | 128 | @day_deadline.setter 129 | def day_deadline(self, value: Optional[int]): 130 | self._day_deadline = value 131 | 132 | @property 133 | def event_label_name(self) -> Optional[str]: 134 | """The event label name.""" 135 | return self._event_label_name 136 | 137 | @event_label_name.setter 138 | def event_label_name(self, value: Optional[str]): 139 | self._event_label_name = value 140 | 141 | @property 142 | def is_event(self) -> bool: 143 | "Returns True if it is an event: if you go to the room of the having the event label it will start an automatic." 144 | return self.event_label_name is not None 145 | 146 | @property 147 | def character_icons(self) -> list[str]: 148 | """Returns a list of paths to the icons of the characters in the commitment.""" 149 | icons: list[str] = [] 150 | for ch in self.characters: 151 | # if ch have a property icon 152 | if "icon" in ch.who_args and isinstance(ch.who_args["icon"], str): 153 | icons.append(ch.who_args["icon"]) 154 | return icons 155 | 156 | @property 157 | def character_icon(self) -> Optional[str]: 158 | """Returns the first icon of the characters in the commitment.""" 159 | for ch in self.characters: 160 | # if ch have a property icon 161 | if "icon" in ch.who_args and isinstance(ch.who_args["icon"], str): 162 | return ch.who_args["icon"] 163 | return None 164 | 165 | def get_conversation_by_character( 166 | self, ch: character.ADVCharacter 167 | ) -> Optional[Conversation]: 168 | "Returns the conversation of the character" 169 | for item in self.conversations: 170 | item_2 = find_character_into_list(ch, item.characters) 171 | if item_2: 172 | return item 173 | return None 174 | 175 | def conversation_background( 176 | self, character: character.ADVCharacter 177 | ) -> Optional[str]: 178 | "Returns the image during a conversation" 179 | conversation = self.get_conversation_by_character(character) 180 | if isinstance(conversation, Conversation): 181 | return conversation.conversation_background 182 | else: 183 | return None 184 | 185 | # doesn't seem to work 186 | # use something like this: renpy.call(cur_events_location[cur_room.id].event_label_name) 187 | # def start_event(self): 188 | # if self.event_label_name == None: 189 | # renpy.call(self.event_label_name) 190 | 191 | 192 | def clear_expired_routine( 193 | commitments: dict[character.ADVCharacter, Commitment], tm: TimeHandler 194 | ) -> None: 195 | """removes expired Commitments""" 196 | rlist = [] 197 | rlist.clear() 198 | for key, val in commitments.items(): 199 | if val.day_deadline != None and val.day_deadline <= tm.day: 200 | rlist.append(key) 201 | for r in rlist: 202 | del commitments[r] 203 | del rlist 204 | return 205 | 206 | 207 | def characters_commitment_in_current_location( 208 | location_id: str, 209 | routine: dict[character.ADVCharacter, Commitment], 210 | tm: TimeHandler, 211 | flags: dict[str, bool] = {}, 212 | ) -> dict[character.ADVCharacter, Commitment]: 213 | """Priority wiki: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Routine-system#priority""" 214 | # Create a list of ch who have a commitment in that place at that time 215 | # It does not do enough checks, they will be done later with commitment_by_character() 216 | characters_into_current_location: list[character.ADVCharacter] = [] 217 | for comm in routine.values(): 218 | # Check Time and Location 219 | if ( 220 | comm.location_id == location_id 221 | and tm.now_is_between(start=comm.hour_start, end=comm.hour_stop) 222 | and not comm.is_disabled(flags) 223 | ): 224 | for chKey in comm.characters: 225 | item = find_character_into_list(chKey, characters_into_current_location) 226 | if not item: 227 | characters_into_current_location.append(chKey) 228 | # Check I enter the current commitments of the ch. 229 | # In case the commitment is not in the place I want to go or they are null and void I delete the ch. 230 | commitments: dict[character.ADVCharacter, Commitment] = {} 231 | for ch in characters_into_current_location: 232 | commitment_item = commitment_by_character(ch, routine, tm, flags) 233 | # the item can be None if the commitment is disabled 234 | # the item can be in another location, because the character has a commitment in another location whit more priority 235 | if commitment_item is not None and commitment_item.location_id == location_id: 236 | commitments[ch] = commitment_item 237 | del characters_into_current_location 238 | return commitments 239 | 240 | 241 | def characters_events_in_current_location( 242 | location_id: str, 243 | routine: dict[character.ADVCharacter, Commitment], 244 | tm: TimeHandler, 245 | flags: dict[str, bool] = {}, 246 | ) -> dict[str, Commitment]: 247 | """Returns events at that location at that time. 248 | Checks only in routine.""" 249 | # Create a list of ch who have a commitment in that place at that time 250 | # It does not do enough checks, they will be done later with commitment_by_character() 251 | events: dict[str, Commitment] = {} 252 | for comm in routine.values(): 253 | # Check Time and Location and is event 254 | if ( 255 | comm.location_id == location_id 256 | and tm.now_is_between(start=comm.hour_start, end=comm.hour_stop) 257 | and comm.is_event == True 258 | and not comm.is_disabled(flags) 259 | and comm.room_id 260 | ): 261 | events[comm.room_id] = comm 262 | return events 263 | 264 | 265 | def commitment_by_character( 266 | ch: character.ADVCharacter, 267 | routine: dict[character.ADVCharacter, Commitment], 268 | tm: TimeHandler, 269 | flags: dict[str, bool] = {}, 270 | ) -> Optional[Commitment]: 271 | """Returns the current commitment of the ch. 272 | Give priority to valid first found.""" 273 | # special routine 274 | for commitment in routine.values(): 275 | if tm.now_is_between(start=commitment.hour_start, end=commitment.hour_stop): 276 | if find_character_into_list(ch, commitment.characters): 277 | if not commitment.is_disabled(flags): 278 | return commitment 279 | return None 280 | 281 | 282 | def commitment_background( 283 | commitments: dict[character.ADVCharacter, Commitment], room_id: str 284 | ) -> Optional[str]: 285 | """Returns the first background image of the commitments based on the current room. if there are no returns None""" 286 | for item in commitments.values(): 287 | if item and item.room_id == room_id: 288 | return item.background 289 | return 290 | -------------------------------------------------------------------------------- /pythonpackages/nqtr/time.py: -------------------------------------------------------------------------------- 1 | from typing import Union 2 | from pythonpackages.renpy_utility.renpy_custom_log import * 3 | 4 | MIN_DAY_HOUR = 0 5 | MAX_DAY_HOUR = 24 6 | DEFAULT_TIME_SPENT = 1 7 | 8 | 9 | class TimeHandler(object): 10 | """Wiki: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Time-system#time-handler""" 11 | 12 | def __init__( 13 | self, 14 | hour_of_new_day: int = 5, 15 | hour: int = 8, 16 | weekday_weekend_begins: int = 6, 17 | day: int = 0, 18 | timeslot_names: list[tuple[int, str]] = [], 19 | weekday_names: list[str] = [], 20 | ): 21 | self.weekday_names = weekday_names 22 | self.hour_of_new_day = hour_of_new_day 23 | self.hour = hour 24 | self.day = day 25 | self.weekday_weekend_begins = weekday_weekend_begins 26 | self.timeslot_names = timeslot_names 27 | 28 | @property 29 | def hour_of_new_day(self) -> int: 30 | """hour when the day changes""" 31 | return self._hour_of_new_day 32 | 33 | @hour_of_new_day.setter 34 | def hour_of_new_day(self, value: int): 35 | self._hour_of_new_day = value 36 | if self._hour_of_new_day < 0: 37 | log_warn( 38 | "You have set hour_of_new_day < 0, so it will be set to 0.", 39 | "nqtr.time.TimeHandler.hour_of_new_day", 40 | ) 41 | self._hour_of_new_day = 0 42 | 43 | @property 44 | def hour(self) -> int: 45 | """current hour number""" 46 | return self._hour 47 | 48 | @hour.setter 49 | def hour(self, value: int): 50 | self._hour = value 51 | if self._hour > MAX_DAY_HOUR: 52 | self._hour = MAX_DAY_HOUR 53 | log_warn( 54 | "You have set hour > MAX_DAY_HOUR, so it will be set to MAX_DAY_HOUR.", 55 | "nqtr.time.TimeHandler.hour", 56 | ) 57 | if self._hour < MIN_DAY_HOUR: 58 | self._hour = MIN_DAY_HOUR 59 | log_warn( 60 | "You have set hour < MIN_DAY_HOUR, so it will be set to MAX_DAY_HOUR.", 61 | "nqtr.time.TimeHandler.hour", 62 | ) 63 | 64 | @property 65 | def weekday_weekend_begins(self) -> int: 66 | """day when the weekend begins. this depends on the weekday_names list. 67 | start from 0. 68 | es: if weekday_names = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"] 69 | and weekday_weekend_begins = 6, then the weekend begins on Saturday.""" 70 | return self._weekday_weekend_begins 71 | 72 | @weekday_weekend_begins.setter 73 | def weekday_weekend_begins(self, value: int): 74 | self._weekday_weekend_begins = value 75 | if self._weekday_weekend_begins < 0: 76 | log_warn( 77 | "You have set weekday_weekend_begins < 0, so it will be set to 6.", 78 | "nqtr.time.TimeHandler.weekday_weekend_begins", 79 | ) 80 | self._weekday_weekend_begins = 6 81 | if self._weekday_weekend_begins > len(self.weekday_names): 82 | log_warn( 83 | "You have set weekday_weekend_begins > len(weekday_names), so I ignore it.", 84 | "nqtr.time.TimeHandler.weekday_weekend_begins", 85 | ) 86 | 87 | @property 88 | def is_weekend(self) -> bool: 89 | """Wiki: https://github.com/DRincs-Productions/NQTR-System/wiki/Time-system#is-weekend""" 90 | return self.weekday_number >= (self.weekday_weekend_begins - 1) 91 | 92 | @property 93 | def day(self) -> int: 94 | """current day number""" 95 | return self._day 96 | 97 | @day.setter 98 | def day(self, value: int): 99 | self._day = value 100 | if self._day < 0: 101 | self._day = 0 102 | log_warn( 103 | "You have set day < 0, so it will be set to 0.", 104 | "nqtr.time.TimeHandler.day", 105 | ) 106 | 107 | @property 108 | def timeslot_names(self) -> list[tuple[int, str]]: 109 | return self._timeslot_names 110 | 111 | @timeslot_names.setter 112 | def timeslot_names(self, value: list[tuple[int, str]]): 113 | self._timeslot_names = value 114 | 115 | @property 116 | def weekday_names(self) -> list[str]: 117 | return self._weekday_names 118 | 119 | @weekday_names.setter 120 | def weekday_names(self, value: list[str]): 121 | self._weekday_names = value 122 | 123 | @property 124 | def timeslot_name(self) -> str: 125 | """Returns the name of the current timeslot.""" 126 | if len(self.timeslot_names) > 0: 127 | return self.timeslot_names[self.timeslot_number][1] 128 | else: 129 | log_warn( 130 | "You have not set any timeslot_names, so it will return an empty string.", 131 | "nqtr.time.TimeHandler.timeslot_name", 132 | ) 133 | return "" 134 | 135 | @property 136 | def timeslot_number(self) -> int: 137 | """Returns the number of the current timeslot. 138 | This variable is used to update images that change according to time. 139 | es: image = "sky-[tm.timeslot_number]""" 140 | res = 0 141 | current = None 142 | if len(self.timeslot_names) > 0: 143 | for index, timeslot in enumerate(self.timeslot_names): 144 | if self.hour >= timeslot[0]: 145 | if current == None or timeslot[0] > current[0]: 146 | res = index 147 | current = timeslot 148 | return res 149 | else: 150 | log_error( 151 | "You have not set any timeslot_names, so it will return 0.", 152 | "nqtr.time.TimeHandler.timeslot_number", 153 | ) 154 | return 0 155 | 156 | @property 157 | def weekday_number(self) -> int: 158 | """ 159 | Starts from 0. Returns the number of the current weekday. 160 | https://github.com/DRincs-Productions/NQTR-System/wiki/Time-system#check-of-the-day-of-the-week 161 | """ 162 | if len(self.weekday_names) > 0: 163 | return self.day % len(self.weekday_names) 164 | else: 165 | log_warn( 166 | "You have not set any weekday_names, so it will return 0.", 167 | "nqtr.time.TimeHandler.weekday_number", 168 | ) 169 | return 0 170 | 171 | @property 172 | def weekday_name(self) -> str: 173 | if len(self.weekday_names) > 0: 174 | return self.weekday_names[self.weekday_number] 175 | else: 176 | log_warn( 177 | "You have not set any weekday_names, so it will return an empty string.", 178 | "nqtr.time.TimeHandler.weekday_name", 179 | ) 180 | return "" 181 | 182 | # def get_day_of_month(self, hour=None): 183 | # hour = self.get_hour(hour) 184 | # day = self.get_day_number(hour) + 1 185 | # for month in month_names: 186 | # if day <= len(month[1]): 187 | # break 188 | # day -= len(month[1]) 189 | # return day 190 | 191 | # def get_month_name(self, hour=None): 192 | # hour = self.get_hour(hour) 193 | # return month_names[ self.get_month_number(hour) ][0] 194 | 195 | # def get_month_number(self, hour=None): 196 | # hour = self.get_hour(hour) 197 | # day = self.get_day_number(hour) 198 | # # remember days start 199 | # month_number = 0 200 | # for month in month_names: 201 | # if day < len(month[1]): 202 | # break 203 | # month_number += 1 204 | # day -= len(month[1]) 205 | # return month_number 206 | 207 | def new_hour(self, amt: int = DEFAULT_TIME_SPENT) -> bool: 208 | """Wiki: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Time-system#new-houre-manualy""" 209 | if self.hour == MAX_DAY_HOUR and amt > 0: 210 | log_info( 211 | "Max hour reached, you can't add more hours", 212 | "nqtr.time.TimeHandler.new_hour", 213 | ) 214 | return False 215 | elif self.hour == MIN_DAY_HOUR and amt < 0: 216 | log_info( 217 | "Min hour reached, you can't remove more hours", 218 | "nqtr.time.TimeHandler.new_hour", 219 | ) 220 | return False 221 | 222 | self.hour += amt 223 | return True 224 | 225 | def new_day(self, amt: int = 1) -> bool: 226 | """Wiki: https://github.com/DRincs-Productions/NQTR-toolkit/wiki/Time-system#new-day-manualy""" 227 | if self.day == 0 and amt < 0: 228 | log_warn( 229 | "Min day reached, you can't remove more days", 230 | "nqtr.time.TimeHandler.new_day", 231 | ) 232 | return False 233 | self.hour = self.hour_of_new_day 234 | self.day += amt 235 | return True 236 | 237 | def now_is_between( 238 | self, end: Union[int, float], start: Union[int, float] = 0, now=None 239 | ) -> bool: 240 | if now is None: 241 | return ((self.hour >= start or start > end) and self.hour < end) or ( 242 | self.hour >= start and (self.hour < end or start > end) 243 | ) 244 | else: 245 | return ((now >= start or start > end) and now < end) or ( 246 | now >= start and (now < end or start > end) 247 | ) 248 | --------------------------------------------------------------------------------