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

Allow use of variants when using add_trait effect #70086

Merged
merged 3 commits into from
Dec 9, 2023

Conversation

furran
Copy link
Contributor

@furran furran commented Dec 8, 2023

Summary

Features "Allow for a "variant" field when using the add_trait effect"

Purpose of change

Makes it so you can specify a variant if you are using u_add_trait or npc_add_trait effect.

Closes #70027

Describe the solution

  • "variant" is now an optional field for u_add_trait and npc_add_trait
  • if variant is invalid/doesn't exist, it is randomized. No errors are thrown
  • specifying a variant for a trait that doesn't have them just adds the trait normally

Describe alternatives you've considered

None

Testing

Used these jsons for testing: variants_test_eocs.json

  1. Added the jsons to data\json\effects_on_condition\mutation_eocs
  2. used debug menu to run all the eocs in variants_test_eocs.json

Expected/obtained results for each eoc:

  • test_add_purple_mohawk: character gains a purple mohawk
  • test_add_feline_ears: character gains feline ears
  • test_invalid_variant: character gains short hair, but the color is randomized

Additional context

@github-actions github-actions bot added NPC / Factions NPCs, AI, Speech, Factions, Ownership [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) <Enhancement / Feature> New features, or enhancements on existing json-styled JSON lint passed, label assigned by github actions labels Dec 8, 2023
@github-actions github-actions bot added astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Dec 8, 2023
@furran furran marked this pull request as ready for review December 8, 2023 20:21
@MNG-cataclysm MNG-cataclysm mentioned this pull request Dec 9, 2023
9 tasks
@Maleclypse Maleclypse merged commit e9463eb into CleverRaven:master Dec 9, 2023
39 checks passed
@furran furran deleted the allow_variants_eoc branch December 9, 2023 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` <Enhancement / Feature> New features, or enhancements on existing json-styled JSON lint passed, label assigned by github actions NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow u_add_trait to specify a variant
2 participants