Creating Runes
How ability runes and support (modifier) runes work, and the rules Chambers follows when it adds new ones.
How They Work
- Ability rune (
Ability.Slot: "Core") —Cooldown,CostandCostType,Cast(its root interaction),AbilityKeywords, andAttributes: the base value of its attributes, e.g.{"Duration": 6}. - Support rune (
Slot: "Support") —RequiresAnyAbilityKeyword,RequiresAllAbilityKeywordsandExcludesAnyAbilityKeyworddecide which ability runes it fits.AttributeModifiersmultiplies attributes by name: the game's (Cooldown,Cost,Damage,Duration,Speed,AoeScale,ProjectileSize) or your own.OnHitEffectsadds effects to the ability's hits, andConvertElementchanges its element. - Keywords — Assets in
Server/Abilities/Keywords/. A keyword can promise attributes (RequiredAttributes) or interactions (RequiredInteractions):AoepromisesAoeScale;DamagepromisesDamage;DurationpromisesDuration;ProjectilepromisesLaunchAbilityProjectile;Buff,Melee,Physical, the elements and the rest promise nothing; they only let modifiers in (Quickening needsAoeorBuff).
Bind Every Attribute
A modifier only does something if the ability's cast chain uses the attribute it changes. Otherwise it fits and changes nothing.
| To scale | Bind it with |
|---|---|
| The area | Selector with "SizeAttribute": "AoeScale" |
| What is seen | TriggerAbilityFX with "ScaleAttribute": "AoeScale" — this is how support runes visibly change the game's runes; particles in a Simple's Effects don't grow |
| Damage | "DamageAttribute": "Damage" on the hit (ApplyAbilityEffects for effects that deal no damage) |
| Duration | "DurationAttribute": "Duration" on ApplyEffect or GrantAbilityCharges, with its base in Attributes |
| Speed and projectiles | "SpeedAttribute": "Speed"; "ScaleAttribute": "ProjectileSize" |
| A Java interaction | Implement AbilityAttributeBinding.collectAbilityAttributes and read ImpactModifiers.resolve(context, user, buffer).getAttribute(name, fallback) |
The server audits this when started with --validate-assets (AbilityKeywordAudit, WARN lines). It warns about a rune whose keyword's attribute its chain never binds, a keyword no rune uses, and a support rune that needs a keyword no rune carries.
Modifiers Must Make Sense
- Never give a rune a keyword only so that a modifier fits. Every keyword describes something the ability does, and its attribute is bound.
- When no game modifier makes sense for a rune, make one, with its own keyword and attribute. Example: Void Blink carries
Chambers_Teleport, which promisesRange, and its modifier Far Step multipliesRangeby 1.5 and the cost by 1.25. It used to carryAoe, so Colossal extended it, which made no sense for a teleport. - A keyword without an asset does nothing.
Support Runes, Tooltips and Looks
- Support runes are Uncommon, item level 20, like all of the game's.
- A new attribute needs its tooltip name. The client looks up
client.itemTooltip.stats.ability.attributeName.<Attribute>and shows the bare key when it is missing. Put it inServer/Languages/<language>/client.lang: the server prefixes every key with its file's name and sends it to the client. Use{signedNumber}%for the value, e.g.itemTooltip.stats.ability.attributeName.Range = Teleport range: {signedNumber}%. - A rune that imbues the weapon shows on the weapon: particles on
PrimaryItem, nodeHandle, in bothParticlesandFirstPersonParticles. Effects can only tint the entity, never the item.
Chambers' Runes
| Rune | Keywords | Modifiers that do something |
|---|---|---|
| Seismic Stomp | Damage, Physical, Melee, Aoe | Colossal (area and look ×1.6, damage ×1.4, cost ×1.6), Amplify Damage, Rend, Wither, Quickening, Thrift |
| Crystal Ward | Buff, Duration | Enduring, Quickening, Thrift |
| Shadow Edge | Buff, Damage, Physical, Melee, Duration | Rend, Wither, Amplify Damage, Enduring, Quickening, Thrift |
| Void Blink | Chambers_Teleport | Far Step, Thrift |
| Shared Aegis | Buff, Duration | Enduring, Quickening, Thrift |
| Renewal | Buff, Duration | Enduring, Quickening, Thrift |
| Bloodthirst | Buff, Duration | Enduring, Quickening, Thrift |
Runes for Another Player
A rune that goes to an ally (Shared Aegis, Renewal) puts {"Type": "Chambers_Ally_Target"} before its effects. It sets the chain's target to the ally the caster aims at, or to the caster when they aim at nobody, so the game's ApplyEffect with "Entity": "Target" (and its DurationAttribute) lands on them.
- The aim (
com.chambers.items.AllyAim): another player within 15 blocks, the nearest to the line of the caster's look (a few degrees of margin, more when close), with nothing solid between. - The cue (
com.chambers.items.AllyTargetWatch): while such a rune is equipped and an ally is aimed at, a one-line label under the crosshair names them, and a tiny mark over their head is sent to the caster only. It uses the same aim as the cast, so whom the label names is whom the rune reaches. Add a new rune of this kind toAllyAim.TARGETED_RUNES. - Crafted runes: a rune that is available from the start is crafted at the goblin lab workbench like the game's own: keep the base rune's
Recipe, Rare, item level 10 (craftable=Trueinitem_party_runes.py).
Checklist for a New Rune
- Pick its keywords from what the ability does.
- Bind the attribute of every keyword that promises one.
- If it has an area, show it with
TriggerAbilityFXand"ScaleAttribute": "AoeScale". - Size its particles: on-screen diameter ≈
Scale× the animation's scale × the texture's width (orFrameSize.Width) / 32 blocks. - Give its effect a status icon (
UI/StatusEffects/Chambers/) and aName, so it shows in the status bar. - For a new keyword: its asset in
Server/Abilities/Keywords/and its name inui.abilityKeywords.<id>(every language). For a new attribute: its tooltip name inclient.lang(every language). For a new support rune: Uncommon, level 20. - Start the server with
--validate-assetsand check that the audit warns about nothing.