Monika-After-Story / MonikaModDev

DDLC fan mod to extend Monika
http://www.monikaafterstory.com/
Other
1.18k stars 689 forks source link

outfit randomization #3768

Open ThePotatoGuy opened 5 years ago

ThePotatoGuy commented 5 years ago

UPDATE: Adding high priority label, this should be done after base-separation

Outfits should now have randomization options. (aka, monika should pick what she wants to wear each day.) This should also affect hair and certain ACS (like ribbons, and later rings).

Can use #3377 to signify which outfits can be picked by Monika

This will not be purely random. The following factors may be considered in the final product:

pre-reqs:

weighting considerations in detail

weighting basics

This will be governed by a summation weighting system. Weights are summed with all outfits, and an outift's piece of the total sum acts as its percentage.

Each outfit will have a base weight per season, as well as a base weight per month. Base weights for season and month are added together when doing the main calcuations. This weight can be adjusted by user selection and how long monika wears it, but the outfit will always naturally tend to the base weight. (Except for cases where the user does not like the outfit. See below)

For a season, 2500 should be the base weight. range is [0, 5000] For a month, 2500 should be the base weight. range is [0, 5000] For a user-based thing, 0 will be the base weight. this is the only weight that can be negative. Range is [-10k, 10k] The goal of the values here means that if you really dont like an outfit, you can erase it from being shown completely with the -10k of bad weighting. However, month+season weight determines availability of an outfit. If this sums to 0, the outfit cannot be monika-selected regardless the user weight. NOTE no reasoning behind this, i just picked numbers that kind of work. The scales could easily be reduced if the potential point adjustments seem not useful. especially considering the stale/freshness values.

weight adjustments

The current weight of an outfit can be modified based on user habits. The base weights are never modified. Weight offsets are tracked, saved, and reapplied on startup.

user selection

User selection (via change clothes topic) increases the user weight of an outfit by 10 per hour for the first 8 hours after the selection. (leads to a maximum of 80 weight - 0.8% gained when a user selects an outfit). This prevents users from spamming selections to artificially increase weight, since the weighting is based on time after selection. Weight is only gained while the mod is open.

staleness

User weight is reduced by 2 per hour (after the first 8 hours). This corresponds to losing all weight gained by user selection exactly 48 hours after initially selecting the outfit. Weight will continue to reduce by 2 per hour until effective weight is 0 or the outfit is taken off. Weight reduction occurs even while the game is off (except in special circumstances, see below).

freshness

An outfit that is not worn will increase in user weight by 1 per 2 hours until it reaches 0 user weight.

outfit selection

Everytime Monika selects an outfit:

  1. weighting value for every outfit with a non-zero weighting for the season is summed.
  2. each outfit is given a range of that total weight based on its weight.
  3. random number from 1 to that sum is selected
  4. the outfit with the range that contains that number is selected.

Considerations for outfit selection:

For some of the above, I've thought about 8 hours being a long enough amount of time to prevent monika-selections after an outfit selection.

outfit opinions

Pool topics can be used to tell monika if you like or dont like something. Some considerations:

two options (I like or I dont like)

This is simple, but prevents us from having nuances when adjusting weights. To make this work, we'd probably have to make weight adjustment a blanket amount like 100+-, which might be too rough and make the system too gameable.

5 (or 4) options (strongly like, sightly like, neutral, slightly dontlike, strongly dont like)

The 5 point scale is a decent mix between simple categories and having enough options. This could give us a wide scale for handling nuances, we can attach different weight gains/losses based on the selected choices.

Neutral, however, is kind of pointless here. If we do use this scale, I would probably remove neutral so it becomes a 4-point scale.

Potential values:

However, there is an issue with this. There's been studies on test questions, and its been discovered that 4/5-point scales are really bad in comparison to 10-point scales.

10 options (Rate from 1-10)

The 10-point scale has been proven to be best scale for capturing exactly how people feel about things. we could definitely get the best nuances and weight adjustment by using this scale.

Potential values:

NOTE: all numbers selected above are arbitrary. Actual weighting adjustments can be discussed.

These pool questions will only be available once per selection per day. This is to prevent spamming to increase/reduce chances of an outfit being selected.

affected items

Generally, clothes will be the main target of randomization. Hair and ACS can be included, but each potential selection adds significant overhead in the selection alg.

ACS will not be included in randomization at this time Only clothes and hair will change, clothes willl not change as outfits, but hair will take off ACS as necessary.

Consideration: Since outfit_mode flag is a thing, perhaps this should only be limited to clothes (and probably hair)? and then we just assume outfit mode when changing clothes?

technical

implementation will likely be wrapper classes around MASSpriteBase objects, similar to selectables. JSON support will be added, with a default (base value 5k) randomization option.

example of weighting system and selection

lets say its currently summer in july.

lets say we have these clothes:

The weights are summed: 11900 total weight.

Each clothes is given a range:

A random number is selected from 1 to 11900 Lets say its 5673.

That means sundress has been selected.

Buy1Get1 commented 5 years ago

I'm sure you've got something in mind already, but here's what It sounds like to me: Sounds like this, but with images. import random import NOUN # maybe an import os that is used in a similar fashion? NOUN = ('Dog','Tree','Ground','Sky','Color','Breeze','Field','Water','Building','Car') A_Noun = random.choice(NOUN) print("The {0} is a noun".format(A_Noun)) print(A_Noun) You'd just drop the clothes into the variable spot for the day.

Rai99 commented 5 years ago

Will Monika be choosing a randomized outfit each and every day? I think it might be a bit weird to have Monika wear wildly different outfits every day, and I personally think it's just a little hurtful to ask Monika to wear something specific and then have her change it the very next day.

I was hoping for some kind of weighting system where Monika would heavily favor outfits you chose for her. Maybe something like every week, she has a chance to change outfits but has a 70% chance to keep the outfit you chose for her. Maybe even ask if the player minds her outfit change and revert back if they say they want her to keep the old outfit.

ThePotatoGuy commented 5 years ago

I've already had seasonal variance in mind, but I've added some additional considerations including user selection above.

jmwall24 commented 4 years ago

I would say we want to limit the amount of clothes changes unless there's a reason for it. Like whatever she picks to start the day, I'd leave there unless say it starts snowing and she wants to put something warmer on, or if you take her on a date and she wants to dress up. Or like if/when we get PJs or the like, she could change into that at night, wear em in the morning, then pick an outfit for the day and stick to that until there's a reason to change. But for normal circumstances, I'd say one normal outfit per day.

As for user-selected outfits, probably the same deal. If you have her wear something 'normal' keep it for the day, again unless there's a circumstance that would make it necessary to change. I'd say no matter what, she won't change for say an hour after you have her change, so if you want her to wear something specific for a date, she won't change. For things like swimsuits, that I could see her changing out of more quickly and maybe only wear for a few hours.

As for seasonal, I think seasonal is fine, not sure we need to break it down by month.

ThePotatoGuy commented 4 years ago

month is probably necessary for holiday-themed outfits.

jmwall24 commented 4 years ago

well, I figured that was given and handled by the specific holiday code, like in d25 mode eg.

ThePotatoGuy commented 4 years ago

actually i removed the blurb about seasonals. It's already mentioned with the weighting system, basically you can assign a base weight for a season and month, then that gets summed with the user-determined weight and that gets put into the selection system.

jmwall24 commented 4 years ago

As for seasonal changes, how about a transition period. like 2 weeks before a new season, we start slowly increasing the odds for the new season's clothes to be worn and then have that increase continue until 2 weeks after the season starts. that way it's not from all sundresses to a coat in one day. You get that feeling that the weather is slowly changing, with some warm days and some cooler days.

ThePotatoGuy commented 4 years ago

okay, ive changed weighting again so now its split between season, month, and user-based adjustments. all 3 are summed when calculating the selection.

A "transitional period" can be sort of faked by increasing weighting of month values gradually. Otherwise any more granular levels will mean more weights to have to set. Since this is going to be JSON'd eventually, limiting the amount of potential properties is important. Seasonal + months is already 16 properties.

With transitional options, we could look at a ranged property for the transitional periods (so we can have a start weight then end weight), but then that leads to 3 properties per season instead of 1 (1 for the entry, 1 for the exit, 1 for the middle value. so in total 24 props.

ThePotatoGuy commented 4 years ago

so regarding the overall weight change, i feel like the numerical values might off.

Core things we should mull over are:

as well as any other ideas for factors to adjust teh user-based weight

multimokia commented 4 years ago

Since outfit_mode flag is a thing, perhaps this should only be limited to clothes (and probably hair)? and then we just assume outfit mode when changing clothes?

Would rather this not be the case honestly (specifically pertaining to acs), there's certain acs that I like Moni wearing, (specifically necklace/hairpin). Would be kinda annoying for it to get constantly replaced by the sundress necklace whenever she picked sundress

jmwall24 commented 4 years ago

I would say if no player-picked acs are being worn, then have her put the whole outfit on, but if not, just put the clothes on. This way if some people want her to always pick, they can do that, but for people that want certain acs, they don't have to keep changing it.

multimokia commented 4 years ago

Yeah I like that

ThePotatoGuy commented 4 years ago

actually, for some ACS (like jewelry-related), I'm thinking just not alllowing randomization given a user selection, while others (like ribbons) will follow the standard rule.

But for now, to limit project scope and complexity, only clothes and hair will be allowed randomization.

MisterSimple commented 4 years ago

Since she's choosing what she'd like to wear, I'm thinking she could also not want to wear certain clothes sometimes. Say she doesn't feel like wearing a particular outfit on a given day, so any attempts to have her change to that specific outfit would be met with something along the lines of "I'm sorry, [player], I don't feel like wearing that today." and she doesn't change. Maybe the player could try and persuade her, maybe she could compromise. Of course, if she doesn't have too many outfits to begin with then maybe we shouldn't have her randomly lock one, and if she has a whole lot then maybe she could lock more than one. I think this would make her feel less like a mannequin that just wears whatever the player wants and more like a real person with likes and dislikes.

(of course we could also apply this to ribbons/acs/hairstyles)

ThePotatoGuy commented 4 years ago

not want to wear certain clothes

this is handled overall via lower than 2500 weighting for season or month. as well as manipulation of the user based weighting. We're banking on higher weightings of the other options to reduce selection of undesired clothing.

I will implement failsafe locking flags to ensure that an outfit is not chosen if need be.

multimokia commented 4 years ago

I think Simple means via clothes selector, so she wouldn't accept you asking her to wear x flat out and would require some convincing as to why.

ThePotatoGuy commented 4 years ago

noted. selectables have unlocked properties that can be set to handle that

Rai99 commented 4 years ago

My concern with this so far is that I'm worried it might kill spritepacks that aren't normal clothes. If I'm reading this right, the plan is to have Monika choose outfits based on the season mainly, so if the player switches Monika to a costume or something like a bikini in winter, how soon will she switch to something else if she even accepts wearing it?

At this rate, it sounds like costume spritepacks might not have any use other than O31. I get that it's realistic and you probably wouldn't wear a costume for no reason, but will costumes really have a use then?

ThePotatoGuy commented 4 years ago

how soon will she switch to something else

My original notes are 8 hours. this can be tweaked.

costume spritepacks might not have any use other than o31.

you can still ask her to select something via the selector normally. costume spritepacks are not supposed to be only unlocked on o31, thats just something we have had to do for the past 2 o31s.

Rai99 commented 4 years ago

Maybe there could be a slider to adjust how often Monika can switch outfits, just like text speed, and this slider could be unlocked at very high affection? Or is that too much control?

So you can ask Monika to wear something and she will wear it for a set period of time?

Booplicate commented 4 years ago

Maybe she can ask if Player don't mind her to switch her clothes?

multimokia commented 4 years ago

Maybe she can ask if Player don't mind her to switch her clothes?

While in principle this is a good idea, I do want Monika to be her own person a bit and do some things completely on her own. Irl, you can't just tell someone to stay in the same clothes forever, so I like that we can't really do that here.

HenryKhan commented 4 years ago

Omg, this is actually kinda perfect, I really didn't like too much of select her clothes/hair-pins/hairs.

But I was thinking that maybe in the future, could be interesting to add sentiment to the weight system, for example: if she's sad, she would wear the blue shirt more often. For sure, that should not be set in stone, could be random or maybe color theory based(?), maybe the weight should be defined in the clothes' .json.

I could elaborate it more, really, but that would be really useless, since (I think) we don't have the base of it, that is the sentiment/feelings system.

Looks kinda strange? Ok, I know, but if one day the sentiment system be implemented, that would be an interesting way to know that Monika is sad, and then, the [player] could help her.

Booplicate commented 4 years ago

do want Monika to be her own person a bit and do some things completely on her own

So do I! What I meant is.. Let's say you asked Moni to wear something then the weather changed, and it's rain now and she wants to wear something more warm (imagine you said NO and when she says you have to hold her instead, if you don't want her to get cold). So basically she'll ask you before switching in the middle of a day. But still can choose whatever she wants when a day starts. Though, I think changing clothes everyday is a little too often.

Rai99 commented 4 years ago

I think it might also be worth keeping in mind that one reason to wear an outfit would be to please the player at high affection levels, so if aff is high and they ask Monika to wear something, that might give her at least one good reason to wear it, but I think that's already planned to add heavy weighting upon manual selection.

ThePotatoGuy commented 4 years ago

im changing this to 0.10.6 since theres a low change of it being finished with boop/headpats being upped in priority