Shield drag
-
For those not following TLR (or monitoring my site), there was a request wondering if shields could have linear_drag. The result is Shield Drag. I don’t know if it really changes handling in general (there was one part I didn’t change and the original requestor has yet to do anything), but it does at least affect your top speed. Negative values work as expected, so different shields could be used to either slow down or speed up the ship. Since the linear drag calculation only worked on the first engine, I followed suit and only used the first shield.
-
adoxa wrote:
… Since the linear drag calculation only worked on the first engine, I followed suit and only used the first shield.Great work - once more.
To be sure:
You are talking about HpShield01? -
The first shield, whichever hardpoint it should happen to be on. At least, I expect that’s what happens (the function is called FindFirstEquipment, so I expect if you have an unused HpShield01, it would still find the shield on HpShield02; but if you’ve got both, presumably 01 will be the one used).
-
adoxa wrote:
The first shield, whichever hardpoint it should happen to be on. At least, I expect that’s what happens (the function is called FindFirstEquipment, so I expect if you have an unused HpShield01, it would still find the shield on HpShield02; but if you’ve got both, presumably 01 will be the one used).… so I could imagine quite a few thinks,
……
shield_link = pi_fighter_shield01, HpMount, Hpxx01, Hpxx02, Hpxx03, Hpxx04, HpShield01
hp_type = hp_fighter_shield_special_2, HpShield01
hp_type = hp_fighter_shield_generator, Hpxx01, Hpxx02, Hpxx03, Hpxx04
…which could be seen as 1st shield I ask.
But testing a bit will show.
TheDvDMan wrote:
Is it even logic that shields have an effect on the handling? It will be better to armor/cargo extensions.This - at least - gives the possibility, to have one more special kind of upgrade.
Maybe call it ‘inertial damper’.
Besides logic might not be THE striking argument discussing features of a fictional game.
-
The same technique could be applied to armor and cargo pods. Should pods also just use the first, or apply to all? For that matter, should I accumulate the drag for all the engines and shields? Anything else you want? Might just be easier to add it to any equipment and accumulate them all.
-
Hell yeah… stack em Adoxa im sure us modders can balance a few drag params out if we have to… and im sure we’ll have to … hehe
as always… dam fine
-
How about the mass from the cargo being carried? That would add a new twist of transporting say farm equipment, the mass would get added to the ships total mass. It would make it so small items such as diamonds wouldnt affect your ship handling. From my own experiments using mass it makes the Newtonians physics much more noticeable once it hits around 500.
-
-
[d]Like this idea alot. Just one question. does it work with negative values ?[/d] With a little infocard editing the Sheildmount could be named a “Weight Reduction Kit” or something like and improves the speed of the ship. hhmmm, lots of possibilities.
Ice
Edit - open your eyes Iceman, it says it in the first post :roll:
-
which brings me to another thought (thanks):
rather than linear_drag, what about the mass value of equipment and cargo to be added to the ship’s mass? guess that would be even better, as the max speed in space is not depending on how much you carry but the acceleration and deceleration speeds are. any way, adoxa? no hurry though xD -
LancerSolurus wrote:
How about the mass from the cargo being carried? That would add a new twist of transporting say farm equipment, the mass would get added to the ships total mass. It would make it so small items such as diamonds wouldnt affect your ship handling. From my own experiments using mass it makes the Newtonians physics much more noticeable once it hits around 500.This.
Weight reduction kit should result in a thinning of the armor of a vessel (not related to what LS said, what someone else said)
However, making the mass of objects cumulative offers much more flexibility. You want better weapons? The offset is cost. You want more power, bigger shield generators, etc? You want to carry lots of missiles to minimise energy drain from having high powered weapons - if they added mass (can do the volume) this again offers more flexibility.
The trade offs between adding equipment and making your ship more powerful but slower and with worse handling vs having a lighter craft which has lower everything but can run circles around you. Offers balance between ships classes.
-
Should have just left it on TLR…
Okay, rather than adding linear_drag to individual objects, I’ll just add it to the root, for all objects. Then I could modify the linear drag calculation to run through all equipment, not just the first engine (and shield). Likewise, when it gets the mass of the ship, I’ll add in the mass of all the equipment & cargo. Since mass is already part of every object, and its default is 100, I was thinking I might treat 100 as 0, in case changing the default might have consequences elsewhere.
-
adoxa wrote:
Should have just left it on TLR…Okay, rather than adding linear_drag to individual objects, I’ll just add it to the root, for all objects. Then I could modify the linear drag calculation to run through all equipment, not just the first engine (and shield). Likewise, when it gets the mass of the ship, I’ll add in the mass of all the equipment & cargo. Since mass is already part of every object, and its default is 100, I was thinking I might treat 100 as 0, in case changing the default might have consequences elsewhere.
Sorry - think it’s a case of something different appears, and everyone has their own take / view on what could/should/would be great for their personal taste
In the end, I’m not really making any mods, so my POV is irrelevant
-
I also think it a shame to satisfy everyone’s whims, adoxa, when it may not be used by many.
I know you are being kind and are genuinely interested in solving some of these requests - but for a real challenge and satisfying many more modders, how about our Sur generator or exporter plugin for MilkShape?
Or better still a set of importers and exporters for 3DS Max?!
-
I have problems to get shielddrag to work.
I added shielddrag.dll to dacom.ini & dacomsrv.ini, added a linear_drag = <drag>value to [ShieldGenerator] section.
Also common.dll should be 1.1 cause other dll´s require them too.
Reshacker shows :
FILEVERSION 1,0,1254,11
PRODUCTVERSION 1,0,1254,11As you can see from the code below, impulse speed should be 72000/599 = 120, with shield mounted it should be 72000/(599+160) = 95
Any help or suggestions appreciated.
dacom.ini [Libraries] ... ShieldDrag.dll ...
dacomsrv.ini [Libraries] ... ShieldDrag.dll ...
shiparch.ini (too see how i did the shields) ... [Ship] ids_name = 466656 ids_info = 459669 ids_info1 = 459671 ids_info2 = 66608 ids_info3 = 459670 ship_class = 1 hp_mount_group = default_and_heavy dock_group = heavy nickname = unicornz msg_id_prefix = gcs_refer_shiparch_pirf mission_property = can_use_berths LODranges = 0, 5000 type = FIGHTER DA_archetype = Ships\unicornz\unicornz.cmp material_library = Ships\unicornz\unicornz.mat material_library = fx\envmapbasic.mat envmap_material = envmapbasic fuse = intermed_damage_smallship01, 0.000000, 550 fuse = intermed_damage_smallship02, 0.000000, 275 fuse = intermed_damage_smallship03, 0.000000, 183 max_bank_angle = 75 camera_offset = 12, 44 camera_angular_acceleration = 0.060000 camera_horizontal_turn_angle = 20 camera_vertical_turn_up_angle = 10 camera_vertical_turn_down_angle = 20 camera_turn_look_ahead_slerp_amount = 1.000000 nanobot_limit = 60 shield_battery_limit = 60 hold_size = 40 hit_pts = 81000 cockpit = ships\unicornz\unicornz.ini ;pilot_mesh = generic_pilot mass = 150.000000 linear_drag = 1 explosion_arch = explosion_li_fighter surface_hit_effects = 0, small_hull_hit_light01, small_hull_hit_light02, small_hull_hit_light03 surface_hit_effects = 150, small_hull_hit_medium01, small_hull_hit_medium02, small_hull_hit_medium03 surface_hit_effects = 300, small_hull_hit_heavy01, small_hull_hit_heavy02, small_hull_hit_heavy03 steering_torque = 16700, 16700, 16700 angular_drag = 10000, 10000, 10000 rotation_inertia = 1000, 1000, 1000 nudge_force = 30000.000000 strafe_force = 20000 strafe_power_usage = 2 num_exhaust_nozzles = 2 HP_tractor_source = HpTractor_Source shield_link = l_elite_shield01, HpMount, HpShield01, HpEngine01, HpLic, Hppu, Hppc, Hpxx, HpCloak01 hp_type = hp_freighter_shield_special_1, HpLic hp_type = hp_freighter_shield_special_3, Hppu hp_type = hp_freighter_shield_special_4, Hppc hp_type = hp_freighter_shield_special_5, Hpxx hp_type = hp_gun_special_10, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06, HpWeapon07, HpWeapon08, HpWeapon09, HpWeapon10 hp_type = hp_gun_special_9, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06, HpWeapon07, HpWeapon08, HpWeapon09, HpWeapon10 hp_type = hp_gun_special_8, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06, HpWeapon07, HpWeapon08, HpWeapon09, HpWeapon10 hp_type = hp_gun_special_7, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06, HpWeapon07, HpWeapon08, HpWeapon09, HpWeapon10 hp_type = hp_gun_special_6, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06, HpWeapon07, HpWeapon08, HpWeapon09, HpWeapon10 hp_type = hp_gun_special_5, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06, HpWeapon07, HpWeapon08, HpWeapon09, HpWeapon10 hp_type = hp_gun_special_4, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06, HpWeapon07, HpWeapon08, HpWeapon09, HpWeapon10 hp_type = hp_gun_special_3, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06, HpWeapon07, HpWeapon08, HpWeapon09, HpWeapon10 hp_type = hp_gun_special_2, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06, HpWeapon07, HpWeapon08, HpWeapon09, HpWeapon10 hp_type = hp_gun_special_1, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06, HpWeapon07, HpWeapon08, HpWeapon09, HpWeapon10 hp_type = hp_elite_shield_special_10, HpShield01 hp_type = hp_elite_shield_special_9, HpShield01 hp_type = hp_elite_shield_special_8, HpShield01 hp_type = hp_elite_shield_special_7, HpShield01 hp_type = hp_elite_shield_special_6, HpShield01 hp_type = hp_elite_shield_special_5, HpShield01 hp_type = hp_elite_shield_special_4, HpShield01 hp_type = hp_elite_shield_special_3, HpShield01 hp_type = hp_elite_shield_special_2, HpShield01 hp_type = hp_elite_shield_special_1, HpShield01 ;hp_type = hp_fighter_shield_special_1, HpCloak01 hp_type = hp_thruster, HpThruster01, HpThruster02 hp_type = hp_mine_dropper, HpMine01 hp_type = hp_countermeasure_dropper, HpCM01 hp_type = hp_torpedo_special_1, HpTorpedo01, HpTorpedo02 hp_type = hp_torpedo_special_2, HpTorpedo01, HpTorpedo02 ...
engine_equip.ini ... [Engine] nickname = Razor_engine ids_name = 459021 ids_info = 1 mass = 10 max_force = 72000 linear_drag = 599 power_usage = 0 reverse_fraction = 0.200000 flame_effect = gf_co_smallengine01_fire trail_effect = gf_co_smallengine01_trail trail_effect_player = gf_co_smallengine01_playtrail cruise_charge_time = 5 cruise_power_usage = 20 character_start_sound = engine_pi_fighter_start character_loop_sound = engine_pi_fighter_loop character_pitch_range = -50, 25 rumble_sound = rumble_pi_fighter rumble_atten_range = -5, 0 rumble_pitch_range = -25, 25 engine_kill_sound = engine_pi_fighter_kill cruise_start_sound = engine_bw_cruise_start cruise_loop_sound = engine_bw_cruise_loop cruise_stop_sound = engine_bw_cruise_stop cruise_disrupt_sound = cruise_disrupt cruise_backfire_sound = cruise_backfire indestructible = false outside_cone_attenuation = -3 inside_sound_cone = 60 outside_sound_cone = 400 max_cruise_speed = 900 ...
st_equip.ini ... [ShieldGenerator] nickname = Sappara_hf ids_name = 460233 ids_info = 459470 DA_archetype = equipment\models\st\li_refractor_shield.3db material_library = equipment\models\li_equip.mat HP_child = HpConnect hit_pts = 92000 explosion_resistance = 0.800000 debris_type = debris_normal parent_impulse = 20 child_impulse = 80 volume = 0.000000 mass = 20 regeneration_rate = 1270 max_capacity = 248538.829688 toughness = 111 hp_type = hp_elite_shield_special_10 offline_rebuild_time = 5 offline_threshold = 0.150000 constant_power_draw = 8 rebuild_power_draw = 8 shield_type = S_impervious shield_collapse_sound = shield_offline shield_rebuilt_sound = shield_rebuilt shield_hit_effects = 0, gf_pi_shield01 shield_hit_effects = 100, gf_pi_shield02 shield_hit_effects = 500, gf_pi_shield03 separation_explosion = sever_debris LODranges = 0, 20 lootable = true linear_drag = 160 ... ```</drag>
-
adoxa wrote:
Only the first shield applies, which I guess doesn’t have linear drag. You’ll have to wait for the enhanced version, which will work with all external equipment.Thx for quick reply Adoxa. If i have to wait, fine, nps.
Just thought above configuration shows that it´s the 1st shield and that it´s mounted on HpShield01. What am i missing here ?
-
adoxa wrote:
hp_type = hp_freighter_shield_special_1, HpLic hp_type = hp_freighter_shield_special_3, Hppu hp_type = hp_freighter_shield_special_4, Hppc hp_type = hp_freighter_shield_special_5, Hpxx ```These are also [ShieldGenerators], no?
Correct, these are additional tweaked ShieldGenerators to mount License, shieldcap(additional max_capacity), power_cell(negative rebuild_power_draw), power_generator(negative constant_power_draw)
The Ships Shield is mounted on HpShield01 and linked via :
shield_link = l_elite_shield01, HpMount, HpShield01, HpEngine01, HpLic, Hppu, Hppc, Hpxx, HpCloak01So for me it´s the first shield, isnt it ???
EDIT: tested a bit more, placed a drag on all addtional ShieldGen´s. Turned out that it works on the HpLic one. Looks like there some internal resorting about what´s the first shield, not in which order it´s defined on the shield link and not on which Hardpoint it is.
Guess i just wait till you finish the version for all Equip.