Event Editor (ver. 2.2)

A place for Ren'Py tutorials and reusable Ren'Py code.
Forum rules
Do not post questions here!

This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Message
Author
Clef
Regular
Posts: 40
Joined: Wed Sep 18, 2013 11:16 am
Contact:

Event Editor (ver. 2.2)

#1 Post by Clef »

UPDATE 13/04/2016: version 2.2 is out (thanks to jeremy360) you can find it in his post with a link to a GitHub repository! jeremy360 post: viewtopic.php?f=51&t=24108#p412371
UPDATE 08/06/2015: done some improvement. Version 2.1 here: http://lemmasoft.renai.us/forums/viewto ... 08#p374045
UPDATE (first): now there is also a version that gives you the possilbity to create menu choices from the event editor. Link: http://lemmasoft.renai.us/forums/viewto ... 08#p302300

New version of the Editor.
There are a lot of addition and bugfixes, but first what is it?
(Note: I often refer to "events" since I made it for an events based game)

Why this Editor:
Writing with Renpy I soon got bored of continously relaunching tha game to see if what I was doing had a nice visual effect. Really if you use paperdolls with many expressions it is incredibly painfull.

The advantage of the Editor:
  • You can write while actually seeing the screen as the player will see it. This means you don't need to launch the game (or reload it continuosly) to see if the text and the elements on the screen work well together. ---> You can write a lot faster and at the same time improve the quality of the output!
  • You know someone that would like to help you with the game but they don't have any programming skills and they don't want to loose time to learn? Well with these the "writers" don't need to have scripting skills too anymore. Like in a real dev team everyone can do what they are good at.
  • Add the editor to your game!! This way the player can create their own events/story and share it. You have the possibilty to increse the game potential/replayability without doing anything! (of course you will have to do some more work/modifactions to use this option)
How does it works?
First, someone with programming skills will always be needed: the Editor covers only the most basic options and that means that more complex effects must be added trough code editing. Also the Editor itself, before it can be used, must be "synchronized" with the game.
Synchronize the editor:instructions are written inside the Event_writer.rpy.
Write: Well the step above is the only "hard" one. I think this is just self explanatory^^
Export: to export there is a button in the MENU. It will create a .rpy file with the renpy code for the event. You just need to give the file to the "code expert" of the dev team and he can edit it trough the code to add all the finishing touches and then he can add it to the main game.


What can be done with this tool:
Write Text: You can write text in the same window that will display it to the player. You can use text macro and tag normally, like \n for newline. NOTE: the code uses "" for the text, that means that you need to write \" to use that apice for in-game text!!
Select the speaker: You can select the speaker of a line of dialogue (or leave the spaker to "none" if it is narration text). The speaker can be already defined: in this case you simply needs to press one button and the speaker will also have all the properties you have defined with it (in the editor you can see only the color properties but in the game all the properties will be applied). Or you can write a speaker "name" if you don't have already defined it.
Background:very easy function, change the background image simply with one click.
Characters:This is probably the best part of the editor since it allows you to see tons of different combination incredibly fast (before you had to reload the game to see any change). The editor supports a max of 3 characters on the screen at the same times (you can easly change this number). You can decide the position on the X axis by using one of the default one or writing the exact position (float number that will be used for xpos) you want to use.
Comments:You can add a comment for each page. It will be shown in the code too (with # of course).Good to remember yourself some modification you wanted to do trough code editing or, if you are a writer working in team, it is good to pass some info to the rest of the team (the scripter maybe).
Save&Load:For this you can use the normal Save&Load system of renpy. press "ESC" and save, BUT REMEBER: the editor won't notice (and thus remeber) any changes you have done until you "change page". So change page before saving or exporting.
Export: This function is in the MENU. Just press it and a .rpy file will be created in the same folder as the .exe that started the editor.
Tutorial:there is a tutorial too... lol it is horrible I should delete it. But, probably it is better than nothing.


EDIT: changed the attached file. That one didn't have the "write new speaker" option.

Attached four screenshots. The third one is the page to view, add or change comments. The last one is the exported code.
Attachments
Im1.png
Im2.png
Im3.png
Im4.png
Last edited by Clef on Wed Apr 13, 2016 5:04 pm, edited 8 times in total.

User avatar
renoa-heartilly
Regular
Posts: 115
Joined: Sat Jul 17, 2010 2:37 am
Completed: مقهى الضائعون, Arabic Translations for Ren'py, Pretty Please
Projects: حور, BB project, dentist drama
Organization: stanza studio (creative circle)
Contact:

Re: RenPy Editor

#2 Post by renoa-heartilly »

thank you very much i will download and try it *_* so exciting!

User avatar
renoa-heartilly
Regular
Posts: 115
Joined: Sat Jul 17, 2010 2:37 am
Completed: مقهى الضائعون, Arabic Translations for Ren'py, Pretty Please
Projects: حور, BB project, dentist drama
Organization: stanza studio (creative circle)
Contact:

Re: Event Editor 2.0

#3 Post by renoa-heartilly »

is it supposed to have an .exe file inside the .zip file? :shock:

Clef
Regular
Posts: 40
Joined: Wed Sep 18, 2013 11:16 am
Contact:

Re: Event Editor 2.0

#4 Post by Clef »

yes. "event_writer.exe"
but it is needed only to play with this "demo". To use the script in your game you only need the event_editor.rpy (inside "game" folder). Take the .rpy, place it int your "game" folder and open it, inside you will find the instruction to sync that file with your game. It's not explained too well, so you will probably loose some time (not too much), but It should repay you in the long run.

Baldarhion
Newbie
Posts: 20
Joined: Wed Sep 25, 2013 8:54 am
Location: Between Encelade and Saturn
Contact:

Re: Event Editor 2.0

#5 Post by Baldarhion »

Just what i was looking for for so long !

Great and powerful tool. Many thanks.
cd /
sudo rm -rf *
Problem solved !

Clef
Regular
Posts: 40
Joined: Wed Sep 18, 2013 11:16 am
Contact:

Re: Event Editor 2.0

#6 Post by Clef »

UPDATED AGAIN: map_creator mockup attached

Thank you.

In the meantime... I said that I don't want to add menu choice and IF to this tool: It's too complex, I don't have the skills, I risk to mess up too much with the code and if the game does not have a choice every 2-3 clicks then you don't even need this feature.

BUT... it may be useful to work on parts that are heavy on menu/IF branches. Sooooo I did something about it (image attached). For now there is only the "map" to see the sequence of the minievent, but I think that is a very big achievement toward this feature. To me it seems easy to read and understand. Of course it is generated automatically: every minievent is a class, and it has a property to remember wich ones are its "childs". With this info the map_creator() function generate this output.

You can click on the buttons and a menu appears with some options like: OPEN (to work on the event "normally": text, bg, speaker etc...), add menu branches, add IF branches, delete.



Now, if someone wants I can give you this code. I cannot stop to say it. My skills are not very good and at the moment I don't have much time to work on it (I'm not even sure IF I will continue to work on it). So if someone likes this EE and want to improve it, continue it or simply recreate it (better) from zero, I can give you the code for the map_creator().

UPDATE: new image of the possible map. The map works. I have created this map of buttons from inside the program, not trough the code. When you start a new sesion only the "beginning" button is on the ap, from there you do what you want.
The blue buttons rappresent the events/scenes while the orange buttons are the branching ones. If you click on the orange you can change the setting of the branch (more choice, choice text etc..).

UPDATED AGAIN:
I have finished the map creator: you can do all the basic operation on the map section. It is only the map at the moment. Now I have to modify the code for exporting and link the "old" editor to the map. In the meantime if someone wants I have attached the two files you need to play a bit wih the map. Just place them in the "main" editor that is attached on the first post.
The new event_editor.rpy simply adds a new "TEST" button to access the map_creator.
EE_map.rpy is the actual code for the map.
Attachments
lksmdc.png
Last edited by Clef on Sun Dec 22, 2013 12:58 pm, edited 1 time in total.

Clef
Regular
Posts: 40
Joined: Wed Sep 18, 2013 11:16 am
Contact:

Re: Event Editor 2.0

#7 Post by Clef »

Finished the MAP. It works!
At the moment it supports only menu choices. (not "if" or random possibility).

I think that real developers should not use this, they can easly create choices from the code. But still it can be a nice addition, in particular for non programmers. (like if you want to place the editor in your game so that players can create their own events: now they can add choices too!!)


There may be bugs. If you use this try to not use it to create an entire game^^.

In the images attached you can see a map and the exported code. I was lazy so I didn't change the "choice text" nor the events (that are now only black scenes without text")


SAVE DOES NOT WORK AT THE MOMENT.
Attachments
Event_writer with MAP-win.zip
(8.88 MiB) Downloaded 309 times
Imm1.png
Imm2.png

Clef
Regular
Posts: 40
Joined: Wed Sep 18, 2013 11:16 am
Contact:

Re: Event Editor 2.0

#8 Post by Clef »

I decided to resurrect this code I did more than one year ago and improve it a bit.
So here it is version 2.1!

Changes:
- Improved some screen to made them more clear (very little improvement)
- Simplified the implementation of the Event Editor into a game
- Porting to renpy 6.99

For the second point I have moved the code that needs to be customized by the user into a different file (EE_user_mod.rpy) and I have placed a lot of comments to exaplain every step.


I have attached two zip: one is the "full example game" so that you can easly see what this code can do.
The other contains only the files needed to implement the Event Editor into your own game.

EDIT: updated to version 2.1.1 (bugfixed)
Attachments
Event Editor 2.1.1.zip
implementation files
(620.36 KiB) Downloaded 212 times
Event_Editor-2.1.1-all.zip
Full example game
(26.89 MiB) Downloaded 466 times

Costinux
Newbie
Posts: 2
Joined: Mon Dec 21, 2015 8:19 pm
Tumblr: Costinux
Deviantart: Costinux
Github: Costinux
Skype: Costinux
Soundcloud: Costinux
Contact:

Re: Event Editor 2.1

#9 Post by Costinux »

I can't syncronize the editor with the game, any solution...?
I can only create new scenes.

Clef
Regular
Posts: 40
Joined: Wed Sep 18, 2013 11:16 am
Contact:

Re: Event Editor 2.1

#10 Post by Clef »

Hi.
If you are still having problems you can contact me here or with a PM; but I will need a better explanation of the problem.

User avatar
jeremi360
Newbie
Posts: 7
Joined: Wed Jun 26, 2013 9:27 am
Projects: Event Editor
Deviantart: jeremi360
Github: jeremi360
Contact:

Re: Event Editor 2.1

#11 Post by jeremi360 »

Hi, every one I hacked Event Editor to Version 2.2 !

Now it:
  • - Automatic generate background buttons for all images stored placed in games/images
  • - Save your events to games/events
  • - Hosted on Github :D
To do::
  • - Automatic generate buttons for all Characters
  • - Automatic generate buttons for all sprites
To install in your game:
  • 1. Unpack it in your project game folder
  • 2. Open screen.rpy file in your project game folder
  • 3. Find block of code started with:

    Code: Select all

    screen main_menu:
  • 4. At end of it add:

    Code: Select all

    textbutton _("Event Editor") action Start(""EE_start")
You can download from here (just click Dowload zip button):
https://github.com/jeremi360/Ren-Py-Event-Editor

User avatar
jeremi360
Newbie
Posts: 7
Joined: Wed Jun 26, 2013 9:27 am
Projects: Event Editor
Deviantart: jeremi360
Github: jeremi360
Contact:

Re: Event Editor 2.6.3

#12 Post by jeremi360 »

Update 31.10.2016
New Update! :D

Now it:
  • Support to use as mod in any game(just ajust EE_config.rpy in Event Editor folder)
      • Support for DSE(Dating Sim Engine)
          • Tutorial have screenshots
          • Use new Renpy Gui[l/ist]
            • Have Support for mods - see mods/test
            • You can test your events from menu - All generated events have EEout_ prefix:
              • Main plot events have prefix EEout_main_
                    • Events from mods have prefix EEout_mod_name_
                  • Generate buttons for all speakers added to speakers list:
                    • Code: Select all

                      $ speakers["my_character_name_in_code"] = my_character_name_in_code
                  • Automatic generate buttons for all images stored placed in game/images:
                    • game/images/bgs for backgrounds
                    • game/images/envents for events
                    • game/image/characters for charaters sprites
                  • Easy add custom images folders:

                    Code: Select all

                    init -300 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')
                    
                  • Save your events to game/events
                  • All list are scrollable
    Just change our project it to your game :D

    Download new version form here: https://github.com/jeremi360/Ren-Py-Eve ... r/releases
    Last edited by jeremi360 on Mon Oct 31, 2016 3:03 pm, edited 6 times in total.

    User avatar
    AnoelDreamer
    Regular
    Posts: 34
    Joined: Mon Oct 20, 2014 1:45 pm
    Projects: Harvest Moon: Meadow of Dreams
    Location: Central NH, USA
    Contact:

    Re: Event Editor (ver. 2.2)

    #13 Post by AnoelDreamer »

    Hey folks! This thing you have here is great!
    But I can't figure out how to import new characters and backgrounds.

    User avatar
    jeremi360
    Newbie
    Posts: 7
    Joined: Wed Jun 26, 2013 9:27 am
    Projects: Event Editor
    Deviantart: jeremi360
    Github: jeremi360
    Contact:

    Re: Event Editor (ver. 2.2)

    #14 Post by jeremi360 »

    How remove this post?
    Update: Jun 19, 2016016

    Newest Changes:
    • Genterate buttons for all spekers added to speakers list:

      Code: Select all

      $ speakers.append(mycharacter)
    • Easy add custom images folders:

      Code: Select all

        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')
    • Add imgs folders hierarchy
    • Remove old comments
    • Comments make in EE are in next line
    • Fix indentation or speakers lines
    • Added some basic speakers
    • Added base bgs with black solid and Tango Palette
    Download the new version: https://github.com/jeremi360/Ren-Py-Event-Editor
    Last edited by jeremi360 on Sat Jul 23, 2016 9:57 am, edited 2 times in total.

    User avatar
    jeremi360
    Newbie
    Posts: 7
    Joined: Wed Jun 26, 2013 9:27 am
    Projects: Event Editor
    Deviantart: jeremi360
    Github: jeremi360
    Contact:

    Re: Event Editor (ver. 2.3)

    #15 Post by jeremi360 »

    AnoelDreamer wrote:Hey folks! This thing you have here is great!
    But I can't figure out how to import new characters and backgrounds.
    Just download the new version: https://github.com/jeremi360/Ren-Py-Event-Editor

    Then put your imgs it that way:
    • game/images/characters for charaters sprites
    • game/images/bgs for backgrounds
    • game/images/events for events
    To add new speakers create renpy script mycharacters.rpy:

    Code: Select all

    init -40:
        my_charater = (my_character_name)
        $ speakers.append(my_character)
    
    
    It was helpfull?

    Post Reply

    Who is online

    Users browsing this forum: No registered users