Factorio

Factorio

View Stats:
Canna Apr 8, 2018 @ 10:04am
What is a market?
I saw something called a market in the map generator and I dont get what it does
< >
Showing 1-6 of 6 comments
Yung Venuz Apr 8, 2018 @ 11:43am 
It lets's you buy things with coins.
BIT Bear Apr 8, 2018 @ 12:07pm 
A market is an entity in the game that modders can acces. You can spawn one in the default game with a command but it will be empty. However, with a simple script to your control.lua (or adding it as a seperate script then "require" it) you can add items to the market to your game, without downloading external mods. (This does however disable achievements!)

Here is an example market that I use for (and to test) my pvp mods:

--spawn a market command (add this to your control.lua in your savegame or scenario, or add it as a seperate script.) function spawn_market(cmd) --spawn a market local surface = game.player.surface local player = game.player local market_location = {x = player.position.x, y = player.position.y} market_location.y = market_location.y - 4 --spawns it directly north of you local market = surface.create_entity{name="market", position=market_location, force=force} market.add_market_item{price={{"coin", 12}}, offer={type="give-item", item="steel-axe"}} --change these items and prices to what you want market.add_market_item{price={{"coin", 4}}, offer={type="give-item", item="firearm-magazine"}} market.add_market_item{price={{"coin", 18}}, offer={type="give-item", item="piercing-rounds-magazine"}} market.add_market_item{price={{"coin", 114}}, offer={type="give-item", item="uranium-rounds-magazine"}} market.add_market_item{price={{"coin", 18}}, offer={type="give-item", item="land-mine"}} market.add_market_item{price={{"coin", 24}}, offer={type="give-item", item="grenade"}} market.add_market_item{price={{"coin", 280}}, offer={type="give-item", item="flamethrower"}} market.add_market_item{price={{"coin", 38}}, offer={type="give-item", item="flamethrower-ammo"}} market.add_market_item{price={{"coin", 72}}, offer={type="give-item", item="rocket"}} market.add_market_item{price={{"coin", 512}}, offer={type="give-item", item="rocket-launcher"}} market.add_market_item{price={{"coin", 36}}, offer={type="give-item", item="night-vision-equipment"}} market.add_market_item{price={{"coin", 62}}, offer={type="give-item", item="solar-panel-equipment"}} market.add_market_item{price={{"coin", 840}}, offer={type="give-item", item="fusion-reactor-equipment"}} market.add_market_item{price={{"coin", 448}}, offer={type="give-item", item="modular-armor"}} market.add_market_item{price={{"coin", 960}}, offer={type="give-item", item="power-armor"}} market.add_market_item{price={{"coin", 2140}}, offer={type="give-item", item="power-armor-mk2"}} market.add_market_item{price={{"coin", 144}}, offer={type="give-item", item="car"}} market.add_market_item{price={{"coin", 684}}, offer={type="give-item", item="tank"}} market.add_market_item{price={{"coin", 38}}, offer={type="give-item", item="gun-turret"}} market.add_market_item{price={{"coin", 74}}, offer={type="give-item", item="flamethrower-turret"}} market.add_market_item{price={{"coin", 248}}, offer={type="give-item", item="roboport"}} market.add_market_item{price={{"coin", 34}}, offer={type="give-item", item="construction-robot"}} market.add_market_item{price={{"coin", 3}}, offer={type="give-item", item="solid-fuel", count=8}} market.add_market_item{price={{"coin", 33}}, offer={type="give-item", item="rocket-fuel"}} market.add_market_item{price={{"coin", 64}}, offer={type="give-item", item="nuclear-fuel"}} end commands.add_command("market", 'Build a market near you.', spawn_market) --to use the command use "/market"

Hope that answers your question and more! :steamhappy:
Last edited by BIT Bear; Apr 8, 2018 @ 12:12pm
Cryoge Apr 8, 2018 @ 12:20pm 
And its mostly for creating scenarios for other players.
Canna Apr 8, 2018 @ 5:33pm 
damn, thx
mP3+Z Apr 9, 2018 @ 6:53am 
I see the great potential with market system to make this game more like Tropico or Banished.

But it still some rule, for examle, you can only sell your product and not allow to buy the materials, so you still need to produce the product by your own. instead, you can buy some awesome stuff that you cannot produce.

Also, It's good way to consume the stuff you dont need and keep the production line clean, especially in the middle-late part of the game.
Last edited by mP3+Z; Apr 9, 2018 @ 6:56am
luziferius Apr 9, 2018 @ 3:29pm 
Check out the »tight space« challenge campaign included in the base game. It uses the market, to let you buy machines for coins.
< >
Showing 1-6 of 6 comments
Per page: 1530 50

Date Posted: Apr 8, 2018 @ 10:04am
Posts: 6