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

Scenario Design
Moderated by MosheLevi, Mister SCP

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Improving the playability and working with bugs
posted 02-09-09 07:05 AM EDT (US)   
    You wanna learn about a usefull bug in colosseum,
    You like to avoid graphic bugs,
    You like to get a better playability for your scenario or
    You just want to inform you about bugs in existing scenarios...
    then you are at the right place


    ~improving the playability and working with bugs~
    .................~a Guide by Mister SCP~


    Table of Content:

    1.Usefull Bugs (Colosseum Bug)
    2.Avoid Bugs (Lanternbug)
    3.Fixing Bugs
    3.1 fix the teleport Trigger
    3.2 My units don’t go through the door. They stand in front of it or search other ways
    4. Faulty Trigger
    5. Tips and Tricks
    5.1 Clean up your objective window
    5.2 A possible solution to avoid regroup of units
    5.3 How to improve the unit states of just one unit type
    5.4 A rax that train bears
    6. Additional Stuff
    6.1 Setting Priorities
    6.2 Sound Filename vs. Music Filename
    6.3 Dealing with the death-Part 1
    6.4 Working with ID`s
    6.5 Dealing with the death-Part 2
    6.6 Write an "xxx All Units In Area"
    6.7 A goldmine with an endless amount of gold
    7. Presentling some of my self-written effects/ conditions
    8. List of Must haves

    1. Usefull Bugs:

    Most times we think bugs all bugs are stupid. But if you have a good knowledge about them you will find out that they sometimes give you a big
    advantage. The best example you can find in the most hosted CSO at ESO – The Colosseum.
    Except the false linked units there is a bug for skipping a level. At the third island. It is a small invisible gap in the wall that u can pass.

    Result: You can get the reach the next level even if you have 600 kills instead of 800 ->stronger units
    This bug you can find in all fliger based colosseums.


    2. Avoid Bugs:

    Lanternbug: In CSO you meet different people with different hardware...
    For Example Lord_of_Evil can`t play Gang Warfare because of the Lanterns. Every time if the SPCCityStreets have a lantern his graphic card
    is spinning around and he see a mysterious light that make it unplayable. Later he killed the lanterns in my scenario so he was able to play it.
    ->SPC CityStreets are bugged

    3. Fixing Bugs:

    3.1 Q: My Teleport Trigger doesn’t work every time. What can I do?

    We all know this problem from Colosseum. A message appears that u reach the next level but you are still trapped at the old one.
    We need 3 triggers to solve it.


    Trigger 1: active –not looped – (immediate)

    Condition:
    e.g. State Value
  • Enemy Units Killed

    Effect:
    -Fire event
  • Trigger 2
    -Fire event
  • Trigger 3

    Trigger 2: active - looped – immediate

    Condition:
    -timer ms
  • ~500

    Effect:
    -Teleport Units

    Trigger 3: active – not looped – immediate

    Condition:
    -units in area/distance to unit
  • choose the area where your teleported unit should appear

    Effect:- Disable Trigger
  • Trigger 2
    -Change Unit Type (Cinematic block)
    -Chang Unit Type (your normal unit)
    (otherwise the unit try to move to the position before the unit teleports)
    -additional effects

    3.2 Q: My units don’t go through the door. They stand in front of it or search other ways.(RPG Bug)

    Why this happens: If u convert this door from a neutral or enemy player your units sometimes think it belong still to them
    (enemy or neutral player). You can solve it by adding two effects to your converting trigger (after the convert effect, of course)



    1.Change Unit Type (CinematicBlock)
    2.Change Unit Type (CWallGate)

    When you change the unit type it will forget the information about the player who controlled it. 2nd step is to change it again to a gate.
    (CWallGate is the normal gate that u can build in game)


    4. Faulty Trigger:

    4.1 Conditions:
  • Chat Contains
  • Unit Selected by Player
  • Vector Conditions
    4.2 Effects
  • Modify Protounit (most parts of it)
  • Activate Trigger
  • Render Sky
  • Teleport Units (they walk to their position
    before teleporting)
  • Vector stuff
  • partly Sims Tools (SimsTools Grant Ressources …)
  • XS-Stuff work but it need another input more informations about this you find in the doc folder from your dl.
    5.Tips and Tricks

    5.1 Clean up your objective window:

    If you have tons of objectives it is usefull to show not all at the beginning and even the text “Objective isn’t discovered” fill space.
    So here is a guide to clean up your objective window.
    If u needn’t them show the objectives at the beginning u can uncheck “objective visible” and “objective discovered”


    And if you need this objective in the game you need to do this trigger:

    Trigger1: active-not looped-…

    Conditions:
    -Your task :P cause they are different from scenario to scenario

    Effects:
    -Objective: Discover
    -Objective Show
    -Additional Effects like Fire Event (Trigger2)

    Now after they appear we want to complete the objective

    Trigger2: either active or not active (you activate it later e.g. with trigger1)-not looped- run immediate

    Condition:
    -the condition to complete your objective e.g. distance to unit/Player Unit Count/Player Resource count/…

    Effect:
    -Objective: Complete
    -maybe you want them give also a bonus for complete it
  • (Set Tech status/ Grant Resources/…)
    -Fire Event
  • Trigger3

    Trigger3 let the objective disappear. To save space in the objective window

    Trigger3: not active- not looped-…

    Condition:
    -Timer
  • e.g. 10

    Effect:
    -Objective: Hide

    You`ll notice that if you haven’t a current objective you won`t find the objective window on your screen.
    But if you get a new one the window will appear.

    Quoted from Invent00r:
    "Also, on [AoE3] you can color and underline the text of objectives using:
    <color=r,g,b></color>
    [u]Underlined text[/u]
    Where naturally, rgb stand for Red Green Blue. Using paragraphs is also possibile by typing on an external app - like notepad -,
    then just pasting over the objective."

    5.2 Q: How to forbid the regroup of the enemy units (RPG)

    Most Player solve it with “SetPlayerDefeat
    Instead of Set Player Defeat you can also use this:
    <Effect name="Auto Formations">
    <Param name = "On" dispName = "Use Auto Formations" varType = "bool">false</Param>
    <Command>if (%On%) config("RegroupUnits");</Command>
    <Command>else config("-RegroupUnits");</Command>
    </Effect>
    The advantages of using this are

  • You can set Animations on the player you normally defeat
  • You can give the enemy everytime an AI
  • Some other effects only work if the enemy isn’t defeated

    5.3 Q: How to improve the unit stats of only one unit type

    First of all we can`t use Modify Protounit for improving Unit Attack. So let`s use SetTechStatus. My example is for the xBow:

    Trigger 1: active – not looped – immediate

    Condition:
    -Always

    Effect:
    -SetTechStatus
  • VeteranCrossbowman
  • unobtainable
    -SetTechStatus
  • VeteranCrossbowman
  • activ
    -Modify Protounit
  • Crossbowman
  • hitpoints
  • amount= -20)

    Effect # 1 simulate that the Tech wasn’t used before. Effect # 2 give the crossbowman 20% of the base attack
    and 20% of the base hitpoints. That mean for my example the crossbowman would gain 3 attack points and 20 hp.
    Effect # 3 bring the hitpoints to the state before u used the tech. That’s possible because this increase the base amount.
    Guard and Imperial Upgrades would have the same affect only with higher %-rate (30%;50%).
    We can also loop this effect. We want have this effect now 5 times!


    Trigger 2: active – looped – immediate

    Condition:
    -QuestVarCheck
  • QVname= boost
  • amount = 5
  • Operator “<”)
    -timer (depending if it laggs or not)

    Effects:
    -SetTechStatus
  • VeteranCrossbowman
  • unoptionable
    -SetTechStatus
  • VeteranCrossbowman
  • activ
    -Modify Protounit
  • Crossbowman
  • hitpoints
  • amount= -20)
    -QuestVarModify
  • QVname= boost
  • amount=+1

    If you need to boost all your units u can use HCCards. Remember you can stack them without making them unobtainable.

    5.4 A rax that train bears

    You wish to do an animal scenario but just a few units train animals. So we need to do a little trick.
    We just change the unit type of xbows that u can train from the rax to bears.

    Trigger1: -activ-looped-run immediate- very high priority

    Condition:
    -units in area
  • center unit=a CinematicBlock
  • Player1
  • radius =1000
  • unit=xbow
  • operator=” >=”
  • count=1
    -timer
  • e.g. 2(depending on the training rate and the lag)

    Effect:
    -Change All Units in Area
  • Center Unit=the cinematic block
  • Radius= 1000
  • Unit ID=303 (that`s the ID of the xbow
  • Player1
  • Protounit= Petbear

    It doesn’t change the avatar in the rax but after the xbows are trained they directly change into bears.

    Remember Change all units in Area (Center Unit) is a custom Effect. You`ll find it in Random22`s Trigger Pack

    6. Additional Stuff

    6.1 Setting Priorities:

    Is a really important factor for create a good scenario. A high priority can make it even more lag because the triggers will work
    at the same time. If u choose a low priority the trigger will work at the moments when the scenario haven’t to work on a high amount of triggers
    at the same time otherwise it will wait until it found such a moment.


    Low priority: advantages and disadvantages

    ++reduce lag cause it split the trigger in different time periods
    --some times really bad timing. The trigger fire sometimes after 5 mins after the condition is filled
    especially if it is a laggy game
    --if you loop this trigger the condition can be filled twice time while you want for example just create
    one unit
    --more oos danger

    I prefer making high priorities because of the bad timing a low priority will do.

    6.2 Sound Filename vs. Music Filename

    To choose the correct music effect can be important for your scenario. Most people just take the “Sound Filename” because it work most
    comfortable and you haven’t gaps during your music in the game because you can fire the next track with a trigger exact after the old one ends.
    But this trigger even has some disadvantages.


    Sound Filename and Sound Play Paused

    ++no gaps between the sound files
    ++really comfortable

    --You aren`t able to fade it out. If you fire one while
    another plays you hear both at the same time
    --Sound Filename load the songs during the loading time of
    the whole scenario.
    ->the more Songs you do with it the longer loading
    times you get
    ->often “failed to load” if you link in CSO like 4+
    Songs with Sound Filename

    Music Filename
    ++It doesn’t affect on the loading times
    ++You are able to fade out. If you start a new one the old will fade out

    --You need to work with timers (and Fire Event)
    --gaps between your music files (If the old track ends and the new doesn’t start yet it fill the gap with normal music
    [same music as “Music Play”])

    I prefer Music Filename. If I take Sound Filename I get 3 times as long loading times (if I do all my songs with it).
    For CSO I recommend use not more as 2 sound files that u fire with” Sound Filename” or “Sound Play Paused”




    6.3 Dealing with the death-Part 1

    Problem: -I work on a RPG were the horse should follow a unit. Later the unit can become a rider etc.
    For the horse I use a “Move to Unit” Trigger. And of course I use such a life system like Mèrs just with units that can die.
    But if my unit is dead I can`t do a “Unit Create”-Trigger because the horse wouldn’t have anymore a target unit…

    Solution: We use the time of the dieing animation and change the unit type to an explorer or a SPC Unit.


    Trigger1: active-not looped-run immediate-very high priority

    Condition:
    -is dead
  • e.g. my Samurai
    -timer
  • =2s

    Effect:
    -Change Unit Type
  • Samurai->Explorer
    -Fire Event
  • Trigger2
    -Fire Event
  • Trigger3
    -[if you have a life system you need also Send Chat and Grant Resources (amount=-1)]

    Trigger2: not active-not looped-run immediate

    Condition:
    -timer
  • (e.g. 10 s)
    -is alive

    Effect:
    -Change Unit Type
  • Explorer->Samurai (ypKensei)
    -Fire Event
  • Trigger1 (if he die again this will
    work again)

    TRIGGER 3 IS ONLY NEEDED IF YOU WANT HIM TELEPORT TO A GRAVE
    Trigger3: not active- not looped- run immediate- very high priority

    Condition:
    - timer ms/timer/(always)

    Effect:
    -Teleport Units

    You will notice that he hasn’t full health. For doing that u can either use Mèrs`s healing System from Zellda 2,
    do at the space where u teleport him a SPC HEALING Object or try out sth. new…


    6.4 Working with ID`s:

    In Random22`s Trigger Set and the Advanced Trigger Set often are Effects that include All Units in Area e.g. Kill All Units In Area and
    Flash All Units in Area. This trigger work with an ID
    Not all units can be chosen by this ID`s so here is a tip on how to find out:
    You need Reyk`s editor Mod to do this

    1st: Press: AI Unit Info ->The blue window will appear
    2nd: Select an object like the cinematic block
    3th: If there is only one line and u have selected the current Player then you aren’t able to select it via ID with a Trigger


    But if you select the e.g. AITargetBlockWeak you will see much information appear in the blue box. If this is the case u can select it by ID

    6.5 Dealing with the death-Part 2

    So our current problem is that if a blackpowderwagon dies we normally just can do that he kill the units we have in our kill trigger
    (fall of Russia). But for other scenarios this must be a flexible kill trigger. (e.g. FFA were the player control the blackpowderwagons ...).
    So we need an ID Trigger.

    Basic Trigger: This trigger makes damage to every player if a blackpowderwagon is killed

    Condition:
    - units in area
  • TargetBlockWeak
  • choose a player which stay the whole game [if the player resigns the whole trigger dont work anymore]
  • a radius which cover the whole map

    Effect:
    -Damage Units in areas
  • ID=845(This is the ID of the Target Block Weak)
  • Select units from player=the player which stay the whole game
  • Player=the player which should get the damage
  • Radius+ Damage+ Unit Type should be clear
    -This effect you repeate for all players which could get damage from any blackpowder wagon
    -Destroy units in area
  • Radius must cover the whole map
  • ID=845
  • Player=your staying Player

    Trigger2:

    Condition
    -is killed
  • blackpowderwagon

    Effect
    -unit create at unit:
  • AI Target Block Weak
  • choose the wagon from your “is killed”-condition
  • player=the player which stay the whole game

    This effect you copy for all your wagons.

    To select new trained wagons isn`t possible but you can use your knowledge of Part1 to recreate the wagon .
    The current way we see the animation of the dieing blackpowder wagon. If we would convert the unit like in Part 1 we would miss the explosion.
    This is the way the latest versions of Gang Warfare uses (still the bug if a player resigns the whole blackpowderwagons don’t work
    since I unluckily haven’t choose at this time a player which stay the whole game). If you want that the killed blackpowderwagon
    don`t kill the units of the player who controls it you have to make a various basic trigger and trigger2…
    (change the staying player to the player who controls the unit+ kill the damage units in areas effect where this player is the target)


    6.6 Write an "xxx All Units In Area"

    Our example is the Flare at All Units in Area (center Unit)
      <Effect name="Kill All Units in Area (Center Unit)">
    <Param name="Object" dispName="Center Unit" varType="unit">default</Param>
    <Param name="Dst" dispName="Radius" varType="string">10.0</Param>
    <Param name="UnitId" dispName="Unit Type ID (Optional)" varType="string">-1</Param>
    <Param name="FromPlayer" dispName="From Player or 99 for ALL" varType="string">99</Param>
    <Param name="Booler" dispName="Include Center Unit" varType="bool">false</Param>

    [i]Add new Parammeter if u need them!!! (max. 3)[/i]

    <Command>trQuestVarSet("convarea", 0);</Command>
    <Command>trQuestVarSet("ffweho",0);</Command>
    <Command>if(%FromPlayer%!=99) trQuestVarSet("vroom", %FromPlayer%);</Command>
    <Command>trQuestVarSet("warthog", 0);</Command>
    <Command>trQuestVarSet("zeep", 0);</Command>
    <Command>if(%UnitId%>=0) {</Command>
    <Command>trQuestVarSet("zeep", %UnitId%);</Command>
    <Command>}</Command>
    <Command>if(0>%UnitId%) {</Command>
    <Command>while(kbGetUnitTypeName(trQuestVarGet("zeep"))!="All") {</Command>
    <Command>trQuestVarSet("zeep", trQuestVarGet("zeep")+1);</Command>
    <Command>}}</Command>
    <Command>trQuestVarSet("lastpl", xsGetContextPlayer());</Command>
    <Command>xsSetContextPlayer(0);</Command>
    <Command>kbLookAtAllUnitsOnMap();</Command>
    <Command>if(%FromPlayer%!=99) trQuestVarSet("blarg",%FromPlayer%);</Command>
    <Command>if(%FromPlayer%==99) {</Command>
    <Command>trQuestVarSet("blarg",0);</Command>
    <Command>trQuestVarSet("vroom",12);</Command>
    <Command>}</Command>
    <Command>trQuestVarSet("i",trQuestVarGet("blarg"));</Command>
    <Command>while(trQuestVarGet("vroom")>=trQuestVarGet("i")) {</Command>
    <Command>trQuestVarSet("convarea", kbUnitQueryCreate("convarea"));</Command>
    <Command>kbUnitQuerySetPlayerID(trQuestVarGet("convarea"), trQuestVarGet("i"));</Command>
    <Command>kbUnitQuerySetUnitType(trQuestVarGet("convarea"), trQuestVarGet("zeep"));</Command>
    <Command>kbUnitQuerySetPosition(trQuestVarGet("convarea"), kbGetBlockPosition(""+1*%Object%));</Command>
    <Command>kbUnitQuerySetMaximumDistance(trQuestVarGet("convarea"), %Dst%);</Command>
    <Command>kbUnitQuerySetAscendingSort(trQuestVarGet("convarea"), true);</Command>
    <Command>kbUnitQueryResetResults(trQuestVarGet("convarea"));</Command>
    <Command>trQuestVarSet("warthog", kbUnitQueryExecute(trQuestVarGet("convarea")));</Command>
    <Command>while(trQuestVarGet("warthog")>0) {</Command>
    <Command>trQuestVarSet("warthog", trQuestVarGet("warthog")-1);</Command>
    <Command>trQuestVarSet("ffweho", kbUnitQueryGetResult(trQuestVarGet("convarea"), trQuestVarGet("warthog")));</Command>
    <Command>trQuestVarSet("ffweho2", trQuestVarGet("ffweho"));</Command>
    <Command>if(%Booler%==true) {</Command>
    <Command>if(trQuestVarGet("ffweho2")==kbGetBlockID(""+1*%Object%)) {trQuestVarSet("ffweho2", trQuestVarGet("ffweho")+1);}}</Command>
    <Command>if(trQuestVarGet("ffweho2")!=kbGetBlockID(""+1*%Object%)) {</Command>
    <Command>trUnitSelectClear();</Command>
    <Command>trUnitSelectByID(1*trQuestVarGet("ffweho"));</Command>

    Replace your Command!!!
    <Command>trUnitDelete(false);</Command>
    Replace your Command (instead of <Command>trUnitDelete(false);</Command> )!!!

    <Command>}}</Command>
    <Command>trQuestVarSet("i", trQuestVarGet("i")+1);}</Command>
    <Command>xsSetContextPlayer(trQuestVarGet("lastpl"));</Command>
    </Effect>
    for change it into a "Change All Units in Area (center Unit)" we just need to replace the old command line and add the parameter.
    We find in the typetest:
     <Effect name="Change Unit Type">
    <Param name="SrcObject" dispName="$$19160$$Unit" varType="unit">default</Param>
    <Param name="ProtoUnit" dispName="$$22449$$ProtoUnit" varType="protounit">Villager</Param>
    <Command>trUnitSelectClear();</Command>
    <Command loop="" loopParm="SrcObject">trUnitSelect("%SrcObject%");</Command>
    <Command>trUnitChangeProtoUnit("%ProtoUnit%");</Command>
    </Effect>
    Since we allready selected the units with our new trigger we need not
      <Param name="SrcObject" dispName="$$19160$$Unit" varType="unit">default</Param>
    and
         <Command>trUnitSelectClear();</Command>
    <Command loop="" loopParm="SrcObject">trUnitSelect("%SrcObject%");</Command>
    So we include the two lines now and get a new cool effect
       <Effect name="Change All Units In Area (Center Unit)">
    <Param name="Object" dispName="Center Unit" varType="unit">default</Param>
    <Param name="Dst" dispName="Radius" varType="string">10.0</Param>
    <Param name="UnitId" dispName="Unit Type ID (Optional)" varType="string">-1</Param>
    <Param name="FromPlayer" dispName="From Player or 99 for ALL" varType="string">99</Param>
    <Param name="To" dispName="Protounit" varType="protounit">default</Param>
    <Param name="Booler" dispName="Include Center Unit" varType="bool">false</Param>
    <Command>trQuestVarSet("convarea", 0);</Command>
    <Command>trQuestVarSet("ffweho",0);</Command>
    <Command>if(%FromPlayer%!=99) trQuestVarSet("vroom", %FromPlayer%);</Command>
    <Command>trQuestVarSet("warthog", 0);</Command>
    <Command>trQuestVarSet("zeep", 0);</Command>
    <Command>if(%UnitId%>=0) {</Command>
    <Command>trQuestVarSet("zeep", %UnitId%);</Command>
    <Command>}</Command>
    <Command>if(0>%UnitId%) {</Command>
    <Command>while(kbGetUnitTypeName(trQuestVarGet("zeep"))!="All") {</Command>
    <Command>trQuestVarSet("zeep", trQuestVarGet("zeep")+1);</Command>
    <Command>}}</Command>
    <Command>trQuestVarSet("lastpl", xsGetContextPlayer());</Command>
    <Command>xsSetContextPlayer(0);</Command>
    <Command>kbLookAtAllUnitsOnMap();</Command>
    <Command>if(%FromPlayer%!=99) trQuestVarSet("blarg",%FromPlayer%);</Command>
    <Command>if(%FromPlayer%==99) {</Command>
    <Command>trQuestVarSet("blarg",0);</Command>
    <Command>trQuestVarSet("vroom",12);</Command>
    <Command>}</Command>
    <Command>trQuestVarSet("i",trQuestVarGet("blarg"));</Command>
    <Command>while(trQuestVarGet("vroom")>=trQuestVarGet("i")) {</Command>
    <Command>trQuestVarSet("convarea", kbUnitQueryCreate("convarea"));</Command>
    <Command>kbUnitQuerySetPlayerID(trQuestVarGet("convarea"), trQuestVarGet("i"));</Command>
    <Command>kbUnitQuerySetUnitType(trQuestVarGet("convarea"), trQuestVarGet("zeep"));</Command>
    <Command>kbUnitQuerySetPosition(trQuestVarGet("convarea"), kbGetBlockPosition(""+1*%Object%));</Command>
    <Command>kbUnitQuerySetMaximumDistance(trQuestVarGet("convarea"), %Dst%);</Command>
    <Command>kbUnitQuerySetAscendingSort(trQuestVarGet("convarea"), true);</Command>
    <Command>kbUnitQueryResetResults(trQuestVarGet("convarea"));</Command>
    <Command>trQuestVarSet("warthog", kbUnitQueryExecute(trQuestVarGet("convarea")));</Command>
    <Command>while(trQuestVarGet("warthog")>0) {</Command>
    <Command>trQuestVarSet("warthog", trQuestVarGet("warthog")-1);</Command>
    <Command>trQuestVarSet("ffweho", kbUnitQueryGetResult(trQuestVarGet("convarea"), trQuestVarGet("warthog")));</Command>
    <Command>trQuestVarSet("ffweho2", trQuestVarGet("ffweho"));</Command>
    <Command>if(%Booler%==true) {</Command>
    <Command>if(trQuestVarGet("ffweho2")==kbGetBlockID(""+1*%Object%)) {trQuestVarSet("ffweho2", trQuestVarGet("ffweho")+1);}}</Command>
    <Command>if(trQuestVarGet("ffweho2")!=kbGetBlockID(""+1*%Object%)) {</Command>
    <Command>trUnitSelectClear();</Command>
    <Command>trUnitSelectByID(1*trQuestVarGet("ffweho"));</Command>
    <Command>trUnitChangeProtoUnit("%To%");</Command>
    <Command>}}</Command>
    <Command>trQuestVarSet("i", trQuestVarGet("i")+1);}</Command>
    <Command>xsSetContextPlayer(trQuestVarGet("lastpl"));</Command>
    </Effect>
    6.7 A goldmine with an endless amount of gold

    This is a simple trick where u havent to recreate goldmines every time. so you neednt waste space on the map and it looks more elegant.

    Trigger1: -activ-looped-...
    Condition:
    -timer
  • 120 or less

    Effects:

    -change Unit Type
  • Goldmine->Mine
    -change Unit Type
    Mine->Goldmine

    This simply change ur goldmine into a normal mine (otherwise the units sometimes stop the work) and change it back to a goldmine.
    After it changes back the mine have again the full amount of gold.


    7.Presenting some of my self-written effects/conditions

    I write some conditions and effects. Here you can see how to use them (C.-=Condition, E.-=Effect)

    7.1 C.-Units not owned


    You have to select the source unit and a player. The Condition is true if the player doesn`t control the unit.
    This is a quite usefull condtion for captureable buildings.
        <Condition name="Units Not Owned">
    <Param name="Player" dispName="$$22301$$Player" varType="player">1</Param>
    <Param name="SrcObject" dispName="$$22295$$Source Units" VarType="unit">default</Param>
    <Command>trUnitSelectClear();</Command>
    <Command loop="" loopParm="SrcObject">trUnitSelect("%SrcObject%");</Command>
    <Expression>(trUnitIsOwnedBy(%Player%)==false)</Expression>
    </Condition>
    7.2 C.-Units Being Attacked by Protounit

    You have to select the source Unit. Then you must define the attacking Protounit (with a count) and the Player which control the attacking unit.
    It is a condition from a triggerpack from aomh.
       <Condition name="Units Being Attacked by Protounit">
    <Param name="u" dispName="$$22295$$Source Units" VarType="unit">default</Param>
    <Param name="PlayerID" dispName="$$22301$$Player" VarType="player">0</Param>
    <Param name="PN" dispName="$$19160$$Unit" VarType="protounit">Villager</Param>
    <Param name="Op" dispName="$$22297$$Operator" VarType="operator">==</Param>
    <Param name="Count" dispName="$$22304$$Count" VarType="float">1</Param>
    <Command>for(result=0;>1){} for(unit=0;>1){} for(Qid=0; >1){}</Command>
    <Command>xsSetContextPlayer(%PlayerID%); kbLookAtAllUnitsOnMap(); unit = kbGetBlockID("%u%"); </Command>
    <Command>Qid=kbUnitQueryCreate("QueryProtounitPIAU");</Command>
    <Command>kbUnitQuerySetPlayerID(Qid, %PlayerID%, true);</Command>
    <Command>kbUnitQuerySetUnitType(Qid, kbGetProtoUnitID("%PN%"));</Command>
    <Command>kbUnitQuerySetState(Qid,2);</Command>
    <Command>for(i=kbUnitQueryExecute(Qid)-1;>-1){ </Command>
    <Command loop="" loopParm="u">if (kbUnitGetTargetUnitID( kbUnitQueryGetResult(Qid, i) ) == unit) result++;</Command>
    <Command>}</Command>
    <Expression>result %Op% %Count%</Expression>
    </Condition>
    7.3 E.-SC Starter


    You just have to pick a player and an area. This effect can create there an explorer + a TC wagon(just if u want).
    Especially the creation of the correct explorer is a real time saving. (this one works also faster as the other one from my trigger pack)
      <Effect name="SC Starter">
    <Param name="PlayerID" dispName="$$22301$$Player" VarType="player">1</Param>
    <Param name="Location" dispName="" varType="area">0,0,0</Param>
    <Param name="UseExplorer" dispName="Use Explorer" VarType="bool">false</Param>
    <Param name="UseTc" dispName="Use TC Wagon" VarType="bool">false</Param>
    <Command>if(%UseTc% == true) trUnitCreate("CoveredWagon","I am a Covered Wagon", %Location%, 0, %PlayerID%);</Command>

    <Command>if(%UseExplorer% == true)</Command>
    <Command>{ if (trTechStatusCheck(%PlayerID%, 480, 1)) trUnitCreate("Explorer","I am an Explorer", %Location%, 0, %PlayerID%);</Command>
    <Command>elseif (trTechStatusActive(%PlayerID%,11)) trUnitCreate("ExplorerDog","I am an Explorer", %Location%, 0, %PlayerID%);</Command>
    <Command>else if (trTechStatusActive(%PlayerID%,116)) trUnitCreate("xpIroquoiswarchief","I am an Explorer", %Location%, 0, %PlayerID%);</Command>
    <Command>else if (trTechStatusActive(%PlayerID%,119)) trUnitCreate("xpAztecWarchief","I am an Explorer", %Location%, 0, %PlayerID%);</Command>
    <Command>else if (trTechStatusActive(%PlayerID%,120)) trUnitCreate("xpLakotawarchief","I am an Explorer", %Location%, 0, %PlayerID%);</Command>
    <Command>else if(trTechStatusActive(%PlayerID%,148)) {trUnitCreate("ypMonkJapanese","I am an Explorer", %Location%, 0, %PlayerID%);trUnitCreate("ypMonkJapanese2","I am an Explorer", %Location%, 0, %PlayerID%);}</Command>
    <Command>else if(trTechStatusActive(%PlayerID%,149)) trUnitCreate("ypMonkChinese","I am an Explorer", %Location%, 0, %PlayerID%);</Command>
    <Command>else if(trTechStatusActive(%PlayerID%,150)) {trUnitCreate("ypMonkIndian","I am an Explorer", %Location%, 0, %PlayerID%);trUnitCreate("ypMonkIndian2","I am an Explorer", %Location%, 0, %PlayerID%);</Command>
    <Command>}</Command>
    </Effect>
    7.4 E.-Player Set Postimperial


    Select just the player who should set to postimperial age and relax.(this one works also faster as the one from my triggerpack)
    <Effect name="Player Set Postimperial">
    <Param name="PlayerID" dispName="$$22301$$Player" VarType="player">1</Param>
    <Command>trPlayerSetAge(%PlayerID%, 1, false);</Command>
    <Command>trPlayerSetAge(%PlayerID%, 2, false);</Command>
    <Command>trPlayerSetAge(%PlayerID%, 3, false);</Command>
    <Command>trPlayerSetAge(%PlayerID%, 4, false);</Command>
    <Command>if (trTechStatusActive(%PlayerID%,5)) trTechSetStatus(%PlayerID%, 90, 2);</Command>
    <Command>else if(trTechStatusActive(%PlayerID%,6)) trTechSetStatus(%PlayerID%, 84, 2);</Command>
    <Command>else if(trTechStatusActive(%PlayerID%,7)) trTechSetStatus(%PlayerID%, 85, 2);</Command>
    <Command>else if(trTechStatusActive(%PlayerID%,0)) trTechSetStatus(%PlayerID%, 86, 2);</Command>
    <Command>else if (trTechStatusActive(%PlayerID%,8)) trTechSetStatus(%PlayerID%, 87, 2);</Command>
    <Command>else if(trTechStatusActive(%PlayerID%,9)) trTechSetStatus(%PlayerID%, 89, 2);</Command>
    <Command>else if(trTechStatusActive(%PlayerID%,10)) trTechSetStatus(%PlayerID%, 88, 2);</Command>
    <Command>else if(trTechStatusActive(%PlayerID%,11)) trTechSetStatus(%PlayerID%, 91, 2);</Command>
    <Command>else if(trTechStatusActive(%PlayerID%,116)) trTechSetStatus(%PlayerID%, 118, 2);</Command>
    <Command>else if(trTechStatusActive(%PlayerID%,119)) trTechSetStatus(%PlayerID%, 123, 2);</Command>
    <Command>else if(trTechStatusActive(%PlayerID%,120)) trTechSetStatus(%PlayerID%, 124, 2);</Command>
    <Command>else if(trTechStatusActive(%PlayerID%,148)) trTechSetStatus(%PlayerID%, 255, 2);</Command>
    <Command>else if(trTechStatusActive(%PlayerID%,149)) trTechSetStatus(%PlayerID%, 254, 2);</Command>
    <Command>else if(trTechStatusActive(%PlayerID%,150)) trTechSetStatus(%PlayerID%, 256, 2);</Command>
    </Effect>


    If you want more triggers dl my triggerpack. You can also make on the page everytime trigger requests .


    List of Must haves:
    -Reyk`s Editor Mod
    -Advanced Trigger Set
    -Gunner`s Trigger Set
    -My Trigger Set
    Additional Stuff:
    -Random22`s Trigger Set
    -Hedanito`s Trigger Set
    -Kolt`S Trigger Set
    -SH Trigger

    More coming soon (if you wish^^)
    -more ID stuff
    -Maybe if someone get an interesting question I am willing to answer it here
    Mister SCP

[This message has been edited by Mister SCP (edited 04-21-2009 @ 12:59 PM).]

Replies:
posted 02-09-09 07:15 AM EDT (US)     1 / 28  
Good guide, Sir Constantin.

Maybe with a little time to clean up the English we can include this in the Wiki. Because I don't think there's much there that deals with specific scenario issues related to priority, specific triggers that don't work, etc. and what is there needs updating in the worst way.

edit: Do all the sprites for SPC City Streets have a bug? Or only the ones showing a streetlamp? There are some which do not have a streetlamp and some which do.

Also, in order to see the blue box with unit ID in it, you have to start the Editor in debug mode, correct?

Crunkatog on ESO
Bart331 balance suggestion: aztec: remove civ
Voltiguer: Ender, Sioux in 1.04 will be a top civ, no matter how many layers of Sioux goggles you put on
schildpad on Elephants: ...their mansabdar unit sucks so hard it looks like a black hole
Crunkatog on Steam.

[This message has been edited by As_Saffah (edited 02-09-2009 @ 07:24 AM).]

posted 02-09-09 07:44 AM EDT (US)     2 / 28  
Good guide, Sir Constantin.
Maybe with a little time to clean up the English we can include this in the Wiki. Because I don't think there's much there that deals with specific scenario issues related to priority, specific triggers that don't work, etc. and what is there needs updating in the worst way.
thx for compliment, ino my english is not that good but everyone is welcome to clean it
edit: Do all the sprites for SPC City Streets have a bug? Or only the ones showing a streetlamp? There are some which do not have a streetlamp and some which do.
only the ones with lanterns. The screenshots Lord_of_Evil sent me will show you that after i ve posted it
Also, in order to see the blue box with unit ID in it, you have to start the Editor in debug mode, correct?
I normally go in the editor choose place objectives and there i find the button "AI UNIT INFO" (u need reyk`S editor the symbol is shown in the third screenie where the number 1 stand) if i press this the blue box appear.

Next update will include: the resurrect of target units and effects on dieing units
both affected while the unit have the dieing animation

[This message has been edited by Mister SCP (edited 02-09-2009 @ 07:47 AM).]

posted 02-09-09 09:03 AM EDT (US)     3 / 28  
Good guide.

I think it's only good for newbies at scenario designing.


The german Editor
posted 02-09-09 09:16 AM EDT (US)     4 / 28  
partly...
For example mers could fix his doors and he isnt a newbie :P.
Anyway I will also add more complex stuff but it`s better for me if i write him step by step. Also the public i have choosen for my first version are the Newbies for motivate them to design for the contest.
posted 02-09-09 09:49 AM EDT (US)     5 / 28  
And some should make the priority high.
posted 02-09-09 10:29 AM EDT (US)     6 / 28  
lol you are allright xD
posted 02-09-09 01:09 PM EDT (US)     7 / 28  
Good guide

Maybe you'll get a special name lol

Pears: ok i downloaded a few scenerios and it says place the mp3 folders in the "sound" folder but i cant find the sound folder any where please help!
Elpea: Your sound folder is right next to your fart sounds folder.
posted 02-09-09 01:25 PM EDT (US)     8 / 28  
thx again

screenie lanternbug and how to increase attack of a unit type are now included

I think no special name 1st noone asked for it and 2nd i havent send it to a moderator by email :P

[This message has been edited by Mister SCP (edited 02-09-2009 @ 01:29 PM).]

posted 02-09-09 01:34 PM EDT (US)     9 / 28  
The laternbug is funny i haven't seen it before

Why is there no link to my trigger set?
posted 02-10-09 02:20 AM EDT (US)     10 / 28  
yeah it`s really funny (not for the other guy). I ll add your trigger pack in a few minuites
posted 02-10-09 06:34 AM EDT (US)     11 / 28  
added Sound Filename vs Music Filename
a rax that train bears
and Dealing with the death -Part1
posted 02-10-09 07:14 AM EDT (US)     12 / 28  


Isn't the right therm for "for example" (zum Beispiel) e.g.?
posted 02-10-09 07:41 AM EDT (US)     13 / 28  
i believe you are right...

why noone know how to show pictures in a thread...

if i use [*IMG]...[/IMG] tag just a red cross with a white background appear

[This message has been edited by Mister SCP (edited 02-10-2009 @ 07:48 AM).]

posted 02-10-09 11:59 AM EDT (US)     14 / 28  
Quoted from Mister SCP:
--more oos danger (not confirmed, but I really believe so)
I prefer making high priorities because of the bad timing a low priority will do.
No, it doesn't increase the OoS danger.

All priorities add timers to triggers.
  1. High priority - no timer;
  2. Med-High - 2 seconds
  3. Medium - 4 seconds
  4. Med-Low - 5 seconds
  5. Low - 6 seconds

Knowing this, if I create a trigger set on Low priority, then I add a 7 second timer, the trigger will only be fired 12 seconds afterwards..

Also, you guys could give a try to Proactive triggers set and also our AoM Trigger Loader for the Titans expansion. The Trigger Loader is really big and complex, so it might not work for you guys..
-invent00r

My Work: 1 2 3 4 5 6 7 8 9 10

WIP: Master XS Battle Micro AI
Paused: AI (%4.247)
Os segredos são de quem os souber guardar.
posted 02-10-09 02:57 PM EDT (US)     15 / 28  
Quoted from Mister SCP:
--more oos danger (not confirmed, but I really believe so)
I prefer making high priorities because of the bad timing a low priority will do.
No, it doesn't increase the OoS danger.
Okay i will change it
All priorities add timers to triggers.
High priority - no timer;

Med-High - 2 seconds

Medium - 4 seconds

Med-Low - 5 seconds

Low - 6 seconds

Knowing this, if I create a trigger set on Low priority, then I add a 7 second timer, the trigger will only be fired 12 seconds afterwards..
I dont know if you currently test priorities with aoe3. I know some cases where triggers with low priority worked after 3 min (The timer from the game). This I often see in laggy games .
Also, you guys could give a try to Proactive triggers set and also our AoM Trigger Loader for the Titans expansion. The Trigger Loader is really big and complex, so it might not work for you guys..
I will try it out if i have more time rofl
At least i could need a working QV Set Vector^^
-greetz consti

[This message has been edited by Mister SCP (edited 02-10-2009 @ 03:00 PM).]

posted 02-10-09 11:04 PM EDT (US)     16 / 28  

Very nice guide Mister SCP.

If I may add a few things I know about.

For looped triggers always use a timer to prevent lag.
Timer of 1 second can help a lot to reduce lag.

Teleport triggers may not work when the unit is moving or engaged in battle even when it is set as high priority with immediate.
It is AOE3 bug that ignores the trigger when the unit is active.
Even additional triggers with loops may not help in this case so we just have to live with it.

Another problem that you already mentioned with teleporting is that the units will walk back to their original location after teleporting.
To solve that problem I execute another trigger right after the teleport trigger with a timer of 4 seconds with a move order to the units to go to their teleport destination.

Regarding OOS errors.

After having numerous OOS errors in the “Tapir Witch Chronicles” scenario I was able to pin point one cause for OOS – Triggers with low priority.
When I changed all low priority triggers to high priority these OOS errors went away.
The reason for that is that the scenario gives a certain time to events to execute in the different computers before it goes OOS.
So in one fast computer low priority trigger may take 5 seconds to execute while at another slow computer that same trigger can take 20 seconds due to lag and higher priority events.
Such difference will always cause OOS.
High priority triggers will be executed very fast on slow and fast computers alike reducing the risk for OOS.

Another common bug is when all triggers in the scenario suddenly stop working.
Several things can cause that such as special characters in TEXT Messages, and alpha numeric characters in TIMER conditions.
So it is always a good idea to test your scenario with every 10 new triggers so it is easy to isolate the trigger that disables all other triggers.
posted 02-11-09 02:28 AM EDT (US)     17 / 28  
Very nice guide Mister SCP.

thx
For looped triggers always use a timer to prevent lag.
Timer of 1 second can help a lot to reduce lag.
The rax thing depend on the training rates if u need a timer or not.It`s just an example trigger
In the case of the Veteran xbow trick I will add one timer. The designer should decide himself. For a rpg where not many trigger work at the same time it just looks nicer if the attack points reach with one time the new attack boost. U can there also do it with just one trigger. The thing about QV`S is just if you have to do 20 times the same (copy the effect of course) and do it with 4 players on the old way you get insane^^and it cost much more time. On the other hand for colosseums and large battles a timer should be in. Thx for report me
Teleport triggers may not work when the unit is moving or engaged in battle even when it is set as high priority with immediate.
It is AOE3 bug that ignores the trigger when the unit is active.
Even additional triggers with loops may not help in this case so we just have to live with it.
I bet you havent try out them. I havent a case in my scenarios where the teleport not work. It`s a very good system even if you don`t want believe it^^.
Another problem that you already mentioned with teleporting is that the units will walk back to their original location after teleporting.
To solve that problem I execute another trigger right after the teleport trigger with a timer of 4 seconds with a move order to the units to go to their teleport destination.
My 3th trigger have of the Teleport System allready one.I didnt add it to the teleport tigger (trigger2) because if the teleport failed at the first time the unit move then. And also it reduce lag if the move trigger isnt looped
Regarding OOS errors.
After having numerous OOS errors in the “Tapir Witch Chronicles” scenario I was able to pin point one cause for OOS – Triggers with low priority.
When I changed all low priority triggers to high priority these OOS errors went away.
The reason for that is that the scenario gives a certain time to events to execute in the different computers before it goes OOS.
So in one fast computer low priority trigger may take 5 seconds to execute while at another slow computer that same trigger can take 20 seconds due to lag and higher priority events.
Such difference will always cause OOS.
High priority triggers will be executed very fast on slow and fast computers alike reducing the risk for OOS.
I have the same exprience but can`t even justify it. I also don`t know if your guess is correct. I even think that happen in aoe3. Let`S have a vote if i should kill the term or not^^
kill:invent00r
not kill:-MosheLevi
-Sir_Constantin
Another common bug is when all triggers in the scenario suddenly stop working.
Several things can cause that such as special characters in TEXT Messages, and alpha numeric characters in TIMER conditions.
So it is always a good idea to test your scenario with every 10 new triggers so it is easy to isolate the trigger that disables all other triggers
I havent write an article about that because I think the wiki offer enough stuff about this topic
Regardz Consti

Edit: btw table of content and clean up objectiv window are written now

[This message has been edited by Mister SCP (edited 02-11-2009 @ 07:55 AM).]

posted 02-11-09 08:30 AM EDT (US)     18 / 28  
Quoted from :
kill:invent00r
not kill:-MosheLevi
Awww. Shame. .

AoM might be more stable then.. Because that's hardly the cause of OoS. But what I've said about timers will probably still valid. Does AoE3 also generates a trigtemp.xs file?

Also, on AoM you can color and underline the text of objectives using:
<color=r,g,b></color>
<u>Underlined text</u>
Where naturally, rgb stand for Red Green Blue. Using paragraphs is also possibile by typing on an external app - like notepad -, then just pasting over the objective. .
-invent00r

My Work: 1 2 3 4 5 6 7 8 9 10

WIP: Master XS Battle Micro AI
Paused: AI (%4.247)
Os segredos são de quem os souber guardar.

[This message has been edited by invent00r (edited 02-11-2009 @ 08:31 AM).]

posted 02-11-09 10:57 AM EDT (US)     19 / 28  
I have the same exprience but can`t even justify it. I also don`t know if your guess is correct.
It's not a guess.
My tests proved that beyond doubt.

I conducted numerous online tests with my two computers/online accounts and I was able to isolate the trigger that caused the OOS.
A simple change from low to high priority solved the problem (and I tested this many times).

I am a computer programmer by profession so I have some experience with testing.
on AoM you can color and underline the text of objectives..
You can do that with AOE3 too.

[This message has been edited by MosheLevi (edited 02-11-2009 @ 11:10 AM).]

posted 02-11-09 01:04 PM EDT (US)     20 / 28  
Quoted from MosheLevi:
You can do that with AOE3 too.
Yes, and I was only point that out as I did with everything else I said. Because I assumed it also worked. Thus only wanting it to be included in the guide, in my humble opinion.
-invent00r

My Work: 1 2 3 4 5 6 7 8 9 10

WIP: Master XS Battle Micro AI
Paused: AI (%4.247)
Os segredos são de quem os souber guardar.
posted 02-11-09 01:28 PM EDT (US)     21 / 28  
I havent known about underline and color objectives but this is a good tip thx. (I tried that with play dialogue but there i only get a white/yellow change... )
I think aoe3 have at least for med priority 3 secs :P. And at least Aom required less internet ressoures as aoe3 do.

I found one My files/My Games/Age of empires 3/trigger3
also in trigger 1 and 2 is one

[This message has been edited by Mister SCP (edited 02-11-2009 @ 01:39 PM).]

posted 02-25-09 03:36 PM EDT (US)     22 / 28  
updated: 6.5 and 6.6 added
posted 03-17-09 01:54 PM EDT (US)     23 / 28  
Quoted from Mister SCP:
I found one My files/My Games/Age of empires 3/trigger3
also in trigger 1 and 2 is one
That can only mean that there are 3 expansions packs to the game, and you have them all. .

I find a good thing that you haven't given up on this and you're willing to share your knowledge. Have you tested the Proactive triggers, by the way?
-invent00r

My Work: 1 2 3 4 5 6 7 8 9 10

WIP: Master XS Battle Micro AI
Paused: AI (%4.247)
Os segredos são de quem os souber guardar.
posted 03-17-09 02:06 PM EDT (US)     24 / 28  
I gave them a try but since they havent worked and i was too lazy to -re-write them (really complex, understand just less things, e.g. i dont get what arrays are (i looked too on wiki but it`s not really good understandable for me)


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack

[This message has been edited by Mister SCP (edited 03-18-2009 @ 04:12 PM).]

posted 04-05-09 02:04 PM EDT (US)     25 / 28  
So I add Dealing with the deah- Part 2 and ried to mak it better readable

btw. I also gained some experience about the typeloader (luckily i have aom) and i plan to bring out a collection of custom triggers


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack
posted 04-06-09 06:32 AM EDT (US)     26 / 28  
So the TL can work here in AoE3? That's good to hear...

I'm planning on releasing the new version 3 of it in a month or so.
-invent00r

My Work: 1 2 3 4 5 6 7 8 9 10

WIP: Master XS Battle Micro AI
Paused: AI (%4.247)
Os segredos são de quem os souber guardar.
posted 04-15-09 01:51 PM EDT (US)     27 / 28  
point 7 added.

just a few triggers work for aoe3 too

btw. you solve my OOS problem (on aomhg you said sth about dangerous effects THX)


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack
posted 04-17-09 08:28 AM EDT (US)     28 / 28  
Another link to a Triggerset added hehe


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack
Age of Empires III Heaven » Forums » Scenario Design » Improving the playability and working with bugs
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Empires III Heaven | HeavenGames