Skip to content

Commit

Permalink
/ ‘README.md’
Browse files Browse the repository at this point in the history
/ ‘game/Event Editor/EE_auto_res.rpy’
/ ‘game/Event Editor/EE_main.rpy’
+ ‘game/Event Editor/base_colors.rpy’
/ ‘game/Event Editor/base_speakers.rpy’
/ ‘game/Event Editor/images.rpy’
+ ‘game/Event Editor/mods.rpy’
/ ‘game/Event Editor/tango.rpy’
/ ‘game/Event Editor/test_event.rpy’
+ ‘game/events/EEout_start.rpy’
/ ‘game/images/events/concert/1.jpg’
/ ‘game/images/events/concert/2.jpg’
/ ‘game/images/events/concert/3.jpg’
/ ‘game/main_menu.rpy’
+ ‘game/mods/test/events/EEout_test_two.rpy’
+ ‘game/mods/test/events/EEout_test_zero.rpy’
+ ‘game/mods/test/imgs/bgs/club.jpg’
+ ‘game/mods/test/imgs/bgs/lecturehall.jpg’
+ ‘game/mods/test/imgs/bgs/meadow.jpg’
+ ‘game/mods/test/imgs/bgs/uni.jpg’
+ ‘game/mods/test/imgs/sprites/sylvie/giggle.png’
+ ‘game/mods/test/imgs/sprites/sylvie/green/giggle.png’
+ ‘game/mods/test/imgs/sprites/sylvie/green/normal.png’
+ ‘game/mods/test/imgs/sprites/sylvie/green/smile.png’
+ ‘game/mods/test/imgs/sprites/sylvie/green/surprised.png’
+ ‘game/mods/test/imgs/sprites/sylvie/normal.png’
+ ‘game/mods/test/imgs/sprites/sylvie/smile.png’
+ ‘game/mods/test/imgs/sprites/sylvie/surprised.png’
+ ‘game/mods/test/mod.conf.rpy’
/ ‘game/options.rpy’
  • Loading branch information
Jeremi360 committed Jul 23, 2016
1 parent 278cf41 commit bea8820
Show file tree
Hide file tree
Showing 30 changed files with 311 additions and 61 deletions.
13 changes: 11 additions & 2 deletions README.md
@@ -1,28 +1,37 @@
# Ren'Py Event Editor

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]
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 for mods / custom scenarios - see files in *mods/test*
- You can test your events from menu
- All generated events have *EEout_* prefix

- Genterate buttons for all spekers added to speakers list:

```
$ speakers.append(mycharacter)
```

- 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')
addChs('my_custom_ch')
```

## Changes:
- Add test mod
- Fix indentation on speakers lines again
- Add Support for mods
- Add some new base colors
- Add imgs from Ren'Py Tutorial
- Remove buggy basic speakers
- Remove old comments
- Comments make in EE are in next line
- Fix indentation or speakers lines
- Fix indentation on speakers lines
- Added some basic speakers
- Added base bgs with black solid and Tango Palette
- Automatic generate buttons for all images stored placed in *game/images*:
Expand Down
3 changes: 2 additions & 1 deletion game/Event Editor/EE_auto_res.rpy
Expand Up @@ -162,7 +162,8 @@ screen BG_base_selection:
yalign 300
xalign 400

textbutton _("black") action SetVariable("BG_temp", "black") xminimum 150
for name in base_colors:
textbutton _(name) action SetVariable("BG_temp", name) xminimum 150

for name in tango:
textbutton _(name) action SetVariable("BG_temp", name) xminimum 150
Expand Down
66 changes: 49 additions & 17 deletions game/Event Editor/EE_main.rpy
Expand Up @@ -131,7 +131,7 @@ screen comments_screen:


label EE_start:
devloper "This is an Event Editor, have fun!"
developer "This is an Event Editor, have fun!"

call screen new_tutorial_menu

Expand All @@ -143,9 +143,20 @@ label EE_start:
#

label new_project:
$ project_name = "EEout_" + renpy.input("Write a name for the event","test")
if project_name == "EEout_":
devloper "You must write a name for the event"
$ modname = ""
menu:
"New Project For:"

"Main Game Plot":
pass

"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:
developer "You must write a name for the event"
jump new_project
elif project_kind == "map":
jump EE_map
Expand All @@ -170,8 +181,6 @@ label new_project:
return




label insert_pos_manually:
if char_nu_temp == 0:
$ position_temp_char0 = float(renpy.input("Write the xpos (remember it must be a float number):",allow=",.0123456789"))
Expand All @@ -196,13 +205,14 @@ label delete_comment:

label change_project_name:
$ project_name=renpy.input("Write a name for the event",default=project_name)
if project_name=="":
if project_name=="EEout_":
"You must write a name for the event"
jump change_project_name
return

#
#This code is looped every time you change page while editing. It is needed to save all the variable modified and to update them for the new page.
#This code is looped every time you change page while editing.
#It is needed to save all the variable modified and to update them for the new page.
#

label event_editor:
Expand Down Expand Up @@ -270,27 +280,46 @@ label event_editor:

jump event_editor_repeat

#
#
#The code that runs to export the event and create the output file. It should be created in the same folder as the .exe
#

label exporting_project:
if project_name in EE__label_list:
menu:
debug "Warning!\n
Event with name [project_name] is already existing.\n
if you don't change event name it will over write existing one.\n
Do you want to overwrite?"

"Change Event name":
jump change_project_name

"Overwrite":
pass

python:
target = renpy.loader.transfn("events/")
expath = "events/"

if modname != "":
expath = "mods/" + modname + "/" + expath

target = renpy.loader.transfn(expath)
target = open(target + project_name + ".rpy",'w+')

ind=''
n_ind=1
ind=indentation(n_ind)

target.write("label "+project_name+":\n")

if project_kind=="map":
export(minievent_list['beginning'],n_ind)

else:
export(minievent_list[project_name],n_ind)

target.write(" return")
target.close()
return

return


init python:
Expand All @@ -304,12 +333,15 @@ init python:
target.write(ind+"hide "+minievent_temp.char_onscreen[xx-1][yy]+"\n")
else:
target.write(ind+"show "+minievent_temp.char_onscreen[xx][yy]+" at Position(xanchor=0.5,xpos=%f) \n" % minievent_temp.char_position[xx][yy])
if minievent_temp.speaker[xx]!='narrator':
if minievent_temp.speaker[xx]=='narrator':
target.write(ind+ "\""+minievent_temp.page_text[xx]+"\"\n")
else:
target.write(ind+minievent_temp.speaker[xx])
target.write(" \""+minievent_temp.page_text[xx]+"\"\n")
target.write(" \""+minievent_temp.page_text[xx]+"\"\n")

if minievent_temp.comments[xx]!='':
target.write(ind+" # "+minievent_temp.comments[xx])
target.write("\n") #not sure +ind
target.write("\n")
return


Expand Down
15 changes: 15 additions & 0 deletions game/Event Editor/base_colors.rpy
@@ -0,0 +1,15 @@
init -300 python:

base_colors_dir = {
"Red": "#ff0000",
"Blue": "#0500fc",
"Green": "#00ff12",
"White": "#ffffff",
"Black": "#000"
}

base_colors = []
for c in base_colors_dir.items():
name = c[0]
renpy.image(name, Solid(c[1]))
base_colors.append(name)
13 changes: 9 additions & 4 deletions game/Event Editor/base_speakers.rpy
@@ -1,13 +1,18 @@
init -90 python:
init -300 python:

speakers = []

base_speakers = {"boy":"#729fcf", "girl":"#e65fc8", "men":"#3465a4",
"women":"#ad7fa8", "devloper":"#cc0000", "debug":"#ef2920"}
base_speakers = {
"boy":"#729fcf", "boy1":"#729fcf", "boy2":"#729fcf",
"boy3":"#729fcf", "girl":"#e65fc8", "girl1":"#e65fc8",
"girl2":"#e65fc8","girl3":"#e65fc8",
"men":"#3465a4", "women":"#ad7fa8",
"developer":"#cc0000", "debug":"#ef2920"
}

for sp in base_speakers.items():
var_name = sp[0]
ch_name = var_name.title().replace('_', ' ')
ch_name = var_name.title()
xcolor = sp[1]
globals()[var_name] = Character(ch_name, color = xcolor)
speakers.append(globals()[var_name])
56 changes: 26 additions & 30 deletions game/Event Editor/images.rpy
@@ -1,39 +1,35 @@
init -300 python:
bgs = []
ev_bgs = []
characters = []

init -100:
define bgs = []
define ev_bgs = []
define characters = []
image black = "#000"
exts = ['.png', '.jpg']
spaces = ['/', '_']

python:
def addImgs(src, prefix, li):
for file in renpy.list_files():
if file.startswith(src):
if file.endswith(tuple(exts)):
name = file.replace(src, prefix)

exts = ['.png', '.jpg']
spaces = ['/', '_']
for space in spaces:
name = name.replace(space, ' ')

def addImgs(src, prefix, li):
for file in renpy.list_files():
if file.startswith(src):
if file.endswith(tuple(exts)):
name = file.replace(src, prefix)
for ext in exts:
name = name.replace(ext,'')

for space in spaces:
name = name.replace(space, ' ')
renpy.image(name, Image(file))
li.append(name)

for ext in exts:
name = name.replace(ext,'')
def addBGs(src, prefix = 'bg'):
addImgs(src, prefix, bgs)

renpy.image(name, Image(file))
li.append(name)
def addEVs(src, prefix = 'event'):
addImgs(src, prefix, ev_bgs)

def addBGs(src, prefix = 'bg'):
addImgs(src, prefix, bgs)
def addChs(src, prefix = ''):
addImgs(src, prefix, characters)

def addEVs(src, prefix = 'event'):
addImgs(src, prefix, ev_bgs)

def addChs(src, prefix = ''):
addImgs(src, prefix, characters)

addBGs('images/bgs')
addEVs('images/events')
addChs('images/characters')
addBGs('images/bgs')
addEVs('images/events')
addChs('images/characters')
26 changes: 26 additions & 0 deletions game/Event Editor/mods.rpy
@@ -0,0 +1,26 @@
init -300:
$ mods = {}

label mods_sec:
scene bg start code

developer "Here you can play custom scenarios or read about installed mods"

label EE_mods_repeat:
call screen mods_selection
call expression _return
jump mods_sec

return

screen mods_selection:
vbox:
box_wrap True
yalign 0.5
xalign 0.5

for mod in mods.items():
$n = mod[0]
$mod_start = mod[1]

textbutton _(n) action Return(mod_start) xminimum 200
2 changes: 1 addition & 1 deletion game/Event Editor/tango.rpy
@@ -1,4 +1,4 @@
init -100 python:
init -300 python:

tango_base = {"Butter":("#fce94f", "#edd400", "#c4a000"),

Expand Down
10 changes: 7 additions & 3 deletions game/Event Editor/test_event.rpy
@@ -1,19 +1,23 @@
init -80 python:
EE__label_list = renpy.get_all_labels()


label EE_test:
scene bg start code

devloper "Here you can test yours events.\n
developer "Here you can test yours events.\n
If you don't see your event on list just restart game."

$ EE__label_list = renpy.get_all_labels()

label EE_watch_event_list_repeat:
call screen EE_label_list
call expression _return
jump EE_test

return


screen EE_label_list:

vbox:
xalign 0.5
yalign 0.5
Expand Down
19 changes: 19 additions & 0 deletions game/events/EEout_start.rpy
@@ -0,0 +1,19 @@
label EEout_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
Binary file modified game/images/events/concert/1.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified game/images/events/concert/2.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified game/images/events/concert/3.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions game/main_menu.rpy
Expand Up @@ -22,6 +22,7 @@ screen main_menu():
has vbox

textbutton _("New Game") action Start("EEout_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")
Expand Down

0 comments on commit bea8820

Please sign in to comment.