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

Scenario Design and Discussion
Moderated by HockeySam18

Hop to:    
Welcome! You are not logged in. Please Login or Register.171 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 ··· 3 4 5  Next Page »
posted 08-31-17 09:19 AM CT (US)         
Hello friends! This post will probably be quite lengthy, and be updated as UserPatch does adding new features, so watch this space. For this reason, I'm not writing it as a University entry because of the constant updates that UserPatch is getting right now and I don't want a University article needing constant revisions to keep it up to date.

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

Side-Guides are small guides on achieving more specific effects:
#1 - Off-Grid Solid Resources
#2 - Preventing Villagers from switching tasks.

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 07-03-2019 @ 11:35 AM).]

  • AuthorReplies:
    posted 08-11-18 12:41 PM CT (US)     141 / 171       
    Task object and Patrol Object I know both move the unit to the x.0 and y.0 co-ordinate, whilst Create Object is the x.5 and y.5 co-ordinate -- if that makes sense. It's easier to understand if you open up Trigger Studio and see that tiles have a decimal point. So, location X.0 and Y.0 corresponds to the top left corner of the tile. If you want central to the tile you need to set the location to X.5 and Y.5 -- I've asked Scripter about possibly adressing this. It's also the reason Farmers don't seem to farm the full 3x3 area, because each time they move they're being tasked to a random tile's .0, not .5 -- If that makes sense.

    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 08-11-18 08:15 PM CT (US)     142 / 171       
    Hmm that explains a lot indeed!
    Given the reason why it happens, fixing this issue would probably end up breaking tons of scenarios, though :/
    Unless its somehow possible to make this change to only affect newly created 'task' effects

    The Fall of Hummaria -- Teaser [4.2] -- Project's Thread
    Cavern Pirates -- The Treasure Hunt [4.6] -- Captain's Revenge
    My Blacksmith

    [This message has been edited by rewaider (edited 08-12-2018 @ 01:36 AM).]

    posted 09-04-18 04:02 AM CT (US)     143 / 171       
    Is there a way to remove the flag from the relic cart so it doesnít change ownership?
    posted 09-04-18 04:39 AM CT (US)     144 / 171       
    Have you tried just a single Change Ownership effect? You can permenantly make things Gaia by just one Change Ownership, so perhaps it works with the Relic Cart.

    If not, perhaps try asking Scripter himself if it's something possible

    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-18 07:18 PM CT (US)     145 / 171       
    Yeah I tried, still changes ownership in the same way a sheep does. If I change the unit size to 0 it works for the most part, but every now and then it will change to the closest player.
    Iím trying to make a custom spawn position by tasking units to the relic cart.
    There may be another unit I can use but they need to be unattackable and not able to attack and non convertible.
    The closest I found was the old explorer unit. But unfortunately it is unable to be tasked without using triggers. Projectiles donít work either because you canít select them even by setting them to a control group.
    posted 09-06-18 01:33 PM CT (US)     146 / 171       
    Have you tried giving a player Dominant LOS (with resource, or by using Celts) and using an invisible unit to follow the relic cart? like OLD-EXPLORER or something, perhaps?

    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-06-18 05:17 PM CT (US)     147 / 171       
    Awesome suggestions I will defently try this. Thanks.

    Sadly the Celt bonus doesnít seem to effect the relic cart. Following the relic cart with an old explorer unit has no effect. If only there was a way to move the old explorer unit with mouse control.

    [This message has been edited by jizzbomb (edited 09-08-2018 @ 09:17 PM).]

    posted 09-19-18 11:10 AM CT (US)     148 / 171       
    "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.
    Do you have an example of this working? I tried making a trigger to make a knight have a smaller hitbox but no matter what value I put in that field it crashes to desktop. Also, do you think I could apply it to a building so it can be walked through?

    "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 10-03-18 05:48 AM CT (US)     149 / 171       
    "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.).
    In addition to this explanation, I'd like to comment that we should use the Advanced Genie Editor to refer to the attack animation information on the "Graphics" tab, especially Frames per Angle and Frame Duration.

    For example, Spearman has 10 frames per angle and each frames have 0.1 second duration.

    This means you can set frame delay of Spearman up to 10 and there are no differences between frame 10~255. And when we set frame delay of Spearman by 10, Spearman will attack exact 1 second later after targeting. (0.1 sec x 10 frames)

    Finally, with CAD SW and macro SW and Trigger Studio and this attribute, you can realize the following skill effects in a custom scenario easily.

    posted 10-05-18 10:55 AM CT (US)     150 / 171       
    @Kata: How are you setting the value? If you want something like "0.5" then you need to use "50" and set the final value ("style") of the up-effect to 2 (So it divides the value by 100.), because the up-effect doesn't take decimal values.

    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 01-02-19 05:29 PM CT (US)     151 / 171       
    How do you make units do extra damage by adding (+? attack)
    posted 01-10-19 05:56 AM CT (US)     152 / 171       
    Is there anyway to add a projectile to a building that doesn't have one.
    For example an archery range shooting arrows or a wonder that shoots fire?

    [This message has been edited by jizzbomb (edited 01-10-2019 @ 05:25 PM).]

    posted 02-13-19 05:06 AM CT (US)     153 / 171       
    If you change Attribute 16 (Projectile ID) and give the unit some valid range, it'll fire. I can't say it'll work perfectly for a building that doesn't naturally have the auto-attack ability, however. Never tried 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
    posted 02-27-19 06:10 AM CT (US)     154 / 171       
    So I have

    up-effect 0,0,276,16,676,1

    To give wonders a fireship projectile

    up-effect 0,0,276,12,10,1

    To give the wonder 10 range

    up-effect 0,0,276,9,266,1

    To give the wonder 10 attack, 266 = 10ap right?

    Is there anything else I need to search radius? garrison arrows?
    I played with them both still cant get it to fire.
    Sir Twi
    posted 03-13-19 04:42 PM CT (US)     155 / 171       
    Hey I'm wondering if I'm on the right track here. I want to make Janissaries able to have other units garrisoned in them. As you can see in the screenshot, I've first set the up-attribute to allow the janissary to have infantry garrisoned. Then the second line should increase the capacity to 12. However, when I test this, I can't seem to get the garrison to work. I have tried a few different things, including using up-effects instead, and trying different garrison unit types such as villagers instead of infantry. What am I doing wrong?


    I got the 0/12 and garrison icon to appear in-game on the janissary, using this line before the other lines:

    up-attribute 0,54,1,1

    But I still can't get anything to actually garrison inside the janissary in-game.

    The Crystal Shards - A massive free-roam RPG

    [This message has been edited by Sir Twi (edited 03-13-2019 @ 05:12 PM).]

    posted 03-13-19 06:57 PM CT (US)     156 / 171       
    Hello, Sir Twi, I remember your name.

    I'm afraid I don't know the answer to your question. But have you tried editing a battering ram to make it more janissary-like rather than vice versa? There may be some crucial property of garrisonable units which you are not altering the janissary to have.

    [ All_That_Glitters | Pretty_Town_Contest | Other_AoK_Designs | AoE_Designs ]
    Member of Stormwind Studios
    Sir Twi
    posted 03-13-19 07:02 PM CT (US)     157 / 171       
    Hi Julius, I remember you as well Thanks for the idea. I was hoping to avoid that since I wanted to keep the Janissary's default gun attack. But I may have to give that a try. Thanks for the advice!

    The Crystal Shards - A massive free-roam RPG
    Usamah Aghis
    posted 04-12-19 10:10 PM CT (US)     158 / 171       
    What about the "number" field in Declare Victory, Change Ownership, Freeze Unit, and Change Object Name triggers?
    Usamah Aghis
    posted 04-17-19 05:27 AM CT (US)     159 / 171       
    Well, I tested it myself since I couldn't find the answer, maybe there's someone who did it first and had better information than me.... But screw them here's what I found (jk pls cmiiw) :

    Declare Victory:
    - 0 = Declare victory to player X
    - 1 = Declare defeat to player X

    Change Ownership:
    - 0 = Change Ownership from player X to player Z
    - 1 = Didn't change ownership but it still had blinking green circle (green line if it's building) and mini-map signal visible for everyone

    Freeze Unit:
    - 0 = Stop & change unit to no attack stance
    - 1 = change unit to aggresive stance
    - 2 = Change unit to defensive stance
    - 3 = change unit to stand ground
    - 4 = did not stop the unit & change to no attack stance

    Change Object Name:
    turns out it's for up-attribute, I'm just dumb

    Stop Unit:
    - 0 = To stop unit, seriously who doesn't know this
    - 1 = group the choosen unit to group 1
    - 2 = group the choosen unit to group 2
    - 3 = group the choosen unit to group 3
    - 4 = ...And so on, you know the rest

    [This message has been edited by Usamah Aghis (edited 04-17-2019 @ 06:34 AM).]

    posted 05-07-19 07:15 PM CT (US)     160 / 171       
    BF_Tanks wrote:
    " "attr" 53 (TERRAIN_ID) {Affects all Types.} -- "value" ranges from 0 to 21 and controls Terrain Restrictions for "item". "

    Any way to find which value is which terrain restriction? (How to make a unit walk on water for example?)

    Found it on Genie Editor:

    So "0" gives the ability to travel through water and land.

    To get the unit able to go through Forests (Buildings and other units) you can give him no collision on X and Y (With attributes 3 and 4). He will still be able to be attacked and attack aswell.

    [This message has been edited by Pyroptere (edited 05-13-2019 @ 01:03 PM).]

    posted 06-13-19 06:20 AM CT (US)     161 / 171       
    I wanted to ask, if anyone has been playing around with the attributes 8 (armour) and 9 (attack) while using effects 4 (add) and 5 (multiply)?

    When making some effects for the Admiral, I noticed that the multiplying works strangely compared to adding.

    up-effect 2,0,844,0,20000,1
    up-effect 2,0,844,9,250,1
    up-effect 2,4,844,9,1249,1
    up-effect 2,5,844,9,1224,1

    So what I did was I set some stats for the Admiral, then added AP additionally and then tried to multiply it all with 15 by using style 1, not 2, which lead to the AP ending up in some 75-x value. After I changed the style to 2, seemingly nothing happened to the AP. Afterwards I used the format shown above to increase the AP of the Admiral to 950 (setting it to 250, adding another 225 and then multiplying it with 2 (which should be actually 200)), but now it seems odd, because style 1 is not supposed to divide by 100.

    So my question is. Does anyone know for infact that effect 5 (multiply) has only one style that always divides the value by 100 and if this has been intended?

    [This message has been edited by nhoobish_est (edited 06-13-2019 @ 06:22 AM).]

    posted 07-03-19 08:33 AM CT (US)     162 / 171       
    @Sir Twi:

    I've trialled various ways to garrison units within units, but it seems to be very much a hard-coded class limitation. Only Rams, Ships and Buildings really support natural in-game garrisons. You'd have to force it through Trigger Studio.


    Due to my incompetence with maths, I really only touched ADD and SET. I also think that MULTIPLY would take your values way out of proportion. How would you use it, for example, on an attack bonus index of 1 when there's an attack index of 2 ahead of it? I feel like the numbers would roll into the next index and you'd affect that, not the one you're after.

    Units that don't natively have the Attack or Auto-Attack Task, listed here in AGE:

    Also, if the unit doesn't natively have an Attack type, listed here:

    then it might not be able to be modified. Changing attack values with UP requires funky maths depending on how many attack types there are and their indexies, I tried SET and ADD with no luck for the Wonder, however I did somehow eliminate it from providing a wonder countdown.. not sure why.

    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 07-03-2019 @ 11:32 AM).]

    posted 07-03-19 09:35 AM CT (US)     163 / 171       
    Side-Guide #1/
    Achieving off-grid placement of certain resources

    Stone, Gold and Forage Bushes are hard-coded to snap to grid placements when loading the map. We can see this with a simple test;
    In-Editor -

    In-Game -

    This is minor, but can cause some unexpected results and potentially ruin a feature or eye-candy piece of the map. You can get around this in two ways;
    1. Use "Pile of" resources, like so:

    The problem now is that Piles don't have a size, nor hold resources over 1. This can be alleviated with UP-Effects (Maybe.), but why go through the effort of manipulating tricky GAIA resource values when, instead, there's a simpler solution.

    2. Use UP-Effect #-4 (GAIA_UPGRADE_UNIT) to "place" the resources off-grid, after the map starts:

    There are some caveats, due to how UPGRADE_UNIT works:
    1. The object you upgrade needs existing Radius X/Y values

    2. The object you upgrade needs to match Type 10 (Eye-Candy), or else it'll crash.

    3. The Resource you upgrade too will likely not hold any resources, as UPGRADE_UNIT inherits a lot of attributes from its prior unit.

    4. Villagers can't gather from it. (I think this is neat.)

    In order to make my example, I placed a ring of off-grid "Broken Cart"'s (ID 858), as these have a 0.5/0.5 Tile X/Y radius like a typical resource unit.

    I then used the following UP-Effect at the beginning of the map:

    What would be the use of this?
    Placing resources off-grid for eye-candy purposes, ala Piles, but keeping it solid. It also looks nicer than a Pile if selected, because of the UI information.

    One reason why you may not want this, however, is the Outline. This attribute is not inherited from the prior unit, and can make things ugly:

    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 07-03-19 10:39 AM CT (US)     164 / 171       
    Side-Guide #2/
    Preventing Villager tasks with UPGRADE_UNIT

    Using UP-Effect #3, UPGRADE_UNIT, you can do some neat things. I'm currently exploring the many ways which UPGRADE_UNIT can be utilised. One such use that I'm sure can have many useful implications is preventing villagers from switching tasks.

    This was achieved by using the following UP-Effect;

    This takes Unit ID 218 (Female Lumberjack) and upgrades her to ID 293 (Female Villager). The result is, when trying to gather from a tree, the Unit does not change.

    I also tried to make this affect the entire Villager class to see how simple I could make it, but it didn't work. So, if you want to prevent all tasks, you'll need to upgrade all worker IDs individually.

    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 07-10-19 10:51 AM CT (US)     165 / 171       
    Keep it coming with the explorative efforts and posts, tanks! Even if I dont have a use for it today, its quite interesting and may come in handy. I will have to examine that offgridplacement stuff for sure, as using TS to do it is a PITA

    Reposting vital info I always struggle to find again:
    unitID list and WololoKingdoms constants

    "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 07-10-19 10:54 AM CT (US)     166 / 171       
    Something I wanted to ask;was it possible to give shallows or other terrain a debuff effect? Like 20% slower movement or reduced armour while standing on it.

    "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 07-11-19 01:24 PM CT (US)     167 / 171       
    I don't think so, not with UP effects anyway. That sounds like you'd need proper data editing.

    I also have no idea what kind of things to investigate next.

    I did some testing with swapping projectile IDs for non-projectiles, and found that swapping to a living unit works in a strange way -- You will hear the unit creation sound, and your score will increase, but no actual unit will appear.

    One potential use would be to swap the projectile for a Hawk, or some other non-player-enabled living unit, and it will nullify the attack of the unit firing it. Could be used for eye-candy?

    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 07-11-2019 @ 06:31 PM).]

    posted 07-17-19 03:42 PM CT (US)     168 / 171       
    About investigation, I was trying to get units trainable at map revealers or siege towers, but I am guessing thats impossible. Another thing is upgrading\transforming buildings into unit units or vice versa, but that causes massive graphical distortions and\or crashes quickly. I was bummed out to find you cannot alter units blast resistance, was hoping to disable friendly fire on mangonels.

    Not sure what to recommend for exploration, I mostly stick to the basics. Thats tough enough for me to figure out anyway!

    "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 07-20-19 04:55 AM CT (US)     169 / 171       
    I'm having trouble installing Userpatch. I've extracted the download into my Age of Empires folder but when I run the exe it comes up with an error message stating "required files could not be located. Setup will now close".

    Any ideas?
    posted 07-20-19 06:55 AM CT (US)     170 / 171       
    1-) Download the latest version of the update, if necessary.
    2-) Ensure that Age of Empires II: The Conquerors Expansion is not running.
    3-) Extract SetupAoC.exe into the "Age of Empires II" folder. It should exist next to files such as empires2.exe and eula.rtf.
    4-) Run SetupAoC.exe from this location in the game folder.
    5-) Select the features you would like to install.
    6-) Click the Install button.

    More Detailed Information:

    Click HERE.
    posted 08-13-19 05:37 AM CT (US)     171 / 171       

    Yeah, if you UPGRADE_UNIT between different classes, things break pretty quickly. You'll be lucky not to CTD in most cases.

    How would you train a unit from a Map Revealer? You can't exactly select them, right?

    Alternatively you could try OLD-ACADEMY - Unit ID 0, but again -- how would you train from it? Using an AI?

    I don't think you'll manage to get a unit training from any non-building class unit, sadly.


    To test this:

    I've gone and set up a scenario where I have multiple Type-80 (Building) units, each one with a different Class.

    Here I have;

  • A Pavilion to represent Class 3 (Building)

    This class is used by most Type 80 (Building) units. Following the Pav, I've set up examples of the remaining Classes used by Type 80 units, except for Class 11 (Miscelaneous) and Class 14 (Terrain) which are used on units that can't be interfaced with by the Player. (Dead Farms, Bridges)

    Class 3 units use either Interface Kind 2, or 10. Both of these Interface Kinds are the same, except that 10 is used by Military Buildings and I believe its sole purpose is to determine which Page the Unit Icon appears on from its Train Location. This isn't something we can adjust with UP-Effects, sadly -- but it's good to bare it in mind, as only certain Interface Kinds even have build pages where Train Locations of units are considered.
  • A Stone Wall to represent Class 27 (Wall)
  • A Packed Mangonel (PMANG) to represent Class 51 (Packed Unit)
  • An Unpacked Treb to represent Class 54 (Unpacked Unit)

    Packed and Unpacked units have Interface Kind 4 (Military Unit) and are the only units here that aren't 2 or 10.
  • A Watch Tower to represent Class 52 (Tower)
  • A Gate Tower to represent Class 39 (Gate)
  • A Farm to represent Class 49 (Farm)
  • A Monument to represent Class 1 (Artifact)

    What I'll do here is use UP-Effects to set the TRAIN_LOCATION attribute of a Militia to each one's Unit ID in turn, as well as set the TRAIN_BUTTON to something that's a clear slot for each unit.

    To start, I do up-effect 1,0,74,43,10,1 to set the Slot,
    followed by the main test:

  • up-effect 1,0,74,42,626,1

  • up-effect 1,0,74,42,117,1

  • up-effect 1,0,74,42,479,1

  • up-effect 1,0,74,42,42,1

  • up-effect 1,0,74,42,79,1

  • up-effect 1,0,74,42,95,1

  • up-effect 1,0,74,42,50,1

  • up-effect 1,0,74,42,826,1

    Monuments being able to train units can lead to some interesting ideas, especially since each individual player can have different units trained there. Imagine training civ-specific heroes at a Monument and building a scenario around capturing it?

    As we can see, Packed and Unpacked Units can't train the unit even though the slot is free and they are Buildings by Type. This is either due to the Interface Kind being different to other buildings, or for hard-coded reasons relating to its Class -- although given that Class 1 (Artifact) can even train units, I don't think Class has as much of an effect as Type and Interface Kind.

    To test it a bit further, I took a Builder (Class 4 - Civilian) which has Interface Kind 3 (Civilian) and tried the same trick, but the button wouldn't appear. I then tried with a Pavilion and even that wouldn't appear, even after ensuring it was Enabled, so I don't know how Civilians handle 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

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

  • « Previous Page  1 ··· 3 4 5  Next Page »
    You must be logged in to post messages.
    Please login or register

    Hop to:    

    Age of Kings Heaven | HeavenGames