[HELP]Collision Scale

Started by Snake, July 07, 2013, 10:55:16 PM

Previous topic - Next topic
What collision scale values will allow a unit to survive a fall but die from getting hit by a car?
=AaTc= Forever

SALLY....

-Retired Modder

MATH! Or something. I have no idea how SWBF calculates how much damage to deal to a unit. This is a rough guess on my part. The following value in theory will possibly null out any damage from falling, while still having the unit take damage from the car.

0.1018329938900204

You may want to round it to just be .1018 though :P

Just so we are clear I have no idea how SWBF calculates collision damage, try that value and go from there increasing/decreasing till you have what you want.

CollisionScale  = "0.1018329938900204 0.0 0.0" ?
=AaTc= Forever

SALLY....

-Retired Modder

Just remove the two 0.0 0.0, I don't know if they do anything. (Something to test in the future, I suspect it is probably values for XYZ collision. But if it doesn't get the second two it probably just falls back to the first one.)

So use this line.

CollisionScale  = "0.1018"

July 07, 2013, 11:23:24 PM #4 Last Edit: July 07, 2013, 11:31:22 PM by Snake
Lol, well the first number made the game so mad it gave a hissy fit and crashed. I'll try the rounded one.

--Nope, still a crash.  :blink:

I'll try making them all 0.5

--Wow.. still crashed. That is the weirdest thing..
=AaTc= Forever

SALLY....

-Retired Modder

You may just try use stock jettrooper parameters:
CollisionScale = "0.0 0.0 0.0"
Beauty is, the way to perfection.

Glory to Ukraine!  :mf:

Quote from: Snake on July 07, 2013, 11:23:24 PM
Lol, well the first number made the game so mad it gave a hissy fit and crashed. I'll try the rounded one.

--Nope, still a crash.  :blink:

I'll try making them all 0.5

--Wow.. still crashed. That is the weirdest thing..
Are you sure it is the line causing the problem?

July 08, 2013, 01:18:03 AM #7 Last Edit: July 08, 2013, 01:19:51 AM by tirpider
I don't know if this will help or not, but here is every CollisionScale entry from every odf in the shipped SWBF1 assets.

The entries seem to range from -0.5 to 100.0

Some have quotes, some don't. I think the quotes are optional due to the way Lua handles variables. (I'm not positive about that.)


bes_fly_cloudcar.odf                - CollisionScale = “1.5”
geo_bldg_technounion.odf            - CollisionScale = 100.0
cis_fly_fedcoreship.odf             - CollisionScale = 100.0
geo_bldg_technounion.odf            - CollisionScale = 100.0
geo_bldg_technounion_cp.odf         - CollisionScale = 100.0
nab_bldg_fambaa_generator.odf       - CollisionScale = 100.0
nab_bldg_fambaa_shield.odf          - CollisionScale = 100.0
nab_hover_gianspeeder.odf           - CollisionScale = 1.5
nab_prop_fambaa.odf                 - CollisionScale = 100.0
tat_hover_skiff.odf                 - CollisionScale = 30.0
all_fly_moncalamari_DOME.odf        - CollisionScale = 100.0
all_fly_snowspeeder.odf             - CollisionScale = 1.5
all_fly_xwing.odf                   - CollisionScale = “1.5”
all_fly_ywing.odf                   - CollisionScale = “1.5”
all_hover_combatspeeder.odf         - CollisionScale = 1.5
all_hover_skiff.odf                 - CollisionScale = 30.0
all_walk_tauntaun.odf               - CollisionScale = “0.5 0 0”
all_weap_inf_remotedroid_ord.odf    - CollisionScale = 10.0
cis_fly_droidfighter.odf            - CollisionScale = “1.5”
cis_fly_fedlander_DOME.odf          - CollisionScale = 100.0
cis_fly_geofighter.odf              - CollisionScale = “1.5”
cis_fly_maf.odf                     - CollisionScale = “1.5”
cis_fly_technounion_DOME.odf        - CollisionScale = 0.25
cis_hover_aat.odf                   - CollisionScale = 4
cis_hover_mtt.odf                   - CollisionScale = 30.0
cis_hover_stap.odf                  - CollisionScale = 0.3
cis_tread_hailfire.odf              - CollisionScale = 1.0
cis_weap_inf_remotedroid_ord.odf    - CollisionScale = 10.0
geo_inf_geonosian.odf               - CollisionScale = “0.0 0.0 0.0”
imp_fly_destroyer_DOME.odf          - CollisionScale = 100.0
imp_fly_tiebomber.odf               - CollisionScale = 1.5
imp_fly_tiefighter.odf              - CollisionScale = 1.5
imp_fly_tiefighter_DOME.odf         - CollisionScale = 0.3
imp_hover_fightertank.odf           - CollisionScale = 1.5
imp_hover_speederbike.odf           - CollisionScale = “1.0 -0.5 0”
imp_inf_dark_trooper.odf            - CollisionScale = “0.0 0.0 0.0”
imp_inf_dark_troopersnow.odf        - CollisionScale = “0.0 0.0 0.0”
imp_weap_inf_remotedroid_ord.odf    - CollisionScale = 10.0
rep_fly_assault_DOME.odf            - CollisionScale = 100.0
rep_fly_gunship.odf                 - CollisionScale = “2.5”
rep_fly_gunship_DOME.odf            - CollisionScale = 0.25
rep_fly_jedifighter.odf             - CollisionScale = 1.5
rep_fly_jedifighter_DOME.odf        - CollisionScale = 0.25
rep_hover_fightertank.odf           - CollisionScale = 1.5
rep_hover_skiff.odf                 - CollisionScale = 30.0
rep_hover_speederbike.odf           - CollisionScale = “1.0 -0.5 0”
rep_inf_jet_trooper.odf             - CollisionScale = “0.0 0.0 0.0”
rep_weap_inf_remotedroid_ord.odf    - CollisionScale = 10.0


-edit (listing courtesy of grepWin)

Quote from: Sereja on July 07, 2013, 11:36:58 PM
You may just try use stock jettrooper parameters:
CollisionScale = "0.0 0.0 0.0"

Yes, but then they won't be killed by getting hit by a car.

Quote from: SleepKiller on July 07, 2013, 11:45:37 PM
Are you sure it is the line causing the problem?

Yeah, I got suspicious it was something else but I highly doubt it since I don't recall editing anything else. Unfortunately I'm about to go to camp (like in a few minutes) so I will have to test it again next week.

Quote from: tirpider on July 08, 2013, 01:18:03 AM
I don't know if this will help or not, but here is every CollisionScale entry from every odf in the shipped SWBF1 assets.

The entries seem to range from -0.5 to 100.0

Some have quotes, some don't. I think the quotes are optional due to the way Lua handles variables. (I'm not positive about that.)


bes_fly_cloudcar.odf                - CollisionScale = "1.5"
geo_bldg_technounion.odf            - CollisionScale = 100.0
cis_fly_fedcoreship.odf             - CollisionScale = 100.0
geo_bldg_technounion.odf            - CollisionScale = 100.0
geo_bldg_technounion_cp.odf         - CollisionScale = 100.0
nab_bldg_fambaa_generator.odf       - CollisionScale = 100.0
nab_bldg_fambaa_shield.odf          - CollisionScale = 100.0
nab_hover_gianspeeder.odf           - CollisionScale = 1.5
nab_prop_fambaa.odf                 - CollisionScale = 100.0
tat_hover_skiff.odf                 - CollisionScale = 30.0
all_fly_moncalamari_DOME.odf        - CollisionScale = 100.0
all_fly_snowspeeder.odf             - CollisionScale = 1.5
all_fly_xwing.odf                   - CollisionScale = "1.5"
all_fly_ywing.odf                   - CollisionScale = "1.5"
all_hover_combatspeeder.odf         - CollisionScale = 1.5
all_hover_skiff.odf                 - CollisionScale = 30.0
all_walk_tauntaun.odf               - CollisionScale = "0.5 0 0"
all_weap_inf_remotedroid_ord.odf    - CollisionScale = 10.0
cis_fly_droidfighter.odf            - CollisionScale = "1.5"
cis_fly_fedlander_DOME.odf          - CollisionScale = 100.0
cis_fly_geofighter.odf              - CollisionScale = "1.5"
cis_fly_maf.odf                     - CollisionScale = "1.5"
cis_fly_technounion_DOME.odf        - CollisionScale = 0.25
cis_hover_aat.odf                   - CollisionScale = 4
cis_hover_mtt.odf                   - CollisionScale = 30.0
cis_hover_stap.odf                  - CollisionScale = 0.3
cis_tread_hailfire.odf              - CollisionScale = 1.0
cis_weap_inf_remotedroid_ord.odf    - CollisionScale = 10.0
geo_inf_geonosian.odf               - CollisionScale = "0.0 0.0 0.0"
imp_fly_destroyer_DOME.odf          - CollisionScale = 100.0
imp_fly_tiebomber.odf               - CollisionScale = 1.5
imp_fly_tiefighter.odf              - CollisionScale = 1.5
imp_fly_tiefighter_DOME.odf         - CollisionScale = 0.3
imp_hover_fightertank.odf           - CollisionScale = 1.5
imp_hover_speederbike.odf           - CollisionScale = "1.0 -0.5 0"
imp_inf_dark_trooper.odf            - CollisionScale = "0.0 0.0 0.0"
imp_inf_dark_troopersnow.odf        - CollisionScale = "0.0 0.0 0.0"
imp_weap_inf_remotedroid_ord.odf    - CollisionScale = 10.0
rep_fly_assault_DOME.odf            - CollisionScale = 100.0
rep_fly_gunship.odf                 - CollisionScale = "2.5"
rep_fly_gunship_DOME.odf            - CollisionScale = 0.25
rep_fly_jedifighter.odf             - CollisionScale = 1.5
rep_fly_jedifighter_DOME.odf        - CollisionScale = 0.25
rep_hover_fightertank.odf           - CollisionScale = 1.5
rep_hover_skiff.odf                 - CollisionScale = 30.0
rep_hover_speederbike.odf           - CollisionScale = "1.0 -0.5 0"
rep_inf_jet_trooper.odf             - CollisionScale = "0.0 0.0 0.0"
rep_weap_inf_remotedroid_ord.odf    - CollisionScale = 10.0


-edit (listing courtesy of grepWin)

That's very strange.. I'll have to test these later.
=AaTc= Forever

SALLY....

-Retired Modder

Quote from: Snake on July 08, 2013, 07:22:38 AM
Yes, but then they won't be killed by getting hit by a car.
Hmm... Perhaps, you use wrong car ;):
[spoiler][/spoiler]
Beauty is, the way to perfection.

Glory to Ukraine!  :mf:

:o Someone arrest this crazy driver!

And when Sereja gets married don't be near him when he's driving to the reception.  ;)

Quote from: tirpider on July 08, 2013, 01:18:03 AM
I don't know if this will help or not, but here is every CollisionScale entry from every odf in the shipped SWBF1 assets.

The entries seem to range from -0.5 to 100.0

Some have quotes, some don't. I think the quotes are optional due to the way Lua handles variables. (I'm not positive about that.)


bes_fly_cloudcar.odf                - CollisionScale = "1.5"
geo_bldg_technounion.odf            - CollisionScale = 100.0
cis_fly_fedcoreship.odf             - CollisionScale = 100.0
geo_bldg_technounion.odf            - CollisionScale = 100.0
geo_bldg_technounion_cp.odf         - CollisionScale = 100.0
nab_bldg_fambaa_generator.odf       - CollisionScale = 100.0
nab_bldg_fambaa_shield.odf          - CollisionScale = 100.0
nab_hover_gianspeeder.odf           - CollisionScale = 1.5
nab_prop_fambaa.odf                 - CollisionScale = 100.0
tat_hover_skiff.odf                 - CollisionScale = 30.0
all_fly_moncalamari_DOME.odf        - CollisionScale = 100.0
all_fly_snowspeeder.odf             - CollisionScale = 1.5
all_fly_xwing.odf                   - CollisionScale = "1.5"
all_fly_ywing.odf                   - CollisionScale = "1.5"
all_hover_combatspeeder.odf         - CollisionScale = 1.5
all_hover_skiff.odf                 - CollisionScale = 30.0
all_walk_tauntaun.odf               - CollisionScale = "0.5 0 0"
all_weap_inf_remotedroid_ord.odf    - CollisionScale = 10.0
cis_fly_droidfighter.odf            - CollisionScale = "1.5"
cis_fly_fedlander_DOME.odf          - CollisionScale = 100.0
cis_fly_geofighter.odf              - CollisionScale = "1.5"
cis_fly_maf.odf                     - CollisionScale = "1.5"
cis_fly_technounion_DOME.odf        - CollisionScale = 0.25
cis_hover_aat.odf                   - CollisionScale = 4
cis_hover_mtt.odf                   - CollisionScale = 30.0
cis_hover_stap.odf                  - CollisionScale = 0.3
cis_tread_hailfire.odf              - CollisionScale = 1.0
cis_weap_inf_remotedroid_ord.odf    - CollisionScale = 10.0
geo_inf_geonosian.odf               - CollisionScale = "0.0 0.0 0.0"
imp_fly_destroyer_DOME.odf          - CollisionScale = 100.0
imp_fly_tiebomber.odf               - CollisionScale = 1.5
imp_fly_tiefighter.odf              - CollisionScale = 1.5
imp_fly_tiefighter_DOME.odf         - CollisionScale = 0.3
imp_hover_fightertank.odf           - CollisionScale = 1.5
imp_hover_speederbike.odf           - CollisionScale = "1.0 -0.5 0"
imp_inf_dark_trooper.odf            - CollisionScale = "0.0 0.0 0.0"
imp_inf_dark_troopersnow.odf        - CollisionScale = "0.0 0.0 0.0"
imp_weap_inf_remotedroid_ord.odf    - CollisionScale = 10.0
rep_fly_assault_DOME.odf            - CollisionScale = 100.0
rep_fly_gunship.odf                 - CollisionScale = "2.5"
rep_fly_gunship_DOME.odf            - CollisionScale = 0.25
rep_fly_jedifighter.odf             - CollisionScale = 1.5
rep_fly_jedifighter_DOME.odf        - CollisionScale = 0.25
rep_hover_fightertank.odf           - CollisionScale = 1.5
rep_hover_skiff.odf                 - CollisionScale = 30.0
rep_hover_speederbike.odf           - CollisionScale = "1.0 -0.5 0"
rep_inf_jet_trooper.odf             - CollisionScale = "0.0 0.0 0.0"
rep_weap_inf_remotedroid_ord.odf    - CollisionScale = 10.0


-edit (listing courtesy of grepWin)
I'm pretty sure it has to do with the way .class files store information. So something in quotes i.e

CollisionScale = "0.0 0.0 0.0"

Will be stored as a string and it sort of needs to be there are three arguments being used for that definition of CollisionScale. Where as something without quotes would be stored as a 32-bit float. (It might go double if it needs to, I haven't actually ever seen ODFMunge's source code.) I think it may also handle integers and the like in similar fashion.

July 08, 2013, 08:00:34 PM #12 Last Edit: July 08, 2013, 08:05:21 PM by Phobos
Quote from: SleepKiller on July 08, 2013, 07:02:08 PM
I'm pretty sure it has to do with the way .class files store information. So something in quotes i.e

CollisionScale = "0.0 0.0 0.0"

Will be stored as a string and it sort of needs to be there are three arguments being used for that definition of CollisionScale. Where as something without quotes would be stored as a 32-bit float. (It might go double if it needs to, I haven't actually ever seen ODFMunge's source code.) I think it may also handle integers and the like in similar fashion.
that is an interesting point, would missing quotes in the vehicle ODFs possibly be causing certain hover tanks to flip over when turned sharply? if values are doubled because they aren't contained in quote marks, that might help explain the cause of this mysterious bug.