Welcome! Please Login or Register!
July 14, 2020, 02:40:31 PM
Home Login Register
pftq Forums  |  Game Design  |  Age of Empires III  |  Convert/Change Unit in Area (Center Unit) is Causing OOS 0 Members and 1 Guest are viewing this topic. « previous next »
Latest News!VR Jetpack Game Trailer and Music(Jul 29, 2019)
Pages: [1] Print
Author Topic: Convert/Change Unit in Area (Center Unit) is Causing OOS  (Read 46834 times)
MosheLevi
Member
*****
Offline Offline

Posts: 28

« on: July 28, 2008, 10:14:55 AM »

I am having major issues with this effect as it is causing OTHER TRIGGERS to cause OOS.

My entire scenario (already 100 hours of work) is in jeopardy as a result of that, so I hope you can help me with this issue.

It is a little complicated so I have to explain many things here.

I am using the Flying purple Tapir units to fly around and turn near by army units into cows.


So I have a cinematic at the start of the scenario demonstrating this ability against 30-40 army units.

I am using the ?Convert/Change Unit in Area (Center Unit)? for this ability where the center unit is the Flying purple Tapir (that flies around) and the unit id to convert to cows is 1497 (military) with range of 9.
The trigger is in a loop of 1 second.
I have 3 tapir units with this trigger effect for each of them.

As they move around they convert 3-5 units each every second.

The effect works great but any future triggers/effects that have to do with the Tapir or converted cows is causing OOS.

When the cinematic is over I have tried to remove the tapir units from the map using kill, destroy, damage HP, damage percentage, reduce health, and change type, but every time I try to do that I get OOS.

Same problem with the cows (that used to be military).
Any type of effect to remove them from the map is causing OOS.

Random22 suggested to reset all the QV?s that are used in the ?Convert/Change?? effect (there are 9 of them) every time the effect is used, but that didn?t help either.

I then discovered that the cows can be converted to other units in a different area of the map but only a few of them at a time.

I then added effect that kill the cows right after they are converted with the center unit being the tapir as it is moving next to them.
This effect works as long as I keep the 9 range (with 1 second loop).
However, if I increase the range the effect will cause OOS.

I need to understand what?s causing this and if there is a way to fix it.

The problem is that later on during the scenario the tapir flying units appear and they convert the player?s army units to cows.
The player then need to send them to his fire circle to ?Break the Spell? and bring them back to military unit.

At this point the whole concept is fragile and can cause OOS during game play.

Any suggestions?

Thank you,

Moshe Levi
Logged
pftq
Administrator
*****
Offline Offline



Posts: 4126

WWW
« Reply #1 on: July 28, 2008, 12:58:21 PM »

QVs have nothing to do with OOS.  Although I don't remember ever having the problem before, I would say the OOS is caused by the trigger still referencing a unit that no longer exists.

Have you tried disabling the trigger (using condition that prevents it firing etc) before you take out the unit?

Just out of curiosity - may I see what the trigger code for your effect? I've used it online many times and do not recall it ever causing OOS.
Logged
Random22
Member
*****
Offline Offline



Posts: 33

WWW
« Reply #2 on: July 28, 2008, 01:06:04 PM »

Uhhhhhhhh... I didn't say that....  Lips Sealed

*Runs*

*runs back*

"Forgot my Sig."

-Random22
"Ok, Im Proud"

*Runs Again*
« Last Edit: July 28, 2008, 10:43:42 PM by Random22 » Logged

-Random22^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Thats Right More Random22 Signature Wink
MosheLevi
Member
*****
Offline Offline

Posts: 28

« Reply #3 on: July 28, 2008, 01:12:46 PM »

Yes, I am disabling the ?Convert/Change? trigger effect when the cinematic is over.
In fact I have a few conditions attached to the trigger:
Is alive (tapir unit), and QV TP = 1.
Right after the military units are converted to cows, I change TP back to 0.
After that I disable the trigger.

The OOS doesn?t happen with this trigger (see explanation above).
It happens with future triggers that deal with the Tapir units or Cows.


Any trigger that attempt to kill, destroy, damage many of these units at once in large area is causing OOS.
Even "Change Type" effect to CinematicBlockCube is causing OOS.

In addition to that I cannot remove the Tapir Units from the map without causing OOS.
Every effect that I use to remove/change the 3 tapir units is causing OOS.


I am testing my scenario online with my two high end computers (I have 2 accounts), so lag should NOT be an issue here.

I am using your ?Convert/Change Unit in Area (Center Unit)? from your advance trigger set
.
Code:
<Effect name="Convert/Change 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="ToPlayer" dispName="To Player" varType="string">0</Param>
<Param name="ChangeUnit" dispName="Change Protounit Type" varType="string">Do Not</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>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>xsSetContextPlayer(trQuestVarGet("i"));</Command>
<Command>kbLookAtAllUnitsOnMap();</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%)) {</Command>
<Command>trQuestVarSet("ffweho2", trQuestVarGet("ffweho")+1);}}</Command>
<Command>if(trQuestVarGet("ffweho2")!=kbGetBlockID(""+1*%Object%)) {</Command>
<Command>trUnitSelectClear();</Command>
<Command>trUnitSelectByID(1*trQuestVarGet("ffweho"));</Command>
<Command>trUnitConvert(%ToPlayer%);</Command>
<Command>if("%ChangeUnit%"!="Do Not") trUnitChangeProtoUnit("%ChangeUnit%");</Command>
<Command>}}</Command>
<Command>trQuestVarSet("i", trQuestVarGet("i")+1);}</Command>
<Command>xsSetContextPlayer(trQuestVarGet("lastpl"));</Command>
</Effect>

« Last Edit: July 28, 2008, 01:23:49 PM by MosheLevi » Logged
pftq
Administrator
*****
Offline Offline



Posts: 4126

WWW
« Reply #4 on: July 28, 2008, 07:42:54 PM »

Can you try setting up a blank map with nothing but this effect and one other? Let me know of your results - thanks.
Logged
MosheLevi
Member
*****
Offline Offline

Posts: 28

« Reply #5 on: July 29, 2008, 09:25:35 AM »

I didn?t have time to set these triggers in empty map last night.
That would take some time to do because many triggers and set ups are involved.

I have two player 1 armies with 5 different types of units being deployed in different locations.
I then have move triggers to cinematic cube.

I have deploy and move triggers for different types of wild animals that move towards the armies, and then there is a battle.
When the wild animals are killed by the armies I deploy and move the flying tapir and then I have triggers to convert the armies to cows.

I was working on this issue last night and managed to come up with a version that doesn?t cause OOS when I kill most of the cows.
I added ?Destroy Army? effects for the two armies that I deploy.
The ?Destroy Army? effect doesn?t work (doesn?t kill the cows), but later on when I kill the cow with other triggers I don?t get OOS.
I can only guess that the ?Army Kill? causes OOS because I have triggers that refer to these armies (although they are NOT active).

I will have to experiment more and verify that I don?t get OOS at all (I had cases where the same scenario version produced OOS only in some of the runs).

At this point I can only guess that the conversion of armies to cows throws off other triggers that refer to the armies despite the fact that these triggers are no longer active.

Any thoughts or ideas?
Logged
pftq
Administrator
*****
Offline Offline



Posts: 4126

WWW
« Reply #6 on: August 01, 2008, 03:04:15 PM »

I doubt it.  Those effects have never been known to cause problems.

It might be the units - for example if a cinematic unit gets killed, the whole game crashes on you or goes OOS online.

Try a blank map when you have time - it's the best way to isolate the problem.
Logged
MosheLevi
Member
*****
Offline Offline

Posts: 28

« Reply #7 on: August 04, 2008, 10:42:59 AM »

This scenario editor is driving me crazy.

I am isolating the triggers one by one, and then when I finally get to the last trigger something else happens and I get new OOS error.

Here is one wired example:

At 3:20 my cinematic is done, and I then activate a trigger that deploys crates at supply drops with 90 second timer.
I then get OOS at exactly 4:50 right after the resources are deployed.

So I remove the activation for the crates deployment triggers and try again.
This time I get OOS at 3:25.

I put the crates deployment back and I get OOS at 4:50 once again.

This just doesn?t make any sense, and it is just one example (I have many of them).

The interesting thing is that I never get OOS when I don?t start the cinematic.
OOS will always occur after the cinematic is over with the same triggers that work when there is no cinematic (I just activate them later).

Logged
pftq
Administrator
*****
Offline Offline



Posts: 4126

WWW
« Reply #8 on: August 04, 2008, 01:55:56 PM »

Something brought to mind:

- Are you using Chat contains after the cinematic? I remember that AOE3 had problems with triggers malfunctioning if you try to have a beginning cinematic... basically you can't have certain triggers work after the cinematic no matter what.  It was mentioned way back in AOE3 Heavengames... perhaps do a search for it?

- The OOS at crates deployment reminds me of the auto-formation effect.  It's that custom effect I warned so much about and tried to replace with my Move to Self effect, but somehow someone keeps digging up that old topic and finding the trigger again (and announcing it).  Turn off the effect (you must use the effect again and set it to off, load game at least once) and restart.  Remove the effect completely to be safe.  It basically mods your game settings so anyone who doesn't have the same on/off as you will go out of sync.  Really, that code should be deleted from AOE3 Heavengames altogether so no one finds it again.

Because the ES triggers do not use variables (int x, float y etc), I don't see how my triggers can affect them.  It is more than likely something else altogether as you've found (possibly the cinematic as it's a known issue and many have avoided using it altogether AOE3 multiplayer).

Logged
MosheLevi
Member
*****
Offline Offline

Posts: 28

« Reply #9 on: August 04, 2008, 03:08:29 PM »

No I am NOT using Chat Contains.

Edit:
No, I am NOT using the "auto-formation effect".

Do I need to use your "Move to Self effect"?
If so, How?


I have no doubt that the cinematic is messing up something, but I need to know what, and how to fix it.
I don't use cinematic mode by the way, just camera tracks.


By the way, I was able to get around the OOS in the middle of the cinematic.
It was going OOS after I killed the cows immediately after using your ?Convert/Change?? effect.

At first I was using your effect to change the army units to cows and convert them to Gaia.
Half of them were converted to Gaia and half got converted back to player 1 by the near by military units.

The kill "cows" triggers for player 1 and Gaia then caused OOS.
I then changed your effect NOT to convert the cows to Gaia.
So I then needed to kill only player 1 cows.
That change prevented the OOS, go figure.

Now I need something similar to get around the OOS that is caused by the crate deployment.
I use army deploy and army teleport for 3 crates per location, so I guess that is the problem.
But then if I remove it I may get another OOS earlier, so it?s really a big mess.

« Last Edit: August 04, 2008, 04:08:54 PM by MosheLevi » Logged
pftq
Administrator
*****
Offline Offline



Posts: 4126

WWW
« Reply #10 on: August 04, 2008, 06:07:20 PM »

Here's a thread I wrote up a few years ago:
http://aom.heavengames.com/cgi-bin/forums/display.cgi?action=ct&f=13,20826,0,all

See if they apply.

One thing I can see immediately is this: Are the cows randomly player-assigned? The kill effect cannot handle killing units from multiple players.
Logged
MosheLevi
Member
*****
Offline Offline

Posts: 28

« Reply #11 on: August 05, 2008, 03:14:28 PM »

Interesting thread.
AOE3?s Editor has most of these issues and many more.
I must have spent 35% of my time for this project dealing with Editor bugs or writing triggers to go around Editor issues (around 50 hours so far).
However, I am dealing here with a new OOS issue that occurs only after cinematic.

Quote
Are the cows randomly player-assigned? The kill effect cannot handle killing units from multiple players.

That explains a lot.

I wish I knew that before.
Initially I had cows for Gaia and player 1 and I had to kill both of these groups.
I then had 2 effects (one for each group).
That produced OOS every single time.

Later on I made sure there are only cows for player 1 so I needed only one Kill effect.
That solved the problem.

Regarding the crates, I am deploying 3 different types of crates and for different player numbers at the same location.
I then teleport the crates to the supply drop and then convert them to Gaia.
So I am using different "Convert/Change.." effects for different players, for different units (crates) for the same location.
Perhaps that is causing the problem.

I will try tonight to use only 1 player per location and have a separate "Convert/Change.." trigger effect at (different times) for each crate type.
Maybe that will solve the problem.

There is still one mystery left where sometimes the scenario goes OOS immediately after the cinematic is over.
If I re-save the game with a small change to a timer in one of the triggers (that get executed long after the cinematic is over), then sometimes it works and the OOS doesn?t happen.
Very weird to say the least.

I am tired of this project already.
I had no idea I would have to deal with all this crap.
This will probably be my last advanced scenario for some time.

By the way, is there a trigger effect that COPY one unit from one location of the map to another location?
That will simplify my issue because I can then copy the drop site platform (street) on top of the crates and I can avoid all the teleporting and conversion.
Initially I deployed crates on top of the drop site but that deleted the street platform.
Logged
pftq
Administrator
*****
Offline Offline



Posts: 4126

WWW
« Reply #12 on: August 05, 2008, 09:06:29 PM »

Advanced Triggers Set -> Copy Units in Area Wink

My area triggers should not be player-limited though because they actually pick off the units and run effects off them one at a time (Kill Units tries to kill all units at once, than one at a time)
Logged
MosheLevi
Member
*****
Offline Offline

Posts: 28

« Reply #13 on: August 06, 2008, 05:22:01 PM »

Thank you pftq but now I realize that the Copy effect won?t help either.

I have other OOS issues like when I place the AI start.
It works fine without cinematic.
I know that for a fact because I have change the Timer for the AI start placement and the OOS happens exactly when the AI start is placed.

The weird thing (again) is that if I deactivate the AI start placement the scenario goes OOS as soon as the cinematic ends (before the OOS for the AI start usually happens).
So this just doesn?t make any sense.

I also changed the method of placing and converting crates at drop sites using normal effects instead of custom effects and that is causing OOS too (with cinematic).

So I have no choice but to release this scenario with a warning that cinematic is causing OOS.
The default will be no cinematic and the player will get a warning about the cinematic.
This way players can see the cinematic off line, and I will make a statement against Ensemble?s buggy Editor.

I have announced the Scenario Challenge with prizes at HG, and I will release it in a few days.
There is a lot of information about the scenario in this thread, and you are welcome to read it:
http://aoe3.heavengames.com/cgi-bin/forums/display.cgi?action=ct&f=1,36374,0,60

I am mentioning you in the special thank you section.

This will be my final contest hosting for AOE3.
Just like you I had enough with this buggy editor.

Thank you for all your help,

Moshe Levi
Logged
pftq
Administrator
*****
Offline Offline



Posts: 4126

WWW
« Reply #14 on: August 07, 2008, 06:50:40 PM »

I'm sorry to hear that.  Unfortunately, ES should be well aware the cinematic has problems; it's not the first time this has been brought up.

Best of luck to you - perhaps release the cinematic as a separate map?
Logged
Pages: [1] Print 
pftq Forums  |  Game Design  |  Age of Empires III  |  Convert/Change Unit in Area (Center Unit) is Causing OOS « previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines | RSS Feed Valid XHTML 1.0! Valid CSS!
Page created in 0.651 seconds with 21 queries.