Prototype definitions: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
mNo edit summary
(link to inheritance tree in migrated docs)
 
(48 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== Warning ==
<div class="stub"><p>'''The prototype docs have moved to a new website with an improved format.''' This documentation page can now be found here: [https://lua-api.factorio.com/latest/tree.html https://lua-api.factorio.com/latest/tree.html].
This is work in progress of description of the prototype specification possibilities.


'''The game is in early stage, and the interface will change in the future for sure.'''
</p><p>This wiki page is no longer updated and '''will be removed at some point in the future''', so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback [https://forums.factorio.com/viewforum.php?f=233 on the forums].</p></div>
== Basics ==
 
* Prototype objects are specified in lua script called data.lua in the root of every mod (base game works as mod as well)
 
* Individual objects are usually sorted into different groups in the prototypes folder.
 
== Prototypes ==
Prototypes are used to specify what items, entities, technologies (etc) exist in the game and what their properties are. Prototypes are created and modified in the [http://lua-api.factorio.com/latest/Data-Lifecycle.html data phase].<br>
See [[Tutorial:Mod settings]] for the settings stage documentation and [https://lua-api.factorio.com/latest lua-api.factorio.com] for the runtime API documentation.
 
: '''See [[prototype overview]] for a full overview of all prototypes and their properties.'''
 
== Prototype hierachy ==
This is a list of all available prototype types and their inheritance structure.<br>Each point lists the link to the prototype page which is named after the class in the code, and the string that is used as the type name. Prototypes that have the type name <code><abstract></code> cannot be directly created, they simple exist as classes that multiple prototypes can inherit properties from.
<div class="prototype-tree-root">
* [[Prototype/AmbientSound]] '''ambient-sound'''
* [[Prototype/Animation]] '''animation'''
* [[Prototype/EditorController]] '''editor-controller'''
* [[Prototype/Font]] '''font'''
* [[Prototype/GodController]] '''god-controller'''
* [[Prototype/MapGenPresets]] '''map-gen-presets'''
* [[Prototype/MapSettings]] '''map-settings'''
* [[Prototype/MouseCursor]] '''mouse-cursor'''
* [[Prototype/Sound]] '''sound'''
* [[Prototype/SpectatorController]] '''spectator-controller'''
* [[Prototype/Sprite]] '''sprite'''
* [[Prototype/TileEffect]] '''tile-effect'''
* [[Prototype/TipsAndTricksItemCategory]] '''tips-and-tricks-item-category'''
* [[Prototype/TriggerTargetType]] '''trigger-target-type'''
* [[Prototype/WindSound]] '''wind-sound'''
* [[PrototypeBase]] <abstract>
</div><div class="prototype-tree">
* [[Prototype/Achievement]] '''achievement'''
** [[Prototype/BuildEntityAchievement]] '''build-entity-achievement'''
** [[Prototype/CombatRobotCountAchievement]] '''combat-robot-count'''
** [[Prototype/ConstructWithRobotsAchievement]] '''construct-with-robots-achievement'''
** [[Prototype/DeconstructWithRobotsAchievement]] '''deconstruct-with-robots-achievement'''
** [[Prototype/DeliverByRobotsAchievement]] '''deliver-by-robots-achievement'''
** [[Prototype/DontBuildEntityAchievement]] '''dont-build-entity-achievement'''
** [[Prototype/DontCraftManuallyAchievement]] '''dont-craft-manually-achievement'''
** [[Prototype/DontUseEntityInEnergyProductionAchievement]] '''dont-use-entity-in-energy-production-achievement'''
** [[Prototype/FinishTheGameAchievement]] '''finish-the-game-achievement'''
** [[Prototype/GroupAttackAchievement]] '''group-attack-achievement'''
** [[Prototype/KillAchievement]] '''kill-achievement'''
** [[Prototype/PlayerDamagedAchievement]] '''player-damaged-achievement'''
** [[Prototype/ProduceAchievement]] '''produce-achievement'''
** [[Prototype/ProducePerHourAchievement]] '''produce-per-hour-achievement'''
** [[Prototype/ResearchAchievement]] '''research-achievement'''
** [[Prototype/TrainPathAchievement]] '''train-path-achievement'''
* [[Prototype/AmmoCategory]] '''ammo-category'''
* [[Prototype/AmmoCategory]] '''ammo-category'''
* [[Prototype/AutoplaceControl]] '''autoplace-control'''
* [[Prototype/AutoplaceControl]] '''autoplace-control'''
* [[Prototype/CustomInput]] '''custom-input'''
* [[Prototype/DamageType]] '''damage-type'''
* [[Prototype/DamageType]] '''damage-type'''
* [[Prototype/Decorative]] '''optimized-decorative'''
* [[Prototype/Entity]] <abstract>
* [[Prototype/Entity]] <abstract>
** [[Prototype/Arrow]] '''arrow'''
** [[Prototype/Arrow]] '''arrow'''
** [[Prototype/ArtilleryFlare]] '''artillery-flare'''
** [[Prototype/ArtilleryProjectile]] '''artillery-projectile'''
** [[Prototype/Beam]] '''beam'''
** [[Prototype/CharacterCorpse]] '''character-corpse'''
** [[Prototype/Cliff]] '''cliff'''
** [[Prototype/Corpse]] '''corpse'''
** [[Prototype/Corpse]] '''corpse'''
** [[Prototype/Decorative]] '''decorative'''
*** [[Prototype/RailRemnants]] '''rail-remnants'''
** [[Prototype/Explosion]] '''explosion'''
** [[Prototype/DeconstructibleTileProxy]] '''deconstructible-tile-proxy'''
*** [[Prototype/FlameThrowerExplosion]] '''flame-thrower-explosion'''
** [[Prototype/EntityGhost]] '''entity-ghost'''
** [[Prototype/EntityParticle]] '''particle''' (for migration, cannot be used)
*** [[Prototype/LeafParticle]] '''leaf-particle''' (for migration, cannot be used)
** [[Prototype/EntityWithHealth]] <abstract>
** [[Prototype/EntityWithHealth]] <abstract>
*** [[Prototype/Accumulator]] '''accumulator'''
*** [[Prototype/EntityWithOwner]] <abstract>
*** [[Prototype/AssemblingMachine]] '''assembling-machine'''
**** [[Prototype/Accumulator]] '''accumulator'''
*** [[Prototype/Beacon]] '''beacon'''
**** [[Prototype/ArtilleryTurret]] '''artillery-turret'''
*** [[Prototype/Car]] '''car'''
**** [[Prototype/Beacon]] '''beacon'''
*** [[Prototype/Character]] '''player'''
**** [[Prototype/Boiler]] '''boiler'''
*** [[Prototype/Container]] '''container'''
**** [[Prototype/BurnerGenerator]] '''burner-generator'''
**** [[Prototype/SmartContainer]] '''smart-container'''
**** [[Prototype/Character]] '''character'''
**** [[Prototype/Combinator]] <abstract>
***** [[Prototype/ArithmeticCombinator]] '''arithmetic-combinator'''
***** [[Prototype/DeciderCombinator]] '''decider-combinator'''
**** [[Prototype/ConstantCombinator]] '''constant-combinator'''
**** [[Prototype/Container]] '''container'''
***** [[Prototype/LogisticContainer]] '''logistic-container'''
***** [[Prototype/LogisticContainer]] '''logistic-container'''
*** [[Prototype/ElectricPole]] '''electric-pole'''
****** [[Prototype/InfinityContainer]] '''infinity-container'''
*** [[Prototype/Fish]] '''fish'''
**** [[Prototype/CraftingMachine]] <abstract>
*** [[Prototype/Furnace]] '''furnace'''
***** [[Prototype/AssemblingMachine]] '''assembling-machine'''
*** [[Prototype/Inserter]] '''inserter'''
****** [[Prototype/RocketSilo]] '''rocket-silo'''
*** [[Prototype/Lab]] '''lab'''
***** [[Prototype/Furnace]] '''furnace'''
*** [[Prototype/Lamp]] '''lamp'''
**** [[Prototype/ElectricEnergyInterface]] '''electric-energy-interface'''
*** [[Prototype/Market]] '''market'''
**** [[Prototype/ElectricPole]] '''electric-pole'''
*** [[Prototype/MiningDrill]] '''mining-drill'''
**** [[Prototype/EnemySpawner]] '''unit-spawner'''
*** [[Prototype/PipeConnectable]] <abstract>
**** [[Prototype/FlyingRobot]] <abstract>
**** [[Prototype/Boiler]] '''boiler'''
***** [[Prototype/CombatRobot]] '''combat-robot'''
***** [[Prototype/RobotWithLogisticInterface]] <abstract>
****** [[Prototype/ConstructionRobot]] '''construction-robot'''
****** [[Prototype/LogisticRobot]] '''logistic-robot'''
**** [[Prototype/Gate]] '''gate'''
**** [[Prototype/Generator]] '''generator'''
**** [[Prototype/Generator]] '''generator'''
**** [[Prototype/Pump]] '''pump'''
**** [[Prototype/HeatInterface]] '''heat-interface'''
**** [[Prototype/HeatPipe]] '''heat-pipe'''
**** [[Prototype/Inserter]] '''inserter'''
**** [[Prototype/Lab]] '''lab'''
**** [[Prototype/Lamp]] '''lamp'''
**** [[Prototype/LandMine]] '''land-mine'''
**** [[Prototype/LinkedContainer]] '''linked-container'''
**** [[Prototype/Market]] '''market'''
**** [[Prototype/MiningDrill]] '''mining-drill'''
**** [[Prototype/OffshorePump]] '''offshore-pump'''
**** [[Prototype/Pipe]] '''pipe'''
**** [[Prototype/Pipe]] '''pipe'''
***** [[Prototype/InfinityPipe]] '''infinity-pipe'''
**** [[Prototype/PipeToGround]] '''pipe-to-ground'''
**** [[Prototype/PipeToGround]] '''pipe-to-ground'''
*** [[Prototype/PlayerPort]] '''player-port'''
**** [[Prototype/PlayerPort]] '''player-port'''
*** [[Prototype/Radar]] '''radar'''
**** [[Prototype/PowerSwitch]] '''power-switch'''
*** [[Prototype/Rail]] '''rail'''
**** [[Prototype/ProgrammableSpeaker]] '''programmable-speaker'''
*** [[Prototype/RailSignal]] '''rail-signal'''
**** [[Prototype/Pump]] '''pump'''
*** [[Prototype/Roboport]] '''roboport'''
**** [[Prototype/Radar]] '''radar'''
*** [[Prototype/Robot]] <abstract>
**** [[Prototype/Rail]] <abstract>
**** [[Prototype/CombatRobot]] '''combat-robot'''
***** [[Prototype/CurvedRail]] '''curved-rail'''
**** [[Prototype/ConstructionRobot]] '''construction-robot'''
***** [[Prototype/StraightRail]] '''straight-rail'''
**** [[Prototype/LogisticRobot]] '''logistic-robot'''
**** [[Prototype/RailSignalBase]] <abstract>
*** [[Prototype/RocketDefense]] '''rocket-defense'''
***** [[Prototype/RailChainSignal]] '''rail-chain-signal'''
*** [[Prototype/SolarPanel]] '''solar-panel'''
***** [[Prototype/RailSignal]] '''rail-signal'''
*** [[Prototype/Splitter]] '''splitter'''
**** [[Prototype/Reactor]] '''reactor'''
*** [[Prototype/TrainStop]] '''train-stop'''
**** [[Prototype/Roboport]] '''roboport'''
*** [[Prototype/TrainUnit]] <abstract>
**** [[Prototype/SimpleEntityWithOwner]] '''simple-entity-with-owner'''
**** [[Prototype/CargoWagon]] '''cargo-wagon'''
***** [[Prototype/SimpleEntityWithForce]] '''simple-entity-with-force'''
**** [[Prototype/Locomotive]] '''locomotive'''
**** [[Prototype/SolarPanel]] '''solar-panel'''
*** [[Prototype/TransportBelt]] '''transport-belt'''
**** [[Prototype/StorageTank]] '''storage-tank'''
*** [[Prototype/TransportBeltToGround]] '''transport-belt-to-ground'''
**** [[Prototype/TrainStop]] '''train-stop'''
**** [[Prototype/TransportBeltConnectable]] <abstract>
***** [[Prototype/LinkedBelt]] '''linked-belt'''
***** [[Prototype/Loader1x1]] '''loader-1x1'''
***** [[Prototype/Loader1x2]] '''loader'''
***** [[Prototype/Splitter]] '''splitter'''
***** [[Prototype/TransportBelt]] '''transport-belt'''
***** [[Prototype/UndergroundBelt]] '''underground-belt'''
**** [[Prototype/Turret]] '''turret'''
***** [[Prototype/AmmoTurret]] '''ammo-turret'''
***** [[Prototype/ElectricTurret]] '''electric-turret'''
***** [[Prototype/FluidTurret]] '''fluid-turret'''
**** [[Prototype/Unit]] '''unit'''
**** [[Prototype/Vehicle]] <abstract>
***** [[Prototype/Car]] '''car'''
***** [[Prototype/RollingStock]] <abstract>
****** [[Prototype/ArtilleryWagon]] '''artillery-wagon'''
****** [[Prototype/CargoWagon]] '''cargo-wagon'''
****** [[Prototype/FluidWagon]] '''fluid-wagon'''
****** [[Prototype/Locomotive]] '''locomotive'''
***** [[Prototype/SpiderVehicle]] '''spider-vehicle'''
**** [[Prototype/Wall]] '''wall'''
*** [[Prototype/Fish]] '''fish'''
*** [[Prototype/SimpleEntity]] '''simple-entity'''
*** [[Prototype/SpiderLeg]] '''spider-leg'''
*** [[Prototype/Tree]] '''tree'''
*** [[Prototype/Tree]] '''tree'''
*** [[Prototype/Turret]] '''turret'''
** [[Prototype/Explosion]] '''explosion'''
**** [[Prototype/AmmoTurret]] '''ammo-turret'''
*** [[Prototype/FlameThrowerExplosion]] '''flame-thrower-explosion'''
**** [[Prototype/ElectricTurret]] '''electric-turret'''
** [[Prototype/FireFlame]] '''fire'''
*** [[Prototype/Unit]] '''unit'''
** [[Prototype/FluidStream]] '''stream'''
*** [[Prototype/UnitSpawner]] '''unit-spawner'''
*** [[Prototype/Wall]] '''wall'''
** [[Prototype/FlyingText]] '''flying-text'''
** [[Prototype/FlyingText]] '''flying-text'''
** [[Prototype/Ghost]] '''ghost'''
** [[Prototype/HighlightBoxEntity]] '''highlight-box'''
** [[Prototype/ItemEntity]] '''item-entity'''
** [[Prototype/ItemEntity]] '''item-entity'''
** [[Prototype/LandMine]] '''land-mine'''
** [[Prototype/ItemRequestProxy]] '''item-request-proxy'''
** [[Prototype/Particle]] '''particle'''
** [[Prototype/ParticleSource]] '''particle-source'''
** [[Prototype/Projectile]] '''projectile'''
** [[Prototype/Projectile]] '''projectile'''
** [[Prototype/RailRemnants]] '''rail-remnants'''
** [[Prototype/ResourceEntity]] '''resource'''
** [[Prototype/Resource]] '''resource'''
** [[Prototype/RocketSiloRocket]] '''rocket-silo-rocket'''
** [[Prototype/Smoke]] '''smoke'''
** [[Prototype/RocketSiloRocketShadow]] '''rocket-silo-rocket-shadow'''
** [[Prototype/Smoke]] <abstract>
*** [[Prototype/SimpleSmoke]] '''smoke''' (for migration, cannot be used)
*** [[Prototype/SmokeWithTrigger]] '''smoke-with-trigger'''
** [[Prototype/SpeechBubble]] '''speech-bubble'''
** [[Prototype/Sticker]] '''sticker'''
** [[Prototype/Sticker]] '''sticker'''
** [[Prototype/TileGhost]] '''tile-ghost'''
* [[Prototype/Equipment]] <abstract>
** [[Prototype/ActiveDefenseEquipment]] '''active-defense-equipment'''
** [[Prototype/BatteryEquipment]] '''battery-equipment'''
** [[Prototype/BeltImmunityEquipment]] '''belt-immunity-equipment'''
** [[Prototype/EnergyShieldEquipment]] '''energy-shield-equipment'''
** [[Prototype/GeneratorEquipment]] '''generator-equipment'''
** [[Prototype/MovementBonusEquipment]] '''movement-bonus-equipment'''
** [[Prototype/NightVisionEquipment]] '''night-vision-equipment'''
** [[Prototype/RoboportEquipment]] '''roboport-equipment'''
** [[Prototype/SolarPanelEquipment]] '''solar-panel-equipment'''
* [[Prototype/EquipmentCategory]] '''equipment-category'''
* [[Prototype/EquipmentGrid]] '''equipment-grid'''
* [[Prototype/Fluid]] '''fluid'''
* [[Prototype/FuelCategory]] '''fuel-category'''
* [[Prototype/GuiStyle]] '''gui-style'''
* [[Prototype/Item]] '''item'''
* [[Prototype/Item]] '''item'''
** [[Prototype/Ammo]] '''ammo'''
** [[Prototype/AmmoItem]] '''ammo'''
** [[Prototype/Armor]] '''armor'''
** [[Prototype/Capsule]] '''capsule'''
** [[Prototype/Capsule]] '''capsule'''
** [[Prototype/Equipment]] <abstract>
*** [[Prototype/NightVisionEquipment]] '''night-vision-equipment'''
*** [[Prototype/EnergyShieldEquipment]] '''energy-shield-equipment'''
*** [[Prototype/BatteryEquipment]] '''battery-equipment'''
*** [[Prototype/SolarPanelEquipment]] '''solar-panel-equipment'''
*** [[Prototype/GeneratorEquipment]] '''generator-equipment'''
*** [[Prototype/ActiveDefenseEquipment]] '''active-defense-equipment'''
*** [[Prototype/MovementBonusEquipment]] '''movement-bonus-equipment'''
** [[Prototype/Gun]] '''gun'''
** [[Prototype/Gun]] '''gun'''
** [[Prototype/MiningTool]] '''mining-tool'''
** [[Prototype/ItemWithEntityData]] '''item-with-entity-data'''
** [[Prototype/ItemWithLabel]] '''item-with-label'''
*** [[Prototype/ItemWithInventory]] '''item-with-inventory'''
**** [[Prototype/BlueprintBook]] '''blueprint-book'''
*** [[Prototype/ItemWithTags]] '''item-with-tags'''
*** [[Prototype/SelectionTool]] '''selection-tool'''
**** [[Prototype/BlueprintItem]] '''blueprint'''
**** [[Prototype/CopyPasteTool]] '''copy-paste-tool'''
**** [[Prototype/DeconstructionItem]] '''deconstruction-item'''
**** [[Prototype/UpgradeItem]] '''upgrade-item'''
** [[Prototype/Module]] '''module'''
** [[Prototype/Module]] '''module'''
** [[Prototype/RailPlanner]] '''rail-planner'''
** [[Prototype/SpidertronRemote]] '''spidertron-remote'''
** [[Prototype/Tool]] '''tool'''
*** [[Prototype/Armor]] '''armor'''
*** [[Prototype/MiningTool]] '''mining-tool''' (for migration, cannot be used)
*** [[Prototype/RepairTool]] '''repair-tool'''
* [[Prototype/ItemGroup]] '''item-group'''
* [[Prototype/ItemGroup]] '''item-group'''
* [[Prototype/MapSettings]] '''map-settings'''
* [[Prototype/ItemSubGroup]] '''item-subgroup'''
* [[Prototype/ModuleCategory]] '''module-category'''
* [[Prototype/NamedNoiseExpression]] '''noise-expression'''
* [[Prototype/NoiseLayer]] '''noise-layer'''
* [[Prototype/NoiseLayer]] '''noise-layer'''
* [[Prototype/RailCategory]] '''recipe-category'''
* [[Prototype/Particle]] '''optimized-particle'''
* [[Prototype/Recipe]] '''recipe'''
* [[Prototype/Recipe]] '''recipe'''
* [[Prototype/RecipeCategory]] '''recipe-category'''
* [[Prototype/RecipeCategory]] '''recipe-category'''
* [[Prototype/ResourceCategory]] '''resource-category'''
* [[Prototype/Shortcut]] '''shortcut'''
* [[Prototype/Technology]] '''technology'''
* [[Prototype/Technology]] '''technology'''
* [[Prototype/Tile]] '''tile'''
* [[Prototype/Tile]] '''tile'''
 
* [[Prototype/TipsAndTricksItem]] '''tips-and-tricks-item'''
{{Template:LuaObjects}}
* [[Prototype/TrivialSmoke]] '''trivial-smoke'''
* [[Prototype/Tutorial]] '''tutorial'''
* [[Prototype/UtilityConstants]] '''utility-constants'''
* [[Prototype/UtilitySounds]] '''utility-sounds'''
* [[Prototype/UtilitySprites]] '''utility-sprites'''
* [[Prototype/VirtualSignal]] '''virtual-signal'''
</div>

Latest revision as of 19:40, 25 September 2023

The prototype docs have moved to a new website with an improved format. This documentation page can now be found here: https://lua-api.factorio.com/latest/tree.html.

This wiki page is no longer updated and will be removed at some point in the future, so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback on the forums.


Prototypes are used to specify what items, entities, technologies (etc) exist in the game and what their properties are. Prototypes are created and modified in the data phase.
See Tutorial:Mod settings for the settings stage documentation and lua-api.factorio.com for the runtime API documentation.

See prototype overview for a full overview of all prototypes and their properties.

Prototype hierachy

This is a list of all available prototype types and their inheritance structure.
Each point lists the link to the prototype page which is named after the class in the code, and the string that is used as the type name. Prototypes that have the type name <abstract> cannot be directly created, they simple exist as classes that multiple prototypes can inherit properties from.