Replies: 11 (Who?), Viewed: 12843 times.
Lab Assistant
Original Poster
#1 Old 22nd Sep 2014 at 6:08 AM
Default Story Progression - What can we do with a mod?
I've been doing some work on the Story Progression to clean up some game-ruining bugs (removal of sims and so on), but I thought it was a good time to start looking about making the Story Progression more sophisicated in general, enhancing it to allow unplayed Sims to establish relationships, get married, and have families.

I wanted to open up a pretty general discussion for the technical approach and overall things that the community would want from such a mod.I'd like to talk about what the Story Progression does currently, and where I would like to take it. I am open to any suggestions about features, or anyone who wants to lend help, especially with Python scripting.

Story Progression - How it Works

This is from my own reading of the code and may not be accurate. Please feel free to correct any of this knowledge. Information in italics are points that I am especially unsure of.

The StoryProgressionService consists of a list of Actions to be carried out, every 20 seconds spent playing the game. Although the Service runs every 20 seconds, it very often does not do anything, as certain actions are restricted to occuring only during certain times of the day.

The standard actions that the StoryProgressionService executes are as follows:

Pregnancy Progress
This action selects all living pregnant Sims, and updates the status of their pregnancy. This basically increments a hidden value based on how much Sim-time has past since the last update. If the hidden value reaches a certain threshold, then the Sim will give birth.
As far as I know, this story progression action is not responsible for managing pregnancy on sims that are currently being played.

Initial Population - Seems to run only once per world, shortly after moving in the first family
Seems to just create 5 homeless households. That's all.
There is some weird info in the XML about target population densities in certain zones, but I don't think the script actually uses these for this action.

Genealogy Pruning
This only runs between 2am and 6am on Thursday, game time.
This action basically crawls through the "family tree" of your active sims, creating a list of sims that are directly related to them, then sims that are directly related to those sims, and so on. If it gets to a sim that four or more "links" away, that Sim is deleted.
This is an absolutely terrible thing to do because it doesn't bother checking if the distant relative is marked playable or anything. As a result, it will often delete Sims that people care about. This is such a bad issue that I went ahead and created an experimental mod to disable this action as it seems to do no good whatsoever:
http://modthesims.info/showthread.php?t=535559
I suspect that this action was intended to delete dead sims, like great grandmothers and the like that you would never bring back, but it actually can delete living Sims as well. Furthermore, this operation won't do any good for dead Sims that don't have families. Those Sims would just linger forever.

Max Population
This action attempts to reduce the world's sim population down to 180. It will consider all unplayed households, and "score" them based on the sims living there. Sims are scored based on their relationships and when they last appeared in the games. Sims with a low score are the first to get culled, which means that this will delete Sims you don't care about.
Since the 180 population limit includes played households, neighborhoods with a lot of sims in played households have less space for unplayed households, so it is more likely that the action will delete sims you didn't want it to.

Populate Action
This only runs between 2am and 4am on Wedesday, game time.
This action appears to take households from the homeless bin, and put them into the neighborhood. It won't fill the neighborhoods above 60% and 80% occupancy, respectively. It appears to try to make an intelligent match by comparing the sims in the household with the number of beds in the house.
I don't know much about this, but it seems rather unimportant since it hardly matters where an unplayed household chooses to live.


What kind of issues do we NEED to fix?

First of all, the two actions that involve deleting Sims and households could use a lot of improvements. Genealogy Pruning is basically an unsalveagable mess, and I can't think of a good way to use it, so I will just leave it disabled in any Story Progression mod I make.

Max Population isn't horrible, but it is probably a little overzealous and removes too many unplayable sims when the number of played sims is high (players with a huge number of played sims can probably accept the performance hit from having more total population)

Neither of these deal with dead sims in played households which don't have a lot of relatives. Those sims will just linger forever. So, a new action to deal with those sims would just be peachy. I think it would be pretty reasonable to just look for dead sims that don't have any living children, parents, or siblings, and delete them if they have been dead for too long.


How can we make it better?

Story Progression is lacking compared to Sims 3. I would like to suggest the following actions be added to the service. It will definitely take Python scripting.

What I'm looking to do is to create and tune story progression actions that can do all of the following:
-Change the relationship status of sims to make acquaintances into enemies or into friends.
-Put sims that are friends into steady relationships.
-Have sims move in (or marry) if they have the right type of relationship.
-Have sims get pregnant or adopt kids.

These kind of actions can score sims for eligibility, so sims that have commitment issues would be unlikely to get married, sims that hate children would unlikely to be chosen as parents.
It would also be ideal for these actions to take into account neighborhood statistics. It probably isn't good if every single sim in the neighborhood gets married, and you don't want everyone having a baby at the same time either.

This is an area where I'm looking for a lot of input. The real challenge in this area is in designing actions that do interesting and sensible things in the neighborhood. I think that if we can work up a solid design on how the story service should manage sims, it won't be too hard to actually write the code.

Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
Advertisement
Inventor
#2 Old 22nd Sep 2014 at 3:51 PM
Thanks for all your ideas for making a better story progression system!

I just wanted to ask if you could also do something about the sims we meet in the streets and at public places. In my game these are randomly created townies from EA, I merely see my own created sims. Then the households in the "not in world" list change from 6 to 30 households all the time. It would be great if this number stays more constant. I guess they are involved in all this culling processes you mentioned.

Personally I would like to choose between options. I don't need the other sims to get married/pregnant because I play on a rotational basis.

You never know what’s comin’ for ya.
Lab Assistant
#3 Old 22nd Sep 2014 at 3:55 PM
Of what I've studied so far, and tested, is the ability to override a function within a class using the injection method provided here on modthesims. But I haven't seen the ADDITION of a service (function). Before I can think about what we can add, I would like to be clear on how it is to be added, or, how to add a function to a class. If I'm way behind the curve on this, my apologies.
Pettifogging Legalist!
retired moderator
#4 Old 22nd Sep 2014 at 6:30 PM Last edited by plasticbox : 22nd Sep 2014 at 6:52 PM.
Great post, thanks for writing it all up!

Quote:
Originally Posted by MasterDinadan
Initial Population - Seems to run only once per world, shortly after moving in the first family
Seems to just create 5 homeless households. That's all.
There is some weird info in the XML about target population densities in certain zones, but I don't think the script actually uses these for this action.

As I understand it, that info is for the Populate action, not for initial population? Anyhow, I agree the Populate stuff doesn't matter all that much .. particularly since it already has an option to turn it off.

Quote:
Originally Posted by MasterDinadan
Max Population isn't horrible, but it is probably a little overzealous and removes too many unplayable sims when the number of played sims is high (players with a huge number of played sims can probably accept the performance hit from having more total population)

Here you should also look at how it would work in conjunction with a possible No-Walkby-Spam mod. Right now I'd assume most people only have that many sims in game because there's no way to stop the game from spawning them -- this is much worse than in TS3 where you'd only have an occasional boss or colleague. Once this can be turned off, I'm not sure it'll even be necessary anymore to nuke living sims at all (since, as you say, those who willingly put 400 sims of their own in the game will have to live with a bit of a performance hit .. but they're probably going to prefer that over having half their sims nuked).

From what cinrict (I think) reported in one of the other threads, what the game currently appears to be doing would be extremely stupid: generate new walkbys all day just to delete them again at night. Removing both mechanisms appears to be the most straightforward option if this is really what happens.

Re. cleanup of dead sims, agree -- your plan sounds very reasonable. But I would actually like if this were tuneable/optional -- who knows if public graveyards aren't going to be an option later on, and for that I'd like to preserve a few dead randoms in my game. Just for realism.


Quote:
Originally Posted by MasterDinadan
I think it would be pretty reasonable to just look for dead sims that don't have any living children, parents, or siblings, and delete them if they have been dead for too long.


I'd suggest to take friendships into account as well, not only family relations. A dead grandfather's best friend may matter more than the same dead grandfather's ex wife.

Quote:
Originally Posted by MasterDinadan
Story Progression is lacking compared to Sims 3. [..]

What I'm looking to do is to create and tune story progression actions that can do all of the following:
-Change the relationship status of sims to make acquaintances into enemies or into friends.
-Put sims that are friends into steady relationships.
-Have sims move in (or marry) if they have the right type of relationship.
-Have sims get pregnant or adopt kids.


Here I disagree .. in my game, so-called "story progression" is working miles better than it ever did in TS3 (mods or no mods) -- mostly because it does NOT impose any pre-defined rules (like the above) on my game. For all I can tell, the sims' relationships change in conjunction with what happens in game (i.e. the sims have romances, friends, enemies .. resulting from actual interactions they did while inactive) -- it all appears to be very consistent; for me that's one thing that EA got right this time around.

I dunno, if you want to implement such a thing, more power to you =) but please make it optional? Or make it two separate mods? So that people who don't want that can still enjoy other goodies like dead-random cleanup etc.

One thing that could be very useful though, would be a quick way for *user-initiated* pregnancy on inactive sims (like "Pollinate" for TS3, that was an Awesomemod option if I'm not mistaken). Or perhaps an option along the lines of:

- for relationships that are not really steady, chance of random (oopsie) pregnancy X
- for couples that are steady or married and not living together, chance of random pregnancy X * 10
- for couples that are steady or married and living together, chance of random pregnancy X * 15

with multipliers for family aspirations and fertility trait (maybe also the romantic traits?), and "lessification" for HatesKids. Since this game also keeps statistics for all sims, perhaps also look at those for useful parameters?

I dunno what would make sense for X .. how are the age settings scaled, are they relative to each other or are they fixed numbers? (They shouldn't get pregnant "X times per year" when that would lead to every other sim having 15 kids just because you're on lifespan = long.)

I'm unsure how this would work in conjunction with same-sex-pregnancy mods -- I only read somewhere in passing that for those there was some issues with determining which sim should get impregnated. I believe it would be desireable to * wave hands * make it so that the pregnancy thing does not change default gender settings (i.e. leaves it at females only), but allows for other mods to change that if the user wants it so.

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Lab Assistant
Original Poster
#5 Old 22nd Sep 2014 at 7:12 PM
I'll surely provide different Flavors of whatever I come with. At minimum, there would be one for smarter culling overall, and a separate version of the mod for enhanced story features.

My plan is to have the story mode features only operate on unplayed households. People playing rotational games don't have to worry about any of their played households developing relationships or family changes they didn't want. It is also possible to toggle a household that is marked played and change it to unplayed. This means you could move one of your children out into the neighborhood, and mark them as unplayed to allow the story progression service to take over their lives, if you wish, or leave them marked played so that you keep control.

Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
Lab Assistant
Original Poster
#6 Old 22nd Sep 2014 at 7:24 PM
The pollinate action could do the following:

Based on neighborhood statistics, figure out how many babies are desired. Randomly increase or decrease this number (so the number of babies isn't completely predictable) and then have the action go through and make that many women pregnant.

I would basically take all of the sims in unplayed households that are eligible to become mothers (young adult and adult women) and score them on criteria like their traits, relationship status, how many kids they already have). Also, throw in a random adjustment so, again, it's not too predictable. The system would take the top X women by score and make them pregnant with the most eligible male partner (which will usually be a spouse or boyfriend, but it could be someone else esp. if the mother has commitment issues)

All of the various considerations can be taken into account into the scoring metric. This should address the concerns - the system only makes babies if the "census data" says there aren't enough babies, and it also makes sure that the same couples don't have babies every time (by considering number of children and by having a random component).

Again, the challenge is in figuring out just how to tune the weights on the various criteria!

Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
Instructor
#7 Old 24th Sep 2014 at 1:31 AM
The default system in the game probably forces a lot of people who can't/don't do rotational play into leaving ageing off. Otherwise the game populates the world with odd looking townies and unplayed sim families have no legacies. Especially if a player has downloaded sims from the gallery and placed them into multiple lots. These unplayed sim families die and are replaced by default odd looking townies. The player has only three choices:
1) continue to download sims from the gallery, placing them in sim homes to replace newly emptied homes
2) play cupid and make every couple on every lot "try for baby" (nobody got time for that)
3) leave ageing off

The random stream of sims walking by the played house is really odd/frustrating/janky. Dunno if this is part of story progression. Is it really random? So many sims that walk by over and over, the same sims even. I guess it's a way to emulate the TS3 sims' schedules and traveling with tricks. Instead of being physical decor like the cars, the sims that walk by have decor schedules, walking to some pretend place. The story progression would be better if sims that walked by actually lived in one of the houses in that neighborhood. Or even just a decrease in the rate that sims walk by.
Pettifogging Legalist!
retired moderator
#8 Old 24th Sep 2014 at 2:19 AM
For (or rather, against) the towniespam, Shimrod has uloaded a new mod today that works very well for me so far. It's in the same thread as the old one, as "version 2" but it's technically not really a version, it's a different approach.

That is a different topic though, it's not part of story progression. Going by the tuning files involved, at least.

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Lab Assistant
#9 Old 24th Sep 2014 at 2:12 PM
A proper story progression would be a great addition to The Sims 4. It's the one thing I really miss from TS3. In this game it's rather easy to give families children through Manage Households to keep selected families going, but it's a shame that the inactive Sims won't at least do basic things like get jobs or find partners on their own. Sims being able to at least get jobs would be a very desirable outcome, as many Sims in the game are generated without a job and so they constantly visit you if you're friends with them. If they at least had jobs, it would stop them from knocking on the player's door 5 times a day.

In TS3, my favourite story progression was a tweaked XML of the standard SP with increased chances of Sims romancing and finding jobs working in conjunction with Buzzler's Birth Control Mirror (which would assist the story progression by using a set of parameters like you described to pollinate couples every night at 1am). One thing about this mod is that it allowed you to configure the parameters; you could determine the bias between pollinating married Sims over unmarried Sims, set how much relationship value was required to make a couple more likely to try for a baby, make it pollinate based on how many Sims of a specific age group and gender were in the town and so on.

I know these features were also with NRAAS story progression, but I mainly play legacy type games with one family at a time, so I never really needed the inactive Sims to do a whole lot or go into a huge amount of detail about their lives -- I just liked to see them hook up and continue their bloodlines as it made the town feel more alive. I always felt that NRAAS used up far too much processor power just to go into needless detail that I would never care about, as those Sims were only background dressing for me. Given how TS4 is set up, keeping it simple in such a way would probably avoid bogging the game down too much,
Pettifogging Legalist!
retired moderator
#10 Old 24th Sep 2014 at 4:07 PM
Can you tell how feasible it would be to make this kind of mod configurable via a plaintext options.ini kind of thing? There are so many parameters involved that I'm starting to think that even when it is a moderate amount of extra work, it might be more efficient in the end than having to support umpteen different "flavors".

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Lab Assistant
#11 Old 24th Sep 2014 at 7:32 PM
Quote:
Originally Posted by plasticbox
Can you tell how feasible it would be to make this kind of mod configurable via a plaintext options.ini kind of thing? There are so many parameters involved that I'm starting to think that even when it is a moderate amount of extra work, it might be more efficient in the end than having to support umpteen different "flavors".


With a python mod, it should be possible to make it read a custom XML tuning file.

Which then could either be supplied as a separate package, or else be put in the unpackedmod directory to allow for easy editing.
Test Subject
#12 Old 19th Mar 2015 at 4:16 AM
Quote:
Originally Posted by Dark Gaia

In TS3, my favourite story progression was a tweaked XML of the standard SP with increased chances of Sims romancing and finding jobs working in conjunction with Buzzler's Birth Control Mirror (which would assist the story progression by using a set of parameters like you described to pollinate couples every night at 1am). One thing about this mod is that it allowed you to configure the parameters; you could determine the bias between pollinating married Sims over unmarried Sims, set how much relationship value was required to make a couple more likely to try for a baby, make it pollinate based on how many Sims of a specific age group and gender were in the town and so on.


One big thing that story progression on TS4 is lacking is finding jobs and trying to get promoted, obviously you don't want everybody to have jobs, because of some traits actually makes sense that some of them do not get jobs, maybe there can be some type off point system to decide which career they select based on their traits and the requisites for the job, hours and payment for each career (that way it can be future proof) , and some of them try to get to the top in their jobs.

sorry my english is not that good.
Back to top