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
Bottom
Topic Subject:UP 1.5 Effects & How to use them in Maps
« Previous Page  1 2 3 4 5  Next Page »
BF_Tanks
Squire
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.

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

  • AuthorReplies:
    Mash
    Huskarl
    (id: Mashek)
    posted 04-01-18 03:17 AM CT (US)     71 / 171       
    Wergorne
    Squire
    posted 04-18-18 05:55 PM CT (US)     72 / 171       
    "effect" 7 (ENABLE_TECH) -- "item" can be any Technology ID. "attr" can be 0 for DISABLE, 1 for ENABLE or 2 for FORCE. "value" should be 0, but above 0 also works.
    Actually "value" here should be the technology ID as well. Otherwise the effect won't work. The correctly working example is in UserPatchConst.rms:
    effect_amount ENABLE_TECH RI_LOOM ATTR_ENABLE 22
    (22 is the ID of loom technology).
    Rico_jolla
    Squire
    posted 04-19-18 04:45 PM CT (US)     73 / 171       
    Very good remark, please is there a chance to correct the main post?

    ~--------------------------~{}~--------------------------~
    > PROPHETS OF DOOM <
    o> Project Thread: https://tinyurl.com/y93q84s9
    ~---------------------------~~---------------------------~
    Rico_jolla
    Squire
    posted 05-11-18 06:03 PM CT (US)     74 / 171       
    So i wanted to change LoS of monks to 1 and i do this
    up-effect 4,0,918,1,1,1

    This only works at the beginning of the game, if i try to apply it later, it doesn't.

    why?


    Found the solution: the UP effect doesn't work if the unit has been previously renamed!!!

    ~--------------------------~{}~--------------------------~
    > PROPHETS OF DOOM <
    o> Project Thread: https://tinyurl.com/y93q84s9
    ~---------------------------~~---------------------------~

    [This message has been edited by Rico_jolla (edited 05-12-2018 @ 04:51 PM).]

    CRY Zix
    Squire
    posted 05-23-18 01:18 AM CT (US)     75 / 171       
    Hey! When I set rotation speed with UP effect, it affects only living onjects. For example I set warships' rotation speed to 0, only the existing ships will rotate instantly, the ones created in the future won't. Is there any way to fix this? Thanks in advance.
    UPDATE: I tested it, and setting rotation speed with UP effect does not work, but after I set unit ownership from player to gaya, and then from gaya to player, then the rotation speed starts to work! I don't know why it does not work instantly.
    UPDATE 2: With up-attribute, it completely does not work, even after I set ownership to gaya then to player. (I tested it with unit speed, and it 100% worked, only the rotation time does not work.)

    [This message has been edited by CRY Zix (edited 05-25-2018 @ 04:30 AM).]

    scripter64
    Wolved
    posted 05-25-18 05:08 PM CT (US)     76 / 171       
    I think changing the ATTR_ROTATE_SPEED (6) attribute mid-game with a research tech effect (up-effect) can affect the speed that a unit rotates in-place to face and attack a target already in range. However, I think the speed that a unit rotates before travel to move or attack may be setup at a different time. The a.g.e. data seems to be used for both rotation speeds on game setup, but Ensemble seems to have delinked them after that. Sorry for the trouble!

    Rico, to change an object that has been modified by trigger effects like Change Object Name, which separate units from normal tech effects, please use up-attribute on those specific units instead.

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

    CRY Zix
    Squire
    posted 05-26-18 02:50 AM CT (US)     77 / 171       
    I tested it, the attack rotate really changes instantly, but the move rotate changes only after I rechange the ownership.
    Look my example scenario:
    rotation.scx
    Could you fix this bug? It would be very important in my map.
    UPDATE: Interesting... I have just renamed the object, and rotation speed started to work now...
    UPDATE 2: It also works if I change object HP (even with 0 HP), now I can use it in my map, however it would be easier if it worked without any unit changes.
    UPDATE 3: It also works with change attack effect but does not work with damage object. So need to rename/change HP/change attack of the objects to get rotation speed work.

    [This message has been edited by CRY Zix (edited 05-26-2018 @ 12:19 PM).]

    Rico_jolla
    Squire
    posted 05-31-18 12:40 PM CT (US)     78 / 171       
    Hello, I need some help here.
    I put
    up-effect 1,9,0,0,1,1
    and as a result I obtain that the civilization's name is ereased.
    How can I insert a new civilisation name?
    thx

    PS does it change something in tech tree or so?

    ~--------------------------~{}~--------------------------~
    > PROPHETS OF DOOM <
    o> Project Thread: https://tinyurl.com/y93q84s9
    ~---------------------------~~---------------------------~

    [This message has been edited by Rico_jolla (edited 05-31-2018 @ 12:46 PM).]

    scripter64
    Wolved
    posted 05-31-18 11:27 PM CT (US)     79 / 171       
    The tech effect to change a player's civ name uses a language id for its value, similar to trigger string table ids. This is only for presentation purposes and does not change civ balance, etc. For example, language id 1205 is "Unknown" which can be interesting to hide the civ name. The limitation here is that you can only choose from existing language ids and can't create entirely new names with this tech effect.
    Rico_jolla
    Squire
    posted 06-01-18 04:54 AM CT (US)     80 / 171       
    But wait, on page 1 of this thread there is a demonstration that they could put "Furious the monkey boy" in the Civilisation's Name field, that's why I ask.
    I can only erease the original name but I cant put my "furious the monkey boy" in.

    Another question: is it possible to EDIT the units/building help text that you get by hoovering the mouse above the icon? I mean insert my own text.
    That's what I understand from the same thread.

    ~--------------------------~{}~--------------------------~
    > PROPHETS OF DOOM <
    o> Project Thread: https://tinyurl.com/y93q84s9
    ~---------------------------~~---------------------------~
    scripter64
    Wolved
    posted 06-01-18 06:27 AM CT (US)     81 / 171       
    Set the civ name for p1 to Unknown:
    up-effect 1,9,0,0,1205,1

    Set the civ name for p1 to Furious the Monkey Boy:
    up-effect 1,9,0,0,5763,1

    For the hover text, you can only change it to existing text contained in the language files. Sorry for the trouble!
    Rico_jolla
    Squire
    posted 06-01-18 12:06 PM CT (US)     82 / 171       
    Oooh now I see!
    Well, this is a pretty useless feature...UNLESS, in a next release -allow me to bitch a little- you don't include a funcion that reads from somwhere else the text to replace in the Civilization's Name and in the building/unit description.

    That might be interesting, for instance, to allow the designers to add customized description of special objects or units.

    I am a bit sad because I interpreted it so since the beginning and now I discover that is not possible!

    ~--------------------------~{}~--------------------------~
    > PROPHETS OF DOOM <
    o> Project Thread: https://tinyurl.com/y93q84s9
    ~---------------------------~~---------------------------~
    Cataphract887
    Squire
    posted 06-01-18 12:36 PM CT (US)     83 / 171       
    While limited in scope I think the change civ name feature can be useful, in situations where you dont want to spoil future events by players reading civ names in the score list.

    "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
    Rico_jolla
    Squire
    posted 06-23-18 08:04 AM CT (US)     84 / 171       
    Hi, i dont understand, is there a way to damage all the buildings of a player of 10% of their health? So i can make at each repeat of the effect a damage of 10% of 10% of 10%...

    ~--------------------------~{}~--------------------------~
    > PROPHETS OF DOOM <
    o> Project Thread: https://tinyurl.com/y93q84s9
    ~---------------------------~~---------------------------~
    Mash
    Huskarl
    (id: Mashek)
    posted 07-04-18 09:25 AM CT (US)     85 / 171       
    I'm trying to enable the elite skirmisher icon to appear in the Archery Range during Feudal Age but seem to have no luck working it out. Can anyone here point me in the right direction?
    Cataphract887
    Squire
    posted 07-04-18 10:17 AM CT (US)     86 / 171       
    You can do that via the research technology trigger. Use one with data value 2 followed by one with data value 5, and the elite skirm research should appear, just tested it to double check.

    This has a big downside...while the icon will stay forever as is, if you research a different tech you have force enabled, such as forging in dark age, the game will update the tech tree and remove the elite skirm upgrade option. To get around this in RiverRaids, I had to setup a network of triggers for each custom tech to detect if the player ever researched the others first and re-force enable the desired techs to be available until the player had researched it. I did have to caution the player not to research two technologies at the same time in the hints though, for if this is done the tech that finishes second will get canceled as the update hits and you wont even get the money back.

    "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

    [This message has been edited by Cataphract887 (edited 07-04-2018 @ 10:23 AM).]

    Mash
    Huskarl
    (id: Mashek)
    posted 07-04-18 05:10 PM CT (US)     87 / 171       
    Appreciate it Cata, it worked like you said but disappears when you try to research two technologies at once. I'll try to think of a creative way to feature it, but it's a shame it does happen this way as it would be nice to have it available as a normal tech, despite it being an age earlier.

    EDIT: I have incorporated a simple "accumulate technologies" as the standing condition before elite skirmisher is enabled for the player. While not ideal, it does away with the chance the technology disappears because the player researches something else before it. That and I'm far too lazy to bother utilising your own trigger system. On the side, it's incredibly cool having access to the battering ram or other units while still in Feudal Age.

    [This message has been edited by Mash (edited 07-05-2018 @ 04:35 AM).]

    Rico_jolla
    Squire
    posted 07-05-18 11:30 AM CT (US)     88 / 171       
    Heeeelp please,
    my whole project is at stake because of a very stubborn issue.
    I have 2 hero priests who heal everything, and i dont want it! because then they start roaming the map to heal people, or go off road when they walk, to go after units to heal.

    This drives me CRAZY, i tried to prevent them in every manner from doing so. No clue.

    I cant use UP-effect to reduce their sight range to 1 because they are renamed units.
    If I use UP-attribute...it simply doesnt work.

    Pleeeeease dont make me waste almost 3 yrs of work, i'm almost done! :_(

    ~--------------------------~{}~--------------------------~
    > PROPHETS OF DOOM <
    o> Project Thread: https://tinyurl.com/y93q84s9
    ~---------------------------~~---------------------------~

    [This message has been edited by Rico_jolla (edited 07-05-2018 @ 11:31 AM).]

    Bassi
    Squire
    posted 07-05-18 12:55 PM CT (US)     89 / 171       
    Who's in control of the monks? The AI? Why don't you give them a fix position by affecting them by a patrol effect with no direction in loop?

    My AoC Workshop
    Make Build & Destroy great again!
    Cataphract887
    Squire
    posted 07-05-18 02:01 PM CT (US)     90 / 171       
    You can sometimes use the upgrade unit command to keep a units appearance while discarding some of its functionality. For example in RiverRaids there is a trade cart at the opening base which doesnt move, because it is a battering ram that has been upgraded into a trade cart. The AI doesnt recognize it as a trade cart so it doesnt move it around. Maybe if you upgraded something into the hero priests, the game wouldnt recognize their ability to heal. No idea if that will work though.

    "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
    Rico_jolla
    Squire
    posted 07-05-18 03:52 PM CT (US)     91 / 171       
    Well this may be a good solution, but i would prefer to try it after getting more clue on the actual units.

    The problem is the following:
    I managed to solve the first monk hero for P3.
    For P4, the monk hero WON'T TAKE ANY EFFECT.
    the LoS remains always at 4.
    DOesnt matter what i do.
    I try:
    up-attribute 4,1,1,1
    up-attribute 0,1,1,1
    up-effect 4,0,918,1,1,1

    no way. Los=4.

    The question is: why the other obeys and this doesn't?
    The P3 hero monk is spawned brand new, up-effected and renamed. Smooth.
    The P4 hero monk is hiding in a stealth ram, and he belongs to P2. Then he is ungarrisoned and in my plans should be up-effected and renamed. But this doesn't happen.
    Maybe it has to do with the fact that he already exists? OR that he is transferred from a player to another? Or that player 4 is starting from the first age?
    Or that he has all the technologies deactivated?

    I need it so in the stealth ram because triggers have to fire when i see it on the map, cant spawn it like the other.

    ~--------------------------~{}~--------------------------~
    > PROPHETS OF DOOM <
    o> Project Thread: https://tinyurl.com/y93q84s9
    ~---------------------------~~---------------------------~

    [This message has been edited by Rico_jolla (edited 07-05-2018 @ 03:58 PM).]

    Kor
    Busschof Happertesch
    (id: Derfel Cadarn)
    posted 07-05-18 04:19 PM CT (US)     92 / 171       
    OR that he is transferred from a player to another?
    I am not absolutely certain but this may be the reason - that's how it works with technologies, they do not affect units that have had their ownership changed.

    Another thing: I think you're trying to change the Line of Sight (attribute 1). In addition to that, and in many cases more important, you should also alter attribute 23, Search Radius. This is the area in which a specific unit will actually search for targets. This area is usually 1 larger than its Line of Sight. How this works is that even if a unit does not have an enemy in its line of sight, it will still attack it if it is within its Search Radius, and visible through the (own player or allied) Line of Sight of other units/buildings.
    BF_Tanks
    Squire
    posted 07-06-18 01:30 PM CT (US)     93 / 171       
    Sorry for my massive inactivity -- It will continue, got a lot of life stuff happening and generally my gaming time has been spent elsewhere, with the girlfriend.

    So, is it possible to hand over the thread or have a moderator update it on my behalf with discoveries or important things to note that have already been discussed in the thread? I may be able to come back and edit my posts to quote others but I'm not really able to do any work myself for presenting findings.
    "effect" 7 (ENABLE_TECH) -- "item" can be any Technology ID. "attr" can be 0 for DISABLE, 1 for ENABLE or 2 for FORCE. "value" should be 0, but above 0 also works.
    Actually "value" here should be the technology ID as well. Otherwise the effect won't work. The correctly working example is in UserPatchConst.rms:
    effect_amount ENABLE_TECH RI_LOOM ATTR_ENABLE 22
    (22 is the ID of loom technology).
    In my tests, a value of 0 worked. Are you sure you need Value to be the TID? I need Scripter to confirm.

    Edit:

    I've updated the main post with links to the other posts (As they're obviously lost on Page 2), and I've added an update to the Attributes and Effects post in relation to "value" possibly needing Technology ID, but also working with 0 in my test (Granted it's an old test, but hopefully Scripter or someone can confirm for sure)
    Maybe it has to do with the fact that he already exists? OR that he is transferred from a player to another? Or that player 4 is starting from the first age?
    Or that he has all the technologies deactivated?
    I can maybe shed some light:

    up-effect is basically a Technology effect. So it can be expected to not work on ownership-changed units. up-attribute might though, but I think it might also be a technology effect only targeting a specific unit, instead of an ID of units or types.

    What I would suggest is having a up-effect, THEN rename the monks, and also set up the monks before any ownership changes.

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

    Rico_jolla
    Squire
    posted 07-07-18 03:26 PM CT (US)     94 / 171       
    Many thanks for the useful information.
    So i arranged some things, but it still doesnt work.

    *the monk from P4-that-was-originally-P2 is now originally set to P7.
    *I give 7,0,918,23,0,1 and this should bring the search radius of my friend monk P7 to 0. Right??
    *Then the monk goes from P7 to P4 and P7 turns enemy to P2 (owner of the stealth ram in which this dude is hidden).
    *The ram is deleted at the moment of his "spawn", unde P4 player.
    (all this without reneaming)

    The monk keeps healing, the Up effect doesnt apply when he is under P7's control.

    I repeat the procedure with 7,0,918,1,1,1, still same result.

    According to what stated by you guys before, it is useless to try it on P4 since it is a later owner player.

    **UPDATE**
    strangely enough, in a separate test it works.
    I placed the same hero monk, gave 4,0,918,1,1,1 and the LoS went to 1. then renamed the unit and switched ownership. oily-smooth.
    Still i dont understand why in the scenario it doesnt change!


    **UPDATE**
    i tried to place a normal monk for P7 in the real scenario, and he got all the up-effects. The issue is with the specific unit... what can it be? some effect somewhere else in the scenario?

    >>SOLUTION>>
    found among 4325 trigs a forgotten testing trigger which gave +4 LoS to all monks... :\
    Dumb me. But many new information are now clearer!

    ~--------------------------~{}~--------------------------~
    > PROPHETS OF DOOM <
    o> Project Thread: https://tinyurl.com/y93q84s9
    ~---------------------------~~---------------------------~

    [This message has been edited by Rico_jolla (edited 07-08-2018 @ 04:57 AM).]

    BF_Tanks
    Squire
    posted 07-10-18 06:38 AM CT (US)     95 / 171       
    The diosorganised Trigger list strikes again.

    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 07-26-18 04:47 AM CT (US)     96 / 171       
    Found a major bug in this build (the only one I've found so far).
    Whenever you try to shift select more than one unit at the same time in a big scenario (tested both in "Fall of Hummaria" and some of my older works), the game instantly crashes.
    Selecting ~20 units for a trigger effect in AOKTS causes the software to become very unstable as well... It crashes whenever you try to save the file or move the cursor too quickly.
    Shift selecting units works just fine in these scenarios with the 1.0c version.

    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 07-26-2018 @ 04:48 AM).]

    scripter64
    Wolved
    posted 07-26-18 05:34 AM CT (US)     97 / 171       
    The number of units that can be manually selected in a single patrol trigger effect is 20, so if you exceed that number in aokts, you'll likely be writing to invalid memory. UP should try to cap the selection to prevent an overflow here. v1.0c will allow the selection to overflow, which will cause subtle corruption of the general scenario data. About the shift+select crashing, please list the following:
    1. exact scenario file download link to test (please link an example scenario file .scx not a campaign file .cpx)
    2. trigger id to edit
    3. trigger effect to edit
    4. which units to shift+select (box select)

    Thanks!

    [This message has been edited by scripter64 (edited 07-26-2018 @ 05:42 AM).]

    rewaider
    Squire
    posted 07-26-18 05:44 AM CT (US)     98 / 171       
    Thanks a lot for the quick response, scripter64!
    The number of units that can be manually selected in a single patrol trigger effect is 20, so if you exceed that number in aokts, you'll likely be writing to invalid memory. UP should try to cap the selection to prevent an overflow here. v1.0c will allow the selection to overflow, which will cause subtle corruption of the general scenario data.
    Well, that's strange. Cause it starts crashing at the exact amount of 17 units... in this case. Some other cases it's crashed with groups of 6 or so.

    Here's the file: DOWNLOAD
    The Trigger name is: Trigger 980 Midscene weather ID = 992.
    Edit 1st and 2nd "patrol" effects, trying to select half (5 out of 10) of the "Huskarl 2" - selected in the 3rd patrol effect for reference (you can delete the 3rd one afterwards) - for each one (plus the units already selected).

    PS: Just to spare you some time... I've already tried to select them in every single way possible (one by one, alterning between the effects, reopening aokts for each time, etc)... And I've only managed to select 1 of the huskarls for each effect. Once I selected the second one (for any of the two effects), AOKTS started crashing before I could save,.

    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 07-26-2018 @ 05:56 AM).]

    scripter64
    Wolved
    posted 07-26-18 05:52 AM CT (US)     99 / 171       
    Thanks! Will look into this soon. I'm sorry for the trouble!

    Just to confirm: when you say AOKTS is crashing, do you mean trigger studio is crashing or the game itself?

    [This message has been edited by scripter64 (edited 07-26-2018 @ 05:55 AM).]

    rewaider
    Squire
    posted 07-26-18 05:58 AM CT (US)     100 / 171       
    Thank you
    Just to confirm: when you say AOKTS is crashing, do you mean trigger studio is crashing or the game itself?
    Yeah, trigger studio... But the game crashes as well, in different conditions, though, since I can't select more than 1 unit without it crashing immediately... It happens whenever I try to shift click some unit (after having one normally selected). This issue only applies to trigger & map 'intensive' scenarios, such as the one I gave you the download link and some of my previous crappy work, such as Country of Hinnegard pt. 1 (even the half finished version of it crashes).

    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 07-26-2018 @ 06:05 AM).]

    scripter64
    Wolved
    posted 07-26-18 06:19 AM CT (US)     101 / 171       
    If you have a moment, can you visit this chat so we can confirm the fix?

    [This message has been edited by scripter64 (edited 07-26-2018 @ 06:50 AM).]

    rewaider
    Squire
    posted 07-26-18 06:37 AM CT (US)     102 / 171       
    On it

    The Fall of Hummaria -- Teaser [4.2] -- Project's Thread
    Cavern Pirates -- The Treasure Hunt [4.6] -- Captain's Revenge
    My Blacksmith
    scripter64
    Wolved
    posted 07-26-18 06:57 AM CT (US)     103 / 171       
    The fix for the selection issue has been released to public beta. Thanks, rewaider
    UserPatch v1.5 Beta has been released (20180726-000000)! This update fixes a crash bug in the scenario editor that can occur when shift+selecting objects to add them to scenario trigger effects. Thanks to rewaider on AoKH for the report! The multiplayer sync id has been updated, so all players in a game must have this build (6196) to play in multiplayer.
    You can find the download link here: http://userpatch.aiscripters.net/guide.html
    rewaider
    Squire
    posted 08-03-18 10:44 AM CT (US)     104 / 171       
    Hey, scripter 64!
    Got 2 more kinda major issues to report:

    1) Once you manually place (through the editor, not through triggers) a gate in your custom scenario, it starts spamming random similar objects (Gate 3x, Gate 2something and even "town center" related objects sometimes) over themselves... After a while (for each time you "save", "test" or "reload" your scenario ingame), it tends to cause some instability to the map overall, leading to many randomly timed crashes - which was the main issue plaguing my project, since 1.0c. And the only workarounds I could find so far is to either keep deleting the gates and their spam every once in a while (and before you turn the map into a campaign) OR to create the gates through triggers instead (which worked much better in my case). But that ALSO leads to another issue:

    2) You can't "create" (through triggers) Sea Gates (Palisade Gates) over 'land' terrains. I've had to download Julius999's "Designer's Editor" to overcome this issue.... But now I heard that it's incompatible with the default data. Speaking of obj. placement restrictions, you also can't get too many "stumps" or "graves" togheter over objects like CLIFFS and such (they disappear right after you either reload or test the scenario).

    Given the points I made, I'd also like to suggest you to erase any kind of obj. placement restrictions related to the "create object" effect... Since it, in the vast majority of the time, ends up being more of a hassle than actually helpful.
    PS: If possible, try slowing down the "snowstorm" particles speed... They look kinda weird going down *that* fast.

    That's pretty much all the remaining issues I have with the Userpatch 1.5 (as far as I remember).
    Thanks a lot in advance

    Issue number 1 was, I believe, what caused scenarios like Gwyndlegard to crash at apparently random situations (and even some of the relics of Athalen's maps). In my experience it doesn't seems to affect smaller (with less objects and terrain tricks overall) NEARLY as much.

    EDIT: Is there any kind of way to make the "stop object" effect to stop units from patrolling? I know about the change ownership workaround, just nitpicking a little bit

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

    scripter64
    Wolved
    posted 08-03-18 03:27 PM CT (US)     105 / 171       
    For the gates multiplying, I'll see if anything can be done there. It might be a stack object recreation issue. Do you have an extremely simple test scenario that shows how to cause the issue where it multiplies each Test launch with specific steps on how to remake the scenario? I can't seem to get it to happen during testing. Is it a specific gate direction that multiplies?

    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? Please ensure the up-effect is before the create object effect. 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. Disabling all terrain checks for the create effect during gameplay may have side effects.

    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.

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

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

    Hop to:    

    Age of Kings Heaven | HeavenGames