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.186 replies, Sticky
Age of Kings Heaven » Forums » Scenario Design and Discussion » UP 1.5 Effects & How to use them in Maps
Bottom
Topic Subject:UP 1.5 Effects & How to use them in Maps
« Previous Page  1 2 3 4 5 6  Next Page »
BF_Tanks
Squire
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.

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

    Second:
  • 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
    effect_amount SET_ATTRIBUTE VILLAGER_CLASS ATTR_HITPOINTS 100
    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_LOCATION 42
    #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:
    vs


    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
    Performance
    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:
    Julius999
    Imposter
    posted 08-03-18 05:32 PM CT (US)     106 / 186       
    As far as I am aware, the gate problem has existed in every version of AoK. It does indeed seem to depend on the gate rotation. My recollection is that it applies at least to the gates which are parallel to the lower left and upper right edges of the map. You can tell when the first extra gatepost spawns, because the shadow of the gatepost becomes visibly darker. I'm not 100% certain that an extra gatepost spawns whenever you 'Test' the scenario, but I think saving and reloading when testing does cause it.

    1010011010
    [ All_That_Glitters | Pretty_Town_Contest | Other_AoK_Designs | AoE_Designs ]
    Member of Stormwind Studios

    [This message has been edited by Julius999 (edited 08-03-2018 @ 05:32 PM).]

    scripter64
    Wolved
    posted 08-03-18 05:57 PM CT (US)     107 / 186       
    Are there any scenarios that depend on multiplied gates or TCs to get the isolated corner gate post objects with the flags or TC pieces? This could be fixed by blocking those pieces, but I don't want to break compatibility.

    I tried repeatedly saving, loading, testing, and couldn't get it to happen. It's a strange case lol

    [This message has been edited by scripter64 (edited 08-03-2018 @ 07:02 PM).]

    rewaider
    Squire
    posted 08-04-18 09:06 AM CT (US)     108 / 186       
    Sorry for the delay.
    For the sea gates, if you use up-effect to change the terrain restriction id for all of the associated sea gate objects to 0 (all) before the create effect like "up-effect 0,0,SeaGateId,53,0,1", does it allow placement?
    Thanks for the tip! Gonna try it out soon.
    Reordering effects with the arrow buttons only changes the presentation order, but not the real order, so you may need trigger studio to ensure ordering unless you add the up-effect into a previous trigger or remake the create trigger.
    Yeah I've learned about this in the hard way long ago.
    I'm not familiar with using the stop object effect for patrol, but if this is for an AI, the up-reset-unit script command should be able to halt them.
    Don't worry about this one, it's not a big deal. I was just asking if there was a possible way to kinda fix it (currently the stop object effect halts the units for ~2 seconds and then they go back to their patrol routes).
    It does indeed seem to depend on the gate rotation. My recollection is that it applies at least to the gates which are parallel to the lower left and upper right edges of the map
    Indeed. But it works differently with Sea Gates... for some reason.
    I'm not 100% certain that an extra gatepost spawns whenever you 'Test' the scenario, but I think saving and reloading when testing does cause it.
    I meant whenever you press the "quit" button from your testing section. Then, a "gate-object-created" noise will popout and their shadows will get a little bit darker.
    Are there any scenarios that depend on multiplied gates or TCs to get the isolated corner gate post objects with the flags or TC pieces? This could be fixed by blocking those pieces, but I don't want to break compatibility.
    For all the scenarios I've ever played (believe me, I've played tons of scenarios from AOKH), I don't remember seeing ONE that used these objects... The fact that they're pretty buggy also makes them a not-very-good-candidate for building tricks and such. If anybody knows a map that uses them, please correct me.
    I tried repeatedly saving, loading, testing, and couldn't get it to happen. It's a strange case lol
    I suppose this only affects maps with a lot a stuff... For reasons. Big maps always seem to get the shortest straw.
    And yeah, this issue also happened in the 1.0c patch for sure.

    EDIT: Btw, do you know the ID of the "Seagate group"? Cause I can't find it over the UnitID List Nvm found it via AOKTS

    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-04-2018 @ 09:12 AM).]

    rewaider
    Squire
    posted 08-04-18 09:21 AM CT (US)     109 / 186       
    Nice, the solution you gave me worked
    (the one about removing the seagate's terrain restrictions).

    EDIT: There's something strange happening in my scenario related to the up-effect/attribute.
    I've set a magonel's (from p3) projectile to be the one of a trebuchet (id 371)... It, instead of removing all the magonel's default projectiles, just adds up to be one more of the stones (though quite larger). The minimum range of the magonel also gets increased by a tiny bit (needs to shoot from slightly longer distances) for some reason. But no problem there, as it looks quite cool. However, the magonel's properties seem to get reseted once I reach the scene on which the player gets control of it. To clarify the issue a bit more, I've tried to change the ownership of the magonel some seconds after its properties are changed (through both up-effect and attribute, one for each try).... And it worked perfectly! I could even change their range to 10 with no problems whatsoever.
    Every other up-effect and attribute seems to be working fine in this map (even the complex system I've made for an accursed tower to shoot as many arrows as there are units garrisoned inside of it, 0 units = 0 arrows and so on), except for this one...
    Do you know any possible reasons for it? Perhaps the change ownership (even much after changing the properties) can mess with some properties? Or maybe it wears out with time? Cause the scene happens ~8 minutes after the effect triggers. IDK

    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-04-2018 @ 01:14 PM).]

    scripter64
    Wolved
    posted 08-04-18 03:07 PM CT (US)     110 / 186       
    ES handled class 13 siege weapons (ram line, mangonel line, bombard cannons) differently than other objects for conversion and ownership changes. The object properties of the original owner are discarded by certain events after conversion and the unit receives the properties of the new owner. This can even cause a converted onager to revert to a mangonel if the new owner hasn't researched onager yet. Just ES things lol

    As for the gate multiplying, if anyone can find a reliable set of steps to cause it, starting from a new scenario, please let me know.
    rewaider
    Squire
    posted 08-04-18 05:56 PM CT (US)     111 / 186       
    ES handled class 13 siege weapons (ram line, mangonel line, bombard cannons) differently than other objects for conversion and ownership changes. The object properties of the original owner are discarded by certain events after conversion and the unit receives the properties of the new owner. This can even cause a converted onager to revert to a mangonel if the new owner hasn't researched onager yet. Just ES things lol
    Well, that explains a lot
    The properties still aren't taking effect even if I use the up-attribute AFTER the ownership is changed to mine... It isn't all that big of a deal, though. Nonetheless, thank you very much for the response and useful info!
    As for the gate multiplying, if anyone can find a reliable set of steps to cause it, starting from a new scenario, please let me know.
    Gonna create a test map and see if I can find anything later on.

    UPDATE: Well, that was faster than I expected.... Within 5 'test-save-reopen's I've been able to kinda recreate the situation.
    I've placed every single possible gate on my map, and half of them left invisible GATE objects in their place (checked it with AOKTS). Although they are not visible like what happened in my Fall of Hummaria's scenario, the 'gate placed' noises were popping out just like it did on it.

    Maps uploaded HERE (if you want to check them)
    In the first one I just reloaded the map 5 times (after testing it for each time), and in the second one I've deleted all the gates - thus leaving these 'ghost' gates lying around.

    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-04-2018 @ 06:17 PM).]

    Mash
    Huskarl
    (id: Mashek)
    posted 08-04-18 06:45 PM CT (US)     112 / 186       
    As for the gate multiplying, if anyone can find a reliable set of steps to cause it, starting from a new scenario, please let me know.
    I've personally found while using UP that it seems to happen after playing scenarios either from custom scenarios or campaigns, before jumping straight back into the editor. As I haven't played a custom campaign in a little while now, I've coincidentally had no issue with gates, particularly sea gates, from developing that nasty bug.
    scripter64
    Wolved
    posted 08-04-18 07:40 PM CT (US)     113 / 186       
    Hmm, I wonder if it's map copy that starts the multiplying of the gate mentioned by Julius. I think the gate placed sound can also occur if the player's assigned age advances them to fortified walls, so it may not always be related to the gate multiplying stuff.

    For your scenarios, rewaider, it looks like you're placing gate objects that aren't the standard 4 scenario base types of the original game (some of these have open gate doors in the editor, etc.), so that might cause unexpected behavior. Only the standard 4 gate types have the stack/head/transform/annex stuff setup to avoid duplicates. The standard scenario type ids for stone gates are 64, 88, 659, 667. For palisade/sea gates, the ids are 789, 793, 797, 801. If you're using a designer .dat file to place other gate ids, that may explain part of the issue.

    For the gate shadows, it seems it's normal for the straight up-down and left-right gates (from the perspective of the screen) to have darkened shadows on some parts, so that may not indicate a problem for those gate types. The palisade/sea gates seem to have darkened shadows regardless.

    [This message has been edited by scripter64 (edited 08-04-2018 @ 09:35 PM).]

    Julius999
    Imposter
    posted 08-04-18 10:35 PM CT (US)     114 / 186       
    Are there any scenarios that depend on multiplied gates or TCs to get the isolated corner gate post objects with the flags or TC pieces? This could be fixed by blocking those pieces, but I don't want to break compatibility.
    There are some scenarios which use gate posts in isolation. The Ulio scenario with the Yeri encampment around King Aguric's city, and Oliver's Lightning and Thunder prologue, spring to mind.

    But I don't think anyone relies on the multiplying of gate posts that happens. I imagine that everyone who wants to place a gate post on its own either map-copies it or has a data file which enables it to be placed.

    1010011010
    [ All_That_Glitters | Pretty_Town_Contest | Other_AoK_Designs | AoE_Designs ]
    Member of Stormwind Studios
    scripter64
    Wolved
    posted 08-04-18 10:52 PM CT (US)     115 / 186       
    Thanks! That eliminates the easiest solution, so more specific research will be required. Tomorrow, I'll try to find one of the stone gate object type ids that causes the multiplying and figure out why it happens. I'm guessing it's probably one of those stack properties in a.g.e. or something.
    rewaider
    Squire
    posted 08-05-18 05:22 AM CT (US)     116 / 186       
    I believe the ones I've placed in my FoH map were the correct ones... Gonna check their IDs out in a minute (from the 2y ago file).
    Also, before I decided to use the .dat editor, I've tested like all the different possible gate IDs for each place, and still all of them were multiplying. These ones, however, weren't invisible (like the gates from my test scenarios).

    UPDATE: Yep, they're the correct ones. 3 of the gates (with a completely dark shadow) are ID 88; 1 of the palisade gates is ID 789; 2 of the palisade gates are ID 793. I haven't accounted the other ones, as their shadows were normal.

    There seems to be a patern in their rotation as a matter of fact. Since the only gates - the 3 stone gates - that had dark shadows were vertically faced (northwest direction). The ~4 horizontal (southwest direction) were completely fine.
    However, this issue seems to have somewhat different conditions for Seagates, since all of them were dark shadowed. Both the horizontal one (southwest direction) and the vertical one (northwest).

    Southwest direction



    Northwest direction



    Btw, this was 2 years ago. So, at time, I haven't even touched any kind of .dat modifications nor even the UP (but I suppose the issue stays the same between 1.0c and UP).
    EDIT: If it helps, the bugged gates are divided in 3 different 'parts' (not counting the spam underneath them), the main one I guess (the fences in the middle - which was the part I've selected for this test) and the 2 lateral walls with flags.
    It takes ~30 "deletes" to erase them as a whole.
    However, I'm not entirely sure about the central part being the one that has 'produced' the spam... Or if it was just a product of the lateral walls with flags *talking about stone gates, not sea gates*

    Link to the old scenario

    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-05-2018 @ 08:42 AM).]

    scripter64
    Wolved
    posted 08-05-18 03:52 PM CT (US)     117 / 186       
    Let's try to isolate that northwest stone gate type (88). I think that's the type that Julius mentioned, as well. Map copy definitely causes multiplying for the northwest gate. However, I'm guessing you didn't map copy the land for that gate. If anyone can figure out some steps to cause the northwest gate to begin multiplying without map copy, please post the steps. Maybe placing it on top of walls or placing walls near it or something? I'll try some stuff, too.

    [This message has been edited by scripter64 (edited 08-05-2018 @ 04:01 PM).]

    rewaider
    Squire
    posted 08-05-18 04:02 PM CT (US)     118 / 186       
    Yeah, they were placed directly from the buildings tab indeed. I may have moved (with the "move object" checkbox) them from place to place, but I assume this is not very relevant to the case.

    It seems to be a really weird issue, since when I (today) tried to move the (central part of the) gate to somewhere else, it didn't produce any of the spam... Although I only 'test-save-reloaded' the map for ~3 times. However, this time I DIDN'T place them near any walls, so this maybe a bit of a lead. Gonna try moving them to different places.
    Perhaps it has something to do with the absurd amount of times it's been playtested? Or maybe the large amount of objects, terrain tricks (in a map of such size), and often instability, found in that version of the map? Cause the only thing I could see in common between this old version of my map and Gwyndlegard (which is the best example of the issue I could find in my memory) is that both maps are large-to-giant sized tend to crash after a certain amount of 'quits' and 'reloads'.

    UPDATE: Couldn't get any results :s
    Tested 2 former bugged northwest gates (moved them to another place), 1 connected with fortified walls and the other one without; tried repetitively opening and closing them with units; locking them via looped triggers; put some variated terrains and elevations beneath then... All of that while doing the 'test-save-reload map' thing more than 15 times.

    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-05-2018 @ 04:24 PM).]

    scripter64
    Wolved
    posted 08-05-18 04:31 PM CT (US)     119 / 186       
    Just checked the scenario in the zip with orange having the darkened shadow 88 and tested the scenario to find that the gate part was removed, leaving the flag poles. Was this maybe an intentional thing back then? Without map copy, I can't get 88 to start multiplying.

    [This message has been edited by scripter64 (edited 08-05-2018 @ 04:36 PM).]

    rewaider
    Squire
    posted 08-05-18 04:38 PM CT (US)     120 / 186       
    Oh I'm so sorry... Just delete the last trigger (Name "Trigger 1592), and they won't get removed at the first second. I was testing the issue at the time (2y ago) and could not find a workaround, that's why I left it that way.
    No, it wasn't an intentional thing
    Without map copy, I can't get 88 to start multiplying.
    Yep, me neither. Do you think it's a possibility that a northwest gate of some other ID (perhaps the flagged wall thing) can spawn an 88 gate besides it?.
    This could be the explanation of my long time issue.... However I'm still puzzled by the fact that I've (supposedly) missed all the northwest gate IDs - by placing the wrong ones - *but not* any of the southwest ones... And that the exactly same scenario happened in "Gwyndlegard".
    Sea gates are still buggy tho.

    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-05-2018 @ 04:44 PM).]

    scripter64
    Wolved
    posted 08-05-18 04:42 PM CT (US)     121 / 186       
    Oh, k, no problem lol. I think the real problem here, though, is that if this were to be fixed, it would limit the scenario editor a bit by preventing people from being able to design with those flag posts and stuff, like the Ulio scenario mentioned by Julius. Since those objects are not the base of the stack, they generate the rest of the stack by design, which causes the multiplying effect. I'm not sure if it would be safe to disable this or change the way the stack system works.
    rewaider
    Squire
    posted 08-05-18 04:48 PM CT (US)     122 / 186       
    Hmmm... Perhaps it would be an easier solution to just create an entirely new set of "gate" objects - exclusive to the map editor - with no 'spamming' properties whatsoever? Like copies of the 4 old ones but not related to them in any way.
    Btw, I have no idea of what I'm talking about Just wondering.

    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-05-2018 @ 04:54 PM).]

    scripter64
    Wolved
    posted 08-05-18 05:24 PM CT (US)     123 / 186       
    After manually building them with a villager, it seems the palisade/sea gates have darkened shadows always, so they may not be bugged even if they look like that. It might be clearer to Test the scenario and delete the gate. If it goes away entirely, it's probably ok. If it leaves behind the flag posts, then some multiplying happened.

    [This message has been edited by scripter64 (edited 08-05-2018 @ 05:26 PM).]

    Julius999
    Imposter
    posted 08-05-18 05:31 PM CT (US)     124 / 186       
    I find the issue easy to reproduce and I'm confident it's got nothing to do with file size or map size or number of objects. Here are the steps I followed:

    1. Place a gate for player 2, with what rewaider has termed the 'northwest' direction as shown in the second screenshot of post 116. (Place some other units for player 2 as well, to avoid automatic defeat.)

    3. Test.

    4. Save game while in test mode.

    5. Load the save file.

    6. Quit test.

    (No duplication of gate posts yet noticeable.)

    7. Quit to main menu.

    8. Load up the scenario again... and now there are extra gate posts!

    1010011010
    [ All_That_Glitters | Pretty_Town_Contest | Other_AoK_Designs | AoE_Designs ]
    Member of Stormwind Studios

    [This message has been edited by Julius999 (edited 08-05-2018 @ 05:55 PM).]

    scripter64
    Wolved
    posted 08-05-18 05:54 PM CT (US)     125 / 186       
    Thanks! Trying to trace the cause
    scripter64
    Wolved
    posted 08-05-18 08:43 PM CT (US)     126 / 186       
    The issue with unexpected stack object duplication for gates and other similar objects has been fixed when testing scenarios. Map copy can still get special stack objects, but they should no longer multiply randomly. If you have time, please try this new build and let me know if it seems ok.

    New public beta (20180805-000000, build 6206): http://userpatch.aiscripters.net/guide.html
    rewaider
    Squire
    posted 08-06-18 10:34 AM CT (US)     127 / 186       
    Nice
    Gonna try it out. If anything goes wrong I'll post it here.
    EDIT: The setup AOC seems to be crashing whenever I try to install the update :s
    Never happened in any of the previous builds

    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-06-2018 @ 10:58 AM).]

    scripter64
    Wolved
    posted 08-06-18 12:04 PM CT (US)     128 / 186       
    Download was complete? When exactly does it crash? Antivirus blocking it as it tries to write to the exe?

    UserPatch.v1.5.Beta.20180805-000000.zip size should be 2025313 bytes.
    SetupAoC.exe size should be 1892352 bytes.

    If all else fails, please visit this chat.

    [This message has been edited by scripter64 (edited 08-06-2018 @ 12:37 PM).]

    rewaider
    Squire
    posted 08-06-18 02:42 PM CT (US)     129 / 186       
    Oh nmv. Moved it to the AOEII's main folder and then it worked
    It only crashed when executed from the age2_x1 folder (strangely enough, it didn't crash in the previous versions :s afaik).
    Nonetheless, I'm gonna try it out now (the gate thing)

    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-06-2018 @ 02:47 PM).]

    scripter64
    Wolved
    posted 08-06-18 03:23 PM CT (US)     130 / 186       
    Oh, k lol I don't think I've recently tested installing from the age2_x1 folder, so that might have unexpected results. As for the fix, the palisade/sea gates will probably still have a darker shadow, but there should be no duplication if you check from trigger studio. It's just their design, I think.

    [This message has been edited by scripter64 (edited 08-06-2018 @ 03:27 PM).]

    Julius999
    Imposter
    posted 08-06-18 04:38 PM CT (US)     131 / 186       
    I think scripter64 is a deus ex machina when it comes to age-old editor bugs.

    1010011010
    [ All_That_Glitters | Pretty_Town_Contest | Other_AoK_Designs | AoE_Designs ]
    Member of Stormwind Studios
    scripter64
    Wolved
    posted 08-06-18 07:09 PM CT (US)     132 / 186       
    Julius lol, if you have time, please let me know if it seems ok
    Kataphraktoi
    Squire
    posted 08-08-18 11:42 AM CT (US)     133 / 186       
    Awesome work on addressing the gate issue scripter! This has plagued us for a long time indeed.

    "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
    BF_Tanks
    Squire
    posted 08-09-18 04:39 AM CT (US)     134 / 186       
    I don't want to insult Julius and his work, but his "Designers Editor" is really outdated. A lot of the revealed objects aren't useful -- just clutter for the unit lists in the editor. You'll find that a lot of things you don't even touch. It also doesn't address tech Language IDs to reveal the civilization techs or correct the incorrectly "taunt" named techs in the research lists in the editor.

    Also for the mangonel projectiles;
    It's an issue where up-effect can't alter the Duplicate Projectile ID, only the standard Projectile ID. When a unit, any unit, fires more than one projectile per attack, it's first firing a base projectile which takes the damage values from the unit, then it fires Duplicate Projectile which has its own damage values and other characteristics. I also believe your point on a higher minimum range may be related to the trebuchet projectile having different flight characteristics -- maybe it has a higher arc, so it has to fly higher and that could mean that it affects the minimum range slightly because it can't fire directly up then down? Not sure.

    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
    HockeySam18
    Dúnadan
    posted 08-09-18 10:06 AM CT (US)     135 / 186       
    Of course it's somewhat outdated - it's 8 years old and predates the UserPatch, whose ctrl-s system all but eliminates the need to edit a data file to remove editor radii and terrain restrictions. There are of course many objects that it unlocked that I never used, but that's not to say that others may not have found them useful.

    In my eyes, Julius' Designer's Editor is to utilities what The Quest is to custom scenarios. Certainly outdated by today's standards, but nothing short of revolutionary for its time. For most of my early years at AoKH I used it or mimicked its functionality in a separate data file.

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

    "Cattle die, kindred die, every man is mortal:
    But the good name never dies of one who has done well." - Hávamál

    "Hockey is the only sport left for true men." - ax_man1
    Julius999
    Imposter
    posted 08-09-18 05:24 PM CT (US)     136 / 186       
    I'm pretty sure that The Quest of utilities is the venerable Eye Candy Museum. It was one of my first downloads when I found AoKH in 2005.

    1010011010
    [ All_That_Glitters | Pretty_Town_Contest | Other_AoK_Designs | AoE_Designs ]
    Member of Stormwind Studios
    BF_Tanks
    Squire
    posted 08-10-18 05:28 AM CT (US)     137 / 186       
    I've always had my own custom editor mod that I never really bothered to release on the Blacksmith although it's been distributed and linked a few times. I'm going to be working on one that will also include some .dll additions so that you can select techs that were previously hidden from the tech lists, and rename units like "Light Cavalry" to "Slaver Cavalry" and etc, just to tidy it up a bit as Language ID changes sync just fine

    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
    rewaider
    Squire
    posted 08-10-18 12:51 PM CT (US)     138 / 186       
    No prob. I was using it just for the sake of being able to create (via triggers) a Sea Gate on land. But, following scripter's suggestion, I've been able to replicate the same effect with a standard .dat through the up-effect.
    Got no issues after switching the modded .dat file back to the normal one.
    It's an issue where up-effect can't alter the Duplicate Projectile ID, only the standard Projectile ID. When a unit, any unit, fires more than one projectile per attack, it's first firing a base projectile which takes the damage values from the unit, then it fires Duplicate Projectile which has its own damage values and other characteristics. I also believe your point on a higher minimum range may be related to the trebuchet projectile having different flight characteristics -- maybe it has a higher arc, so it has to fly higher and that could mean that it affects the minimum range slightly because it can't fire directly up then down? Not sure.
    Oh that's nice to know, thanks! I suppose it should be possible to change their minimum range with the up-effect/attribute... In any cases, I'm not gonna mess too much with siege weapons now due to the inconsistency regarding some properties/attributes of theirs (as explained by scripter in a few comments above).


    PS: So far I've ran into 0 issues regarding the gates' problem.
    Though, I've got a question: Do elevations tend to mess with the 'task unit' and 'patrol' location coordinates? Because it seems that, at least in the new area I've designed (the rebel war camp), units are moving 1 extra square to the left instead of the one shown in the editor ("set location").
    Strangely enough, this has also happened to me when I was designing the boss fight of my previous scenario (Captain's Revenge) in HD edition - thus forcing me to compensate with 1 square to the right every time I had to task/teleport any unit... Both areas were completely covered by "elevation 3" and beyond - but many others were as well and didn't present this issue (afaik).
    It *only* affects effects related to movimentation. "Create object" and such work fine.

    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-10-2018 @ 02:22 PM).]

    Julius999
    Imposter
    posted 08-10-18 02:21 PM CT (US)     139 / 186       
    I don't think the effect you describe has anything to do with elevation, although possibly it makes more noticeable an effect which is always present.

    'Create Object' appears to create the unit in the centre of the tile.

    'Task Object' does not appear to task the unit precisely to the centre of the tile and then stop. I've frequently noticed this. I've never perceived it as always being a bit 'left'. My suspicion was that it tasks the unit only as far as the edge of the tile you select, but I'm not certain.

    1010011010
    [ All_That_Glitters | Pretty_Town_Contest | Other_AoK_Designs | AoE_Designs ]
    Member of Stormwind Studios
    rewaider
    Squire
    posted 08-10-18 03:22 PM CT (US)     140 / 186       
    Well, it's pretty clear to me that the units tend to go towards the left side of the square... What is not clear is where and why this happens.
    So far in my experience, this issue only affects the top right corner of the map... although, in this scenario of mine it's not exactly there, all the units inside of Wallingstone - a fortress located exactly in the top right corner of the map - are moving just fine.... The rebel camp being somewhere below it - which can still be considered part of the top right corner of the map, though.

    It *may* have something to do with the free-placement feature, as it's only happened in this scenario AFTER I installed Userpatch - only in the new area I've designed (and most of the units of the said cutscene were placed using the free placement)... I'm gonna test it out now and check the results.
    I don't think the effect you describe has anything to do with elevation, although possibly it makes more noticeable an effect which is always present.
    That is possibly one of the reasons as well... But doesn't shows up consistently enough, however.

    UPDATE: Nope, the issue still affects units placed with the vanilla grid placement.
    And also, my mistake, the area (of my current project) IS NOT covered by elevation 3, but 2.

    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-10-2018 @ 03:51 PM).]

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

    Hop to:    

    Age of Kings Heaven | HeavenGames