Template talk:ComponentStatistics: Difference between revisions

Discussion page of Template:ComponentStatistics
No edit summary
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
[[Template:ComponentStatistics]]
 
 
<nowiki>{{ComponentStatistics|COMPONENT|ENERGY|SIZE|RANGE|SPEED|FACTION}}</nowiki>
 
{{ComponentStatistics|Miner|15|Small|1|1|Robots}}
 
 
TO DO
 
Link faction to faction specific page
 
Accurate time units
 
Divide energy consumption and speed into real time and tick intervals
(3 energy per tick and 15 energy per second)
15 energy with 1 second speed is what the game portrays on component tool tips.
 
<nowiki>
SAMPLEDATA - needs to be condensed into a template
 
--[[
data.components.samplecomponent = {
name = "<NAME>",
texture = "<PATH/TO/IMAGE.png>",
 
-- Optional
visual = "<VISUAL-ID>",
slot_type = "storage|liquid|radioactive|...", -- default 'storage'
attachment_size = "Hidden|Internal|Small|Medium|Large", -- default 'Hidden'
activation = "None|Always|Manual|OnFirstRegisterChange|OnComponentRegisterChange|OnFirstItemSlotChange|OnComponentItemSlotChange|OnAnyItemSlotChange|OnLowPower|OnPowerStoredEmpty|OnTrustChange|OnOtherCompFinish", -- default 'None'
slots = { <SLOT_TYPE> = <NUM>, ... },
registers = { ... },
power = -0.1,
power_storage = 1000,
drain_rate = 1,
charge_rate = 5,
bandwidth = 2,
transfer_radius = 10,
adjust_extra_power = true,
dumping_ground = "None|Simple|Smart", -- default 'None'
effect = "fx_power_core", -- automatically spawned when this components visual is placed on the map
effect_socket = "fx",
trigger_radius = 8,
trigger_channels = "bot|building|bug",
non_removable = true,
production_recipe = CreateProductionRecipe(
{ <INGREDIENT_ITEM_ID> = <INGREDIENT_NUM>, ... },
{ <PRODUCTION_COMPONENT_ID> = <PRODUCTION_TICKS>, }
-- Optional
<AMOUNT_NUM>, --default: 1
),
on_add = function(self, comp) ... end,
on_remove = function(self, comp) ... end,
on_update = function(self, comp, cause) ... end,
on_trigger = function(self, comp, other_entity) ... end,
on_take_damage = function(self, comp, amount) ... end,
}
]]
</nowiki>

Latest revision as of 17:59, 2 September 2023