Page 1 of 1

[Code]ObjectTemplates created multiple times

Posted: 2015-06-12 09:42
by Senshi
I'm still working on vehicle parsing BF2 stuff every now and then, and my tool generated a couple of notes for PR's vehicles:

Code: Select all

WARNING: Object gb_jet_eurofighter_sp_frontgear_taxi_RotationalBundle is defined multiple times.
WARNING: Object ger_jet_eurofighter_sp_frontgear_taxi_RotationalBundle is defined multiple times.
WARNING: Object nl_jet_f35a_asf_dummysteer is defined multiple times.
WARNING: Object nl_jet_f35a_asf_taxiengine is defined multiple times.
WARNING: Object us_ahe_uh1d_Engine is defined multiple times.
WARNING: Object brdm_codriver_periscope is defined multiple times.
WARNING: Object brdm_codriver_unscoped is defined multiple times.
WARNING: Object brdm_horn_periscope is defined multiple times.
WARNING: Object brdm_horn_unscoped is defined multiple times.
WARNING: Object ch_ifv_type86_LDrivewheel is defined multiple times.
WARNING: Object ch_ifv_type86_Lwheel_01 is defined multiple times.
WARNING: Object ch_ifv_type86_RDrivewheel is defined multiple times.
WARNING: Object ch_ifv_type86_Rwheel_01 is defined multiple times.
WARNING: Object ru_apc_bmp2_LDrivewheel is defined multiple times.
WARNING: Object ru_apc_bmp2_Lwheel_01 is defined multiple times.
WARNING: Object ru_apc_bmp2_RDrivewheel is defined multiple times.
WARNING: Object ru_apc_bmp2_Rwheel_01 is defined multiple times.
WARNING: Object ru_ifv_bmp3_Pass5 is defined multiple times.
WARNING: Object ru_ifv_bmp3_Pass6 is defined multiple times.
WARNING: Object us_apc_stryker_smoke is defined multiple times.
WARNING: Object us_apc_stryker_mk19_smoke is defined multiple times.
WARNING: Object us_jep_hmmwv_crows_Gunner is defined multiple times.
All those objects have multiple instances of "ObjectTemplate.create" in the vehicles' files (usually once in the .con, and once in the .tweak).
I'm not 100% sure how BF2 reacts to this, but I always was under the impression that templates should only be created once, and subsequent creates will overwrite the existing one. That being the whole reason for .activeSafe being used to edit existing templates.

Just thought I'd give a note. None of those cause really critical issues right now AFAIK, but they could also easily be cleaned up.

Re: [Code]ObjectTemplates created multiple times

Posted: 2015-06-12 10:00
by Senshi
Another set of issues:

Code: Select all

INFO: The following file was referenced by an 'include' call, but does not exist:
mods\pr_edit\objects\vehicles\land\ch_ifv_type86_bf2\../../../../weapons/common/deviation.con

INFO: The following file was referenced by an 'include' call, but does not exist:
mods\pr_edit\objects\vehicles\land\ch_ifv_wz551b\ch_ifv_wz551_30mmturret\../../../weapons/common/recoil.con

INFO: The following file was referenced by an 'include' call, but does not exist:
mods\pr_edit\objects\vehicles\land\ch_ifv_wz551b\ch_ifv_wz551_30mmturret\../../../weapons/common/deviation.con

INFO: The following file was referenced by an 'include' call, but does not exist:
mods\pr_edit\objects\vehicles\land\us_tnk_m48a1\../../../../weapons/common/recoil.con

INFO: The following file was referenced by an 'include' call, but does not exist: 
mods\pr_edit\objects\vehicles\land\us_tnk_m48a1\../../../../weapons/common/deviation.con

INFO: The following file was referenced by an 'include' call, but does not exist: 
mods\pr_edit\objects\vehicles\land\us_tnk_m67\../../common/recoil.con

INFO: The following file was referenced by an 'include' call, but does not exist: 
mods\pr_edit\objects\vehicles\land\us_tnk_m67\../../common/deviation.con
These mean that either in the .con or .tweak of the vehicle, there's an "include" call to a file that does not exist at the given path. This might or might not be a problem.

Re: [Code]ObjectTemplates created multiple times

Posted: 2015-06-12 10:09
by Mats391
Thanks for the reports.
The includes that find nothing will just be ignored, but still easy to fix and needed fix to get deviation etc working. I see some spaces in the names, is that from your parsing or in the bf2 code? Not sure what happens with the duplicate definitions, will sort those out anyway

Re: [Code]ObjectTemplates created multiple times

Posted: 2015-06-12 10:15
by Senshi
Those spaces are caused by vBulletin. They don't appear in edit view of the post.
Probably thinks it's a HTTP link it has to destroy or something :D . Changed it from quote to code, that seems to fix it.


The includes usually just lack another level of "/.." to fix them, probably caused by some of the objects being ordered into subfolders without updating these references.