Page 1 of 1

Option or mod to force a unit cap?

Posted: Mon Jul 17, 2017 11:09 am
by Blake00
Hi guys,

Been playing some openra games on large maps with lots of enemy players where we've experienced epic slow downs. I'm some cases we've given up on the game becuase it became so darn slow. In other cases we eventually were able to speed up the game by killing people off before it got too insanely slow. In all cases it was due to the AIs spamming out endless cr*ppy troops and then positioning heaps of them around the map instead of attacking with them.

So I was wondering if there's a not so obvious option somewhere or a 3rd party mod that allows you to force a unit cap (whatever number you want) in openra like the old games used to do?

Posted: Mon Jul 17, 2017 4:20 pm
by SirCake
1. Get better PC
2. Play with people wo have good (green) ping on massive maps
3. Dont play massively silly maps
4. Don't give silly move orders to units because pathfinding will wreck your FPS
5. Don't play vs AI, only noobs do that
6. Mod anything you want with openRA! Its DIY software ;)

Re: Option or mod to force a unit cap?

Posted: Mon Jul 17, 2017 10:05 pm
by JOo
Blake00 wrote: So I was wondering if there's a not so obvious option somewhere or a 3rd party mod that allows you to force a unit cap (whatever number you want) in openra like the old games used to do?
Would be nice to have that for modders, a yaml-option to cap units (specific types of units or from specific buildings that produce units)

actually we do have that for tanya (you can only have one at a time ... or some tech-buildings (nuke silo ...) ... so it should be possible ... i would check those units/buildings out in the yaml-rules to see what limits them

Re: Option or mod to force a unit cap?

Posted: Mon Jul 17, 2017 10:51 pm
by Inq
JOo wrote:
Blake00 wrote: So I was wondering if there's a not so obvious option somewhere or a 3rd party mod that allows you to force a unit cap (whatever number you want) in openra like the old games used to do?
Would be nice to have that for modders, a yaml-option to cap units (specific types of units or from specific buildings that produce units)

actually we do have that for tanya (you can only have one at a time ... or some tech-buildings (nuke silo ...) ... so it should be possible ... i would check those units/buildings out in the yaml-rules to see what limits them
You could mod unit limits into the AI rules file (specifically for AI) , although i'm not sure if the bot would malfunction if it reached a hard limit and had nothing to build.

Posted: Tue Jul 18, 2017 7:10 am
by MustaphaTR
I think you may try to make AI's SquadSize: smaller, that would make AI attack often (as squad gets completed quicker) but no big groups of enemy units would appear i guess.

UnitLimits: as Inq said may lock the AI, but you can keep a unit (Rifle Inf maybe) limitless so AI would build it if it has nothing else to build.

Or wait for #12949 to be merged so we can get a properer AI. I don't think will happen soon tho, maybe for next+1 version, as next is almost ready for a playtest. AFAIK forcecore is still working on that, but PR hasn't been updated for a while.

Posted: Tue Jul 18, 2017 4:32 pm
by Raishiwi
I didn't know team game players had good enough macro to cause this type of issue. :P jk. Though it could make for some good playtes

Posted: Tue Jul 18, 2017 6:07 pm
by WhoCares
Raishiwi wrote: I didn't know team game players had good enough macro to cause this type of issue. :P jk. Though it could make for some good playtes
It's not about the macro, they just play huge ridiculous map allowing them to "sim-city", more than the units, it's the building count, there is no so much fights in those games.

Posted: Wed Jul 19, 2017 8:49 am
by lucassss

Posted: Wed Jul 19, 2017 1:07 pm
by Materianer
hi,
you can add these lines of code to any map.

Code: Select all

Rules:
+World:
++^Soldier:
+++Buildable:
++++BuildLimit: 50
++E7:
+++Buildable:
++++BuildLimit: 1
++^Plane:
+++Buildable:
++++BuildLimit: 15
++^Helicopter:
+++Buildable:
++++BuildLimit: 15
++^Tank:
+++Buildable:
++++BuildLimit: 30
++^Vehicle:
+++Buildable:
++++BuildLimit: 20
++^Defense:
+++Buildable:
++++BuildLimit: 10
++MSLO:
+++Buildable:
++++BuildLimit: 1
++IRON:
+++Buildable:
++++BuildLimit: 1
++PDOX:
+++Buildable:
++++BuildLimit: 1

Just save it unpacked in your mapeditor, open the map.yaml and add the code at the end of the file.
Don't forget to replace the + with tabs!
Then just save it packed with a new name and upload it to the resource center if you want to play it online.

I don't know how the ai will behave with such rules but you can try it.

The problem with lagging ai games on big maps is old and i just found out what could be the problem with it.

If the ai has harvesters but no available resources the hard lag starts.

I will research later if it also maybe caused if his resources are consumed and the next orefield is far away. I hope this info will help the developers then to delete this lag then.

Posted: Fri Jul 21, 2017 6:35 am
by Blake00
SirCake wrote: 1. Get better PC
2. Play with people wo have good (green) ping on massive maps
3. Dont play massively silly maps
4. Don't give silly move orders to units because pathfinding will wreck your FPS
5. Don't play vs AI, only noobs do that
6. Mod anything you want with openRA! Its DIY software ;)
Thanks for the advice. This may shock you but not everyone is a programmer nor do they use OpenRA for the same reasons you do. ;)

My friends & I use desktop I7s, we play over a LAN and enjoy team matches against AIs. We're not interested in being some amazing tournament player lol, we just wanna have our own fun. I've seen complaints about slow downs for years now so telling people they can't use the larger maps that come with the game instead of working on the issue doesn't seem like the best way to go about it.
Materianer wrote: hi,
you can add these lines of code to any map.

Code: Select all

Rules:
+World:
++^Soldier:
+++Buildable:
++++BuildLimit: 50
++E7:
+++Buildable:
++++BuildLimit: 1
++^Plane:
+++Buildable:
++++BuildLimit: 15
++^Helicopter:
+++Buildable:
++++BuildLimit: 15
++^Tank:
+++Buildable:
++++BuildLimit: 30
++^Vehicle:
+++Buildable:
++++BuildLimit: 20
++^Defense:
+++Buildable:
++++BuildLimit: 10
++MSLO:
+++Buildable:
++++BuildLimit: 1
++IRON:
+++Buildable:
++++BuildLimit: 1
++PDOX:
+++Buildable:
++++BuildLimit: 1

Just save it unpacked in your mapeditor, open the map.yaml and add the code at the end of the file.
Don't forget to replace the + with tabs!
Then just save it packed with a new name and upload it to the resource center if you want to play it online.

I don't know how the ai will behave with such rules but you can try it.

The problem with lagging ai games on big maps is old and i just found out what could be the problem with it.

If the ai has harvesters but no available resources the hard lag starts.

I will research later if it also maybe caused if his resources are consumed and the next orefield is far away. I hope this info will help the developers then to delete this lag then.
Thanks Materianer! This is great! :) We'll try this out at our next lan party.

Posted: Fri Jul 21, 2017 7:49 am
by Wippie
Blake00 wrote:
Thanks Materianer! This is great! :) We'll try this out at our next lan party.
Also, try identifying the weakest link by leaving the game 1 by 1. I know there used to be performance problems, especially when one of the clients processors was too slow,

Have fun!