Hello. I'm the visual type of person, I better understand if I see something rather then read. So I'm asking for a bit of an example help. I want to add a technology (e.g. "Personal Enhancer"), completely new, which is enabled after researching the personal laser turret, and which adds 2 points of laser damage to the personal laser turret, and it gives access to another research ("Personal Enhancer 2") which adds 2 points more.I think I can do this alone but the "order" thingy and some else confuses me a bit. Can some make me this example? Hope it's not too much.
Thanks.
add researh, change item
-
- Burner Inserter
- Posts: 8
- Joined: Sat Jan 18, 2014 3:18 pm
- Contact:
Re: add researh, change item
Because the personal laser defense uses an 'electric' type ammo (see data\base\prototypes\equipment\equipment.lua, line 218) what you would do is create a technology using the "ammo-damage" modifier (see data\base\prototypes\laser-turret-upgrades.lua for use and Wiki Technology-Modifier for a list of other available modifiers) and specify the ammo_category as "electric".
Here is an example data.lua file for the techThe "prerequisites" state which technologies must already be researched before the one being defined can be researched (in the first, the personal laser defense, in the second the first damage upgrade). "upgrade" will hide future technologies (upgrade 2 in this example, but if you had a damage-36 it would hide all 37) until the previous upgrade has been researched. "order" is simply a string (aka text) that is used to determine which technology should be shown first in the Research menu (based on alphabetical order, a before b and c after b, when compared to other order strings). Note: I copied the laser turret damage tech for this example and only changed the names, prerequisites, and effects (so icons, research cost and time, and the order are the same).
at least I'm 90% certain that would work, I haven't actually tried this particular code Should it give you any issues or you have any other questions just make another post here, I'll be happy to help
Here is an example data.lua file for the tech
Code: Select all
data:extend({
{
type = "technology",
name = "basic-laser-defense-equipment-damage-1",
icon = "__base__/graphics/technology/laser-turret-damage.png",
effects =
{
{
type = "ammo-damage",
ammo_category = "electric",
modifier = "0.1"
}
},
prerequisites = {"basic-laser-defense-equipment"},
unit =
{
count = 50,
ingredients =
{
{"science-pack-1", 1},
{"science-pack-2", 1}
},
time = 30
},
upgrade = "true",
order = "e-n-a"
},
{
type = "technology",
name = "basic-laser-defense-equipment-damage-2",
icon = "__base__/graphics/technology/laser-turret-damage.png",
effects =
{
{
type = "ammo-damage",
ammo_category = "electric",
modifier = "0.2"
}
},
prerequisites = {"basic-laser-defense-equipment-damage-1"},
unit =
{
count = 50,
ingredients =
{
{"science-pack-1", 1},
{"science-pack-2", 1}
},
time = 30
},
upgrade = "true",
order = "e-n-a"
},
})
at least I'm 90% certain that would work, I haven't actually tried this particular code Should it give you any issues or you have any other questions just make another post here, I'll be happy to help
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me
Or drop into #factorio on irc.esper.net
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me
Or drop into #factorio on irc.esper.net
-
- Burner Inserter
- Posts: 8
- Joined: Sat Jan 18, 2014 3:18 pm
- Contact:
Re: add researh, change item
ok, i'll try
in between, my second question is - are there limits for the armors' "grid"?
in between, my second question is - are there limits for the armors' "grid"?
Re: add researh, change item
The limit is the screen.
Also adding a modifier to electric will also increase laser turret damage, same as the laser turret damage tech increases the personal laser damage
Also adding a modifier to electric will also increase laser turret damage, same as the laser turret damage tech increases the personal laser damage
-
- Burner Inserter
- Posts: 8
- Joined: Sat Jan 18, 2014 3:18 pm
- Contact:
Re: add researh, change item
somehow I can't see the "vanilla" damage of the turrets, or am I blind...
Re: add researh, change item
you can, check in dytech/prototype/entity/base-edits.lua in my mod.linainverse wrote:somehow I can't see the "vanilla" damage of the turrets, or am I blind...
that will show you the easy way to modify the vanilla items and entities.
basicly you copy the base settings, and modify them to your wishes. the game will then override the base game content on load of the game
Creator of:
- DyTech
- DyWorld
- DyWorld-Dynamics
- DyWorld-Dynamics 2
Active since Factorio 0.6
- DyTech
- DyWorld
- DyWorld-Dynamics
- DyWorld-Dynamics 2
Active since Factorio 0.6
Re: add researh, change item
Thats nit what he means I think...Dysoch wrote:you can, check in dytech/prototype/entity/base-edits.lua in my mod.linainverse wrote:somehow I can't see the "vanilla" damage of the turrets, or am I blind...
that will show you the easy way to modify the vanilla items and entities.
basicly you copy the base settings, and modify them to your wishes. the game will then override the base game content on load of the game
There is a laser shooting speed and laser damage but I think it is only shown when laser turrets are researched.
-
- Burner Inserter
- Posts: 8
- Joined: Sat Jan 18, 2014 3:18 pm
- Contact:
Re: add researh, change item
It's not working.
And
((
And
is notAlso adding a modifier to electric will also increase laser turret damage, same as the laser turret damage tech increases the personal laser damage
((