Search found 1628 matches

by Remix
Sun Jul 29, 2018 6:35 am
Forum: Ren'Py Questions and Announcements
Topic: BPG pic support please
Replies: 1
Views: 396

Re: BPG pic support please

Wouldn't FLIF be a better option if people really really wanted/needed a more versatile and efficient image compression format? FLIF - GNU LGPL (platform) or Apache (decoder part) licence (like many libraries already bundled with Ren'Py) - Out-performs webp and bpg on all types of images. BPG - Runs...
by Remix
Sat Jul 28, 2018 5:10 pm
Forum: Ren'Py Questions and Announcements
Topic: Changing image dependent on player stats/score
Replies: 5
Views: 597

Re: Changing image dependent on player stats/score

Also note:
You can use simplified DynamicImages if your image names actually reflect your variables:

Code: Select all

default score = 0
image characterImage = "images/img[score].png"
Would show "images/img0.png" while score is 0, "images/img1.png" while 1 etc
by Remix
Sat Jul 28, 2018 5:01 pm
Forum: Ren'Py Questions and Announcements
Topic: Reversed Auto Meter Bug?
Replies: 3
Views: 883

Re: Reversed Auto Meter Bug?

If you have altered the FieldValue, try adding max_is_zero=True to the attributes. If it is not that, perhaps show your code so we can try to help.
by Remix
Wed Jul 25, 2018 6:40 pm
Forum: Ren'Py Questions and Announcements
Topic: Do I have to define keyword "global" before using it in a class if I declared a variable inside an "init -1 python"?
Replies: 4
Views: 546

Re: Do I have to define keyword "global" before using it in a class if I declared a variable inside an "init -1 python"?

True yup, labels in Ren'Py access the global scope directly.
Screens too will read the global scope if they cannot find a local version of the variable, though you shouldn't be altering variables inside screens - just reading them.
by Remix
Wed Jul 25, 2018 5:58 pm
Forum: Ren'Py Questions and Announcements
Topic: Do I have to define keyword "global" before using it in a class if I declared a variable inside an "init -1 python"?
Replies: 4
Views: 546

Re: Do I have to define keyword "global" before using it in a class if I declared a variable inside an "init -1 python"?

Yes, to alter a global variable within a class method or function you would need to call global or access it through the globals namespace:

Code: Select all

    def __init__(self):
        global GLOBALTEST
        GLOBALTEST = 99
        # or just
        globals()['GLOBALTEST'] = 99
by Remix
Tue Jul 24, 2018 1:20 pm
Forum: Ren'Py Questions and Announcements
Topic: Layering images over sprites as they change (Solved!)
Replies: 4
Views: 599

Re: Layering images over sprites as they change (Solved!)

No problem.

On an aside; In future do

[code]Your Code Here[/code]

as it will preserve indentation and make it easier to read, e.g.:

Code: Select all

label lbl:
    "indented stuff"
by Remix
Tue Jul 24, 2018 11:36 am
Forum: Ren'Py Questions and Announcements
Topic: Layering images over sprites as they change (Solved!)
Replies: 4
Views: 599

Re: Layering images over sprites as they change

show TBU at center (new sprite) behind jel2, jel3

Alternatively:

show TBU at center as TBH

*should* just replace TBH with TBU
by Remix
Fri Jul 20, 2018 7:11 am
Forum: Ren'Py Questions and Announcements
Topic: Choosing Character Gender
Replies: 11
Views: 4410

Re: Choosing Character Gender

Just to add to this, it maybe better to define just one image tag set and add a variable part rather than mc_male, mc_female etc:

image mc = "images/mc_[gender].png"

(or even a Composite or LayeredImage using the gender interpolation)
by Remix
Fri Jul 20, 2018 6:55 am
Forum: Ren'Py Questions and Announcements
Topic: Animated models transparent background
Replies: 2
Views: 473

Re: Animated models transparent background

I think video alpha (transparency) in Ren'Py is mostly done with an accompanying mask video. Have you tried that? video mask

Alternatively (though potentially much larger filesize) you could use a DynamicDisplayable to return a frame based upon the shown timebase. I'd suggest using a mask though.
by Remix
Fri Jul 20, 2018 4:26 am
Forum: Ren'Py Questions and Announcements
Topic: [solved]what is the best way to make a Calendar run in the background?
Replies: 3
Views: 622

Re: what is the best way to make a Calendar run in the background?

I semi hate to say this (seeing how much work you have obviously done already) ... It might be best to try Python datetime objects through Ren'Py output translation... init python: import datetime class GameTime(object): def __init__(self, dt="Jan 01 2018"): self._dt = datetime.datetime.st...
by Remix
Fri Jul 20, 2018 3:11 am
Forum: Ren'Py Questions and Announcements
Topic: Variable containing a word
Replies: 6
Views: 808

Re: Variable containing a word

For more *precision*... if Choice1.startswith( "Pos" ): "True: Startswith Pos" elif Choice1.endswith( "Mary" ): "True: Endswith Mary" elif Choice1[:3] == "Pos": # first 3 letters "True: Starts Pos" elif Choice1[-4:].lower() == "john&qu...
by Remix
Wed Jul 18, 2018 7:39 am
Forum: Ren'Py Questions and Announcements
Topic: Making Unlockable Extra Scenes
Replies: 3
Views: 1922

Re: Making Unlockable Extra Scenes

I'd just create a list and have it store a set of 'accessible' values then open them at end and access labels if unlocked... default accessible_extras = [ False ] * 5 # 5 endings here - expands to [False, False, False etc ] label ending_0: "words" $ accessible_extras[0] = True label extra_...
by Remix
Wed Jul 18, 2018 6:39 am
Forum: Ren'Py Questions and Announcements
Topic: Making Unlockable Extra Scenes
Replies: 3
Views: 1922

Re: Making Unlockable Extra Scenes

You need to use the Replay() action, not Start, then use the locked attribute action Replay( "meaning_of_life", locked=True ) # only clickable if meaning_of_life has been played through at least once. Alternatively, if you insist on using Start or Jump or whatever you will need to implemen...
by Remix
Wed Jul 18, 2018 6:09 am
Forum: Ren'Py Questions and Announcements
Topic: Only allowing a variable to add to a value the first time an option is clicked?
Replies: 8
Views: 1132

Re: Only allowing a variable to add to a value the first time an option is clicked?

Maydoh, where did you find the documentation on the set feature of menu? I couldn't find it anywhere in the Ren'Py documentation and that feature is awesome! Can't find any documentation on it, but I saw someone mention it a few days ago in another thread. Might have been me who mentioned it and, l...
by Remix
Wed Jul 18, 2018 4:58 am
Forum: Ren'Py Questions and Announcements
Topic: Positioning Sprites
Replies: 3
Views: 1149

Re: Positioning Sprites

An image will, unless adjusted, be positioned based upon its top left corner. For your case it would be nicer to use the centre pixel or maybe the one at the base in the middle, so we use anchors: transform my_left: anchor (0.5, 1.0) # 0.5 of the x direction (middle) 1.0 of the y (base) xalign 0.2 #...