@Graingy Alright, so with pingpong it doesn't have a speed; it simply pingpongs whatever you put into it. So let's say you just have pingpong(Throttle * 3, 1). There is no speed or anything. If you jam throttle to full, the function will output 1 because you went to 1, then back to 0, and back to 1 again, instantly.
I'll explain other stuff as we go on, but for now, put {pingpong(Throttle * 3, 1)} into a label and try it out in-game (you can also use the debug console if you wish, just take off the curly brackets).
@Boeing727200F I just understand how everything is connected. For example, if I wanted to move the turret of a tank, I would find the rotator it is connected to and nudge that, which moves everything else. In fact I don't even drag and drop stuff (aside from fuselages for alignment). I nudge everything into place and manually add connections.
@Graingy Funky trees is a programming language based around mathematics. Functions such as clamp(x, y, z) do things to and with numbers, and they can be stacked. Knowledge of algebra is essential for properly understanding the structure of code written in this language.
The code I wrote should alternate between 0 and 1 rapidly. The core of this is the pingpong(x, y) function. This alternates a value so it is never larger than y and never less than 0. For example, say I had pingpong(Throttle * 3, 1). From 0% to 33% throttle, it would be the same, however from 33% to 66% throttle it would go back down to 0. from 66% to 100% it would go back up.
The sum(x) function is the sum of all inputs over time (idk how to properly explain this). With a static number in there it will constantly go up. I put 5 so it goes faster than 1. This gets placed inside the pingpong function so it now alternates between 0 and 1 rapidly. The only problem is this is pretty much always greater than 0, activating the light.
The clamp function allows us to clamp values. For example, clamp(3, 1, 2) will output 2 because 2 is the maximum value. clamp(0.5, 1, 2) will output 1 because 1 is the minimum value. clamp01(x) is the same as clamp(x, 0, 1), and exists because it is used pretty often. Before we clamp anything, I then put our pingpong code in a boolean comparison, checking if it is greater than 0.5. This could actually work without clamping it since booleans get converted to -1 and 1 for math purposes, however I like to have clean 0 and 1 values, so I clamp01 it.
So there you go, all of clamp01(pingpong(sum(5), 1) > 0.5) broken down. Hope it helps!
For your information, anything above 0 in the input field of a beacon light will activate the light. As you want to control the blink pattern in more than one way, you will need additional FT instead of a simple blink pattern. TargetLocked ? 1 : (TargetLocking ? clamp01(pingpong(sum(5), 1) > 0.5) : 0)
Not sure if that will work or not, give it a try.
@FlyOnTheWall I think the mod itself has to be specifically exported for android, as when I attempted it many years ago I got a lot of warnings about missing build support for Android, etc.
@griges Sorry, didn't see your reply (please remember to press the reply button).
I write almost all my variable and label code in notepad++ (label code is then copied to in-game while I write variables directly into the xml), and even then I frequently have multiple windows up for reference or transfer.
I am actually still in high school, and almost all of my coding, Unity, and blender knowledge has come from this game, which I play as a hobby.
@Noname918181818181818181 And I also do that as well. @Graingy I guess I use a lot of build techniques, but I forget they aren't common knowledge and so don't think of them as build techniques.
@V I guess I also participate in control base abuse. My iPad in my cockpit has full 6dof capability, where it can both snap to four positions and also function as a normal pickup object for VR users (buttons to change modes). The main landing gear also uses control bases for the main strut, tilt/tilt suspension, and the lock link.
@blt My main desktop has an i9 and 4070ti, with matching high-end components, although you will not need that to run the final plane (without the cockpit). This is due to my method of modding parts, which you can read about here.
@griges the SWL-10's code is very basic. The SWL-120's code is a lot better and fixes most of the problems with the SWL-10's autopilot, although it's a little more complex.
@griges now I see where I went wrong lol. I don't use that specific code, my modified heading code is embedded in my autopilot heading code so it's more complicated.
What are you trying to do with this code, anyway?
@Graingy He means editing the fuselage slicing using Overload, something I do all the time to put in something like 46.47435% right fill as calculated by my scripts.
@blt I've never played stormworks, nor have I heard of it outside of people telling me they think I play it lol.
Also a mobile friendly version is impossible, as there is just too much detail. The window dimmers alone are 1314 parts unmodded (added in to the fuselage mod now).
I guess I'm one of the old players, although the reason I don't seem that active is because I don't go looking for forums or airplanes that much. I don't even download much at all, unless requested to test something. If I stumble across a forum asking for help, I might make an effort, and if I'm asked outright then I'll make an effort to provide some help.
So to sum up, even though I check the site very frequently, I often just open it to check for notifications and then close it. Sometimes, like now, I browse someone's comments for no reason in particular and end up on something I want to comment on (for example this).
set massScale to 0, calculateDrag to false, and disableAircraftCollisions to true on every part I drag out of the menu. It's a habit now. I only turn mass on for parts which need it for physics reasons or one main part for most mass, and drag on just one or two parts, usually an inlet.
@LunarEclipseSP I also have plans to make a full (well, aside from externally modelled parts) no mods version of the entire plane. It will be unplayable and I may not even be able to do it, but when mobile users beg for a no mods version, I can link them the 30,000 part Yamato killer lol.
(I also have a cargo no mods version with some adaptations for vanilla, and it should be 5000-6000 parts in total)
@LunarEclipseSP Even in this stage of the interior remake, I'm already starting to use mod parts. The fuselage shell and all the window dimmer controls are easily over 3000 parts alone, now just one part by exporting everything and joining meshes in blender, then adding the mesh back as a mod part (in fact I've been doing this for a while; the old interior as well as most of the plane used this trick)
The seats are one part per row as of now since they were modelled in blender to begin with, although once MVC finishes the model I will further join meshes and make all seats one part (business class might be separate if there are different materials in business and economy).
The overhead panels are currently one part per panel as I set them up, and when I export the entire interior I'll add them all to the same mod part as most of the other SP parts, just like I did in the old interior.
The seatbelt and no smoking signs were modelled in SketchUp along with all the galleys and bathrooms, and as such are one part. I use two input controllers along with some code to swap the lit and unlit (two copies, one with emissive materials) meshes. The unused mesh is stored just forward of the visible one, and you can see this if you look inside the overhead panels.
So all up, the interior is currently at 2000 vanilla parts (combining crew rest with the main interior), along with many more parts already modded and the externally modelled parts. If I were to build something similar to the modelled parts and add all the vanilla versions of the SP-built mod parts, there are easily tens of thousands of parts here.
One analogy of my modding method is like gears in a car, where the true vanilla part count (e.g. 30,000) is the speed, and the actual in-game part count is the RPM of the engine. As I build more details, I "gear down" by exporting and modding what I've done, or branching off into new files to continue to work on the parts (like what I've done with the 1000 part crew rest area and 1300 part interior). My computer can easily handle many more parts, but building with lag is annoying after a while, especially when doing connections (which is the only way I connect parts now lol).
About my actual computer, it's a custom build with an i9-11900k and RTX 4070ti, with suitable components to match. I built it four years ago with a 3060 and have since upgraded the GPU. I also have my even older gaming laptop, an Acer Nitro 5 with a i7-8750H and 1050, which I use to test performance sometimes (or when I'm away from home). I can run the full plane without the cockpit (still all the 30,000 parts modded to 900) at 30FPS, and 6FPS with the cockpit added (there is a lot of code there).
Just realized I typed a whole essay lol, but it should explain how my building works and how I can achieve this level of detail and have it still be playable.
(Comment got cut off, so I split it and also moved it so it reads in order)
@OverlordPrime NASA computer, although any mid range computer with a decent GPU can run the entire fuselage and interior with playable FPS.
The cockpit is another story, as I get 30FPS with my main rig and 6FPS with my mid range gaming laptop.
@fleia262 With me, coding in the variables window is impossible due to the complexity of my code (in fact, 1000 variables is after I simplified and improved the code from 2000!). Some variables contain giant paragraphs of code, which is beyond impossible to deal with in the window. In fact, I don't just use one notepad window; I used over four monitors of code and diagrams when I was developing the FMC.
I read the last paragraph about variables, and there is a solution: use a text editor.
My plane has over 1000 variables, some being absurdly complex, and I just do all the coding in notepad++.
With labels, most tags have closing tags (the ones with the slash in them). Here's a document explaining all the tags.
About the trigonometry, I have no idea. I modified the HUD to suit my own plane (2 years ago), and I just left some stuff as-is, including this.
The startup sequence and overall interactivity on this plane is incredible! I'm impressed with how realistic and complicated the systems are (although it took me a while to get the engines started lol).
My main recommendation is to make all the controls useable on PC, as it's simply impossible to use the flaps, spoiler lever, or reverse thrust (even though I clicked the switch??). If you're interested, here is the throttle quadrant of my plane, which allows for inputs of both normal flight inputs or moving manually in VR or with a mouse.
@winterro I agree. I've reported hundreds of these comments, and there seems to be no end to them. Even I accidentally clicked on one link, because they disguised a link as something like @PlaneFlightX, and I wanted to visit the account page. One change they have made so far is to prevent markdown from working for users with less than 100 points, which makes links more obvious but the fact they are there at all is still a problem.
Edit: they seem to have fixed that exploit as well, as even though I wrote [@PlaneFlightX](https://www.simpleplanes.com/Forums/View/1985008), my account page takes priority over the forum.
Edit 2: it works, but you need to separate the @ symbol from the username.
With the latest SP update the terrain texture is all white, I'm pretty sure I already know the answer, but if you could fix the texture that would be great.
@RGaming00 Hello, forgot about this until now, but the FMC is insanely complicated, so much so that even I rely on my own notes to make modifications to it. What I can do is ask you to watch the five videos linked on this post for a general overview. Here is some of the actual documentation and notes from when I made it, and you can download the FMC itself here. The best way to explain it is there are three main components, those being the label (to display the information), the entry, storage, and retrieval system, and the system to change pages. If you take the time to view the linked resources (in particular the linked documentation), I can explain any confusing parts. I highly recommend you thoroughly explore the FMC itself and the notes, as it's a lot easier than me trying to explain everything over text.
@LunarEclipseSP that would need a lot of storage space though; it's not anywhere near video but it's still more than just xml files or the occasional mod
@jamesPLANESii They took away d=0 entirely a few weeks ago, and I got them to add it back (that's the TLDR, read my linked comments for more info).
+5@Jsoeidm2 Possibly, although I don't know.
Comment 1
+2Comment 2
This should provide some more information.
TLDR website performance reasons, although if you know what to do you can still do it.
@Graingy Alright, so with pingpong it doesn't have a speed; it simply pingpongs whatever you put into it. So let's say you just have
+1pingpong(Throttle * 3, 1)
. There is no speed or anything. If you jam throttle to full, the function will output 1 because you went to 1, then back to 0, and back to 1 again, instantly.I'll explain other stuff as we go on, but for now, put
{pingpong(Throttle * 3, 1)}
into a label and try it out in-game (you can also use the debug console if you wish, just take off the curly brackets).@Boeing727200F I just understand how everything is connected. For example, if I wanted to move the turret of a tank, I would find the rotator it is connected to and nudge that, which moves everything else. In fact I don't even drag and drop stuff (aside from fuselages for alignment). I nudge everything into place and manually add connections.
+2I just do everything through connections and the "move connected parts" option in the nudge tool.
+2@Graingy Funky trees is a programming language based around mathematics. Functions such as clamp(x, y, z) do things to and with numbers, and they can be stacked. Knowledge of algebra is essential for properly understanding the structure of code written in this language.
+2The code I wrote should alternate between 0 and 1 rapidly. The core of this is the
pingpong(x, y)
function. This alternates a value so it is never larger than y and never less than 0. For example, say I hadpingpong(Throttle * 3, 1)
. From 0% to 33% throttle, it would be the same, however from 33% to 66% throttle it would go back down to 0. from 66% to 100% it would go back up.The
sum(x)
function is the sum of all inputs over time (idk how to properly explain this). With a static number in there it will constantly go up. I put 5 so it goes faster than 1. This gets placed inside the pingpong function so it now alternates between 0 and 1 rapidly. The only problem is this is pretty much always greater than 0, activating the light.The clamp function allows us to clamp values. For example,
clamp(3, 1, 2)
will output 2 because 2 is the maximum value.clamp(0.5, 1, 2)
will output 1 because 1 is the minimum value.clamp01(x)
is the same asclamp(x, 0, 1)
, and exists because it is used pretty often. Before we clamp anything, I then put our pingpong code in a boolean comparison, checking if it is greater than 0.5. This could actually work without clamping it since booleans get converted to -1 and 1 for math purposes, however I like to have clean 0 and 1 values, so I clamp01 it.So there you go, all of
clamp01(pingpong(sum(5), 1) > 0.5)
broken down. Hope it helps!For your information, anything above 0 in the input field of a beacon light will activate the light. As you want to control the blink pattern in more than one way, you will need additional FT instead of a simple blink pattern.
+2TargetLocked ? 1 : (TargetLocking ? clamp01(pingpong(sum(5), 1) > 0.5) : 0)
Not sure if that will work or not, give it a try.
@ThomasRoderick fixed
+1@SkyJayTheFirst Hi, I'd appreciate it if you didn't tag me just because I upvoted a teaser. Thanks!
+2@griges Ah, notepad++ is just a text editor. It's like the normal notepad built in to Windows but with a few more helpful features.
@FlyOnTheWall I think the mod itself has to be specifically exported for android, as when I attempted it many years ago I got a lot of warnings about missing build support for Android, etc.
@griges Sorry, didn't see your reply (please remember to press the reply button).
+1I write almost all my variable and label code in notepad++ (label code is then copied to in-game while I write variables directly into the xml), and even then I frequently have multiple windows up for reference or transfer.
I am actually still in high school, and almost all of my coding, Unity, and blender knowledge has come from this game, which I play as a hobby.
@Noname918181818181818181 And I also do that as well. @Graingy I guess I use a lot of build techniques, but I forget they aren't common knowledge and so don't think of them as build techniques.
+1@V I guess I also participate in control base abuse. My iPad in my cockpit has full 6dof capability, where it can both snap to four positions and also function as a normal pickup object for VR users (buttons to change modes). The main landing gear also uses control bases for the main strut, tilt/tilt suspension, and the lock link.
@blt My main desktop has an i9 and 4070ti, with matching high-end components, although you will not need that to run the final plane (without the cockpit). This is due to my method of modding parts, which you can read about here.
+1@RobertsAeronautics Thanks!
@griges the SWL-10's code is very basic. The SWL-120's code is a lot better and fixes most of the problems with the SWL-10's autopilot, although it's a little more complex.
+1@griges Were you looking at the SWL-10? I don't believe I made the SWL-120's heading code available.
+1@griges now I see where I went wrong lol. I don't use that specific code, my modified heading code is embedded in my autopilot heading code so it's more complicated.
+1What are you trying to do with this code, anyway?
@MobileBuilder21 Do you know you can click the arrow to show the other options? I thought that was common knowledge
@Graingy He means editing the fuselage slicing using Overload, something I do all the time to put in something like 46.47435% right fill as calculated by my scripts.
+1@blt I've never played stormworks, nor have I heard of it outside of people telling me they think I play it lol.
+1Also a mobile friendly version is impossible, as there is just too much detail. The window dimmers alone are 1314 parts unmodded (added in to the fuselage mod now).
I guess I'm one of the old players, although the reason I don't seem that active is because I don't go looking for forums or airplanes that much. I don't even download much at all, unless requested to test something. If I stumble across a forum asking for help, I might make an effort, and if I'm asked outright then I'll make an effort to provide some help.
+2So to sum up, even though I check the site very frequently, I often just open it to check for notifications and then close it. Sometimes, like now, I browse someone's comments for no reason in particular and end up on something I want to comment on (for example this).
@Graingy yes and no
+1read this essay about part count
Could also be
+1Heading + 180
I'm not sure which one has the desired behaviour you want, but try rimiha's and mine and see which one works for you.
set
+4massScale
to 0,calculateDrag
to false, anddisableAircraftCollisions
to true on every part I drag out of the menu. It's a habit now. I only turn mass on for parts which need it for physics reasons or one main part for most mass, and drag on just one or two parts, usually an inlet.@MrSilverWolf Thanks!
@LunarEclipseSP I also have plans to make a full (well, aside from externally modelled parts) no mods version of the entire plane. It will be unplayable and I may not even be able to do it, but when mobile users beg for a no mods version, I can link them the 30,000 part Yamato killer lol.
+2(I also have a cargo no mods version with some adaptations for vanilla, and it should be 5000-6000 parts in total)
@LunarEclipseSP Even in this stage of the interior remake, I'm already starting to use mod parts. The fuselage shell and all the window dimmer controls are easily over 3000 parts alone, now just one part by exporting everything and joining meshes in blender, then adding the mesh back as a mod part (in fact I've been doing this for a while; the old interior as well as most of the plane used this trick)
+2The seats are one part per row as of now since they were modelled in blender to begin with, although once MVC finishes the model I will further join meshes and make all seats one part (business class might be separate if there are different materials in business and economy).
The overhead panels are currently one part per panel as I set them up, and when I export the entire interior I'll add them all to the same mod part as most of the other SP parts, just like I did in the old interior.
The seatbelt and no smoking signs were modelled in SketchUp along with all the galleys and bathrooms, and as such are one part. I use two input controllers along with some code to swap the lit and unlit (two copies, one with emissive materials) meshes. The unused mesh is stored just forward of the visible one, and you can see this if you look inside the overhead panels.
So all up, the interior is currently at 2000 vanilla parts (combining crew rest with the main interior), along with many more parts already modded and the externally modelled parts. If I were to build something similar to the modelled parts and add all the vanilla versions of the SP-built mod parts, there are easily tens of thousands of parts here.
One analogy of my modding method is like gears in a car, where the true vanilla part count (e.g. 30,000) is the speed, and the actual in-game part count is the RPM of the engine. As I build more details, I "gear down" by exporting and modding what I've done, or branching off into new files to continue to work on the parts (like what I've done with the 1000 part crew rest area and 1300 part interior). My computer can easily handle many more parts, but building with lag is annoying after a while, especially when doing connections (which is the only way I connect parts now lol).
About my actual computer, it's a custom build with an i9-11900k and RTX 4070ti, with suitable components to match. I built it four years ago with a 3060 and have since upgraded the GPU. I also have my even older gaming laptop, an Acer Nitro 5 with a i7-8750H and 1050, which I use to test performance sometimes (or when I'm away from home). I can run the full plane without the cockpit (still all the 30,000 parts modded to 900) at 30FPS, and 6FPS with the cockpit added (there is a lot of code there).
+1Just realized I typed a whole essay lol, but it should explain how my building works and how I can achieve this level of detail and have it still be playable.
(Comment got cut off, so I split it and also moved it so it reads in order)
@OverlordPrime NASA computer, although any mid range computer with a decent GPU can run the entire fuselage and interior with playable FPS.
The cockpit is another story, as I get 30FPS with my main rig and 6FPS with my mid range gaming laptop.
@griges I'm making a tutorial video on it, which will be released in checks schedule 3-4 business years
+1rate(Altitude) gives vertical speed in m/s
+1simple math can be used to convert it to whatever units you need
@fleia262 With me, coding in the variables window is impossible due to the complexity of my code (in fact, 1000 variables is after I simplified and improved the code from 2000!). Some variables contain giant paragraphs of code, which is beyond impossible to deal with in the window. In fact, I don't just use one notepad window; I used over four monitors of code and diagrams when I was developing the FMC.
@lizi13399a Thank you for permission, I have also invited you to be a contributor to the mod page.
+3I read the last paragraph about variables, and there is a solution: use a text editor.
+1My plane has over 1000 variables, some being absurdly complex, and I just do all the coding in notepad++.
With labels, most tags have closing tags (the ones with the slash in them). Here's a document explaining all the tags.
+1About the trigonometry, I have no idea. I modified the HUD to suit my own plane (2 years ago), and I just left some stuff as-is, including this.
I basically never do this, but T please
+1This looks incredible and I checked out one of your other planes.
The startup sequence and overall interactivity on this plane is incredible! I'm impressed with how realistic and complicated the systems are (although it took me a while to get the engines started lol).
+1My main recommendation is to make all the controls useable on PC, as it's simply impossible to use the flaps, spoiler lever, or reverse thrust (even though I clicked the switch??). If you're interested, here is the throttle quadrant of my plane, which allows for inputs of both normal flight inputs or moving manually in VR or with a mouse.
@winterro I agree. I've reported hundreds of these comments, and there seems to be no end to them. Even I accidentally clicked on one link, because they disguised a link as something like @PlaneFlightX, and I wanted to visit the account page. One change they have made so far is to prevent markdown from working for users with less than 100 points, which makes links more obvious but the fact they are there at all is still a problem.
+1Edit: they seem to have fixed that exploit as well, as even though I wrote
[@PlaneFlightX](https://www.simpleplanes.com/Forums/View/1985008)
, my account page takes priority over the forum.Edit 2: it works, but you need to separate the @ symbol from the username.
With the latest SP update the terrain texture is all white, I'm pretty sure I already know the answer, but if you could fix the texture that would be great.
@RGaming00 Hello, forgot about this until now, but the FMC is insanely complicated, so much so that even I rely on my own notes to make modifications to it. What I can do is ask you to watch the five videos linked on this post for a general overview. Here is some of the actual documentation and notes from when I made it, and you can download the FMC itself here. The best way to explain it is there are three main components, those being the label (to display the information), the entry, storage, and retrieval system, and the system to change pages. If you take the time to view the linked resources (in particular the linked documentation), I can explain any confusing parts. I highly recommend you thoroughly explore the FMC itself and the notes, as it's a lot easier than me trying to explain everything over text.
Everything is set to high during normal use (some stuff is changed when I'm doing complex things like taking orthographic pictures of islands)
+1@ThomasRoderick I tested it and added it to the list.
+1@rimiha I am using Brave on Windows 11, in a private window (this is what I always use). I don't think I can change the scrolling settings though.
I viewed the map on my phone and I can zoom normally there, so it seems to be limited to mouse users.
+1@rimiha It works a lot better now, although scrolling is still very buggy. One single notch on my scroll wheel jumps from min zoom to max zoom.
@ShinyGemsBro I have the same issue
@LunarEclipseSP that would need a lot of storage space though; it's not anywhere near video but it's still more than just xml files or the occasional mod
+2@ThomasRoderick I'll test this when I get a chance, thanks for the suggestion
+1