BF2 Limitations (FAQ)

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
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: BF2 Limitations (FAQ)

Post by Maveritchell »

AQT wrote:EDIT: D'oh! Team "0" is obviously neutral. :oops: Anyway, I still haven't gotten the eighth team to work yet, but I did find that there is a limit on the number of text characters/spaces combination that can go into a "popuptext" message. The number is fairly reasonable (not sure about the exact count), but exceeding this limit crashes the game without any related error messages that I know of. The crash occurs the moment right before the popup appears.
Thought I had posted it somewhere in here, but yes, I ran into that string limit error when I was making Spira. It took me a long time to bugcheck, because it only crashes the game and not the ModTools.exe. I had a hard time making more than eight teams work in that same project, but I haven't tried that again since (so I don't have any current information to add).
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: BF2 Limitations

Post by AQT »

theITfactor wrote:
Maveritchell wrote:
theITfactor wrote:There seems to be a limit to the number of animations you can have in a map, I had ~32 and I experienced a freeze during load, undocumented in the error log. I have not tested whether or not there is a limit on animation groups.
It's a limit to animation keyframes, like I told you - not animations themselves.
That's weird, I have fewer animations than before with more keyframes and it is performing much better. I wonder if I miscounted something...
I had 35 animations with 74 keyframes total, and the I experienced a freeze at the last loading circle. So I switched it up and got rid of a few things to the point of me ending up with 32 animations with 75 keyframes total, and the map worked just fine. I suspect that animation limit itself is indeed 32. There's probably a keyframe limit number as well.
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3284
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: BF2 Limitations (FAQ)

Post by AceMastermind »

Are we all in agreement that:
  • A) You can't modify the Droideka or Fambaa shield effect geometry.
    B) You can't change which bone the JetEffect property uses as the attach origin (bone_ribcage).
    C) ZeroEditor will crash when attempting to load models mapped to textures 2048 pixels or higher.
if no one objects to these or is able to prove otherwise then i'll add them to the list of limitations in the first post.

Discussion threads:
viewtopic.php?f=27&t=28100
viewtopic.php?f=27&t=28200
viewtopic.php?p=471310#p471310
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: BF2 Limitations (FAQ)

Post by Maveritchell »

AceMastermind wrote:C) ZeroEditor will crash when attempting to load models mapped to textures 2048 pixels or higher.
This isn't true, at least insomuch as ZE "cares" about single dimensions. 2048 is fine so long as your other dimension is small enough (I've used 2048*16 for a scrolling texture before, but had a crash when I used 4096 as its dimension). Total number of pixels on the texture is what makes sense anyway.
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3284
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: BF2 Limitations (FAQ)

Post by AceMastermind »

Ok thanks, i'm seeing conflicting information according to this post though.

EDIT
I just performed a quick test with a 24-bit RGB tga image and here are the results:
  • 2048x2048 didn't crash ZE (12 MB)
    4096x1024 didn't crash ZE (12 MB)
    4096x2048 crashed ZE (24 MB)
    4096x4096 crashed ZE (48 MB)
The same test using a png image:
  • 4096x4096 didn't crash ZE (619 KB)
    8192x8192 didn't crash ZE (3.82 MB)
I believe the crashing is due to file size rather than the number of pixels. I'd say images larger than 12 MB in file size will crash ZE based on these test results.
User avatar
Tears2Roses
Chief Warrant Officer
Chief Warrant Officer
Posts: 336
Joined: Thu Jul 07, 2011 9:20 am
Projects :: Oh some random stuff who knows
Games I'm Playing :: SWBF2
xbox live or psn: PC beats xbox.

Re: BF2 Limitations (FAQ)

Post by Tears2Roses »

A unit can not have a secondary weapon and no primary weapon. For instance, in all_inf_default_rifleman

Code: Select all

 WEAPONSECTION = 1
WeaponName     = "all_weap_inf_timebomb"
WeaponAmmo     = 0
WeaponChannel = 1 

That crashed the map, while this:

Code: Select all

WEAPONSECTION = 1
WeaponName     = "all_weap_inf_rifle"
WeaponAmmo     = 0

WEAPONSECTION = 2
WeaponName     = "all_weap_inf_timebomb"
WeaponAmmo     = 0
WeaponChannel = 1 
Did not. There will be no errors when the map crashes.
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: BF2 Limitations (FAQ)

Post by Teancum »

Correct. However if you're looking for a workaround you can equip com_weap_null.odf in the primary slot
User avatar
Nedarb7
Lieutenant General
Lieutenant General
Posts: 676
Joined: Sat Sep 22, 2012 3:41 pm

Re: BF2 Limitations (FAQ)

Post by Nedarb7 »

I was planning on making a more detailed skeleton (which included tentacles as well) for Ahsoka and I ran into another limitation.
You can have up to 30 bones + the bone root and dummy root (dummy root must be keyed). This also applies to tentacle bones included within the unit's skeleton. That means you can't have any more than 7 tentacle bones included in the unit's skeleton (if you are using a human skeleton that is: 23 bones by default). However, this limitation does not apply to tentacle bones in addon geometry (wookiee warrior's hair, for example, has 20 tentacle bones)
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3284
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: BF2 Limitations (FAQ)

Post by AceMastermind »

The unit template has 22 bones, 24 if you count dummyroot and bone_root, if 30 is the max that would leave 6 for tentacles. This means Aayla Secura (rep_inf_aaylasecura.msh) is an example of the max when tentacles are exported with the unit.
Thirty bones seems low though, did you get any errors when compiling, or did it just crash the game?
User avatar
Nedarb7
Lieutenant General
Lieutenant General
Posts: 676
Joined: Sat Sep 22, 2012 3:41 pm

Re: BF2 Limitations (FAQ)

Post by Nedarb7 »

I wasn't clear, but this includes all keyed objects (so hard points too, hence I came up with 23, as I included hp_weapons). And as I said the limit is 32. General Grievous is an example of a unit using the max number of keyed objects. The game crashes if you go over this number, for units at least.

(23 [including hp_weapons] + 2 [bone root and dummy root] + 7 [extras])

(final edit)
Lastly I feel like this is along the same lines of the tentacle limit, where the limit was set just as high as it needed to be for the stock game. No more and no less.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: BF2 Limitations (FAQ)

Post by Marth8880 »

Having more than 26 doors in a map will cause the game to freeze and eventually crash during loading.
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3284
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: BF2 Limitations (FAQ)

Post by AceMastermind »

Its not really about the doors, but that you hit the animation memory limit, animated textures from material flags also pull from the alotted amount you can have as we found out when converting Sereja's Otoh Gunga.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: BF2 Limitations (FAQ)

Post by Maveritchell »

Marth8880 wrote:Having more than 26 doors in a map will cause the game to freeze and eventually crash during loading.
One way to get around this issue would be to animate parallel (or nearby) doors with the same animation. I ran out of animation memory on my Corellia railway (Coronet Rail) map, which is why you'll notice the doors animate in pairs rather than individually.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: BF2 Limitations (FAQ)

Post by Marth8880 »

Indentation characters (tabs) cannot be used within the entered value of a VOSound parameter in an ODF. Spaces must be used instead. Using tabs will result in the VOSound not working, and it will cause the following type of error to be printed:

Code: Select all

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(196)
unknown VO type: AdrenalineLow
Example with whitespace characters shown in Notepad++ (pay no mind to the black "CRLF" characters at the end of each line, those just designate the line breaks):

Image

The first line uses spaces to separate ssv_chatter_Jack_Target_Right and AcquiredTarget, whereas the second line uses tabs to separate ssv_chatter_Jack_Target_Husk and AcquiredTarget. The first line would be acceptable, and the second line would be unacceptable.

I'm not sure if the AI hook modifiers (e.g., +Right, +VOUnitNum031; see more here) have anything to do with it, but it'd be best practice to simply not use tabs with VOSound parameters at all (other than in VOSound = ", of course).

__________________________________________________________________________


Every sound bank file (*.asfx and *.sfx files) that is loaded into memory (through ReadDataFile()) must have a unique name. Loading two sound bank files of the same name will result in only the first one being loaded.

For example, say you have two LVL files: SFL_Jack_Weapons.lvl and SFL_Jack_VO.lvl. SFL_Jack_Weapons.lvl contains a sound bank file called heroJack_bnk.asfx, which references a bunch of weapon sounds, and SFL_Jack_VO.lvl contains *another* sound bank file called heroJack_bnk.asfx, which references a bunch of VO sounds (like pain/death chatter). In your world's mission script, SFL_Jack_Weapons.lvl is loaded near the beginning of ScriptInit(), and SFL_Jack_VO.lvl is loaded near the end of ScriptInit(). When you go in-game to test out the sounds, you find that the sounds from SFL_Jack_Weapons.lvl are working, but the sounds from SFL_Jack_VO.lvl are *not* working. The reason why is because even though the two sound bank files were stored in separate LVL files, they shared the same name (heroJack_bnk.asfx), so the sound bank that was loaded *first* (the one in SFL_Jack_Weapons.lvl) was accepted by the engine, and the other one (in SFL_Jack_VO.lvl) was ignored.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Hard coded values

Post by Maveritchell »

Maveritchell wrote:Oh, and I remembered a limit I came across making Spira (this should be directly applicable to you if you're making an RPG map): You can have a maximum of 70 regions in a map (all layers being loaded in one instance, so for example if a map loads the base layer and the conquest layer the regiontotal in both combined cannot exceed 70). This same idea (that limits apply to the total of all the layers being loaded into any given map instance) probably holds true for objects and everything else.
A quick update: This isn't entirely accurate. The limit seems to be on active regions (regions activated with ActivateRegion) and it looks like it's 64, not 70.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: BF2 Limitations (FAQ)

Post by Marth8880 »

^Yep, just took a look at stock Polis Massa and it has 127 regions loaded in Conquest alone. Not gonna lie, this "revelation" is a HUGE relief for me for SWBF2 map design haha
SkinnyODST
Lieutenant Colonel
Lieutenant Colonel
Posts: 545
Joined: Mon Jul 04, 2016 10:56 pm
Location: My other account
Contact:

Re: BF2 Limitations (FAQ)

Post by SkinnyODST »

I`ve always wondered, I see prone a lot when looking through coding and when doing some scripting and stuff. Is prone in the game? But just not used?
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

Re: BF2 Limitations (FAQ)

Post by AnthonyBF2 »

MasterSaitek009 wrote:I thought that it would be nice to have all of the hard coded values for BF2 in one place.

Updated List:
  • Prone does not work in SWBF2
Post any more that you know of.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: BF2 Limitations (FAQ)

Post by Marth8880 »

Sound LVL files containing soundspace data must be loaded before world LVL files that contain soundspace regions. Otherwise, your soundspaces won't work and you'll get errors like this:

Code: Select all

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LoadUtil.cpp(1329)
CreateRegion('soundspace sp_hangar' [061e1bb5], type [70c67e32]) failed
To clarify, this would be the right way of doing it:

Code: Select all

ReadDataFile("dc:sound\\ABC.lvl;ABCcw")
...
ReadDataFile("dc:ABC\\ABC.lvl", "ABC_conquest")
And this would be the wrong way of doing it:

Code: Select all

ReadDataFile("dc:ABC\\ABC.lvl", "ABC_conquest")
...
ReadDataFile("dc:sound\\ABC.lvl;ABCcw")
correctmushroom2013
Second Lance Corporal
Second Lance Corporal
Posts: 102
Joined: Fri Jul 19, 2013 11:10 am
Projects :: Droid Factory Conquest
Games I'm Playing :: SWBF2 BDO
xbox live or psn: No gamertag set
Location: Russian Federation

Re: BF2 Limitations (FAQ)

Post by correctmushroom2013 »

Sometime ago I had a crash of my map because of it has a lot of simple prop objects. I think what this is another limitation, of course idk how many objects can have a map. Any way to count them in ZE or somewhere... somehow...? :cpu: :)
Post Reply