Jump to content


raksha0xx

Member Since 24 Mar 2012
Offline Last Active Nov 19 2017 04:46 PM

Posts I've Made

In Topic: Mod-Textures and -Models ignored on Windows 10?

25 August 2017 - 10:27 AM

Yeah already tried that, compatibility-mode with winxp sp3 as well.


In Topic: ChainedButton and UpgradeGroupsToRemove cause crashes

10 March 2017 - 05:27 PM

Hey, Sorry for the late answer. Thanks for the idea, but I already managed to work around this issue a few days ago.

And if I remember correctly, I already tried an approach, where the upgrades had a non-zero buildtime. It didn't work either.

 

I actually didn't know how to remove single upgrades. Obviously the moduleTag in the first post to remove upgrade-groups could be changed to look like this:

    Behavior = RemoveUpgradeUpgrade Remove_UpgradeOnAllOnMoney
        TriggeredBy        = Upgrade_AllOnMoneyKillSwitch
        UpgradeToRemove = Upgrade_AllOnMoney
    End

In the working code I used another moduleTag, because I didn't know that line of code.

The workin code looks like this:

Spoiler

 

To explain it a bit further: The building can activate a special power, triggered by an upgrade that can be bought/activated.

Then it produces Money (by an external money-producing unit, spawned by the special power) but nothing else.

Everything that can be built requires 'Upgrade_AllOnMoneyKillSwitch', which is removed by 'Upgrade_AllOnMoney'.

 

To Re-enable the normal function of the building, 'Upgrade_AllOnMoneyKillSwitch' can be activated, which removes 'Upgrade_AllOnMoney' and destroys the 'money-producer', by using the 2nd special power.


In Topic: Health-based buffs

13 February 2017 - 11:57 PM

No problem. Yeah, I totally forgot, that you can make external .inc-files, that can be easily included. I hope the engine of BFME can deal with this approach. But if you happen to find an easier way, feel free to share it ;)

In Topic: Health-based buffs

11 February 2017 - 06:31 PM

Hey Brabox,

 

I think there could be a way to do this, but it's very time-consuming.

It would be like your idea of recalculating the health.

In order to achieve that, you would have to add upgrades that are granted by the bonus you want give.

ModifierList DainMightyRageBuff
    Category                    = BUFF
    Modifier                    = DAMAGE_MULT 150%
    FX                            = FX_DainMightyRageBuff
    Upgrade = Upgrade_HealthAdded Delay:0        // give drafted upgrade after specified delay
    Upgrade = Upgrade_HealthRemoved Delay:29999
    Duration                    = 30000
End

ModifierList DainMightyRageHealthAdded
    Category                    = BUFF
    Modifier                    = HEALTH_MULT 133%
End

ModifierList DainMightyRageHealthRemoved
    Category                    = BUFF
    Modifier                    = HEALTH_MULT 67%
End

The first upgrade should trigger the "DainMightyRageHealthAdded"-Modifier. Therefore you would have to add an attributemodifierbehavior, that's triggered by the first upgrade, to every unit that should receive that bonus.

The same procedure is needed to for the second upgrade and the "DainMightyRageHealthRemoved"-Modifier.

As this would just be a one-way-ticket, you have to add another behavior, that removes the old upgrade from those units:

    Behavior = RemoveUpgradeUpgrade Remove_UpgradeOnAllOnMoney
        TriggeredBy        = Upgrade_HealthRemoved
        UpgradeGroupsToRemove = DainMightyRage_HealthAdded  ;;; removes all upgrades included by that group (specified by GroupName = DainMightyRage_HealthAdded)
    End

As I said, it would be an enormous time-effort, especially if you'll do that for all different leaderships and buffs, that have to stack.

 

I still hope, that it helped somehow...