Search found 57 matches

by HB38
Tue Jan 12, 2016 9:54 pm
Forum: Ren'Py Questions and Announcements
Topic: [Sovled] DynamicDisplayables and Live Composites
Replies: 8
Views: 777

Re: More variable 'fun' in images…

Yeah, when I saw this, it seemed odd that this would work properly. I already told you that I'm pretty sure you have to write out DynamicDisplayable by long hand. Pardon my ignorance, but what would that look like? Can I nest the Composite Inside it? Or do I convert the entire LiveComposite to a Dy...
by HB38
Tue Jan 12, 2016 8:26 pm
Forum: Ren'Py Questions and Announcements
Topic: [Sovled] DynamicDisplayables and Live Composites
Replies: 8
Views: 777

Re: More variable 'fun' in images…

Alright… I've run into an interesting issue now - it looks like everything is working great, but the images don't seem to be updating when I vary the variable in the game (they do change if I hard code the variable at the start, so I know the code there is solid). I'm thinking the LiveComposite does...
by HB38
Tue Jan 12, 2016 6:44 pm
Forum: Ren'Py Questions and Announcements
Topic: [Sovled] DynamicDisplayables and Live Composites
Replies: 8
Views: 777

Re: More variable 'fun' in images…

When you have multiple %s in your code line, you need to specify a list of variables in appropriate order to fill them in, like "text_%s_%d_%s"%(string_var, data_var, another_string_var) Ahh! Excellent - I was placing the ( on the left of the % when I tried using that. … You wouldn't happ...
by HB38
Tue Jan 12, 2016 5:07 pm
Forum: Ren'Py Questions and Announcements
Topic: [Sovled] DynamicDisplayables and Live Composites
Replies: 8
Views: 777

[Sovled] DynamicDisplayables and Live Composites

So, I was almost completely set with my variables in my project when I ran across this use case: image template_1_doll = LiveComposite( (1024,768), (0,0), "images/characters/template_1/hair/style_1/back_hair_[char_list[%s].hair].png"%curr_char, ####### This works great! (0,0), "images...
by HB38
Mon Jan 11, 2016 9:53 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Nested Variables in Statements, Screens, Images
Replies: 12
Views: 2615

Re: Variables in other Variables and If statements

And this would be how to do a character (I'm using live composites in my game):

Code: Select all

show expression ("character_%s_doll" % curr_char)
That code will pull the image defined as "character_0_doll".



Hope this helps someone else down the line!
by HB38
Mon Jan 11, 2016 9:36 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Nested Variables in Statements, Screens, Images
Replies: 12
Views: 2615

Re: Variables in other Variables and If statements

Heads up to anyone using this thread as a reference… you can use multiple variables in the same statement as follows: $ narrator ("{0} is a {1} character who is {2} years old." .format(char_list[curr_char].full, char_list[curr_char].height, char_list[curr_char].age)) To get this output: &q...
by HB38
Mon Jan 11, 2016 5:31 pm
Forum: Ren'Py Questions and Announcements
Topic: Use of LiveComposite and ConditionSwitch together
Replies: 5
Views: 1902

Re: Use of LiveComposite and ConditionSwitch together

Do you use LiveComposite and ConditionSwitch in a different way? Do other practices exist? Since Renpy 6.99.7 you can use dynamic images to accomplish some of this. eg. Your first "draw_eileen" method could be replaced by: image eileen = LiveComposite( (200, 300), (0,0), "base.png&qu...
by HB38
Mon Jan 11, 2016 2:05 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Nested Variables in Statements, Screens, Images
Replies: 12
Views: 2615

Re: Variables in other Variables and If statements

It's the same as using if/else anywhere else...? init python: class CharInfo(object): def __init__(self, first, last, alive=True): self.first = first self.last = last self.full = first + " " + last self.alive = alive if self.first == "Bob": self.age = renpy.random.choice(range(2...
by HB38
Mon Jan 11, 2016 12:33 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Nested Variables in Statements, Screens, Images
Replies: 12
Views: 2615

Re: Variables in other Variables and If statements

Oh, I also remembered I still need a way to be able to make the current character variable, so I can have generic screens for things such as this:

Code: Select all


$ current_char = 1

"[char_list[current_char].full] is whom is in the room right now."

by HB38
Mon Jan 11, 2016 12:04 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Nested Variables in Statements, Screens, Images
Replies: 12
Views: 2615

Re: Variables in other Variables and If statements

...why are you back to using variables rather than classes again? Randomizing the names is just a matter of building the choices into the initialization of the object. Philat - you're awesome! This code was very clean and easy to read, I really appreciate it. Just a few last questions and I think I...
by HB38
Sun Jan 10, 2016 9:12 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Nested Variables in Statements, Screens, Images
Replies: 12
Views: 2615

Re: Variables in other Variables and If statements

Alright, I found a way to get what I want to happen mostly: label curr_char_update: $ curr_char_firstname = char_1_first_name $ curr_char_lastname = char_1_last_name $ curr_char_alive = char_1_alive return So that sets the variables I want for the scene I'm using and it works quite well - and then, ...
by HB38
Sun Jan 10, 2016 5:08 pm
Forum: Ren'Py Questions and Announcements
Topic: How do I implement the fight bar?
Replies: 6
Views: 769

Re: How do I implement the fight bar?

Good advice regarding creating a new project but sometimes I get confused about how to even implement the code. The second thread was perfect. The code is simple and I clearly understand what each part does which helped me create what I wanted. I really appreciate your help and patience! I'm not re...
by HB38
Sun Jan 10, 2016 4:24 pm
Forum: Ren'Py Questions and Announcements
Topic: How do I implement the fight bar?
Replies: 6
Views: 769

Re: How do I implement the fight bar?

Did some more digging, here is a bar using the built in methods that may be a bit easier for you to modify.
by HB38
Sun Jan 10, 2016 4:17 pm
Forum: Ren'Py Cookbook
Topic: [UPDATED] tutorial: Attaching Admob to RenPy
Replies: 46
Views: 33841

Re: Tutorial: Attaching Admob to RenPy and earn some money.

Lightworker wrote:Where would you put an ad mob so you don't break immersion in a visual novel?
I think the main title screen would be the least obtrusive. You'd hit it overtime you launched the game once, and as you're playing you'd almost never see it. *shrug*
by HB38
Sun Jan 10, 2016 4:13 pm
Forum: Ren'Py Questions and Announcements
Topic: How do I implement the fight bar?
Replies: 6
Views: 769

Re: How do I implement the fight bar?

I found it via a quick search, but it's also located in the cookbook directory thread . You can probably replicate the feature using solid colors and boxes, but I would imagine just whipping up very basic graphics would still be easier. You'd want to place the bar on it's own screen and then call an...