Determining limit of a specific trooper [Solved]

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
15Cyber
Private Second Class
Posts: 67
Joined: Wed Sep 17, 2014 12:02 pm
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2
xbox live or psn: No gamertag set
Location: Brazil

Determining limit of a specific trooper [Solved]

Post by 15Cyber »

On my map Anakin is a playable character as any trooper, but I want there to be only one anakin on the battlefield, not 4 or 5 as it happens. How do I determine a limit? to be only one on the battlefield
Last edited by 15Cyber on Mon Nov 03, 2014 7:19 pm, edited 1 time in total.
jedimoose32
Field Commander
Field Commander
Posts: 938
Joined: Thu Jan 24, 2008 12:41 am
Projects :: Engineering Degree
Location: The Flatlands of Canada

Re: Determining limit of a specific trooper

Post by jedimoose32 »

Go to your map's lua file (for example ABCc_con.lua) and find the setup teams section near the bottom. By default you should see the list of unit classes and their limits. Here's one example:

Code: Select all

officer = {"rep_inf_ep3_officer",1, 5}
The first number that you see after the unit name is the minimum number of this kind of unit, and the second one is the maximum. Just change both to 1 for your Anakin unit and you're all set.
15Cyber
Private Second Class
Posts: 67
Joined: Wed Sep 17, 2014 12:02 pm
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2
xbox live or psn: No gamertag set
Location: Brazil

Re: Determining limit of a specific trooper

Post by 15Cyber »

Thank you :thumbs:
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Determining limit of a specific trooper

Post by AceMastermind »

Yeah, and if I recall, you could also set an absolute number instead of min/max, like this:

Code: Select all

officer = {"rep_inf_ep3_officer",1}
jedimoose32
Field Commander
Field Commander
Posts: 938
Joined: Thu Jan 24, 2008 12:41 am
Projects :: Engineering Degree
Location: The Flatlands of Canada

Re: Determining limit of a specific trooper [Solved]

Post by jedimoose32 »

I always thought that defined only a maximum value and left out the minimum. That's really good to know. Thanks Ace!
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Determining limit of a specific trooper [Solved]

Post by AceMastermind »

You might be right, it's been years since i've done any experimenting with that.
I did try it without any min/max numbers at all and the game filled in the unit randomly.

viewtopic.php?f=27&t=15462&p=265986#p265986
MileHighGuy
Jedi
Jedi
Posts: 1194
Joined: Fri Dec 19, 2008 7:58 pm

Re: Determining limit of a specific trooper [Solved]

Post by MileHighGuy »

recently I just had one 0 put in and there were still troops spawning. 0,0 made no troops spawn.
jedimoose32
Field Commander
Field Commander
Posts: 938
Joined: Thu Jan 24, 2008 12:41 am
Projects :: Engineering Degree
Location: The Flatlands of Canada

Re: Determining limit of a specific trooper [Solved]

Post by jedimoose32 »

From what you're both saying it sounds like putting just one value only defines a minimum and leaves the maximum up the game to decide.
Post Reply