ALBS - RPG Battle/Inventory System
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
-
- Miko-Class Veteran
- Posts: 649
- Joined: Fri Dec 16, 2005 5:21 pm
- Completed: Fading Hearts, Infinite Game Works
- Projects: Don't Save the World
- Organization: Sakura River
- Location: Canada
- Contact:
ALBS - RPG Battle/Inventory System
Currently I am programming an RPG battle system for ren'py. However, I over-engineered it a bit and made it so open ended. For my game it's a bit too much, however, other people may want to use it.
Mind you this is the engine, not the interface. And you program the turn-order and stuff like that yourself. I'll be making a basic one though.
Anyone interested in using it?
Mind you this is the engine, not the interface. And you program the turn-order and stuff like that yourself. I'll be making a basic one though.
Anyone interested in using it?
Last edited by Counter Arts on Fri Jan 05, 2007 8:25 am, edited 1 time in total.
-
- Miko-Class Veteran
- Posts: 649
- Joined: Fri Dec 16, 2005 5:21 pm
- Completed: Fading Hearts, Infinite Game Works
- Projects: Don't Save the World
- Organization: Sakura River
- Location: Canada
- Contact:
Actually I didn't know about the Grandia (III) battle system till I wikipedia'ed it. The system I had in mind is kinda like that only not so 3-D-ish. (Darn, I didn't know someone else thought of that system a long time ago.)
My idea includes that and inserting renpy scenes in the middle of battle. Also, I'm also trying to give options to do stuff like, think and talk. However, it would be far easier to just choose attack and just go crazy in fighting. You do get about 3 actions per turn though.
But if you're going to implement something like a Grandia battle system, you're doing the interface, battle mechanics and game balancing yourself. That's still a lot of work on your part.
Still, I'd be willing to share my system once I can water it down a bit.
My idea includes that and inserting renpy scenes in the middle of battle. Also, I'm also trying to give options to do stuff like, think and talk. However, it would be far easier to just choose attack and just go crazy in fighting. You do get about 3 actions per turn though.
But if you're going to implement something like a Grandia battle system, you're doing the interface, battle mechanics and game balancing yourself. That's still a lot of work on your part.
Still, I'd be willing to share my system once I can water it down a bit.
-
- Miko-Class Veteran
- Posts: 649
- Joined: Fri Dec 16, 2005 5:21 pm
- Completed: Fading Hearts, Infinite Game Works
- Projects: Don't Save the World
- Organization: Sakura River
- Location: Canada
- Contact:
Yeah, it started out as good programming but now as I started to over engineer it, I'll need to do water it down a bit.
I'll need to make it so that people who aren't programmers can use it. Of course, customization requires programming.
But I'll be crying when I see my beloved menu animation being overused. Oh well.
I'll need to make it so that people who aren't programmers can use it. Of course, customization requires programming.
But I'll be crying when I see my beloved menu animation being overused. Oh well.
-
- Regular
- Posts: 41
- Joined: Sat Jun 04, 2005 7:47 pm
- Location: Singapore
- Contact:
-
- Regular
- Posts: 197
- Joined: Fri Nov 10, 2006 3:25 am
- Location: at a village near Bandung, Indonesia
- Contact:
Wow I bet this will be interesting.
I'll wait for this one.
I'll wait for this one.
Kalau tidak suka ya jangan diladeni, gitu aja kok repot™.
Cynanthia's Blog (Indonesian)
Cynanthia's Blog (Indonesian)
-
- Miko-Class Veteran
- Posts: 649
- Joined: Fri Dec 16, 2005 5:21 pm
- Completed: Fading Hearts, Infinite Game Works
- Projects: Don't Save the World
- Organization: Sakura River
- Location: Canada
- Contact:
Well if you know the concept of passing a function as variable then you can tweak this code well enough I think. Though it is largely untested.
But this is really largely implemented in python.
I'll be making a very basic turn based system for you guys to expand upon to show you how to take advantage of the features of my system (and mostly interface). You'll even get to know how to use ren'py's interface system with style if you figure out my code!
- you go first
- enemies go second
- physical damage = attackPower - defensePower
- similar with magical damage
- you get one spell called heal
This will be in my sample code.
But this is really largely implemented in python.
I'll be making a very basic turn based system for you guys to expand upon to show you how to take advantage of the features of my system (and mostly interface). You'll even get to know how to use ren'py's interface system with style if you figure out my code!
- you go first
- enemies go second
- physical damage = attackPower - defensePower
- similar with magical damage
- you get one spell called heal
This will be in my sample code.
-
- Miko-Class Veteran
- Posts: 649
- Joined: Fri Dec 16, 2005 5:21 pm
- Completed: Fading Hearts, Infinite Game Works
- Projects: Don't Save the World
- Organization: Sakura River
- Location: Canada
- Contact:
Alright! The battle portion of my code is finished. No documentation though.
I also made an interesting menu interface.
I'll give you my first uncut code for you to read and test. If you have ANY questions, please ask!
This python code has the flavour of a C++ programmer in it. A lot of habits that I gained from programming OS features in a university course are still within me. (Implementing memory paging, file systems as well as concurency is very painful)
Here is some sample code to run my ALBS (AL's Battle System).
Note: The pc and npc varibles are already initialized before this.
I also made an interesting menu interface.
I'll give you my first uncut code for you to read and test. If you have ANY questions, please ask!
This python code has the flavour of a C++ programmer in it. A lot of habits that I gained from programming OS features in a university course are still within me. (Implementing memory paging, file systems as well as concurency is very painful)
Here is some sample code to run my ALBS (AL's Battle System).
Note: The pc and npc varibles are already initialized before this.
Code: Select all
label battle_begin:
$ battle_result = 0 # 0=in progress 1 = userWon 2 = userLost
"The battle has begun!"
"Are you ready?"
while battle_result == 0:
call battle_Start_Turn
$ temp1 = pc.stats.hp
$ temp2 = pc.stats.maxHP
$ temp3 = pc.stats.mp
$ temp4 = pc.stats.maxMP
"HP: %(temp1)s /%(temp2)s MP: %(temp3)s / %(temp4)s"
$ menu1Text = "Attack with Bat"
$ menu1Clicked = ui.returns("Attack")
$ menu2Text = "Heal"
$ menu2Clicked = ui.returns("Heal")
$ menu3Text = "Magical Attack"
$ menu3Clicked = ui.returns("Magic")
show menu1 at menuIn1 with Pause(0.1)
show menu2 at menuIn2 with Pause(0.1)
show menu3 at menuIn3 with Pause(0.2)
$ action = ui.interact()
hide menu1
hide menu2
hide menu3
if action == "Attack":
$ temp = pc.rightEquip.use([npc, pc])
$ print temp
elif action == "Heal":
$ pc.stats.hp += 10
elif action == "Magic":
$ temp = pc.ability.use([npc, pc])
call checkFinished
if battle_result != 0:
jump battleFinished
# Now the Enemy Attacks
$ temp = npc.attacks(pc)
$ temp2 = npc.name
$ temp3 = pc.name
"The %(temp2)s attacks %(temp3)s for %(temp)s damage"
$ print temp
call checkFinished
label battleFinished:
if battle_result == 1:
"You win!"
else:
"You lose!"
return
- Attachments
-
- battle demo.zip
- Here is the first uncut code.
- (96.01 KiB) Downloaded 211 times
Although the moving buttons are cool, I'm thinking of just using a standard menu interface for consistency when integrating into my game (It's supposed to look primarily like a visual novel after all, not an RPG)
Also, I think I might want to add scenes in order to prolong the battle sequence, instead of just
""The Monster attacks You for X damage"
Also, I think I might want to add scenes in order to prolong the battle sequence, instead of just
""The Monster attacks You for X damage"
-
- Miko-Class Veteran
- Posts: 649
- Joined: Fri Dec 16, 2005 5:21 pm
- Completed: Fading Hearts, Infinite Game Works
- Projects: Don't Save the World
- Organization: Sakura River
- Location: Canada
- Contact:
Successfully integrated the engine into the game (success = no crashes and still proceeds to play the rest of my game). I took out the blue textbox, but other then that, it inherited the style options I set for the rest of my game. I think the whizzing buttons are neat, on second thought, so I decided to let them be.
I'd like to add scenes, but I don't know how to navigate around the ui statements. Anyone familiar with python, I'd appreciate some help. I hope that this won't affect rollback should it get messy.
Note I tried changing batswinging to shotgun firing in defining the statements, but messed it up, so I just changed what it says while keeping the definition terms as bat swinging, its essentially the same thing. The magical attack is defined in similar fashion, so I just need to know how to insert scenes or at least image sequences here.
So how do I insert 2 CG events inside, what kind of show statements are needed?
Many thanks.
I'd like to add scenes, but I don't know how to navigate around the ui statements. Anyone familiar with python, I'd appreciate some help. I hope that this won't affect rollback should it get messy.
Note I tried changing batswinging to shotgun firing in defining the statements, but messed it up, so I just changed what it says while keeping the definition terms as bat swinging, its essentially the same thing. The magical attack is defined in similar fashion, so I just need to know how to insert scenes or at least image sequences here.
Code: Select all
init:
python:
def batSwing(args):
tempUser = args[ALBS_User]
tempTarget = args[ALBS_Target]
temp = tempTarget.recieveAttack(tempUser.stats.atk + 4)
#ui.window()
ui.text("You fire the shotgun!")
ui.saybehavior(afm="You fire the shotgun!")
ui.interact()
#narrator "You fire the shotgun!"
#ui.window()
#I'd like to place a CG event here, but how?
tempText = "You deal %d damage!" % (temp)
ui.text(tempText)
ui.saybehavior(afm="You deal " + tempText + "damage!")
#I'd like to place a second CG event here, but how?
ui.interact()
return temp
Many thanks.
-
- Miko-Class Veteran
- Posts: 649
- Joined: Fri Dec 16, 2005 5:21 pm
- Completed: Fading Hearts, Infinite Game Works
- Projects: Don't Save the World
- Organization: Sakura River
- Location: Canada
- Contact:
-
- Regular
- Posts: 115
- Joined: Mon Apr 23, 2007 8:50 pm
- Contact:
I am new to Ren'Py but I'd love to use this form my Avatar RPG! Also it may be good for Star Trek: Valiant but I'll see once i get a look at it. So whenever you get it "watered down" as you say I'd love to see it. and i am no programmer so i will probably use the following smilie....alot...( ) lol. THANKS IN ADVANCE!
in a perfect world those who can do it teach others how to do it. but were not in a perfect world. So were primarily stuck with teachers who don't kno jack.
Avatar: The Last Airbender Visual Novel forums
http://img509.imageshack.us/my.php?imag ... rekzs0.png
Avatar: The Last Airbender Visual Novel forums
http://img509.imageshack.us/my.php?imag ... rekzs0.png
Who is online
Users browsing this forum: No registered users