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

Weapon subcategories and maybe category filters #53297

Closed
catdach opened this issue Dec 8, 2021 · 6 comments
Closed

Weapon subcategories and maybe category filters #53297

catdach opened this issue Dec 8, 2021 · 6 comments
Labels
<Enhancement / Feature> New features, or enhancements on existing Items / Item Actions / Item Qualities Items and how they work and interact Martial Arts Arts, Techniques, weapons and anything touching martial arts.

Comments

@catdach
Copy link
Contributor

catdach commented Dec 8, 2021

Is your feature request related to a problem? Please describe.

I've been really impressed by the work being done on implementing weapon categories via #51867. Additional cross compatibility for mods is great. However, one problem is that some martial arts are slightly more restrictive than is accommodated for by the sometimes too broad weapon categories. For example the martial art style_mma_desert_wind from the Mythical Martial Arts mod restricts weapons to maces, scimitars, and spears (and the wooden sword for some reason). Scimitars have weapon category of medium swords, which includes many more weapons than is intended for that art style. So currently, all variants of the scimitar have to be explicitly stated within martial art weapons list
"weapons: [ ..."scimitar", "scimitar_inferior", "scimitar_fake",...] and any other mods that add scimitar variants, such as the scimitar+1 and +2 from Magiclysm, wouldn't be compatible.

Solution you would like.

Similar to weapon categories, I would like optional subcategories to facilitate weapons with variants. something that looks like:

    "id": "scimitar",
    ...
    "weapon_category": [ "MEDIUM_SWORDS" ],
    "weapon_sub_category": [ "SCIMITAR_LIKE" ],
    ...
    "type": "martial_art",
    "id": "style_mma_desert_wind",
    ...
    "weapon_category": [ "POLEARMS" ],
    "weapon_sub_category": [ "MACE_LIKE", "SCIMITAR_LIKE", ],
    "weapons": [ "sword_wood" ],
    ...

This should allow for much more precision for what weapons or restricted for martial arts.

Also a way to filter out specific items and/or (sub/nonsub)categories would also be helpful. so If you wanted a martial art that includes all weapons in MEDIUM_SWORDS except for scimitars it would look like:

    "type": "martial_art",
    ...
    "weapon_category": [ "MEDIUM_SWORDS" ],
    "exclude": [ "SCIMITAR_LIKE" ],
    ...

maybe being able to filter the other way to. Say you wanted an art to include katana-like weapons but not anything that might be in LARGE_SWORDS like the nodachi:

    "type": "martial_art",
    ...
    "weapon_sub_category": [ "KATANA_LIKE" ],
    "exclude": [ "LARGE_SWORDS" ],
    ...

I don't know how difficult this would be in the current C++ code behind the weapon lists but I imagine that it could be done with some check like this very messy pseudocode:

    if ( weapon has a sub/category that is in martial art's weapon sub/categories && 
         weapon sub/category is not in martial art's exclude) {
        ma.weapons.insert(cur_weapon.id)
    } else if ( weapon id is in martial art's weapons && 
                   weapon id is not in martial art's exclude) {
       ma.weapons.insert(cur_weapon.id)
    }

this assumes some tings about how the code works, but I imagine that something similar wouldn't be difficult for someone more familiar with all the C++ stuff.

Describe alternatives you have considered.

Having the sub categories merely be more weapon categories and allowing weapons to have multiple. Which would look something like:

    "id": "scimitar",
    ...
    "weapon_category": [ "MEDIUM_SWORDS", "SCIMITAR_LIKE" ],
    ...

This isn't my preferred solution as it seems like it would start to bloat the amount of weapon categories and at some point it just turns into another category for things that should be flags. All I want is a middle ground between the broad weapon categories and specific weapon id's.

Additional context

This feature could probably wait until the main weapon categories are fully finished, I just wanted to get the idea down before I forgot it. Also the filters are secondary to me, I would have put them into a separate issue request but they wouldn't be very useful without subcategories. Filters would be nice to have, but they're more of a convenience than a necessity.

@Saicchi
Copy link
Contributor

Saicchi commented Dec 9, 2021

Is there a reason this wouldn't work for you?

"id": "scimitar",
"weapon_category": [ "MEDIUM_SWORDS", "SCIMITAR_LIKE" ]
"id": "style_mma_desert_wind",
"extend": { "weapon_category": [ "MACE_LIKE", "SCIMITAR_LIKE" ] }

@catdach
Copy link
Contributor Author

catdach commented Dec 9, 2021

not really, I just don't want the current weapon categories to get mixed in with all the "thing_like" flags for mainly organizational purposes. In my head they're 2 different things but I suppose they're functionally the same.

@wapcaplet wapcaplet added Items / Item Actions / Item Qualities Items and how they work and interact Martial Arts Arts, Techniques, weapons and anything touching martial arts. <Enhancement / Feature> New features, or enhancements on existing labels Dec 9, 2021
@catdach
Copy link
Contributor Author

catdach commented Dec 9, 2021

wow ok yea, I just tested it and It basically works exactly the way I want it to LOL. I guess I had just assumed that some conflicts would arise if weapons had more than one category or if martial arts included both a weapon category and a weapon list. there is still still the whole filters thing but again that's a pretty minor quality of life change for coders and moders(and it could probably be it's own issue request if it really becomes needed).

The more I think about it, the less it makes sense to try and make a whole new separate thing for sub-categories when it can be integrated so well into current categories so I'm closing this.

@catdach catdach closed this as completed Dec 9, 2021
@Termineitor244
Copy link
Contributor

With respect to your example of desert wind:

The martial art and its weapon lists were introduced in #40927, the wooden sword being added to the style so its not unusable at the start of the game.

My plan with the D&D styles is to add more possible weapons with the weapon categories, example: Desert Wind would use "MEDIUM_SWORDS" because of the similar form and use as the scimitar, this is because:

In AD&D, martial disciplines can use any weapon to initiate their maneuvers.

But that is only one of the things I contemplate to do, the actual weapons of the style right now (favored weapons in the Tome of Battle) could maybe still use a category for themselves, maybe restricting the best techniques of the styles to these favored weapons only (while the rest of the style can use the rest of the similar enough weapons).

But well, that is only an idea I have for the style, I still need to finish with the main game styles before starting with the mods.

@catdach
Copy link
Contributor Author

catdach commented Dec 14, 2021

But that is only one of the things I contemplate to do, the actual weapons of the style right now (favored weapons in the Tome of Battle) could maybe still use a category for themselves, maybe restricting the best techniques of the styles to these favored weapons only (while the rest of the style can use the rest of the similar enough weapons).

That sounds great! It might be worth doing this for other styles as well, like ninjutsu and medieval swordsmanship. What do you think about having some extra categories for things like origin and time-period? e.g. Eastern swords, Western swords, Middle-eastern swords, Ancient era, Medieval era, Modern era. These categories would probably be a lot more subjective, but I imagine that they could be very useful for giving styles more favored weapon types.

I still need to finish with the main game styles before starting with the mods.

Yeah, that makes sense. Sorry if I'm getting ahead of myself, just excited I guess haha.

@Termineitor244
Copy link
Contributor

What do you think about having some extra categories for things like origin and time-period? e.g. Eastern swords, Western swords, Middle-eastern swords, Ancient era, Medieval era, Modern era.

I don't have a problem with them, but they need to be used by a martial art somewhere, Eastern Swords could be the name for the Japenese swords category, but I think that martial art is too specific with its techniques so only the japenese swords would be acceptable to use (So "JAPENESE_SWORDS" rather than "ORIENTAL_SWORDS").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Enhancement / Feature> New features, or enhancements on existing Items / Item Actions / Item Qualities Items and how they work and interact Martial Arts Arts, Techniques, weapons and anything touching martial arts.
Projects
None yet
Development

No branches or pull requests

4 participants