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 Category Update #1709

Merged
merged 53 commits into from
Mar 30, 2023
Merged

Conversation

KheirFerrum
Copy link
Collaborator

@KheirFerrum KheirFerrum commented Jul 8, 2022

Summary

SUMMARY: Infrastructure "Port over Weapon Categories and tweak to BN specifications."

Purpose of change

Add Weapon Categories, which allow easier addition of weapons to martial arts and hopefully in the future can be used to aid with holsters and magazines, to define what can and cannot be stored without writing a full thesis.

Describe the solution

Ports over all related PRs to this issue.

We will need to tweak these. Because from what I can read the system was updated at some point to force weapon categories, which honestly isn't the kind of system I'm looking for.

Category Display has been added with a rather different implementation from the inspiring PR, now the game will display the weapon categories listed in the MA jsons along with all applicable weapons. If you add a weapon via the old "weapons" variable it will list it as "Special" weapons for that style.

Category Translation was merged. So now it's not screaming in all caps and _.

Contains a fix for techniques. Previously the game would only read and add techniques, never clearing them when using copy-from in any form. Now it properly inherits and clears. I have not personally tested extend/delete.

Describe alternatives you've considered

Lots of FLAGs.

Testing

  • Make sure all weapons including guns are properly categorized.
  • Make sure that weapon styles display correctly.
  • Add in Category Display or equivalent.
  • Make sure I didn't accidentally add the fragments of any other implementations people were doing throughout this issue.

Additional context

PRs like Category Display, Category Translation could probably be merged, with fixes, mostly because the category display is part of the reason weapon categories have been enforced.

image

KheirFerrum and others added 15 commits July 8, 2022 18:36
weapon_category for martial arts cross-mod compatibility

Co-Authored-By: Saicchi <[email protected]>
Co-Authored-By: Termineitor244 <[email protected]>
* KNIVES

* QUARTERSTAVES

* BLADED_FARMING

* Remaining knife

* MEDIUM_SWORDS

* LONG_SWORDS

* SHORT_SWORDS

* CLAWS

* BATONS
* CLAWS

* BATONS

* Remove QUARTERSTAVES

* KNIVES

* BLADED_FARMING

* SHIVS

Co-authored-by: Kevin Granade <[email protected]>
* KNIVES

* BATONS

* QUARTERSTAVES

* BLADED_FARMING

* CUTTING_POLEARMS

* PIERCING_POLEARMS

* Removed non-sensical weapons

* Removed swords

* HOOKING_POLEARMS

* POLEARMS
* BIONIC_WEAPONRY

* CLAWS

Co-Authored-By: Termineitor244 <[email protected]>
* make Zweihander a longsword

* make estoc a longsword

* Update martialarts.json

* new sword categories

* added new categories to weapons (except Japanese swords) and removed zwie- from long swords

* added Japanese sword category to weapons
Weapon categories: Aikido, Judo, Bōjutsu and weapon category specific techniques
@KheirFerrum KheirFerrum marked this pull request as draft July 8, 2022 13:00
@Coolthulhu Coolthulhu self-assigned this Jul 9, 2022
@Coolthulhu
Copy link
Member

Is this ready or still a draft?

@KheirFerrum
Copy link
Collaborator Author

Is this ready or still a draft?

Draft. I'm still going through the whole thing. I want to streamline the categories so that all weapons have only one category, then I need to try porting over the martial art weapon category display and tweak that so it doesn't scream at people.

@Coolthulhu Coolthulhu removed their assignment Aug 14, 2022
@github-actions github-actions bot added JSON related to game datas in JSON format. mods PR changes related to mods. src changes related to source code. tests changes related to tests translation labels Dec 3, 2022
src/item_factory.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@olanti-p olanti-p left a comment

Choose a reason for hiding this comment

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

I didn't check the melee weapons yet, but the ranged ones are ok.

data/json/items/classes/gun.json Outdated Show resolved Hide resolved
data/json/items/classes/gun.json Outdated Show resolved Hide resolved
data/json/items/ranged/pneumatic.json Outdated Show resolved Hide resolved
data/json/items/ranged/spearguns.json Outdated Show resolved Hide resolved
lang/extract_json_strings.py Outdated Show resolved Hide resolved
lang/extract_json_strings.py Outdated Show resolved Hide resolved
src/init.cpp Outdated Show resolved Hide resolved
KheirFerrum and others added 6 commits March 30, 2023 15:31
rifle_pneumatic and rifle_elastic copy-from rifle_base so they already inherit the same looks_like.
Copy over magnetic mod locations
@olanti-p
Copy link
Contributor

Skimmed the melee weapons, look fine.
The last thing missing is weapon category validness check in check_martialarts() and I think it will be good to go.

Add weapon category check to martial art
If we want this changed better do it in a different PR rather than this stupidly massive one.
@olanti-p olanti-p merged commit 42cb8b6 into cataclysmbnteam:upload Mar 30, 2023
@KheirFerrum KheirFerrum deleted the Weapon-Categories branch March 30, 2023 22:05
scarf005 pushed a commit to scarf005/Cataclysm-BN that referenced this pull request Mar 31, 2023
* Merge pull request #50212 from Saicchi/weaponcategory

weapon_category for martial arts cross-mod compatibility

Co-Authored-By: Saicchi <[email protected]>

* Weapon Categories: Krav Maga

Co-Authored-By: Termineitor244 <[email protected]>

* SHIVS (#52615)

* weapon categories in [F1] menu (#52402)

Co-authored-by: Saicchi <[email protected]>

* Weapon Categories: Ninjutsu (#51868)

* KNIVES

* QUARTERSTAVES

* BLADED_FARMING

* Remaining knife

* MEDIUM_SWORDS

* LONG_SWORDS

* SHORT_SWORDS

* CLAWS

* BATONS

* Weapon Categories: Eskrima (#51918)

* CLAWS

* BATONS

* Remove QUARTERSTAVES

* KNIVES

* BLADED_FARMING

* SHIVS

Co-authored-by: Kevin Granade <[email protected]>

* [CR] Weapon Categories: Silat (And Polearms categories) (#51972)

* KNIVES

* BATONS

* QUARTERSTAVES

* BLADED_FARMING

* CUTTING_POLEARMS

* PIERCING_POLEARMS

* Removed non-sensical weapons

* Removed swords

* HOOKING_POLEARMS

* POLEARMS

* POLEARMS (#52579)

* Merge pull request #52671 from Termineitor244/Fior-Di-Battaglia-Weapons

Weapon Categories: Fior Di Battaglia

* Merge pull request #52786 from Termineitor244/Fencing-Weapons

Weapons Categories: Fencing

* Weapon Categories: Bionic Combatives (#52885)

* BIONIC_WEAPONRY

* CLAWS

Co-Authored-By: Termineitor244 <[email protected]>

* Weapon Categories: Medieval Swordsmanship (#53449)

* make Zweihander a longsword

* make estoc a longsword

* Update martialarts.json

* new sword categories

* added new categories to weapons (except Japanese swords) and removed zwie- from long swords

* added Japanese sword category to weapons

* bokken and bio blade (#53695)

* Rename

* Merge pull request #57008 from Termineitor244/Weapon-Categories-Final

Weapon categories: Aikido, Judo, Bōjutsu and weapon category specific techniques

* Styling

* Display weapon category in item info.

* Strip out gun weapon categories

* Add weapon categories to guns

All guns now have their own categories, wheeeeee

I want to die.

* JSON fixes

* Add weapon categories to melee weapons

Reorganized
- Axes and similar are in their own file.
- Moved Shivs to misc.json.
- Macuahuitl moved to swords
- Fake and Inferior variants always underneath "original" versions.

Reorganized melee weapon categories to follow form/function better.

* martial arts update

Update MA in accordance with changed weapon categories.

* Display and sort

Weapons displayed in MA based on category listed in MA json, any weapons specially added are listed as Special weapons.

There can be duplicates on this list. Katanas appear in 1H_SWORDS and JAPANESE_SWORDS for instance.

* Tweaks

Update martialarts.json

Update martialarts.cpp

* Translated string Update

Co-Authored-By: Saicchi <[email protected]>
Co-Authored-By: Jianxiang Wang (王健翔) <[email protected]>

* Tonfa separation from Batons

Unique enough and keeps them out of Fencing style

* Update martialarts.json

* Update martialarts.json

* Linting

* Update weapons.json

* Fixes

Add the special stuff I missed from Ninjutsu and Silat.

Fix a few logic issues.

* Reference fix

* Mod Update

Add weapon categories to most mods.

* Linting

* Update tools.json

* Update src/item.cpp

Co-authored-by: Olanti <[email protected]>

* Update src/martialarts.cpp

Co-authored-by: Olanti <[email protected]>

* Update description and add extract function to table

* Move weapon category check

* Update lang/extract_json_strings.py

Co-authored-by: Olanti <[email protected]>

* Alphabetize

* Alphabetize 2

* Remove looks_like

rifle_pneumatic and rifle_elastic copy-from rifle_base so they already inherit the same looks_like.

* Magnetic weapon fix

Copy over magnetic mod locations

* Fix name for 1shot default rifle

* Update martialarts.cpp

Add weapon category check to martial art

* No reason to change this here.

If we want this changed better do it in a different PR rather than this stupidly massive one.

---------

Co-authored-by: Saicchi <[email protected]>
Co-authored-by: Termineitor244 <[email protected]>
Co-authored-by: Termineitor244 <[email protected]>
Co-authored-by: Saicchi <[email protected]>
Co-authored-by: Kevin Granade <[email protected]>
Co-authored-by: Angela Graves <[email protected]>
Co-authored-by: catdach <[email protected]>
Co-authored-by: David Seguin <[email protected]>
Co-authored-by: Jianxiang Wang (王健翔) <[email protected]>
Co-authored-by: Olanti <[email protected]>
This was referenced Apr 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JSON related to game datas in JSON format. mods PR changes related to mods. src changes related to source code. tests changes related to tests translation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants