You must be logged in to post messages.
Please login or register

Scenario Design and Discussion
Moderated by Sebastien, Mr Wednesday

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Change Object VS Modify Attribute
posted 01-08-20 11:24 AM CT (US)   
Hello

TL DR question at the bottom.

To preface I am designing a standard Team island map however with Heros. I am also a noob with scenario editor. It is designed for 4 players and at the beginning of every match we move our selector unit onto the Hero we want to chose and we play the game as normal from there.

Each Hero has 2 triggers directly modifying its Stats, and some have 3.

The 2 triggers every hero has is an

Automatic LVL up Trigger:
Looping
Accumulate Attribute: Units Killed x
Change Object HP: Add x
Change Object Attack: Add x
Change Object Armor: Add x
Change Object Range: Add x
Modify Attribute: Set Units Killed 0

Static LVL up Trigger:
Non Looping
Change Object HP: Add x
Change Object Attack: Add x
Change Object Armor: Add x

The 3rd Trigger that only some of my Heros have involve missile counts, these are on the top of the load order:
Non Looping
Total Missle: Set x
Max Total Missile: Set x


My question is regarding the use of Modify Attribute over Change Object for the stats of HP, Damage, Range and Armor. I would like to swap the Change Object HP, Attack, Armor, Range to Modify Attribute HP, Attack, Armor Range to save on some trigger time.

I know there are some quirks with Modify Attribute that may make it function out of the ordinary however it would save me a great deal of time if I can just blanket edit "the" unit archetype over manually selecting the unit and Change Object its stats, since I have the scenario designed for 4 players I have 4 triggers dedicated to each Hero unit and then 4 more for each Player using the Change Object.

I have read that for Modify Attribute to work properly it has to be in a higher load order than the Change Object effect. Although this may only be applicable when you modify the missile count I am not sure if it also applies to Modify Attribute Attack, Armor etc.


TL DR
Is Modify Attribute for adding HP, Damage, Armor, Range reliable in Looping triggers and will these 4 Attributes be conflicted by load orders / other Change Object triggers of the same attribute.


P.S. is there any issue on adding armor past the hardcoded limits of range and armor? I know HP and Attack will cause the unit to die but not sure about the other the 2 aforementioned attributes.
Replies:
posted 01-08-20 04:00 PM CT (US)     1 / 7  
Unfortunately we don't know too much about the DE editor yet, but my guess is the modify attribute effect may be more computationally expensive than the Change Object HP (or other attribute) effects.

Someone would have to test it out though, and it likely would take a large number to make a difference.

"And Matt is a prolific lurker, watching over the forum from afar in silence, like Batman. He's the president TC needs, and possibly also the one it deserves." - trebuchet king
posted 01-08-20 05:06 PM CT (US)     2 / 7  
Thank you.
posted 01-08-20 11:27 PM CT (US)     3 / 7  
From what I know, Modify Attribute (HP, Armor, range, etc.) changes the stats for the entire unit type in the game's database.

On the other hand, Change Object (HP, Armor, range, etc.) changes the stats for units on the map.**


Example:

Modify Attribute > HP 100 > Pikeman... all pikeman will have 100 HP.

vs.

Change Object HP > HP 100 > Pikeman... selected pikemens will have 100 HP.

__________

So for your multiplayer scenario, it appears that you're trying to increase the HP, Armor, Attack, Range, etc., for a unit type after the player gained a certain number of kills.

The effect you would want to use is the Modify Attribute > Hp/Armor/Attack/Range, because it will affect all unit of a particular unit type that the player has created and will create.

_______________


** Note: When we use the effect Change Object ___ (such as change HP, armor, attack, name), it makes the unit no longer a part of the game's database, so it is no longer changeable by the effect Modify Attribute.

[This message has been edited by Alexandergreat3 (edited 01-08-2020 @ 11:42 PM).]

posted 01-09-20 10:29 AM CT (US)     4 / 7  
** Note: When we use the effect Change Object ___ (such as change HP, armor, attack, name), it makes the unit no longer a part of the game's database, so it is no longer changeable by the effect Modify Attribute.



^^^ This is amazing information thank you so much.

I did some testing last night but I found that (and I am not 100% if this is the cause) that Modify Attack seems to break Modify LOS if it comes after in the load order.

Also if the Modify Object and Change Object are in different triggers but both set to trigger at the start of the map it always appears that Change Object takes precedence. I circumvented this by adding a few second timer to trigger the Change Object after map loads. I will have to dig some more into it.

[This message has been edited by dooderek (edited 01-09-2020 @ 10:34 AM).]

posted 01-09-20 04:32 PM CT (US)     5 / 7  
Triggers fire in the order they were created, regardless of where they are in the list, FYI.

"And Matt is a prolific lurker, watching over the forum from afar in silence, like Batman. He's the president TC needs, and possibly also the one it deserves." - trebuchet king
posted 01-09-20 05:40 PM CT (US)     6 / 7  
** Note: When we use the effect Change Object ___ (such as change HP, armor, attack, name), it makes the unit no longer a part of the game's database, so it is no longer changeable by the effect Modify Attribute.

^^^ This is amazing information thank you so much.
You're welcome.

Normally, after a unit has been changed by "Change Object HP/Armor/Attack/Name," it is no longer affected by "Modify Attributes" or any technology research.

But there is a solution for this:

You can use the effect "Replace Object" to return the units back to their the default state.

> Example: An archer's name has been already been changed to "Legolas." You would like to research chemistry to give it flaming arrows.

So, before you can have the chemistry technology affect "Legolas", you need to return "Legolas" back to its default state using using the effect "Replace Object."

TRIGGER A

Effect 1
>> Replace Object
>> Set Objects (select the archer "Legolas")
>> Target Object List (any unit, ex: villager)
---this replaces the archer "Legolas" with a villager---

Effect 2 (happens right after effect 1)
Replace Object
>> Set Objects (select the archer "Legolas")
>> Target Object List (archer)
---this replace the villager with an archer (the default state)---

Note: Because the effect 2 happens quickly right after effect 1, you will not see "Legolas" turn into a villager and then turn back into an archer. What you will see is "Legolas" loses his name and it becomes "archer" again, with default stats.

[This message has been edited by Alexandergreat3 (edited 01-09-2020 @ 05:46 PM).]

posted 01-10-20 09:38 AM CT (US)     7 / 7  
Thank you!!!
Age of Kings Heaven » Forums » Scenario Design and Discussion » Change Object VS Modify Attribute
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Kings Heaven | HeavenGames