Heres the YOLOL script! **If you are moving too fast when you get close to the asteroids, the first thing to try is reducing the last two T values on the 2nd line. I have them set to 20, but if your ship has a lot of thrusters, they may need to be set to 10 or lower. This part of the script limits max thrust. Every ship will be a little different.** X=10 Y=100/X Z=15 IF :AP==1 then :FC=0 goto2 else :FC=9 goto1 end IF :APD20 then T=20 end :FCUforward=T IF:AP==0 Then Goto1 end IF :APD>X then goto2 end IF :APD
Edit: I successfully converted this script for FcuUpDown to be able to have an auto approach for my ships hangar bay. If anyone is also curious on how to do this here is the YOLOL edit- X=.8 Y=100/X Z=1.5 IF :AP==1 then :FC=0 goto2 else :FC=9 goto1 end IF :APD50 then T=50 end :FcuUpDown=T IF:AP==0 Then Goto1 end IF :APD>X then goto2 end IF :APD
@@yoloactual6975 The Z value is limiting your thrust. In the second line where it says T=(:APD/Z)-1, even if APD is 1000 your max thrust will always be under 100 unless you have Z set to under 10. You can scale it from 100% thrust by changing Z to under 10 but then you'll come within 10 meters, or if you want to be at full throttle until it kicks down to a certain percentage, you can change the last T= on the second line to 100. This will put you at full throttle rather than limiting you if T exceeds whatever value the T> is. So if it said " IF T>35 then T=100 end " it would set you to full throttle any time you would have otherwise been 35% or more thrust.
Long since dead game and post but I thought I'd necro for others that may see this in the future like me who kinda head scratched for a sec. you can move :FC=9 from line 1 (constantly resetting FC to 9 and not allowing a cruse control) you can move it to line 3 IF :AP==0 then :FC=9 goto1 end (so when the AP system is turned off it will set the FC to 9 once allowing a cruse control input to then be set after)
FYI: "IF :AP==1 then" can also be stated as: "IF :AP then" in YOLOL. Also, for clarification, the reason why "T" has no " : " is because the colon is used to reference one of the fields on a device.
Line 1 can be shortened considerably, allowing more room for this script to work with an existing cruise control system. 'X=10 Y=100/X Z=15 if :AP then :Cruise=0 goto2 end goto1' With most un-nested if/then statements you don't need to use else, specifically if you're only testing for a 1/0. You can end the if statement and then just put the else part after the end. YOLOL will continue on the same line after an if statement has ended, it doesn't automatically jump to the next line in the script. You also don't need to change :Cruise to 9 because you're cruise button will take care of the throttle centering speed.
Now we're getting there! My only change was to set a line to toggle my asteroid avoidance system off. When you cover that script, you might want to mention that interaction.
BTW, thanks for sharing this code. I'm horrible with mathematic YOLOL, this was a big help for me, I really needed an auto approach script for my mining ship, but I'm not good enough with the mathematics behind doing it. I custom wrote most of the scripts on my ship, but this one was just out of my league.
for everyone that's having the cruise control problems Just change the first line From: 1# X=10 Y=100/X Z=15 IF :AP==1 then :FC=0 goto2 else :FC=9 goto1 end To: 1# X=10 Y=100/X Z=15 IF :AP==1 then :FC=0 goto2 else :FC=0 goto1 end so you just changing the 9 to a 0 in the last part of the line and now when AP=0 FC=0 so the AP button is working as a cruise control swell you just lose the ability to have cruise control off so its always on but that's fine for me at least with the script you dont really need it anway Awesome script btw man, Tnx alot
There are a couple ways, in my opinion the easiest is just to change how cruise functions. I would use a new YOLOL chip and use one line of code that says IF :Cruise==1 then :FCUforward=100 end goto1 This will make your cruise button put your ship at full throttle moving forward until you turn off cruise. Make sure your button on state value is 1.
Here you go. Replace the first line with the following two lines (don’t forget to adjust the goto line references in rows 2 to 4 because they’ll now be rows 3 to 5): x=10 y=100/x z=20 if :ap==1 then goto2 else goto1 end If :cruise==0 then goto3 else goto1 end This means that when cruise is off the range finder will just display the distance but won’t activate the approach sequence. When you want approach just hit your cruise button when AP is on and it will start the approach. If AP is off cruise will work normally. To stop the approach once engaged just turn off AP and you’ll be back in normal cruise mode.
my fcubackwards is locked in at -1 if I deactivate my approach script. how do I fix that ? thanks and your videos are awesome. straight to the point, no fluff. thanks for that.
After connecting the script, the cruise does not work, it moves forward only when the forward button is pressed. I don’t know how to solve this problem
It will break the default cruise. I feel the easiest solution is to just change how cruise works. You will need any yolol chip and 1 line of yolol that says IF :Cruise==1 then :FCUForward=100 end goto1 This will set you to full throttle and keep you there whenever the cruise button is pressed. There are different solutions posted by others in the comments also.
Works great but doesnt this break cruise mode? My cruise button was set to FC. If i rename Cruise to be FC then the yolo script basically tells it if AP is on then Cruise is on, which is fine as that means we are approaching an asteroid, but if :AP doesn't = 1 then :FC is set to 9. So If I'm not approaching an asteroid, cruise control is disabled?
It will break that type of cruise unfortunately. There are a few work arounds but I feel the easiest solution is to just change how cruise works. You will need any yolol chip and only 1 line of yolol that says IF :Cruise==1 then :FCUForward=100 end goto1 This will set you to full throttle and keep you there whenever the cruise button is pressed.
@@SpunieBard Is there an easy way to do this with 4 different names of range finders? (Eg. the range finders already on the ship for asteroid avoidance) I made a simple on/off switch for the AAS yolol. So I should be able to reuse them right?
@@7heSH4K You will need an additional YOLOL chip, a memory chip and other components that are in this video. In memory chip you will need to rename one field to APD (the same one that is used in the video that tells you the distance). In YOLOL chip you will need to put a following line for each of the rangefinders: IF :R1D
Spunie bravo pour tout les vidéos que tu as fait, maintenant je comprends un peu yolol. Dernierement j ai décidé d installer le mode turtle sur mon ship. J ai poser un hybride button et appelé Turtle en mode on off button. Apres j ai fais un script yolol. if :Turtle==1 then :FcuForward=20 end 2e ligne goto1 pis ca marche pas. en passant j ai ton script AP installé sur mon ship sans modification tout comme tu nous la montré. J ai vu une ligne dans ton script qui dis :FcuForward=T , J ai essayer avec T ca marche pas non plus que dois je faire stp?
I made an updated script if you want to include a cruise button: X=10 Y=100/X Z=15 IF :AP==1 Then:FC=0 else goto2 end goto3 IF :Cruise==0 then:FC=9 else:FC=0 end :FCUBackward=0 goto1 IF :APD20 then T=10 end :Cruise=0 :FCUForward = T IF :AP==0 then goto1 end IF :APD>X then goto3 end IF :APD
Heres the YOLOL script!
**If you are moving too fast when you get close to the asteroids, the first thing to try is reducing the last two T values on the 2nd line. I have them set to 20, but if your ship has a lot of thrusters, they may need to be set to 10 or lower. This part of the script limits max thrust. Every ship will be a little different.**
X=10 Y=100/X Z=15 IF :AP==1 then :FC=0 goto2 else :FC=9 goto1 end
IF :APD20 then T=20 end
:FCUforward=T IF:AP==0 Then Goto1 end IF :APD>X then goto2 end
IF :APD
Don't see any Yolol Scrip, did you remove it?
You have to click “read more” at the bottom of the comment because it’s kind of long. Let me know if you still don’t see it.
@@SpunieBard lol Lord, I'm getting old, Your code Rocks man thanks
Edit: I successfully converted this script for FcuUpDown to be able to have an auto approach for my ships hangar bay. If anyone is also curious on how to do this here is the YOLOL edit-
X=.8 Y=100/X Z=1.5 IF :AP==1 then :FC=0 goto2 else :FC=9 goto1 end
IF :APD50 then T=50 end
:FcuUpDown=T IF:AP==0 Then Goto1 end IF :APD>X then goto2 end
IF :APD
@@yoloactual6975 The Z value is limiting your thrust. In the second line where it says T=(:APD/Z)-1, even if APD is 1000 your max thrust will always be under 100 unless you have Z set to under 10. You can scale it from 100% thrust by changing Z to under 10 but then you'll come within 10 meters, or if you want to be at full throttle until it kicks down to a certain percentage, you can change the last T= on the second line to 100. This will put you at full throttle rather than limiting you if T exceeds whatever value the T> is.
So if it said " IF T>35 then T=100 end " it would set you to full throttle any time you would have otherwise been 35% or more thrust.
Long since dead game and post but I thought I'd necro for others that may see this in the future like me who kinda head scratched for a sec.
you can move :FC=9 from line 1 (constantly resetting FC to 9 and not allowing a cruse control) you can move it to line 3 IF :AP==0 then :FC=9 goto1 end (so when the AP system is turned off it will set the FC to 9 once allowing a cruse control input to then be set after)
These are so good, calm, easy to understand. These should be linked from the game!
FYI: "IF :AP==1 then" can also be stated as: "IF :AP then" in YOLOL. Also, for clarification, the reason why "T" has no " : " is because the colon is used to reference one of the fields on a device.
Line 1 can be shortened considerably, allowing more room for this script to work with an existing cruise control system.
'X=10 Y=100/X Z=15 if :AP then :Cruise=0 goto2 end goto1'
With most un-nested if/then statements you don't need to use else, specifically if you're only testing for a 1/0. You can end the if statement and then just put the else part after the end. YOLOL will continue on the same line after an if statement has ended, it doesn't automatically jump to the next line in the script. You also don't need to change :Cruise to 9 because you're cruise button will take care of the throttle centering speed.
Now we're getting there! My only change was to set a line to toggle my asteroid avoidance system off. When you cover that script, you might want to mention that interaction.
BTW, thanks for sharing this code. I'm horrible with mathematic YOLOL, this was a big help for me, I really needed an auto approach script for my mining ship, but I'm not good enough with the mathematics behind doing it. I custom wrote most of the scripts on my ship, but this one was just out of my league.
Glad I could help!
Absolutely amazing! Thanks so much for this. Very, very helpful. 💯
for everyone that's having the cruise control problems
Just change the first line From:
1# X=10 Y=100/X Z=15 IF :AP==1 then :FC=0 goto2 else :FC=9 goto1 end
To:
1# X=10 Y=100/X Z=15 IF :AP==1 then :FC=0 goto2 else :FC=0 goto1 end
so you just changing the 9 to a 0 in the last part of the line and now
when AP=0 FC=0 so the AP button is working as a cruise control swell
you just lose the ability to have cruise control off so its always on
but that's fine for me at least
with the script you dont really need it anway
Awesome script btw man, Tnx alot
Easy to understand.
Great work ! Is it possible to use the same Range finder that the AAS uses ? What modifications i would have to do then ?
A good thing to add at end of yolol is comments on the meaning of the variables etc using //
This script should also disable the avoid script. Maybe this could be done in a separate "ship-behavior" script.
Great idea!
Thank you so much for these gems 💎 ✨ 💖
wow :) thank you for this Tutorial, it was what I would like to know 👍😎🖖
So my LeverCenteringSpeed button is already replaced by my Cruise variable. How can I use both?
There are a couple ways, in my opinion the easiest is just to change how cruise functions. I would use a new YOLOL chip and use one line of code that says
IF :Cruise==1 then :FCUforward=100 end goto1
This will make your cruise button put your ship at full throttle moving forward until you turn off cruise. Make sure your button on state value is 1.
@@SpunieBard thanks!
Clear and concise, thank you!
Can you make a PID using Yolol instead? I feel it would be impractical with such execution rate.
Thanks. I wouldnt figure this out myself, its more complicated than i though...
Thanks for the script. I have a button called Cruise that uses the same forward field. Could you show how to use the 2 systems together?
Here you go. Replace the first line with the following two lines (don’t forget to adjust the goto line references in rows 2 to 4 because they’ll now be rows 3 to 5):
x=10 y=100/x z=20 if :ap==1 then goto2 else goto1 end
If :cruise==0 then goto3 else goto1 end
This means that when cruise is off the range finder will just display the distance but won’t activate the approach sequence. When you want approach just hit your cruise button when AP is on and it will start the approach. If AP is off cruise will work normally. To stop the approach once engaged just turn off AP and you’ll be back in normal cruise mode.
@@brucecurtin4534 just what i was looking for thanks.
This is exactly what I would have done!Great!
Thanks.
@@brucecurtin4534 Thanks.
my fcubackwards is locked in at -1 if I deactivate my approach script. how do I fix that ?
thanks
and your videos are awesome. straight to the point, no fluff. thanks for that.
After connecting the script, the cruise does not work, it moves forward only when the forward button is pressed. I don’t know how to solve this problem
It will break the default cruise. I feel the easiest solution is to just change how cruise works. You will need any yolol chip and 1 line of yolol that says
IF :Cruise==1 then :FCUForward=100 end goto1
This will set you to full throttle and keep you there whenever the cruise button is pressed. There are different solutions posted by others in the comments also.
@@SpunieBard thanks
Works great but doesnt this break cruise mode? My cruise button was set to FC. If i rename Cruise to be FC then the yolo script basically tells it if AP is on then Cruise is on, which is fine as that means we are approaching an asteroid, but if :AP doesn't = 1 then :FC is set to 9. So If I'm not approaching an asteroid, cruise control is disabled?
It will break that type of cruise unfortunately. There are a few work arounds but I feel the easiest solution is to just change how cruise works. You will need any yolol chip and only 1 line of yolol that says
IF :Cruise==1 then :FCUForward=100 end goto1
This will set you to full throttle and keep you there whenever the cruise button is pressed.
Great video! Subscribed!
Do you have a link to the YOLOL script?
Its pinned in the comments, it should be the very first one.
I accidentally held shift for the first = in line 2 XD
how to do it with 4 beams?
Just name the other beams exactly like we named the first, no need to name them individually. YOLOL will then react to whichever beam is shortest.
@@SpunieBard Is there an easy way to do this with 4 different names of range finders? (Eg. the range finders already on the ship for asteroid avoidance) I made a simple on/off switch for the AAS yolol. So I should be able to reuse them right?
@@7heSH4K You will need an additional YOLOL chip, a memory chip and other components that are in this video. In memory chip you will need to rename one field to APD (the same one that is used in the video that tells you the distance). In YOLOL chip you will need to put a following line for each of the rangefinders:
IF :R1D
this is beautiful, and you are beautiful
Brilliant work.
Spunie bravo pour tout les vidéos que tu as fait, maintenant je comprends un peu yolol. Dernierement j ai décidé d installer le mode turtle sur mon ship. J ai poser un hybride button et appelé Turtle en mode on off button. Apres j ai fais un script yolol. if :Turtle==1 then :FcuForward=20 end 2e ligne goto1 pis ca marche pas. en passant j ai ton script AP installé sur mon ship sans modification tout comme tu nous la montré. J ai vu une ligne dans ton script qui dis :FcuForward=T , J ai essayer avec T ca marche pas non plus que dois je faire stp?
What?
I made an updated script if you want to include a cruise button:
X=10 Y=100/X Z=15 IF :AP==1 Then:FC=0 else goto2 end goto3
IF :Cruise==0 then:FC=9 else:FC=0 end :FCUBackward=0 goto1
IF :APD20 then T=10 end
:Cruise=0
:FCUForward = T IF :AP==0 then goto1 end IF :APD>X then goto3 end
IF :APD
Nice). Can you pin code,
Its pinned!