VN Ren'Py The College Con [Dev Thread]

GNVE

Active Member
Jul 20, 2018
723
1,182
Warning! This game is a long way from release if it ever gets that far. I'm really challenging myself as a programmer here. Don't expect regular updates since most stuff is probably too boring to share.
Feel free to offer ideas or constructive feedback. Some might make it into the game while other ideas might not for various reasons. (Even what I have written below is subject to change and might be overhauled a dozen times still).


This is not the story about how you met your girlfriend or how you became each others first.
This is also not the story about how that beautiful, sweet, innocent looking, angelic creature turned out to be a sex-demon in disguise. How the two of you extensively explored each others kinks, how you made her your loyal and willing slave or how you shared the bed with several of her friends.
No this is the story about how you built a prestigious college so you could have your own harem.

Due to reasons you inherited a large plot of land with a sizeable trust that would pay any tax on it pretty much in perpetuity. The only stipulation was that the lands main use has to be educational and everything that entails.
You had wanted to turn down the offer but as your girlfriend so eloquently put it: "What is a college other than an endless conveyer of young nubile pussy." So yeah... you didn't need much convincing after that.

Unfortunately once you're there things turn out a little differently. The plot is enormous but also overgrown with only one house in utter disrepair on it. ( You are not supposed to see the stars, in broad daylight in the attic...)The town, once a bustling sea-side tourist town is in decline and disrepair. Finally it's inhabitants are very conservative Christians.

You may have made a mistake...

Gameplay
You start of small with few funds. You build out your college. You'll buy businesses that bring in extra cash, prestige and help corrupt the town. You'll interact with the government and have to play lip service to the churches in town... at least until you drive them out of business.
This game will be very much management first VN second.
You don't have permission to view the spoiler content. Log in or register now.
You don't have permission to view the spoiler content. Log in or register now.
You don't have permission to view the spoiler content. Log in or register now.
You don't have permission to view the spoiler content. Log in or register now.
You don't have permission to view the spoiler content. Log in or register now.
You don't have permission to view the spoiler content. Log in or register now.
You don't have permission to view the spoiler content. Log in or register now.
You don't have permission to view the spoiler content. Log in or register now.

Inspiration
HHS+
90's management games
Tech trees
The palace building of the original Civilization game
The town building of the Colonization game.

Artwork
It will be the last thing added. Since lieutenants can be placed anywhere within their class it will be sprite based mostly.
I hope I can commission an artist to do 2D art due to the many variations needed. I do not know yet what style it will be though. Doing it in Daz is nearly impossible as I want upgrades and corruption to be reflected in the environment. I imagine it is quite technical and somewhat similar to working in the old animation studios where you had layers adding to each other for a final frame.

Roadmap
Tech demo: Basically click this button to see that number go up. No gameplay just a way for me to test different game mechanics on their own.
MVP: This will be more of a rough game where the base mechanics work.
Rough sketch: Little story but all the businesses, LT's, upgrades etc added but it isn't very balanced.
Balanced: Still little to no story but at least it seems to play in a balanced way.
Textual: Adding in more and more story.
Visual: Adding in the art.
Final product.
[/SPOILER]

When
No promises. Will take quite a while even for the Tech Demo.
 

GNVE

Active Member
Jul 20, 2018
723
1,182
I have no idea how interesting this is but here is a post about demographics, normal distribution and thus statistics. Don't say I didn't warn you...

If a city has 100K residents how many are of student age? how many are of working age? These questions are relevant for my game as having a population of 100K with 100K students enrolled in your college would look a little bit weird to say the least.
To get to a reasonable answer I decided to just look at the data of a country. Most countries have a statistics bureau so a quick google search gave me the data for my own country. The statistics bureau has (projected) data from 1950 - 2070.
Now what year to choose and how do you account for events like WWII that had a giant impact on demographics. Or how do you account for the fact that people in the 50's didn't get as old as nowadays? My answer to this al was to sidestep it somewhat and just take averages of everything.
I downloaded the data from 1950 to 2070 with 5 year intervals and counted the number of people per age for the groups 1950 - 2000, 1975 - 2025, 2020 - 2070 and finally 1950 - 2070 (all).
since I don't really care about the number of 49 year olds exactly I grouped the ages into categories too. These are children (anything under 18), students (18-27) young adults (28-39), 40-49, 50-59, 60-69 and the elderly (70 and up).

The data visualised looks as follows. I'm sorry the age groups are the wrong way around but not enough to change it. Anyway as you can see the data from the 50-00 (orange) skews young and the data from 20-70 skews older. I also realized that the all category skewed a little old as there are just more inhabitants in 2070 than in 1950 so to fix that I added a second all category (all2) that takes averages from the percentages of the other categories rather than the absolute numbers.
1721167850773.png

This last category is the one I went with by the way though I can see at some point adding in difficulty settings where you can skew the population older or younger.

In the game children will do nothing other than eat up a chunk of population. While the elderly are retired and won't work but can be consumers in your businesses. and those in the student category will consider joining your college.

The age distribution also allows for differences in corruption. Generally speaking the young will be more open to new experiences and to skirt social norms while the elderly are more conservative. So I reflected this in the game to make the student category have 5 more and the elderly 5 less corruption steps. (with the others in between those extremes). Where corruption is used to determine willingness to work certain jobs or visit certain establishments.

As stated in the first post corruption follows a normal distribution. So if the population is at step 10 on average some will be more corrupted while others are less corrupted. For now I'm using 25 steps (though this is subject to change depending on the eventual game balance)

The data used is just a random number generator for normal distributions. To equalize the graph each step is added to their counterpart and divided by two. (so one step down from the middle is 10,11% while one step up is 9,84% so equalized the steps become 9,97% each).
1721168904245.png
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,586
15,597
Now what year to choose and how do you account for events like WWII that had a giant impact on demographics. Or how do you account for the fact that people in the 50's didn't get as old as nowadays?
Well, this is answered by your story setting.
It's it, and more precisely the period you decide to put your story in, that should decide what data you look at, because there's a question you haven't take into account: The birthrate is mostly declining through the years.
Therefore, not only lifespan was shorter in the 50's (to keep your example), but birthrate was also way higher, what imply a bigger rate of students in regard of the whole population.

To be fully realistic, you should also take into account the kind of town. A town like New York, by example, is mostly filled by people having desk job, they'll live longer and make less children. A town like Detroit is more on the opposite side, with people having mostly manual job, and a shorter lifespan due to the induced drudgery of the job, while tending to make more children.


The age distribution also allows for differences in corruption. Generally speaking the young will be more open to new experiences and to skirt social norms while the elderly are more conservative. So I reflected this in the game to make the student category have 5 more and the elderly 5 less corruption steps. (with the others in between those extremes). Where corruption is used to determine willingness to work certain jobs or visit certain establishments.
Once again, to be actually realistic the job should also enter into account. You've more times to hang out when you've a desk job, than when you're doing a manual job that leave you tired at the end of the day. And the more you hang out, the more you're exposed to new experiences that can possibly corrupt you.


So, in short, you should forget about actual statistics and simply make up your own ones:

20% are under the age to work, 20% are already retired, 60% are working.
10% are below 10yo, 10% teenagers. 10% are between 60yo and 70yo, 10% are over 70yo. And for the other 10 years slices, it's 15% each.
40% of the working class have an average adult corruption factor, 50% have a higher corruption factor, and 10% a really high corruption factor ; there's always a category that is THE elite of their time (publicists in the 50's-70's, traders in the 80's/90's, net economy in the 10's) and live through self corruption because they place themselves above law and morality.

It's basic, easy to deal with, and realistic enough.
 

GNVE

Active Member
Jul 20, 2018
723
1,182
Well, this is answered by your story setting.
It's it, and more precisely the period you decide to put your story in, that should decide what data you look at, because there's a question you haven't take into account: The birthrate is mostly declining through the years.
Therefore, not only lifespan was shorter in the 50's (to keep your example), but birthrate was also way higher, what imply a bigger rate of students in regard of the whole population.
Yeah I'm going for a nondescript nowish... I felt by smearing out the data over 50 years or eventually 120 years gave a rate that more or less eliminated influences of small and large changes in the demographics.
To be fully realistic, you should also take into account the kind of town. A town like New York, by example, is mostly filled by people having desk job, they'll live longer and make less children. A town like Detroit is more on the opposite side, with people having mostly manual job, and a shorter lifespan due to the induced drudgery of the job, while tending to make more children.
Very true. The kind of town is indeed important but in the game you transform the town from a sleepy conservative village well past its prime into a bustling college town with a bustling tourism industry. So those dynamics would change over time. Modelling that did not really appeal and would go above my abilities probably.
Once again, to be actually realistic the job should also enter into account. You've more times to hang out when you've a desk job, than when you're doing a manual job that leave you tired at the end of the day. And the more you hang out, the more you're exposed to new experiences that can possibly corrupt you.
I have thought about adding in job level to the corruption (somewhere else in the code I use a salary level which could more or less equate to that) but I was afraid that bucket sizes would become to small. (e.g. 1 high income earner with high corruption).
I'm also less clear that corruption is equated to job level. I can see an accountant being more conservative than an actor while having enjoyed the same level of income and either could earn a lot more than the other depending on circumstances.
Plus let's be honest the bloat in code would be even bigger than the current spaghetti I wrote to make it work. :ROFLMAO: So it was a conscious decision to leave it out.
For your own businesses you will have to deal with the corruption of the job. If you decide to ask the massage therapists to provide happy endings they will require a higher level of corruption for instance. (Though a bartender might need a slightly higher corruption than a convenience worker as well).
So, in short, you should forget about actual statistics and simply make up your own ones:

20% are under the age to work, 20% are already retired, 60% are working.
10% are below 10yo, 10% teenagers. 10% are between 60yo and 70yo, 10% are over 70yo. And for the other 10 years slices, it's 15% each.
40% of the working class have an average adult corruption factor, 50% have a higher corruption factor, and 10% a really high corruption factor ; there's always a category that is THE elite of their time (publicists in the 50's-70's, traders in the 80's/90's, net economy in the 10's) and live through self corruption because they place themselves above law and morality.

It's basic, easy to deal with, and realistic enough.
Overall thank you for the good points you make and for thinking with me :)
Making up statistics may well happen btw if balance is lacking (I make up enough shit already) but I had no idea what would be ballpark so that was the reason to go the extra mile and just see how many people are in those age brackets. The idea I wrote above evolved while looking at the data.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,586
15,597
I'm also less clear that corruption is equated to job level. I can see an accountant being more conservative than an actor while having enjoyed the same level of income and either could earn a lot more than the other depending on circumstances.
Plus let's be honest the bloat in code would be even bigger than the current spaghetti I wrote to make it work. :ROFLMAO: So it was a conscious decision to leave it out.
For the code I can give you a solution, just use factorization.
Something like:
Python:
corruptionFactor = 1
if 10 < age <= 20:
   corruptionFactor *= 2
elif age <= 40:
   corruptionFactor *= 1.5
elif age >= 60:
   corruptionFactor = 0 - corruptionFactor # hop, here you negate the value and will decrease the corruption.

if jobLevel == 0: # unemployed
   corruptionFactor *= 1.2
elif jobLevel == 1: # heavy manual
   corruptionFactor *= 0.8
[...]

corruption += corruptiveValue * corruptionFactor
Values and range being for the demonstration.

That way, you get something relatively accurate without having to effectively take count of the different factor at "actor" (MC, Characters but also NPC population) level. And it will evolve automatically in the same time that the said "actor".

Ideally for the kind of game you want to make, there should be two entities (possibly grouped in a class, but that's secondary).
On one side you've the data representing the actors, and on the other you've the computation processing those data.

And like there's a big amount of actors, there should be two kind of data for them:
Named actors (MC, characters, possibly some major NPCs) that represent one person only. And unnamed actors, that have one more data, "number", and that represent all the persons following a same profile.
So, something more or less like:
Python:
Children = Actors( [...], 100 )  # 100 actors between 0yo and 10yo
HardWorker = Actors( [...], 30 ) # 30 actors between 20yo and 60yo doing a hard manual job
[...]
Each category that share the same profile having being grouped, it make the computation a bit easier, because globally their corruption will evolve in parallel. Then you just have to decide (at the end of each year by example), how many children are born, how many became became teenager, and change the number of children accordingly.

Of course, a 1yo child will not be as corrupted as a 9 year and 11 months one, but he will benefit from the corruption of all the children that came before him.
Take the US teenagers in the 50's. They started to listen to rock'n'roll, what opened the gate to them following the Hippie movement in the 60's/70's, then them just doing drugs in the 80's, and so on. Babies born in the 70's were by definition more corrupted than those born in the 40's, because of the changes that happened in the society.
And this can be represented by those generic "unnamed actors". Their corruption evolve globally and aren't subject to the change in population.
 

GNVE

Active Member
Jul 20, 2018
723
1,182
For the code I can give you a solution, just use factorization.
Something like:
Python:
corruptionFactor = 1
if 10 < age <= 20:
   corruptionFactor *= 2
elif age <= 40:
   corruptionFactor *= 1.5
elif age >= 60:
   corruptionFactor = 0 - corruptionFactor # hop, here you negate the value and will decrease the corruption.

if jobLevel == 0: # unemployed
   corruptionFactor *= 1.2
elif jobLevel == 1: # heavy manual
   corruptionFactor *= 0.8
[...]

corruption += corruptiveValue * corruptionFactor
Values and range being for the demonstration.

That way, you get something relatively accurate without having to effectively take count of the different factor at "actor" (MC, Characters but also NPC population) level. And it will evolve automatically in the same time that the said "actor".

Ideally for the kind of game you want to make, there should be two entities (possibly grouped in a class, but that's secondary).
On one side you've the data representing the actors, and on the other you've the computation processing those data.

And like there's a big amount of actors, there should be two kind of data for them:
Named actors (MC, characters, possibly some major NPCs) that represent one person only. And unnamed actors, that have one more data, "number", and that represent all the persons following a same profile.
So, something more or less like:
Python:
Children = Actors( [...], 100 )  # 100 actors between 0yo and 10yo
HardWorker = Actors( [...], 30 ) # 30 actors between 20yo and 60yo doing a hard manual job
[...]
Each category that share the same profile having being grouped, it make the computation a bit easier, because globally their corruption will evolve in parallel. Then you just have to decide (at the end of each year by example), how many children are born, how many became became teenager, and change the number of children accordingly.

Of course, a 1yo child will not be as corrupted as a 9 year and 11 months one, but he will benefit from the corruption of all the children that came before him.
Take the US teenagers in the 50's. They started to listen to rock'n'roll, what opened the gate to them following the Hippie movement in the 60's/70's, then them just doing drugs in the 80's, and so on. Babies born in the 70's were by definition more corrupted than those born in the 40's, because of the changes that happened in the society.
And this can be represented by those generic "unnamed actors". Their corruption evolve globally and aren't subject to the change in population.
Going to play around with this a little. See how it works etc. Thanks! (It helps me to understand it better if I use it in a python console with some data etc. Just my learning process.)
 
  • Like
Reactions: anne O'nymous

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,586
15,597
Going to play around with this a little. See how it works etc. Thanks! (It helps me to understand it better if I use it in a python console with some data etc. Just my learning process.)
It's how it should be done anyway.

A trial and error approach is the best way to learn, because it validate your knowledge. You pass from a theoretical information to a practical one that you'll remember better.
Another way is to use an endless menu:
Python:
label myTry:
    #  endless loop
    while True
        menu:
            "hypothesis 1":
                 [whatever you want]
            "hypothesis 2":
                 [whatever you want]
            [...]
            "End the test"
                return
Add some text display, and you can easily go back and forth from one hypothesis to another, to compare the behavior or result.
 
  • Like
Reactions: GNVE

GNVE

Active Member
Jul 20, 2018
723
1,182
so hoping that this will help some dev sometime in the future I will post about issues I have had and solved.

Today's story: accidently deleting the wrong list.
so I wanted to optimize a bit of code in case it would become a problem at point. So I copied a dict like:
Python:
a = {'key':'value'}

def myfunc():
    temp = a
    
    #stuff happens
    
    temp.pop('key')
This is an issue since this does not actually copy the dict. Usually this is a good thing but in this case it means that if I delete or change an item from the temp dict I do the same in the original as well.

to solve this you need to do the following:
Python:
import copy

a = {'key':'value'}

def myfunc():
    temp = copy.deepcopy(a)
    
    #etc.
there is also a copy.copy but as a newby I think using copy.deepcopy is better as it duplicates the entire list with all nested items while copy.copy doesn't (feel free to look online what the exact difference is).