Ren'Py [Request Help] Fix some my not understand issues

eike2000

Member
May 9, 2017
146
70
First, Sorry for my bad english. and Please do not tell me using notepad ++ to edit file, that is not useful comment at all.
I make for myself a patch (Attach files) and I do not have good at code (just learning a bit from games developed)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
. 1 - In Z-Unren file, label screen (say) it useful with common say dialogue but if with multi the name and text stacking on over, how could make this my screen not attemp while dialogue with flag multi on and use default?​
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
. 2- In Z-Unren file, with if xmod.NameLine_H >= 80 (name line higher than 80) I want to chose custome transparent of line color. I was tried with input a, b, c, z with:​
$ r_cl = renpy.input("Red color", "FF")​
$ g_cl = renpy.input("Green color", "FF")​
$ b_cl = renpy.input("Blue color", "FF")​
$ t_cl = renpy.input("Transparent level", "FF")​
$ cl_cl = r_cl + g_cl + b_cl + t_cl (sorry this not my remember)​
result cl_cl ="FFFFFFFF". How could make cl_cl = FFFFFFFF (not " at begin and end)​
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
. 3- In XPatch file, field replace_dict example mom I have my mom , your mom, his mom, her mom, mom and moms, your moms, his moms, her moms, moms.
So how could combine my, your, his, her, NULL in a line and same as with mom and moms. I was learning in RingofLust patch and tried with​
def replace(text):
search = "step[ -]?(aunt|bro|family|mom|mother|sibling|sis|son)"​
text = re.sub(search, lambda x: x.groups()[0], text)​
text = re.sub(search.capitalize(), lambda x: x.groups()[0].capitalize(), text)​
return text​
and with my bad progame ablitity I cannot understand how that work, so I tried with search = "?(aunt|bro|family|mom|mother|sibling|sis|son)" but it wrong, nothing be title and change color as i think. But if i try by :
if "mom" in text :
return text.replace('mom', "{color=#FF0012}Mom{/color}")​
else:
return text​
then mom will change color into Mom (red) but text "momment" will be change too : Momment (same as son and person)
and it got error if [mom!c] too.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
. 4- In XPatch file, how could handle who saying example variable mom_name = "Jessica" and $ j=Character("[mom_name]", color="#00FF0F")​
if Mc say : [j] is Mom other say will be Jessica. I tried if change mom_name = "mom" but if other char will be call Jessica as mom too, but if i keep it as normal then mc (as jessica's son) will call his mother as name?​
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,363
15,281
result cl_cl ="FFFFFFFF". How could make cl_cl = FFFFFFFF (not " at begin and end)
Why would you want to make that ? :/


So how could combine my, your, his, her, NULL in a line and same as with mom and moms.
Why do you want to do this ? No, wait, the question is: why is there "my mom", "your mom", etc. entries ?
Since the regEx (that is partly broken) use \b, the "my", "your", etc. is totally useless.


and it got error if [mom!c] too.
Hmm, yeah, never thought about this one... But well, it's due to the color part.


. 4- In XPatch file, how could handle who saying example variable mom_name = "Jessica" and $ j=Character("[mom_name]", color="#00FF0F")
if Mc say : [j] is Mom other say will be Jessica. I tried if change mom_name = "mom" but if other char will be call Jessica as mom too, but if i keep it as normal then mc (as jessica's son) will call his mother as name?​
Well, strictly speaking it's possible... but it would involve a dict for the substitution, and the said substitution to be performed directly in the say screen. The last past being a fucking slowdown due to the screen refresh and the size of the regEx.