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

Rabbit Mutation Category #48548

Merged
merged 28 commits into from
Sep 9, 2021
Merged

Conversation

FrozenTearCDDA
Copy link
Contributor

@FrozenTearCDDA FrozenTearCDDA commented Apr 16, 2021

Summary

Content "Rabbit Mutation Category"

Purpose of change

@souricelle encouraged me to bring these changes forth to the mainline, as I was working on a few new rabbit mutations and sprites for them as a separate mod. We both agree it's something that is missing and would fit the lore. I am aware of a popular mod that adds it, however it was never made part of the base game. If the authors of those, or the person maintaining wish to use their changes instead, I am more than open to that.

Describe the solution

In order to keep the mutations in the rabbit category fitting to the species, I have selected traits such as those that affected speed, appearance and size. The PR adds:
Rabbit ears with increased hearing and minor boost to appearance (-1 ugly)
Rabbit tail, as an evolution of the stubby tail. (Again -1 ugly)
Rabbit feet along with the inability to wear shoes, 10 encumbrance, but also working similarly to hooves, however with a smaller damage amount of 1.5 instead of 3.
Rabbit fur "bodytemp_modifiers": [ 750, 1500 ]
Lagomorph mutation to represent the rabbit threshold
And lastly the rabbit nose, so that we may use it as a prerequisite for the existing grazer mutation, along with incisor teeth, as rabbits are not ruminant as cattle, the only required one before.

A possible extra feature would be a jumping/hopping spell acquired once you have reached the threshold that costs stamina, if we have a teleport spell with a specific target. My first attempt was to select 2-3 spaces ahead of the character and spend 100 moves or so with the jump and teleport there. But it crashed the game.

Describe alternatives you've considered

As mentioned before, the changes from previously made mods could take over the ones I made. I also think some numbers might need balance, and I am very open to suggestions.

Testing

I have ran a test character through the science challenge start, added the new &existing traits in the rabbit line, with and without using mutagen and serum to ensure both ways worked. Died a few times due to overuse.
Killed a few rabbits to acquire the recipe components for the serum and crafted them.
Put the rabbit feet to the test and it seemed like a reasonable level of damage.

Additional context

Test subject before taking excessive amounts of rabbit mutagen:
B-2257

After enduring a nearly lethal dose of rabbit mutagen:
test02

(Please note the graphics for the new traits are still very much in an early stage. And I understand that is a subject for another area.)

Added rabbit serum and mutagen.
Added new rabbit mutations, included rabbit in fitting existing traits, and created the new category, along with threshold.
Added rabbit to a few traits that were missing
Because of course I forgot this detail.
@connorpmartin
Copy link
Contributor

You could add small / tiny / diminutive from the Mouse tree to represent smaller rabbit size.

Mouse mutants still get Crafty, so the mutation trees would still be distinct.

@Maleclypse Maleclypse self-requested a review April 16, 2021 15:56
@Maleclypse Maleclypse added 0.F String Freeze Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies [JSON] Changes (can be) made in JSON labels Apr 16, 2021
@Maleclypse
Copy link
Member

JSON validation test can be fixed by copying the text from a json file into https://dev.narc.ro/cataclysm/format.html hit lint button then if no error copy the results into your json file. if syntax error https://jsonlint.com/ will help fix syntax errors

"id": "RABBIT_ADAPTATION",
"name": { "str": "Lagomorph Adaptation" },
"description": "Your fur keeps you covered in winter, maintaining heat and allowing you to better tolerate cold temperatures.",
"bodytemp_modifiers": [ -500, 500 ],
Copy link
Contributor

@Salty-Panda Salty-Panda Apr 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It cools you down if you're overheating?
Why does it work differently than any other fur mutation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I think I got lost with that ability because it was first considered to be part of Aftershock, and I kept it as a way to model the custom rabbit fur sprite in the future. Maybe I should remove it for now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"bodytemp_modifiers": [ -500, 500 ],
"bodytemp_modifiers": [ 250, 500 ],

"attack_text_npc": "%1$s kicks %2$s with their large feet",
"chance": 15,
"strength_damage": { "damage_type": "bash", "amount": 1.5 }
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest adding some movement cost reduction, like in Insect Wings

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied the same structure as hooves, isn't the 15 chance of the attack to proc low enough as a cost already?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant mobility, long, jumpy legs should speed you up, although maybe with an additional penalty on rough terrain?

@@ -0,0 +1,851 @@
[
Copy link
Contributor

@Salty-Panda Salty-Panda Apr 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume you moved this file from json/recipes/chem/mutagens.json
Please move it back

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, I must have got confused when I added the serum and mutagen recipes. Thanks I'll fix it.

A file was in the wrong folder, fixed that. And also changed a few more traits.
@FrozenTearCDDA
Copy link
Contributor Author

FrozenTearCDDA commented Apr 16, 2021

@connorpmartin (sorry, I tried to reply to your comment but I have no button to do that as far as I could see.)

@souricelle and I discussed that maybe tiny and diminutive are best left for the mouse line, I've already borrowed a lot from rat/mouse as it is.

They are pretty large, changed the value 8 (same as rodent ears) to 9.
Hopefully it will be the appropriate format this time.
data/json/mutations/mutations.json Outdated Show resolved Hide resolved
data/json/mutations/mutation_category.json Outdated Show resolved Hide resolved
FrozenTearCDDA and others added 4 commits April 16, 2021 19:03
Co-authored-by: casswedson <58050969+casswedson@users.noreply.github.com>
Co-authored-by: casswedson <58050969+casswedson@users.noreply.github.com>
The change in description was to fit both feline and the rabbit category, as suggested by souricelle.
@PatrikLundell
Copy link
Contributor

Some monsters have a jump attack ability. It may or may not be useful to look at that to see if it's possible to allow a PC to use it to jump to a location. I don't know how the teleportation spell works in CDDA, but in general they tend not to care about obstacles in between the source and target location, while a jump ought to require an available jump path (and a determination of what such a path is: Jump ahead on flat ground is a given, jump over a hole should definitely be possible too [so a walkable path shouldn't be required], but what about jumping through an open window or over a single tile wide single Z level wall, or up/down to/from a roof?).

@Salty-Panda
Copy link
Contributor

Z-level travel would require some c++
Special jumping attacks probably the same
It would be nice to ease jumping over empty tiles via a rabbit mutation, but that's tiny bit of c++ too

With json only you could add some active mutations like "tiring very fast sprint" or maybe make mutation that gives you very short-range teleportation as a jump-like ability? Although you would have to add a custom spell to make the teleportation effect less magical.

@FrozenTearCDDA
Copy link
Contributor Author

Some monsters have a jump attack ability. It may or may not be useful to look at that to see if it's possible to allow a PC to use it to jump to a location. I don't know how the teleportation spell works in CDDA, but in general they tend not to care about obstacles in between the source and target location, while a jump ought to require an available jump path (and a determination of what such a path is: Jump ahead on flat ground is a given, jump over a hole should definitely be possible too [so a walkable path shouldn't be required], but what about jumping through an open window or over a single tile wide single Z level wall, or up/down to/from a roof?).

That was the issue I came into, the jumping ability transcended time and space across the rooms. Not sure if z-space is possible.

Z-level travel would require some c++
Special jumping attacks probably the same
It would be nice to ease jumping over empty tiles via a rabbit mutation, but that's tiny bit of c++ too

With json only you could add some active mutations like "tiring very fast sprint" or maybe make mutation that gives you very short-range teleportation as a jump-like ability? Although you would have to add a custom spell to make the teleportation effect less magical.

Sorry I missed this because I was looking at the discord discussions. We'll try to work on something like that.

Here is hoping this time.
@Mom-Bun
Copy link
Contributor

Mom-Bun commented Apr 17, 2021

This rules, and I love it, for completely unbiased reasons.

@Maleclypse
Copy link
Member

Looking at the test I think this category needs at least one more mutation to be able to hit post thresh. It's possible I'm misreading it and it's got too many mutations but I'd try adding one first and seeing if it closer to .2 or even passing the threshold test.

@connorpmartin
Copy link
Contributor

@FrozenTearCDDA Since rabbits are more small than tiny, you could add some diminutive-like threshold mutation which improves Small, and just have Small and that mutation (so no tiny/Diminutive).

"type": "mutation",
"id": "RABBIT_NOSE",
"name": { "str": "Rabbit Nose" },
"points": 2,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this cost points?

@actual-nh
Copy link
Contributor

actual-nh commented Apr 24, 2021

Looking at the test I think this category needs at least one more mutation to be able to hit post thresh. It's possible I'm misreading it and it's got too many mutations but I'd try adding one first and seeing if it closer to .2 or even passing the threshold test.

Well... the test didn't fail for RABBIT; it failed for LUPINE (see below). It appears that the problem is too many that overlap with LUPINE pre-threshold mutations - or are on the trees leading to/from LUPINE mutations, such as:

  • RABBIT_FUR (via LIGHTFUR, which can also go to LUPINE_FUR)
  • RABBIT_NOSE (via SNOUT, which can also become MUZZLE; also note INCISORS and BURROW)
  • ANIMALDISCORD2 (via ANIMALDISCORD)
  • PAWS_LITTLE (via NAILS, which can become CLAWS; also note BURROW)
  • ALBINO (via PALE)
  • GOODCARDIO2 (via GOODCARDIO)

There are currently no problems in terms of the number of ones overlapping with others than LUPINE.

(~[slow] ~[.])=> -------------------------------------------------------------------------------
(~[slow] ~[.])=> Having all pre-threshold mutations gives a sensible threshold breach chance
(~[slow] ~[.])=>       Given: The player has all pre-threshold mutations for LUPINE
(~[slow] ~[.])=>        Then: Threshold breach chance is between 0.2 and 0.4
(~[slow] ~[.])=> -------------------------------------------------------------------------------
(~[slow] ~[.])=> /home/runner/work/Cataclysm-DDA/Cataclysm-DDA/tests/mutation_test.cpp:223
(~[slow] ~[.])=> ...............................................................................
(~[slow] ~[.])=> 
(~[slow] ~[.])=> /home/runner/work/Cataclysm-DDA/Cataclysm-DDA/tests/mutation_test.cpp:225: FAILED:
(~[slow] ~[.])=>   CHECK( breach_chance >= BREACH_CHANCE_MIN )
(~[slow] ~[.])=> with expansion:
Error: (~[slow] ~[.])=>   0.19724f >= 0.2f
(~[slow] ~[.])=> with message:
(~[slow] ~[.])=>   MUTATIONS: SHOUT3 SNARL PAWS CLAWS LUPINE_FUR SMELLY MUZZLE ANIMALDISCORD
(~[slow] ~[.])=>   GOODCARDIO DEFORMED NIGHTVISION2 HEAVYSLEEPER2 LUPINE_EARS TAIL_FLUFFY PALE
(~[slow] ~[.])=>   FANGS STR_UP_3 GOURMAND PADDED_FEET 

The logic here is that the breach chance is determined by the ratio between the highest category and the total of all the categories. If a character has all the pre-threshold mutations for a category, it should be not only their highest category but be a significant proportion of total mutation strength. (It has an upper limit of 0.4 to encourage having overlaps - but not too much overlaps - between categories.)

"ugliness": -1,
"description": "Your stubby tail has become fuzzy and more round. It looks adorable, but doesn't seem to serve another purpose beyond that.",
"types": [ "TAIL" ],
"cancels": [ "TAIL_STUB" ],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should TAIL_RABBIT be added to those that TAIL_STUB can change into? It admittedly may make the LUPINE conflict worse.

@Maleclypse
Copy link
Member

Maleclypse commented Jul 5, 2021

  • ANIMALDISCORD2 (via ANIMALDISCORD)

Rabbit's shouldn't cause animal discord and should have animal empathy going with the pattern of predators getting discord and herbivores getting empathy mutations. That should also resolve the Lupine conflicts or help with it.

    "type": "mutation",
    "id": "ANIMALDISCORD2",
    "name": { "str": "Prey Animal" },
    "points": -3,
    "description": "Natural animals like dogs and wolves see you as prey, and are liable to attack you on sight.",
    "cancels": [ "ANIMALEMPATH" ],
    "prereqs": [ "ANIMALDISCORD" ],
    "category": [ "MOUSE", "RABBIT" ]
  },

Huh, ok I think the bigger issue is maybe if this is the direction it goes maybe Empath and Discord shouldn't cancel each other?

@Maleclypse Maleclypse self-assigned this Jul 5, 2021
data/json/items/comestibles/mutagen.json Outdated Show resolved Hide resolved
data/json/mutations/mutations.json Outdated Show resolved Hide resolved
Copy link
Member

@Maleclypse Maleclypse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should work now.

Copy link
Member

@Maleclypse Maleclypse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@actual-nh I'm thinking that what this PR needs is to add a Lupine only mutation? Am I reading that correctly?

@Maleclypse
Copy link
Member

Ok I added a Lupine only mutation and the test is now closer to passing. This means Lupine needs 1 more unique mutation but I can't think of anything. Any ideas?

Copy link
Member

@Maleclypse Maleclypse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok after some work on Lupine I think this can work now.

@actual-nh
Copy link
Contributor

Sorry for somewhat losing track of this one - I need to search more frequently for mentioned PRs!

@kevingranade kevingranade merged commit 8b8fe72 into CleverRaven:master Sep 9, 2021
Venera3 pushed a commit to Venera3/Cataclysm-DDA that referenced this pull request Sep 21, 2021
* Rabbit Mutagen pull request

Added rabbit serum and mutagen.

* Rabbits are here

Added new rabbit mutations, included rabbit in fitting existing traits, and created the new category, along with threshold.

* Added rabbit to a few traits that were missing

* Rabbit mutagen recipes

Because of course I forgot this detail.

* Minor change to mutagen items

* Fixes and linting

A file was in the wrong folder, fixed that. And also changed a few more traits.

* Rabbit ears visibility

They are pretty large, changed the value 8 (same as rodent ears) to 9.

* Linting again

Hopefully it will be the appropriate format this time.

* Update data/json/mutations/mutations.json

Co-authored-by: casswedson <58050969+casswedson@users.noreply.github.com>

* Update data/json/mutations/mutation_category.json

Co-authored-by: casswedson <58050969+casswedson@users.noreply.github.com>

* Added "RABBIT" to the Whiskers mutation

The change in description was to fit both feline and the rabbit category, as suggested by souricelle.

* Added little paws mutation

These will make burrow possible without claws, and help satisfy the uniqueness of the mutation line.

* Linting

Never forget to lint the json files.

* Fixing my first "pull from master" madness

I don't know how to explain this.

* Trying to fix rabbit category problems

* More fixes

Here is hoping this time.

* Apply suggestions from code review

Co-authored-by: casswedson <58050969+casswedson@users.noreply.github.com>
Co-authored-by: Maleclypse <54345792+Maleclypse@users.noreply.github.com>
Zlorthishen added a commit to Zlorthishen/Cataclysm-BN that referenced this pull request Jan 6, 2025
- CleverRaven/Cataclysm-DDA#48548
- CleverRaven/Cataclysm-DDA#52410
- CleverRaven/Cataclysm-DDA#51630

Co-Authored-By: Frozen Tear <15993955+frozentearcdda@users.noreply.github.com>
Co-Authored-By: KittyTac <52408044+kittytac@users.noreply.github.com>
Co-Authored-By: Maleclypse <54345792+maleclypse@users.noreply.github.com>
chaosvolt added a commit to cataclysmbnteam/Cataclysm-BN that referenced this pull request Feb 2, 2025
* initial commit

- CleverRaven/Cataclysm-DDA#48548
- CleverRaven/Cataclysm-DDA#52410
- CleverRaven/Cataclysm-DDA#51630

Co-Authored-By: Frozen Tear <15993955+frozentearcdda@users.noreply.github.com>
Co-Authored-By: KittyTac <52408044+kittytac@users.noreply.github.com>
Co-Authored-By: Maleclypse <54345792+maleclypse@users.noreply.github.com>

* style(autofix.ci): automated formatting

* graphics

Co-Authored-By: thhoney08 <55903475+thhoney08@users.noreply.github.com>

* more graphics

* update

* style(autofix.ci): automated formatting

* Update data/json/mutations/mutations.json

Co-authored-by: RobbieNeko <30732426+RobbieNeko@users.noreply.github.com>

* Update mutations.json

---------

Co-authored-by: Frozen Tear <15993955+frozentearcdda@users.noreply.github.com>
Co-authored-by: KittyTac <52408044+kittytac@users.noreply.github.com>
Co-authored-by: Maleclypse <54345792+maleclypse@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: thhoney08 <55903475+thhoney08@users.noreply.github.com>
Co-authored-by: Chaosvolt <chaosvolt@users.noreply.github.com>
Co-authored-by: RobbieNeko <30732426+RobbieNeko@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[JSON] Changes (can be) made in JSON Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants