Page 1 of 1

[Twinsen] [0.18.3] [Modding] NestedTriggerEffectItem tooltip ignores repeat count in a tooltip

Posted: Tue Feb 04, 2020 5:03 pm
by lovely_santa
Hi,

In Angels Exploration I am creating an ammo that shoots 2 (identical) projectiles:

Code: Select all

      ammo_type = {
      category = "cannon-shell",
      target_type = "direction",
      action = {
        type = "direct",
        repeat_count = 2,
        action_delivery = {
          type = "projectile",
          projectile = "heavy-explosive-cannon-projectile",
          starting_speed = 1,
          direction_deviation = 0.2,
          range_deviation = 0.1,
          max_range = 40,
          source_effects = {
            type = "create-explosion",
            entity_name = "explosion-gunshot"
          }
        }
      }
    },
And the projectile itself has a nested result that has area of effect damage:

Code: Select all

    action = {
      type = "direct",
      action_delivery = {
        type = "instant",
        target_effects = {
          {
            type = "damage",
            damage = {amount = 150, type = "physical"}
          },
          {
            type = "create-entity",
            entity_name = "explosion"
          }
        }
      }
    },
    final_action = {
      type = "direct",
      action_delivery = {
        type = "instant",
        target_effects = {
          {
            type = "create-entity",
            entity_name = "big-explosion"
          },
          {
            type = "nested-result",
            action = {
              type = "area",
              radius = 4,
              action_delivery = {
                type = "instant",
                target_effects = {
                  {
                    type = "damage",
                    damage = {amount = 300, type = "explosion"}
                  },
                  {
                    type = "create-entity",
                    entity_name = "explosion"
                  }
                }
              }
            }
          }
        }
      }
    },
Bilka suggested to report this as it seems that the NestedTriggerEffectItem just ignores the repeat count, and this is visible ingame for example in the item info where the direct damage is showing '2x', but the (nested) area of effect isn't
Capture.PNG
Capture.PNG (937.18 KiB) Viewed 2616 times
To quickly test this, I've attached the mod and a save file.
The code for the projectile and ammo can be found in prototypes/entities/ammo-heavy-cannon-shells.lua line 99-208.

Kind regards
lovely_santa

Re: [0.18.3][Modding] NestedTriggerEffectItem ignores repeat count

Posted: Tue Feb 04, 2020 6:10 pm
by Klonan
I think this is more of a modding feature request, nothing is broken, just it was never added to that specific trigger effect

Re: [0.18.3][Modding] NestedTriggerEffectItem ignores repeat count

Posted: Tue Feb 04, 2020 6:16 pm
by Bilka
Klonan wrote:
Tue Feb 04, 2020 6:10 pm
I think this is more of a modding feature request, nothing is broken, just it was never added to that specific trigger effect
How is "the tooltip is wrong" not broken?

Re: [0.18.3][Modding] NestedTriggerEffectItem ignores repeat count

Posted: Tue Feb 04, 2020 7:30 pm
by lovely_santa
Bilka wrote:
Tue Feb 04, 2020 6:16 pm
Klonan wrote:
Tue Feb 04, 2020 6:10 pm
I think this is more of a modding feature request, nothing is broken, just it was never added to that specific trigger effect
How is "the tooltip is wrong" not broken?
What bilka said ^^ The effect is working correctly, the tooltip is wrong, it's saying the area of effect damage is only applied once (as the '2x' is missing).

Re: [Twinsen] [0.18.3] [Modding] NestedTriggerEffectItem tooltip ignores repeat count in a tooltip

Posted: Tue Mar 24, 2020 3:34 pm
by Twinsen
Fixed in Version: 0.18.16, for Nested, Area and Cluster trigger effects.
Thanks for the mod and save.

Not sure if it was like that for a reason. So let me know if you notice some tooltips showing repeat count when it shouldn't.

Re: [Twinsen] [0.18.3] [Modding] NestedTriggerEffectItem tooltip ignores repeat count in a tooltip

Posted: Tue Mar 24, 2020 4:32 pm
by lovely_santa
Thanks! I'll make a report if I find any mistakes!