Пространственный браслет: 4 слота под модификации
Сами моды будут позже. Схема списана с Ножа некроманта: тег noMods отсекает все ванильные моды, тег necroBracelet зарезервирован под будущие свои. canHaveCosmetic намеренно не добавлен - именно он создаёт слот под краски. У effect_group НЕТ tiered="false", и это главное: ItemClass.HasQuality - это Effects.IsOwnerTiered(), а ItemValue.FireEvent выходит по if (!HasQuality) return; ДО обхода Modifications[]. На нетированном предмете слоты появились бы, моды вставлялись бы, и ни один triggered_effect внутри них не сработал бы. Качество при этом не показывается: ShowQuality по умолчанию false и намеренно не задан. Старый браслет из сейва слотов не получит - размер Modifications[] фиксируется при создании предмета. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEXvXg1FSAQJHrvYbeAKqq
This commit is contained in:
co-authored by
Claude Opus 5
parent
ccf58a2ec8
commit
a5f8592903
+51
-1
@@ -1397,7 +1397,29 @@
|
||||
rest of the mod's hand-drawn icons). -->
|
||||
<append xpath="/items">
|
||||
<item name="braceletSpatialVault">
|
||||
<property name="Tags" value="T0,weapon,attPerception"/>
|
||||
<!-- MOD SLOTS ADDED 2026-09-13 ("добавь хранилищу 4 слота под модификации. Сами
|
||||
модификации реализуем потом"). Two tags, exactly the scheme necroWpnBladeNecroKnife
|
||||
already proved on 2026-09-07 - see that item's own comment for the full
|
||||
decompiled reasoning:
|
||||
|
||||
noMods - blocks every vanilla mod. All 87 vanilla item_modifiers that
|
||||
declare blocked_tags at all list noMods among them; the
|
||||
remaining 24 cannot reach this item anyway (10 dyes and 7 drone
|
||||
mods need a cosmetic slot or the drone tag, 2 are quest items,
|
||||
1 needs perkArchery, 3 are CreativeMode Test/Dev). "noMods"
|
||||
means nothing in code - it is purely a naming convention used
|
||||
inside other items' blocked_tags.
|
||||
necroBracelet - the positive half, reserved for the mods that come later. Every
|
||||
future bracelet mod MUST declare
|
||||
installable_tags="necroBracelet": a modifier with no
|
||||
installable_tags at all fits ANYTHING (XUiM_AssembleItem short-
|
||||
circuits on InstallableTags.IsEmpty), so forgetting it produces
|
||||
the exact opposite of what is wanted.
|
||||
|
||||
Deliberately NOT adding canHaveCosmetic: that tag alone is what creates the paint
|
||||
slot (ItemValue's constructor sizes CosmeticMods by it), and the knife had to have
|
||||
it removed for precisely this reason. No tag, no slot, no dyes. -->
|
||||
<property name="Tags" value="T0,weapon,attPerception,noMods,necroBracelet"/>
|
||||
<!-- ItemTypeIcon="melee" REMOVED 2026-09-07 (user report: "поверх пиктограмм некоторых
|
||||
рецептов стоят странные пиктограммы... то ли факел, то ли спичка"). This was the
|
||||
small badge drawn in the TOP-LEFT corner over the item's own icon in the recipe
|
||||
@@ -1495,6 +1517,34 @@
|
||||
<property name="Class" value="Eat"/>
|
||||
<property name="Delay" value="0.3"/>
|
||||
</property>
|
||||
|
||||
<!-- FOUR MOD SLOTS. The count is a passive_effect, not an item property - same shape
|
||||
the knife uses, and flat rather than a per-quality list because quality means
|
||||
nothing on this item.
|
||||
|
||||
NOTE THE MISSING ATTRIBUTE: this effect_group has NO tiered="false", and that is
|
||||
the entire point. ItemClass.HasQuality is literally Effects.IsOwnerTiered(), and
|
||||
ItemValue.FireEvent bails out with `if (!HasQuality) return;` BEFORE it walks
|
||||
Modifications[] - so on an untiered item the slots still appear and still accept
|
||||
mods, and not one triggered_effect inside them ever fires. That silent failure
|
||||
cost a whole debugging session on the knife on 2026-09-07; it is not repeated
|
||||
here. The slots themselves would work either way (Modifications is allocated
|
||||
unconditionally, earlier), which is exactly what makes the failure so quiet.
|
||||
|
||||
Quality is not SHOWN, though: ShowQuality is a separate property that defaults to
|
||||
false (vanilla sets it to true explicitly on the ~80 items that want a quality
|
||||
bar), and it is deliberately left unset here. The item behaves as tiered for the
|
||||
mod system and still reads as a plain bracelet in the UI.
|
||||
|
||||
FOR THE MODS THEMSELVES, WHEN THEY GET WRITTEN: give each one its OWN
|
||||
modifier_tags. XUiC_ItemPartStack.CanSwap counts already-installed mods whose
|
||||
modifier_tags intersect the one being installed and refuses at
|
||||
num >= ItemClass.MaxModsAllowed, which defaults to 1 - so a shared tag like
|
||||
"necroBraceletMod" across all four would leave exactly one of these four slots
|
||||
usable. -->
|
||||
<effect_group name="braceletSpatialVault">
|
||||
<passive_effect name="ModSlots" operation="base_set" value="4"/>
|
||||
</effect_group>
|
||||
</item>
|
||||
</append>
|
||||
</config>
|
||||
|
||||
Reference in New Issue
Block a user