Removing Enemy Armor

Place to get help with not working mods / modding interface.
Post Reply
User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2124
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Removing Enemy Armor

Post by Ranakastrasz »

I was trying to do some experiments on trying to make Bullets remain effective for the whole game, as well as a few other tweaks to alter combat balance, and I decided that, aside from adding more tiers of bullets, removing enemy armor, and increasing health might have an interesting effect.

However, I was unable to figure out how to alter/add those effects. I managed to alter the health, although it doesn't display the mod's name like it does for other mods.

Code: Select all

   data.raw["unit"]["small-biter"].max_health = 15
   --data.raw["unit"]["small-biter"].["physical"].decrease = 1
    --[[{
      {
        type = "physical",
        decrease = 0, -- 0
      },
      {
        type = "explosion",
        percent = 0 -- 0 
      }
    }]]
   data.raw["unit"]["medium-biter"].max_health = 125 -- 75
   --[[data.raw["unit"]["medium-biter"].resistances = 
    {
      {
        type = "physical",
        decrease = 0, -- 4
      },
      {
        type = "explosion",
        percent = 0 -- 10
      }
    }]]
   data.raw["unit"]["big-biter"].max_health = 500 -- 375
   --[[data.raw["unit"]["big-biter"].resistances = 
    resistances = 
    {
      {
        type = "physical",
        decrease = 0, -- 8
      },
      {
        type = "explosion",
        percent = 0 -- 20
      }
    }]]
   data.raw["unit"]["small-spitter"].max_health = 10 -- 10
   --[[data.raw["unit"]["small-spitter"].resistances = 
    resistances =
    {
    }]]
   data.raw["unit"]["medium-spitter"].max_health = 75 -- 50
   --[[data.raw["unit"]["medium-spitter"].resistances = 
    {
      {
        type = "explosion",
        percent = 0 -- 15
      }
    }]]
   data.raw["unit"]["big-spitter"].max_health = 300 -- 200
   --[[data.raw["unit"]["big-spitter"].resistances = 
    {
      {
        type = "explosion",
        percent = 0 -- 30
      }
    }]]
I've tried several permutations, but none of them appear to be valid, and I lack the LUA experience required to figure out why. I am unsure how to even determine what I need to do.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16

Rahjital
Filter Inserter
Filter Inserter
Posts: 435
Joined: Thu May 29, 2014 10:44 am
Contact:

Re: Removing Enemy Armor

Post by Rahjital »

Try this:

Code: Select all

data.raw["unit"]["medium-biter"].resistances = nil

n9103
Smart Inserter
Smart Inserter
Posts: 1067
Joined: Wed Feb 20, 2013 12:09 am
Contact:

Re: Removing Enemy Armor

Post by n9103 »

although it doesn't display the mod's name like it does for other mods.
Pretty sure this is because you're not doing anything to the actual definition of the biters, but changing the working interpretation of their definition.
... If that makes any sense, great, but I feel like it's a bit circuitous.
Colonel Failure wrote:You can lose your Ecologist Badge quite quickly once you get to the point of just being able to murder them willy-nilly without a second care in the world.

User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2124
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: Removing Enemy Armor

Post by Ranakastrasz »

That does work. However, I am still interested in learning how both how to edit those values, and more importantly, how to myself figure out what the correct string is to access any particular variable.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16

n9103
Smart Inserter
Smart Inserter
Posts: 1067
Joined: Wed Feb 20, 2013 12:09 am
Contact:

Re: Removing Enemy Armor

Post by n9103 »

There's not really any one string to do that (that I know of).
All actions directed at variables have to be in a specific context.
Additionally, there are read only variables and such in the code that can't be altered.

Not sure if that's what you're talking about, but seems like it.
In either case, I would recommend looking at other mods' control files and/or the wiki (somewhat out of date) to find references to what you're looking for.
Colonel Failure wrote:You can lose your Ecologist Badge quite quickly once you get to the point of just being able to murder them willy-nilly without a second care in the world.

Post Reply

Return to “Modding help”