Skip to content

Instantly share code, notes, and snippets.

@johnpenny
Last active November 1, 2022 18:18
Show Gist options
  • Save johnpenny/6b1632204244df89d94de36c3a0bf203 to your computer and use it in GitHub Desktop.
Save johnpenny/6b1632204244df89d94de36c3a0bf203 to your computer and use it in GitHub Desktop.
starbase.deltaui
PROJECT: DELTA UI
BY: Oo
COMPANY: io
V: 1.1
LIC: FREE if you leave in the credit
$: Any IN-GAME donations are welcome
---------------------------------------------------------------------------
#### HOW TO INSTALL
1) You must have ISAN installed. Grab a new BASIC Yolol chip and a Memory chip (8 fields needed), and a spare connected text screen
2) Rename the screen to "."
3) IF NOT AlREADY DONE Modify ISAN to activate 'po', and allow modules; as shown in the ISAN doc: //isan.to/isan.pdf#page=9
If your ISAN already had external coordinate values for modules, you don't need to add the memory slots for XX YY ZZ.
4) Install the memory chip and write in the field names AND values (without the "") shown in the 'MEMORY CHIP VARS' section below
5) Paste all the DELTA UI Yolol code into your new Yolol chip
6) Reboot the chip by clearing the . screen value - you may have to do it a couple of times to work
7) Re-name your Transponder's safezone bool to 'TSZ' (OR set TSZ in the code to the name of yours)
8) Memory strings 'dus' and 'dud' are the safezone indication texts 'sz' and '!!' which you may want to edit to your liking (reboot!)
9) If you have any issues the first step is to reboot the chip by clearing the screen, as with ISAN
#### USING
- The 'compass' shows your axial movement DELTA, and NOT 'where you are looking'.
- It WAS called compass simply because Starbase has NESW transmitters. Now it's called DELTA UI
- The middle (depth) indicator shows the planet EOS, with arrows pointing IN when you are going towards it, and OUT when you move away
and go towards the asteroid belt (ONLY if you are out from the Origin ring).
-These visual frames of reference are NOT set in stone, as once you move far enough away from the origin ring, you must also consult
the ISAN coords screen to ensure you are in the right area of space. Then you can glance at the DELTA UI to check your delta.
- If lost and you wish to return to the origin ring, you should aim for coords 0,0,0 and the ring should come into view.
- ISAN: https://isan.to/isan.pdf
- With all that said, this is more of a glancing indicator, and a cool panel, than a nav tool.
---------------------------------------------------------------------------
#### YOLOL
-START YOLOL-----------------
h=:duh zp=:dup zn=:dun sz=:dus dz=:dud s=" " g=" " l="\n"
p="[+]" n="[-]" e="[ ]" dn="[/]" up="[~]"
op=p opl=g+p on=n onl=g+n oe=e oel=g+e
t=" NAV :.\n" idl=t+h+l+g+dn+l+l rbt=t+h+l+g+up+l+l
:.=rbt+h IF:TSZTHEN:.+=szELSE:.+=dzEND
///////////////////// DELTA UI BY:Oo COMPANY:io //////////////////////
// PLEASE FIRST READ ISAN INTRO: ISAN.to/doc
// [+Y] Y axis == origin_north (+) to origin_south (-)
// [-X]>ZZ<[+X] X axis == origin_east (+) to origin_west (-)
// [-Y] Z axis == OUT+ / IN- (OUT from & IN to planet)
// "SZ" sz == IN Safezone !! == NOT IN Safezone
//////////////////////////////////////////////////////////////////////
q=:.!="" j=0 IF:zz==zzTHENr=idl il=1 GOTO20*q ELSEil=0 GOTO14*q END
q=:.!="" i=0 IF:xx==xxTHENx=a i++END IF:yy==yyTHENy=b i++END GOTO15*q
IF:zz==zzTHENz=c i++END IFi>2THEN j++ IFj>3THEN GOTO13 END GOTO14 END
IF:xx>xxTHENx=1END IF:yy>yyTHENy=1END IF:zz>zzTHENz=1END
r=+t+h IFyTHENr+=opl+lELSEr+=oel+lEND IFxTHENr+=s+oeELSEr+=s+onEND
a=x b=y c=z IFzTHENr+=zpELSEr+=znEND IFxTHENr+=op+lELSEr+=oe+lEND
IFyTHENr+=oel+lELSEr+=onl+lEND xx=:xx yy=:yy zz=:zz x=0 y=0 z=0
q=:.!="" r+=h IF:TSZTHENr+=szELSEr+=dzEND :.=r GOTO14-il*q
-END YOLOL------------------
---------------------------------------------------------------------------
#### MEMORY CHIP VARS (5 for this, 3 for ISAN, 2 spare)
duh = "——————————\n"
dup = "«◦»"
dun = "»◦«"
dus = " 「 sz 」\n"
dud = " 「 !! 」\n"
xx = (DYNAMIC FROM ISAN)
yy = (DYNAMIC FROM ISAN)
zz = (DYNAMIC FROM ISAN)
---------------------------------------------------------------------------
#### SCREEN NAME
. (a single full stop)
---------------------------------------------------------------------------
#### TRANSPONDER
Your transponder safe zone bool should be named as :TSZ, or edit the yolol to match yours
---------------------------------------------------------------------------
#### ISAN - ALLOW MODULES
1) Allow modules by making coords external (memory chip) by following instructions here: //isan.to/isan.pdf#page=9
2) I recommend you turn on po by changing po=1 to po=0 on the top line of ISAN, if it is not already done
---------------------------------------------------------------------------
#### OPTIONALLY CHANGE THE TITLE
On line 4 the title string can be changed but you must keep it below 8 chars long and do not remove the \n
sl=" NAV :.\n"
sl=" DIR :.\n"
sl="Hello...\n"
sl=" :.\n"
---------------------------------------------------------------------------
#### REBOOTING
To reboot and init new variables, just delete the content of your text screen field, you may have to try a few times.
Last resort: put a space between the 1 and 4 on the last GOTO14 on line 20, then immediately delete the space.
#### NOTHING WORKS! HELP!
Sometimes I get memory fields or chips that will not load or update.
I am currently not aware how to solve this, seems like a game bug.
I just delete everything and re-paste it all.
If you need to start over I highly recommend downloading Visual Studio Code, and grabbing this extension to allow you to paste Yolol
into game quickly: //marketplace.visualstudio.com/items?itemName=dbaumgarten.vscode-yolol
You can see the instructions for quick pasting here: //dbaumgarten.github.io/yodk/#/vscode-instructions?id=auto-typing-into-starbase
@zallek
Copy link

zallek commented Aug 17, 2021

@johnpenny Hey. Great stuff!
Do you think this script could easily be tweaked to display directional arrows toward a given destination point (target coordinates would be saved in a memory chip)

@DerSoftwerker
Copy link

FYI: In ISAN 2.5, the Memory chip fields are now X, Y and Z instead of XX, YY and ZZ.

In order to use Delta with ISAN 2.5, make sure to adjust the fields in here to.

@requiamer
Copy link

Hi, thanks for the code.
I try to install this in the ship designer. I have what is shown in your first screenshot. It also show when i turn on/off the transponder as SZ, or !!.
The thing is, when flying nothing change, it only show i'm going toward the planet, arrow toward inside and minus for 2 coord. But if i move the ship it stay the same, no matter if i face the planet, or move any direction. Is it because i'm in test mode, or i did something wrong? Some of the step i honestly I am not sure if i did them correctly.

My Isan is working, it show both coord and speed, and they do update while flying. I installed isan 2.5 and i have x,y,z in the fields of the memory chip (not sure what i put in the value though; do i let them blank? or i copy the (DYNAMIC FROM ISAN)?). Do you maybe need to update the code for Isan 2.5?

@madrabbit711
Copy link

madrabbit711 commented Oct 11, 2021

For ISAN v2.5

h=:duh zp=:dup zn=:dun sz=:dus dz=:dud s=" " g=" " l="\n"
p="[+]" n="[-]" e="[ ]" dn="[/]" up="[~]"
op=p opl=g+p on=n onl=g+n oe=e oel=g+e
t=" NAV :.\n" idl=t+h+l+g+dn+l+l rbt=t+h+l+g+up+l+l
:.=rbt+h IF:TSZTHEN:.+=szELSE:.+=dzEND
///////////////////// DELTA UI BY:Oo COMPANY:io //////////////////////
// PLEASE FIRST READ ISAN INTRO: ISAN.to/doc
// [+Y] Y axis == origin_north (+) to origin_south (-)
// [-X]>ZZ<[+X] X axis == origin_east (+) to origin_west (-)
// [-Y] Z axis == OUT+ / IN- (OUT from & IN to planet)
// "SZ" sz == IN Safezone !! == NOT IN Safezone
//////////////////////////////////////////////////////////////////////
q=:.!="" j=0 IF:z==zzTHENr=idl il=1 GOTO20*q ELSEil=0 GOTO14*q END
q=:.!="" i=0 IF:x==xxTHENvx=a i++END IF:y==yyTHENvy=b i++END GOTO15*q
IF:z==zzTHENvz=c i++END IFi>2THEN j++ IFj>3THEN GOTO13 END GOTO14 END
IF:x>xxTHENvx=1END IF:y>yyTHENvy=1END IF:z>zzTHENvz=1END
r=+t+h IFvyTHENr+=opl+lELSEr+=oel+lEND IFvxTHENr+=s+oeELSEr+=s+onEND
a=vx b=vy c=vz IFvzTHENr+=zpELSEr+=znEND IFvxTHENr+=op+lELSEr+=oe+lEND
IFvyTHENr+=oel+lELSEr+=onl+lEND xx=:x yy=:y zz=:z vx=0 vy=0 vz=0
q=:.!="" r+=h IF:TSZTHENr+=szELSEr+=dzEND :.=r GOTO14-il*q

You may also need:
IF :insideSafeZone==0 THEN GOTO2 ELSE :TSZ=1 :notSafeZone=0 END GOTO1
:TSZ=0 :notSafeZone=1 GOTO1

I also prefer:
dup = "«+»"
dun = "»-«"

@smooreace
Copy link

smooreace commented Oct 11, 2021 via email

@madrabbit711
Copy link

madrabbit711 commented Oct 12, 2021

Talk about a hot mess!

How so?

All that's changed is making this suited for ISAN v2.5:
a) :xx to :x, :yy to :y and :zz to :z as per ISAN v2.5 new global variables
b) x to vx, y to vy, z to vz to avoid conflict with above ISAN v2.5 global variables

That's it.

TSV is as stated above by johnpenny i.e. safe zone indication if you want it but not essential.
My changes to dup and dun are just my preferences and again not essential.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment