RPG Battle Engine for Ren'Py
- 3 player slots and 8 monster slots
- Monsters split between two rows (you can't attack a monster in the back row if there's another one in front of it)
- Active and passive skills
- Player skills can target enemies (one, more or all), allies (one or more), k.o. allies (to revive them) and themselves
- Monsters can use skills too (attack only)
- "Attack", "Defend" and "Use Item" commands
- Damage, accuracy, experience and leveling formulas
- Randomized monster selection and slot position
- In-battle inventory system
- Player selection screen
- Mouse-following Tooltips
- Message box at the top of the screen
- ATL for players, monsters and damage display
- Animated hp and mp bars
- Open scripts/define/char_def.rpy and scroll to the bottom
- Use this template and follow the previous examples to define a new character:
define character.var = Character("Name", image="")
default var = Char("Name", img="", skills=[], p_skills=[], equip={'hand': None, 'head': None, 'chest': None, 'accs': None})
- Open scripts/define/assets/images.rpy and define the battle avatar, either following the examples or using this more basic template:
image char_battle = "images/char/char_battle.png"
- Add the character sprite/s to the images/char folder
- You can now add it to the party_list list:
$ var.append(party_list)
- Open scripts/define/monsters_def.rpy and look for the load_monsters label
- Use this template and follow the examples to define a new monster:
monster_var = Monster(name, hpmax, atk, dfn, exp, lvl, img, sfx_atk, anim, skills)
- Add the monster sprite to the images/monsters folder
- You can now add it to the wild_monsters list:
$ monster_var.append(wild_monsters)
- Open scripts/define/battle_def.rpy and look for the other skills defined at the bottom
- Follow the examples and use the respective template depending if it's a passive or active skill:
default skill_var = ActiveSkill(name, pwr, mp_cost, sfx, targ, targs, type='active', trans=None, img=None, back_row=False)`
default skill_var = PassiveSkill(name, sfx=None, img=None, trans=None, lvl=0)
- You can now append it to a character:
$ skill_var.addSkill(a)
- Open scripts/define/items_def.rpy and look for the load_items label
- Use this template and follow the examples to define a new item:
item_var = Item(name, desc, icon=False, value=0, act=Show("inventory_popup", message="Nothing happened!"), type="item", recipe=False, tags={})
- Add the item sprite to the images/inv folder
- You can now append it to your inventory, indicating the quantity:
$ player_inv.take(item_var,2)
- Battle setup
- Player select screens
- Tooltip screen
- Player and monster display screens
- Message screen
- "label battling": switchs between player and monsters turns
- "label end_battle"
- "label turn_actions": handles player turn phases
- "label player_skill": handles the type of action that was selected (skill, item, defend, etc.)
- Skill select screen
- Target select screens (enemy, ally, row, etc.)
- Damage animation screens