TyranoBuilder Visual Novel Studio

TyranoBuilder Visual Novel Studio

31 ratings
RPG Engine
By ODBear Studios
A simple how-to in order to implement RPG Engine
   
Award
Favorite
Favorited
Unfavorite
Step 1
RPG Engine :

First you need to download the RPG Engine from here :
http://steamproxy-script.pipiskins.com/app/345370/discussions/0/355043117515638063/

Extract to your projects directory.

Load it in Tyranobuilder.
Basic Configuration
Open bonusrpgfight.

You will notice two branches, one dealing with losing the fight and one dealing with winning it. Pick which scene you want to redirect the player in these two branches.

Open the bonusrpgfight.ks file with Notepad++ or any text editor supporting UTF8/UTF8 w/o BOM.

At the bottom, you find configuration options that you can change :
var background = 'data/rpg/images/background/empty.png'; var playeravatar = 'susumu'; var playerhp = 250; var originalplayerhp = 250; var poisontick = 5000; var poisonduration = 20000; var monstername = 'Kopu'; var monsteravatar = 'kopu'; var monsterpng = 'kopu'; var monsterhp = 180; var originalmonsterhp = 180; var monstertype = 1; var monsterspeed = 5000; var goldwon = 5; var winingtext = '<span>you defeated '+monstername+' and won '+goldwon+' gold pieces</span>'; var losingtext = '<span>you were defeated by '+monstername+'</span>';

The options you can change are :
playeravatar = name of the png file
playerhp = player HP value when the fights starts
originalplayerhp = player HP max value when the fights starts
poisontick = at which interval does the poison ticks (in milliseconds)
poisonduration = how long does poison stay (in ms as well)
monstername = name of the enemy
monsteravatar = name of the png file
monsterhp = enemy HP value when the fights starts
originalmonsterhp = enemy HP value when the fights starts
monsterspeed = at which interval does the enemy will attack you (in ms)
Advanced configuration
Open the bonusrpgfight.ks file with Notepad++ or any text editor supporting UTF8/UTF8 w/o BOM

You'll notice that the skills are defined by a data-id, for instance the first one being : "sword-slash|8|2000"
sword-slash = name of the png file used for animation (in data/rpg/effects folder)
8 = damage
2000 = delay in milliseconds (so in that case, 2000 equals 2 seconds)

There are 6 skills, each inside a "box" div :
<div class="box"><div class="subbox"></div><div class="icon" data-id="sword-slash|8|2000" data-type="melee"><img src="data/rpg/images/icons/icon-sword-1.gif" title="Sword Slash : 8 DMG | Cooldown : 2 sec."></div></div>

Player skills are defined in others/rpg_fight1.js, so in order to use Poison for instance, change a melee skill to :

<div class="box"><div class="subbox"></div><div class="icon" data-id="earth|28|9000" data-type="magic"><img src="data/rpg/images/icons/icon-earth.gif" title="Earth : 28 DMG | Cooldown : 9 sec."></div></div>

Please note that there are two magic skills already defined : Heal which restores HP and Poison which, at intervals, reduces the enemy HP :

<div class="box"><div class="subbox"></div><div class="icon" data-id="poison-1|3|60000" data-type="poison" data-specs="5000|20000"><img src="data/rpg/images/icons/icon-poison-1.gif" title="Poison : 3 DMG every 5 seconds for 20 seconds | Cooldown : 60 sec."></div></div> <div class="box"><div class="subbox"></div><div class="icon" data-id="heal|33|15000" data-type="heal"><img src="data/rpg/images/icons/icon-heal.gif" title="Heal : restores 33 HP | Cooldown : 15 sec."></div></div>

PS : Please note that the data-specs for the poison skill overrides the basic poison configuration.
Licence
Free, only credit ODBear Studios.

Feel free to edit, tweak, change and share your work with the community.
7 Comments
Negotiator 20 Aug, 2022 @ 5:18pm 
I know its been a while sense this form was active, but I was wondering if anyone made a simpler version of this that fits onto a single page or a video that shows how it all works. Iv put a good bit of time into working on a project. I have not been able to figure out how to safely move the files into another game. When I try, something always brakes; Scene 1 being over-written as well as not knowing how the general component works. I don't see it in my current version, though I can get around it with the script component. Most videos and links that I have gone through, either don't work or have been removed. I understand how the most works but cant get the combat to stay working.
ODBear Studios  [author] 28 May, 2017 @ 7:59am 
audio tag, just push the sound src to the aformentioned tag after a click/action.
KAZ01 28 May, 2017 @ 4:33am 
Thanks, but I thought of a new way, which also puts some neat strategy into the gameplay:

In rpg_fight1.js, I added an extra parameter called "type" to the cooldown function. Then, changed the actiontohide to $("div").find("[data-type='" + type + "']").

This makes it so that every skill of the same type (melee, magic, poison, etc.) gets unavailable until the selected skill's cooldown ends.
-

The last thing I want to ask is how to add sound effects.
KAZ01 27 May, 2017 @ 3:59pm 
Any pointers on how I would do the click bind\unbind after clicking a skill? I'm kinda rusty on JS.

I think I already figured the animations out, though.
ODBear Studios  [author] 27 May, 2017 @ 2:35am 
You could bind/unbind click with a set time out.
For animations, you could use css3 transforms.
KAZ01 26 May, 2017 @ 7:43am 
Is there a way to implement a general cooldown so the player doesn't use all of his skills one after the other?

Also, are there any other kinds of animations for skills?