Local Team Unitcount

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
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Local Team Unitcount

Post by Aman/Pinguin »

Well...
I will explain it short:

This is what I have in my .LUA:

Code: Select all

	SetTeamName(4, "egg")
    	SetTeamIcon(4, "imp_icon")
    	AddUnitClass(4, "egg_1", 90,100)
    	AddUnitClass(4, "egg_2", 90,100)
    	AddUnitClass(4, "egg_3", 90,100)
    
    	SetUnitCount(4, 300)
	AddAIGoal(Eggs, "Deathmatch", 100)
	SetTeamAsEnemy(ATT,4)
    	SetTeamAsEnemy(4,ATT)
    	SetTeamAsEnemy(DEF,4)
    	SetTeamAsEnemy(4,DEF)  
You will probably notice the high unit counts.
Problem: There spawn only like 10 eggs, thats definitively not enough.

I already tried it with Ubermode, didn't help.

Hopefully someone knows my failure / a way.

Thanks in advance.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Local Team Unitcount

Post by [RDH]Zerted »

Did you give team 4 any reinforcements?
If there is a problem spawning units, its sometimes in the error log.
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Re: Local Team Unitcount

Post by Aman/Pinguin »

No I didn't, all lines I made for team 4 are in my first post. (Except Eggs = 4 at the top of my script)
Also there are no unusual errors in my logs... :?

Except this one...

Code: Select all

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Controllable.cpp(383)
trying to AddController to a Controllable that already has one.
(x5)

I don't think it has anything to do with my problem though... :|
MandeRek
Sith Master
Sith Master
Posts: 2766
Joined: Tue Oct 02, 2007 10:51 am
Projects :: Battlefront Zer0
Games I'm Playing :: SWTOR
xbox live or psn: No gamertag set
Location: Ghosting around GT
Contact:

Re: Local Team Unitcount

Post by MandeRek »

For huge amounts you need to SetUberMode (1), btw, are those my eggs? :lol:
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Re: Local Team Unitcount

Post by Aman/Pinguin »

1. Read my full first post, not only a part of it. ;)
2. Yes. Just bigger. :P
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Local Team Unitcount

Post by [RDH]Zerted »

Aman/Pinguin wrote:No I didn't...
So did you try increasing the reinforcement count or just said you didn't do it?
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Local Team Unitcount

Post by Teancum »

One thing that could be an issue is that your using SetUnitCount() after you've already set up the units. So it's loading the default number of units before, then increasing the total number after, which means you'd have 10 eggs at a time, but they'd keep respawning until 300.
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Re: Local Team Unitcount

Post by Aman/Pinguin »

[RDH]Zerted wrote:
Aman/Pinguin wrote:No I didn't...
So did you try increasing the reinforcement count or just said you didn't do it?
I didn't do it. Should I?
Teancum wrote:One thing that could be an issue is that your using SetUnitCount() after you've already set up the units. So it's loading the default number of units before, then increasing the total number after, which means you'd have 10 eggs at a time, but they'd keep respawning until 300.
Thanks I will try placing that line infront of the unit setup. :)

EDIT: No success.

EDIT2: Even this one didn't work (still only like 10 eggs):

Code: Select all

    SetupTeams{ 
        eastereggs = {
            team = Eggs,
            units = 300,
            reinforcements = -1,
            soldier  = { "egg_1",90, 100},
            assault  = { "egg_2",90, 100},
            engineer = { "egg_3",90, 100},
        }
    }
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Re: Local Team Unitcount

Post by Aman/Pinguin »

Seems like nobody knows a solution, I will just add more teams with the same unit setup then...
Still, if someone knows whats wrong, please post. <.<
Post Reply