Search found 10 matches

by Zealotus
Tue Aug 19, 2014 1:52 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Dynamically define a long list of displayables.
Replies: 19
Views: 2137

Re: [Solved] Dynamically define a long list of displayables.

I compared the RAM usage between the two and LiveComposite on all 7000-something images (169 outfits * 3 stages * 14 expressions). EDIT: I counted a few folders that weren't actually used and I missed a few expressions... >.>;; It's actually It's actually 163*3*20=9780 TIMES TWO because of small ver...
by Zealotus
Tue Aug 19, 2014 12:58 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Dynamically define a long list of displayables.
Replies: 19
Views: 2137

Re: Trying to dynamically define a long list of displayables

After some slight modifications this is what I ended up with: def ChrisSwitch(folder,expression): listvalue=[] if folder == "sprites": size=(1045,1536) else: size=(697,1024) for o in outfit_list: for i in xrange(3): listvalue.append("player.image=='{}' and player.cos=={}".format(o.image,i)) listvalu...
by Zealotus
Tue Aug 19, 2014 11:06 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Dynamically define a long list of displayables.
Replies: 19
Views: 2137

Re: Trying to dynamically define a long list of displayables

Oh my! The very creator himself! O_O FYI, Python is limited to 256 arguments, therefore ConditionSwitch is limited to 256 combination. One way is splitting it (it's how I did), but it wasn't a cleaver way. Yeah, that would explain what's going on in defines... The better way is something like this (...
by Zealotus
Tue Aug 19, 2014 5:35 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Dynamically define a long list of displayables.
Replies: 19
Views: 2137

Re: Trying to dynamically define a long list of displayables

Nevermind my last post. It was late and I was very tired... The class I've got is a general one for all the characters and outfits in the game. They are global variables that is copied to the player variable upon equip. So technically I could "equip" an enemy or NPC but that would break things later...
by Zealotus
Mon Aug 18, 2014 7:11 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Dynamically define a long list of displayables.
Replies: 19
Views: 2137

Re: Trying to dynamically define a long list of displayables

xela wrote:*You can't define renpy image references outside of init. Displayable you can define on the fly just fine.
Sooo, as long as I just define all the file locations i should be fine, or am I missing something?
by Zealotus
Mon Aug 18, 2014 6:38 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Dynamically define a long list of displayables.
Replies: 19
Views: 2137

Re: Trying to dynamically define a long list of displayables

They're set when equiping an outfit. And an outfit is set at startup so there's always something in those variables. Ptoblem is... I have to emulate all the possible values at boot becuase, as everyone knows, once the init has run you can't define more displayables. And, correct me if I'm wrong, Con...
by Zealotus
Mon Aug 18, 2014 5:03 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Dynamically define a long list of displayables.
Replies: 19
Views: 2137

Re: Trying to dynamically define a long list of displayables

Found a way that works WAY better! init 990: $ expression="smile" image chris: LiveComposite((1045,1536), (0,0),"sprites/%s/base%s.png"%(player.image,player.cos), (0,0),"sprites/chris/%s.png"%(expression),) image small chris: LiveComposite((697,1024), (0,0),"small/%s/base%s.png"%(player.image,player...
by Zealotus
Mon Aug 18, 2014 12:31 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Dynamically define a long list of displayables.
Replies: 19
Views: 2137

Re: Trying to dynamically define a long list of displayables

Hmm... Well I added a menu option that would print out every possible combination but... for o in outfit_list: for e in expression_list: for i in range(1,3): say("chris {}".format(e),"sprites/{}/base{}.png sprites/chris/{}.png".format(o.image).format(i).format(e)) While i would expect the results to...
by Zealotus
Mon Aug 18, 2014 9:29 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Dynamically define a long list of displayables.
Replies: 19
Views: 2137

[Solved] Dynamically define a long list of displayables.

Solved! See Nyaatrap's response for code: *clicky* ありがとう ございます Nyaatrap-san! ^_^ Note! This is not my game originally! Some clever people can probably figure out which game it is despite the fact that I've changes some variables around... I humbly ask you keep it to yourselves. Thank you! I'm modif...