Thaius' project.

Ideas and games that are not yet publicly in production. This forum also contains the pre-2012 archives of the Works in Progress forum.
Message
Author
JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Thaius' project.

#1 Post by JQuartz »

Everything you asked for is doable though it'll be tough. To generate random result you can use the following method:

Code: Select all

$ random_number = renpy.random.randint(1, 4)
if random_number==1:
    "Effect 1"
elif random_number==2 or random_number==3 or random_number==4:
    "Effect 2"
You can communicate with me via PM but I will communicate with you via this board.
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: Thaius' project.

#2 Post by JQuartz »

And what do I you want me to do first? Or when do you want me to start work?
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

Dusty
Regular
Posts: 126
Joined: Fri Jul 25, 2008 11:51 pm
Contact:

Re: Thaius' project.

#3 Post by Dusty »

JQuartz wrote:Everything you asked for is doable though it'll be tough. To generate random result you can use the following method:

Code: Select all

$ random_number = renpy.random.randint(1, 4)
if random_number==1:
    "Effect 1"
elif random_number==2 or random_number==3 or random_number==4:
    "Effect 2"
That can get unruly.

Code: Select all

def percentChance(chance):
    if renpy.random()*100 < chance:
        return True
    return False

#Say a Poison spell has a 60% chance to inflict Poison.
"What spell do you want to cast?"
menu:
    "Poison (5 MP)":
        player.MP -= 5
        if percentChance(60):
            "Success! Enemy has been poisoned."
            enemy.status = "Poison"
        else:
            "Enemy has not been poisoned."
        jump enemyturn
    "Never mind":
        jump battlemenu

JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: Thaius' project.

#4 Post by JQuartz »

Dusty wrote:That can get unruly.
I see. Thanks for the suggested code to replace mine.
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

Thaius
Regular
Posts: 44
Joined: Mon Feb 02, 2009 6:52 pm
Contact:

Re: Thaius' project.

#5 Post by Thaius »

I'll talk to you on this board: makes things easy. Good idea.

Before work starts, how do you want to do this? I can give you the code and tell you what to do, leaving it to you to write the whole battle system, or you could give me the things I don't know how to do and let me plug them in. You're the one volunteering, so I'll let you decide how you do things. You can start whenever: of course, the sooner the better on my end, but again, you've volunteering, so I'm not about to commandeer your schedule. I'll work with whatever you're willing to give.
~ If logic is nothing more than believing in fact, are we truly thinking logically or just blindly believing what seems to be true?

JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: Thaius' project.

#6 Post by JQuartz »

Thaius wrote:I can give you the code and tell you what to do, leaving it to you to write the whole battle system,
This way sounds okay.
Thaius wrote:the sooner the better on my end
Same here. Right now I'm totally free but not so once I recover from my injuries. So I plan to do some coding work while I am waiting for my injuries to recover. (Making games seems more productive to me compared to playing games...)
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

Thaius
Regular
Posts: 44
Joined: Mon Feb 02, 2009 6:52 pm
Contact:

Re: Thaius' project.

#7 Post by Thaius »

Okay then. Did I give you what I had done so far, or no? Really, it was all just messing with it to see what I could do anyway, but the bare-bones structure is still useful. As for exactly what kinds of spells and such... that is still being determined. I'll talk to the guy who's helping me with that and get those specifics down ASAP.

Excuse my curiosity, but injuries? I'm kind of curious, but of course you don't have to explain if you'd rather not. Either way, I appreciate the help. The basic coding structure I was using came from the other board I started: you can just take that or I can give you what I have. Your choice.
~ If logic is nothing more than believing in fact, are we truly thinking logically or just blindly believing what seems to be true?

JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: Thaius' project.

#8 Post by JQuartz »

Thaius wrote:Did I give you what I had done so far, or no?
I think you have not yet.
Thaius wrote:Excuse my curiosity, but injuries?
I'm wheelchair bound so the most interesting thing I can do while I'm wheelchair bound is play the computer. But playing games all day long just seems to me to be unproductive (I still spend a lot of time to play though) so I thought while I'm still wheelchair bound, I better make a game.
Thaius wrote:you can just take that or I can give you what I have.
If I'm not mistaken the code given in the board you mentioned is in python so I can't fully understand it( which means I couldn't modify it to suit your project) so I think it better if you give me what you have.
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

Thaius
Regular
Posts: 44
Joined: Mon Feb 02, 2009 6:52 pm
Contact:

Re: Thaius' project.

#9 Post by Thaius »

Wow. Okay, then. I understand the desire to be productive, for sure. That's cool.

This is what I have so far. Though some things aren't part of the final system. For instance, magic may not include the generic "fire" and "thunder" spells that I have in there, and there is no such item as grenades. But regardless, this is what I've messed with.

Code: Select all

init:
    $ m = Character('Me', color="#c8c8ff")
    
label start:
    
label battleSetup:
  $ enemyHP = 100
  $ playerHP = 100
  $ enemyATK = 20
  $ enemyDEF = 5
  $ playerATK = 20
  $ playerDEF = 7
  $ playerMP = 50
  $ enemyMP = 50
  $ playerMAG = 30
  $ enemyMAG = 30
  $ playerMAGDEF = 5
  $ enemyMAGDEF = 5
  $ fire = 5
  $ potion = 10
  $ grenade = 3


label battleLoop:
  menu:
    "What will you do? HP:%(playerHP)s/MP:%(playerMP)s ------ Enemy HP: %(enemyHP)s"

    "ATTACK":
      "You attack"
      
      $ tempNumber = playerATK - enemyDEF 
      "You do %(tempNumber)s damage!"
      $ enemyHP -= tempNumber
      
    "Magic":
      menu:
        "Fire - 5" if playerMP > 0:
         $ fireATK = playerMAG - enemyMAGDEF
         "You attack with fire for %(fireATK)s damage!"
         $ enemyHP -= fireATK
         $ playerMP -= 5
        "Thunder - 5" if playerMP > 0:
         $ thunderATK = playerMAG - enemyMAGDEF
         "You attack with thunder for %(thunderATK)s damage!"
         $ enemyHP -= thunderATK
         $ playerMP -= 5
        
      
    "Use item":
      menu:
       "Potion %(potion)s" if potion > 0:
        "You heal 50 hp!"
        $ playerHP += 50 
        $ potion -= 1
       "Grenade %(grenade)s" if grenade > 0:
        $ grenATK = playerATK - enemyDEF + 10
        "You throw grenade for %(grenATK)s damage!"
        $ enemyHP -= grenATK
        $ grenade -= 1

  if enemyHP < 1:
    "You win!"
    jump endBattle

  "You take damage!"

  $ tempNumber = enemyATK - playerDEF

  "Hit for %(tempNumber)s damage!"
  $ playerHP -= tempNumber

  if playerHP < 1:
    jump loseBattle
  jump battleLoop
label endBattle:
  "You rock!"

  return

label loseBattle:
  "You're defeated!" 
  return
Again, I'm trying to get a hold of the other creative force behind it. If you want to help with that as well, you're welcome to: you are the one coding it as well. If not, we'll come up with ideas and ask you if they're possible before committing them to the system. If you ever have any questions or complaints about what's going on, let me know.

Thank you for helping.
~ If logic is nothing more than believing in fact, are we truly thinking logically or just blindly believing what seems to be true?

JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: Thaius' project.

#10 Post by JQuartz »

Could you give me a list of what the battle system should do? I'm still kind of blur what needs to be done.Also, does the battle system involves 1 vs1, many vs 1 or many vs many? What is the effect of leveling up? Can magic attacks get critical hits? How much MP should be regenerated every time( eg:minute, second, hour...)?
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

Thaius
Regular
Posts: 44
Joined: Mon Feb 02, 2009 6:52 pm
Contact:

Re: Thaius' project.

#11 Post by Thaius »

Those kinds of questions are what I will be discussing with the other person who so far hasn't been replying to me. He and I have kind of been the creative force behind stuff, but he hasn't been calling me back or anything. I'll keep persisting. I'll make sure to address your specific questions when I talk with him, and we'll figure stuff out and run it by you. If there are any other specific questions, or just things we should keep in mind when we brainstorm, let me know. I'll get back to you ASAP.
~ If logic is nothing more than believing in fact, are we truly thinking logically or just blindly believing what seems to be true?

JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: Thaius' project.

#12 Post by JQuartz »

More question:
1) Is there a max hp and max mp (like 12/32 with 32 the max hp)
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

Thaius
Regular
Posts: 44
Joined: Mon Feb 02, 2009 6:52 pm
Contact:

Re: Thaius' project.

#13 Post by Thaius »

I can answer that question right now, actually. There will be a maximum to them, yes. And actually, that brings up another question for you. In terms of how much stats improve at each level up, do you want to do the numbers for that, or should we figure that out and just let you do the programming?
~ If logic is nothing more than believing in fact, are we truly thinking logically or just blindly believing what seems to be true?

JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: Thaius' project.

#14 Post by JQuartz »

Thaius wrote:In terms of how much stats improve at each level up
Well if you can provide in numerical values that would be best but if you can't a estimation(high, low,etc) is okay as well.

Anyway, here what I can do without further information. If there anything you want to be changed just tell me.

Code: Select all

init:
    $ m = Character('Me', color="#c8c8ff")
    
    $ battle_on=None
    
    $ level=1
    $ experience=0
    $ provided_experience=5
    $ level_up_experience=5
    $ enemy_name='Hostile Donut'
    $ enemyMAXHP=100
    $ enemyHP = 100
    $ playerMAXHP=100
    $ playerHP = 100
    $ enemyATK = 20
    $ enemyDEF = 5
    $ playerATK = 20
    $ playerDEF = 7
    $ playerMAXMP=50
    $ playerMP = 50
    $ enemyMP = 50
    $ playerMAG = 30
    $ enemyMAG = 30
    $ playerMAGDEF = 5
    $ enemyMAGDEF = 5
    $ fire = 5
    $ potion = 10
    $ grenade = 3
    
   
    python:
        def percentChance(chance):
            if renpy.random.randint(1,100) >= chance:
                return True
            return False
            
        def regenerate_mp():
            ui.timer(1.0, ui.callsinnewcontext("mp_regeneration"))
        config.overlay_functions.append(regenerate_mp) 
        
        
        
        def hp_and_mp():
            if battle_on:
                ui.frame(xpos=1.0, xanchor=1.0)
                ui.vbox()
                ui.bar(playerMAXHP,playerHP, xmaximum=150)
                ui.text("HP:   "+str(playerHP)+"/" +str(playerMAXHP))
                ui.null(height=10)
                ui.bar (playerMAXMP, playerMP,xmaximum=150)
                ui.text("MP:   " + str(playerMP) +"/"+ str(playerMAXMP))
                ui.close()
        config.overlay_functions.append(hp_and_mp)
        
        def enemy_hp():
            if battle_on:
                ui.frame(xpos=.5, xanchor=.5,ypos=.3)
                ui.vbox()
                ui.text(enemy_name)
                ui.bar(enemyMAXHP,enemyHP, xmaximum=150)
                ui.text("HP:   "+str(enemyHP)+"/" +str(enemyMAXHP))
                ui.null(height=10)
                ui.close()
        config.overlay_functions.append(enemy_hp)
label mp_regeneration:
    if playerMP>=playerMAXMP:
        return
    $ playerMP += 1
    $ renpy.restart_interaction()
    return
label start:
    $ battle_on=True

   
label battleSetup:
    pass


label battleLoop:
  
    python:
        ui.vbox(xpos=.7, ypos=.5)
        ui.textbutton('Attack', clicked=ui.jumps('attack'))
        ui.textbutton('Magic', clicked=ui.jumps('magic'))
        ui.textbutton('Use Item', clicked=ui.jumps('item'))
        ui.close()
        
        ui.interact()

    
label attack:
    "You attack"
     
    $ tempNumber = playerATK - enemyDEF
    $ enemyHP -= tempNumber
    if enemyHP<=0:
        $ enemyHP=0
    "You do %(tempNumber)s damage!"
    if enemyHP < 1:
        "You win!"
        jump endBattle
    jump enemyturn
     
   
label magic:
    python:
        ui.vbox(xpos=.7, ypos=.5)
        ui.textbutton('Fire    5MP', clicked=ui.jumps('fire'))
        ui.textbutton('Thunder    5MP', clicked=ui.jumps('thunder'))
        ui.textbutton('Poison    5MP', clicked=ui.jumps('poison'))
        ui.textbutton('Return', clicked=ui.jumps('battleLoop'))
        ui.close()
        ui.interact()
        
label fire:
    if playerMP <=4:
        "You don't have enough MP."
        jump magic
    $ fireATK = playerMAG - enemyMAGDEF
    $ playerMP -= 5
    $ enemyHP -= fireATK
    if enemyHP<=0:
        $ enemyHP=0
    "You attack with fire for %(fireATK)s damage!"
   
    
    if enemyHP <=0:
        "You win!"
        jump endBattle
    jump enemyturn
    
label thunder:
    if playerMP <=4:
        "You don't have enough MP."
        jump magic
    $ playerMP -= 5
    $ thunderATK = playerMAG - enemyMAGDEF
    $ enemyHP -= thunderATK
    if enemyHP<=0:
        $ enemyHP=0
    "You attack with thunder for %(thunderATK)s damage!"
    
    
    if enemyHP <=0:
        "You win!"
        jump endBattle
    jump enemyturn
    

label poison:
    if playerMP <=4:
        "You don't have enough MP."
        jump magic
    
    
    $ playerMP -= 5
    if percentChance(60):
        "Success! Enemy has been poisoned."
        $ enemystatus = "Poison"
    else:
        "Enemy has not been poisoned."
    if enemyHP<=0:
        $ enemyHP=0
    if enemyHP <=0:
        "You win!"
        jump endBattle
    jump enemyturn
           
label item:
    python:
        ui.vbox(xpos=.7, ypos=.5)
        ui.textbutton('Potion    %(potion)s' % globals(), clicked=ui.jumps('potion'))
        ui.textbutton('Grenade    %(grenade)s' % globals(), clicked=ui.jumps('grenade'))
        ui.textbutton('Return', clicked=ui.jumps('battleLoop'))
        ui.close()
        ui.interact()

label potion:
    $ playerHP += 50 
    $ potion -= 1
    "You heal 50 hp!"
    if enemyHP<=0:
        $ enemyHP=0
    if enemyHP <=0:
        "You win!"
        jump endBattle
    jump enemyturn
                
label grenade:
    if grenade<=0:
        "You don't have any grenade."
        jump item
    $ grenATK = playerATK - enemyDEF + 10
    $ enemyHP -= grenATK
    $ grenade -= 1
    if enemyHP<=0:
        $ enemyHP=0
    "You throw grenade for %(grenATK)s damage!"
    
    if enemyHP <=0:
        "You win!"
        jump endBattle
    jump enemyturn
        
    
  

  
label enemyturn:
    "You take damage!"
    $ tempNumber = enemyATK - playerDEF
    $ playerHP -= tempNumber
    "Hit for %(tempNumber)s damage!"
  

    if playerHP < 1:
        jump loseBattle
    jump battleLoop
label endBattle:
    "You rock!"
    $ experience+=provided_experience
    "You gained %(provided_experience)d experience points."
    if experience>=level_up_experience:
        $ level+=1
        $ level_up_experience=level_up_experience*2
        $ level_up_experience="%d" % level_up_experience
        $ level_up_experience=int(level_up_experience)
        "You gained a level!"
    $ placeholdervariable=level_up_experience-experience
    "You need another %(placeholdervariable)d experience points to reach the next level."
    
    

    return

label loseBattle:
  "You're defeated!"
  return 
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

Thaius
Regular
Posts: 44
Joined: Mon Feb 02, 2009 6:52 pm
Contact:

Re: Thaius' project.

#15 Post by Thaius »

Wow. Thank you so much for helping: I would never be able to do that. A couple comments.

Just so you know, items and magic are still being debated: the stuff there may need some changing once we actually figure out what's going on (which I may just need to do myself... this guy still isn't getting back to me). For instance, there probably will not be a grenade: I was just using that to try and figure out items. So just be prepared for that.

I loved the damage meters and such. I am going to try and see about getting sprites into the game: I should have the information from my artist soon. Great job.

Two small things: the MP regeneration should probably be a bit slower. Maybe it should get faster as you level up, but with the low-level spells that are there right now, running out would be pretty much impossible. Also, I healed with a potion and my health went above the max: I assume that's a problem with the HP cap.

Sorry I couldn't be more specific: I'm not the coder, lol. I'm very glad you are willing to help: this will be much, much better with you coding. :D
~ If logic is nothing more than believing in fact, are we truly thinking logically or just blindly believing what seems to be true?

Post Reply

Who is online

Users browsing this forum: No registered users