Author Topic: [fixed] allow-multiple-boosts=false ignored if same boost attached to >1 skills  (Read 1992 times)

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Hi found a workaround glitch to allowing multiple boosts, when multiple boosts = false

Glitch happens when you have same boost attached to multiple skills, if two of the same units are performing different skills the boost gets multiplied, even if Multi boost is set to false.

For example:
say i have a unit between 2 factories that grants hp regen of 5 each, but Multi boost is set to false, so unit only receives a boost from one. However if one factory is idle and the other is producing, then the Multi boost = false is void, and Hp regen of unit is now 10.

Screens Below:

Before
(click to show/hide)

After
(click to show/hide)

Some how there should be way to identify a boost as the same despite being in two different skills.

Windows 7 64
6 gigs ram
Nvidia GeForce card

Thanks!
« Last Edit: 11 November 2011, 16:21:52 by tomreyn »
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

MuwuM

  • Ornithopter
  • *****
  • Posts: 426
  • No Game without Move(ment)
    • View Profile
    • MuwuM - Lexicons
Re: Bug: Multiple boost=false yet still happen
« Reply #1 on: 9 November 2011, 10:13:59 »
Yes, that sound logical. The attack-boost is directly linked to the skills and is not named so the engine (probably) looks for same skill and not really the same boost. I think to avoid that bug we have to add something like a name tag for the attack-boost and look for attack-boost-name.

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Re: Bug: Multiple boost=false yet still happen
« Reply #2 on: 9 November 2011, 14:11:56 »
Yes, that sound logical. The attack-boost is directly linked to the skills and is not named so the engine (probably) looks for same skill and not really the same boost. I think to avoid that bug we have to add something like a name tag for the attack-boost and look for attack-boost-name.

Yes, or maybe we could have boosts be defined their own xml, like particles + upgrades? Might make it easier to detect if boost is the same, and make it easier to edit, since you don't have to edit each skill independently.

BTW just to confirm I tested it in Roman faction with 2 Generals, and same problem occurs, just have one stand still and the other walk around, you can even see the glow effect multiply.
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Bug: Multiple boost=false yet still happen
« Reply #3 on: 9 November 2011, 18:43:26 »
Yes, that sound logical. The attack-boost is directly linked to the skills and is not named so the engine (probably) looks for same skill and not really the same boost. I think to avoid that bug we have to add something like a name tag for the attack-boost and look for attack-boost-name.

Yes, or maybe we could have boosts be defined their own xml, like particles + upgrades? Might make it easier to detect if boost is the same, and make it easier to edit, since you don't have to edit each skill independently.
Hmm, I don't think we should split the unit XML for each attack boost. Instead, why not give each an id or name, like GAE does for emanations/effects?
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: Bug: Multiple boost=false yet still happen
« Reply #4 on: 10 November 2011, 16:07:13 »
Ok so do we want to both a) add a unique identifier per boost and b) allow for it to optionally be defined in a file so it can easily and accurately be re-used for multiple skills and possibly multiple units in the faction?

MuwuM

  • Ornithopter
  • *****
  • Posts: 426
  • No Game without Move(ment)
    • View Profile
    • MuwuM - Lexicons
Re: Bug: Multiple boost=false yet still happen
« Reply #5 on: 10 November 2011, 16:11:24 »
yes, with priority a) > b). To keep it backward compatibile we should generate autoname if name is not set.

ElimiNator

  • Airship
  • ********
  • Posts: 3,391
  • The MegaGlest Moder.
    • View Profile
Re: Bug: Multiple boost=false yet still happen
« Reply #6 on: 10 November 2011, 17:00:37 »
Maybe each boost can have a boost name.
Get the Vbros': Packs 1, 2, 3, 4, and 5!

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Bug: Multiple boost=false yet still happen
« Reply #7 on: 10 November 2011, 19:08:26 »
Why would they need a unique ID if they have a name? We could just auto-generate some name (in the same way an ID would be generated) for those which don't have a name. While those that do have a name, would work the same way as a "unique" ID, except rather than being unique, they show the boost is the same even if on a different unit.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

MuwuM

  • Ornithopter
  • *****
  • Posts: 426
  • No Game without Move(ment)
    • View Profile
    • MuwuM - Lexicons
Re: Bug: Multiple boost=false yet still happen
« Reply #8 on: 10 November 2011, 19:50:22 »
While those that do have a name, would work the same way as a "unique" ID, except rather than being unique, they show the boost is the same even if on a different unit.

I think your "name" and softcoders "unique id" are exactly the same...   an id don't have to be a number  and unique id is a hint, that it's always the same spell when it has the same unique id.

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: Bug: Multiple boost=false yet still happen
« Reply #9 on: 11 November 2011, 04:30:56 »
here is what i have in svn:

#1. original syntax works, in this case an auto generated name is used: attack-boost-autoname-x (where x is a unique #)

#2. attack-boosts can be explicitly named: <attack-boost name="test1">

In this way we can now properly enforce: <allow-multiple-boosts value="false" /> when a boost is used for multiple skills for the same unit. This leads to #3

#3. attack boosts may be optionally declared in the unit type's xml as follows:

Code: [Select]
<attack-boosts>
                <attack-boost name="test1">
<allow-multiple-boosts value="false" />
<radius value="8"/>
                <target value="foe"> <!-- ally foe faction unit-types all -->
<!-- <unit-type value="catapult" /> -->
                        </target>

<max-hp value="0" value-percent-multiplier="true"/>
<max-ep value="0"/>
<sight value="0"/>
<attack-strenght value="-25" value-percent-multiplier="true"/>
<attack-range value="0"/>
<armor value="0"/>
<move-speed value="-80" value-percent-multiplier="true"/>
<production-speed value="0"/>
<particles value="false">
<originator-particle-file path="gas_particles.xml"/>
<affected-particle-file path="gas_particles.xml"/>
</particles>
                 </attack-boost>
</attack-boosts>

Multiple attack-boost definitions may be created here. Then we may reference these named definitions in each skill with a single attack-boost line using only its name:

Code: [Select]
<attack-boost name="test1" />
This allows us to define one attack boost and use its definitions in multiple skills to avoid copy-paste and edit errors.




MuwuM

  • Ornithopter
  • *****
  • Posts: 426
  • No Game without Move(ment)
    • View Profile
    • MuwuM - Lexicons
Re: Bug: Multiple boost=false yet still happen
« Reply #10 on: 11 November 2011, 07:05:56 »
Thanks softcoder.  :thumbup: :thumbup: :thumbup:

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Cool Thanks! Random question does "<attack-boost name="test1" />" work in the unit xml that "test1" was defined in or could it also be used in another unit xml as well? Or would I have to define the boost at least once per unit xml?
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
currently the boost is per unit only. It would be much more complex (like sharing skills and commands) to add the ability to share across units and require external files (which at this point i think is likely not a good idea)

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
currently the boost is per unit only. It would be much more complex (like sharing skills and commands) to add the ability to share across units and require external files (which at this point i think is likely not a good idea)

Yea that's understandable, at least we only need to do it once per unit. Thanks!
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

 

anything