How to set unit limits [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
User avatar
TGB
Private Third Class
Posts: 58
Joined: Sun Oct 25, 2009 2:21 am
Games I'm Playing :: LoL SWBF2 BF3 CNC3
xbox live or psn: pfff xbox
Location: New Zealand

How to set unit limits [Solved]

Post by TGB »

hi i would like to put a limit to how many SBDs are on the maps in my realism mod. not the ai limit but the limit like with the special units it is 4. how would this be done?
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: how to set unit limits

Post by AQT »

It's done by LUA. In your LUA look for the SetupTeams section. For example, this line

Code: Select all

            special = {"cis_inf_droideka",1, 4},
references the droideka unit. The first number you see (in this case 1) is the minimum amount of droidekas that can be out on the map while the second number (4) is the maximum amount. Change them accordingly as you see fit.
User avatar
TGB
Private Third Class
Posts: 58
Joined: Sun Oct 25, 2009 2:21 am
Games I'm Playing :: LoL SWBF2 BF3 CNC3
xbox live or psn: pfff xbox
Location: New Zealand

Re: how to set unit limits

Post by TGB »

thanks ill try it

Edit: that doesnt change the maximum count for it though, that changes the AI limits.
what i want ot change is for eg. with the jet trooper the maximum is 4 for both the AI and player, isnt there an odf setting that changes this?
User avatar
eliminator
Second Lance Corporal
Second Lance Corporal
Posts: 118
Joined: Wed Aug 19, 2009 3:39 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Germany

Re: How to set unit limits

Post by eliminator »

you have to set in the odf:

Code: Select all

PointstoUnlock = [i]X[/i]
so you have a max of spawning ;-)
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: How to set unit limits

Post by AQT »

^ That only changes the amount of points you need to earn in order to unlock a certain unit, nothing else.
that doesnt change the maximum count for it though, that changes the AI limits.
Right.
what i want ot change is for eg. with the jet trooper the maximum is 4 for both the AI and player
According to what you wrote here, "maximum count" and "AI limit" are the same thing. Please be more specific.
User avatar
destos
Chief Warrant Officer
Chief Warrant Officer
Posts: 349
Joined: Sat Sep 22, 2007 10:37 pm

Re: How to set unit limits

Post by destos »

I Beleive he wants to edit the Max unit count of jet troopers on the field of battle at any given time.

which means you would want to edit this

Code: Select all

			special = { "rep_inf_ep3_jettrooper",1, 4},
4 is the number you want to edit, edit it to what ever number you want then munge, it should change the max number of units on the field of play.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: How to set unit limits

Post by AQT »

Yes, I've realized that which is why I used the droideka example in my first post.
kinetosimpetus
Imperial Systems Expert
Imperial Systems Expert
Posts: 2381
Joined: Wed Mar 25, 2009 4:15 pm
Projects :: A secret project
Games I'm Playing :: Warframe STO

Re: How to set unit limits

Post by kinetosimpetus »

Setting the lua to 1, 4 will enforce the limit on ai, but not players.
To enforce the limit on players also, the unit has to use PointsToUnlock as well.
User avatar
eliminator
Second Lance Corporal
Second Lance Corporal
Posts: 118
Joined: Wed Aug 19, 2009 3:39 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Germany

Re: How to set unit limits

Post by eliminator »

kinetosimpetus wrote:Setting the lua to 1, 4 will enforce the limit on ai, but not players.
To enforce the limit on players also, the unit has to use PointsToUnlock as well.
this is what i said :roll:
User avatar
TGB
Private Third Class
Posts: 58
Joined: Sun Oct 25, 2009 2:21 am
Games I'm Playing :: LoL SWBF2 BF3 CNC3
xbox live or psn: pfff xbox
Location: New Zealand

Re: How to set unit limits

Post by TGB »

it's working now, thanks
Post Reply