Ren'Py Help programming cool battles! - Unpaid

OrcsMaster

Member
Game Developer
Jan 10, 2021
147
309
Hey there, I'm looking for some assistance to program the battles on my game https://f95zone.to/threads/orcs-quest-a-dick-girls-tale-v0-1-orcsmaster.72300/

I would like to know if someone is willing to help me out, for now, I'll focus on battles 1x1 but in the future, I would like to have group battles. For now, I used a really simple code where you click to attack or defend and the enemy uses random to attack or defend too... I guess this could be something really cool.

For now, I can't pay for it... Sorry.

I'm looking for someone that can help me out and make things more fun!

Thanks in advance! :)
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,978
16,235
There's many games with battle system, from Sakura Dungeon to Damsels and Dungeons, passing by Heavy Five in the VR parts.
Just look at their code and find the one you understand the most, or that is the nearest of what you want.

You can also take a look at the threads in this section. I remember at least one time where I explained, with some piece of code, how to do a battle system, but there's probably more.
 
  • Like
Reactions: OrcsMaster

OrcsMaster

Member
Game Developer
Jan 10, 2021
147
309
I saw one of your posts about it :) I guess the code I'm using (took from lemma website) is almost the same one you explain... I'm having a hard time to figure it out like, if my MC has a sword in the inventory or an Axe, like multiplying damage by her strength points or even adding some "miss" chances if she is fast enough.

I'll keep looking! I'm downloading the games you pointed out. Thanks :)
 

crabsinthekitchen

Well-Known Member
Apr 28, 2020
1,565
9,081
quickly outlined some basic combat with different weapons, armor and character stats affecting hit chances and damage. although the only action you can take is attack and I don't reset HP after the battle so it can definitely be improved
You don't have permission to view the spoiler content. Log in or register now.
 

OrcsMaster

Member
Game Developer
Jan 10, 2021
147
309
Than
quickly outlined some basic combat with different weapons, armor and character stats affecting hit chances and damage. although the only action you can take is attack and I don't reset HP after the battle so it can definitely be improved
You don't have permission to view the spoiler content. Log in or register now.
Thank you very much for sharing this!!! I'm gonna test it right away! :)
 

crabsinthekitchen

Well-Known Member
Apr 28, 2020
1,565
9,081
You're welcome. It might be a bit complicated because while I threw away a lot, I was looking at Pillars of Eternity combat while writing this so it's more complex than it needs to be. I also write in python because that way I can just run the code on my computer and test it without making a game

And I just found that strength modifier doesn't actually work in my example. I'll try to write something stripped of all unnecessary stuff and explain the code a bit better
 
  • Heart
Reactions: OrcsMaster

OrcsMaster

Member
Game Developer
Jan 10, 2021
147
309
You're welcome. It might be a bit complicated because while I threw away a lot, I was looking at Pillars of Eternity combat while writing this so it's more complex than it needs to be. I also write in python because that way I can just run the code on my computer and test it without making a game

And I just found that strength modifier doesn't actually work in my example. I'll try to write something stripped of all unnecessary stuff and explain the code a bit better
Since I never had any formal education regarding coding all I could do was use logic to solve things. I'm looking on tutorials and videos to understand things better but it's a bit complicated. I can totally get the logic behind things but I lack the practical knowledge...

One of the aspects I'm looking to implement properly is using like card to select actions:
You don't have permission to view the spoiler content. Log in or register now.

I'm using extra simple things, not even on python, like making the cards clickable and doing simple jumps and randit. However, it would take forever to think about all variable that is possible, so coding on a python block would be better, right?
 

crabsinthekitchen

Well-Known Member
Apr 28, 2020
1,565
9,081
Since I never had any formal education regarding coding all I could do was use logic to solve things. I'm looking on tutorials and videos to understand things better but it's a bit complicated. I can totally get the logic behind things but I lack the practical knowledge...

One of the aspects I'm looking to implement properly is using like card to select actions:
You don't have permission to view the spoiler content. Log in or register now.

I'm using extra simple things, not even on python, like making the cards clickable and doing simple jumps and randit. However, it would take forever to think about all variable that is possible, so coding on a python block would be better, right?
From my experience, the code you understand is better than more efficient code you don't understand, so if it's easier for you to go through jumps you can do it that way. I've seen games that have no logic inside python blocks at all and calculate it all through labels. Ataegina has a pretty good combat system that's done entirely on jumps between labels, you might look there as well
 
  • Heart
Reactions: OrcsMaster