*SSM Limiting Altitude in SA342s

Ask questions, discuss ideas, get answers

Re: *SSM Limiting Altitude in SA342s

Postby tonawandares » Wed Apr 11, 2018 3:10 am

Thanks much...I'm going to keep plugging away at this.

Any thoughts on modifying worldsize?

~tona
tonawandares
 
Posts: 15
Joined: Mon Mar 26, 2018 12:51 pm

Re: *SSM Limiting Altitude in SA342s

Postby tonawandares » Wed Apr 11, 2018 4:09 am

freddy wrote:You can add physics.airDensityZeroAtHeight per map basis, or possibly for all maps if you add it in the game.rfa init.con file


would that be:

game.setphysics.airDensityZeroAtHeight (with height) (not sure how that is formatted)
tonawandares
 
Posts: 15
Joined: Mon Mar 26, 2018 12:51 pm

Re: *SSM Limiting Altitude in SA342s

Postby freddy » Thu Apr 12, 2018 7:59 am

Like this, in the gamemodes (ex Conquest) ObjectSpawnTemplates.con file
Attachments
User avatar
freddy
 
Posts: 1230
Joined: Sun Oct 18, 2009 4:58 pm

Re: *SSM Limiting Altitude in SA342s

Postby freddy » Thu Apr 12, 2018 8:08 am

tonawandares wrote:Any thoughts on modifying worldsize?

~tona

Im pretty sure that can be tricky if you want it to be a serverside mod, but otherwise there is for example some scale settings for the map where one can change the figures, ivé done it a long time ago so cant remember exactly, but i do remember it got a bit ugly when the textures was stretched out.
User avatar
freddy
 
Posts: 1230
Joined: Sun Oct 18, 2009 4:58 pm

Re: *SSM Limiting Altitude in SA342s

Postby tonawandares » Thu Apr 12, 2018 5:33 pm

freddy wrote:
tonawandares wrote:Any thoughts on modifying worldsize?

~tona

Im pretty sure that can be tricky if you want it to be a serverside mod, but otherwise there is for example some scale settings for the map where one can change the figures, ivé done it a long time ago so cant remember exactly, but i do remember it got a bit ugly when the textures was stretched out.


I might just let that thought simmer then...I'm just thinking out loud trying to resolve this pesky problem.
Thanks for the reply thought, I really appreciate the help.

~tona
tonawandares
 
Posts: 15
Joined: Mon Mar 26, 2018 12:51 pm

Re: *SSM Limiting Altitude in SA342s

Postby tonawandares » Thu Apr 12, 2018 11:35 pm

Just not having much luck at this.
I set the zero air density height at 150 meters. Sadly, I just continued to climb with no adverse effect

sigh
tonawandares
 
Posts: 15
Joined: Mon Mar 26, 2018 12:51 pm

Re: *SSM Limiting Altitude in SA342s

Postby freddy » Sun Apr 15, 2018 9:44 am

Thats weird, i guess the choppers need to be set as "ObjectTemplate.setVehicleCategory VCAir" and the engines "ObjectTemplate.setEngineType c_ETPlane"

Thats all i can think of that could be wrong

edit: you can try the code directly in the console like this
-
https://youtu.be/Wr2jwZO5REw
User avatar
freddy
 
Posts: 1230
Joined: Sun Oct 18, 2009 4:58 pm

Re: *SSM Limiting Altitude in SA342s

Postby tonawandares » Mon Apr 16, 2018 4:08 am

freddy wrote:Thats weird, i guess the choppers need to be set as "ObjectTemplate.setVehicleCategory VCAir" and the engines "ObjectTemplate.setEngineType c_ETPlane"

Thats all i can think of that could be wrong

edit: you can try the code directly in the console like this
-
https://youtu.be/Wr2jwZO5REw


I will give this a try. Thanks so much for your help.

~tona
tonawandares
 
Posts: 15
Joined: Mon Mar 26, 2018 12:51 pm

Re: *SSM Limiting Altitude in SA342s

Postby russ » Mon Apr 16, 2018 11:49 am

It's pretty clear how airDensityZeroAtHeight effects wings, but the effect on engine thrust is really unclear. In fact, it looks like as you get to the height, your thrust might actually be increasing. It'd be interesting to do a helicopter takeoff test, once with airDensityZeroAtHeight at 1000.0, and another with it at 0.0.

The basic math is make an acceleration vector with the object's rotation vector * gear ratio * rpm. However, the rpm value gets modified in a strange way:

rpm = rpm / 10.0 + (rpm - modifier term) * fabs(rpm - modifier term)

where modifier term is:

(air density ratio * (rotation vector · speed vector)) / noPropellerEffectAtSpeed

and air density ratio is 1.0 at altitude 0, and 0.0 at altitude airDensityZeroAtHeight.

When the modifier term is zero, you basically get rpm². And as you approach airDensityZeroAtHeight, this term will approach zero. Strangely, you can modify this term using noPropellerEffectAtSpeed. It looks like the intent of the term is to decrease the amount of thrust produced when your rotation vector and speed vector are aligned. It means you eventually reach some max speed. I think this term is why at high altitudes, planes start accelerating. The flight controls stop working at high altitude as well since lift stops working. This of course can lead to planes very quickly flying uncontrollably off the map.
russ
 
Posts: 43
Joined: Sun Oct 29, 2017 8:12 am

Re: *SSM Limiting Altitude in SA342s

Postby Swaffy » Mon Apr 16, 2018 10:30 pm

Test ran on Swaffy's Mod on map A Test Map.
Code saved in ObjectSpawnTemplates.con under Conquest.

Code tested:
game.setphysics.airDensityZeroAtHeight 10

Code tested:
game.setphysics.airDensityZeroAtHeight 0.0

Code tested:
game.setphysics.airDensityZeroAtHeight -1000

Result:
Planes flew like normal with no change in performance in all 3 tests.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Image
User avatar
Swaffy
 
Posts: 1705
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

PreviousNext

Return to 1942 Modding Discussion

Who is online

Users browsing this forum: Baidu [Spider] and 23 guests

cron