Page 1 of 1

Damage modifier on 'Bonuses' GUI

Posted: Mon Aug 27, 2018 8:41 am
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.

Re: Damage modifier on 'Bonuses' GUI

Posted: Fri Aug 31, 2018 12:54 pm
by jimmy_1283
Bumping because nobody responded?

Re: Damage modifier on 'Bonuses' GUI

Posted: Sat Sep 01, 2018 1:17 pm
by darkfrei
Do you have ammo_category = "electric" by personal laser turrets?

Re: Damage modifier on 'Bonuses' GUI

Posted: Sat Sep 01, 2018 4:54 pm
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.

Re: Damage modifier on 'Bonuses' GUI

Posted: Mon Oct 22, 2018 3:53 am
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.

Re: Damage modifier on 'Bonuses' GUI

Posted: Mon Oct 22, 2018 8:43 am
by eradicator
Maybe this thread is useful. There seem to be two different bonuses for turrents.

Re: Damage modifier on 'Bonuses' GUI

Posted: Tue Oct 23, 2018 4:10 am
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.

Re: Damage modifier on 'Bonuses' GUI

Posted: Tue Oct 23, 2018 7:03 am
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.

Re: Damage modifier on 'Bonuses' GUI

Posted: Tue Oct 23, 2018 10:40 am
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.

Re: Damage modifier on 'Bonuses' GUI

Posted: Tue Oct 23, 2018 5:19 pm
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.

Re: Damage modifier on 'Bonuses' GUI

Posted: Wed Oct 24, 2018 1:29 am
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.