@Solent I found the issue to be a feedback loop with the smooth() I used on the trim component of the altitude autopilot... not sure why I didn't catch this earlier. I have fixed this and updated the xml. Is the issue fixed for you now?
I personally prefer the current building method, although I'm probably an outlier since the parts of my plane that aren't externally created are in the tens of thousands of parts, with thousands of variables. Some heavy optimization would be nice though.
Very interesting. My landing gear code all uses the same smooth() timer, although it's more linear, with simple code (no ternary operators) to do things like open the gear doors in the first 1 second, and retract the gear for the next 8 seconds, followed by gear doors closing for the last second.
If you have the game on a computer, you can use the "3D Print/Export" button in the designer menu to export the loaded craft to a .obj file. From there you can convert it to STL and prepare it for printing.
I didn't make a video, but I did test it again and this is my feedback:
Movement: overall 5/10, but if scored relative to the type of craft 8/10 (obviously a large bomber/cruiser will be more sluggish than a fighter). The autotrim is a little jerky sometimes which detracts the score.
Weapons: I haven't tested the advanced targeting systems, but selecting a target aims the cannons and a launched bomb will fly to the target. The autoaim on the cannons and autoflight on the bombs is good. 9/10 (sometimes bombs loop around targets)
Playability: ignoring the actual framerate and game performance, the actual craft is fun to control and startup once I'm familiar with it. One thing I should note is the lack of any labelled diagrams, as when I first flew it a while ago I was struggling to find the controls mentioned in the checklists. Once I did know where everything was, the engine startup sequence was pretty fun. I'd give playability an 8/10, the detractors being a lack of diagrams and some quirks with how it flies sometimes.
I would also like to note how it leans back when first spawned in. Maybe consider moving the CoG forward or the main landing gear backward?
One way to improve the code in the label is to use a stacked tertiary selector. For example:
Time < 2 "Funny text" : (Time < 3 ? "..." : (Time < 4 ? "Punchline" : ("...")))
This improves the performance, as the code only runs the required sections. I also use Time instead of sum(1) to further reduce calculations.
@jamesPLANESii On the SWL-120, the primary wings, the slat rotators, and some exposed aileron rotators are 0,0,0 scale. If I need to change something I can either make my way to them via connections (my part connections are very organized) or looking directly in the xml.
@GoodPattRail It is misleading, as the thumbnail does not show the build itself. As stated in the rules, "posts with misleading thumbnails will be removed."
Spooky coincidence, but my boot SSD went poof this morning as well. Luckily 99% of my data is backed up, but I lost 1 month worth of work on the SWL-120's mod. It's nothing critical, although it's a setback. I also am down to one laptop while I wait to get a new SSD as well.
@SARACONIKaviationIndustry Hello, I am happy to share it with you, although it relies on several aircraft variables which in turn use other variables. What I can do is give you the raw label code and some of the essential variables; hopefully you can understand how it works with that. It will likely be a while before I can send it to you; I have some irl stuff to do.
Update, just looked at my code and in the earlier example I sent, I define variables and then set different ones. This new comment fixes that. I also made all the characters show up correctly (for example this:
"<"
doesn't turn into this: "<"
)
Right after the behavior class start:
Jundroo.SimplePlanes.ModTools.Parts.IInputController[] inputs = new Jundroo.SimplePlanes.ModTools.Parts.IInputController[3]; private float _scaleX = 0; private float _scaleY = 0; private float _scaleZ = 0;
In the start void:
inputs = this.GetComponentsInChildren<Jundroo.SimplePlanes.ModTools.Parts.IInputController>();
In the update void, wherever you please: this._scaleX = inputs[0].Value; this._scaleY = inputs[1].Value; this._scaleZ = inputs[2].Value;
And obviously you can take the basic syntax structure and change it as you need. This code is for three input controllers.
Also, if you're wondering what stuff like private is, they are keywords in C# but they don't seem to be required for the purpose of scripting part behavior. Some of my variables have them, some don't. My code is also a mix of random stuff I got from other mods and the internet, but it works.
I actually had the exact same issue as you!
Example code:
Right after the behavior class start: // Array of input controllers.
Jundroo.SimplePlanes.ModTools.Parts.IInputController[] inputs = new Jundroo.SimplePlanes.ModTools.Parts.IInputController[3];
float input_scaleX;
float input_scaleY;
float input_scaleZ;
In the start void: inputs = this.GetComponentsInChildren<Jundroo.SimplePlanes.ModTools.Parts.IInputController>();
And then just do this._scaleX = inputs[0].Value;
Hopefully you can understand how it works and can apply it to your own code.
It is a change made by the developers to promote newer aircraft, although you can still manually search for older crafts by adding ?d=0 to the address in the URL.
@hpgbproductions I guess I don't really mind for when I'm just placing stuff somewhere; I use the increments of 0.0001, 0.0002... 0.0064, 0.0128, etc). idk it's just what I do, I guess. Obviously for fuselages I'll let them align themselves, but everything else is pretty much nudge it until it's seamless (down to 0.0001, although sometimes I type in more precise numbers)
@hpgbproductions What do you mean by coordinates in this context? I would think when building the numbers don't matter; it's the position of the part relative to other parts that matters.
@Graingy A phone is far worse because everything is so tiny, even just doing normal phone things (I really prefer my computer setup lol).
On an iPad I just have more space to interact with and see stuff.
@SWL120NEED What are your device specs?
@lalalalalion Thanks!
+2@JBPAviation I just grabbed it from SPBC's multiplayer channel, must be down or something
160.251.58.131 and 121.175.24.237
You need 100 or more points to post an image, likely due to previous abuse as spam.
+3Sometimes all I have to show for 2 hours of "work" is a few new parts on my 3000 part interior
+1@Graingy I released the SWL-120 early if you want to check it out
+1@Cuboidable Nah it'll be free to download (in fact I think it's against the ToS to lock it behind a paywall).
+1@Solent Thanks!
@Solent I found the issue to be a feedback loop with the smooth() I used on the trim component of the altitude autopilot... not sure why I didn't catch this earlier. I have fixed this and updated the xml. Is the issue fixed for you now?
+1I personally prefer the current building method, although I'm probably an outlier since the parts of my plane that aren't externally created are in the tens of thousands of parts, with thousands of variables. Some heavy optimization would be nice though.
+3Use the videos page.
Very interesting. My landing gear code all uses the same smooth() timer, although it's more linear, with simple code (no ternary operators) to do things like open the gear doors in the first 1 second, and retract the gear for the next 8 seconds, followed by gear doors closing for the last second.
If you have the game on a computer, you can use the "3D Print/Export" button in the designer menu to export the loaded craft to a .obj file. From there you can convert it to STL and prepare it for printing.
I didn't make a video, but I did test it again and this is my feedback:
+1Movement: overall 5/10, but if scored relative to the type of craft 8/10 (obviously a large bomber/cruiser will be more sluggish than a fighter). The autotrim is a little jerky sometimes which detracts the score.
Weapons: I haven't tested the advanced targeting systems, but selecting a target aims the cannons and a launched bomb will fly to the target. The autoaim on the cannons and autoflight on the bombs is good. 9/10 (sometimes bombs loop around targets)
Playability: ignoring the actual framerate and game performance, the actual craft is fun to control and startup once I'm familiar with it. One thing I should note is the lack of any labelled diagrams, as when I first flew it a while ago I was struggling to find the controls mentioned in the checklists. Once I did know where everything was, the engine startup sequence was pretty fun. I'd give playability an 8/10, the detractors being a lack of diagrams and some quirks with how it flies sometimes.
I would also like to note how it leans back when first spawned in. Maybe consider moving the CoG forward or the main landing gear backward?
@LowQualityRepublic It is
It's insanely complex and took me many months though
@MalaySmoker ohh I see now. I'll test and add that when I get a chance.
@MalaySmoker Isn't it ignitionDelay?
@rimiha It's fixed now, excellent.
+1@griges I can have a look, yes
+1hmm, I don't really know then
+1Is the height of the label part big enough?
did you put each <voffset>tag on a new line?
@SemedianIndustries Possibly, although it will be a few days.
You need to copy the direct image link, such as
https://e3.365dm.com/21/07/2048x1152/skynews-boeing-737-plane_5435020.jpg
@Graingy It's in the guide in the "Number Input Variables" section close to the top.
+1One way to improve the code in the label is to use a stacked tertiary selector. For example:
+4Time < 2 "Funny text" : (Time < 3 ? "..." : (Time < 4 ? "Punchline" : ("...")))
This improves the performance, as the code only runs the required sections. I also use Time instead of sum(1) to further reduce calculations.
game was not responding for 5 minutes and I gave up lol
+1@HungrySu34 20 thousand
I get a few frames per second in the designer, currently waiting for 1 minute to load the level
+1alright time to see how the NASA PC capable of running the SWL-120 handles this
+2@jamesPLANESii On the SWL-120, the primary wings, the slat rotators, and some exposed aileron rotators are 0,0,0 scale. If I need to change something I can either make my way to them via connections (my part connections are very organized) or looking directly in the xml.
+1
+1[PaintBrushSP](https://www.simpleplanes.com/u/PaintBrushSP)
PaintBrushSP
@SARACONIKaviationIndustry I have uploaded a demo version here.
@GoodPattRail It is misleading, as the thumbnail does not show the build itself. As stated in the rules, "posts with misleading thumbnails will be removed."
+1You used a screenshot of the characteristics instead of a picture of the actual build in the thumbnail.
+1My SSD decided to start working again and I got all my stuff back (which now has automatic backups in place); hopefully your laptop does the same.
+1Spooky coincidence, but my boot SSD went poof this morning as well. Luckily 99% of my data is backed up, but I lost 1 month worth of work on the SWL-120's mod. It's nothing critical, although it's a setback. I also am down to one laptop while I wait to get a new SSD as well.
+2@SARACONIKaviationIndustry Hello, I am happy to share it with you, although it relies on several aircraft variables which in turn use other variables. What I can do is give you the raw label code and some of the essential variables; hopefully you can understand how it works with that. It will likely be a while before I can send it to you; I have some irl stuff to do.
@ArmouredTrashCan good to hear
Update, just looked at my code and in the earlier example I sent, I define variables and then set different ones. This new comment fixes that. I also made all the characters show up correctly (for example this:
"<"
doesn't turn into this:
"<"
)
Right after the behavior class start:
Jundroo.SimplePlanes.ModTools.Parts.IInputController[] inputs = new Jundroo.SimplePlanes.ModTools.Parts.IInputController[3];
private float _scaleX = 0;
private float _scaleY = 0;
private float _scaleZ = 0;
In the start void:
inputs = this.GetComponentsInChildren<Jundroo.SimplePlanes.ModTools.Parts.IInputController>();
In the update void, wherever you please:
this._scaleX = inputs[0].Value;
this._scaleY = inputs[1].Value;
this._scaleZ = inputs[2].Value;
And obviously you can take the basic syntax structure and change it as you need. This code is for three input controllers.
Also, if you're wondering what stuff like
private
is, they are keywords in C# but they don't seem to be required for the purpose of scripting part behavior. Some of my variables have them, some don't. My code is also a mix of random stuff I got from other mods and the internet, but it works.@ArmouredTrashCan oh, < is <, same with > and >
It's just how code blocks format it.
I actually had the exact same issue as you!
Example code:
Right after the behavior class start:
// Array of input controllers.
Jundroo.SimplePlanes.ModTools.Parts.IInputController[] inputs = new Jundroo.SimplePlanes.ModTools.Parts.IInputController[3];
float input_scaleX;
float input_scaleY;
float input_scaleZ;
In the start void:
inputs = this.GetComponentsInChildren<Jundroo.SimplePlanes.ModTools.Parts.IInputController>();
And then just do
this._scaleX = inputs[0].Value;
Hopefully you can understand how it works and can apply it to your own code.
In the very early days of SP, Wright Airport used to be a single runway airstrip (just a rectangle with a texture) called Tarpley Airport
+9@MIGFOXHOUND31BSM26 They actually removed it entirely at one point, and I asked them to add back d=0
It is a change made by the developers to promote newer aircraft, although you can still manually search for older crafts by adding ?d=0 to the address in the URL.
@hpgbproductions I guess I don't really mind for when I'm just placing stuff somewhere; I use the increments of 0.0001, 0.0002... 0.0064, 0.0128, etc). idk it's just what I do, I guess. Obviously for fuselages I'll let them align themselves, but everything else is pretty much nudge it until it's seamless (down to 0.0001, although sometimes I type in more precise numbers)
SimpleCheats
Speed is meters per second, although I don't seem to have the unit for forward thrust.
@hpgbproductions What do you mean by coordinates in this context? I would think when building the numbers don't matter; it's the position of the part relative to other parts that matters.
@Graingy A phone is far worse because everything is so tiny, even just doing normal phone things (I really prefer my computer setup lol).
+1On an iPad I just have more space to interact with and see stuff.
I used to be an iPad player (6 years ago) and I will never go back