-
Posts
622 -
Joined
-
Last visited
-
Days Won
3
Content Type
Profiles
Forums
Events
Everything posted by Alex Okean
-
I am not sure about what you means as "black borders" cause they will always be there because of lenses presence. May be you setup wrong lenses which does not correspond with rift settings
-
IPD is given by Rift API as warping data too
-
Fixed binary ( tested on public 1.2.8 ) once again , sorry for broken weekend ( bad idea compile something on friday night ) Visualizer_fixed_linkage.zip
-
Here you go : binary replacement in zip ( 64 bit version ) , extract to bin folder , as is , or wait for official update rollout Visualizer.zip
-
Just fixed on my side : it will be available with next beta update
-
wait :) as it beta , it is intented to be buggy
-
bug with DK1 support , as no one played with it after HD prototype .
-
for enabling SFM aircraft without EFM table should looks like {old = true} , old means that you will use SFM , also with same parameter you can specify FC aircraft which will be donor for weapon system {old = 16} will mark that weapon system be from Su-25 {old = 6} F-15 as source for weapon system first two parameters only need when you have DLL with flight model ,
-
Well , when we will have Rift in office. at the moment only experiments, "kind of " : two viewports render with eye separation
-
Official way how to make aircraft flyable CustomHuman will not work anymore , it is replaced by make_flyable call see any entry.lua inside mods/aircrafts local FM = {self_ID, 'OPTIONAL_FM_DLL', old = 6 --[[ F_15 as CWS source --]] } make_flyable('AIRCRAFT-ID',nil --[[ ommited cockpit script path --]] ,FM,current_mod_path..'/comm.lua') comm.lua is radio menu declaration (optional ) where "old" is mark for use old FC style cockpit where value of old represent FC aircraft which will be donor of cockpit systems 6 - F-15 see Scripts\Database\wsTypes.lua for more values . off course to have all cockpits except Su-25T you will need to have FC3 installed , or A-10A or Su-25A modules for respective donors
-
And the next aircraft in DCS Series : it is fast , it is western , it is jet, it is fighter .
-
это какая то магия , никто никого не переименовывал , может вы модов понаставили ?
-
Suspension block for External FM API it is initialization part in your config files suspension = { { mass = 200, pos = {1,0,0}, moment_of_inertia = {1000,1000,1000}, damage_element = 83, damage_omega = 30.0, state_angle_0 = 6.131341662, state_angle_1 = -2.995164152, mount_pivot_x = -0.274, mount_pivot_y = -0.118, mount_post_radius = 0.657, mount_length = 0.604555117, mount_angle_1 = -3.138548523, post_length = 1.748, wheel_axle_offset = 0.05, self_attitude = false, yaw_limit = math.rad(89.0), damper_coeff = 30.0, amortizer_min_length = 0.0, amortizer_max_length = 0.397, amortizer_basic_length = 0.397, amortizer_spring_force_factor = 1.6e+13, amortizer_spring_force_factor_rate = 20.0, amortizer_static_force = 80000.0, amortizer_reduce_length = 0.377, amortizer_direct_damper_force_factor = 45000.0, amortizer_back_damper_force_factor = 15000.0, wheel_radius = 0.308, wheel_static_friction_factor = 0.65 , wheel_side_friction_factor = 0.65 , wheel_roll_friction_factor = 0.025, wheel_glide_friction_factor = 0.28 , wheel_damage_force_factor = 250.0, wheel_damage_speed = 150.0, wheel_moment_of_inertia = 3.6, --wheel moi as rotation body wheel_brake_moment_max = 15000.0, -- maximum value of braking moment , N*m --[[ args_post = {0,3,5}; args_amortizer = {1,4,6}; args_wheel = {76,77,77}; args_wheel_yaw = {2,-1,-1}; --]] arg_post = 0, arg_amortizer = 1, arg_wheel_rotation = 76, arg_wheel_yaw = 2, collision_shell_name = "WHEEL_F", }, { mass = 200, pos = {0,0,-1}, moment_of_inertia = {1000,1000,1000}, damage_element = 83, damage_omega = 30.0, state_angle_0 = 6.131341662, state_angle_1 = -2.995164152, mount_pivot_x = -0.274, mount_pivot_y = -0.118, mount_post_radius = 0.657, mount_length = 0.604555117, mount_angle_1 = -3.138548523, post_length = 1.748, wheel_axle_offset = 0.05, self_attitude = false, yaw_limit = math.rad(89.0), damper_coeff = 30.0, amortizer_min_length = 0.0, amortizer_max_length = 0.397, amortizer_basic_length = 0.397, amortizer_spring_force_factor = 1.6e+13, amortizer_spring_force_factor_rate = 20.0, amortizer_static_force = 80000.0, amortizer_reduce_length = 0.377, amortizer_direct_damper_force_factor = 45000.0, amortizer_back_damper_force_factor = 15000.0, wheel_radius = 0.308, wheel_static_friction_factor = 0.65 , wheel_side_friction_factor = 0.65 , wheel_roll_friction_factor = 0.025, wheel_glide_friction_factor = 0.28 , wheel_damage_force_factor = 250.0, wheel_damage_speed = 150.0, wheel_moment_of_inertia = 3.6, --wheel moi as rotation body wheel_brake_moment_max = 15000.0, -- maximum value of braking moment , N*m --[[ args_post = {0,3,5}; args_amortizer = {1,4,6}; args_wheel = {76,77,77}; args_wheel_yaw = {2,-1,-1}; --]] arg_post = 3, arg_amortizer = 4, arg_wheel_rotation = 77, arg_wheel_yaw = -1, collision_shell_name = "WHEEL_L", }, { mass = 200, pos = {0,0,1}, moment_of_inertia = {1000,1000,1000}, damage_element = 83, damage_omega = 30.0, state_angle_0 = 6.131341662, state_angle_1 = -2.995164152, mount_pivot_x = -0.274, mount_pivot_y = -0.118, mount_post_radius = 0.657, mount_length = 0.604555117, mount_angle_1 = -3.138548523, post_length = 1.748, wheel_axle_offset = 0.05, self_attitude = false, yaw_limit = math.rad(89.0), damper_coeff = 30.0, amortizer_min_length = 0.0, amortizer_max_length = 0.397, amortizer_basic_length = 0.397, amortizer_spring_force_factor = 1.6e+13, amortizer_spring_force_factor_rate = 20.0, amortizer_static_force = 80000.0, amortizer_reduce_length = 0.377, amortizer_direct_damper_force_factor = 45000.0, amortizer_back_damper_force_factor = 15000.0, wheel_radius = 0.308, wheel_static_friction_factor = 0.65 , wheel_side_friction_factor = 0.65 , wheel_roll_friction_factor = 0.025, wheel_glide_friction_factor = 0.28 , wheel_damage_force_factor = 250.0, wheel_damage_speed = 150.0, wheel_moment_of_inertia = 3.6, --wheel moi as rotation body wheel_brake_moment_max = 15000.0, -- maximum value of braking moment , N*m --[[ args_post = {0,3,5}; args_amortizer = {1,4,6}; args_wheel = {76,77,77}; args_wheel_yaw = {2,-1,-1}; --]] arg_post = 5, arg_amortizer = 6, arg_wheel_rotation = 77, arg_wheel_yaw = -1, collision_shell_name = "WHEEL_R", }, } local FM = { self_ID, 'dll_name' , center_of_mass = {0,0,0}, -- center of mass initial coordinates in coordinates of model moment_of_inertia = {3000,40000,25000} ,-- initial MOI values config_path = current_mod_path..'/Wunderluft.lua', -- "path to file which you will use to configure you FM", suspension = suspension, -- gear posts initialization } make_flyable('Wunderluft',current_mod_path..'/Cockpit/',FM,current_mod_path..'/comm.lua') -- AFM
-
By some requests internal logic of SFM planes control surfaces was switched off when custom cockpit present . instead of that you now have ability to set control surfaces position directly by using local value = get_aircraft_draw_argument_value(arg_number) set_aircraft_draw_argument_value(arg_number,value)
-
Auto Updater is clearning config files
Alex Okean replied to dwpenney's topic in Controller Profiles and Problems
i said that you can change cockpit package entirely , but you should declare it as valid plugin , it can be placed in Saved Games/DCS/Mods , cause it is valid place for mods , no matter that is ED plugin or not , i don't have such functionality to check that mod is maded by ED , where is my shame ? local self_ID = "Ka-50 by Someone else" declare_plugin(self_ID, { ..... }) ---------------------------------------------------------------------------------------- make_flyable('Ka-50',current_mod_path..'/Cockpit/Scripts/',nil, nil)--make_flyable(obj_name,optional_cockpit path,optional_fm = {mod_of_fm_origin,dll_with_fm}) ---------------------------------------------------------------------------------------- plugin_done() sort of this plugin declaration will switch Ka-50 cockpit to your scripts entirely -
Auto Updater is clearning config files
Alex Okean replied to dwpenney's topic in Controller Profiles and Problems
they should not work at such way. mostly because we need to keep in mind safety and cheat avoidance you can change only cockpit package entirely, i.e. remap used cockpit path to another directory -
he-he-he ( evil laugh) . flash light is already exist in DCS modules but it is disabled, cause it was maded for night debug
-
ok let's me to explain : dispatch_action send command to player's unit and put copy to the track . when track is reading this value poped from track and sended back to player's unit so correct handling should be if not track_is_reading() then dispatch_action(nil,command,value_if_it_exist) end to avoid duplicates in input queue when track is playnig , cause command will be already there
-
your sample have mistakes : need_to_be_closed must be false if you want get this state active after initialization . if you set it to true , "update" , "SetCommand" will never be called , track_is_reading() should be checked before calling dispatch_action , if it will be checked on start of SetCommand , SetCommand will be not fully executed in track which broke track reproducibility. you dont need to dlisten PlaneAirBrakeOn and PlaneAirBrakeOff in this sample,
-
dev:listen_command is just subscribe this device to given command number , i.e. when you push putton on joystick and when this button is assigned to this command , your device will be notified about it and SetCommand will be called . macro_handler.lua is just sample of how to use dispatch_action , nothing more . dispatch_action is replacement for LoSetCommand ( which is export.lua function )
-
FM binary packages not yet available for third party developers, native cockpit libraries also , at this moment we talk about Lua implementation of all . of course you can put most of your internal logic to dll and use it as Lua module ( http://www.lua.org for doc about it) using "require" call. i hope i can give you C library to handle cockpit params shortly after release
-
should be something like that __declspec(dllexport) void* __cdecl get_interface(void); void * get_interface(void) { static MyInterface object; return &object; }
-
Cockpit from scratch what you need to make cockpit package : 3d model of cockpit (we will not discuss about aspects of creation 3d models here), lua skills , C/C++ skills (optionally ),patience ! Each time when you take control over aircraft ,DCS will try to load package from HumanCockpitPath entry of database for this aircraft type, it can be added for existed aircraft (ie F-16 in DCS ) by calling make_flyable("F-16",current_mod_path..'/Cockpit/Scripts') -- for example if such path exist DCS will start loading it by executing two files at the root of this folder clickabledata.lua device_init.lua clickabledata contain info about clickable elements of your cockpit 3d model and commands which will be raised to targeted device on click. devices are declared in file device_init first device which you always need is MainPanel it is always declared in form of MainPanel = {"ccMainPanel",LockOn_Options.script_path.."mainpanel_init.lua"} where ccMainPanel is command to factory to create object of type ccMaiPanel next is init script for your device MainPanel will hold and render your 3d model and animate gauges by "arguments" after main panel declaration you are can declare up to 255 devices for different purposes creators = {} creators[devices.TEST] = {"avLuaDevice" ,LockOn_Options.script_path.."test_device.lua"} creators[devices.WEAPON_SYSTEM] = {"avSimpleWeaponSystem" ,LockOn_Options.script_path.."Systems/weapon_system.lua"} creators[devices.CLOCK] = {"avAChS_1" ,LockOn_Options.script_path.."clock.lua"} creators[devices.ADI] = {"avBaseIKP" ,LockOn_Options.script_path.."adi.lua"} creators[devices.ELECTRIC_SYSTEM]= {"avSimpleElectricSystem",LockOn_Options.script_path.."Systems/electric_system.lua"} creators[devices.RADAR] = {"avSimpleRadar" ,LockOn_Options.script_path.."RADAR/Device/init.lua"} table devices is just named index local count = 0 local function counter() count = count + 1 return count end -------DEVICE ID------- devices = {} devices["TEST"] = counter()--1 devices["WEAPON_SYSTEM"] = counter()--2 devices["ELECTRIC_SYSTEM"] = counter()--3 devices["CLOCK"] = counter()--4 devices["ADI"] = counter()--5 devices["RADAR"] = counter()--6 all devices except TEST store their base functionality inside our libraries and used just as entry point to core data of FM and other objects avLuaDevice is device which functionality completely driven by lua for example content of test_device.lua local dev = GetSelf() local my_param = get_param_handle("TEST_PARAM") -- obtain shared parameter (created if not exist ), i.e. databus my_param:set(0.1) -- set to 0.1 local update_time_step = 0.1 make_default_activity(update_time_step) --update will be called 10 times per second local sensor_data = get_base_data() local DC_BUS_V = get_param_handle("DC_BUS_V") DC_BUS_V:set(0) function post_initialize() electric_system = GetDevice(3) --devices["ELECTRIC_SYSTEM"] print("post_initialize called") end function update() local v = my_param:get() print(v) my_param:set(sensor_data.getMachNumber()) if electric_system ~= nil then local DC_V = electric_system:get_DC_Bus_1_voltage() local prev_val = DC_BUS_V:get() -- add some dynamic: DC_V = prev_val + (DC_V - prev_val) * update_time_step DC_BUS_V:set(DC_V) end end function SetCommand(command,value) if command == 3001 then print("user click") end end most important thing of that is local my_param = get_param_handle("TEST_PARAM") get_param_handle create named databus entry which can be accessed by any other device, indication element , panel gauge , trigger event by name this code inside mainpanel_init.lua will animate value of TEST_PARAM as argument 113 of 3d model TEST_PARAM_GAUGE = CreateGauge("parameter") TEST_PARAM_GAUGE.parameter_name = "TEST_PARAM" TEST_PARAM_GAUGE.arg_number = 113 TEST_PARAM_GAUGE.input = {0,100} TEST_PARAM_GAUGE.output = {0,1} this code inside indicator's script will add text to HUD with this value local test_output = CreateElement "ceStringPoly" test_output.name = create_guid_string() test_output.material = FONT_ test_output.init_pos = {0,-1} test_output.alignment = "CenterCenter" test_output.stringdefs = {0.01,0.75 * 0.01, 0, 0} test_output.formats = {"%.2f","%s"} test_output.element_params = {"TEST_PARAM"} test_output.controllers = {{"text_using_parameter",0,0}} --first index is for element_params (starting with 0) , second for formats ( starting with 0) test_output.additive_alpha = true test_output.collimated = true AddElement(test_output) as more usefull sample gun_sight_mark = create_textured_box(0,0,32,32) -- this is create_textured_box function call with parameters gun_sight_mark.material = PIPER_ gun_sight_mark.name = BASE_COLOR_MAT gun_sight_mark.collimated = true gun_sight_mark.element_params = {"WS_GUN_PIPER_AVAILABLE", "WS_GUN_PIPER_AZIMUTH", "WS_GUN_PIPER_ELEVATION"} gun_sight_mark.controllers = {{"parameter_in_range" ,0,0.9,1.1},--check that piper available using WS_GUN_PIPER_AVAILABLE {"move_left_right_using_parameter",1, 0.73 }, --azimuth move by WS_GUN_PIPER_AZIMUTH , 0.73 is default collimator distance (from eye to HUD plane) {"move_up_down_using_parameter" ,2, 0.73 }, --elevation move by WS_GUN_PIPER_ELEVATION } AddElement(gun_sight_mark) use three named params to control gun piper mark position on HUD to be continued...