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

Re: Hard coded values

Post by Aman/Pinguin »

The point where the shoots come out is hardcoded as well, it's always at the height of a jawahead.
Last edited by Aman/Pinguin on Sat Feb 16, 2008 3:44 pm, edited 1 time in total.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Hard coded values

Post by Maveritchell »

Syth wrote:Also hardcoded:
types of item dropped when unit dies
no 1st person for land vehicles
the reticle
That first one is wrong, you can tweak them. Check out the default unit .odfs.

The last two I'm fairly sure are modifiable, but I've never tried them myself.

And yeah, xwingguy was mistaken about unlimited local teams. I think that AceAzzameen5 will confirm that, too.
Syth
General
General
Posts: 784
Joined: Thu Apr 13, 2006 8:46 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: happy fun island

Re: Hard coded values

Post by Syth »

You cant add a 1st person for vehicles, i've looked into this. You can for turrets positions on the vehicles, but not the pilots position. There is no button to activate 1st person on vehicles.
I also tried to change the reticle before, theres no working odf code to change it.. but i never tried changing the geometry for the reticle in the ingame level.

There was a thread about the items dropped from units, and no one was able to change them with out a crash.. only the percentages that each one might appear.
The_Emperor
Supreme Galactic Ruler
Posts: 2118
Joined: Sat Dec 10, 2005 6:30 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Waaaaay over there.

Re: Hard coded values

Post by The_Emperor »

You can't change the default dropped items or make new ones being dropped I think, but I've seen new items in some maps in dispensors. That's different though, I know. But my point is the dead unit droppings must be hardcoded then.

I think Mav played with this so he should know the details, but I think I remembered correctly.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Hard coded values

Post by Maveritchell »

Syth wrote:You cant add a 1st person for vehicles, ive looked into this. You can for turrets positions on the vehicles, but the the pilots position. THere is no button to activate 1st person on vehicles.
I also tried to change the reticle before, theres no working odf code to change it.. but i never tried changing the geometry for the reticle in the ingame level.
I'll trust that you say that you can't add a first person, but I'm surprised to hear that the Forcemode and FirstPersonFOV .odf lines do nothing, since psych0fred's ODF parameters doc would have lead me to believe they would.

But the other two things should be able to be changed through ingame.lvl modification. They're listed in the ingame.req (here's the excerpt in which you can see both), so there's no reason why they shouldn't be modifiable with a dc:'ed ingame.lvl:
Hidden/Spoiler:
REQN
{
"model"
"all_weap_inf_thermaldetonator"
"cis_weap_inf_thermaldetonator"
"imp_weap_inf_thermaldetonator"
"rep_weap_inf_thermaldetonator"
"com_weap_inf_thermaldetonator"
"com_item_powerup_dual"
"com_weap_inf_grenadethermal"
"com_weap_inf_grenadethermal_ord"
"com_1st_weap_inf_grenadethermal"
"com_weap_inf_torpedo"
"com_1st_weap_inf_torpedo"
"com_weap_inf_medkit"
"com_weap_inf_repairkit"
"com_weap_missile"
"com_bldg_controlzone"
"com_bldg_ctfbase_redteam"
"com_bldg_ctfbase_greenteam"
"com_bldg_ctfbase"
"com_bldg_inf_defenseturret"
"com_icon_alliance"
"com_icon_imperial"
"com_icon_republic"
"com_icon_CIS"
"com_icon_swap"
"com_weap_probedroid"
"com_smallchunk1"
"com_mediumchunk1"
"com_weap_inf_landmine"
"com_weap_inf_seismic_mine"
"com_weap_inf_detpack"
"coll_drive"
"com_sfx_muzzleflash"
"com_prop_buildzone"
"shell_cube"
"com_weap_inf_binoculars"
"hud_arrow"
"hud_map_fov"
"hud_large_map_fov"
"hud_main_reticule"
"hud_main_reticule_bullseye"
"hud_main_reticule_hit"
"hud_main_reticule_outline"
"hud_main_reticule_criticalhit"
"hud_main_reticule_rocketlockon_active"
"hud_energybar_frame_front"
"hud_energybar_frame_back"
"hud_jetpackbar_frame_front"
"hud_jetpackbar_frame_back"
"hud_vehicle_seatingchart_ai_icon"
"hud_vehicle_seatingchart_empty_icon"
"hud_vehicle_seatingchart_player1_icon"
"hud_weapon_backdrop"
"hud_weapon2_backdrop"
"hud_thermaldetonator"
"hud_detpack_plunger"
"hud_vehicle_lasers"
"hud_vehicle_bombs"
"hud_vehicle_chaingun"
"hud_vehicle_guided_rocket"
"hud_vehicle_flak"
"hud_vehicle_missile"
"hud_vehicle_mortar"
"hud_vehicle_stingers"
"hud_vehicle_recoiless"
"hud_vehicle_torpedo"
"hud_vehicle_beam_cannon"
"hud_hint_backdrop"
"hud_healthbar_frame"
"hud_tooltips_frame"
"hud_infinite_ammo_icon"
"hud_lightsaber"
"hud_force_choke"
"hud_force_saberthrow"
"hud_force_pull"
"hud_force_push"
"hud_force_lightning"
"hud_poison"
"hud_rage"
"hud_rep_weap_defense_buff_icon"
"hud_health_regen"
}

REQN
{
"class"
"com_item_vehicle_spawn"
"com_item_powerup_ammo"
"com_item_powerup_health100"
"com_item_powerup_health25"
"com_item_powerup_dual"
"com_item_powerup_offense"
"com_item_powerup_defense"
"com_item_powerup_energy"
"com_item_weaponrecharge"
"com_item_weaponrecharge_unbuilt"
"com_item_hero_healthrecharge"
"com_item_healthrecharge"
"com_item_healthrecharge_unbuilt"
"com_item_flag"
"com_item_flag_all_carried"
"com_item_flag_cis_carried"
"com_item_flag_imp_carried"
"com_item_flag_rep_carried"
"com_item_null"
"com_item_holocron"
"com_item_flag_all"
"com_item_flag_cis"
"com_item_flag_imp"
"com_item_flag_rep"
"com_prop_barrier_01"
"com_weap_ord_exp"
"com_snd_amb_streaming"
"com_snd_amb_static"
"com_bldg_controlzone"
"com_bldg_controlzone_ctf"
"com_bldg_untakeable_controlzone"
"com_bldg_ctfbase_greenteam"
"com_bldg_ctfbase_redteam"
"com_bldg_ctfbase"
"com_bldg_invisible_controlzone"
"com_bldg_major_controlzone"
"com_bldg_inf_defenseturret"
"com_weap_inf_seismic_mine"
"com_prop_buildzone"
"com_weap_inf_landmine_placed"
"com_weap_inf_landmine"
"com_weap_inf_empmine"
"com_prop_barrier_02"
"com_prop_cratemd_01"
"com_prop_barrel"
"com_prop_cratelg_01"
"com_holo_trap"
"com_inv_col_8"
"com_inv_col_16"
"com_inv_col_32"
"com_inv_col_64"
"com_inf_default"
"com_weap_inf_force_lightning"
"com_weap_inf_force_pull"
"com_weap_inf_force_push"
}
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: Hard coded values

Post by Teancum »

You can't change all of the values needed to change CPs color, only most of them. They still show on the map as red/blue
EGG_GUTS
Master Bounty Hunter
Master Bounty Hunter
Posts: 1626
Joined: Thu Dec 07, 2006 7:38 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: CANADA!

Re: Hard coded values

Post by EGG_GUTS »

A Planning Hub can only have a Maximum of 8 connections connected to it.
User avatar
da_great_ghost
Corporal
Corporal
Posts: 141
Joined: Sat Feb 02, 2008 3:40 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: , Location, Location, Location

Re: Hard coded values

Post by da_great_ghost »

MasterSaitek009 wrote:
da_great_ghost wrote:In Boras II: Stunt Corse v3 Dann made the sniper have the abilty to have more than 1 auto turret at 1 time.
More than one turret out at a time? Or more than one type of auto turret for a unit class?
more than 1 turret at a time.
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: Hard coded values

Post by [RDH]Zerted »

I've been watching this topic and am not sure what to make of it. There has been (and still is) a lot of wrong info posted. Only a couble of the fixes actually have code/info posted proving that the item was wrong and none of the other listed items have proof posted as to why they are the way they are.

I would say that any item on the list should have a section showing the code/document quote/or other info that proves the item is truly hard coded to that value. If you can't post the steps to show that one above the limit doesn't work, then it shouldn't be included.

I wouldn't even consider a third of the items on the list to be hard coded values. Not to be mean, but it almost looks like people are saying random things and they are all being stuck onto a list.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Hard coded values

Post by Maveritchell »

[RDH]Zerted wrote:I've been watching this topic and am not sure what to make of it. There has been (and still is) a lot of wrong info posted. Only a couble of the fixes actually have code/info posted proving that the item was wrong and none of the other listed items have proof posted as to why they are the way they are.

I would say that any item on the list should have a section showing the code/document quote/or other info that proves the item is truly hard coded to that value. If you can't post the steps to show that one above the limit doesn't work, then it shouldn't be included.

I wouldn't even consider a third of the items on the list to be hard coded values. Not to be mean, but it almost looks like people are saying random things and they are all being stuck onto a list.
What's missing/incorrect? I know if I've mentioned something it's either from first-hand experience (i.e. I can't give you a doc that specifies that 70 regions is the max, but I know the game will crash at higher than that and there are no adjustable memorypools for it) or I've provided support from fred's docs. Most of the other postings seem to be agreed-upon limits that we've found through testing.

And yes, "hard-coded" is being thrown around sort've willy-nilly, but the gist is that the things mentioned above are ingame limits.
Syth
General
General
Posts: 784
Joined: Thu Apr 13, 2006 8:46 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: happy fun island

Re: Hard coded values

Post by Syth »

Maybe a more suitable thread name be "Not unmodifiable stuff" or something like along those lines

@ Mav -
I never really considered the forcemode line. I will test it, im not sure if i already have before though but i will just to make sure.

EDIT: I added it to the IFT-X and it didnt do anything
EDIT2: Yes it did i lied (actually i acidentley put forcemode = 1 rather 2). SO you can force 1st person in vehicles.
Last edited by Syth on Mon Feb 18, 2008 2:33 am, edited 2 times in total.
MasterSaitek009
Black Sun Slicer
Posts: 619
Joined: Wed Aug 23, 2006 4:10 pm

Re: Hard coded values

Post by MasterSaitek009 »

[RDH]Zerted wrote:I've been watching this topic and am not sure what to make of it. There has been (and still is) a lot of wrong info posted.
That would be my fault. But, that is also part of the purpose for this thread, not so much posting known limits, but instead discussing those things that might be limits. The suggestions don't have to be perfect(as we have seen by many of my posts). They just have to throw the idea out there so that more experienced people can prove or disprove it.
Alone I don't know everything about the BF2 engine, neither does anyone else. But every modder has unique info that someone else might not have. So when you add together all of our ideas and a large helping of discussion, we can all contribute to and learn from this thread.

If you do notice any wrong info please, point it out. I would be greatly appreciative.

I do agree that the name needs to change. Hardcoded values is kind of non-descript.
How does "BF2 Engine Limitations" sound?
User avatar
trainmaster611
Sith Lord
Sith Lord
Posts: 1779
Joined: Thu Aug 24, 2006 5:22 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: Building a railway to Coruscant
Contact:

Re: Hard coded values

Post by trainmaster611 »

You can't make corpses stay in the map once a unit dies
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: Hard coded values

Post by [RDH]Zerted »

There are a few ways (adding health regen, changing AI damage thresholed, etc...) to prevent taking damage while underwater, though they don't prevent the screen from flashing. However, Droidekas have
Hidden/Spoiler:
[quote]WaterDamageInterval
WaterDamageAmount
UprightWaterDamageHeight
BallWaterDamageHeight[/quote]And Walkers have[quote]WaterDamageInterval
WaterDamageAmount[/quote]I've never tested these ODF keys. Until shown otherwise, I'd assume they work.
Changes made to a unit classes via the Lua do not always require the unit to respawn inorder for those changes to take affect. I'm not going to make a video showing this, but its true.

Droidekas are a type of vehicle and have 1st person views, so vehicles can have 1st person views. In addition to that, the docs say they can too.
Hidden/Spoiler:
[quote]BF2 Controllable Objects
Controllable objects support camera views and first person models
Droid
Droideka
Flyer
Hover

RemoteTerminal
Soldier
Walker
MountedTurret
PassengerSlot[/quote]
You can have less than 9 selectable units per team. Just add less than nine units when settting up that team.

This code prints out 'To Team 0-9' before crashing. Are you sure the team limit isn't 9 (0 to 9 is 10, minus 1 for the crashing team = 9 total teams, and it might have even crashed on team 11 before the log could be updated...)?
Hidden/Spoiler:
[code]
local teamCount = 0
local unitTeamChange = OnCharacterSpawn(
function(character)
local unit = GetCharacterUnit(character)

--if the unit is spawned, move it onto a team by itself
if unit then
print("To team:", teamCount)
SetProperty(unit, "Team", teamCount)
SetProperty(unit, "PerceivedTeam", teamCount)
teamCount = teamCount + 1
end
end )

AddAIGoal(teamATT, "Deathmatch", 100)
AddAIGoal(teamDEF, "Deathmatch", 100)
[/code]
I've never used it, but weapon classes have the ODF key ReticuleTexture. Are you saything this key doesn't work or did you try changing something else?

The docs talk about editing the dropped items. I won't believe that you can't do it until someone posts the steps required to change the items and leads to the corresponding game crash.

FirstPersonFOV, ThirdPersonFOV, and ForceMode are all used on units in the FakeConsole. I've never used them on vehicles, but the docs say they work on controllable objects, support, and units (or is that support units. If so, whats the difference between weapons and support weapons?).
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Hard coded values

Post by AceMastermind »

The problem with the docs is that even though most of the info in it is accurate, there's also some info in it that may only pertain to the Xbox/PS2 or is just inaccurate/misprinted maybe?, the tentacle setup info in the BF2_Jedi_Creation.doc is 1 example of this.

Doc says:
The artist needs to include bones named bone_string1 through bone_string# (maximum is 45)

however we have found that naming the bone strings to:
bone_string1
will not work, it must be:
bone_string_1

Also the docs say the max bone strings is 45, but we have since found that the PC will not support that many, it looks like the PC will only support 20.

Doc says:
Note that the max tentacles is 9, and the max bones is 5.

but I have found through testing that only 4 tentacles will work.
5 tentacles with 4 bones each will not work
4 tentacles with 5 bones each will work

I guess what i'm saying is we really don't know what info in the docs is meant for the PC or the other platforms until everything's been tried and tested.
User avatar
SBF_Dann_Boeing
Groove Walrus
Groove Walrus
Posts: 1529
Joined: Wed Aug 31, 2005 11:33 pm
xbox live or psn: No gamertag set
Location: An Igloo High Upon a Mountain Top

Re: Hard coded values

Post by SBF_Dann_Boeing »

[*]You can only have(What number exactly?) object's in (is it all of the layers added together or just the ones loaded in the Lua?)
This varies depending on the types of objects you have added. Certain objects take up very little listpool memory (like rhen var: citadel walls/floors/etc) and can be added in great numbers. Other objects that are much more detailed take up more, and ones that have attached properties to them take up twice as much (especially cps, which is one of the reasons the CP max is 16). Adding the same object multiple times can also cause problems. But roughly, the max amount of objects would probably be somewhere in the hundreds
[*]Only one auto-turret type weapon per unit.
You can have as many as you want really. This goes for mines, and any dispensable object as well. You define this in the dispenser weapon's main weapon ODF with the function: MaxItems = 4.0 or however many you want.
[*]There are only two weapon channels. Primary and secondary.
WeaponChannel = 0 is primary (only needed if its overwriting something in a Parent odf), WeaponChannel = 1 is secondary.
[*]Each unit can have up to eight weapons. Four primary and four secondary.
It is true you can have 8 weapons total, but you can have as many as 8 primary weapons (8 primary and 0 secondary) and as many as 7 secondary weapons (1 primary, 7 secondary). This includes award weapons.
[*]The grappling hook doesn't work in BF2.
I thought somebody got that to work..
[*]Nine selectable units per team.
All mode Objective types (ObjectiveConquest, etc) but ObjectiveTDM can only have 6 units (7 counting heros if they are enabled) per team. ObjectiveTDM can have 9 per team with AddUnitClass.
[*]You can have a maximum of 16 Command Posts + plus Command Vehicles.
Command Vehicles count towards the 16 CPS, not in addition
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Hard coded values

Post by Maveritchell »

SBF_Dann_Boeing wrote:
[1]Only one auto-turret type weapon per unit.
You can have as many as you want really. This goes for mines, and any dispensable object as well. You define this in the dispenser weapon's main weapon ODF with the function: MaxItems = 4.0 or however many you want.
[2]There are only two weapon channels. Primary and secondary.
WeaponChannel = 0 is primary (only needed if its overwriting something in a Parent odf), WeaponChannel = 1 is secondary.
[3]Each unit can have up to eight weapons. Four primary and four secondary.
It is true you can have 8 weapons total, but you can have as many as 8 primary weapons (8 primary and 0 secondary) and as many as 7 secondary weapons (1 primary, 7 secondary). This includes award weapons.
[4]The grappling hook doesn't work in BF2.
I thought somebody got that to work..
[5]Nine selectable units per team.
All mode Objective types (ObjectiveConquest, etc) but ObjectiveTDM can only have 6 units (7 counting heros if they are enabled) per team. ObjectiveTDM can have 9 per team with AddUnitClass.
[6]You can have a maximum of 16 Command Posts + plus Command Vehicles.
Command Vehicles count towards the 16 CPS, not in addition
1) He wasn't referring to number present on the field, he means distinct types.
4) No one's gotten this to work.
5) You can have up to nine distinct units per team in any gamemode.
6) That's what he was saying: 16 (Command Posts + Command Vehicles).
MasterSaitek009
Black Sun Slicer
Posts: 619
Joined: Wed Aug 23, 2006 4:10 pm

Re: Hard coded values

Post by MasterSaitek009 »

Correct. :yes:
Thanks for clarifying Mav'!
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: BF2 Limitations

Post by [RDH]Zerted »

MasterSaitek009 wrote:[*]Changes made to a units non-instance property via Lua(SetProperty) only take effect after the unit respawns.
[*]Maximum of eight teams total, including the regular ATT and DEF team 1 and 2.
You mean SetClassProperty(). SetProperty effects objects, and a respawning causes a deletion/creationg of a new object meaning that it no longer has the changed property. However, I would have written that line more like 'Some SetClassProperty() changes only take effect after a respawn'. I think saying 'non-instance property' makes it seem more confusing then it really is.

The code I posted earlier shows that at least 9 teams are possible (people are forgetting about the always existing team 0).
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

Post by Teancum »

Oh, I thought of one! Flyers cannot strafe. No matter what settings you use, they will not strafe. Psych0fred told me one time early on in the Convo Pack's development that the code was broken when writing the code to make flyers roll.
Post Reply