Skip to content

Modding Items

Ceterai edited this page Jul 9, 2023 · 5 revisions

Main page: Modding

This page contains modding information about items added by this mod, including item builders, item scripts, weapon abilities, etc.

Navigation

Items

Most items in this mod use a custom item builder. It extracts as much information as possible from an asset and calculates params and tooltips based on them.

It is currently used for:

The builder is located here: /items/buildscripts/ct_alta_item_builder.lua

Supported Item Parameters

All listed parameters are optional.

Parameter Default Description
level 1 Item level. Will not be overridden by custom levels if fixedLevel is set to true.
price 0 Can be fixed if fixedPrice is true, or level-dependant.
race nil Will be displayed in a tooltip if set.
fixedLevel true Prevents the level param from being overwritten with custom values.
fixedPrice false If false, the price will be calculated based on level using itemLevelPriceMultiplier calc function.
damageLevelMultiplier 1.0 Calculates based on item level using the weaponDamageLevelMultiplier calc function.
elementalType "physical" Can match any existing element, just like with original Starbound weapons. If set, replaces the <elementalType> patterns in asset's data.
primaryAbility nil Primary ability, supports elementalConfig. Not used by majority of items.
altAbility nil Special ability, supports elementalConfig. Not used by majority of items.
palette nil Used for color swaps like with original Starbound weapons.
colorIndex 1 Used for color swaps like with original Starbound weapons.
baseDps or primaryAbility.baseDps 0 Item's DPS. If set, will be displayed in some tooltips.
fireTime or primaryAbility.fireTime 0.0 Item's general Fire Rate. If set, will be displayed in some tooltips.
energyUsage or primaryAbility.energyUsage 0 Item's general Energy Usage. If set, will be displayed in some tooltips.
baseShieldHealth 0.0 Item's leveled Shield Health. If set, will be displayed in some tooltips.
cooldownTime 0 Item's general Cooldown Time. If set, will be displayed in some tooltips.
knockback 0 Item's general Knockback. If set, will be displayed in some tooltips.
minActiveTime 0 Item's general Min Time. If set, will be displayed in some tooltips.
perfectBlockTime 0 Item's general Parry Time. If set, will be displayed in some tooltips.
forceWalk false Item's general "Heaviness" determinator, used in shields to determine whether it will force you to walk when raise. Not currently displayed.
primaryAbility.name "unknown" Primary ability name for tooltips.
primaryAbility.description "" Primary ability description for tooltips.
altAbility.name "unknown" Special ability name for tooltips. If not set, tries to use the ability default first, and only then the default mentioned here.
altAbility.description "" Special ability description for tooltips.
passiveAbility.name "unknown" Passive ability name for tooltips. Will replace Special if set.
passiveAbility.description "" Passive ability description for tooltips. Will replace Special if set.
upgradeParameters nil For upgrades: Weapons: Upgrades.
upgradeParameters.shortdescription nil Upgrade name for tooltips.

Weapons

Main page: Weapons

Most weapons and shields in this mod use a custom item builder, custom logic and custom abilities.

The builder used is the same mentioned in the previous section.

Supported Weapon Parameters

Weapons and shields support the same parameters as in Supported Item Parameters.

Abilities

Used custom weapon scripts and abilities can be found here:

Weapon Base:

Melee Bases:

Ranged Bases:

Special Ranged Abilities:

Read more about supported weapon abilities: Weapon Mechanics

Objects

Most objects in this mod use a custom item builder. It enhances the item builder mantioned above.

The builder is located here: /items/buildscripts/ct_alta_object_builder.lua

Supported Object Parameters

All listed parameters are optional.

Parameter Default Description
Item Builder Params - All parameters mentioned in the Supported Item Parameters section.
smashOnBreak or smashable false If set, displays tooltip note "This object doesn't drop itself when broken/smashed!"
slotCount nil If set, displays in a tooltip.
lightColor nil If set, displays the color in a form of a star in a tooltip.
colonyTags [] If set, displays in a tooltip.
health 1.0 Displays in a tooltip, multiplied by 10.
touchDamage.baseDamage or touchDamage.damage or touchDamage.power or baseDamage or damage or power nil If set, displays in a tooltip.
touchDamage.fireTime or fireTime nil If set, displays in a tooltip.
touchDamage.energyUsage or energyUsage nil If set, displays in a tooltip.
touchDamage.knockback or knockback nil If set, displays in a tooltip.

Consumable Items

Consumable items like Food, Medicine, etc. in this mod use a custom item builder. It enhances the original buildfood.lua.

The builder is located here: /items/buildscripts/ct_alta_food_builder.lua

Supported Consumable Parameters

All listed parameters are optional.

Parameter Default Description
level 1 Item level. Will not be overridden by custom levels if fixedLevel is set to true.
price 0 Can be fixed if fixedPrice is true, or level-dependant.
race nil Will be displayed in a tooltip if set.
rotConfig "/items/generic/food/ct_ionic_rotting.config" Path to rotting config, if used.
timeToRotMax or timeToRot nil If set, sets fixed max rotting time without multipliers.
rottingMultiplier 1.0 If timeToRotMax/timeToRot isn't set, this is uset to dynamically determine those parameters.
foodValue nil If set, displays in a tooltip.
variants [] If set, displays in a tooltip. If the item has an aging spript attached, this might be used to turn the item into one of possible variants.

Variants

Consumable items that have a variants parameter set and use an aging scripted called /items/generic/food/ct_food_aging.lua have a chance to turn into one of the variants shortly after crafting.

This is mainly used for the Perfectly Cooked Food mechanic.

Clone this wiki locally