Simple RPG Battle Framework A.K.A Sheepstorm

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.
Post Reply
Message
Author
User avatar
curry nochi rice
Miko-Class Veteran
Posts: 735
Joined: Sat Mar 27, 2010 3:12 am
Projects: Delicatessen, Whom to Notice, Start of Something, Love Sorcery
Organization: Circle Cosine
IRC Nick: Curry
Skype: after.curry.rice
itch: project-rothera
Contact:

Simple RPG Battle Framework A.K.A Sheepstorm

#1 Post by curry nochi rice » Sat Mar 19, 2016 3:53 pm

Image
Sheepstorm is a simple battle framework centered around Ren'Py's screen language (and equivalent statements). Currently, it is limited to Final Fantasy-style "active" battles. Sheepstorm has the following features:
  • Fighter Class in which where you all declare RPG stats like HP, MP... and sprites.
  • Skill Class, with false AOE.
  • Animation and SFX. Just declare them when you make a new skill.
  • Quick UI styling, courtesy of our generic use of styles.
SCREENSHOTS
Image
Sheeps go on fire.

Image
We have a bear.
UPCOMING FEATURES
  • Battle Class to take care of battle types, and auto-positioning of fighter sprites.
  • More victory conditions.
  • I don't know anymore.
  • Granblue Fantasy-esque gameplay for 2.0 UPDATE 06.07.18
RELEASES
Sheepstorm "BAAAtlePy"

LICENSE
Creative Commons Attribution-NonCommercial.
Last edited by curry nochi rice on Wed Jun 06, 2018 12:05 pm, edited 2 times in total.
Personal (R-13) | Now at IndieDB | Circle Cosine's itch.io
I wanna be done.

User avatar
Bryy
Veteran
Posts: 295
Joined: Thu Dec 20, 2012 10:12 pm
Completed: Army of Tentacles 1 & 2, The Ghost of Joe Papp, Paper Shakespeare: To Date or Not To Date?
Projects: Inexplicable Geeks: Dawn of Just Us
Organization: Stegalosaurus Game Development
Location: Bay Area, CA
Contact:

Re: Simple RPG Battle Framework A.K.A Sheepstorm

#2 Post by Bryy » Wed May 04, 2016 11:52 pm

Will download and try out. No commercial license?

User avatar
curry nochi rice
Miko-Class Veteran
Posts: 735
Joined: Sat Mar 27, 2010 3:12 am
Projects: Delicatessen, Whom to Notice, Start of Something, Love Sorcery
Organization: Circle Cosine
IRC Nick: Curry
Skype: after.curry.rice
itch: project-rothera
Contact:

Re: Simple RPG Battle Framework A.K.A Sheepstorm

#3 Post by curry nochi rice » Thu May 05, 2016 6:21 am

Bryy wrote:Will download and try out. No commercial license?
Maybe on newer versions. I plan on changing the license though, that's for sure. I'm just keeping it NC because it's not mature yet.
Personal (R-13) | Now at IndieDB | Circle Cosine's itch.io
I wanna be done.

Human Bolt Diary
Regular
Posts: 77
Joined: Fri Oct 11, 2013 12:46 am
Contact:

Re: Simple RPG Battle Framework A.K.A Sheepstorm

#4 Post by Human Bolt Diary » Thu May 05, 2016 10:32 am

Advice: Follow the PEP8 guidelines for your python code. This will make things easier to read, more maintainable, and easier for other people to work on. Generally, try to be more consistent with your style, even if you deviate from PEP8.

eg: Your fighter class

Code: Select all

init python:
    class fighter:
        def __init__(self, FTR = "", ALIVE=True, ATK=0, DEF=0, SPD=0, MG=0, HP=0, MP=0, ELEM="", skill_set=[], pic_card="", pic_sprite="", sprite_pos=[]) :
            
            self.FTR = FTR
            self.ALIVE = ALIVE # true or false 
            self.ATK = ATK
            self.DEF = DEF
            self.SPD = SPD
            self.MG = MG
            self.HP = HP
            self.MP = MP
            self.ELEM = ELEM
            self.skill_set = skill_set
            self.pic_card = pic_card
            self.pic_sprite  = pic_sprite 
            self.sprite_pos =  sprite_pos
        
        def registerSkill(self, skill_name):
            self.skill_set.append(skill_name)
        def  normalizeStats(self):
            print "Normalizing stats."
            stat_list  = [self.ATK, self.DEF, self.SPD, self.MG, self.HP, self.MP]
            for i in stat_list:
                if i <= 0:
                    i = 0
Would look better as:

Code: Select all

init python:
    class Fighter(object):
    """ Short description of the Fighter class.
    
    Args:
        FTR (str): Short description here.
        ALIVE (bool):
        ATK (int):
        # etc, etc
    """    
    def __init__(self, FTR="", is_alive=True, ATK=0, DEF=0, SPD=0, MG=0, HP=0, MP=0, elem="", skill_set=[], pic_card="", pic_sprite="", sprite_pos=[]):
            self.FTR = FTR
            self.is_alive = is_alive 
            self.ATK = ATK
            self.DEF = DEF
            self.SPD = SPD
            self.MG = MG
            self.HP = HP
            self.MP = MP
            self.elem = elem
            self.skill_set = skill_set
            self.pic_card = pic_card
            self.pic_sprite  = pic_sprite 
            self.sprite_pos =  sprite_pos
            self.stat_list  = [self.ATK, self.DEF, self.SPD, self.MG, self.HP, self.MP]

        def register_skill(self, skill_name):
            self.skill_set.append(skill_name)
        
        def normalize_stats(self):
            print "Normalizing stats."
            for index, value in enumerate(self.stat_list):
                if value <= 0:
                    self.stat_list[index] = 0
            return self.stat_list
You could also probably refactor that stat_list into something cleaner, unless you absolutely need 2 ways to access it. I'll leave that to you.
Of course, whatever docstring style you choose, if any, is up to you. I just used google's style here because I like it.

User avatar
curry nochi rice
Miko-Class Veteran
Posts: 735
Joined: Sat Mar 27, 2010 3:12 am
Projects: Delicatessen, Whom to Notice, Start of Something, Love Sorcery
Organization: Circle Cosine
IRC Nick: Curry
Skype: after.curry.rice
itch: project-rothera
Contact:

Re: Simple RPG Battle Framework A.K.A Sheepstorm

#5 Post by curry nochi rice » Thu May 05, 2016 11:18 am

I never really bothered with coding styles. Welp. I'll try to make a rework if I have the time. Thanks.
Personal (R-13) | Now at IndieDB | Circle Cosine's itch.io
I wanna be done.

User avatar
curry nochi rice
Miko-Class Veteran
Posts: 735
Joined: Sat Mar 27, 2010 3:12 am
Projects: Delicatessen, Whom to Notice, Start of Something, Love Sorcery
Organization: Circle Cosine
IRC Nick: Curry
Skype: after.curry.rice
itch: project-rothera
Contact:

Re: Simple RPG Battle Framework A.K.A Sheepstorm

#6 Post by curry nochi rice » Sat Jun 11, 2016 9:29 am

Going into PEP8 actually requires a lot of practice lol. It feels kinda odd to keep looking at the specs while coding fresh script. Version 1 is coming up late lol. Gonna split the auto-position a.k.a KanColle style positioning into a plug-in or separate altogether.

Image

I think I should prepare a small demo game too. :cry:
Personal (R-13) | Now at IndieDB | Circle Cosine's itch.io
I wanna be done.

User avatar
curry nochi rice
Miko-Class Veteran
Posts: 735
Joined: Sat Mar 27, 2010 3:12 am
Projects: Delicatessen, Whom to Notice, Start of Something, Love Sorcery
Organization: Circle Cosine
IRC Nick: Curry
Skype: after.curry.rice
itch: project-rothera
Contact:

Re: Simple RPG Battle Framework A.K.A Sheepstorm

#7 Post by curry nochi rice » Mon Oct 10, 2016 10:35 am

Version 0.8 "PEPped for 8" is out. Get it here. I really need to re-engineer this one.

I don't know how faithful I was to implementing PEP8 here but it should be more readable than the last versions.
Personal (R-13) | Now at IndieDB | Circle Cosine's itch.io
I wanna be done.

User avatar
enrohk
Newbie
Posts: 11
Joined: Tue Jun 19, 2018 6:32 pm
Location: Spain
Contact:

Re: Simple RPG Battle Framework A.K.A Sheepstorm

#8 Post by enrohk » Tue Jun 19, 2018 6:38 pm

Eyh thanks for this framework and sorry for necromancy.

You still working on this ? I'm using on a fun project and it works perfectly with lastest versions of ren'py :D

But i have some questions or features I want to implement myself and maybe we can work together ;)
Do I live in a friendly or a hostile universe? Which is it? Is it a universe that is filled with hostility and anger and people wanting to hate each other and people wanting to kill each other, is that what you see?Because when you see the world that way that’s exactly what you will create for yourself in your life.

User avatar
curry nochi rice
Miko-Class Veteran
Posts: 735
Joined: Sat Mar 27, 2010 3:12 am
Projects: Delicatessen, Whom to Notice, Start of Something, Love Sorcery
Organization: Circle Cosine
IRC Nick: Curry
Skype: after.curry.rice
itch: project-rothera
Contact:

Re: Simple RPG Battle Framework A.K.A Sheepstorm

#9 Post by curry nochi rice » Sat Sep 22, 2018 3:14 pm

enrohk wrote:
Tue Jun 19, 2018 6:38 pm
Eyh thanks for this framework and sorry for necromancy.

You still working on this ? I'm using on a fun project and it works perfectly with lastest versions of ren'py :D

But i have some questions or features I want to implement myself and maybe we can work together ;)
Hey, what questions do you have for me? I don't even know if you're still using this framework. I honestly didn't check on this thread for a long time. I thought replies to threads would trigger a notif but apparently now. :oops:
Personal (R-13) | Now at IndieDB | Circle Cosine's itch.io
I wanna be done.

Dark Soujiro
Newbie
Posts: 2
Joined: Sun Oct 21, 2018 6:17 am
Contact:

Re: Simple RPG Battle Framework A.K.A Sheepstorm

#10 Post by Dark Soujiro » Sun Oct 21, 2018 6:20 am

When a "healer" class? :(

Post Reply

Who is online

Users browsing this forum: No registered users