Creating Cyberware using TweakXL
Created by: saltypigloaf (2024-06-22)
Last updated by: saltypigloaf (2024-06-28)
Note: this list is not exhaustive and should be expanded as needed:
Needs additional information about Arms Item Records
Needs information about Sandevistan & Berserk OS Item Records
Item Record Attributes
There many attributes in the primary item record that are universal (or near universal) across multiple cyberware types. With few exceptions, these entries can be drawn from a base record and reused across multiple items.
Notes:
icon: The base value is sufficient if you want to use an existing UI element. Otherwise, use an appropriate icon entry for your mod.
Item-Specific Entries
These attributes are the core elements of defining your cyberware item. With the exception of the array entries above, these values will always change from item-to-item or slot-to-slot.
Notes:
buyPrice: This array should include a record to determine the humanity-to-cost ratio when buying from a vendor
cyberwareType: Each cyberware type is given a unique value. Two items with the same value cannot be equipped, meaning iconic variants of cyberware (such as Axolotl) cannot be equipped alongside their base variant (Newton Module). All Kiroshi cyberware share the same value, which is accommodated in Cyberware-EX by assigning new values to each vanilla implant.
displayName: If you are providing a custom item name using ArchiveXL, only the secondaryKey is required. Do not include the LocKey prefix.
equipArea: denotes the slot that will accept your cyberware item.
localizedDescription: No longer used by default, but the mod Flavorful Descriptions will add this text to the bottom of all cyberware as it was before the 2.0 update. This does require the LocKey prefix before the secondaryKey
OnEquip: This array includes all the records that define your cyberware's functionality, including Attunement if any
sellPrice: This array should include a record to determine the humanity-to-cost ratio when selling from a vendor (can use the same record as buyPrice if you wish)
slotPartListPreset: This array should include your StatShard, which is used to determine bonus stats for cyberware.
statModifiers: This array typically includes 3 items:
A slot-specific record such as
Items.AdvancedCardiovascularSystemModule_inline0
A record to calculate the current Attunement level for the Attunement UI
If the cyberware is iconic,
Quality.IconicItem
upgradeCostMult: A multiplier applied to the required crafting components when upgrading.
variants: A single array entry is used to determine the humanity cost.
Addendum #1: Item-Specific Entries for Cyberdecks
Notes:
blueprint: This determines the number of quickhack slots available in your deck (2 through 8)
buyPrice: This record typically uses a higher ratio as operating systems tend to be more expensive.
cyberwareType: All cyberdecks share the same cyberwareType.
localizedDescription: Not currently used by Flavorful Descriptions for cyberdecks. If you want favor text in your cyberdeck UI, it will need to be a UI entry in the OnEquip array.
objectActions: This array defines the device and vehicle hacks available at each tier (see below).
sellPrice: This record typically uses a higher ratio as operating systems tend to be more expensive.
slotPartListPreset: Not used in cyberdecks.
statModifiers: This is not used for cyberdecks, apart from identifying if the deck is iconic.
upgradeCostMult: A higher multiplier is usually applied to cyberdecks.
Code Sample: Adding Device & Vehicle hacks to your Cyberdeck tiers
Attunements
Applying attunements to your non-OS cyberware requires 3 elements:
A record to provide a UI icon (not required for vanilla Attunements)
A record to provide a bonus to the player
A record to calculate the current value provided by the attunement for the UI
Code Sample: Adding Vanilla Attuments to your cyberware
Notes:
The value attribute in your statModifiers record is not used to apply a bonus to the player. It is used to generate a value for the UI record within Attunements.IntelligenceAllDamage
to display.
In this case, the bonus within Attunements.IntelligenceAllDamage
is to multiply all damage by Intelligence*0.0005 but the UI needs to display percentages, not decimal modifiers. This value is referenced in the Attunement record's UI data as the AttunementHelper.
Code Sample: Adding Custom Attuments to your cyberware
Below is an example of using the player's Max RAM to generate a bonus to Armor taken from an existing mod.
Technology Perk Requirements
There are a few ways in which the functionality of Cyberware is impacted by Technology Perks. In order for newly-created Cyberware to react to these situations appropriately, some considerations needs to be be made in your design.
All Things Cyber
Level 2 of this perk reduces the Cyberware Capacity cost for cyberware in the Integumentary System and Skeleton slots by 20%. In the variant attribute, cyberware inteded for these slots should use:
If you choose to create your own Tinkerer variant, remember that the 20% discount is not a calculated value; you are free to set whatever Cyberware Capacity cost you choose for players who buy this perk.
License To Chrome
Level 3 of this perk increases the stats of all Skeleton cyberware. This is achieved by creating a duplicate of your cyberware item that will be swapped into the player's cyberware slot seamlessly if they've purchased this perk.
In your base cyberware records, include:
Note: in vanilla items, these copies are identifiable by the 2 in their names, i.e. Items.AdvancedBionicJointsCommon2
In your license to chrome record, include:
Armor Bonuses
Static bonuses to Armor are calculated by 4 records, all of which evaluate the item's tier and apply the bonus accordingly.
A standard record used by all cyberware for a particular slot. All 4 vanilla records are identical with the exception of the name, so there is no practical limit on applying an armor bonus to any cyberware regardless of its type. The existing records are:
Items.AdvancedCardiovascularSystemModule_inline0
Items.AdvancedIntegumentarySystemModule_inline0
Items.AdvancedMusculoskeletalSystemModule_inline0
Items.AdvancedNervousSystemModule_inline0
A record to establish the base (Common) bonus applied
A record to establish the bonus applied at each full tier (Common, Uncommon, etc)
A record to establish the bonus applied at each half-tier (CommonPlus, UncommonPlus, etc)
Code Sample: Adding Armor Bonus calculations to your cyberware
Notes:
The code sample above will result in the following values:
Common: 18 (base)
CommonPlus: 22 (base + plus)
Uncommon: 27 (base + increase * tiers added)
UncommonPlus: 31 (base + plus + increase * tiers added)
Rare: 36 (base + increase * tiers added)
RarePlus: 40 (base + plus + increase * tiers added)
Epic: 45 (base + increase * tiers added)
EpicPlus: 49 (base + plus + increase * tiers added)
Legendary: 54 (base + increase * tiers added)
LegendaryPlus: 58 (base + plus + increase * tiers added)
LegendaryPlusPlus: 62 (base + plus * 2 + increase * tiers added)
The armor bonus is always calculated starting from Common even if your custom cyberware only has records for higher tiers; if your base cyberware item start at Epic, the armor bonus will still be 45.
Stats Shards
Any piece of cyberware that will receive random bonus stats requires a StatsShard record to do so. Much of the StatsShard record is ignored, so a simple base record can be used for virtually any piece of cyberware.
Much if the information in the sample is the same, generally dealing with randomizing stat bonuses during upgrades. Key to your custom cyberware are the last 5 records in statModifiers as they control the initial stats when aquiring the cyberware item.
Typically, these stats include 3 direct bonuses and 2 modifying bonuses. Keep in mind that including more direct bonuses means that your cyberware will be found with extra stats, but they will be lost when upgrading.
Code Sample: Adding a StatShard record to your cyberware
Arms Cyberware Specifics
Cyberware for the Arms slot have their Cyberware Capacity cost calculated for the holstered and unholstered states in separate locations. If you intend to use a cost other than the base 8, you will need to take them both into account.
The unholstered value, which is also used for the UI, is calculated here:
If you only change this value, you'll find that the UI indicates a new Cyberware Capacity cost, but equipping the item will only reduce the user's Cyberware Capacity by 8. If order to modify the cost when holstered, you'll need to make a change here:
This record is referenced in your Arms cyberware here:
Last updated