Replacing base mod technologies and ammo dammage

Place to get help with not working mods / modding interface.
Post Reply
Heliogenesis
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Aug 04, 2016 4:05 pm
Contact:

Replacing base mod technologies and ammo dammage

Post by Heliogenesis »

I'm trying to remove all the ammo technologies from the base game so I can have the technologies set by my mod, I think this is stopping me from changing the damage values in the piercing mags as well. Also, when I shoot a new type of shells from the basic shotgun it deals damage to me; I have it to shoot 20 shots at a time and don't know how to change damage per pellet. This is my second mod BTW.

ShinyAfro
Inserter
Inserter
Posts: 27
Joined: Mon Jan 04, 2016 1:27 pm
Contact:

Re: Replacing base mod technologies and ammo dammage

Post by ShinyAfro »

You can try removing them from the table
data.raw["type"]["name"]
or, in full, this should work:

Code: Select all

data.raw["technology"]["bullet-damage-1"] = nil
data.raw["technology"]["bullet-damage-2"] = nil
data.raw["technology"]["bullet-damage-3"] = nil
data.raw["technology"]["bullet-damage-4"] = nil
data.raw["technology"]["bullet-damage-5"] = nil
data.raw["technology"]["bullet-damage-6"] = nil
You can use that command to change values too, so if you ever wanted to change the prerequisites instead, you could do
data.raw["technology"]["bullet-damage-1"]["prerequisites"] = {"whatever tech you want"}
Just remember, no commas after data.raw lines or it will error up and they go outside of data:extend({}).
So, like this

Code: Select all

data.raw["technology"]["bullet-damage-1"] = nil
data.raw["technology"]["bullet-damage-2"] = nil
data.raw["technology"]["bullet-damage-3"] = nil
data.raw["technology"]["bullet-damage-4"] = nil
data.raw["technology"]["bullet-damage-5"] = nil
data.raw["technology"]["bullet-damage-6"] = nil
data:extend({This, is, where, i, would, put, my, code, if, i, had, any})

Heliogenesis
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Aug 04, 2016 4:05 pm
Contact:

Re: Replacing base mod technologies and ammo dammage

Post by Heliogenesis »

Thanks man, and if I use the data.raw is that only the base game stuff?

ShinyAfro
Inserter
Inserter
Posts: 27
Joined: Mon Jan 04, 2016 1:27 pm
Contact:

Re: Replacing base mod technologies and ammo dammage

Post by ShinyAfro »

Heliogenesis wrote:Thanks man, and if I use the data.raw is that only the base game stuff?
No, anything loaded before the particular mod in question, mods will load after their dependencies btw.

Heliogenesis
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Aug 04, 2016 4:05 pm
Contact:

Re: Replacing base mod technologies and ammo dammage

Post by Heliogenesis »

ShinyAfro wrote:
Heliogenesis wrote:Thanks man, and if I use the data.raw is that only the base game stuff?
No, anything loaded before the particular mod in question, mods will load after their dependencies btw.
Okay, thanks.

Post Reply

Return to “Modding help”