Modding Items - Ceterai/Enternia GitHub Wiki

Main page: icon Modding

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

  • Items
    • Item Builder Parameters
  • Weapons
    • Weapon Builder Parameters
    • Abilities
  • Objects
    • Object Builder Parameters
    • Object Logic
  • - Switch Logic
    
    • Saplings
  • Consumable Items
    • Consumable Builder Parameters
    • Variants
  • Monster Spawners
    • Spawner Builder Parameters
    • Spawner Logic
  • - Spawner Projectile
    

Note: Read more about item and object build scripts here: Alta Item Builders

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:

Refer to the builder file for more documentation.

Item Builder Parameters

More info: Alta Item Builders - Items

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 `` 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](https://ceterai.github.io/MyEnternia/Wiki/AltaWeaponry#upgrades).
`upgradeParameters.shortdescription` `nil` Upgrade name for tooltips.

Weapons

Main page: icon Weapons

Most icon 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.

Weapon Builder 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:

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/alta/object.lua

Object Builder Parameters

More info: Alta Item Builders - Objects

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.

Object Logic

Some objects use scripts to function, with a lot of them using custom scripts made for this mod.

Switch Logic

Most switch-like and light-like objects in the mod use a single custom script with many parameters.

This script can be found here: /objects/alta/switch.lua

Saplings

More info: Alta Item Builders - Saplings

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/alta/consumable.lua

Consumable Builder Parameters

More info: Alta Item Builders - Consumables

All listed parameters are optional.

Parameter Default Description
Item Builder Params - All parameters mentioned in the **Supported Item Parameters** section.
`fixedPrice` `true` Unlike for other items, this value is true by default.
`rotConfig` [`"/items/generic/food/ct_ionic_rotting.config"`](https://github.com/Ceterai/Enternia/blob/main/items/generic/food/ct_ionic_rotting.config) Path to rotting config, if used.
`timeToRot` `nil` If set, sets fixed max rotting time without multipliers.
`rottingMultiplier` 1.0 If `timeToRot` isn't set, this is used 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 Perfect Cooking icon Perfect Cooking mechanic.

Monster Spawners

icon Monster Spawners in this mod use a custom item builder.

The builder is located here: /items/buildscripts/alta/spawner.lua

Spawner Builder Parameters

More info: Alta Item Builders - Spawners

All listed parameters are optional except for asset.

Parameter Default Description
Item Builder Params - All parameters mentioned in the **Supported Item Parameters** section.
`asset` `nil` Path to the `.monstertype` file to load config from.
`subtitle` `Tool` An item subtitle displayed in the tooltip.
`pets` `nil` If set, a random monster is selected from this list.

Spawner Logic

The logic is similar to how Capture Pods work - on use, a monster spawner releases a creature contained within it.

The file with the logic is located here: /items/active/alta/spawner.lua

Spawner Projectile

Activating a monster spawner item involves throwing a special projectile containing custom logic.

This logic can be found here: /projectiles/spawner/ct_monster_spawner.lua

⚠️ **GitHub.com Fallback** ⚠️