Need Help with stat bar [SOLVED]

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Post Reply
Message
Author
saskuto
Regular
Posts: 64
Joined: Fri Jan 15, 2010 2:56 pm
Contact:

Need Help with stat bar [SOLVED]

#1 Post by saskuto »

Hey all!

Ok so I downloaded the dse but I only want the stat bars not the day planner as I want to create relationship bars that go up say like 10 after a particular choice and I'm figuring this is the only way for me to do it...
I've tried searching for how to make the relationship bars like in flower shop and Bionic Heart but have had no help thus far. :(

Any help would be appreciated :)
Last edited by saskuto on Mon Mar 22, 2010 7:04 pm, edited 1 time in total.

User avatar
Midnighticequeen
Veteran
Posts: 292
Joined: Fri Apr 04, 2008 4:04 pm
Completed: Bunni and Kitty, Sweethearts, Tiesa's Tales
Projects: Wish
Organization: Ice Queen Games
itch: icequeenstudios
Contact:

Re: Need Help with stat bar

#2 Post by Midnighticequeen »

Hmm...I'm pretty sure Jack just customized the standard stats bar to look like that. If you want something similar he might be willing to help you.

saskuto
Regular
Posts: 64
Joined: Fri Jan 15, 2010 2:56 pm
Contact:

Re: Need Help with stat bar

#3 Post by saskuto »

Midnighticequeen wrote:Hmm...I'm pretty sure Jack just customized the standard stats bar to look like that. If you want something similar he might be willing to help you.
is Jack pytom?

User avatar
Midnighticequeen
Veteran
Posts: 292
Joined: Fri Apr 04, 2008 4:04 pm
Completed: Bunni and Kitty, Sweethearts, Tiesa's Tales
Projects: Wish
Organization: Ice Queen Games
itch: icequeenstudios
Contact:

Re: Need Help with stat bar

#4 Post by Midnighticequeen »

No, he's the guy who created Bionic Hearts and the Flower Shop

saskuto
Regular
Posts: 64
Joined: Fri Jan 15, 2010 2:56 pm
Contact:

Re: Need Help with stat bar

#5 Post by saskuto »

Midnighticequeen wrote:No, he's the guy who created Bionic Hearts and the Flower Shop
so how would I contact him?

User avatar
Midnighticequeen
Veteran
Posts: 292
Joined: Fri Apr 04, 2008 4:04 pm
Completed: Bunni and Kitty, Sweethearts, Tiesa's Tales
Projects: Wish
Organization: Ice Queen Games
itch: icequeenstudios
Contact:

Re: Need Help with stat bar

#6 Post by Midnighticequeen »

You can send him a pm. He's on this forum a lot and you can search for him using his user name.

User avatar
netravelr
Miko-Class Veteran
Posts: 504
Joined: Thu Jan 28, 2010 2:31 am
Completed: Culina: Hands in the Kitchen, Culina: The Spirit of Cooking, Saving Zoey
Projects: Love at the Laundromat
Organization: Lakeview Interactive
Deviantart: netravelr
Location: USA
Contact:

Re: Need Help with stat bar

#7 Post by netravelr »

Well, I know Jack is busy working on 5 projects now and he hardly has any free time, so I'll see if I can help you a little bit. :-) I haven't done this myself, but I have done a health/mana bar before using custom graphics so we can try to hack similar behavior.

I myself use a python function that I can show_bars that goes a little something like this:

Code: Select all

    def show_bars():

        ## Health Bar
        ui.image(im.Scale("bar_back.png", 30 * MaxStamina, 25, xpos = 20, ypos = 20));
        ui.image(im.Scale("bar_over.png", 30 * Stamina, 25, xpos = 20, ypos = 23));
        
        ## Other bars would be placed here should you want it.
        return;
Just to be a little clearer:
The ui.image class is one that can be used to place an image on the screen.
I use im.Scale on the back image to give the full amount of a bar so there is something behind it. For the overlay I scale my png to be whatever percentage of stamina I have compared to the full amount.
Setting the xpos and ypos moves the image to where you want in the screen.

To get the happy and frowning face on your bar you could just add two images.

I'm sure there's something easy you can use to transition from one state to the other if you want to replicate it but I don't know what it is.

Is this something similar to what you're looking for?
Image
Technical Designer/Programmer
Game Design Portfolio - Project updates on my Twitter
Experienced in: C/C++/C#, Python, Unreal, Unity, and Flash
_________________
"Space can be very lonely. The greatest adventure is having someone share it with you."

Eliont
Regular
Posts: 111
Joined: Thu Aug 06, 2009 6:51 am
Completed: Begin of Evangelion, SAO - Smile of the black cat, SAO - Project "Ceramic Heart", Time for Dragons
Location: Russia
Contact:

Re: Need Help with stat bar [SOLVED]

#8 Post by Eliont »

init block

Code: Select all

    style.create ('statbar','vbar')
    style.statbar.fore_bar = im.FactorScale("battle_gfx/ui/bars/bar.png",1.0,1.0)
    style.statbar.aft_bar = "gfx/blank.png" #im.FactorScale("battle_gfx/ui/bars/bar_bg.png",1.463,1.0)
    style.statbar.xmaximum = 15
    style.statbar.ymaximum = 50
    style.statbar.subpixel = True 
anywhere

Code: Select all

ui.bar(max_value, current_value, style='statbar')   

Post Reply

Who is online

Users browsing this forum: No registered users