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: Project: An innovative COLOSSEUM scenario
« Previous Page  1 2  Next Page »
posted 03-18-12 09:47 AM EDT (US)   
Hi everyone, lately I spent some time to make a new colosseum type scenario for 6 players. What I had in mind was to make it innovative thanks to these significative improvements:

1) The buyers should be visible only to the player they belongs to.

2) The score system should be based on the XP gained killing the enemy units, and not simply on the number of them.

3) The spawning time of different units should be different: this in order to allow units that normally would be overpowered (like CAV in early levels for example). So, more powerful = longer spawning time.

After days of work I could be able to make this prototype: http://www.mediafire.com/?51oi3n11npn2kqs

And it works, but since I'm really really beginner with this I couldn't be able to build an efficient trigger system: it is BIG and heavy and kills the performances if played online (monster lag).

Who had the courage to look in it told me that it's a mess and should be rewritten from 0.
Since I have no idea of how to do it I ask here for your help. Can you think of a way to achieve the three tasks above with just some few, very efficient triggers?

And, last question, where I can test the map online at any time? (I'm on MAC OSX)

----------------------------------------------

Here I will explain my approach to achieve the 3 tasks.

1)BUYERS NOT VISIBLE. Not very brilliant here, I just solved it dividing the map in 6 areas, one per player, and every area contains all the 10 levels. So the buyers are physically separated.

Lately I thought of two others way to do it: returning to the old style with just one area for all the players, buyers should have 0 LOS and the area should be covered by fog of war. The units to buy should be visible 1) because they are "guardianized" (tresures guardians are visible through fog of war but I think that this can't be done) 2) because they are on a revealer with very small range so that buyers should be out of the sight.


2) THE SCORE SYSTEM. This was harder to do.
The score system is based on the total XP gained by a player. The problem is that XP increases by itself, let's say of x points every y seconds (I found that the correspondence is non-linear), so I had to make a first QV (named SCORE)that is copied from XP every y seconds and a second QV that subtracts x to SCORE, always every y seconds.
I first tried looping this every 1 second, then every 10.
It may not be elegant, but it works quite well

Edit: After some test online I found that the score system is not the cause of the intensive lag. It's OK.


3) THE SPAWN SYSTEM. Hands down, another tough task for me. The common spawn system needs a looped trigger like this:

CONDITIONS:
1) Buyer near the wanted unit
2) Timer
EFFECT:
1) Unit create

There must be 6 triggers (one per player) like this, for every different unit.

Firstly I tried changing the timer value to a custom one, depending on the unit. But that was not good because every timer ran independently from the others: I could for example make a weak unit (short time spawn) while I was waiting for the strong one to be ready (as its timer didn't stop while I was creating the weak unit).

The solution was, one more time, to use QVs.
I made one looped trigger like this:

CONDITION:
QV Timer (lets call the QV T1)
EFFECT:
QV Unit create (this create an unit using the QV as its PROTOID. So lets call the QV ID1)

Then, for every different unit, there was a looped trigger like this:

CONDITIONS:
1) Buyer near the wanted unit
EFFECT:
1) Set T1 to the right value.
2) Set ID1 to the right value.

And, one last time, I repeated this 6 times.
This worked but as you can imagine its probably very performances consuming. It requires hundreds of looped triggers. I may need to rebuild it in a more efficient way, if anyone can see this way.

Edit: After some test online I found that the spawn system is the main cause of the big lag. Therefore it MUST be rebuilt.

- o -


The remanent triggers do things like define the LEVELS from the SCORES and there is also a chat that informs the players of their progress through the levels. More QVs are used here but I hope they don't weigh too much on the system.
And there is also a Tech group. All the rest is quite easy to understand.

KNOWN ISSUES:
It seems like that for some reason the spawn system doesn't work properly for everyone. WortPropze stated that for some people units do not spawn or they spawn as treasure. Clearly the problem involves the PROTOID thing. I don't know what to think about it, since I don't have this issue, and people on gameranger didn't as well.

--------------------------------

Well that's it. A big THANKS to all who will help me!

PS: I'm sorry for my bad english. Without the automatic corrector I would be lost.

[This message has been edited by Seph29 (edited 03-18-2012 @ 09:17 PM).]

Replies:
posted 03-18-12 09:15 PM EDT (US)     1 / 32  
if you want score based purely on units, make the costs of all the buildings to zero.
posted 03-18-12 10:27 PM EDT (US)     2 / 32  
Would probably be possible to make a custom trigger condition (xp value) that automatically compensates for xp gained automatically over time- then you wouldn't need this QV stuff. Unless youre trying to do something like a reward every 10 kills infinitely many times, for which youd probably need QVs.

Also for the time stuff, also possible to make a custom trigger, say Timer - ProtoUnit with parameters Stat Value and Scaling, so say XP and 1 second per xp point so you wouldn't have to plan it out, just fill in the right protounit.
posted 03-18-12 11:08 PM EDT (US)     3 / 32  
@Aizamk Well...OK, but can someone actually write these custom triggers?
posted 03-18-12 11:37 PM EDT (US)     4 / 32  
I'll give it a go later. Haven't made custom triggers in a long time though, so don't expect good results ^^

EDIT: JUST realised, you can actually disable XP Trickle using Set Tech Status. Going to save a lot of trouble

I'll try do the other one though.

[This message has been edited by Aizamk (edited 03-18-2012 @ 11:39 PM).]

posted 03-19-12 01:02 AM EDT (US)     5 / 32  
@Aizamk Well...OK, but can someone actually write these custom triggers?
what exactly do you need? im pretty good at scripting trigs
posted 03-19-12 03:51 AM EDT (US)     6 / 32  
Would probably be possible to make a custom trigger condition (xp value) that automatically compensates for xp gained automatically over time- then you wouldn't need this QV stuff. Unless youre trying to do something like a reward every 10 kills infinitely many times, for which youd probably need QVs.
Make a request in the trigger request thread. If it can be done, it will.


Buyer Visibility: Try and use an ICG unit, give them like 1 LOS (0 makes them invisilbe to the owner as well). Or you could use the less elegant method, give everyone native scouts and use a custom trigger to set their stance to stealth (looped). Then set everyone and the gaia team to allies (to avoid the gaia units killing the buyer units).


Score: Personally I'd set it up like this, but I'm not very experienced with this stuff so it would probably lag even worse:


Trigger 1Condition Always. Looped. Set current xp for player to QV called CURRENTXP.

Trigger 2Condition Always. Looped. Check if current stat value: Kills is greater than QV called KILLCHECK (which by default will be set at 0). If so, make KILLCHECK = stat value: kills and fire trigger 3.

Trigger 3 Stat type: xp minus QV CURRENT XP. Add to however you are scoring it.

StormComing (to me): "Seems like you're way under-ranked"

Check out my series of guides for the scenario editor in the link below! | Best Otto TR score

The definitive collection of my scenarios, along with my scenario editor walkthrough, recorded games, and much much more!
posted 03-19-12 04:19 AM EDT (US)     7 / 32  
Yes loops produce a lot of lag

you can disable loops but thos tequires a custom trigger which i will post soon (code isnt on my smartphone )


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 03-19-12 01:20 PM EDT (US)     8 / 32  
@Aizamk: THANKS for the good tip! I'm going to try it right now. If it works the score system will be perfect.
EDIT: no it doesn't work I think "XP Trickle" is something extra, which is unactive by default.

@anterior2: About buyer visibility: the task is to make the gaia units visible to everyone while the buyers near them are hidden. What I was able to do for now was to use the effect "Revealer Create" right on the buyable units, with a LOS of 3 (doesn't work with less). At the same time I painted with the nonpassable terrain so that buyers can't get too close.
But this requires 6 triggers per buyable unit. 6*50= 300 triggers. If I'd able to write a custom effect that creates reavealers to all players, 50 triggers non-looped.

Your scout method would work with 6 looped triggers, but is it available on AoE 3 (no TWC) ?

@Mister SCP: We all count on you

[This message has been edited by Seph29 (edited 03-19-2012 @ 01:34 PM).]

posted 03-19-12 01:42 PM EDT (US)     9 / 32  
well this is the condition

<CONDITION name="EL Disable Looping Trigger Tool" >
<Param name="fid" dispName="Activation code (for activator)" varType="string">default</Param>
<Command>if (trQuestVarGet("eldlte%fid%")==1) {</Command>
<Command>xsDisableSelf();</Command>
<Command>return;}</Command>
</CONDITION>

the effects

<EFFECT name="EL Disable Looping Trigger Activator" >
<Param name="fid" dispName="Activation code (from tool)" varType="string">default</Param>
<Command>trQuestVarSet("eldlte%fid%",1);</Command>
</EFFECT>


<EFFECT name="EL Disable Looping Trigger Tool Reset" >
<Param name="fid" dispName="Activation code to reset" varType="string">default</Param>
<Command>trQuestVarSet("eldlte%fid%",0);</Command>
</EFFECT>

How does it work:
The condition features a return command that disables the trigger when a certain QV is 1... the conditions of the trigger wont be checked anymore...the trigger is set to inactive->very much less lagg. the Quest var can be set to 1 with EL Disable Looping Trigger Activator and resetted to o with EL Disable Looping Trigger Tool Reset

How to install
Trigger1 (Player 1 go to level 2)
Condition:
e.g. 250 units killed
Effect:
EL Disable Looping Trigger Tool Activator
-Activation ID = 11 (Player1+level1)
-Fire Event
-Fire Event
-....
-Fire Event (makes units from level 2 spawnable)

Trigger2: Create Crossbowman (Level1)
looped,active,whatever
Condition
EL Disable Looping Trigger Tool
-Activation Code11
-Units in Area
-Timer
-...
Effect:
Unit Create: Crossbowman

Trigger3: Create Pikeman (Level1)
looped,active,whatever
Condition
EL Disable Looping Trigger Tool
-Activation Code11
-Units in Area
-Timer
-...
Effect:
Unit Create: Pikeman

Trigger4: Create Hussar (Level2)
looped,inactive,whatever
Condition
EL Disable Looping Trigger Tool
-Activation Code12
-Units in Area
-Timer
-...
Effect:
Unit Create: Hussar

in my example the disable code would disable all triggers of level 1 because they all have the disable code 11 (according you set up Trigger1 this way)

btw: i would use the real timer instead a QV timer since noone permantly switch between units with his shopper. That might just happen 10 times in 30 minutes


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

posted 03-19-12 02:15 PM EDT (US)     10 / 32  
This is very interesting indeed. These trigger are great as they could make any scenario lighter.
But the system that you suggest is, more or less, quite the same of the classic system, which requires hundreds of triggers but never caused an unplayable lag...so no real need to make it even more playable...

Anyway unfortunately if every spawn trigger has his independent timer u will be able to train A LOT of units in a short time. People doesn't usually switch unit because you don't get any advantage doing it in the classic colosseum, as the timers are equal and very short.

I think that with the "QV store closest protounit" you made, plus a "QV store bounty (or trainpoints) of closest protounit" (if possible) we would have a very simple yet powerful system that does everything I need with just 3-4 triggers per player.
posted 03-19-12 05:19 PM EDT (US)     11 / 32  
well the point is

having 6x5=30 triggers running instead of 6*50=300 improves the perfomance pretty much

there is a way to calculate units build cost but it is not optimal for your use.

Btw my intention was not to optimize code to be user firendly but to show you a way to cut off tons of lagg because i thught you allready did it the old style


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 03-19-12 06:27 PM EDT (US)     12 / 32  
ok, i got it...

where do i put this?
default
if (trQuestVarGet("eldlteïfid%")==1) {
xsDisableSelf();
return;}
posted 03-19-12 07:08 PM EDT (US)     13 / 32  
hm i forgot a code tag in the forums... as you found out the condition code was messed up


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 03-19-12 10:43 PM EDT (US)     14 / 32  
AHH, sorry about that, I probably should have tested it first. The problem is setting it to Unobtainable doesn't actually "un-research" it. You will want to set "SPCKillXPTrickle" to active (this works, I HAVE actually tested it )

EDIT: Also for the not seeing other units thing, just give each player shared LOS with player 0, AND set the LOS of gaia's units to 0 - this way you can avoid this non-passable terrain stuff. Do this using the Player LOS Change effect. If you have other gaia units other than the spawn ones you might have to do the same for those.

[This message has been edited by Aizamk (edited 03-19-2012 @ 11:45 PM).]

posted 03-23-12 11:53 AM EDT (US)     15 / 32  
Thanks Aiazamk for the great tips! Now task 1 and 2 are completed...the last problem is task 3...

@MisterSCP, do that EL triggers require Typeloader? I used them without TL and got triggerlock, now i tried putting TL in but still triggerlock.
posted 03-23-12 01:21 PM EDT (US)     16 / 32  
no they dont but the forum killed my code. because % + some letters=a strange letter when i use the code tag

i've updated them


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-23-2012 @ 01:24 PM).]

posted 03-23-12 07:30 PM EDT (US)     17 / 32  
ok, no more triggerlock now, but there is another bug...

I set the triggers as you said, everything works fine until I jump to level 2: the EL effect deactivates all the triggers with the EL condition, not only the ones with the correspondent code...can u test it again please?

Here there is the map if u want give a look: http://www.mediafire.com/?pq9yt9spi4hq92b

I wrote the trigger only for player 1 and 2 for now.
Level2's units for player 1 dont have the EL condition because I was testing the bug.

[This message has been edited by Seph29 (edited 03-23-2012 @ 07:43 PM).]

posted 03-24-12 06:08 PM EDT (US)     18 / 32  
When it working for all the 6 players, me and a friend of mine will be available for testing.
posted 03-25-12 09:28 AM EDT (US)     19 / 32  
https://skydrive.live.com/redir.aspx?cid=62c625e3e76998b7&resid=62C625E3E76998B7!164&parid=root

well i had done all units from the first three stages

to add a unit:

go to Array_timer in the test group and use a

Array Set Float Value Effect
Array Name: QVA1
Position ->your unit protoid
Value: the time to wait for the unit

thats all

finally i guess you need to edit your teleport triggers


edit:if you replace aoe3 music with skyrim music it also sounds a lot better :P


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-25-2012 @ 09:32 AM).]

posted 03-25-12 09:53 AM EDT (US)     20 / 32  
WOW Thanks! You deserve big credits. Map will be ready for testing in a couple of hours!

Here it is! Ready to be tested: http://www.mediafire.com/?tx3xe1xpvcwr0d6

How do you find it? Have suggestions? Noticed any bug? There are units overpowered or too weak?

Bugs that I found:
- Units appears to be reluctant to attack by their own. For instance if enemy is destroying ur gate and ur units are not being attacked they wont automatically attack the enemy. (But in the editor it doesn't occur)
- U don't get LOS of the units that are attacking u from a base. Shoots come out from fog of war.


New ideas I have:
- Make an experience award for who manage to kill a colonel (but i think that is impossible).
- Colonel in center gives a lot of XP but you cant build units awhile (i can do it but i don't know if it's a good idea, do u like it?)

[This message has been edited by Seph29 (edited 03-25-2012 @ 08:28 PM).]

posted 03-26-12 07:05 AM EDT (US)     21 / 32  
I'm fairly certain that those bugs you're having are due to your trigger making everyone ally with player 0. If you remove that one and stick to the invulnerability stuff it should be fine.

(When I was testing stuff for unit's LOS, allying 1 with 0 gave shared LOS, but when I also did the same for 2 with 0 it removed that LOS - might also be causing the bugs you mentioned)

EDIT: I also notice that in the GaiaLOS group you have a Modify ALL protounits for ALL players trigger in which you decrease LOS by 10. Is this intentional? (I doubt it is)

[This message has been edited by Aizamk (edited 03-26-2012 @ 07:30 AM).]

posted 03-26-12 08:57 AM EDT (US)     22 / 32  
i noticed aswell that you reduced los for all units

LOS has to do with auto attack range

if i were you i would just reduce it for old coots


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 03-27-12 05:37 AM EDT (US)     23 / 32  
Lol i thought i had deleted that, it was just for testing. Thanks, now that bugs has disappeared.

One last bug that occur occasionally: old coot can miss teleport even if the player has leveled up. Then he misses the level but if he keeps playing he goes directly to the level successive at the one he missed. But triggers are ok infact this happens only sometimes (maybe if the coot is moved by the player right before teleporting).
So to fix this I could do a double teleport or i could do a checker that is fired 10 seconds after.

BTW what do u think of the new ideas? Do u know some "special effect" to fire at the center when a colonel is on it ?
posted 03-27-12 06:13 AM EDT (US)     24 / 32  
Actually LOS is not tied to auto-attack range. That's why when AoE3 first came out there was a bug when you upgraded Longbowmen (and with the stuff that boosts their LOS and range) their auto-attack range was unchanged, so people had to manually attack at long range.

StormComing (to me): "Seems like you're way under-ranked"

Check out my series of guides for the scenario editor in the link below! | Best Otto TR score

The definitive collection of my scenarios, along with my scenario editor walkthrough, recorded games, and much much more!
posted 03-27-12 08:23 AM EDT (US)     25 / 32  
One last bug that occur occasionally: old coot can miss teleport even if the player has leveled up. Then he misses the level but if he keeps playing he goes directly to the level successive at the one he missed. But triggers are ok infact this happens only sometimes (maybe if the coot is moved by the player right before teleporting).
So to fix this I could do a double teleport or i could do a checker that is fired 10 seconds after.
a)use checkers
b)use armies delete the old one and create a new one at the new level however this requires to change some effects/conditions like
QV Store Closest Protounit and Units in Area.

You'd need to insert a army as center unit then

QV Set One Man Army would be used to store the id of Old Coot after creating it

The QV Set One Man Army effect would store the new Coots QV

However a modified QV Store Closest Protounit and Units in Area are required


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-27-2012 @ 08:29 AM).]

« Previous Page  1 2  Next Page »
Age of Empires III Heaven » Forums » Scenario Design » Project: An innovative COLOSSEUM scenario
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Empires III Heaven | HeavenGames