The LT Posted February 18, 2020 Posted February 18, 2020 Hello everyone, I am trying to get into DCS modding and trying to make a simple mod which will display arbitrary textures/images and text strings when a player is sitting in a specific aircraft. This is handy when you have TM Cougar MFDs with displays in them. That way we can have button annotations and have a handy reference of those buttons. I've tried using "ControlsIndicator" implementation as a reference with minimal success. Got the basic grasp for drawing stuff on screen but for some reason, ceStringPoly elements aren't getting created, while ceTexPoly elements are easily created, tweaked and positioned. For some reason, I have no problems drawing ceStringPoly elements in the Mi-8 but they aren't being drawn in the Fw-190A8. What is the correct way of initializing an additional "overlay"? device_init.lua? I've just added another "indicator" reference but I am not sure this is correct. What is the correct syntax of invoking the "ceStringPoly" element? My controls & seat Main controls: , BRD-N v4 Flightstick (Kreml C5 controller), TM Warthog Throttle (Kreml F3 controller), BRD-F2 Restyling Bf-109 Pedals w. damper, TrackIR5, Gametrix KW-908 (integrated into RAV4 seat) Stick grips: Thrustmaster Warthog Thrustmaster Cougar (x2) Thrustmaster F-16 FLCS BRD KG13 Standby controls: BRD-M2 Mi-8 Pedals (Ruddermaster controller) BRD-N v3 Flightstick w. exch. grip upgrade (Kreml C5 controller) Thrustmaster Cougar Throttle Pilot seat
The LT Posted February 19, 2020 Author Posted February 19, 2020 Hello everyone, I am trying to get into DCS modding and trying to make a simple mod which will display arbitrary textures/images and text strings when a player is sitting in a specific aircraft. This is handy when you have TM Cougar MFDs with displays in them. That way we can have button annotations and have a handy reference of those buttons. I've tried using "ControlsIndicator" implementation as a reference with minimal success. Got the basic grasp for drawing stuff on screen but for some reason, ceStringPoly elements aren't getting created, while ceTexPoly elements are easily created, tweaked and positioned. For some reason, I have no problems drawing ceStringPoly elements in the Mi-8 but they aren't being drawn in the Fw-190A8. What is the correct way of initializing an additional "overlay"? device_init.lua? I've just added another "indicator" reference but I am not sure this is correct. What is the correct syntax of invoking the "ceStringPoly" element?I've figured it out. Font variables had to be declared. Still not sure about how to add textures/images. My controls & seat Main controls: , BRD-N v4 Flightstick (Kreml C5 controller), TM Warthog Throttle (Kreml F3 controller), BRD-F2 Restyling Bf-109 Pedals w. damper, TrackIR5, Gametrix KW-908 (integrated into RAV4 seat) Stick grips: Thrustmaster Warthog Thrustmaster Cougar (x2) Thrustmaster F-16 FLCS BRD KG13 Standby controls: BRD-M2 Mi-8 Pedals (Ruddermaster controller) BRD-N v3 Flightstick w. exch. grip upgrade (Kreml C5 controller) Thrustmaster Cougar Throttle Pilot seat
BR55Sevas Posted February 21, 2020 Posted February 21, 2020 local GREEN_TRANSPARENT_COLOR = {0 ,255,0,128} --128,165,0,120 local HUD_BASE_TEXTURE = MakeMaterial(IndicationTexturesPath.."HUD_base.dds",GREEN_TRANSPARENT_COLOR) local HUD_base = CreateElement "ceTexPoly" --this could be the text area on HUD HUD_base.name = create_guid_string() -- this must be external function call. HUD_base.vertices = {{-grid_radius, grid_radius}, { grid_radius, grid_radius}, { grid_radius,-grid_radius}, {-grid_radius,-grid_radius}} HUD_base.indices = {0,1,2,2,3,0} HUD_base.tex_coords = {{0,0},{1,0},{1,1},{0,1}} HUD_base.material = HUD_BASE_TEXTURE HUD_base.init_pos = {0,0} HUD_base.collimated = true HUD_base.change_opacity = false HUD_base.parent_element = grid_origin.name AddElement(HUD_base) МиГ-29 Fly by wire СДУ Su-27SM second display panel https://www.youtube.com/embed/videoseries?list=PL_2GGwNpWNp_fKXfRtDhIk8s5Jf4a9XHS http://berkuts.ru Пилотажный сервер с роботом | Aerobatic server with PhantomControl
The LT Posted March 4, 2020 Author Posted March 4, 2020 local GREEN_TRANSPARENT_COLOR = {0 ,255,0,128} --128,165,0,120 local HUD_BASE_TEXTURE = MakeMaterial(IndicationTexturesPath.."HUD_base.dds",GREEN_TRANSPARENT_COLOR) local HUD_base = CreateElement "ceTexPoly" --this could be the text area on HUD HUD_base.name = create_guid_string() -- this must be external function call. HUD_base.vertices = {{-grid_radius, grid_radius}, { grid_radius, grid_radius}, { grid_radius,-grid_radius}, {-grid_radius,-grid_radius}} HUD_base.indices = {0,1,2,2,3,0} HUD_base.tex_coords = {{0,0},{1,0},{1,1},{0,1}} HUD_base.material = HUD_BASE_TEXTURE HUD_base.init_pos = {0,0} HUD_base.collimated = true HUD_base.change_opacity = false HUD_base.parent_element = grid_origin.name AddElement(HUD_base) Спасибо, попробую через материал. My controls & seat Main controls: , BRD-N v4 Flightstick (Kreml C5 controller), TM Warthog Throttle (Kreml F3 controller), BRD-F2 Restyling Bf-109 Pedals w. damper, TrackIR5, Gametrix KW-908 (integrated into RAV4 seat) Stick grips: Thrustmaster Warthog Thrustmaster Cougar (x2) Thrustmaster F-16 FLCS BRD KG13 Standby controls: BRD-M2 Mi-8 Pedals (Ruddermaster controller) BRD-N v3 Flightstick w. exch. grip upgrade (Kreml C5 controller) Thrustmaster Cougar Throttle Pilot seat
Recommended Posts