Can someone make the Units Cap infinite?

Have modding questions or discovered something new? Post here.
User avatar
j3rry
Map Maker
Map Maker
Posts: 121
Joined: Thu Oct 11, 2018 5:43 am
Location: Central Russia
Russia

Re: types_common.cfg and ruleset

Post by j3rry »

Interesting solution. I will try it.
Last edited by j3rry on Thu Jan 06, 2022 6:43 am, edited 1 time in total.
User avatar
Secg
Half Track L2
Half Track L2
Posts: 200
Joined: Sat Jun 10, 2017 12:28 am
United States of America

Re: types_common.cfg and ruleset

Post by Secg »

j3rry wrote: Thu Jul 18, 2019 1:23 pm
Secg wrote: Thu Jul 18, 2019 12:29 pm
Wow, interesting solution. :SWEET: I think I will need to try it.
I admit, unpacking & changing a few rulesets & then repacking them & getting your friends (& foe) to download the same rulesets is much more easier then unpacking, tweaking, & then repacking lots of maps.
ImageImage
FoquitaStudios
Noob
Noob
Posts: 2
Joined: Thu Jun 04, 2020 3:03 am
Bolivia

Re: Can someone make the Units Cap infinite?

Post by FoquitaStudios »

Hello, I have a question, how is the realism mod installed? I have seen videos where they only show how it is downloaded after that, I would just like someone to tell me how to put the realism mod
chaoberaumang1941
Noob
Noob
Posts: 2
Joined: Sun Apr 18, 2021 4:48 am
Vietnam

Re: Can someone make the Units Cap infinite?

Post by chaoberaumang1941 »

Secg wrote: Tue Jun 05, 2018 3:11 pm
TommyCD1 wrote: Tue May 29, 2018 6:20 pm The game's default population limit is 70. This increments by 1 for every unit you own, including buildings and heroes. All units cost the same, which is 1 single command cost.
Just a small correction: the unit cap is actually 75, which I've confirmed by changing Sarge's command cost to 75; result I can't even build my HQ. In DR2, there's a code in the file unitlimits.cfg which reads

Code: Select all

Limit(150). 
Changing the number in the parentheses will change the default unit limit. However, this code does not work in AMRTS.

However, unit cap can be changed for each player in each mission by following these steps:

In game.cfg, state a starting objective for each player:

Code: Select all

    Objectives()
    {
      ReaperId(3475);
    }
Note: The ReaperId can be any unique number.

Then in objects.cfg, create a starting objective:

Code: Select all

CreateObject("objective_start_player_1", 3475)
{
  ObjectiveObj()
  {
    Condition();
  }
}
Then code the objective's action:

Code: Select all

CreateObjectType("objective_start_player_1", "Objective")
{
  Condition("TRUE");

  Action()
  {
    SetUnitLimit(200);
  }
}
Dear. :D
I have been reads your guide but I think some confuse...

How to embed this code into game compiled resource ?
Does we will going to use any tool ? Please share my tool/guide if that use tool. Thanks !
User avatar
TommyCD1
Moderator
Moderator
Posts: 1146
Joined: Tue Jun 04, 2013 8:55 am
Location: East Coast
Contact:
United States of America

Re: Can someone make the Units Cap infinite?

Post by TommyCD1 »

There currently isn't a way to recompile the game's source for now. The methods listed here are currently the only solutions for now. If you want the easiest solution, then I would recommend that you simply create a folder in your game's directory called 'base' and inside that folder have a file called 'unitlimit.cfg'. Then you can change this limit to whatever you want. Although keep in mind changing something as integral as the unit limit will cause desyncs online unless you provide your mod to all other players.

Contents of unitlimt.cfg should be as such:

Code: Select all

///////////////////////////////////////////////////////////////////////////////
//
// Pandemic Studios
//
// Unit Construction Limits
//

Limit(70);
70 is the default, change it however you like. If you want unlimited units, then simply change it to an extreme number such as 9,999,999 to preclude ever hitting it.
I may not make the best maps, or be the best player, but I put a lot of time, effort, and care into my stuff. That counts for something, right? No.
Image
"Can we order a pizza?"
GameRanger ID: 913974
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests