RPG Battle Engine - Alpha 7.5, downloads in first post

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
User avatar
curry nochi rice
Miko-Class Veteran
Posts: 746
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: RPG Battle Engine - Alpha 7.5, downloads in first post

#241 Post by curry nochi rice »

uhh Jake, is it possible to "transfer" variables from regular renpy land to python land?

I'm planning to use regular variables created in regular renpy land, and use it inside python blocks... problem is I have no idea how or even believe it can be done.
Personal (R-13) | Now at IndieDB | Circle Cosine's itch.io
I wanna be done.

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: RPG Battle Engine - Alpha 7.5, downloads in first post

#242 Post by xela »

curry nochi rice wrote:uhh Jake, is it possible to "transfer" variables from regular renpy land to python land?

I'm planning to use regular variables created in regular renpy land, and use it inside python blocks... problem is I have no idea how or even believe it can be done.
I am not Jake, but I might save him some free time:

Code: Select all

label start:
    $ attack = 90

label start_battle:
    # ... BE instantiation code until you get to this bit:
    Member = f_class("John Smith", Attack=attack, sprite=Sprite)
    # Rest of BE instantiation code... 
This and getting stats back into Ren'Py or a different Python land can be semi-automated with a bridge function.
Like what we're doing? Support us at:
Image

Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Re: RPG Battle Engine - Alpha 7.5, downloads in first post

#243 Post by Jake »

xela wrote: This and getting stats back into Ren'Py or a different Python land can be semi-automated with a bridge function.
To put it more directly - variables in "Ren'Py land" are Python variables, there's absolutely no difference between the two. Any line which starts with a '$' in Ren'Py-script is a line of Python code, with Python variables.

You can also refer directly to battle engine classes and members on lines beginning with a $, if you like:

Code: Select all

 $ currentStrength = myFighter.Stats.Strength
Server error: user 'Jake' not found

User avatar
curry nochi rice
Miko-Class Veteran
Posts: 746
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: RPG Battle Engine - Alpha 7.5, downloads in first post

#244 Post by curry nochi rice »

[Solved]
Last edited by curry nochi rice on Thu Apr 10, 2014 10:12 am, edited 1 time in total.
Personal (R-13) | Now at IndieDB | Circle Cosine's itch.io
I wanna be done.

lackofwords
Newbie
Posts: 10
Joined: Sun Mar 18, 2012 5:41 pm
Contact:

Re: RPG Battle Engine - Alpha 7.5, downloads in first post

#245 Post by lackofwords »

Just wondering, are there any keymaps bound to any of the cancel actions for the battle engine.
To me it just seems like there should be one, instead of just relying on clicking the cancel button.

User avatar
curry nochi rice
Miko-Class Veteran
Posts: 746
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: RPG Battle Engine - Alpha 7.5, downloads in first post

#246 Post by curry nochi rice »

Image

how do I hide/show the "gridstatsdisplay" by implementing a button? >.< I'm studying python code atm but maybe the guys here would be able to provide a quicker solution. :oops: I think a screen with a small button superimposed over the battle could work.

obviously that didn't work. Anyway would transplanting the values of the gridstat to a screen even possible? I don't want to do anything to the engine.ui.rpy.

Edit 3:
I have concocted a rather primitive solution

Code: Select all

 
            ui.frame(xalign=0.080,yalign=0.2)
            ui.imagebutton("assets/ui/delete_white.png", "assets/ui/delete_black.png", clicked=ui.returns(1))
            ui.imagebutton("assets/ui/delete_black.png", "assets/ui/delete_white.png", clicked=ui.returns(2))
            pop = ui.interact()
            if pop == 1:
                renpy.hide("_battleGridStatsWindow", layer=self._battle.GetLayer("UI"))
            else:
                renpy.show("_battleGridStatsWindow", what=window, layer=l)
funny thing is I need to click the button twice for the game to go on. :v
Personal (R-13) | Now at IndieDB | Circle Cosine's itch.io
I wanna be done.

Meiting_98
Regular
Posts: 35
Joined: Fri Jul 12, 2013 1:25 pm
Projects: Neutralizing You
Organization: Ninja Vault
Location: Indonesia
Contact:

Re: RPG Battle Engine - Alpha 7.5, downloads in first post

#247 Post by Meiting_98 »

Hello, I would like to ask:
How can I make the equipment inventory so that it's the same as the party inventory from the rpg shop screen (kind of connected(?))?
I'm able to do it only if the rpg shop and equipment screens are in one label. But I need it to be in different labels like:

menu:
"Buy"
jump rpg_shop
"Equip"
jump equipment

Thank you before

Waveripple
Newbie
Posts: 3
Joined: Wed Jun 18, 2014 5:42 pm
Contact:

Re: RPG Battle Engine - Alpha 7.5, downloads in first post

#248 Post by Waveripple »

Ok, this will most certainly make me sound kind of dumb, but how so I change the range from the enemy to self and allies? I'm trying to make a HP heal spell and MP heal spell for ACTIVE BATTLES.
I've tried changing the range in the magic spells to zero or negative to see if it would work, but it didn't (the attack did, however, heal the baddies perfectly well though). I tried making a new skill and see if that would work, so I copied the haste skill and changed haste to heal, and tried that, but I could not for the life of me figure out what to change or add to effect HP/MP.
Help please? I tried to figure this out myself, and I'm frustrating myself horridly.
I tried going through the 17 pages before on this thread, but there was so much that is a big possibly that I missed something, so if I did, could you tell me which page or something pretty please.

~Waveripple

User avatar
Mole-chan
Veteran
Posts: 333
Joined: Thu Aug 27, 2009 12:46 am
Completed: DUAEL, Escape from Puzzlegate
Projects: A Bird with Gold-Mended Wings
Deviantart: mole-chan
Skype: mole-chan
itch: moleworks
Contact:

Re: RPG Battle Engine - Alpha 7.5, downloads in first post

#249 Post by Mole-chan »

Hey there.
Hopefully a simple enough question to answer for you, but I'm kind of frustrated by it.
I'm trying to make a new item class, but once I make an actual item of that class, it's not recognized by anything. Store, battle, anything. It's only recognized in equipment but only since that just scours everything with no additional logic.

I copypasted everything from an existing item class that did work, and did the same when declaring the item.

Here's pretty much everything related to that item.

Code: Select all

    class AntiCorruptionItem(BattleItem):
        def __init__(self, name="AntiCorruption", cost=40):
            BattleItem.__init__(self, name, cost=cost)
            self._name = name
            self._targets = TargetData(friendly=True, enemy=False, range=1)
            self._description = "A magical concoction that can revive fallen team mates."
            
        def PerformAction(self, fighter, target):
            target[0].RemoveEffect("Corruption")
            target[0]._battle.Announce(target[0].Name + "'s corruption was repaired!")

Code: Select all

Library.Items.AntiCorruption = AntiCorruptionItem()
inv.AddItem(Library.Items.AntiCorruption,1)
priceList.SetSellPrice(Library.Items.AntiCorruption, Library.Items.AntiCorruption.Cost)
priceList.SetSellPrice(Library.Items.AntiCorruption, Library.Items.AntiCorruption.Cost/2)
Any help at all would be appreciated, since the item is pretty critical to the implementation of its associated status effect, and I have no idea why a literal copy paste job wouldn't work properly.

Ignideus
Newbie
Posts: 6
Joined: Wed Jul 16, 2014 2:23 pm
Contact:

Re: RPG Battle Engine - Alpha 7.5, downloads in first post

#250 Post by Ignideus »

Is it possible to have it when a character dies in a battle, that character is gone from the game forever? Like Fire Emblem or X-COM style permadeath.

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: RPG Battle Engine - Alpha 7.5, downloads in first post

#251 Post by xela »

Ignideus wrote:Is it possible to have it when a character dies in a battle, that character is gone from the game forever? Like Fire Emblem or X-COM style permadeath.
Delete all references to a character from the game? Or you can simply prevent the character from appearing with a flag...
Like what we're doing? Support us at:
Image

User avatar
curry nochi rice
Miko-Class Veteran
Posts: 746
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: RPG Battle Engine - Alpha 7.5, downloads in first post

#252 Post by curry nochi rice »

Anybody knows how to adopt the wargame to use movingAIFighter?
Personal (R-13) | Now at IndieDB | Circle Cosine's itch.io
I wanna be done.

User avatar
Meinos Kaen
Regular
Posts: 107
Joined: Wed Jan 04, 2012 1:01 pm
Completed: JPDE - Sonata of Fire
Projects: JPDE, Ars Oratoria, ONHA
Skype: therealmeinoskaen
Location: Somewhere in Italy...
Contact:

Re: RPG Battle Engine - Alpha 7.5, downloads in first post

#253 Post by Meinos Kaen »

Edit: Nevermind. I got it.

Another question then. I recently played again the Devil Survivor games. I noticed that while their backgrounds are mostly pre-rendered, they have grid movement and elevations like they were grid created... I was wondering, would it be possible to recreate the effect by putting a prerendered image of the battlefield in the background and then creating the grid and elevations via a completely transparent basic grid block?

And speaking of grid, what's the orientation of the ingame grid? I made a mock up in photoshop but it's not the right degree...

User avatar
darkfanimewatcher
Newbie
Posts: 5
Joined: Sun Aug 30, 2015 4:35 pm
Contact:

Re: RPG Battle Engine - Alpha 7.5, downloads in first post

#254 Post by darkfanimewatcher »

I'm trying to make units that move like chess pieces. I tried messing with the LoS and targeting systems but I'm a little out of my depth. My current plan is to make a different move skill for each movement type (rook, bishop, knight etc) and filter out the targeted positions that don't match. Does anyone know how to do this the right way?

Eiliya
Regular
Posts: 148
Joined: Tue Dec 04, 2012 6:21 am
Contact:

Re: RPG Battle Engine - Alpha 7.5, downloads in first post

#255 Post by Eiliya »

Is it possible to make just a long list of characters and monsters in a separate .rpy document and then call the proper ones to use when setting up the battle (my type is Active), or do I have to add it anew for each battlefield?

Post Reply

Who is online

Users browsing this forum: No registered users