@Vikram123
Just FYI, I found some errors in the craft:
Edit: There are three errors. - The pylon for the third port side Mark 82 Bomb is misplaced, probably cause some janky undo/redo, and I missed it. - The activation group on the boom 50 part of the JDAMs are "False", which gets flagged by the debug log, as "False" is not recognised. Change "False" to "false" to avoid that issue. - Alternating hard left and hard right rudder causing harmonic oscillation causes something to explode in the vertical stabilizer and horizontal stabilizer intersection. Fix by setting the internal wing parts' "disableAircraftCollision" to "true".
I will tag everyone who have upvoted this post as I have addition information. See pinned comments.
@Tiper4062
@Graingy
@ComradeSandman
@TheMouse
@kyomunosekai
@ReinMcDeer
@rexzion
Ok, upon further testing I think I have a hypothesis as too why this happens.
_
For starters, I found that the "normal" wing can also serve as a buffer.
_
Now to the actual hypothesis:
The game has different classes of parts, I can't know the specifics, but one of the classes is what I will call "fuselage-type". This class includes all parts from the "structural" tab, and also any "block-type" parts, like engines, the fuel block, intakes, landing gears, etc. And most importantly, the structural wing is also classified as a "fuselage", whilst the normal wing is not.
_
The craft can be divided into fuselage sections, connected through non-fuselage parts. Most crafts, however, will only have one main fuselage section; this is what I'll focus on, but for multi-sectioned crafts, what I'll talk about can be applied to each section individually.
_
When a part of a fuselage section is destroyed, the game will have to update the model to reflect the new state the craft is in. This update will not only be to the visual model, but also to the physical/physics model. This update only occurs to the specific fuselage section that had a part destroyed. The physics model update will group any structural wings attached to the affected fuselage section together with the typical "fuselage-type" parts, however, the structural wing can have wing physics, while the other fuselage parts cannot. And I believe the function to update the model, when passing through the structural wing, will not take into account the XML of the structural wing, and instead default the structural wing to have wingPhysicsEnabled as false, thus "breaking" it.
_
It will take too much time to explain the evidence in words so use this craft to test for yourselves: https://www.simpleplanes.com/a/2i04Me/testCraft
_
Side note:
The rotator and detacher are technically "block-type" parts too, however, their specific connection - the one connection point that affects its function, will separate fuselage sections. This is probably the same for pylons as well, as they're "detacher-type" parts. And it's also why they can work as buffers.
I have found a way to buffer the structural wing. If the part destroyed is segregated from the structural wing via any rotator connection, the wing will not lose its function. However, all rotators also have joint wobble. At low stress loads, rotators' wobble is less than that of wing flex, however at higher loads it's actually way worse. And the main use of using structural wings is to not have extreme wing flex at high loads, so this work around is just replacing one problem with another. I can reduce the rotators' joint wobble by making it have more mass, but more mass is more mass, and at large enough it will throw the CoM off. And even then it will still have noticeable wobble unless I make the mass like something ridiculous like 1000x the original weight. At that point, especially for aircraft, the mass is more of a problem then the wings' function breaking when a part is destroyed.
_
Addendum: other "gizmo" parts that rely on connections such as the "shock", and "piston", can also act as buffer, but their wobble at high loads is even worse than that of rotators, and there is no way to reduce it, unlike rotaotrs.
The "detacher", and pylons also work, but like rotators, they have wobble, worse wobble in fact, and they run into the same problem of having to increase mass to dampen wobble.
New info:
I copied your text directly, the issue seems to be your quotation marks. The compiler does not recognise the quotation marks you're using, at least the ones you typed here. Try changing them to this by copying: " . And see if it fixes it.
Old Comment: Gear: {LandingGear = 1 ? "Up" : "Down" Works just fine for me. So does the {ammo(name)} function.
String outputs should be no problem.
My guess is that it could be a compiling problem. That would be a device or software specific problem, so I can't help much with that.
The default (new) "Wasp" also has code you can directly rip off too. See if the code works on that.
If it's not a compiling problem or some technical issue, then it just has to be debugged (check syntax first I guess).
@Ashdenpaw1 Seems like a Hornet's.
+1Western front, nothing new.
@Vikram123
Just FYI, I found some errors in the craft:
I will tag everyone who have upvoted this post as I have addition information. See pinned comments.
@Tiper4062
@Graingy
@ComradeSandman
@TheMouse
@kyomunosekai
@ReinMcDeer
@rexzion
Ok, upon further testing I think I have a hypothesis as too why this happens.
_
For starters, I found that the "normal" wing can also serve as a buffer.
_
Now to the actual hypothesis:
The game has different classes of parts, I can't know the specifics, but one of the classes is what I will call "fuselage-type". This class includes all parts from the "structural" tab, and also any "block-type" parts, like engines, the fuel block, intakes, landing gears, etc. And most importantly, the structural wing is also classified as a "fuselage", whilst the normal wing is not.
_
The craft can be divided into fuselage sections, connected through non-fuselage parts. Most crafts, however, will only have one main fuselage section; this is what I'll focus on, but for multi-sectioned crafts, what I'll talk about can be applied to each section individually.
_
When a part of a fuselage section is destroyed, the game will have to update the model to reflect the new state the craft is in. This update will not only be to the visual model, but also to the physical/physics model. This update only occurs to the specific fuselage section that had a part destroyed. The physics model update will group any structural wings attached to the affected fuselage section together with the typical "fuselage-type" parts, however, the structural wing can have wing physics, while the other fuselage parts cannot. And I believe the function to update the model, when passing through the structural wing, will not take into account the XML of the structural wing, and instead default the structural wing to have wingPhysicsEnabled as false, thus "breaking" it.
_
It will take too much time to explain the evidence in words so use this craft to test for yourselves: https://www.simpleplanes.com/a/2i04Me/testCraft
_
Side note:
The rotator and detacher are technically "block-type" parts too, however, their specific connection - the one connection point that affects its function, will separate fuselage sections. This is probably the same for pylons as well, as they're "detacher-type" parts. And it's also why they can work as buffers.
I have found a way to buffer the structural wing. If the part destroyed is segregated from the structural wing via any rotator connection, the wing will not lose its function. However, all rotators also have joint wobble. At low stress loads, rotators' wobble is less than that of wing flex, however at higher loads it's actually way worse. And the main use of using structural wings is to not have extreme wing flex at high loads, so this work around is just replacing one problem with another. I can reduce the rotators' joint wobble by making it have more mass, but more mass is more mass, and at large enough it will throw the CoM off. And even then it will still have noticeable wobble unless I make the mass like something ridiculous like 1000x the original weight. At that point, especially for aircraft, the mass is more of a problem then the wings' function breaking when a part is destroyed.
_
Addendum: other "gizmo" parts that rely on connections such as the "shock", and "piston", can also act as buffer, but their wobble at high loads is even worse than that of rotators, and there is no way to reduce it, unlike rotaotrs.
The "detacher", and pylons also work, but like rotators, they have wobble, worse wobble in fact, and they run into the same problem of having to increase mass to dampen wobble.
@Aano78
New info:
I copied your text directly, the issue seems to be your quotation marks. The compiler does not recognise the quotation marks you're using, at least the ones you typed here. Try changing them to this by copying: " . And see if it fixes it.
Old Comment:
Gear: {LandingGear = 1 ? "Up" : "Down" Works just fine for me. So does the {ammo(name)} function.
String outputs should be no problem.
My guess is that it could be a compiling problem. That would be a device or software specific problem, so I can't help much with that.
The default (new) "Wasp" also has code you can directly rip off too. See if the code works on that.
If it's not a compiling problem or some technical issue, then it just has to be debugged (check syntax first I guess).