I'm so grateful to have such help!
It's the least I can do for someone who gave me so much pleasure this night... with the game he made, obviously
I would love to talk to you on discord just to share thoughts and hopefully inquire more about coding...
Sorry, for a lot of reasons, some personals, no discord for me. But feel free to MP me here if you want. And if it can ease you to do it, you'll not be the only one.
I want to ask: Does having lots of code and making it super long (like repeating stuff) make the game laggier and buggier?
@Penfold Mole gave you the answer. I'll just add few things :
At every time, Ren'py have all the code stored in memory, which isn't a problem since even a ten years old computer have enough space to store way more than that. In the same time it mean that there isn't need to load the "next part". Branching to a label is instantaneous. This whatever the number of lines between the code line where you jump/call and the code line where the label is ; and obviously whatever they are on the same file or not.
As for the bugs, like Penfold Mole said, the more you repeat the same thing, the more difficult it will be to correct it. The proof is line 5726 versus lines 6789 & 7852. The same dialog line during the beach sequence, two versions of the sentence. Same for line 5930 versus lines 4867 & 6993
Trying to reunite the code when there's few difference, or difference which can easily be dealt with, and reusing parts of code by calling it, make it easier for you. If there's a typo or a bug, you only have one line to change. It's also easier to test, since the code have no reason to be bug/typo free the first time, and full of bugs/typos the other times.
But the real issue here is your own time. The more you split your code on multiple files and the more "easily readable" you name your label, the faster you'll find the part you are look for.
Back in time, a Senior coder said something which changed my life. I don't remember the exact words, but it was something like : Who cares about naming convention ? Whatever the way you name your functions/variables/whatever and whatever the file you put it in, as long as you understand it yourself. Just give them a name you can guess later, and put them where it seem natural for you. You'll see, at the end of the day you'll be less exhausted than you actually are.
And he was right. Not having to pass 30 seconds, sometimes way more, trying to remember what's the name I'm looking for, then the right part on my code, saved me a lot of energy. And with times it became really natural, "it's named like this and it can only be here". I passed from sometimes 2 minutes trying to find something, to an instant finding.
The difference is the same than walking surrounded by 70yo bikers, and walking surrounded by 20ish girls in short skirts. The second is more pleasurable and seem so easier to do.
1- So should $ outfit = 0 initially? I am still confused on how to make this change...
The default value should be "hot", which is the default outfit. This way it will be crash free even in case of problems, since it's a valid value.
But first, a question (4707->4712):
Code:
label hot:
jump hotT
label sexy:
jump sexyY
label slutty:
jump sluttyY
Why this ? Either
hotT,
sexyY and
sluttyY are called just once, and from here. So you can replace the "jump" by the content of the jumped label. No need to have these intermediary labels. It seem to be a thing with you, there's other case like this one, of labels who're just a jump somewhere else.
Now the changes.
Instead of what you have between lines 4704 and 4734, write this:
Code:
label beachtime:
$ Eliza_DepPoints = 0
$ outfit = "hot" # Value by default
call screen swimsuitsc
label hot: # Here it's the default value, nothing to do
jump lsdkfjalsefjoevbbeobobof
label sexy:
if Alexa_Points <= 4 and Mum_Points <= 1 and Twins_Points <= 5 and Hailey_Points <= 1:
"{b}*You do not have enough points to choose this outfit.*{/b}"
"{b}*Your affection points: %(Alexa_Points)s out of 7 with Alexa, %(Twins_Points)s out of 10 with Brooke, %(Hailey_Points)s out of 4 with Hailey, and %(Mum_Points)s out of 3 with Maddison*{/b}"
"{b}*You must have more than 4 out of 7 with Alexa, 5 out of 10 with Brooke, 1 out of 4 with Hailey, and 1 out of 3 with Maddison to unlock this*{/b}"
jump youdonothaveenough
else:
$ outfit = "sexy" # Here it's the sexy outfit
jump sldfjsdlfeyewryerywryweryery
label slutty:
if Alexa_Points <= 5 and Mum_Points <= 2 and Twins_Points <= 7 and Hailey_Points <= 3:
"{b}*You do not have enough points to choose this outfit.*{/b}"
"{b}*Your affection points: %(Alexa_Points)s out of 7 with Alexa, %(Twins_Points)s out of 10 with Brooke, %(Hailey_Points)s out of 4 with Hailey, and %(Mum_Points)s out of 3 with Maddison*{/b}"
"{b}*You must have more than 5 out of 7 with Alexa, 7 out of 10 with Brooke, 3 out of 4 with Hailey, and 2 out of 3 with Maddison to unlock this*{/b}"
jump youdonothaveenough
else:
$ outfit = "slutty" # Here it's the slutty outfit
jump sdlfsjlekjvewobwoeobejnvei
lines 4735->5797, you replace all the "scene hot (NUMBER)" with :
Code:
scene expression outfit + " (NUMBER)"
lines 5799->7923, you don't need these lines anymore, remove them.
4 - When you say double with a Boolean flag, do you mean below it have another point score thing? Like Eliza_Depoint >= 1: and below it Elizahasfallenasleep >= 1?
Here again, Penfold Mole gave you the right answer.
6- I couldn't make a return text button for the call screen! I looked everywhere online to try find instructions on how
What ? I'll look at this because you can.
8 - How do you split your code ?!?! O-O
Here, it's
@bmpb86 who gave the answer. Note that you can have both the spliting by event and by day. something like "sauna_day1.rpy" and "sauna_day2.rpy" by example. Like said above, do it like it seem natural for you.
Ren'py don't care where the code is, as long as it's in a ".rpy" file somewhere in the "game" directory. If you want, take a look at
You must be registered to see the links
. It's code is split in really a lots of file, and even a lots of directories. If needed, use
You must be registered to see the links
to extract the files from the .rpa archive.
9 - I guess Hailey does remove her swimming suit... The embarrassing one piece?
Yes. And I understand it, whatever she said, Maddison isn't this dumb, she wouldn't have bought the, "oh, it's just part of the outfit"
Hailey is a little taller than Brooke by intention - Brooke's skin is also a little paler than Hailey's . It's so that they appear ... Off.
It's not a problem, in fact it's quickly forgotten, just surprising at first.
As for the pictures problem addressed by bmpb86, it is and it isn't a problem.
You can order your pictures, and you can compress them more efficiently (without real loose in quality). By switching from JPEG to WEBP, Ptolemy past "dreaming of Dana" from an archive around 9Go, to an archive around 1Go. This with the same visual result, so it worth it. Take a look at
You must be registered to see the links
for more on the subject.