Skip to content

Commit

Permalink
Finsh develop DSE support
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremi360 committed Oct 31, 2016
1 parent 6f96c85 commit 773a930
Show file tree
Hide file tree
Showing 12 changed files with 222 additions and 76 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.rpyc
*.txt
*.rpyb
game/saves

6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
14 changes: 0 additions & 14 deletions game/EE_config.rpy

This file was deleted.

144 changes: 144 additions & 0 deletions game/Event Editor/EE__forDSE.rpy
Original file line number Diff line number Diff line change
@@ -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
44 changes: 44 additions & 0 deletions game/Event Editor/EE_config.rpy
Original file line number Diff line number Diff line change
@@ -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
24 changes: 17 additions & 7 deletions game/Event Editor/EE_main.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
9 changes: 0 additions & 9 deletions game/events/EEout_main_test.rpy

This file was deleted.

2 changes: 1 addition & 1 deletion game/mods/test/events/EEout_test_two.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions game/mods/test/mod.conf.rpy
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions game/options.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion launcherinfo.py
Original file line number Diff line number Diff line change
@@ -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
37 changes: 0 additions & 37 deletions main_menu.rpy

This file was deleted.

0 comments on commit 773a930

Please sign in to comment.