diff --git a/game/mods/storyline_ex.rpy b/game/mods/storyline_ex.rpy new file mode 100644 index 0000000..1d2b34c --- /dev/null +++ b/game/mods/storyline_ex.rpy @@ -0,0 +1,12 @@ + +init python: + # Modding Support variables + # All mod rpy files must have title of their mod (this shows up on a button) + # and finally the label that controls the flow of dialogue + + mod_menu_access += [["Example Mod", "storyline_ex"]]; + +image template_sample = Image("mods/template/img/sample.png") + +label storyline_ex: + call chapter_2_new diff --git a/game/mods/template/chapter2_redo.rpy b/game/mods/template/chapter2_redo.rpy new file mode 100644 index 0000000..bbc2fe0 --- /dev/null +++ b/game/mods/template/chapter2_redo.rpy @@ -0,0 +1,9 @@ + + +label chapter_2_new: + show template_sample at scenter + "Sample Text" + hide template_sample + show anon neutral flip at aright with dissolve + A "Sample Text" + return diff --git a/game/mods/template/img/sample.png b/game/mods/template/img/sample.png new file mode 100644 index 0000000..a90472f Binary files /dev/null and b/game/mods/template/img/sample.png differ diff --git a/game/options.rpy b/game/options.rpy index 76119cc..04a6d16 100644 --- a/game/options.rpy +++ b/game/options.rpy @@ -185,6 +185,10 @@ init python: build.classify('**/#**', None) build.classify('**/thumbs.db', None) + # Do not include mods as part of the build process + build.classify('game/mods/**', None) + build.classify('game/mods/.**', None) + ## To archive files, classify them as 'archive'. # build.classify('game/**.png', 'archive') diff --git a/game/screens.rpy b/game/screens.rpy index 2031d83..7deea1e 100644 --- a/game/screens.rpy +++ b/game/screens.rpy @@ -4,7 +4,6 @@ init offset = -1 - ################################################################################ ## Styles ################################################################################ @@ -416,12 +415,13 @@ screen main_menu(): else: add "gui/snootgame.png" vbox: - spacing 25 + spacing 10 xpos 1885 - yalign 0.9 + yalign 0.98 use main_menu_buttons("gui/button/menubuttons/template_idle.png", [ \ [ "Start", Start() ], \ + [ "Mods", ShowMenu("mod_menu") ], \ [ "Load", ShowMenu("load") ], \ [ "Options", ShowMenu("preferences") ], \ [ "Help & About", ShowMenu("extras") ], \ @@ -467,6 +467,34 @@ style main_menu_title: # properties gui.text_properties("version") + +## Mod Menu screen ############################################################ +## +## Handles jumping to the mods scripts +## +screen mod_menu(): + + + tag menu + viewport: + yinitial 0 + scrollbars "vertical" + mousewheel True + draggable True + pagekeys True + +#side_yfill True + + vbox: + spacing 10 + xpos 1885 + yalign 0.98 + + for x in mod_menu_access: + use main_menu_button("gui/button/menubuttons/template_idle.png", + x[0], Start(x[1]) ) + + ## Game Menu screen ############################################################ ## ## This lays out the basic common structure of a game menu screen. It's called diff --git a/game/script.rpy b/game/script.rpy index adbb5a5..f0b584e 100644 --- a/game/script.rpy +++ b/game/script.rpy @@ -13,17 +13,23 @@ #Why yes all my code was formerly in one massive file called "script" thats 28k lines long, how could you tell? #Licensed under the GNU AGPL v3, for more information check snootgame.xyz or the LICENSE file that should have came with this work. +init -1 python: + # Modding Support variables + # All mod rpy files must run a small init python script + mod_dir = "mods/"; + mod_menu_access = []; + init python: - import random - import webbrowser - #function for insult layers - def showCG(): + import random + import webbrowser + #function for insult layers + def showCG(): files = ["text0", "text1", "text2", "text3", "text4", "text5", "text6", "text7", "text8", "text9"] length = len(files) picked = random.randint(0,length - 1) fileName = files[picked] renpy.show(fileName, at_list=[randPosition]) - if persistent.scroll == True: + if persistent.scroll == True: config.keymap['dismiss'].append('mousedown_4') transform randPosition: diff --git a/game/storyline.rpy b/game/storyline.rpy index 5c1e906..846d6ba 100644 --- a/game/storyline.rpy +++ b/game/storyline.rpy @@ -58,4 +58,4 @@ label ending: if tradwife: scene c10 with fade pause 20 - return \ No newline at end of file + return