Jump to content


Photo

AI Re-Spawn Logic


  • Please log in to reply
38 replies to this topic

#1 Festa_PWR

Festa_PWR
  • Member
  • Posts: 46
  • Location:North West UK

Posted 16 February 2017 - 12:11

I`ve been getting to grips with the editor lately, and have managed to put together a decent(ish) training scenario for myself and two others on the Lapino map.

 

I`ve got some re-spawn logic on AI patrols, but since I added them, the server load has increased quite considerably, even though they aren`t spawned in.

 

I think I read somewhere that check zones are constantly cycling and so are constantly active. I think its alternative would be a complex trigger, but I`ve heard these are even worse when it comes to MP missions.

 

Am I over thinking this and having circa 10-15 different groups using check zones is just going to use resource and I should live with it, or should I be using a different method to reduce server load and improve performance?

 

The basic logic sees a check zone IN looking at around 6500m, spawn in planes (varying amounts for different patrols) and then deactivates the check zone, count the amount of 'CriticalDamage', when count reaches the amount of planes in the specific group, it activates a re-spawn timer (currently 20 minutes) and deletes old object after 3 or so minutes and reactivates the check zone when re-spawn timer reaches zero..

 

I can`t screenshot the logic currently, as I`m at work, but will try and remember to get a shot of it some time soon if it helps.

 

EDIT: Screenshot of the messy logic . .

Attached Files


Edited by Festa_PWR, 16 February 2017 - 20:18.

  • 0

Rig - 4670k@4.2Ghz, 16GB RAM@1600, R9 390 8GB stock, triple 17" screens and Oculus CV1.

Periphs - G25 wheel & SRH wheel plate (use the pedals for rudders), SRH button box and Thrustmaster HOTAS-X (old school!).

I need more USB sockets :(


#2 Habu

Habu
  • Tester
  • Posts: 2741
  • Location:Bordeaux

Posted 17 February 2017 - 15:38

For information :

 

The check zone trigger will take less ressources than a complex trigger, but take ressource because it's an area which is check. So, the check take ressource.

 

Following your screen, your check zone spawn only 3 planes (Fighter, kind of fighter change the ressource use, for exemple ju52 take more ressource than a fighter like BF109 or lagg3). It must be playable, unless the game environment is very loaded.

 

What you have to check on the dserver is the tick delay, keep it as low as possible.


  • 0

#3 Festa_PWR

Festa_PWR
  • Member
  • Posts: 46
  • Location:North West UK

Posted 17 February 2017 - 15:49

Cheers Habu.

 

I don`t watch the Tick Delay implicitly, but I think it`s normally around 4 or 5 for the most part.

 

On the chart bit of the DServer that seems to update every second, the grey spikes to around (assuming) 70% near the beginning of the mission, but settles below 50%.

 

The mission is entirely playable, I`m just trying to learn more in terms of keeping a mission tidy and as resource savy as possible.


  • 0

Rig - 4670k@4.2Ghz, 16GB RAM@1600, R9 390 8GB stock, triple 17" screens and Oculus CV1.

Periphs - G25 wheel & SRH wheel plate (use the pedals for rudders), SRH button box and Thrustmaster HOTAS-X (old school!).

I need more USB sockets :(


#4 Gambit21

Gambit21
  • Tester
  • Posts: 3899
  • Location:Pacific Northwest

Posted 17 February 2017 - 15:59

You can have a complex trigger, or group of complex triggers that are enabled or disabled according to whatever parameters you care to set. Thus not every trigger on the map needs to be active at once.
  • 0

                                                                                                                  

                                                                                                              


#5 Habu

Habu
  • Tester
  • Posts: 2741
  • Location:Bordeaux

Posted 17 February 2017 - 20:43

Cheers Habu.

 

I don`t watch the Tick Delay implicitly, but I think it`s normally around 4 or 5 for the most part.

 

On the chart bit of the DServer that seems to update every second, the grey spikes to around (assuming) 70% near the beginning of the mission, but settles below 50%.

 

The mission is entirely playable, I`m just trying to learn more in terms of keeping a mission tidy and as resource savy as possible.

Ok, it's a good thing to think to save resourse as soon as you can.

 

It's over the graph and beside the SPS.

 

As Gambit said, complex trigger and check zone can be deactivate to save ressource, when you don't use it.


Edited by Habu, 17 February 2017 - 20:46.

  • 0

#6 Festa_PWR

Festa_PWR
  • Member
  • Posts: 46
  • Location:North West UK

Posted 17 February 2017 - 20:59

I must be doing all i can currently then, as i have the check zones deactivate once they are triggered, but the rest need to stay active to see when to spawn in patrols.

 

Server load must drop when its in respawn timer delay (after we kill the patrol), as the check zones aren`t activated until 20 minutes later.

 

Thanks for your help fellows.


  • 0

Rig - 4670k@4.2Ghz, 16GB RAM@1600, R9 390 8GB stock, triple 17" screens and Oculus CV1.

Periphs - G25 wheel & SRH wheel plate (use the pedals for rudders), SRH button box and Thrustmaster HOTAS-X (old school!).

I need more USB sockets :(


#7 Gambit21

Gambit21
  • Tester
  • Posts: 3899
  • Location:Pacific Northwest

Posted 18 February 2017 - 00:03

Yeah you're more limited with MP missions.

I'm concentrating on SP missions, and I know where the player will be and won't be, so I can make use of a lot more triggers etc.


  • 0

                                                                                                                  

                                                                                                              


#8 Festa_PWR

Festa_PWR
  • Member
  • Posts: 46
  • Location:North West UK

Posted 03 March 2017 - 22:33

Didnt think it worth opening a new thread for a quick question, so i`ll post it here and hope it`s picked up . . . .

 

Is there any way to have a spawn area (fakevehiclefield specifically) become active after an event?

 

As there is no option to enable/disable in it`s advanced options, I`m assuming if it is possible, it works in a different way than having it activate?


  • 0

Rig - 4670k@4.2Ghz, 16GB RAM@1600, R9 390 8GB stock, triple 17" screens and Oculus CV1.

Periphs - G25 wheel & SRH wheel plate (use the pedals for rudders), SRH button box and Thrustmaster HOTAS-X (old school!).

I need more USB sockets :(


#9 Gambit21

Gambit21
  • Tester
  • Posts: 3899
  • Location:Pacific Northwest

Posted 04 March 2017 - 06:49

You can change the nationality of an airfield, German/Russian/Neutral, but you cannot activate/deactivate them.
Also aircraft will still react to/follow landing waypoints even if the airfield is neutral, (if changed to neutral after the aircraft has already landed) but will not follow neutral taxi waypoints on the way to takeoff.

It makes the functionality a bit limited. I really could use an 'enable' function in the airfield properties.
  • 0

                                                                                                                  

                                                                                                              


#10 JimTM

JimTM
  • Founder
  • Posts: 1392
  • Location:Canada

Posted 04 March 2017 - 07:00

Didnt think it worth opening a new thread for a quick question, so i`ll post it here and hope it`s picked up . . . .
 
Is there any way to have a spawn area (fakevehiclefield specifically) become active after an event?
 
As there is no option to enable/disable in it`s advanced options, I`m assuming if it is possible, it works in a different way than having it activate?


See "Manage Airfield Availability" on pg. 131 of the editor manual.
  • 0

#11 LLv34_Temuri

LLv34_Temuri
  • Member
  • Posts: 585

Posted 04 March 2017 - 20:15

You can activate and deactivate spawns too with the MCUs. Works at least with tank spawns, so probably also with airfields.


  • 1

32ux.jpg


#12 Gambit21

Gambit21
  • Tester
  • Posts: 3899
  • Location:Pacific Northwest

Posted 04 March 2017 - 20:27

My understanding is that you can't spawn anything without an 'activate' field in the properties, my own tests have confirmed this so far.

I've even tried spawning static objects by targeting them to an object that can be spawned like a vehicle, still doesn't work.


  • 0

                                                                                                                  

                                                                                                              


#13 Festa_PWR

Festa_PWR
  • Member
  • Posts: 46
  • Location:North West UK

Posted 05 March 2017 - 21:14

See "Manage Airfield Availability" on pg. 131 of the editor manual.

 

That`s the bugger! Thanks Jim.


  • 0

Rig - 4670k@4.2Ghz, 16GB RAM@1600, R9 390 8GB stock, triple 17" screens and Oculus CV1.

Periphs - G25 wheel & SRH wheel plate (use the pedals for rudders), SRH button box and Thrustmaster HOTAS-X (old school!).

I need more USB sockets :(


#14 LLv34_Temuri

LLv34_Temuri
  • Member
  • Posts: 585

Posted 06 March 2017 - 06:23

My understanding is that you can't spawn anything without an 'activate' field in the properties, my own tests have confirmed this so far.

I've even tried spawning static objects by targeting them to an object that can be spawned like a vehicle, still doesn't work.

Ungh! My mistake, I was talking about the fakefields :)


  • 0

32ux.jpg


#15 Festa_PWR

Festa_PWR
  • Member
  • Posts: 46
  • Location:North West UK

Posted 06 March 2017 - 11:47

Ungh! My mistake, I was talking about the fakefields :)

 

Haha no problem. My fault for hijacking my own thread and confusing people!


  • 0

Rig - 4670k@4.2Ghz, 16GB RAM@1600, R9 390 8GB stock, triple 17" screens and Oculus CV1.

Periphs - G25 wheel & SRH wheel plate (use the pedals for rudders), SRH button box and Thrustmaster HOTAS-X (old school!).

I need more USB sockets :(


#16 LLv34_Temuri

LLv34_Temuri
  • Member
  • Posts: 585

Posted 06 March 2017 - 12:00

Haha no problem. My fault for hijacking my own thread and confusing people!

But yeah: activating and deactivating the fakefield objects works.


  • 0

32ux.jpg


#17 Festa_PWR

Festa_PWR
  • Member
  • Posts: 46
  • Location:North West UK

Posted 07 March 2017 - 12:41

I`m taking the plunge and making a mission on the Moscow map now.

 

My god, the amount of prep work just getting a small area setup with buildings etc. haha

 

Oh well, it`s all good practice and thanks to Jim and Prangsters guides, it`s comes along pretty quickly.

 

The bit I find hardest is ideas on what to do with the huge play arena and tying it all together into a tangible mission (I`m not the creative type).


  • 0

Rig - 4670k@4.2Ghz, 16GB RAM@1600, R9 390 8GB stock, triple 17" screens and Oculus CV1.

Periphs - G25 wheel & SRH wheel plate (use the pedals for rudders), SRH button box and Thrustmaster HOTAS-X (old school!).

I need more USB sockets :(


#18 LLv34_Temuri

LLv34_Temuri
  • Member
  • Posts: 585

Posted 07 March 2017 - 13:15

My god, the amount of prep work just getting a small area setup with buildings etc. haha

I don't remember if it's in JimTM's guide or if you already know, but there are ready made templates for populating the entire map with buildings.


  • 0

32ux.jpg


#19 JimTM

JimTM
  • Founder
  • Posts: 1392
  • Location:Canada

Posted 07 March 2017 - 14:06

I don't remember if it's in JimTM's guide or if you already know, but there are ready made templates for populating the entire map with buildings.


See "Populate the View Port With Buildings and Other Objects" on pg. 51.
  • 0

#20 Festa_PWR

Festa_PWR
  • Member
  • Posts: 46
  • Location:North West UK

Posted 07 March 2017 - 16:42

I don't remember if it's in JimTM's guide or if you already know, but there are ready made templates for populating the entire map with buildings.

 

Yeah I seen those, but it`s still time consuming picking out what you need and making sure you don`t delete stuff that`s still grouped.

 

Unless it doesn`t hit resource having the full map populated with towns/bridges etc.?


See "Populate the View Port With Buildings and Other Objects" on pg. 51.

 

Haha, your entire forum existence is now replying simply with instruction manual page references! :)

 

We`re all glad of it though, so don`t stop :biggrin:


  • 0

Rig - 4670k@4.2Ghz, 16GB RAM@1600, R9 390 8GB stock, triple 17" screens and Oculus CV1.

Periphs - G25 wheel & SRH wheel plate (use the pedals for rudders), SRH button box and Thrustmaster HOTAS-X (old school!).

I need more USB sockets :(


#21 Gambit21

Gambit21
  • Tester
  • Posts: 3899
  • Location:Pacific Northwest

Posted 07 March 2017 - 16:44

I`m taking the plunge and making a mission on the Moscow map now.
 
My god, the amount of prep work just getting a small area setup with buildings etc. haha
 
Oh well, it`s all good practice and thanks to Jim and Prangsters guides, it`s comes along pretty quickly.
 
The bit I find hardest is ideas on what to do with the huge play arena and tying it all together into a tangible mission (I`m not the creative type).


I script my missions out on a notepad first, that way when I'm in the editor I'm much more efficient.
What takes the most time is testing and adjusting timing and " choreography" so that the final effect is what I was going for when conceiving the mission.

You don't need to populate the entire map with units (nor can you) but just what the player will see.
...and I load every building airfield and bridge into every mission.
  • 0

                                                                                                                  

                                                                                                              


#22 JimTM

JimTM
  • Founder
  • Posts: 1392
  • Location:Canada

Posted 07 March 2017 - 16:47

...

 

Haha, your entire forum existence is now replying simply with instruction manual page references! :)

 

We`re all glad of it though, so don`t stop :biggrin:

 

Lol. I'll be replaced by a bot soon.  :huh:


  • 0

#23 Festa_PWR

Festa_PWR
  • Member
  • Posts: 46
  • Location:North West UK

Posted 13 March 2017 - 10:52

 Another question slightly off-topic, but keeping all my own questions in one place for my own sanity :)

 

I`m not sure how best to test this, so I`ll ask the question first and go from there . . . I would like to have a few complex triggers on the Moscow map for multiplayer, but I`m thinking I should de-activate them at mission start and only have them activate with a 'check-zone IN' trigger and have them de-activate again once they complete.

 

The idea behind this is needing to drop 30 paratroopers at an airfield to trigger a takeover.

 

However, if I also put in a 'check-zone OUT' to deactivate the complex trigger when nobody is in the area (and decides to set off all the other complex triggers), if a counter MCU has counted 12 of the 30 paratroopers needed, when de-activated and re-activated at a later time, does it remember how many units it counted when it was last de-activated?

 

Apologies if my wording is confusing. If it doesn`t make sense but you think you may be able to help, please ask.


Edited by Festa_PWR, 13 March 2017 - 10:52.

  • 0

Rig - 4670k@4.2Ghz, 16GB RAM@1600, R9 390 8GB stock, triple 17" screens and Oculus CV1.

Periphs - G25 wheel & SRH wheel plate (use the pedals for rudders), SRH button box and Thrustmaster HOTAS-X (old school!).

I need more USB sockets :(


#24 Habu

Habu
  • Tester
  • Posts: 2741
  • Location:Bordeaux

Posted 13 March 2017 - 11:02

It's not the Complex trigger which will count your paratrooper, it's a trigger Counter. So there is no problem with complex trigger, even if you deactivate and reactivate it.


  • 0

#25 LLv34_Temuri

LLv34_Temuri
  • Member
  • Posts: 585

Posted 13 March 2017 - 11:18

I should de-activate them at mission start and only have them activate with a 'check-zone IN' trigger and have them de-activate again once they complete.

You can set the complex trigger to be disabled on mission start by default. Just remove the "Enabled" selection in the Advanced Properties dialog. 


if a counter MCU has counted 12 of the 30 paratroopers needed, when de-activated and re-activated at a later time, does it remember how many units it counted when it was last de-activated

It should. Check JimTM's guide. 


  • 0

32ux.jpg


#26 Festa_PWR

Festa_PWR
  • Member
  • Posts: 46
  • Location:North West UK

Posted 13 March 2017 - 11:21

Cheers fellas.

 

As I was sat in the office I had the same thought that its the counter doing the counting, so disabling the complex trigger does nothing to the counter.

 

Such an idiot sometimes :wacko:


  • 0

Rig - 4670k@4.2Ghz, 16GB RAM@1600, R9 390 8GB stock, triple 17" screens and Oculus CV1.

Periphs - G25 wheel & SRH wheel plate (use the pedals for rudders), SRH button box and Thrustmaster HOTAS-X (old school!).

I need more USB sockets :(


#27 JimTM

JimTM
  • Founder
  • Posts: 1392
  • Location:Canada

Posted 13 March 2017 - 12:24

 
It should. Check JimTM's guide.


See the counter trigger usage note on pg. 279.
  • 0

#28 Festa_PWR

Festa_PWR
  • Member
  • Posts: 46
  • Location:North West UK

Posted 13 March 2017 - 12:30

See the counter trigger usage note on pg. 279.

 

Cheers Jim. I know how to use the counter and my question is kind of pointless now anyway (and was more about the complex trigger), as it seemed I had a slight brain fart instead of a thought. :)


  • 0

Rig - 4670k@4.2Ghz, 16GB RAM@1600, R9 390 8GB stock, triple 17" screens and Oculus CV1.

Periphs - G25 wheel & SRH wheel plate (use the pedals for rudders), SRH button box and Thrustmaster HOTAS-X (old school!).

I need more USB sockets :(


#29 JimTM

JimTM
  • Founder
  • Posts: 1392
  • Location:Canada

Posted 13 March 2017 - 16:21

Cheers Jim. I know how to use the counter and my question is kind of pointless now anyway (and was more about the complex trigger), as it seemed I had a slight brain fart instead of a thought. :)

 

Roger that. Just wanted to make sure that you were aware that the counter doesn't stop counting when deactivated. So it doesn't "remember how many units it counted when it was last de-activated". Instead, it keeps counting and remembers whether it reached its maximum count during the deactivated period and it fires immediately upon re-activation if the max count was reached.

 

Cheers!


  • 0

#30 Festa_PWR

Festa_PWR
  • Member
  • Posts: 46
  • Location:North West UK

Posted 13 March 2017 - 16:32

Yeah I figured the counter still worked, I just got my head muddled and over-thought the whole process while sat at work.

 

I think if I had the ME in front of me, I might not have made the same mistake, as I was remembering something I had thought of briefly last night. :rolleyes:


  • 0

Rig - 4670k@4.2Ghz, 16GB RAM@1600, R9 390 8GB stock, triple 17" screens and Oculus CV1.

Periphs - G25 wheel & SRH wheel plate (use the pedals for rudders), SRH button box and Thrustmaster HOTAS-X (old school!).

I need more USB sockets :(


#31 TP_Silk

TP_Silk
  • Member
  • Posts: 370
  • Location:North Tyneside, UK

Posted 21 March 2017 - 12:24

Just a quick question about the OP's script there. Is there a particular reason that you use a Spawn MCU rather than an Activate MCU? I kind of assume that a spawner would be better for SP missions and maybe those Co-ops where you have an enemy confined to a specific area while an Activate MCU would be the better choice if you want the object(s) to maybe follow a set of waypoints?

 

Thoughts?


  • 0

#32 Habu

Habu
  • Tester
  • Posts: 2741
  • Location:Bordeaux

Posted 21 March 2017 - 12:31

Activate units are count in the unit on the map even when they are not activated. So it took more ressource than a spawn unit. Activated unit can be activated only once. You can't activate any units which has been killed. Spawn units are infinite.


  • 0

#33 TP_Silk

TP_Silk
  • Member
  • Posts: 370
  • Location:North Tyneside, UK

Posted 21 March 2017 - 12:44

I guess that makes sense. Thanks :))


  • 0

#34 LLv34_Temuri

LLv34_Temuri
  • Member
  • Posts: 585

Posted 21 March 2017 - 13:23

In addition, units that have been spawned do not work together as a group even when they're target linked properly.


  • 0

32ux.jpg


#35 TP_Silk

TP_Silk
  • Member
  • Posts: 370
  • Location:North Tyneside, UK

Posted 22 March 2017 - 18:24

In addition, units that have been spawned do not work together as a group even when they're target linked properly.

 

Does that apply even if you use a Formation MCU group?


  • 0

#36 LLv34_Temuri

LLv34_Temuri
  • Member
  • Posts: 585

Posted 22 March 2017 - 20:05

Does that apply even if you use a Formation MCU group?

Yes.


  • 0

32ux.jpg


#37 Gambit21

Gambit21
  • Tester
  • Posts: 3899
  • Location:Pacific Northwest

Posted 23 March 2017 - 00:20

Yep, you have to object link each waypoint to each unit.

I think it was Jade Monkey who clued me into that some weeks ago when I was having trouble with spawning multiple aircraft.


  • 0

                                                                                                                  

                                                                                                              


#38 LLv34_Temuri

LLv34_Temuri
  • Member
  • Posts: 585

Posted 23 March 2017 - 06:09

Now that I think about it, I'm fairly sure I didn't test it so that I'd use a single spawner MCU to spawn multiple objects and then having those target linked. Need to check.


  • 0

32ux.jpg


#39 Gambit21

Gambit21
  • Tester
  • Posts: 3899
  • Location:Pacific Northwest

Posted 23 March 2017 - 06:49

Only the lead entity will follow the waypoints, the other entities in the flight need to be linked to each waypoint individually - but other than that it works.
  • 0

                                                                                                                  

                                                                                                              





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users