Damage modifier on 'Bonuses' GUI

Place to get help with not working mods / modding interface.
Post Reply
jimmy_1283
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Mon Oct 17, 2016 12:55 pm
Contact:

Damage modifier on 'Bonuses' GUI

Post by jimmy_1283 »

So I've got this mod, and I've added damage bonuses to Personal Laser Turrets and Discharge Defence Equipment.
image
However the damage bonus doesn't appear on the 'Bonuses' GUI.
image
Technology looks like this:

Code: Select all

{
    type = "technology",
    name = "personal-defense-damage-1",
    icon = "__Power Armor MK3__/graphics/technology/personal-defense-damage.png",
	icon_size = 128,
    effects =
    {
      {
        type = "ammo-damage",
        ammo_category = "electric",
        modifier = 0.1
      }
    },
    prerequisites = {"personal-laser-defense-equipment", "discharge-defense-equipment", "military-4"},
    unit =
    {
      count = 150,
      ingredients =
      {
        {"science-pack-1", 1},
        {"science-pack-2", 1},
        {"military-science-pack", 1}
      },
      time = 30
    },
    upgrade = true,
    order = "e-n-a"
  }
So how can I fix this? Any help will be greatly appreciated.

*Edit- Just to clarify, the damage bonus is being applied correctly in game, it's working as intended, it's just the 'Bonuses' GUI itself isn't displaying these bonuses.
Last edited by jimmy_1283 on Tue Oct 23, 2018 11:07 am, edited 2 times in total.

jimmy_1283
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Mon Oct 17, 2016 12:55 pm
Contact:

Re: Damage modifier on 'Bonuses' GUI

Post by jimmy_1283 »

Bumping because nobody responded?

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Damage modifier on 'Bonuses' GUI

Post by darkfrei »

Do you have ammo_category = "electric" by personal laser turrets?

jimmy_1283
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Mon Oct 17, 2016 12:55 pm
Contact:

Re: Damage modifier on 'Bonuses' GUI

Post by jimmy_1283 »

Yes, I've directly improved the 'electric' ammo type, as indicated by the code entry in the OP, which apparently doesn't have a bonus entry.

jimmy_1283
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Mon Oct 17, 2016 12:55 pm
Contact:

Re: Damage modifier on 'Bonuses' GUI

Post by jimmy_1283 »

Apologies for resurrecting this, however I never really got a helpful response, and am hoping to clear this up before I start tinkering with other areas of the game. Thanks in advance for any help.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Damage modifier on 'Bonuses' GUI

Post by eradicator »

Maybe this thread is useful. There seem to be two different bonuses for turrents.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

jimmy_1283
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Mon Oct 17, 2016 12:55 pm
Contact:

Re: Damage modifier on 'Bonuses' GUI

Post by jimmy_1283 »

Yes I looked through that thread previously, and while interesting I wasn't able to glean any information on my own problem, as I'm adding bonuses to power armor equipment and not turrets or conventional weapons.

As there aren't any bonuses for personal laser turrets or discharge defense equipment in vanilla, I had assumed that there simply wasn't an easy way to add those bonuses to the bonus GUI, I'm certainly hoping this isn't the case, but have been unable to find pertinent documentation to clarify.

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Damage modifier on 'Bonuses' GUI

Post by orzelek »

I think atached mod should still work. It adds bonus for electric weapon type and locale to make it display in gui properly.
Haven't used it in a while so no guarantees.
Attachments
defense-upgrades_0.0.1.zip
(2.31 KiB) Downloaded 39 times

jimmy_1283
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Mon Oct 17, 2016 12:55 pm
Contact:

Re: Damage modifier on 'Bonuses' GUI

Post by jimmy_1283 »

orzelek wrote:
Tue Oct 23, 2018 7:03 am
I think atached mod should still work. It adds bonus for electric weapon type and locale to make it display in gui properly.
Haven't used it in a while so no guarantees.
Are you sure it displays the bonuses in the GUI? The mod seems to still work fine but I'm not seeing an entry for the bonuses there.

Also thank you for helping, not too much interest being shown otherwise.

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Damage modifier on 'Bonuses' GUI

Post by orzelek »

jimmy_1283 wrote:
Tue Oct 23, 2018 10:40 am
orzelek wrote:
Tue Oct 23, 2018 7:03 am
I think atached mod should still work. It adds bonus for electric weapon type and locale to make it display in gui properly.
Haven't used it in a while so no guarantees.
Are you sure it displays the bonuses in the GUI? The mod seems to still work fine but I'm not seeing an entry for the bonuses there.

Also thank you for helping, not too much interest being shown otherwise.
Hmm thats interesting - they don't show in bonuses gui only on items themselves.
Since I added locale to it I think they were showing in gui then - might be a bug in base game. Unless locale is for tech descriptions to work properly... but still something should be shown in upgrade gui.

jimmy_1283
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Mon Oct 17, 2016 12:55 pm
Contact:

Re: Damage modifier on 'Bonuses' GUI

Post by jimmy_1283 »

Yeah I've done more or less the same as you've done, without using Deepcopy though; everything works as intended, except for bonuses appearing in the 'Bonuses' GUI, quite frustrating.

Post Reply

Return to “Modding help”