Sabrefly Posted January 22, 2018 Report Share Posted January 22, 2018 (edited) Guys, I'm using this LUA on a networked PC (for WideClient), that shows me FPS and VAS used: Quote -- Create the display window for 2 values, position x=800, y=400 h = display.create("My next display", 2, 800, 400) -- Update the display at 500 msec intervals (see event at end) function mytimer(time) -- display 1 = frame rate fr = ipc.readUW(0x0274) if fr ~= 0 then fr = 32768/fr end fr = math.floor((fr * 10) + 0.5)/10 display.show(h, 1, "Frame Rate " .. fr .. " fps") -- display 2 = memory left free mem = ipc.readUD(0x024C) memmb = math.floor((mem/1024) + 0.5) display.show(h, 2, "Memory free " .. mem .. " kb (" .. memmb .. " Mb)") end -- Adjust timing to taste: 500 = 1/2 second event.timer(500, "mytimer") Could somebody savvy with FSUIPC and LUA kindly add necessary lines to the above also to display number of AI aircraft currently in P3Dv4? Thanks PS: I'm on P3Dv4 Edited January 22, 2018 by Sabrefly Link to comment Share on other sites More sharing options...
Pete Dowson Posted January 22, 2018 Report Share Posted January 22, 2018 I've moved your support request from the "User Contributions" subforum, which is a library repository for user contributions, to the correct Support Forum. Please always post support questions here if you want answers! 12 minutes ago, Sabrefly said: Could somebody savvy with FSUIPC and LUA kindly add necessary lines to the above also to display number of AI aircraft currently in P3Dv4? Since the "memory left" is useless in P3D4 why not just replace the offset (24C) read there by the one for the AI count (25C), also a "UD", and change the text label accordingly? Pete 1 Link to comment Share on other sites More sharing options...
Sabrefly Posted January 23, 2018 Author Report Share Posted January 23, 2018 (edited) 13 hours ago, Pete Dowson said: I've moved your support request from the "User Contributions" subforum, which is a library repository for user contributions, to the correct Support Forum. Please always post support questions here if you want answers! Since the "memory left" is useless in P3D4 why not just replace the offset (24C) read there by the one for the AI count (25C), also a "UD", and change the text label accordingly? Pete Will do that, Thank you. Quote -- display 2 = number of AI traff = ipc.readUD(0x025C) display.show(h, 3, "AI Number " ..traff) The above should work Edited January 23, 2018 by Sabrefly Link to comment Share on other sites More sharing options...
Sabrefly Posted January 23, 2018 Author Report Share Posted January 23, 2018 (edited) Hmm unfortunately I don't get AI count in the display (second value). I still have Frame Rate indication but no AI count? -- Create the display window for 2 values, position x=800, y=400 h = display.create("My next display", 2, 800, 400) -- Update the display at 500 msec intervals (see event at end) function mytimer(time) -- display 1 = frame rate fr = ipc.readUW(0x0274) if fr ~= 0 then fr = 32768/fr end fr = math.floor((fr * 10) + 0.5)/10 display.show(h, 1, "Frame Rate " .. fr .. " fps") -- display 2 = number of AI traff = ipc.readUD(0x025C) display.show(h, 3, "AI Number " ..traff) end -- Adjust timing to taste: 500 = 1/2 second event.timer(500, "mytimer") What could be wrong there? Win10, P3Dv4.1, FSUIPC v5.122a, MT6 WideClient v6.999z4 (Win7) Thanks. PS: Do I need to set anything special for that in FSUIPC? Edited January 23, 2018 by Sabrefly Link to comment Share on other sites More sharing options...
Sabrefly Posted January 23, 2018 Author Report Share Posted January 23, 2018 Weird, I can get the number displayed to FS Title bar if I set up Logging accordingly, but it doesn't reach WideClient on the networked PC. Thanks. Link to comment Share on other sites More sharing options...
Sabrefly Posted January 23, 2018 Author Report Share Posted January 23, 2018 I've figured it out, there was an error, fixed! -- display 2 = number of AI traff = ipc.readUD(0x025C) display.show(h, 2, "AI Number " ..traff) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now