RPG Battle Engine - Alpha 7.5, downloads in first post
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.
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.
-
- Regular
- Posts: 196
- Joined: Sun Jul 28, 2013 1:29 pm
- Completed: Over The Hills And Far Away
- Projects: My Little Dictator
- Organization: WarGirl Games
- Contact:
Re: RPG Battle Engine - Alpha 7.5, downloads in first post
---
Last edited by DesertFox on Sun Nov 04, 2018 5:01 pm, edited 1 time in total.
Re: RPG Battle Engine - Alpha 7.5, downloads in first post
Unfortunately, my day job and other paying work has to take priority - so as to when the next version will be released, the answer is "when it's done". I'm looking forward to getting back to it and finishing it off, but I can't say with any certainty when that will be... so go ahead, ask away and I'll answer as best I can in the context of the currently-released version.DesertFox wrote: When are you planning to release?
I have one or two more queries, mainly about customization. Should I wait or are you okay to answer them now?
Server error: user 'Jake' not found
- azureXtwilight
- Megane Procrastinator
- Posts: 4118
- Joined: Fri Mar 28, 2008 4:54 am
- Completed: Fantasia series (ROT and ROTA), Doppleganger: Dawn of The Inverted Soul, a2 (a due), Time Labyrinth
- Projects: At Regime's End
- Organization: Memento-Mori VNs, Team Sleepyhead
- Location: Yogyakarta, Indonesia.
- Contact:
Re: RPG Battle Engine - Alpha 7.5, downloads in first post
I am wondering if there's a way to "unlearn" a skill under a certain "if" condition?
Re: RPG Battle Engine - Alpha 7.5, downloads in first post
To remove a skill from a fighter in the current build, you should be able to call:azureXtwilight wrote:I am wondering if there's a way to "unlearn" a skill under a certain "if" condition?
Code: Select all
myFighter.UnregisterSkill(mySkill)
Caveats:
- Only the name of the skill that you pass in gets used, so if you have two skills with the same name, then you may accidentally remove another one instead
- This will only remove the first registration of a skill with that name that the system comes across, so if you registered the same skill on a fighter five times you need to remove it five times as well.
Also remember you can always have a condition on the skill class itself to make it unavailable in certain circumstances if you just want to disable it under certain conditions - UnregisterSkill removes it from that fighter permanently, and if you want it back you have to call RegisterSkill again.
Server error: user 'Jake' not found
- azureXtwilight
- Megane Procrastinator
- Posts: 4118
- Joined: Fri Mar 28, 2008 4:54 am
- Completed: Fantasia series (ROT and ROTA), Doppleganger: Dawn of The Inverted Soul, a2 (a due), Time Labyrinth
- Projects: At Regime's End
- Organization: Memento-Mori VNs, Team Sleepyhead
- Location: Yogyakarta, Indonesia.
- Contact:
Re: RPG Battle Engine - Alpha 7.5, downloads in first post
Got this error:
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/ryuudou.rpy", line 581, in script
File "game/ryuudou.rpy", line 582, in python
AttributeError: 'PlayerFighter' object has no attribute 'UnregisterSkill'
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "C:\renpy-6.14.1-sdk\renpy\execution.py", line 288, in run
node.execute()
File "C:\renpy-6.14.1-sdk\renpy\ast.py", line 718, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "C:\renpy-6.14.1-sdk\renpy\python.py", line 1297, in py_exec_bytecode
exec bytecode in globals, locals
File "game/ryuudou.rpy", line 582, in <module>
ryuu.UnregisterSkill(Library.Skills.MikRy)
AttributeError: 'PlayerFighter' object has no attribute 'UnregisterSkill'
Windows-7-6.1.7601-SP1
Ren'Py 6.15.7.374
A Ren'Py Game 0.0
Re: RPG Battle Engine - Alpha 7.5, downloads in first post
Sorry, yes! I apparently didn't actually have a clean release of 7.5 in the project that I'd labelled as a clean release of 7.5, and that method isn't in 7.5 after all.azureXtwilight wrote:Got this error
OK, if you haven't written any custom code in any skill class' RegisterFighter or SetUpFighter methods, then you're fine. All you'll need to do is open engine-fighters.rpy, go to line 153, and add in the following code:
Code: Select all
# Remove a skill from this fighter's list of abilities
def UnregisterSkill(self, skill):
if (skill.Name in self._skillHandlers):
del self._skillHandlers[skill.Name]
self._skills = {}
for s in self._skillHandlers.values():
s.RegisterFighter(self)
Code: Select all
# Add a skill to this fighter's list of abilities
def RegisterSkill(self, skill):
if (skill.Name in self._skillHandlers) == False:
self._skillHandlers[skill.Name] = skill
skill.RegisterFighter(self)
# Remove a skill from this fighter's list of abilities
def UnregisterSkill(self, skill):
if (skill.Name in self._skillHandlers):
del self._skillHandlers[skill.Name]
self._skills = {}
for s in self._skillHandlers.values():
s.RegisterFighter(self)
# State methods
def getFaction(self):
return self._faction
def setFaction(self, val):
self._faction = val
Faction = property(getFaction, setFaction)
If you have customised any RegisterFighter or SetUpFighter methods on any skills in such a way that the method would produce undesired effects if run a second time, then you'll have to either wait for the next release or just add your condition into the IsAvailable check on that skill and put up with it appearing in the skill menu but not being selectable.
Sorry!
Server error: user 'Jake' not found
- azureXtwilight
- Megane Procrastinator
- Posts: 4118
- Joined: Fri Mar 28, 2008 4:54 am
- Completed: Fantasia series (ROT and ROTA), Doppleganger: Dawn of The Inverted Soul, a2 (a due), Time Labyrinth
- Projects: At Regime's End
- Organization: Memento-Mori VNs, Team Sleepyhead
- Location: Yogyakarta, Indonesia.
- Contact:
Re: RPG Battle Engine - Alpha 7.5, downloads in first post
azureXtwilight wrote:Oh, I got this error mid-game. I wonder what caused it...
What happens in Ryuudou.rpy on line 210? It looks like the facing is being set on a fighter who isn't yet in a battle - if that's the case, you'll need to add fighters to a battle (using AddFighter in the usual way) before you can set their facing, because their facing only means anything in the context of a battlefield.
Server error: user 'Jake' not found
Re: RPG Battle Engine - Alpha 7.5, downloads in first post
Hello
I tried to share inventory from shop module with personal inventory from equip module but still stuck . When I buy something in shop module it does not appear in equip module .
can you explain what am I doing wrong please ?
I tried to share inventory from shop module with personal inventory from equip module but still stuck . When I buy something in shop module it does not appear in equip module .
can you explain what am I doing wrong please ?
Code: Select all
init python:
top_bar = Frame('gfx/top_bar.png', 7, 8)
style.vscrollbar.top_bar = top_bar
style.vscrollbar.bottom_bar = top_bar
style.vscrollbar.thumb = 'gfx/thumb.png'
style.vscrollbar.xminimum = 14
style.vscrollbar.xmaximum = 14
label inv_test:
python:
# Here we're using the 'portrait' parameter to define a headshot of the character for use in UIs
jack = PlayerFighter("Jack", portrait="gfx/jack.png", Health=100, Look=1, Lewd=1)
money = 10000
jackinv = BattleInventory()
# The shop's inventory is stored in a BattleInventory instance - same as the player's
# party inventory.
shopInventory = BattleInventory()
# To add a quantity of equipment, call the 'AddItem' method with two parameters -
# the item itself, and the number to add.
shopInventory.AddItem(Library.Equipment.Dress)
shopInventory.AddItem(Library.Equipment.Panties)
shopInventory.AddItem(Library.Equipment.Boots)
money = renpy.call_screen("rpg_shop", partyInventory=jackinv, shopInventory=shopInventory, currency="Gold", money=money, fighters=[jack])
# Let's go through all the stuff we bought:
invItems = []
for i in jackinv.GetItems():
# i[0] is the name
# i[1] is the quantity
# i[2] is the item instance (in case you need it)
itemString = str(i[1]) + " " + i[0]
if i[1] > 1:
itemString = itemString + "s"
invItems.append(itemString)
invString = ", ".join(invItems)
"You bought: [invString]"
show screen equip_select(partyInventory=jackinv, fighters=[jack])
pause
jump mainmenu
-
- Miko-Class Veteran
- Posts: 910
- Joined: Sun Jul 06, 2008 4:30 pm
- Projects: And plenty of them!
- Location: Creche Alpha, Treasure Island
- Contact:
Re: RPG Battle Engine - Alpha 7.5, downloads in first post
I'm working on something with Focus as well as MP. It's supposed to start at 10 and go up by 5 each time a Fighter Attacks or Skips, then cap at 100. Then you can spend it on special abilities.
How would you implement this?
How would you implement this?
She's sun and rain: She's fire and ice. A little crazy, but it's nice.
Bliss Stage: Love is your weapon! A sci-fi visual novel about child soldiers coming of age. Kickstarter prerelease here. WIP thread here. Original tabletop game by Ben Lehman here. Tumblr here.
Bliss Stage: Love is your weapon! A sci-fi visual novel about child soldiers coming of age. Kickstarter prerelease here. WIP thread here. Original tabletop game by Ben Lehman here. Tumblr here.
Re: RPG Battle Engine - Alpha 7.5, downloads in first post
Your problem is in the line of code I left in the quote above - the equip_select screen expects the inventory to be passed in with the parameter name "equipment". If you change it to the following, it looks like it should work:Alitza wrote: When I buy something in shop module it does not appear in equip module .
Code: Select all
show screen equip_select(partyInventory=jackinv, fighters=[jack])
Code: Select all
show screen equip_select(equipment=jackinv, fighters=[jack])
Server error: user 'Jake' not found
Re: RPG Battle Engine - Alpha 7.5, downloads in first post
This is all off the top of my head, and it's late and I'm tired so apologies if I miss something or I'm not clear enough:Tsundere Lightning wrote:I'm working on something with Focus as well as MP. It's supposed to start at 10 and go up by 5 each time a Fighter Attacks or Skips, then cap at 100. Then you can spend it on special abilities.
How would you implement this?
For the stat, I would suggest adding it in the first place with a value of 100, which by default sets the maximum value for that stat to be 100. Then you can set it directly to 10 immediately after creating the fighter to set the initial level.
For the skills, I'd suggest implementing your own skill handler classes - take a look at the AttackSkill and SkipSkill classes in engine-skills.rpy for examples (or maybe inherit from them). I'd then alter the PerformAction method to add 5 to the Focus stat alongside all the other stuff it does (or with inheritance; add 5 then call the implementation on the parent class), then on your special-ability skill classes, just put a check in IsAvailable to check the Focus stat is high enough alongside the check for MPs or whatever other requirements you have for that skill.
Server error: user 'Jake' not found
Re: RPG Battle Engine - Alpha 7.5, downloads in first post
Thanks alot Jake.
works fine now
works fine now
-
- Miko-Class Veteran
- Posts: 910
- Joined: Sun Jul 06, 2008 4:30 pm
- Projects: And plenty of them!
- Location: Creche Alpha, Treasure Island
- Contact:
Re: RPG Battle Engine - Alpha 7.5, downloads in first post
Going to try this now. Thank you! It helps that Focus-consuming attacks never cost MP, at least not in my game.Jake wrote:This is all off the top of my head, and it's late and I'm tired so apologies if I miss something or I'm not clear enough:Tsundere Lightning wrote:I'm working on something with Focus as well as MP. It's supposed to start at 10 and go up by 5 each time a Fighter Attacks or Skips, then cap at 100. Then you can spend it on special abilities.
How would you implement this?
For the stat, I would suggest adding it in the first place with a value of 100, which by default sets the maximum value for that stat to be 100. Then you can set it directly to 10 immediately after creating the fighter to set the initial level.
For the skills, I'd suggest implementing your own skill handler classes - take a look at the AttackSkill and SkipSkill classes in engine-skills.rpy for examples (or maybe inherit from them). I'd then alter the PerformAction method to add 5 to the Focus stat alongside all the other stuff it does (or with inheritance; add 5 then call the implementation on the parent class), then on your special-ability skill classes, just put a check in IsAvailable to check the Focus stat is high enough alongside the check for MPs or whatever other requirements you have for that skill.
EDITED WITH A QUESTION:
Is the "Magic" stat you have as the default in the engine a parallel stat to Attack, or is it just maximum MP? Because if it's just max MP, then I'm going to need to alter spells to deal damage off a different stat.
She's sun and rain: She's fire and ice. A little crazy, but it's nice.
Bliss Stage: Love is your weapon! A sci-fi visual novel about child soldiers coming of age. Kickstarter prerelease here. WIP thread here. Original tabletop game by Ben Lehman here. Tumblr here.
Bliss Stage: Love is your weapon! A sci-fi visual novel about child soldiers coming of age. Kickstarter prerelease here. WIP thread here. Original tabletop game by Ben Lehman here. Tumblr here.
-
- Newbie
- Posts: 2
- Joined: Thu Oct 10, 2013 7:49 am
- Contact:
Re: RPG Battle Engine - Alpha 7.5, downloads in first post
Hello,
I'm only here to ask about the license. As I'm new with CC License terms.
Here's my question :
Am I allowed to place a donate button to cover up some image material's funds for a VN?
This VN will be free to play though.
I'm only here to ask about the license. As I'm new with CC License terms.
Here's my question :
Am I allowed to place a donate button to cover up some image material's funds for a VN?
This VN will be free to play though.
Who is online
Users browsing this forum: No registered users