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.