Active Slot Balancing - Proof of concept with video and mission - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 05-22-2017, 09:17 AM   #1
Pikey
Veteran
 
Pikey's Avatar
 
Join Date: Sep 2009
Location: Reading, UK (GMT)
Posts: 3,526
Default Active Slot Balancing - Proof of concept with video and mission

We were puzzling through the bug that prevents an MP CLIENT event firing when he moves into a slot, which is shown here https://www.youtube.com/watch?v=Un9S67NDoLg. The ugly workaround is to iterate the clients that are alive on a regular basis. Sadly the limitation of the Server side API which is properly designed to do this requires a GameGUI.lua in addition, which could be messy, but depending on your point of view, can be done more elegantly.

That said, the use case for needing this work around still exists in the following example. Or in a nutshell; "How do I create content inside a mission that's dynamic according to what slot a client plays in?"

Use cases include, but are not limited to; Player picks a Sabre module in slot, you want to give him a Mig15 to go up against, OR Player picks a Viggen, you want to give him ships to destroy, or Player picks helicopter slot, you want to not have those SAMs. Etc, world is your oyster.

I put together a video showing my workaround and will attach the mission for looking at. Note that, i'm not a developer by trade so if you don't like my script, I don't really care! But if you want to show me something better, I'd love to hear how in order to learn. I'm using MOOSE as it simplifies a lot of my learning of LUA and automates a large deal of the tasks I like to do, without repeating code that I wouldnt understand had I started from scratch LUA.



Note that this is quite different from the MOOSE AI Balancer. MOOSE AIB will spawn an AI in all slots and periodically checks for players int he slot then RTB's them. This approach only does something based on the slot that's filled. For air units I RTB them if in the air and if they are on the ground i despawn them. For ground targets, for the demo I chose not to do anything with them at all when the player leaves the slot.
As i said, it's a concept for more interesting play. I like it especially if you have a small group and cannot predict who will show up for a mission. You coudl immediately have an issue with your CAP fighter player not turning up if your CAS dudes are unsuported and you put in horrible CAP. AS a mission designer, I always found that people are fickle. This tackles that problem directly.
Attached Files
File Type: miz moose-fighterbalancing.miz (275.3 KB, 68 views)
__________________
Whilst some parrots may jabber,
"To improve is to change; to be perfect is to change often". (W.Churchill)
Pikey is offline   Reply With Quote
Old 05-22-2017, 04:09 PM   #2
Delta99
Member
 
Delta99's Avatar
 
Join Date: Jan 2017
Posts: 396
Default

Really good stuff there Pikey

Last edited by Delta99; 05-28-2017 at 11:08 PM.
Delta99 is offline   Reply With Quote
Old 05-22-2017, 04:43 PM   #3
FlightControl
Senior Member
 
FlightControl's Avatar
 
Join Date: Mar 2012
Location: Antwerp, Belgium
Posts: 2,026
Default

Dude... This is cool
__________________
FlightControl is offline   Reply With Quote
Old 05-25-2017, 12:43 AM   #4
ECV56_Polten
Junior Member
 
ECV56_Polten's Avatar
 
Join Date: Sep 2015
Location: CABA, Argentina
Posts: 26
Default

Hi Pikey. You said that you are not a developer, but the code you put here is quite advanced. I looked into it and I wouldn't change anything (at least until ED corrects the bug), maybe I would use a different indentation style, but that is a personal preference.
Still trying to learn moose.
ECV56_Polten is offline   Reply With Quote
Old 06-14-2019, 09:28 AM   #5
carlwicker
Junior Member
 
carlwicker's Avatar
 
Join Date: Nov 2018
Location: United Kingdom
Posts: 5
Default

Awesome, I've been looking for a solution very close to this. Thanks for sharing your code.
__________________
------
NOVA 3 | DRONE
carlwicker is offline   Reply With Quote
Old 06-14-2019, 09:50 AM   #6
TheBamse
Member
 
TheBamse's Avatar
 
Join Date: Jan 2017
Location: Gothenburg, Sweden
Posts: 159
Default

Damn, that's cool. Good job!
TheBamse is offline   Reply With Quote
Old 06-16-2019, 04:03 PM   #7
feefifofum
3rd Party Developer
 
feefifofum's Avatar
 
Join Date: Jan 2015
Location: USA
Posts: 3,014
Default

Guys who are just finding this:

This is a very old thread and the functionality has been incorporated into the MOOSE framework and updated by the original author.

You can find more information here and a very helpful community here.
feefifofum is offline   Reply With Quote
Old 06-30-2019, 07:02 PM   #8
Pikey
Veteran
 
Pikey's Avatar
 
Join Date: Sep 2009
Location: Reading, UK (GMT)
Posts: 3,526
Default

Quote:
Originally Posted by feefifofum View Post
Guys who are just finding this:

This is a very old thread and the functionality has been incorporated into the MOOSE framework and updated by the original author.

You can find more information here and a very helpful community here.

Yeah it's a bit more baffling that that even.


MOOSE AI_Balancer https://flightcontrol-master.github...._Balancer.html is a module that sends out an AI template instead of a specific Client slot. It then sends that AI back home if the client is there. In effect it's filling up with AI to make up for no players online.



The thing I wrote is subtly different, in that it ONLY spawns AI when a client slot is actually there.



So it's the actual exact inverse, although the concepts of taking away or adding sounds like it should be the same thing and part of AIB to be honest.



Just thought I add to my original post many months later. It's again using SET's to count CLIENTs and doing something as a result.
__________________
Whilst some parrots may jabber,
"To improve is to change; to be perfect is to change often". (W.Churchill)
Pikey is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 12:45 PM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.