Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds mutation category based dreams when sleeping #2372

Merged
merged 3 commits into from Aug 12, 2013

Conversation

Projects
None yet
7 participants
@Tamunshin
Copy link
Contributor

commented Aug 10, 2013

The player will now get strange dreams during sleep when heavily mutated. The dreams will vary based upon the player's strongest category and the strength. More highly mutated players will get more intense dreams. The frequency of the dreams will also change based upon the strength of the category, a lightly mutated player may only get one dream every couple of nights, while a heavily mutated one may get several per night.

This also gives the player a way of determining the category they're leaning towards.

I've added a function to return the player's strongest mutation category, and another that gives the strength of a given category.

I've also added in two possible dreams for every level of every category, but that can be easily expanded.

I'll admit that I'm not the most creative person, so the dreams I've added aren't overly interesting or diverse, but they provide an adequate starting point.

Some of this stuff was new ground for me so I'm also quite open to suggestions on it.

@CataJenkins

This comment has been minimized.

Copy link

commented Aug 10, 2013

Build successful!
Refer to this link for build results: http://ci.narc.ro/job/Cataclysm-PullRequests/268/

@OzoneH3

This comment has been minimized.

Copy link
Member

commented Aug 10, 2013

Very nice idea.

Strings from category_dreams() should really be moved to a json file though.
That way it would be easier for anyone to add dreams without a recompile.

@Tamunshin

This comment has been minimized.

Copy link
Contributor Author

commented Aug 10, 2013

That's a good idea. It's a bit outside my current knowledge but I'll give it a go and see where I get.

@Zireael07

This comment has been minimized.

Copy link
Contributor

commented Aug 10, 2013

This is an awesome idea!

@Stone94

This comment has been minimized.

Copy link

commented Aug 10, 2013

ou lala, hehe, ill poke around with this too, and see what scary things i can come up with, horror is one of my talents xD

@KA101

This comment has been minimized.

Copy link
Contributor

commented Aug 11, 2013

Perfect. I was thinking we needed something like this. Will look into dream-text support.

Update: looked at the text; seems OK (though I'm not sure I understand how many points of category strength per mutation). Not sure if these ought to have morale effects, given that the dreams are stared as being peaceful/lifelike/terrifying.

@Tamunshin

This comment has been minimized.

Copy link
Contributor Author

commented Aug 11, 2013

Category strength increases by 8 per mutation in that category and is sometimes decreased by 1 when you gain a mutation in a different category. The levels for low/medium/high strength might need to be fiddled with to get them perfect, but as it is even the categories with the fewest mutations can reach the maximum strength dreams.

Regarding morale effects, I'd been thinking about those as well. Presumably we could easily add a morale effect based upon the strength of the dream, but we'd need to balance it carefully. If the morale effect is too short lived it will expire before even waking up, but if it's too long or too strong then getting multiple dreams each night could cause a large negative morale modifier, making you unable to read or craft until it wears off.

@Tamunshin

This comment has been minimized.

Copy link
Contributor Author

commented Aug 11, 2013

I've put the dreams in a JSON now. I've never even touched JSON stuff before so I can't speak to efficiency, but it appears to work as it did before.

If anyone can spot problems or ways to improve it I'm open to suggestions.

@CataJenkins

This comment has been minimized.

Copy link

commented Aug 11, 2013

Build successful!
Refer to this link for build results: http://ci.narc.ro/job/Cataclysm-PullRequests/283/

@OzoneH3

This comment has been minimized.

Copy link
Member

commented Aug 11, 2013

Good work, working as expected.

Only one more thing :P

You could add multiple dreams in one category like this:

{
"message" : ["You have a strange dream about lizards.",
"Your dreams give you a strange scaly feeling."],
"category" : "MUTCAT_LIZARD",
"strength" : 1
},

To read an array take a look at Item_factory::flags_from_json(

This would remove some redundant category entries.

@KA101

This comment has been minimized.

Copy link
Contributor

commented Aug 11, 2013

Agreed that morale effects might need tweaking...but 1) it's common to not really remember one's dreams on waking, 2) who's to say that the dreams are uniformly unpleasant? I'd suggest that someone reaching category 3 (7 mutations) might well come to terms with their new body.

(Obviously, this would be a candidate for the likes/dislikes system.)

@Tamunshin

This comment has been minimized.

Copy link
Contributor Author

commented Aug 12, 2013

Made the messages an array in the JSON.

Regarding not remembering one's dreams upon waking. My general interpretation with these dreams is that they are remembered by the player and are significant enough to be mentioned. That's partly why there's a random element involved with them.

You're correct that there's no rule saying the dreams must be unpleasant, the ones that I've added now seem to lean towards the bad side, but they're more of a starting point than a template.

@CataJenkins

This comment has been minimized.

Copy link

commented Aug 12, 2013

Build successful!
Refer to this link for build results: http://ci.narc.ro/job/Cataclysm-PullRequests/290/

@kevingranade kevingranade merged commit cb38b09 into CleverRaven:master Aug 12, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.