Skip to content
This repository has been archived by the owner on Oct 21, 2023. It is now read-only.

Add custom item holster positions #1221

Closed
wants to merge 3 commits into from
Closed

Conversation

Meowkov
Copy link
Collaborator

@Meowkov Meowkov commented Aug 5, 2023

This will allow us to have custom holster positions for items in the future.
Example already included in the files:
https://i.imgur.com/9CYMCqV.png

This will allow us to have custom holster positions for items in the future:
Example already included in the files:
https://i.imgur.com/9CYMCqV.png
<?xml version="1.0" encoding="utf-8"?>
<base>
<item_holsters>
<item_holster id="katana_left_hip" equip_action="act_equip_sword" equip_action_left_stance="act_equip_sword_left_stance" unequip_action="act_unequip_sword" unequip_action_left_stance="act_unequip_sword_left_stance" show_holster_when_drawn="false" group_name="hip_left_sword_3" holster_skeleton="holster_skeleton_hip_left" base_set="abdomen_front" holster_position="0.120, 0.070, 0.220" holster_rotation_yaw_pitch_roll="-56.180, 70.790, -120.0"/>
Copy link
Owner

Choose a reason for hiding this comment

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

How is the link made between the katana item and that holster position?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch.

Holsters are defined in the crafting_templates.xml for crafted items and in the weapons.xml or shields.xml for single piece items that do not use the crafting system.

I would add the new category in there when I change the items on the item repo.

If you like it better I can add the empty one with this PR though.

Copy link
Owner

Choose a reason for hiding this comment

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

Yes let's just add the empty file

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done, since we we will be using the katana parts those are already in there as well.

Added
<CraftingTemplate id="Katana"
<CraftingTemplate id="Wakizashi"

for 1h and 2h
@@ -9260,4 +9260,73 @@
<UsablePiece piece_id="crpg_meowhammer_handle_h3" />
</UsablePieces>
</CraftingTemplate>
<CraftingTemplate id="Wakizashi" item_type="OneHandedWeapon" modifier_group="sword" item_holsters="katana_left_hip:katana_left_hip_2:katana_left_hip_3" piece_type_to_scale_holster_with="Blade" hidden_piece_types_on_holster="Blade" default_item_holster_position_offset="0,0,-0.1">
Copy link
Owner

Choose a reason for hiding this comment

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

How come this template was not existing before? Also the modifications done here might be overwritten by the next time @namidaka synchronizes the 2 repositories.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Indeed this must be done in item balancing , and not here

Copy link
Collaborator Author

@Meowkov Meowkov Aug 9, 2023

Choose a reason for hiding this comment

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

They did not exist before because we did not have the custom holster positions we wanted to apply to some weapons.
Now that we want make use of them, those custom templates need to be added so weapons can use them.
Both need to happen on the other repo since the exporter will crash if the custom item_holsters.xml is not available but weapons are using the new crafting template that references those holster positions.

My suggestion would be only adding the custom item_holsters.xml here, syncing it to the item balancing repo and then adding crafting templates and the weapons that use them on there.
That way we have no situation on any repo that could cause issues.

Reverted the crafting_templates.xml changes.

@namidaka namidaka closed this Oct 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants