From ee2ca3a4573e4e203c3e6c3ea26a33e6713c2d6d Mon Sep 17 00:00:00 2001 From: jeremi360 Date: Thu, 28 Jul 2016 15:17:35 +0200 Subject: [PATCH] =?UTF-8?q?/=20=E2=80=98README.md=E2=80=99=20+=20=E2=80=98?= =?UTF-8?q?game/EE=5Fconfig.rpy=E2=80=99=20/=20=E2=80=98game/Event=20Edito?= =?UTF-8?q?r/EE=5Fauto=5Fres.rpy=E2=80=99=20/=20=E2=80=98game/Event=20Edit?= =?UTF-8?q?or/EE=5Fmain.rpy=E2=80=99=20/=20=E2=80=98game/Event=20Editor/ba?= =?UTF-8?q?se=5Fspeakers.rpy=E2=80=99=20/=20=E2=80=98game/Event=20Editor/i?= =?UTF-8?q?mages.rpy=E2=80=99=20/=20=E2=80=98game/Event=20Editor/mods.rpy?= =?UTF-8?q?=E2=80=99=20+=20=E2=80=98game/events/EEout=5Fmain=5Fstart.rpy?= =?UTF-8?q?=E2=80=99=20+=20=E2=80=98game/events/EEout=5Fmain=5Ftest.rpy?= =?UTF-8?q?=E2=80=99=20/=20=E2=80=98game/main=5Fmenu.rpy=E2=80=99=20/=20?= =?UTF-8?q?=E2=80=98game/mods/test/events/EEout=5Ftest=5Ftwo.rpy=E2=80=99?= =?UTF-8?q?=20/=20=E2=80=98game/mods/test/mod.conf.rpy=E2=80=99=20+=20?= =?UTF-8?q?=E2=80=98launcherinfo.py=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 13 ++++++++---- game/EE_config.rpy | 14 +++++++++++++ game/Event Editor/EE_auto_res.rpy | 20 ++++++++++++++++--- game/Event Editor/EE_main.rpy | 25 ++++++++++++++++++++++-- game/Event Editor/base_speakers.rpy | 21 +++++++++++++------- game/Event Editor/images.rpy | 4 ---- game/Event Editor/mods.rpy | 23 ++++++++++++++-------- game/events/EEout_main_start.rpy | 19 ++++++++++++++++++ game/events/EEout_main_test.rpy | 9 +++++++++ game/main_menu.rpy | 2 +- game/mods/test/events/EEout_test_two.rpy | 10 +++++----- game/mods/test/mod.conf.rpy | 7 +++++-- launcherinfo.py | 2 ++ 13 files changed, 133 insertions(+), 36 deletions(-) create mode 100644 game/EE_config.rpy create mode 100644 game/events/EEout_main_start.rpy create mode 100644 game/events/EEout_main_test.rpy create mode 100644 launcherinfo.py diff --git a/README.md b/README.md index d214cc3..f622b35 100644 --- a/README.md +++ b/README.md @@ -5,24 +5,29 @@ Ren'Py Event Editor forked from this: [Ren'Py Event Editor forum topic](http://l ## Features: - Support for mods / custom scenarios - see files in *mods/test* - You can test your events from menu -- All generated events have *EEout_* prefix +- All generated events have *EEout_* prefix: + - Events from main plot have *EEout_main_* prefix + - Events from mods have *EEout_mod_name_* prefix - Genterate buttons for all spekers added to speakers list: ``` - $ speakers.append(mycharacter) + $ speakers["my_character_name_in_code"] = my_character_name_in_code ``` - Easy add custom images folders: ``` init -30 python: - addBGs('my_custom_bgs', 'my_bg_prefix') #you don't have to write prefix - addEVs('my_custom_ev', 'my_ev_prefix') + addBGs('my_custom_bgs', 'my_bg_prefix') #default prefix is 'bg' + addEVs('my_custom_ev', 'my_ev_prefix') #default prefix is 'event' addChs('my_custom_ch') ``` ## Changes: +- Start 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 - Fix indentation on speakers lines again - Add Support for mods diff --git a/game/EE_config.rpy b/game/EE_config.rpy new file mode 100644 index 0000000..2ea1c5f --- /dev/null +++ b/game/EE_config.rpy @@ -0,0 +1,14 @@ +init -200 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_auto_res.rpy b/game/Event Editor/EE_auto_res.rpy index d9bba1c..7e8457c 100644 --- a/game/Event Editor/EE_auto_res.rpy +++ b/game/Event Editor/EE_auto_res.rpy @@ -26,15 +26,22 @@ screen speaker_selection: textbutton _("None") action SetVariable('speaker_temp',"") xminimum 200 - for speaker in speakers: - $n = speaker.name - $call_speaker = n.lower().split()[0] + for s in speakers.items(): + + if s[1].name == None: + $n = s[0].title() + + else: + $n = s[1].name + + $call_speaker = s[0] textbutton _(n) action SetVariable('speaker_temp', call_speaker) xminimum 200 textbutton _("WRITE NEW") action ui.callsinnewcontext('insert_speaker_manually') xminimum 200 textbutton _("DONE") yalign 0.3 xalign 1.0 action Hide('speaker_selection') xminimum 200 + screen BG_selection: zorder 1 tag sc @@ -52,20 +59,24 @@ screen BG_selection: textbutton _("DONE") yalign 0.3 xalign 1.0 action Hide('BG_selection') xminimum 200 vbar value YScrollValue("bg_sel") + screen character_selection: zorder 1 tag sc textbutton _("DONE") yalign 0.5 xalign 0.95 action Hide('character_selection') xminimum 150 + vbox: yalign 0.15 xfill True + hbox: xfill True textbutton ("Char 1") action SetVariable('char_nu_temp',0) xminimum 150 textbutton ("Char 2") action SetVariable('char_nu_temp',1) xminimum 150 textbutton ("Char 3") action SetVariable('char_nu_temp',2) xminimum 150 null height 10 + showif char_nu_temp == 0: hbox: xfill True @@ -81,6 +92,7 @@ screen character_selection: textbutton ("0.9") action SetVariable('position_temp_char0',0.9) textbutton ("right") action SetVariable('position_temp_char0',1.0) bar value VariableValue('position_temp_char0',1.6,offset=-0.3) + elif char_nu_temp == 1: hbox: xfill True @@ -96,6 +108,7 @@ screen character_selection: textbutton ("0.9") action SetVariable('position_temp_char1',0.9) textbutton ("right") action SetVariable('position_temp_char1',1.0) bar value VariableValue('position_temp_char1',1.6,offset=-0.3) + elif char_nu_temp == 2: hbox: xfill True @@ -151,6 +164,7 @@ screen EV_bg_selection: textbutton _("DONE") yalign 0.3 xalign 1.0 action Hide('EV_bg_selection') vbar value YScrollValue("ev_bg_sel") + screen BG_base_selection: zorder 1 tag sc diff --git a/game/Event Editor/EE_main.rpy b/game/Event Editor/EE_main.rpy index f26710c..dc0d057 100644 --- a/game/Event Editor/EE_main.rpy +++ b/game/Event Editor/EE_main.rpy @@ -1,4 +1,4 @@ -#######VERSION: 2.4 +#######VERSION: 2.6 # #DON'T TOUCH: #Code needed to capture the input text everytime the page changes. @@ -148,7 +148,7 @@ label new_project: "New Project For:" "Main Game Plot": - pass + $_modn = "main_" "Mod": $modname = renpy.input("Write a name of mod","mod") @@ -298,12 +298,32 @@ label exporting_project: python: expath = "events/" + if modname != "": expath = "mods/" + modname + "/" + expath target = renpy.loader.transfn(expath) target = open(target + project_name + ".rpy",'w+') + + if EE__DSEmodule_active: + target.write("init:\n ") + target.write("$ event('"+project_name+"'") + + if EE__DSE_once == 1: + target.write(",event.once()") + + if EE__DSE_group != 0: + target.write(",event.choose_one(\""+EE__DSE_group+"\")") + + target.write(",'act == \""+EE__DSE_group+"\"'") + + for ii in EE__conditions_used_list: + target.write(",'"+ii.condition_property.variable_name+ii.operator+ii.variable_value+"'") + + target.write(")") + target.write("\n\n\n") + ind='' n_ind=1 ind=indentation(n_ind) @@ -323,6 +343,7 @@ label exporting_project: init python: + def export_scene(minievent_temp,ind): for xx in range(1,minievent_temp.totalpages+1): if minievent_temp.BG[xx-1]!=minievent_temp.BG[xx]: diff --git a/game/Event Editor/base_speakers.rpy b/game/Event Editor/base_speakers.rpy index b8142e8..845e4dd 100644 --- a/game/Event Editor/base_speakers.rpy +++ b/game/Event Editor/base_speakers.rpy @@ -1,18 +1,25 @@ init -300 python: - speakers = [] + fs = Character(None, kind=nvl) + centered = Character(None, kind=nvl, what_xalign=0.5, what_yalign=0.5) + + speakers = { + #"fs":fs, + #"centered":centered + } base_speakers = { - "boy":"#729fcf", "boy1":"#729fcf", "boy2":"#729fcf", - "boy3":"#729fcf", "girl":"#e65fc8", "girl1":"#e65fc8", - "girl2":"#e65fc8","girl3":"#e65fc8", - "men":"#3465a4", "women":"#ad7fa8", + "boy":"#729fcf", "boy_1":"#729fcf", "boy_2":"#729fcf", + "boy_3":"#729fcf", "boys":"#729fcf", "girl":"#e65fc8", + "girl_1":"#e65fc8", "girl_2":"#e65fc8","girl_3":"#e65fc8", + "girls":"#e65fc8", "men":"#3465a4", "women":"#ad7fa8", "developer":"#cc0000", "debug":"#ef2920" } for sp in base_speakers.items(): var_name = sp[0] - ch_name = var_name.title() + ch_name = var_name.replace("_", " ") + ch_name = ch_name.title() xcolor = sp[1] globals()[var_name] = Character(ch_name, color = xcolor) - speakers.append(globals()[var_name]) + speakers[var_name] = globals()[var_name] diff --git a/game/Event Editor/images.rpy b/game/Event Editor/images.rpy index 695d81f..c126647 100644 --- a/game/Event Editor/images.rpy +++ b/game/Event Editor/images.rpy @@ -29,7 +29,3 @@ init -300 python: def addChs(src, prefix = ''): addImgs(src, prefix, characters) - - addBGs('images/bgs') - addEVs('images/events') - addChs('images/characters') diff --git a/game/Event Editor/mods.rpy b/game/Event Editor/mods.rpy index 0d8b647..2f3e348 100644 --- a/game/Event Editor/mods.rpy +++ b/game/Event Editor/mods.rpy @@ -14,13 +14,20 @@ label mods_sec: return screen mods_selection: - vbox: - box_wrap True - yalign 0.5 - xalign 0.5 + side "c b r": + area (100, 100, 600, 400) + viewport id "vp": + draggable True + mousewheel True - for mod in mods.items(): - $n = mod[0] - $mod_start = mod[1] + vbox: + box_wrap True + yalign 0.5 + xalign 0.5 - textbutton _(n) action Return(mod_start) xminimum 200 + for mod in mods.items(): + $n = mod[0] + $mod_start = mod[1] + textbutton _(n) action Return(mod_start) xminimum 200 + + vbar value YScrollValue("vp") diff --git a/game/events/EEout_main_start.rpy b/game/events/EEout_main_start.rpy new file mode 100644 index 0000000..d30fda0 --- /dev/null +++ b/game/events/EEout_main_start.rpy @@ -0,0 +1,19 @@ +label EEout_main_start: + scene bg start code + developer "Hi! Welcome in Ren'Py Event Editor." + scene bg start imgs + developer "First put right images(png and jpg) to right folders:\n + - backgrounds to 'game/images/bgs'\n + - character sprites to 'game/images/charaters'\n + - events images in 'game/images/events'" + menu: + "I done this already": + scene bg start code + developer "Now see Tutorial then 'Add New Event' and call it 'start'.\n + It will over write this file." + jump EE_start + + "I will comeback later": + pass + + return diff --git a/game/events/EEout_main_test.rpy b/game/events/EEout_main_test.rpy new file mode 100644 index 0000000..b55a590 --- /dev/null +++ b/game/events/EEout_main_test.rpy @@ -0,0 +1,9 @@ +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/main_menu.rpy b/game/main_menu.rpy index 9aa8b22..9166fec 100644 --- a/game/main_menu.rpy +++ b/game/main_menu.rpy @@ -21,7 +21,7 @@ screen main_menu(): has vbox - textbutton _("New Game") action Start("EEout_start") + 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") diff --git a/game/mods/test/events/EEout_test_two.rpy b/game/mods/test/events/EEout_test_two.rpy index 1e7b484..86ee005 100644 --- a/game/mods/test/events/EEout_test_two.rpy +++ b/game/mods/test/events/EEout_test_two.rpy @@ -12,7 +12,7 @@ label EEout_test_two: show sylvie surprised at Position(xanchor=0.5,xpos=0.500000) sylvie "Do you realy want to know?" - "You" "Yes." + you "Yes." sylvie "Okey, go with me." @@ -45,7 +45,7 @@ label EEout_test_two: show sylvie giggle at Position(xanchor=0.5,xpos=0.500000) sylvie "Do you want do to some visual novel with me?" - "You" "Yes." + you "Yes." sylvie "Ok, but it depends from wath vns are for you." @@ -53,7 +53,7 @@ label EEout_test_two: "Internet and vn are for ...": scene test bg uni show sylvie surprised at Position(xanchor=0.5,xpos=0.500000) - "You" "... Hentai." + you "... Hentai." show sylvie surprised at Position(xanchor=0.5,xpos=1.000000) sylvie "What?!" @@ -81,13 +81,13 @@ label EEout_test_two: show sylvie green smile at Position(xanchor=0.5,xpos=0.500000) "Finally she cameback." - "You" "Why you change your dress?" + you "Why you change your dress?" sylvie "What?" developer "I just borow this sprites for 'The Question' that came with Ren'Py. " - "You" "Nevermind. What is this notebook for?" + you "Nevermind. What is this notebook for?" sylvie "I write here some ideas for vns." diff --git a/game/mods/test/mod.conf.rpy b/game/mods/test/mod.conf.rpy index d4697b7..fed5c7e 100644 --- a/game/mods/test/mod.conf.rpy +++ b/game/mods/test/mod.conf.rpy @@ -1,7 +1,10 @@ # this is example config mod to develop with Ren'Py Event Editor init -200 python: - sylvie = Character("Sylvie", color = "#e65fc8") - speakers.append(sylvie) + sylv = Character("Sylvie", color = "#e65fc8") + speakers["sylv"] = sylv + + you = Character("You") + speakers["you"] = you test_mod = "test" test_mp = "mods/"+ test_mod diff --git a/launcherinfo.py b/launcherinfo.py new file mode 100644 index 0000000..4d8a4ff --- /dev/null +++ b/launcherinfo.py @@ -0,0 +1,2 @@ +description = "Using this you can speed up creating events for your events and change this roject to your game." +ro = True