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

Scenario Design and Discussion
Moderated by Sebastien, Mr Wednesday

Hop to:    
Welcome! You are not logged in. Please Login or Register.193 replies, Sticky
Age of Kings Heaven » Forums » Scenario Design and Discussion » UP 1.5 Effects & How to use them in Maps
Topic Subject:UP 1.5 Effects & How to use them in Maps
« Previous Page  1 2 3 ··· 6  Next Page »
posted 08-31-17 09:19 AM CT (US)         
Hello friends! This post was last updated 23/08/2019!

This thread is for discussing User Patch 1.5 and its application as a designer's tool. This first post will give you an overview of the most powerful element; UP-Effect, but following this are more posts going into more detail or other topics.

Post 2 - UP-Effect vs UP_Attribute
Post 3 - Attributes and Effects
Post 4 - Other features

Investigations are posts documenting research into particular elements of UP-Effects and their uses:
#1 - Using UPGRADE_UNIT: Achieving Off-Grid Resource Piles In-Game.
#2 - Using UPGRADE_UNIT: Preventing Villagers taking jobs.
#3 - Train Location: Does Class Matter?
#4 - Train Location: Type differences and cool ideas.
#5 - Using UPGRADE_UNIT: Examining Cross-Type Upgrading & Upgrade Leftovers.
#6 - Using UPGRADE_UNIT: Cross-Type Limits and Freeze-Frame Units.

Extra Info:
Full List of all non-UP Resources, from AGE 2019.

What is the "UP Effect"?
The UP Effect, or up-effect, is a special feature of UserPatch 1.5-onwards that -- put simply -- allows some basic data modding within the Scenario Editor through manipulation of tech effects.
Tech effects can alter a lot more attributes than the standard editor, accross every unit of that ID (or class).

UserPatch has opened the doors to entirely different games distributed through scenarios and random map scripts. It is, in a word, Brilliant.

I'm over-exaggerating how great it is.
  • Well, kinda. Let's look at it from a technical view.

    "up-effect" works by using AoC's Technology Effect system. Everything that can be achieved through technology effects can be achieved through up-effects (with some notable additions)

    Scripter64, creator of UserPatch, has provided some outlining documentation on how to use the up-effect, how it can translate to random map scripts, and provided a few examples. However, I feel this doesn't go into much depth and doesn't serve well enough to get your creative juices going.
    I have also been answering a lot of questions on the topic of using up-effects, and what they can achieve.

  • There are two types of up-effect.
    These are up-effect, and up-attribute. I will talk more about up-attribute later.

  • up-effect can be a little confusing to use at first.
    But you'll get the hang of it!

    How do I use one?
    To use a up-effect, you need a Display Instructions trigger. To prepare it for an up-effect, set the timer to 99999999 (UPDATE: The latest beta now only needs 99999 or more!) and the number field to 9 -- like so:

    One thing you might struggle with is remembering all the 9's for the timer field. You can't just put any old number in there (unless Scripter changes that in the future), you need to put 8 9's. When typing it, I tend to 4 9's, then pause a split second, then the other 4 9's, to keep track.

    Next, we start the "Message" field with "up-effect". Until you get used to it, I suggest also completing it with 0,0,0,0,0,1 -- Like this:

    This should hopefully help you to keep track of all your numbering. The up-effects all rely on numbers, and there must always be six of them. Let's dissect them:

    In Scripter's documentation, he writes:
    up-effect player,effect,item,attr,value,style
    - player: 0 for default (all) or 1-8 for a specific player
    - effect: the id of an Effect such as SET_ATTRIBUTE (0)
    - item: the id of the Item to modify such as VILLAGER_CLASS (904)
    - attr: the id of the Attribute such as ATTR_HITPOINTS (0)
    - value: the value to set
    - style: 2 if value should be divided by 100; otherwise 1
    Looking at that, a quick glance might make you think that you can write something like "up-effect 0,SET_ATTRIBUTE,VILLAGER_CLASS,ATTR_HITPOINTS,200,1" but this isn't correct. The reason Scripter has written these block-capital words is probably due to the way up-effects can be put into random map scripts, using these words instead of numbers like we do in a scenario.

    So, Scripter provides an example:
    up-effect 0,0,904,0,100,1
    The top line is what you'd do in our Display Instructions trigger. The bottom line is what you'd put in your random map script. I haven't experimented with the random map script functions yet, and probably won't ever. So I won't talk much about them here, but it is useful to note that there's potential for making random map scripts that, for example, incorporate X-Patch's balance changes, without needing the mod. This is something that, whilst I won't use it (probably), should definitely not be overlooked as a cool side-effect.

    So instead of just copying Scripter's example, let's do our own.

    A quick unit modification example
    First, we want to choose the player for our effect. You can use 0, 1, 2, 3, 4, 5, 6, 7 or 8. 0 means "All Players", 1-8 should be self explanatory. I haven't experimented with the Gaia attributes much, but as I understand it -- if you want to specifically effect ONLY gaia, you need to set player number to 0 and use negative numbers in your "effect" field.
    I'm going to use player 1.

    Next, we want to decide on our "effect". I'm going to keep things simple, and ignore everything that doesn't affect a unit. In the documentation, under file "UserPatchConst.rms", Scripter writes:
    #const SET_ATTRIBUTE 0
    #const ADD_ATTRIBUTE 4
    #const MUL_ATTRIBUTE 5
    #const ENABLE_OBJECT 2
    #const UPGRADE_UNIT 3
    If you were writing a Random Map Script, you'd use these const names. We however are only interested in the numbers.

    So, these numbers:
  • 0 will set an attribute outright. For example, Health, Range, Movement Speed, etc. will be set to the value you specify.
  • 2 will enable or disable a unit. This means that you can, for example, enable a Britons player to train Plumed Archers instead of longbowmen by doing up-effect 0,2,8,0,0,1 followed by up-effect 0,2,763,1,0,1.
  • 3 will upgrade a unit. This is what happens when you, for example, research Man-At-Arms. There's various things you can do with this and all of them are cool. Shape shifting units? Changing looks but keeping stats? It's all there.
  • 4 is like 0, but ADDs to what already exists. For example, you can ADD 50 HP to a 100 HP unit, and get 150 HP. I don't want to insult your intelligence by providing an example image though.
  • 5 MULTIPLIES the attribute, and here you might want to be careful. You could, if you set the "Style" wrong, accidentally multiply a unit's speed by 110x, instead of 1.10x. It's also worth noting that stacking Multiplied attributes is exponential. It multiplies the previous stats, NOT the BASE stats. If you multiply 100 HP by 1.10, then do it a second time, the second time around it will be multiplying 110 HP by 1.10.
    35+10% HP-> 39+10% HP->

    So, have you decided what you want to try? I'm going to SET, so my second number in the up-effect line will be 0. It looks the same as before, but yours might not.

    The third number is a big deal. This is what we're going to effect. There's two ways we can do this.
  • Use the Unit ID number.
  • Use the Class ID number, + 900.
    up-effects can effect any individual unit whose ID is between 0-900, and 1000-1959. IDs in the 900-999 range are actually reserved for counting data (According to Scripter), so he's made use of them for Classes. This means that if you want to affect a Longbowman like in my above example, you want "8". But if you want to affect ALL archer units, you'd use "900", because an Archer is class 0.
    For reference, Here is a post I made, showing the various classes (and Attributes) listed in AGE 2017.

    In our experiment, I'm going to pick number 24 - The Crossbowman. Now my up-effect line looks like this:

    (I'll award bonus points to anyone who can point out how dangerous this line is for my crossbowman, right now.)

    Our fourth number is also an important one, and it changes depending on our second number. If our second number is 0 (Set), 4 (Add) or 5 (Mult.), this fourth number is an Attribute ID. But, if our second number was, for example, 2 (Enable Object), then this fourth number would be either 0 (To Disable), or 1 (To Enable). Scripter's documentation explains some of these, albeit a bit confusingly. EG, for "Enable Object" he writes:
    /* Type: ATTR_DISABLE or ATTR_ENABLE, Value: 0 */
    You have to scroll further into the document to even find where "ATTR_DISABLE" and "ATTR_ENABLE" translate from Random Map Script text to a Scenario number:
    /* Define Effect Type Constants */
    #const ATTR_DISABLE 0
    #const ATTR_ENABLE 1
    So, in our case we just want to do some simple messing with Attributes. So, your second number should be 0, 4 or 5. We want to then pick an Attribute from the list:

    But wait!
    Scripter has also added some special ones:
    /* New: Category 80+ */
    #const ATTR_GARRISON_TYPE 30
    #const ATTR_DATA_FLAGS 31

    /* New: Category 70+ */
    #const ATTR_HERO_STATUS 40/* ADD_ATTRIBUTE append flags */
    #const ATTR_ATTACK_DELAY 41/* ADD_ATTRIBUTE enabled */
    #const ATTR_TRAIN_BUTTON 43
    #const ATTR_BLAST_LEVEL 44
    #const ATTR_HERO_HEAL_TIME 45/* ADD_ATTRIBUTE enabled */
    #const ATTR_SHOWN_ATTACK 46/* ADD_ATTRIBUTE enabled */
    #const ATTR_SHOWN_RANGE 47/* ADD_ATTRIBUTE enabled */
    #const ATTR_SHOWN_MELEE_ARMOR 48/* ADD_ATTRIBUTE enabled */
    #const ATTR_SHOWN_PIERCE_ARMOR 49/* ADD_ATTRIBUTE enabled */

    /* New: Category 10+ */
    #const ATTR_NAME_ID 50
    #const ATTR_CREATE_SDESC_ID 51
    #const ATTR_CREATE_LDESC_ID 52/* unused (becomes ATTR_CREATE_SDESC_ID + 20000) */
    #const ATTR_TERRAIN_ID 53
    #const ATTR_TRAITS 54/* ADD_ATTRIBUTE append flags */
    #const ATTR_CIV_ID 55
    #const ATTR_PIECE 56
    #const ATTR_DEAD_ID 57
    There's a lot you can do. I've made a post following this one listing all of the attributes, how they're used and what they can do. For this example, I'm just going to pick attribute ID 16 -- But I highly recommend experimenting.

    If you look at the list of attributes, you'll be able to find Attribute 16 and get an idea of what it can do. I'll give you a clue -- It's used by the tech "Chemistry". I advise you skip Attribute's 9 and 8, as they need some special maths which I will explain later.

    Our fifth number is the "Value". In my case, I need a Unit ID. In some cases you might want to use percentages, or float values. For that, you'll need to remember that a value of "100", with a "Style" (The sixth number) of 2, will make it "1.0". You may be wondering why you can't just write in "1.0", and I wonder that too. But clearly -- if that was possible then Scripter would of let us do it that way.

    So, I've went ahead and picked a Unit ID for my Attribute 16:

    My "Style" -- The sixth number -- will remain as 1. This is because I don't need to convert my fifth number into a percentage. If you were doing something like, adding 10% to the Longbowman as above, your Style here would be 2 and your Value would be 110. This turns into 1.10x, or 110% of the original value. The Effect (Second number) would be 5, because you're Multiplying.

    Something to bare in mind is that this projectile change could be overwritten if I were to later research Chemistry.

    Now, this example might be a bit extreme. Changing projectiles is a very specific effect. But, hopefully you've experimented and chosen your own values and attributes to change. Be careful when changing Projectile IDs, though. If you choose an ID that is not a valid projectile unit, the likely case will be that your attacks will fire no projectile and do no damage, and unlike Melee Units that have their projectile ID set to -1, a projectile ID set to something like a Watch Tower would cause the game to try spawning a watch tower and failing, thus the game would deduce that the projectile did not hit and do no damage.

    This could be drastic in a scenario where the projectile might not change for a long time into the map, on a specific unit. The map designer might not even notice that he's firing blanks, because he's not firing a proper Projectile unit.

    Off the top of my head, here's some other examples of up-effects for units:
    up-effect 1,0,550,0,32767,1 -- The maximum health a unit can have without using negative damage object triggers.
    up-effect 2,5,555,5,555,2 -- Gives all of player 2's Elite Huskarls trained at the castle 555% their regular speed.
    up-effect 1,0,504,57,4,1 -- Sets the dead unit ID of player 1's Watch Tower arrows to spawn an archer.
    up-effect 1,0,173,42,903,1 & up-effect 1,0,173,43,14,1 & up-effect 1,2,173,1,0,1 -- Enables the production of King arthur at player 1's castles.
    Something to remember;
    When doing up-effects, each up-effect should be on a separate line, like this:

    And a Display Instructions effect can only hold so much text. There will probably come a time where you need to use multiple effects.

    Okay, that's nice and all. What about the other effects we ignored?
    First, let's look at MOD_RESOURCE (Effect ID 1) and MUL_RESOURCE (Effect ID 6). Contrary to my original belief, these aren't for modifying resource costs. These are actually working just like Tributes.

    Here's an example:
    up-effect 1,1,4,1,100,1
    The Player is 1, the Effect is 1 (MOD_RESOURCE), the Item is 4 (Population Headroom), the Attribute is 1 (When using MOD_RESOURCE, use 0 or 1. 0 SETS, 1 ADDS.), the Value is 100, and the Style is 1.
    What this does is simple -- adds 100 Population Headroom to Player 1. It doesn't go over the player's Pop Cap max, though.

    So what's the point of this, if I can use Tributes for the same effect? (And oh boy, can you use Tributes. UserPatch allows you to select every available resource for Tributes, including ones added by Scripter.)

    Well, unlike tributes you can now:
  • Multiply resources
  • Use float values. EG: Faith Recharge Rate (Resource 35) is by default set to 1.6 -- You can't do that with Tributes.

    Furthermore, these tributes allow you to have control over the Weather and Fog lighting systems in UserPatch 1.5. A very good article on the University Here has more details on it.

    Secondly, let's look at Tech modifications. This one is a bit weird, because there's two ways of going about changing the costs.

    Before we get onto that, though; let's look at Effect 7 (Enable Tech). This work just in the way that disabling/enabling techs through the Research Technology triggers work, with the exception that you can enable/disable techs that aren't listed in the vanilla editor. However, you can't Research techs with this, only Enable or Disable them. This and Effect 102 (Disable Tech) are aimed more for use in Random Map Scripts, where triggers don't apply.

    So what should we care about?
    I've been having difficulty working with the Tech effects. For example, I can't seem to get Effect 8 to work correctly. Hopefully Scripter can enlighten us.

    What I have been able to get working, is Effect (The second number) 100, 101 and 103.
  • Effect 100 SETS a tech cost
  • Effect 101 ADDS to a tech cost
  • Effect 103 MODS a tech time, using Attribute (the fourth number) 0 for Set or 1 for Add.

    So, for example, you might want to take Loom for Player 1 and make it cost 500 Gold. You'd do that with this line: up-effect 1,100,22,3,500,1

    However in my experience I've been unlucky with adding new resources to the costs. You can also use Effect 8 (MODIFY_TECH) to achieve the same effects, but again, I can only seem to affect costs that already exist. I can Change the gold cost of Loom, but I can't make it have a Stone cost.

    One thing to bare in mind; If you alter a resource's cost, you have to Disable then Enable the tech for the costs to actually update. So with my Loom example, I have three triggers. One sets the cost, one Disables (Research Technology, with number field set to 2) and then Enables it again (Research Technology, with number field set to 1).

    What about GAIA effects?
    Using the GAIA effects is a little unknown to me. I assume they're specifically for affecting units owned by GAIA, so lets try it out: I'll use the line "up-effect 0,-1,4,0,200,1" -- In theory this should set GAIA archers to have 200 HP.

    Seems to be a success:

    So I can assume from these results that you need the Player (the first number) to be 0, to affect all players. Then the Attribute set to one of the negatives that only affect GAIA.
    From Scripter's Documentation:
    #const GAIA_SET_ATTRIBUTE -1
    #const GAIA_ADD_ATTRIBUTE -5
    #const GAIA_MUL_ATTRIBUTE -6
    #const GAIA_MOD_RESOURCE -2
    #const GAIA_MUL_RESOURCE -7
    #const GAIA_SET_TECH_COST -101
    #const GAIA_ADD_TECH_COST -102
    #const GAIA_MOD_TECH_TIME -104
    #const GAIA_ENABLE_OBJECT -3
    #const GAIA_UPGRADE_UNIT -4
    #const GAIA_DISABLE_TECH -103
    #const GAIA_ENABLE_TECH -8
    #const GAIA_MODIFY_TECH -9
    #const GAIA_SET_PLAYER_DATA -10
    I've not noticed any performance penalties that don't normally occur. Due to the way up-effects work, the game handles it really well, just like any Tech effect. up-effect can also be used to affect over 300 units at once, and also affects units not even created yet. For example, in a multiplayer RPG I've been working on as a "showcase" of UP effects, I have a scaling difficulty where every 25 losses, the enemy player gains 10% HP on all their units, created or not. Looping up-effects also has a very little impact. Almost unnoticeable unless you have a lot of them going off at once.

    The same performance nicety's can't be extended as much to up-attribute, though, and we'll talk about that in the next post...

    Proud Member of Black Forest Studios
    Co-creator of Silent Evil - Voted Best Multiplayer Scenario of 2009
    and The Seas of Egressa - Voted Best Multiplayer Scenario of 2010

    [This message has been edited by BF_Tanks (edited 08-24-2019 @ 05:32 PM).]

  • AuthorReplies:
    posted 08-31-17 09:19 AM CT (US)     1 / 193       
    up-effect vs up-attribute

    "up-attribute" is different to "up-effect" because it targets specific units through the Change Object Name trigger.

    What this means is that, the unit it affects gets separated out from other units, meaning any future techs don't affect it (Just like the regular Change Object triggers, or Conversions/Changed Ownership). Theoretically, you should be able to affect any unit stat possible, because the SWGB mod Expanded Fronts has a trigger that does this. However, Scripter has it set so that only up-effects will work. However, there are some differences!

    Firstly, it's more dangerous.
    What I mean by that is, it takes a lot more processing power (Just like regular Change Object triggers) than a simple tech effect. When I say a lot, I mean if you have over 100 or so going off on loops constantly, the game will noticeably lag -- and worse in Multiplayer. Something people have noticed are Scripter's words:
    this can be computationally expensive, so please consider performance
    which is very true, but only for up-attributes. My theory on why it's more performance intensive is because it's singling out individual units and storing their data in separate arrays, Whilst tech effects apply blanket changes to one piece of cached data.

    Secondly, You can't do as much
    You can't affect Line of Sight, (But that's done through the Change Object Range trigger) and you can't affect GARRISON ARROWS (Which actually means MINIMUM PROJECTILES).

    Thirdly, You can only affect Type 70 and Type 80 Units

    What are the types?

    Every living unit is Type 70. Every building unit is Type 80. Every Dead Unit is Type 30. Every projectile is Type 60. Every Tree, Mine, Bush, Fish, etc are Type 10. (Type 15 I believe is actually unused, despite being called "Tree".) GAIA Eye Candy objects are also Type 10 (Haystacks, etc).

    This means up-attribute triggers (And by extension, any Change Object triggers) can only affect living units and buildings. Take note, because I'll be talking about Types in a later post.

    So what are the benefits?
    Well, it's quicker to write, and it adds some nice flavor to Change Object triggers. That's about it, really.

    Here's a comparison of two triggers, both doing the same thing:

    Let's dissect the trigger on the left;
    It's a Change Object Name trigger, so already we know what the scope is in terms of what it can apply to. We also need to set the Number field to "1".

    Next, the writing. Following up-effect rules, each effect has to be on a separate line. But in the up-attribute, we are missing two numbers -- The Player (as it's set by the trigger itself) and the Item (As we're determining it with the trigger) You also can't change a name and set up-attributes in the same effect, but that should be obvious.

    To quote Scripter again for details:
    up-attribute mode,attr,value,style
    - mode: 0 to Set the value, 1 to Add, 2 to Multiply
    - attr: the id of the Attribute such as ATTR_HITPOINTS (0)
    - value: the value to set
    - style: 2 if value should be divided by 100; otherwise 1
    Over-all, there's a lot less uses for up-attributes, due to the fact there's already a Change Object HP Trigger, which can set, add and heal-to. A Change Object Attack Trigger, that can set and add. And the various other triggers such as speed, range and armors.

    Proud Member of Black Forest Studios
    Co-creator of Silent Evil - Voted Best Multiplayer Scenario of 2009
    and The Seas of Egressa - Voted Best Multiplayer Scenario of 2010

    [This message has been edited by BF_Tanks (edited 08-31-2017 @ 01:31 PM).]

    posted 08-31-17 10:56 AM CT (US)     2 / 193       
    A lot of the content of this post is being researched actively and I will update it as my studies get results.

    Remember This:

    In a up-effect line:
    "player" is the first number. "effect" is the second number. "item" is the third number. "attr" is the fourth number. "value" is the fifth number. "style" is the sixth number.

    In a up-attribute line:
    "mode" is the first number. "attr" is the second number. "value" is the third number. "style" is the fourth number.

    up-effect and up-attribute differences:
    "up-effect" can have different effects whilst "up-attribute" is always handling the same effect (Changing Unit Attributes), and uses modes. 0 for SET, 1 for ADD and 2 for MULTIPLY.

    * * * * * * * * * *
    A detailed look at Effects

    Depending on your "effect" number, the use of "attr" numbers changes. Below is a list of all the "effect" values you can have and how they are used:

  • "effect" 0 (SET_ATTRIBUTE) -- "item" can be any unit or class ID. "attr" is any Attribute ID in the list below.
  • "effect" 1 (MOD_RESOURCE) -- "item" can be any resource number, from 0 to 239. "attr" is either 0 for SET, or 1 for ADD. Above 1 will just ADD.
    SET seems to work just like ADD for some resources, like 4 - Population Headroom.
  • "effect" 2 (ENABLE_OBJECT) -- "item" can be any Type 70 or Type 80 Unit ID. "attr" is either 0 for DISABLE or 1 for ENABLE.
    For enabling/disabling objects, the "value" should be 0, but any number tested works to the same result.
  • "effect" 3 (UPGRADE_UNIT) -- "item" should be any Type 70 or Type 80 unit, but you can upgrade other types for some interesting results. "attr" should be the ID of the unit you're upgrading to -- which in most cases should match the Type, and "value" should be 0.
    If you upgrade a unit to a new Type, it will inherit some of the previous Type's stats.
    Upgrading Type-10 (Eyecandy) to Type-80 (Building) crashes my game.

    Upgrading Type-70 (Combatant) to Type-80 (Building) crashes my game.

    For example; Upgrading a Bamboo Tree to a Pikeman will make a Pikeman that isn't animated, that you can attack with a unit to kill, or chop with a villager to get 1 wood. Be very careful, whilst some of these effects may be cool and a lot I haven't tested yet (Still as a statue units, or units you can pass through, etc.), the usual result from selecting one of these units (until it's dead) is an instant crash to desktop.
  • "effect" 6 (MUL_RESOURCE) -- "item" can be any resource number, from 0 to 239. "attr" should be 0. Above 0 also works, but probably not on purpose.
  • "effect" 7 (ENABLE_TECH) -- "item" can be any Technology ID. "attr" can be 0 for DISABLE, 1 for ENABLE or 2 for FORCE. In my tests, "value" can be 0 -- and work, but it's been found that having "value" equal the Technology ID also works. If anyone can give definite proof that having value as 0 no longer works, please let me know.
    FORCE means FORCE ENABLE. Meaning, you can enable a tech for a civ that normally can't get it, or re-enable a previously researched tech WITHOUT re-showing the button. If you want to re-research a tech WITH the button, use ENABLE.
  • "effect" 8 (MODIFY_TECH) -- "item" can be any Technology ID. "attr" can be -1 for SET_TIME, -2 for ADD_TIME, 0 for SET_FOOD_COST, 1 for SET_WOOD_COST, 2 for SET_STONE_COST, 3 for SET_GOLD_COST, 16384 for ADD_FOOD_COST, 16385 for ADD_WOOD_COST, 16386 for ADD_STONE_COST and 16387 for ADD_GOLD_COST.
    Like I said earlier, I've had little luck using this outside of changing a tech's current resource costs. Not adding new resources!
  • "effect" 9 (SET_PLAYER_DATA) -- "item" can currently only be 0. "attr" should be 0, for SET. I assume anything higher works the same way. "value" must be a valid language ID string.
    This is a special one-use-only effect that can change your Civ's name:

  • "effect" 100 (SET_TECH_COST) -- "item" can be any Technology ID. "attr" is any resource number that the tech already costs.
    EG: Loom costs 50 gold. Gold is resource 3. "attr" would be 3 to change the gold cost of Loom.
  • "effect" 101 (ADD_TECH_COST) -- see above.
  • "effect" 103 (MOD_TECH_TIME) -- "item" can be any Technology ID. "attr" is either 0 for SET, or 1 for ADD. Above 1 will just ADD. "value" theoretically can be between -32768 and 32767, but in my tests to reach the maximum, you need to do a bit of math: 32767 + (Original Research Time - 1) -- Weird right? I'll be asking Scripter about this.
    Anything below 0, and the tech will be automatically researched and cost no resources.

    Special Effects
  • "effect" 10-19 will apply "effect" 0-9, to "player" + Allies.
  • "effect" 20-29 will apply "effect" 0-9, to "player"'s enemies.
  • "effect" 30-39 will apply "effect" 0-9 to "player"'s neutrals.
  • "effect" 5 (MUL_ATTRIBUTE) -- when "attr" is 103, 104, 105 or 106, "value" can be -1 to ADD the cost type, and -2 can REMOVE the cost type.
    You then need to SET or ADD the cost itself, after adding the cost type. EG: up-effect 1,5,904,104,-1,1 & up-effect 1,0,904,104,100,1:

    And unlike techs, you don't need to disable/enable the unit to see the cost changes.

    * * * * * * * * * *
    Unit Attributes
    These are "Unit Attributes" and are for "effect" 0 (SET), 4 (ADD) and 5 (MULTIPLY), or "up-attribute". I'll try to list them all in a uniform fasion, going Attribute number (Scripter's Name) [AGE's name] {What it affects} and then information about it.

    For reference, Here's the list of Types:

  • "attr" 0 (HITPOINTS) [Hit Points] {Affects all Types.} -- "value" ranges from 0 to 32767.
    This affects both Hitpoints and Max-Hitpoints, which are two different values entirely.
    "Hitpoints" ranges from -2147483648 to 2147483647. Below 0, the unit will die -- but this isn't always the case. The actual value can exceed 2147483647 but will show as a negative:

    This will cause the unit to be invincible and show no health bar.

    When you use a Damage Object trigger, for negatives or not, you're affecting the Hitpoints of a unit. Whilst a Change Object HP trigger affects both Hitpoints AND Max-Hitpoints. Want to affect ONLY Max Hitpoints? Use a up-attribute where the "attr" is 0. This will ONLY add to the Max-Hitpoints, meaning you can start units half-damaged. Affecting Hitpoints through a Damage Object trigger does NOT separate the unit from receiving tech-effects like a Change Object trigger does.

    I've seen a lot of people refer to an invincible unit trick by using multiple damage object effects set to 2147483647, when really you just need one -- 2147483648. This will bring the range around to -2147483648 (in the trigger field too), thus causing the unit to have more damage than the range can hold, meaning its health is now out of the bounds of the game engine, and it's unable to check if the unit's health is low enough to die. The unit also stops receiving any damage, except from trigger sources.
  • "attr" 1 (LINE_OF_SIGHT) [Line of Sight] {Affects all Types.} -- "value" seems to cap out at 21. Anything over it will have no effect -- Even flying past 32767. The min. value is 0, meaning absolutely no line of sight.
    If the unit moves through unexplored terrain, with 0 LoS, there's no dot on the minimap.
  • "attr" 2 (GARRISON_CAPACITY) [Garrison Capacity] {Affects all Types.} -- "value" caps out at 255. I think it originally went from -127 - +127.
  • "attr" 3 (RADIUS_1) [Unit Size X] {Affects all Types.} -- This should really be called Radius X. "value" is the X-radius of the unit. For reference; One Tile is 0.5 units.
    If a unit has a radius that goes heavily off the map, like a radius over a couple thousand, the game will crash when it moves.
  • "attr" 4 (RADIUS_2) [Unit Size Y] -- Same as above, but for the Y radius.
  • "attr" 5 (MOVE_SPEED) [Movement Speed] {Affects Type 20 to Type 80 Units.} -- "value" is a float, and controls how fast the unit moves in tiles per second.
    What I've noticed is the faster your unit moves, the more likely they will be to move too fast when engaging a target. They end up dead-center of the target's tile. Super-fast villagers will have trouble doing anything, and units with a minimum range will probably have trouble over-shooting their movement too. With 4294967295 speed, an archer can't move. But when it gets told to attack something, it goes the opposite direction, moon walking at differing speeds.
  • "attr" 6 (ROTATE_SPEED) [Rotation Speed] {Affects Types 30 to 80 Units.} -- 90% of units will have this set to 0. The higher "value" is, the slower units should turn. If you've seen the AoE: DE trailer, you'll notice all the units seem to have a Rotate speed of around 0.3.
    It doesn't seem to affect units in AoC after the game has started.. Is this a bug, Scripter?
  • "attr" 7 [Unused]
  • "attr" 8 (ARMOR) [Armor] {Affects Types 50 to 80 Units.} -- This works differently depending on if you're using SET or ADD. When using SET, you have to know the Index in which the armor value appears in the data, multiply that by 256, and then add to it to get the value you want. Confused? So is everyone.

    Let's say you want to set 20 Melee Armor to an Elite Teutonic Knight. First we have to find the ETK in the Data, so we use AGE, find the unit ID (554) and then look for its Armor table:

    Melee Armor is the Second entry in the list, so its Index is 1 (because we start with 0.) -- This means, we need to multiply 256 by 1, to get the "0" value for this armor class. Then we add 20, so in our up-effect we use "276", to get 20 Melee Armor.

    The drawbacks of this are that we can't set the value above 256, because then we'd be moving onto the next entry in the table. We also cant add any new armor classes this way, nor can we give the class a negative value.

    However, if we ADD, it's a bit different. Instead of finding the Index of the armor class we need, we look instead for the armor class value itself and multiply that by 256. So in this case, if I want to ADD 10 armor to get 20, I would need to multiply 256 by 4, and add 20 to that.

    Can we ADD a new armor class? To find out, I've stripped away an ETK's Base Melee and Base Pierce, and instead I'll ADD 100 Cavalry-class armor.

    Now, we can't see if the Cavalry class armor has been added or not without trying him against some cavalry, and unfortunately it does not seem to have added the armor.
  • "attr" 9 (ATTACK) [Attack] -- See above. It's exactly the same.
  • "attr" 10 (RELOAD_TIME) [Attack Reload Time] {Affects Type 50 to Type 80 Units.} -- "value" is a float value, and controls the time it takes for a reload to occur in game-time seconds. This means high numbers == slow reload time. The lowest is 0, but that doesn't necessarily mean a constant stream of projectiles. Frame/Attack Delay and Multiple Projectiles are also factors.
  • "attr" 11 (ACCURACY_PERCENT) [Accuracy Percent] {Affects Type 50 to Type 80 Units.} -- "value" is between -127 and 127. Anything above 100 does nothing, anything below 0 also does nothing.
    Accuracy is a percent chance that the unit will fire directly at the origin point of its target. If it fails this chance, it fires at a random point between 0, and its Attack Dispersion value. Gunpowder units have possibly the largest, at 0.75 Attack Dispersion. I'm not sure if this is a degree measurement, or some other maths going on. Elite Longbowmen have an Attack Dispersion value of 0.33 and an Accuracy Percentage of 80. Meaning if you have a unit with 0.01 Radius X and Radius Y, the Longbowman will hit 80% of his shots no matter the range.
  • "attr" 12 (MAX_RANGE) [Max Range] {Affects Type 50 to Type 80 Units.} -- "value" ranges from 0 to 2147483647. Anything under 0 range will actually eliminate it completely, making it impossible to attack. Even Melee units need 0 range.
  • "attr" 13 (WORK_RATE) [Work Rate] {Affects Type 30 to Type 80 Units.} -- "value" ranges from -2147483648 to 2147483647, and is another one you want to be precise with by using "style" set to 2. I think it translates to "Value per game second", so it's very easy to get super fast gathering accidentally.
    Work rates only really apply to gathering or building villagers, as far as I can tell. Numbers around -2147483647 can do some weird stuff. A nice trick is to set the work rate to 0, for some eye-candy workers that never deplete their resource.
  • "attr" 14 (RESOURCE_CARRY) [Carry Capacity] {Affects all Unit Types.} -- "value" ranges from 0 to 32767. Values below 1 will cause the resource gathering to "spaz out", rapidly playing their work graphic, then idle graphic, unable to carry anything.
  • "attr" 15 (BASE_ARMOR) [Base Armor] {Affects Type 50 to Type 80 Units.} -- "value" ranges from -32768 to 32767. This is defaulted to 1000 for every unit in the game, and is what causes units with no armor classes to only take 1 damage, instead of full. (until over 1000 damage is caused in one strike)
    It'd be nice to have a Base Armor of 0, so units can take true damage if they have no armor classes (Like the hidden Raider units)
  • "attr" 16 (PROJECTILE_ID) [Projectile Unit] {Affects Type 50 to Type 80 Units.} -- "value" can be any valid Type 60 Unit ID.
    9, 54, 97, 242, 244, 245, 246, 312-328, 360, 363-369, 371-378, 380, 381, 385, 462, 466, 468, 469, 470, 471, 475-478, 485, 503-526, 537, 538, 540, 541, 551, 552, 627, 628, 656-658, 676, 736, 746, 747, 767, 786, 787
  • "attr" 17 (UPGRADE_GRAPHIC) [Icon/Graphics Angle] {Affects Type 80 Units.} -- "value" can be any Icon ID. But, remember, Unit Icons and Building Icons use the same values but have different images.

  • "attr" 18 (Currently Unlisted by Scripter) [Terrain Defense Bonus] {Affects Type 50 to Type 80 Units.} -- AGE states it "Always sets". I haven't played around with it yet.
  • "attr" 19 (PROJECTILE_INTELLIGENCE) [Enable Smart Projectiles] {Affects Type 60 Units.} -- "value" is either 1 for ON or 0 for OFF. This causes projectiles to use predictive behavior, attempting to fire ahead of the target based on the projectile's movement speed and the target's speed.
  • "attr" 20 (MIN_RANGE) [Min Range] {Affects Type 50 to Type 80 Units.} -- "value" ranges from 0 to 2147483647.
  • "attr" 21 (STORAGE_VALUE) [Amount of 1st resource storage] {Affects all Types.} -- "value" ranges from 0 to 32767. This is the quantity of the first resource held by the Unit. This can be used to extend decay time, lower population cost, increase deer's food, etc.
    This only has an effect on units created after the up-effect is triggered. To affect units that already exist, you will need a second up-effect line to set the storage value to -32. This will force an update on all existing units' storage values.
  • "attr" 22 (BLAST_RADIUS) [Blast Width] {Affects Type 50 to Type 80 Units.} -- "value" is a float value, and 0.5 represents one map tile. It controls the radius around a projectile that damage is issued at, which halves based on distance. For melee units that have no projectile, the blast radius extends around the origin point.
    If an attacking ranged unit has 0 blast radius, their first projectile in their attack (usually the only one) will do half-damage to a target hit that isn't their intended one.
  • "attr" 23 (SEARCH_RADIUS) [Search Radius] {Affects Type 40 to Type 80 Units.} -- I'm not sure entirely what this does. It might affect the distance units acquire targets, or it might be for finding Sheep.
  • "attr" 100 (RESOURCE_COSTS) [Resource Costs] {Affects Type 70 and Type 80 Units.} -- I don't know what this does, in my tests it didn't seem to affect anything.
  • "attr" 101 (CREATION_TIME) [Train Time] {Affects Type 70 and Type 80 Units.} -- "value" ranges from 0 to 32767.
  • "attr" 102 (GARRISON_ARROWS) [Total Missiles] {Affects Type 70 and Type 80 Units.} -- "value" ranges from 1 to 32767. This controls the minimum number of projectiles a unit fires. If you want a unit to fire multiple shots, you'll need to have a matching or higher Maximum too.
    You also need to take into account the Attack Delay and Reload Rate of the unit, if you want good control over how many projectiles are fired per attack. Units will fire one projectile after the other, using their Attack Delay time.
  • "attr" 103 (FOOD_COST) [Food Costs] {Affects Type 70 and Type 80 Units.} -- "value" ranges from 0 to 32767, anything under 0 will be considered 0. This controls the existing Food Cost of a unit. To add a Food cost, use the MUL_ATTRIBUTE effect and values described above this list.
  • "attr" 104 (WOOD_COST) [Wood Costs] -- See Above.
  • "attr" 105 (GOLD_COST) [Gold Costs] -- See Above.
  • "attr" 106 (STONE_COST) [Stone Costs] -- See Above.
  • "attr" 107 (MAX_DUP_MISSILES) [Max Total Missiles] {Affects Type 70 and Type 80 Units.} -- "value" ranges from 1 to 32767. You need to be higher than or equal to a unit's current "GARRISON_ARROWS" (which should be named MINIMUM_PROJECTILES imo) for it to fire anything.
    The more MAX_DUP_MISSILES, the more your building can fire when units are garrisoned. However, If you have 10 MAX but only 5 Garrison Capacity, you'll still only have five projectiles.
    It should also be noted that a unit will ALWAYS fire at least 1 projectile. Even melee units fire 1 projectile, but their projectile ID is -1, so it's an instant attack.
  • "attr" 108 (HEALING_RATE) [Garrison Heal Rate] {Affects Type 80 Units.} -- "value" is how many Hitpoints are healed in one game-time second. For reference; A castle's default is 0.2 -- This means it takes a regular castle 5 game-time seconds to heal 1 Hitpoint.

    Special Attributes added by Scripter
  • "attr" 30 (GARRISON_TYPE) {Affects Type 80 Units.} -- "value" is an 8-bit flag. What it controls is what class units can garrison inside the building, and it can be a little tricky to get right.

    As it's 8 bits, we configure it by adding the values of individual bits to get a total. Here's the bit values and what they correlate to:

    | 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128 |
    | V | I | C | M | L | S | S | |
    | i | n | a | o | i | i | h | |
    | l | f | v | n | v | e | i | |
    | l | a | a | k | e | g | p | |
    | a | n | l | s | s | e | s | |
    | g | t | r | | t | | | |
    | e | r | y | | o | | | |
    | r | y | | | c | | | |
    | s | | | | k | | | |

    We can SET the garrison type outright by adding the flags we want. So, if we want a building to hold Infantry and Cavalry, we use the value 2+4 (6).

    We can also ADD (Using effect 4) to append flags to what's there. So we can take a Castle (Unit ID 82) and ADD flag 32 to allow Siege units to garrison, for example, using the line:
    up-effect 0,4,82,30,32,1
  • "attr" 31 (DATA_FLAGS) {Affects Type 80 Units.} -- "value" can be either 2 or 4. In my tests, this doesn't seem to have done anything.
  • "attr" 40 (HERO_STATUS) {Affects Type 70 and Type 80 Units.)} -- This is another flag value, but we use it a little differently to Attribute 30. We can set the flag to 0 to remove all Hero abilities, or 1 to make the unit a full hero. Alternatively, we can:
    - Set flag to 2 to disable Conversions.
    - Set flag to 4 to enable hero heal rate.
    - Set flag to 8 to force Defensive stance.
    - Set flag to 16 to force the unit to use a Protective Formation.
    - Set flag to 32, with Attribute 14 as 1 or 2 to enable Suicide attacks. (The unit does damage and instantly dies.)
    If Attribute 14 is set to 1, Unit IDs 440, 527, 528 and 706 are hard-coded to check this flag.
    - Set flag to 64 to enable blast radius, but I don't think you need this as you can just add Blast Radius itself.
    - Set flag to -128 to disable Attack Ground.
    - Set flag to 256 to clear all flags.
  • "attr" 41 (ATTACK_DELAY) {Affects Type 70 and Type 80 Units.} -- "value" ranges from 0 to 255. It is the number of frames an attack graphic will play before firing a projectile (For melee units too, if you remember.).
    Attack Delay is also known as Frame Delay. It's the entire reason Mangudai's are the best for hit-and-run attacks, because they have no delay in AoC.
  • "attr" 42 (TRAIN_LOCATION) {Affects Type 70 and Type 80 Units.} -- "value" needs to be a valid Type 70 or Type 80 Unit ID. For a Type 70 unit, it needs to have the right interface to see the button. Any Type 80 unit can create a unit, however.
  • "attr" 43 (TRAIN_BUTTON) {Affects Type 70 and Type 80 Units.} -- "value" needs to be a valid button ID, ranging from 1 to 15 for page 1, and 21 to 35 for page 2.
    Note: You can't just assign a train button and location to make a unit available there. You also need to Enable the unit if it's not already enabled by the tech tree or another technology.
  • "attr" 44 (BLAST_LEVEL) {Affects Type 70 and Type 80 Units.} -- "value" ranges from 0 to 3, and it changes what Blast Radius will deal its damage to.
    - Set to 0 to damage all units (Including allied units), resources and eye candy objects.
    - Set to 1 to damage player owned units (Including allied units) and trees.
    - Set to 2 to damage only player owned units. (Including allied units)
    - Set to 3 to damage only the target unit.

    It's a little deceptive. Blast Level will actually only damage units with the same level or lower as Blast Defense, and most units have below 3 Blast Defense. Unfortunately, we can't alter Blast Defense.. yet -- If we could, we could make Blast Radius damage only affect certain players, by having the other players with a higher blast defense. Maybe Scripter can add this in, but he told me that the more attributes he adds, the less stable the game will be and I think he said that loading save games and recorded games could end up crashing because of it.
  • "attr" 45 (HERO_HEAL_TIME) {Affects Type 70 and Type 80 Units.} -- "value" is a float, and it affects how many game-time seconds pass before the hero heals 1 Hitpoint.
  • "attr" 46 (SHOWN_ATTACK) {Affects Type 70 and Type 80 Units.} -- Pretty self explanatory, it changes the displayed Attack value:

    As you can see, if you don't meet the value with actual attack, there's a negative displayed. And of course, anything over this value is a + bonus.
  • "attr" 47 (SHOWN_RANGE) -- See above, but for Range.
  • "attr" 48 (SHOWN_MELEE_ARMOR) -- See above, but for Melee Armor.
  • "attr" 49 (SHOWN_PIERCE_ARMOR) -- See above, but for Pierce Armor.
  • "attr" 50 (NAME_ID) {Affects all Types.} -- "value" sets the name of "item" to a given Language ID.

    If you use an invalid Language ID:

    You can also use Descriptions:

    If you go over the character limit:

    You can use any valid language ID. Want a cool character name but don't want to use change Object Name? Crack open PEBBLE32 and look in the DLL files for some AI names:

  • "attr" 51 (CREATE_SDESC_ID) {Affects all Types.} -- Like NAME_ID, "value" sets the Create Text and Help Text IDs. You choose a Creation Text, EG: 6178, and it will also automatically update the Advanced Help text to Creation Text ID + 20000.

  • "attr" 52 (CREATE_LDESC_ID) {Affects all Types.} -- Unused, as Attribute 51 does both.
  • "attr" 53 (TERRAIN_ID) {Affects all Types.} -- "value" ranges from 0 to 21 and controls Terrain Restrictions for "item".

  • "attr" 54 (TRAITS) {Affects all Types.} -- "value" SETS or ADDS Trait flags. Having Trait Flag 64 makes your unit unable to be deleted through the delete key. I don't know other trait flags, except for 1 and 2 which are supposedly Garrison Unit and Ship Unit, but I've had no luck using this to allow garrisons inside other units besides Rams which have this trait.
  • "attr" 55 (CIV_ID) {Affects all Types.} -- Unused.
  • "attr" 56 (PIECE) {Affects all Types.} -- Unused.
  • "attr" 57 (DEAD_UNIT_ID) {Affects all Types.} -- "value" can be any valid Unit ID, of any Type. It changes the Unit ID spawned when "item" dies. The Unit ID MUST be available to that Player, however. You can't set Player 1's unit to turn into a GAIA-Only unit (Like a Villager turning into a Deer when it dies).

    Proud Member of Black Forest Studios
    Co-creator of Silent Evil - Voted Best Multiplayer Scenario of 2009
    and The Seas of Egressa - Voted Best Multiplayer Scenario of 2010

    [This message has been edited by BF_Tanks (edited 08-24-2019 @ 07:52 AM).]

  • BF_Tanks
    posted 08-31-17 10:57 AM CT (US)     3 / 193       
    Other features of UserPatch that will make you swoon.

    This post is for things not strictly speaking part of the up-effect feature, but changes made to the scenario editor that are highly useful.

    Terrain Features

  • You can toggle terrain restrictions and edge-terrains.
    In the map editor, pressing Ctrl+B will allow you to place terrain without restrictions and without adjustments to nearby terrain. What this means is beach-less water and water on elevation, all without the need for Trigger Studio nor map-copy. You also have access to the full list of terrains within AoC.

  • You can toggle different placement modes when placing objects.
    We can use Ctrl+S to toggle between off-grid placement, off-grid placement with no collision, grid-placement with no collision, or vanilla grid placement with collision.

    You can make some pretty looking places:

    An important thing to remember:
    When you test a map, and come back to the Editor afterwards, it retains the Ctrl+S setting you have last used, but it DOES NOT remember Ctrl+B. If you go to paint terrain without Ctrl+B enabled, it will replace missing beaches. This can be a pain.

  • Placed objects are now placed with their actual rotation.
    This means that you can see exactly what the object you're placing will look like in-game, without needing to test the scenario then go back into the editor. This also applies to houses.

  • The Terrain List is expanded to show all available vanilla terrains.
    Furthermore, you can generate maps using any of the available terrains as a base.

  • Elevations can go up to 11 high without the need for map-copy.

  • Map Copy is now easier to use.
    The brush will now be the correct dimensions as when you copied it. Map Copy also preserves rotations and is generally more stable to use, as crashes from overlapped units don't happen anymore.

    Trigger Features

    Here's an example of a list of trigger effects:

    There's two important things to note with UserPatch's Triggers:
    Firstly, each effect and condition is lettered and numbered so you can see the order in which they fire, regardless of their position in the list. You may or may not know this, but triggers will always fire in the order they were created and using the arrow buttons to rearrange them will not change this order. The same goes for their effects and conditions.

    Secondly, each effect shows its Number field next to the effect, so you can tell at a glance which effect is using which Number. It's good for two things in my experience: Seeing where Research Technology triggers are Forced and Not, and seeing which Display Instructions is a up-effect and Not.

    Enhancements to original triggers:
  • UserPatch has had this feature for a while, but it's still worth pointing out. In AoC vanilla, a Negative value in a trigger would reset if the effect or condition was selected. In UserPatch, it no longer resets so you don't have to worry about selecting effects and having their numbers reset, long after you've forgotten what it even does.

  • UserPatch allows us to reverse conditions:

    The small checkbox will Reverse the condition, changing something like "Destroy Object" to "Object Not Destroyed". It will set the condition name to have an R to show its reversed:

  • Scripter has enabled String Table IDs
    A string table ID allows you to set a text box to use a Language ID number instead of typing text manually.
    In a Change Object Name trigger:

    Will lead to:

    This overrides any text you have put in the appropriate box:

    Shows in-game as:

    This seems more useful for modders that want to set text strings that would appear repeatedly in a campaign, for example. Another useful purpose would be to use one line of text, whilst keeping notes in the text box. You could set the String Table ID to show the text you want, whilst the box says something like "This unit dies".

    Thanks to Lief for the explanation.
  • Play Sound effect; Volume and Stopping.
    Scripter has added a Number field to the Play Sound trigger:

    Set to 1: Plays the sound at 100% volume.
    Set to 2: Plays the sound at 87.5% volume.
    Set to 3: Plays the sound at 75% volume.
    Set to 4: Plays the sound at 62.5% volume.
    Set to 5: Plays the sound at 50% volume.
    Set to 6: Plays the sound at 37.5% volume.
    Set to 7: Plays the sound at 25% volume.
    Set to 8: Plays the sound at 12.5% volume.
    Set to 9: Stops the currently playing sound matching what's in the Value field.
  • Other triggers with the "Number" field and what the numbers do:
    Aside from the Play Sound effect, there's a plethora of other triggers that now have a "Number" field, where inputting various numbers changes how the effect behaves.

    Create Object:
    Number set to 0: Create the Object.

    Number set to 1: Enable the Object for the player. This would allow the player to create objects outside of their tech tree, just like the up-effect.

    Number set to 2: Disable the Object for the player. Same as above, except you're preventing creation.

    When it comes to enabling or disabling objects, I would rather use up-effect lines for it.

    Research Technology (Effect):
    Number set to 0: Research the technology then disable the button as normal.

    Number set to 1: Enable a technology button without tech-tree limits. This allows you to re-research technologies, too. If you make a looping Research Object condition that then re-enables the technology, the game will not loop the trigger until the technology is researched again.

    Number set to 2: Disable a technology.

    Number set to 3: Enable a technology for researching through triggers (Does not enable the button and the game will still consider this tech researched.) without tech-tree limits.

    Trigger example: (All technologies are Forging. The Condition checks if Forging is researched, then it uses Number 3 to re-enable the tech, then Researches it again. This causes it to loop, researching the tech every second of game-time due to the condition still being met.)
    After 59 seconds of game-time:
    Number set to 5: Works similarly to Number 1, but has some extra measures to get around some internal tech-tree limits that may affect some technologies. If you try Number 1 with a Unique Tech and it doesn't seem to work -- Use Number 5. In my experience, though, Number 1 has worked even for Unique Techs.

    Change View:
    Number set to 0: The normal Change View effect, panning the camera to the location at a speed based on the distance the camera would have to travel. Longer distance is a faster camera movement. UserPatch also fixes the issue where panning long distances with this effect crashed the game.

    Number set to 1: Snaps the camera to the location instantly.

    Change Object HP:
    Number set to 0: The normal Change Object HP effect, adding the given value to the unit's current Max Hitpoints and scaling Hitpoints by 50% of their current, if it's under or above the Max Hitpoints value.

    I set up a test where a Cataphract starts with 50 Max Hitpoints and 25 Hitpoints, then used a Change Object HP effect set to 50:
    + 50 HP
    I then did the same with 50 Max Hitpoints and 75 Hitpoints:
    + 50 HP
    Number set to 1: Sets the units Hitpoints and Max Hitpoints to the given value.

    Number set to 2: Adds the given value to the unit's Hitpoints but does not take it over Max Hitpoints.
    Using this Number does not prevent tech-effects from affecting the unit, so is safe to use as a method of healing units over time without removing their ability to gain tech effects.

    Change Object Attack:
    Number set to 0: Adds the given value to the unit's Base Melee or Base Pierce, depending on which attack class the unit uses.

    Number set to 1: Sets the unit's Base Melee or Base Pierce attack class to the given value.

    These effects do not change the "Shown Attack" attribute. To change that when using a Change Object Attack trigger you must use an up-attribute trigger.

    New triggers:
    Added by Scripter are a few very useful triggers. First, let's look at the new Conditions:
  • Civilization -- This trigger checks if a specific player has the matching Civilization ID.

    Here's a list of the Civilizations in AoC. If you're using WololoKingdoms, the list will be a little longer.

    (The number on the left is the ID, the number in brackets on the right is the graphics set, which isn't relevant here.)
    Also worth noting that in AoC the Teutons are named internally as the Germans. Franks are French and Britons are British.

    Fog Colours
    UserPatch 1.5 allows you to change the fog colour of both revealed "Live" area, and Explored-but-shrouded "Dark" areas using resource tricks, which I've documented here.

    Proud Member of Black Forest Studios
    Co-creator of Silent Evil - Voted Best Multiplayer Scenario of 2009
    and The Seas of Egressa - Voted Best Multiplayer Scenario of 2010

    [This message has been edited by BF_Tanks (edited 09-12-2019 @ 12:09 PM).]

  • Popeychops
    "Cool" Huskarl
    posted 09-03-17 07:30 PM CT (US)     4 / 193       
    This is a masterpiece, a real tour de force. When UP 1.5 comes out of beta, please consider submitting this to the university as an article or articles.

    Fantastic work mate, keep it up

    Member of BlackForest Studios
    Co-creator of Silent Evil (4.6) Voted Best Multiplayer Scenario of 2009 (Most Fave'd Multiplayer Scenario)
    and The Seas of Egressa (4.8) Voted Best Multiplayer Scenario of 2010
    "Popey just hates everywhere." - Chocolate Jesus, on my fear of Romanian organ-traffickers
    "Hooray for Dear Leader-Comrade-Generalissimo-Presidente-Lord Protector Popey!" - Lord Sipia, on my benevolent, iron-fisted rule
    "You're not Popeychops; you don't get to physics." - Moff, in response to a clumsy muon simile
    Mr Wednesday
    (id: matty12345)
    posted 09-03-17 08:27 PM CT (US)     5 / 193       
    I hadn't wanted to comment because I wasn't sure if you needed more reply spots, but this is indeed excellent. UP 1.5 is more of an upgrade than all the previous UP versions combined. Its impossible to explain all of it, and I am sure we will be discovering uses for up effect for some time. But this does a great job of covering as much as can be covered.

    "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 09-03-17 09:40 PM CT (US)     6 / 193       
    Yeah I reserved enough I think. Feel free to comment on things. I'll add things as I do more tests, get more definite results, and I'll finish the info about features other than up-effect eventually. I need to go through some of Scripter's old update posts and make sure nothing's been missed.


    Also apologies, my video uploads were very temporary and I hadn't realized that, so I have removed all the url links to videos demonstrating some effects and wrote a bit more blurb to try describing things better. Or, y'know, try them yourself and be amazed.

    Proud Member of Black Forest Studios
    Co-creator of Silent Evil - Voted Best Multiplayer Scenario of 2009
    and The Seas of Egressa - Voted Best Multiplayer Scenario of 2010

    [This message has been edited by BF_Tanks (edited 09-03-2017 @ 09:56 PM).]

    posted 09-04-17 00:01 AM CT (US)     7 / 193       
    I didn't want to reply until you were finished either lol
    This is an amazing guide. Thank you, BF_Tanks!
    posted 09-04-17 05:53 AM CT (US)     8 / 193       
    No problem. Hopefully this should help people out a bit.

    Proud Member of Black Forest Studios
    Co-creator of Silent Evil - Voted Best Multiplayer Scenario of 2009
    and The Seas of Egressa - Voted Best Multiplayer Scenario of 2010
    posted 09-04-17 07:27 AM CT (US)     9 / 193       
    As the others have mentioned, this is nothing short of spectacular. I'm contemplating pinning it, or at least providing a link to the article in the scenario design FAQ.

    ~ Forgotten Empires ~

    Storm on the Steppe | Galderton Hill RP | Proud member of Stormwind Studios

    "Deyr fé, deyja frændr, deyr sjálfr it sama; ek veit einn at aldri deyr, dómr um dauðan hvern." - Hávamál 77.
    posted 09-04-17 08:03 AM CT (US)     10 / 193       
    Great guide, this will definitely be a highly revisited article.

    "Excellent could be any map that has the quality of a ES random map or ES scenario. AoK is an excellent, award winning game. That's where I'd start." -AnastasiaKafka

    "Hard work is evil. Bitmaps are stupid. Working on a scenario for more than one afternoon is stupid. Triggers are stupid. Testing your own scenario is stupid. The world is stupid. You are the Greatest." -Ingo Van Thiel
    posted 09-04-17 08:23 AM CT (US)     11 / 193       
    It's been suggested by Popeychops that I should turn it into one or more university articles when the information is finished.

    Proud Member of Black Forest Studios
    Co-creator of Silent Evil - Voted Best Multiplayer Scenario of 2009
    and The Seas of Egressa - Voted Best Multiplayer Scenario of 2010
    posted 09-04-17 09:07 AM CT (US)     12 / 193       
    For sure, you could make a main UP effect article then another with the "Other features of UserPatch that will make you swoon." section.

    "Excellent could be any map that has the quality of a ES random map or ES scenario. AoK is an excellent, award winning game. That's where I'd start." -AnastasiaKafka

    "Hard work is evil. Bitmaps are stupid. Working on a scenario for more than one afternoon is stupid. Triggers are stupid. Testing your own scenario is stupid. The world is stupid. You are the Greatest." -Ingo Van Thiel
    posted 09-04-17 10:45 AM CT (US)     13 / 193       
    Updated Post#3 with more info. More to come soon.

    Proud Member of Black Forest Studios
    Co-creator of Silent Evil - Voted Best Multiplayer Scenario of 2009
    and The Seas of Egressa - Voted Best Multiplayer Scenario of 2010
    Andanu Trisatya
    posted 09-05-17 04:42 PM CT (US)     14 / 193       
    Marvelous job Tanks, thank you for spending your time writing this. Bookmark'd.

    The Least Skilled Member of StormWind Studios

    -:|:- Blacksmith Files -:|:- Fabula Fatali -:|:- Photography -:|:- Age of Kings Heaven -:|:-
    posted 09-06-17 04:17 AM CT (US)     15 / 193       
    No problem, Andanu.

    Does anyone know what String Table stuff does and how to use it?

    Proud Member of Black Forest Studios
    Co-creator of Silent Evil - Voted Best Multiplayer Scenario of 2009
    and The Seas of Egressa - Voted Best Multiplayer Scenario of 2010
    Leif Ericson
    Seraph Emeritus
    posted 09-06-17 01:19 PM CT (US)     16 / 193       
    It pulls a string from the language files that matches the ID that you enter, similar to your Furious the Monkey Boy example.

    ~`o´~|\  Join the fresh and exciting AI Ladder for its fourth season!
    ´ `  |_\
           |    Learn the joy of AI scripting in my guide: The World of AI Scripting
     \        /
       .....Hinga Dinga Durgen! - SpongeBob
    posted 09-06-17 02:48 PM CT (US)     17 / 193       
    Thanks! I updated Post #3 with information about it, and shown some examples.

    Proud Member of Black Forest Studios
    Co-creator of Silent Evil - Voted Best Multiplayer Scenario of 2009
    and The Seas of Egressa - Voted Best Multiplayer Scenario of 2010
    (id: Mashek)
    posted 09-06-17 04:37 PM CT (US)     18 / 193       
    posted 09-07-17 11:46 AM CT (US)     19 / 193       
    Thanks, Mash.

    Updated Post #3 again. This time with the detail about the Play Sound effect changes, and hopefully accurate volume percentages.

    09/09/2017 Update: Started adding info about Number fields and how some trigger effects work, such as Research Technology's considerations on a tech being Researched or Not and Change Object HP's calculations when adjusting Hitpoints to reflect Max Hitpoints.

    Proud Member of Black Forest Studios
    Co-creator of Silent Evil - Voted Best Multiplayer Scenario of 2009
    and The Seas of Egressa - Voted Best Multiplayer Scenario of 2010

    [This message has been edited by BF_Tanks (edited 09-09-2017 @ 12:20 PM).]

    CRY Zix
    posted 09-10-17 03:01 AM CT (US)     20 / 193       
    Is it possible to modify the Graphic IDs, Sound IDs and Class ID of a unit?
    posted 09-10-17 08:52 AM CT (US)     21 / 193       
    I've asked about this before but the answer is unfortunately "no". If I remember right, it's because of save/recorded game stability or something to that effect.

    The Expanded Fronts mod, for SWGB which uses the Genie Engine does allow you to change those, and every unit property that can be modified with AGE, but the difference there is the Expanded Fronts mod does not try to maintain compatibility with previous versions, which is what Scripter is doing with UserPatch.

    Maybe Scripter can reiterate his reasoning here, I'm not 100% sure.

    Here's what Scripter said to me previously;

    Proud Member of Black Forest Studios
    Co-creator of Silent Evil - Voted Best Multiplayer Scenario of 2009
    and The Seas of Egressa - Voted Best Multiplayer Scenario of 2010

    [This message has been edited by BF_Tanks (edited 09-10-2017 @ 12:02 PM).]

    (id: Mashek)
    posted 10-08-17 02:55 AM CT (US)     22 / 193       
    Would it be right to sticky this thread? It would work well in tandem with the Scenario Design FAQ by Dave_Earl, and given UP 1.5 has just come out this article will prove loads useful to visiting forummers as they come through without having to sift through all the data.
    posted 10-08-17 07:16 AM CT (US)     23 / 193       
    I agree. The documentation and instructions in here are immensely useful, and it has definitely earned the right to be pinned. Hats off to Tanks for a job well done.

    ~ Forgotten Empires ~

    Storm on the Steppe | Galderton Hill RP | Proud member of Stormwind Studios

    "Deyr fé, deyja frændr, deyr sjálfr it sama; ek veit einn at aldri deyr, dómr um dauðan hvern." - Hávamál 77.
    posted 10-08-17 09:28 AM CT (US)     24 / 193       
    This is definitely a Mission Critical resource on the new UP features. Good call on sticking it

    If I could critique just one thing though, is coming up with a more elegant title that isnt so massive

    "Excellent could be any map that has the quality of a ES random map or ES scenario. AoK is an excellent, award winning game. That's where I'd start." -AnastasiaKafka

    "Hard work is evil. Bitmaps are stupid. Working on a scenario for more than one afternoon is stupid. Triggers are stupid. Testing your own scenario is stupid. The world is stupid. You are the Greatest." -Ingo Van Thiel
    (id: Mashek)
    posted 10-08-17 03:27 PM CT (US)     25 / 193       
    Leif Ericson
    Seraph Emeritus
    posted 10-08-17 04:37 PM CT (US)     26 / 193       
    Now that the thread is no longer new, "UP 1.5 Effects & How to use them in Maps" seems like an appropriate title.

    ~`o´~|\  Join the fresh and exciting AI Ladder for its fourth season!
    ´ `  |_\
           |    Learn the joy of AI scripting in my guide: The World of AI Scripting
     \        /
       .....Hinga Dinga Durgen! - SpongeBob
    posted 10-08-17 06:54 PM CT (US)     27 / 193       
    Go for it, I don't know how I can change it but that's a good suggestion.

    I still need to finish some stuff, but it works.

    Proud Member of Black Forest Studios
    Co-creator of Silent Evil - Voted Best Multiplayer Scenario of 2009
    and The Seas of Egressa - Voted Best Multiplayer Scenario of 2010
    posted 10-19-17 07:13 PM CT (US)     28 / 193       
    Did I read somewhere that you can change player in single player so you can control another players units?
    posted 10-19-17 07:46 PM CT (US)     29 / 193       
    Yes, you can press Ctrl+Shift+[F1-F9] to change player slot, where F1-F8 are for player slots 1-8 and F9 is for gaia.
    posted 10-19-17 08:20 PM CT (US)     30 / 193       
    Awesome man thank you.
    posted 10-24-17 03:48 AM CT (US)     31 / 193       
    Im trying to make all buildings undeletable using up-effect 0,0,903,54,64,1
    but only the wonder seems to be undeletable.
    posted 10-24-17 06:20 AM CT (US)     32 / 193       
    Which buildings are you testing? For example, towers are class 52 instead of 3, so in addition to the line for 903, you would also have a line for 952, etc. Normal buildings are class 3, walls are 27, gates are 39, farms are 49, and towers are 52. Please note that the effect flag only prevents direct deletion by players. Triggers can still remove/delete them.

    [This message has been edited by scripter64 (edited 10-24-2017 @ 06:26 AM).]

    posted 10-24-17 07:06 AM CT (US)     33 / 193       
    ah thank you this explains all
    Also is there an attribute to make a unit unattackable?

    [This message has been edited by jizzbomb (edited 10-24-2017 @ 07:09 AM).]

    posted 11-23-17 10:01 AM CT (US)     34 / 193       

    First of all thanks for the awesome UP1.5 I cannot say enough word of praise for this.

    However, I have some questions regarding up-effect.

    First, how can I enable a castle tech to be available for research from stable? Like I want to give player 1 the ability to research Logistica from the stables instead of castle.

    How can I override the graphics of any unit or building using up-effect?

    A finding, while force enabling a research using research technology number 5 it always takes effect the last trigger. Like if a trigger force enables Logistica and the next trigger force enables elite cataphract then only elite cataphract button appears in the castle, Not the logistica one. Is there any way I can enable both for the player 1?

    Thanks in advance for your answer.
    posted 11-23-17 03:08 PM CT (US)     35 / 193       
    Hi! I don't think there's a way to move a tech to another building with up-effect. Although you can move unit training buttons and add buttons to create custom units, the same can't be done for techs, as they're more limited. You can instead make custom techs with triggers to execute the same underlying effects of Logistica, etc. by referencing what those techs do in A.G.E.

    Object graphics can't be changed by up-effect other than by upgrading an object to another unit type with the desired graphics. For RT:5 force tech buttons, they're very fragile and almost any tech tree update can cause them to disappear. Since Elite Cataphract and Logistica depend on the Imperial Age tech, if you're not in Imperial and enable either of those, then after any other tech tree update occurs (including enabling one of those), the tech tree update scan will find the "improper" techs and re-disable them. It's a nice, self-correcting system that ES created here, but it can make things difficult in cases like this. I'm sorry for the trouble!
    « Previous Page  1 2 3 ··· 6  Next Page »
    You must be logged in to post messages.
    Please login or register

    Hop to:    

    Age of Kings Heaven | HeavenGames