From 773a9307f3e65e1ad7123eedd39bbc30631c3090 Mon Sep 17 00:00:00 2001 From: jeremi360 Date: Mon, 31 Oct 2016 19:52:19 +0100 Subject: [PATCH] Finsh develop DSE support --- .gitignore | 5 + README.md | 6 +- game/EE_config.rpy | 14 --- game/Event Editor/EE__forDSE.rpy | 144 +++++++++++++++++++++++ game/Event Editor/EE_config.rpy | 44 +++++++ game/Event Editor/EE_main.rpy | 24 ++-- game/events/EEout_main_test.rpy | 9 -- game/mods/test/events/EEout_test_two.rpy | 2 +- game/mods/test/mod.conf.rpy | 6 +- game/options.rpy | 4 +- launcherinfo.py | 3 +- main_menu.rpy | 37 ------ 12 files changed, 222 insertions(+), 76 deletions(-) create mode 100644 .gitignore delete mode 100755 game/EE_config.rpy create mode 100644 game/Event Editor/EE__forDSE.rpy create mode 100755 game/Event Editor/EE_config.rpy delete mode 100755 game/events/EEout_main_test.rpy delete mode 100755 main_menu.rpy diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e4bac1f --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +*.rpyc +*.txt +*.rpyb +game/saves + diff --git a/README.md b/README.md index 2a2bf63..ef5cc55 100755 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ Ren'Py Event Editor forked from this: [Ren'Py Event Editor forum topic](http://lemmasoft.renai.us/forums/viewtopic.php?f=51&t=24108#p374045) ## Features: +- Support to use as mod in any game(just ajust EE_config.rpy in Event Editor folder) +- Support for [DSE(Dating Sim Engine)](https://github.com/renpy/dse) - Support for mods / custom scenarios - see files in *mods/test* - You can test your events from menu - All generated events have *EEout_* prefix: @@ -28,8 +30,8 @@ Ren'Py Event Editor forked from this: [Ren'Py Event Editor forum topic](http://l ## Changes: - Now tutorial have screen shots - Some fixes in gui -- Move gui to new renpy gui -- Start develop support for [DSE(Dating Sim Engine)](https://github.com/renpy/dse) +- Move gui to new renpy gui (Ren'Py v.6.99.11.1749) +- Finished develop support for [DSE(Dating Sim Engine)](https://github.com/renpy/dse) - Add *EE_config.rpy* to show default Event Editor configuration - Change way of adding new speakers to fix bug - Add test mod diff --git a/game/EE_config.rpy b/game/EE_config.rpy deleted file mode 100755 index e5e546e..0000000 --- a/game/EE_config.rpy +++ /dev/null @@ -1,14 +0,0 @@ -init -100 python: - # here you can config Event Editor to your game - # default images config - addBGs('images/bgs') - addEVs('images/events') - addChs('images/characters') - - # example of adding character(EE speaker): - somebody = Character("Somebody") - speakers["somebody"] = somebody - - # enable/disable DSE(Dating Sim Engine) support in Event Editor - # this is alpha don't work now do set to True - EE__DSEmodule_active = False diff --git a/game/Event Editor/EE__forDSE.rpy b/game/Event Editor/EE__forDSE.rpy new file mode 100644 index 0000000..21e2d7f --- /dev/null +++ b/game/Event Editor/EE__forDSE.rpy @@ -0,0 +1,144 @@ +# Beta content for the DSE module of the Event Editor +# +# + +init -20 python: + class possible_condition(): + def __init__(self,textbutton_text,variable_name,variable_type='number'): + self.textbutton_text = textbutton_text + self.variable_name = variable_name + self.variable_type = variable_type + + + class condition_content(): + def __init__(self,condition_property,operator='==',variable_value='0'): + self.condition_property = condition_property + self.operator = operator + self.variable_value = variable_value + + def EE__changecondition(num,num2): + EE__conditions_used_list[num2].condition_property = EE__DES_possible_conditions_list[num] + if EE__DES_possible_conditions_list[num].variable_type != 'number': + EE__conditions_used_list[num2].operator = "==" + + def EE__changeoperator(num,str): + EE__conditions_used_list[num].operator=str + + def EE__remove_condition(num): + del EE__conditions_used_list[num] + + +################################################################################################### +################################################################################################### +# +# STEP 3: DSE CONDITIONS (optional) +# +################################################################################################### +################################################################################################### + + +init python: + EE__conditions_used_list = [] + EE__DSE_once = 0 + EE__DSE_group = 0 + + +######################################################## +# +# Screens for the DSE conditions +# +######################################################## + +screen EE__DSEmodule: + imagemap: + ground "#000" + textbutton _('BACK') action Return() xalign 1.0 + vbox: + text _("DSE module") size 40 + null height 50 + hbox: + text _("Event will appear only once") + null width 50 + showif EE__DSE_once==0: + textbutton _("Off") action SetVariable("EE__DSE_once",1) + else: + textbutton _("On") action SetVariable("EE__DSE_once",0) + null height 20 + hbox: + text _("Event is in group") + null width 50 + showif EE__DSE_group==0: + textbutton _("No group") action Show('EE__DSE_choose_group_screen') + else: + textbutton _('[EE__DSE_group]') action Show('EE__DSE_choose_group_screen') + null height 80 + textbutton _('Add condition') action SetVariable("EE__conditions_used_list",EE__conditions_used_list+[condition_content(EE__DES_possible_conditions_list[0])]) xalign 0.5 + null height 40 + viewport: + xsize 800 + xfill True + scrollbars "vertical" + mousewheel True + vbox: + xfill True + spacing 10 + for ii in range(len(EE__conditions_used_list)): + hbox: + xfill True + textbutton _('Remove') action [Function(EE__remove_condition,ii),Show('EE__DSEmodule')] + null width 30 + textbutton _(EE__conditions_used_list[ii].condition_property.textbutton_text) action Show("choose_condition_screen",[],ii) + textbutton ("%s" % EE__conditions_used_list[ii].operator) action Show("choose_operator_screen",[],ii) xalign 1.0 + textbutton ("%s" % EE__conditions_used_list[ii].variable_value) action [Function(ui.callsinnewcontext("EE__choose_condition_value",EE__conditions_used_list[ii].variable_value,ii)),Show('EE__DSEmodule')] xalign 1.0 + + + + +screen EE__DSE_choose_group_screen: + tag EE__DSE_sel_screen + vbox: + xpos 0.75 + yalign 0.5 + textbutton _('No group') action [SetVariable('EE__DSE_group',0),Hide("EE__DSE_choose_group_screen")] xminimum 200 + for ii in range (len(EE__DSE_group_list)): + textbutton _(EE__DSE_group_list[ii]) action [SetVariable('EE__DSE_group',EE__DSE_group_list[ii]),Hide("EE__DSE_choose_group_screen")] xminimum 200 + + +screen choose_condition_screen(jj): + tag EE__DSE_sel_screen + vbox: + xpos 0.75 + yalign 0.5 + for ii in range (len(EE__DES_possible_conditions_list)): + textbutton _(EE__DES_possible_conditions_list[ii].textbutton_text) action [Function(EE__changecondition,ii,jj),Hide("choose_condition_screen")] xminimum 200 + + +screen choose_operator_screen(num): + tag EE__DSE_sel_screen + vbox: + xpos 0.75 + yalign 0.5 + textbutton _('== (equal to)') action [Function(EE__changeoperator,num,"=="),Hide('choose_operator_screen')] xminimum 200 + showif EE__conditions_used_list[num].condition_property.variable_type == 'number': + textbutton _('!= (not equal to)') action [Function(EE__changeoperator,num,"!="),Hide('choose_operator_screen')] xminimum 200 + textbutton _('> (major than)') action [Function(EE__changeoperator,num,">"),Hide('choose_operator_screen')] xminimum 200 + textbutton _('>= (equal or major than)') action [Function(EE__changeoperator,num,">="),Hide('choose_operator_screen')] xminimum 200 + textbutton _('<(minor than)') action [Function(EE__changeoperator,num,"<"),Hide('choose_operator_screen')] xminimum 200 + textbutton _('<= (equal or minor than)') action [Function(EE__changeoperator,num,"<="),Hide('choose_operator_screen')] xminimum 200 + + + +label EE__choose_condition_value(out,num): + scene black + if EE__conditions_used_list[num].condition_property.variable_type == 'number': + $ out = renpy.input("Write the value:",allow="0123456789") + if out=="": + jump EE__choose_condition_value + $ EE__conditions_used_list[num].variable_value = out + elif EE__conditions_used_list[num].condition_property.variable_type == 'boolean': + if EE__conditions_used_list[num].variable_value == "True": + $ EE__conditions_used_list[num].variable_value = "False" + else: + $ EE__conditions_used_list[num].variable_value = "True" + show screen EE__DSEmodule + return diff --git a/game/Event Editor/EE_config.rpy b/game/Event Editor/EE_config.rpy new file mode 100755 index 0000000..d66194b --- /dev/null +++ b/game/Event Editor/EE_config.rpy @@ -0,0 +1,44 @@ +init -10 python: + # here you can config Event Editor to your game + # default images config + addBGs('images/bgs') + addEVs('images/events') + addChs('images/characters') + + # example of adding character(EE speaker): + somebody = Character("Somebody") + speakers["Somebody"] = somebody + + #change this if you want add EE as mod to your game + EE_as_mod = False + EE_edit_main_plot = True + + + # enable/disable DSE(Dating Sim Engine) support in Event Editor + # this is alpha don't work now do set to True + EE__DSEmodule_active = True + + #DSE config example + EE__DES_possible_conditions_list = [ + possible_condition('Lucky','lucky','number'), + possible_condition('Cash', 'cash', 'number') + ] + + EE__DSE_group_list = [ + 'cafeteria','class','library' + ] + + if EE_as_mod: + persistent.mod_trigger__EE = True + mod_list.insert(0,('Event Editor','Editor','2.6.3','??','stable','persistent.mod_trigger__EE')) + + persistent.mod_custom_new_game = "EE__newgameStart" + +label EE__newgameStart: + menu: + "Enter the event editor": + jump EE__start + "See the event you created with the Event Editor": + jump EE__watch_event_list + "Start a new game": + jump new_game diff --git a/game/Event Editor/EE_main.rpy b/game/Event Editor/EE_main.rpy index cf33fe9..515f7bd 100755 --- a/game/Event Editor/EE_main.rpy +++ b/game/Event Editor/EE_main.rpy @@ -59,6 +59,9 @@ screen event_window: else: textbutton _("Event Menu") action [GetText("event_window","input"),ShowMenu("project_main_menu")] xalign 1.0 + if EE__DSEmodule_active: + textbutton _('DSE manager') action [GetText("event_window","input"),ShowMenu('EE__DSEmodule')] xalign 1.0 yalign 0.05 xsize 200 + vbox: hbox: textbutton _("Speaker") action Show('speaker_selection') xminimum 120 @@ -144,15 +147,22 @@ label EE_start: label new_project: $ modname = "" - menu: - "New Project For:" + if EE_edit_main_plot: + menu: + "New Project For:" + + "Main Game Plot": + $_modn = "main_" - "Main Game Plot": - $_modn = "main_" + "Mod": + $modname = renpy.input("Write a name of mod","mod") + $_modn = modname + "_" + + else: + "New Project For Mod" + $modname = renpy.input("Write a name of mod","mod") + $_modn = modname + "_" - "Mod": - $modname = renpy.input("Write a name of mod","mod") - $_modn = modname + "_" $ project_name = "EEout_" + _modn + renpy.input("Write a name for the event","test") if project_name == "EEout_" + _modn: diff --git a/game/events/EEout_main_test.rpy b/game/events/EEout_main_test.rpy deleted file mode 100755 index b55a590..0000000 --- a/game/events/EEout_main_test.rpy +++ /dev/null @@ -1,9 +0,0 @@ -label EEout_main_test: - scene black - centered "THIS TEXT CENTER" - - sombody "somobdy test" - - boy3 "old chr test" - - return \ No newline at end of file diff --git a/game/mods/test/events/EEout_test_two.rpy b/game/mods/test/events/EEout_test_two.rpy index 86ee005..499ec62 100755 --- a/game/mods/test/events/EEout_test_two.rpy +++ b/game/mods/test/events/EEout_test_two.rpy @@ -26,7 +26,7 @@ label EEout_test_two: "You reach handle." - scene tango Red + scene Red "But suddenlly you fell pain in you head." scene Black diff --git a/game/mods/test/mod.conf.rpy b/game/mods/test/mod.conf.rpy index fed5c7e..0b10cf3 100755 --- a/game/mods/test/mod.conf.rpy +++ b/game/mods/test/mod.conf.rpy @@ -1,7 +1,7 @@ # this is example config mod to develop with Ren'Py Event Editor -init -200 python: - sylv = Character("Sylvie", color = "#e65fc8") - speakers["sylv"] = sylv +init -20 python: + sylvie = Character("Sylvie", color = "#e65fc8") + speakers["sylv"] = sylvie you = Character("You") speakers["you"] = you diff --git a/game/options.rpy b/game/options.rpy index 728d20f..6b3ffe2 100644 --- a/game/options.rpy +++ b/game/options.rpy @@ -12,7 +12,7 @@ ## ## The _() surrounding the string marks it as eligible for translation. -define config.name = _("RenPy_EE") +define config.name = _("Ren'Py Event Editor") ## Determines if the title given above is shown on the main menu screen. Set @@ -23,7 +23,7 @@ define gui.show_name = True ## The version of the game. -define config.version = "2.6.2" +define config.version = "2.6.3" ## Text that is placed on the game's about screen. To insert a blank line diff --git a/launcherinfo.py b/launcherinfo.py index 4d8a4ff..768917e 100755 --- a/launcherinfo.py +++ b/launcherinfo.py @@ -1,2 +1,3 @@ -description = "Using this you can speed up creating events for your events and change this roject to your game." +description = """Using this you can speed up creating events + for your events and change this roject to your game.""" ro = True diff --git a/main_menu.rpy b/main_menu.rpy deleted file mode 100755 index 9166fec..0000000 --- a/main_menu.rpy +++ /dev/null @@ -1,37 +0,0 @@ -############################################################################## -# Main Menu -# -# Screen that's used to display the main menu, when Ren'Py first starts -# http://www.renpy.org/doc/html/screen_special.html#main-menu - -screen main_menu(): - - # This ensures that any other menu screen is replaced. - tag menu - - # The background of the main menu. - window: - style "mm_root" - - # The main menu buttons. - frame: - style_group "mm" - xalign .98 - yalign .98 - - has vbox - - textbutton _("New Game") action Start("EEout_main_start") - textbutton _("Mods") action Start("mods_sec") - textbutton _("Add New Event") action Start("EE_start") - textbutton _("Test Event") action Start("EE_test") - textbutton _("Load Game") action ShowMenu("load") - textbutton _("Preferences") action ShowMenu("preferences") - textbutton _("Help") action Help() - textbutton _("Quit") action Quit(confirm=False) - -init -2: - - # Make all the main menu buttons be the same size. - style mm_button: - size_group "mm"