Question about Object Parents

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
Benoz
Corporal
Corporal
Posts: 142
Joined: Tue May 28, 2013 12:34 pm
Projects :: Clone Wars Era Mod Version 2
Games I'm Playing :: OldFront - EAFront
xbox live or psn: No gamertag set
Location: Germany

Question about Object Parents

Post by Benoz »

Hey Community,

I have some questions about the Object odf's and their parent files.
I have a huge rep side folder (almost over 1 GB) and I stored a few camera variables in some troopers odf files.
Now I created a new side that should store all camera variables for the rep side so I can easily change it.
I created a side called "view" and also created some objects with this code:

Code: Select all

[GameObjectClass]
// This object only controls the Camera View
ClassParent             	= "com_inf_default"

[Properties]
CAMERASECTION       	= "STAND"
EyePointOffset      	= "0.0 1.8 0.0"
TrackCenter         	= "0.0 1.8 0.0
TrackOffset         	= "0.3 -0.1 3.0"
TiltValue           	= "10.0"
...
As you see the parent of this object is "com_inf_default" (the same as it used to be in some rep objects)
Now I changed the parent of "rep_in_default" from com_inf_default to view_inf_default (refering to the object in the view folder)
But when I tested it, the game crashes.

Is it even possible to make something like that? To store variables of sides via different parents in other side folders?
I did this because my rep side foler is about 1 GB and the view folder would be just 1 MB large. I want to make patches for my mod this way and so the downlaod file is not that large.

Thanks to you guys in advance
-
The66Order66
thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

Re: Question about Object Parents

Post by thelegend »

I think it should work. Depends on which side is being loaded first. Inside your .lua make sure that your view side is loaded before all the other side .lvl's. Especially before rep.lvl is loaded/read.
User avatar
Benoz
Corporal
Corporal
Posts: 142
Joined: Tue May 28, 2013 12:34 pm
Projects :: Clone Wars Era Mod Version 2
Games I'm Playing :: OldFront - EAFront
xbox live or psn: No gamertag set
Location: Germany

Re: Question about Object Parents

Post by Benoz »

Ouh, I dodn't even load the view side in any lua. You mean the lua of the map?
Because the common side is also not munged in the lua.

EDIT: I try now to move the view odfs into the common side folder.
EDIT: Doesn't work either. I want the new objects to work like an in between object of the "rep_inf_ep3_trooper" > "rep_inf_default" > "view_inf_default" > "com_inf_default".
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

Re: Question about Object Parents

Post by AnthonyBF2 »

I am pretty sure you can do the same result with SetClassProperty.

Example:

Code: Select all

SetClassProperty("rep_inf_ep3_rifleman", "CAMERASECTION", "STAND")
SetClassProperty("rep_inf_ep3_rifleman", "EyePointOffset", "0.0 1.8 0.0")
SetClassProperty("rep_inf_ep3_rifleman", "TrackCenter", "0.0 1.8 0.0")
SetClassProperty("rep_inf_ep3_rifleman", "TrackOffset", "0.3 -0.1 3.0")
SetClassProperty("rep_inf_ep3_rifleman", "TiltValue", "10.0")
That chunk of code would go in your map Lua file after ScriptPostLoad()
Repeat the chunk of code for different characters. You won't need side files/mods at all if that works out.
Post Reply