Jump to content

Can't set -1 value in Damage Range setting

Pending 3.4.0

0xBADF00D
0xBADF00D

Posted

Combat Stats -> Damage Range Can't set -1 value plugin say "You have entered an invalid value for this parameter" from the GUI /preset
Even though the description says, "Use -1 for unlimited range."

While I'm here, I have a suggestion: it would be nice to add a toggle setting that notifies the player with a message like "You can't damage this NPC because you're too far away."

  • Love 1
aimacak

Posted

11 hours ago, 0xBADF00D said:

Combat Stats -> Damage Range Can't set -1 value plugin say "You have entered an invalid value for this parameter" from the GUI /preset
Even though the description says, "Use -1 for unlimited range."

While I'm here, I have a suggestion: it would be nice to add a toggle setting that notifies the player with a message like "You can't damage this NPC because you're too far away."

Hello, thanks, ill pass these things to KpucTaJI.
Before fix you can edit it manually in data/NpcSpawn/Preset/, and ii will works, because its default value for new preset and it dont rewrite via reload plugin.
Or you can change this in NpcSpawn.cs:
change this:

                    case 36:
                        if (singleValue >= 0f)
                        {
                            config.DamageRange = singleValue;
                            success = true;
                        }

to this:
 

                    case 36:
                        if (singleValue >= -1f)
                        {
                            config.DamageRange = singleValue;
                            success = true;
                        }

 

  • Like 1
0xBADF00D

Posted

Yes, that's what I ended up doing, editing the JSON file directly, but I still wanted to report this bug

  • Like 1
aimacak

Posted

@0xBADF00D
Hello again, I spoke with KpucTaJI, and it turns out there’s an error in the parameter description — you can use 0.
Your suggestion has been added to the roadmap; I can’t promise any specific timeline for its implementation, but I think KpucTaJI will add it in one of the next updates.

About Us

Codefling is the largest marketplace for plugins, maps, tools, and more, making it easy for customers to discover new content and for creators to monetize their work.

Downloads
2.9m
Total downloads
Customers
11.9k
Customers served
Files Sold
169.1k
Total sales
Payments
3.7m
Processed total
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.