Page 1 of 1
ODF questions
Posted: Fri Aug 26, 2016 11:53 pm
by SkinnyODST
Just 2 short questions,
1. What is a ClassLabel and what does it do?
2. What is a ClassParent and what does IT do?
I`m altering how weapons fire and am running into some problems. I figured that actually knowing what these 2 things are and do would help.
Thanks.
Re: ODF questions
Posted: Sat Aug 27, 2016 12:04 am
by AnthonyBF2
ClassLabel is the type of something. This can be a prop (solid object that does nothing) to a ton of other things like destructablebuilding (something that can be destroyed) to hover (a type of vehicle class)
ClassParent is usually for playable entities such as characters or weapons. This means it will get default values from something else rather than using it's own values. In the REP folder, you can look at something like rep_weap_inf_rocket_launcher_ord.odf and see that it's almost empty, and that the class parent leads to com_weap_inf_rocket_launcher_ord.odf in the common side odf section, which will have a lot of data to run how rockets work. Most weapon odf files lead to a class parent, that's why most weapons in the game perform the same. When a direct item like rep_weap_inf_rifle.odf has it's own values, it will not look for values from the common class parent. The primary blaster for each main side uses it's own shot delay values, you can see them in each weapon odf file instead of using the common one.
Another good example are the heroes. You can see that all three of the shooter heroes on the rebels side (Han, Leia, Chewie) lead to com_hero_default which gives those heroes most of their base values. All jedi class heroes lead to com_jedi_default which is why most heroes have the same energy, jumps, speeds, etc. If you wanted each character to perform differently, you'd pick which values you want to change and put them on the direct character/weapon odf.
Re: ODF questions
Posted: Sat Aug 27, 2016 12:55 am
by SkinnyODST
Amazing description! Thanks mate

Re: ODF questions
Posted: Sat Aug 27, 2016 4:41 am
by Anakin
Do you know program languages?? ClassLable is the type, and classParent is what you inherit.