Stationeers

Stationeers

Basic-IC10-Compiler
74 Comments
John 27 Sep @ 11:18pm 
yeah, you're right
Exca133  [author] 27 Sep @ 6:32pm 
Thanks for the suggestion, John.

The format we’re working with here is a high-level language, so it’s not straightforward to add live predictions like in the in-game lb preview. In a low-level language such as IC10 MIPS, each operation expects only one very specific type of parameter, which makes it easier to anticipate the next token. In a Basic-style language, however, there’s no reliable way to predict whether the user intends to type "=", "+", "-", "C", "%", or something else, unless we integrate a machine learning component — which would add too much complexity for this context.

I’m open to any suggestions you might have for a simpler approach.
John 27 Sep @ 3:32pm 
could you add predictions similar to the in-game live predictions (aka just like in-game when i type lb and a preview appears, could you do the same thing here)
Exca133  [author] 13 Aug @ 4:13am 
Hey @Bosch_Drill,
There were no major changes in the IC10 language, so yes, you can use it.
You asked how precise it is, I’m not sure how to answer that. Since it’s a compiler, the precision depends on your code. You’ll need to understand the device variables and how to use them to control the devices you need.
There are plenty of examples on GitHub to help you get started, and you can also join our Discord for support.
Cheers!
Bosch_Drill 11 Aug @ 9:07am 
Hey! Nice work. Well, last commit at github was last year, i'm kinda wondering, can i still use this compiler for nowadays? Like, make code for devices etc. And how precise is compiler work?
Exca133  [author] 4 Jul @ 7:05pm 
This comment is awaiting analysis by our automated content check system. It will be temporarily hidden until we verify that it does not contain harmful content (e.g. links to websites that attempt to steal information).
zorax4295 3 Jul @ 10:53pm 
Hello would it be PAUSSIBLE to add a functionality allowing us to select the maximum number of lines authorize in IC10 because with mods like More Lines of Code https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=32652725
We have 512 line and not 128
Oakrotic 9 Jun @ 10:00am 
@jarhead

The first result on google for "ChatGPT" is the tool, under OpenAI's site. OpenAI is just the business that develops it, perhaps you thought it was something different?

Anyways, here is the link : https://openai.com/
jarhead 25 Apr @ 7:39pm 
(too bad we can't use C#, C+, C++ or even basic html or java to code this stuff. (I have used those and the different code languages can get confusing while learning them.)
jarhead 25 Apr @ 7:37pm 
Where do I get ChatGPT because I have done a google search for it and keep finding a bunch of news stories or descriptions of it (and other stuff like that) but not the actual software itself or even a website that runs it publicly?
Exca133  [author] 25 Apr @ 3:59pm 
Hey @jarhead!
Technically, it is a completely different job. Unfortunately, it is very complex to do reverse compilation. In MIPS (the IC Code), you can program and use registers as you want. One function in MIPS can be part of many other functions when it comes to a higher-level programming language like Basic. So, there is no direct way to reverse the process and decompile a MIPS code.
What you can try is to use ChatGPT or any other tool that is able to read the Basic compiler documentation (you can download it and feed it to ChatGPT), and ask it to re-create your MIPS code into Basic.
Cheers,
jarhead 25 Apr @ 6:37am 
Can you add the ability to "decompile" ic code from stationeers to allow altering (editing) it for our use. This can also help us to learn to use the compiler faster (I have a few ic codes I made with help and want to make a few more custom codes and try to get the ones I already made to be more efficient.)
Exca133  [author] 11 Apr @ 6:04am 
Hey @Xinax, the save folder used by the Basic IC10 compiler isn't easily configurable. It's set automatically when the tool starts, and currently, there's no built-in setting to change the script save location.

Personally, I avoid using the save function altogether. I prefer to write and organize my code externally using Notepad++ (or any text editor), then use the compiler only to test and compile the script. When it's ready, I just copy and paste the final version into the game. This helps keep the in-game library clean and makes it easier to manage scripts by save or project. 😅

I know it's not the most flexible setup. Sorry for not having a better solution for you.
Cheers,
Xinax 11 Apr @ 5:38am 
Could it be possible, to change the directory where the scripts are saved? I like to code when I am not at home and find it a hassle to copy the Stationeers folder. Maybe like a setting to change the script location, to where I want.
Mr.Toy 12 Jan @ 3:25pm 
@Exca133 thank you for your suggestion.
Great! 8 variables is exactly what I need.
Exca133  [author] 12 Jan @ 3:08pm 
Hey @Mr.Toy, Thanks for your feedback. I'm considering adding a special array that will be a communication array to read/write remote stack, but I couldn't dedicate time to making more updates to the tool. That's definitely something I'll add.
An alternative you can consider is reading/writing on channels. It's not as powerful as reading/writing the stack, but you should be able to store 8 variables on a shared circuit this way.
Cheers!
Mr.Toy 12 Jan @ 1:16pm 
Hi, thanks for the excellent tool!
But I have a question, is there any possibility to use direct writing to the stack using the "put" command?
OkayMystic 8 Nov, 2024 @ 8:10am 
@Exca133 I'll probably use that workaround.Thanks for the quick response and hard work you do!
Exca133  [author] 8 Nov, 2024 @ 8:02am 
Hey @OkayMystic!
No, they are not implemented.
The only option for now is to read a variable (for example the ReferenceID) using a .Name device, and compare it to 0.
I'm thinking about how I could implement the *dns functions dynamically, but I've tested earlier that they are not working with indirect addressing (example: bdns dr0 will return an error).
Any suggestion is welcome ;)
Exca133  [author] 8 Nov, 2024 @ 7:56am 
Hey @maryvofin! Thanks for the feedback!
I will consider it for a future update ;)
OkayMystic 8 Nov, 2024 @ 7:37am 
Hey I have a question, is there was any way to use commands like bdns, bdnsal, or bdse in this?
maryvofin 28 Oct, 2024 @ 4:07am 
Hi,
thanks for the tool. It saves a lot of time. Something i needed 3 ours to writein IC10 took me only 15 minutes in has only half the lines of code.
I am missing only 2 convenience things that i would like to see in the language.
1. Array.Length: That would prevent the need to hardcode length in the FOR loop. Sometimes FOREACH cannot be used because the index is actually needed
2. Short variant of defining and filling an array like ARRAY test = [1,2,3].
Exca133  [author] 19 Sep, 2024 @ 6:49pm 
Hey SpaceRug!
Yes, giving it visibility on the Workshop if you like it. ^^
Catatonic Ember 19 Sep, 2024 @ 6:08pm 
Out of curiosity, is there a reason to subscribe to the mod if you are using the external application?
Exca133  [author] 5 Jul, 2024 @ 5:46pm 
Thanks @cda2023 !
Unfortunately, it is very complex to do reverse compilation. For example, lookit at a loop in mips, you can't be sure if it should be a foreach, for-next, while. Also, when it cames to registers allocation, mips let you do anything, while a compiler like this one has strict rules about how to allocate a variables to mips registers. There is a lot of info on wikipedia about reverse compilers, very interesting though.
Cheers,
cda2023 5 Jul, 2024 @ 10:30am 
It's a great project, but I wanted to be able to translate the ic10 code into basic, so that I could then fix it to my needs. Currently, the editor cannot convert back the code from Ic10 to basic. You can add this - it will add popularity to the use of Basic, because writing on IC10 in 2024 is the stone Age and perhaps developers will pay attention to this project and it will be possible to write in basic immediately in the game although a fan of pascal
TwoPoint 30 Mar, 2024 @ 1:08pm 
oh hey thanks! the screenshot shows something a little different than i was thinking, but certainly functional, it also gives me some better ideas. Joined the discord in case i have any other questions :)
Exca133  [author] 30 Mar, 2024 @ 12:42pm 
Hey @TwoPoint! Yes, it can be done! There is one of the screenshots with an example, the one with the hydroponic trays. If you have any issues, please join our Discord, so we can have a look at your code together.
Cheers!
TwoPoint 30 Mar, 2024 @ 9:27am 
Is it possible to assign a batch of devices into an array (i.e myArray[0] = IC.device[device]) and then iterate through the array (using FOREACH) to change a setting? Trying this seems to get me an Addresser error...

I can use a less cleaner way in the meantime but knowing might help for future projects.
MacMAcMAc 27 Mar, 2024 @ 10:47pm 
Amazing!!
This will speed IC10 learning a lot
Thank you! :steamthumbsup:
Exca133  [author] 26 Mar, 2024 @ 7:24pm 
Hey @Emilgardis! If you are referring to the `sdns` checks, they are not implemented yet, but I'll add them to my backlog.

A workaround should be to use batch or named aliases, so you never need to set up the input pins, and you could also detect the presence of the device (by checking a ReferenceID > 0 for example).

Cheers!
Emilgardis 26 Mar, 2024 @ 5:25pm 
There doesn't seem to be a way to check for the presence of a device, or am I missing something, I basically want a device not set check
Alx 26 Mar, 2024 @ 5:29am 
@Exca133 thanks!
Exca133  [author] 25 Mar, 2024 @ 7:02pm 
Hey @Alx ! I'm adding it to the backlog. I'll add the options as "Meta" settings, that's the easiest way to add options in the code for now. Thanks for the explanations and examples.
Cheers!
Alx 25 Mar, 2024 @ 5:47pm 
There are cases when yield is superfluous, and if you remove it manually, then the order of the lines in relation to b (branch) and j (jump) is disrupted

In the URL I provide an example of a script where yield needs to be removed, and also #comments may seem unnecessary
https://drive.google.com/file/d/1IMVRifDLwtllKLiYpmfSH7qGnbyRGBxq/view?usp=sharing

Why remove comments - to make it convenient to send the compiled code to friends in discord in a “pure” form, in the same example above there are comments that may seem unnecessary in IC10
Exca133  [author] 25 Mar, 2024 @ 6:12am 
Hey, @Alx. Why would you like to remove comments and automatic yield?
Alx 25 Mar, 2024 @ 5:16am 
Hey, there seems to be some settings missing, such as a mode without saving #comments (with the ability to save #l.x), as well as disabling automatic addition of yield and other things.
Exca133  [author] 19 Mar, 2024 @ 7:04pm 
Hey @Alx ! I wasn't aware of the compiler's incompatibility with non-Latin alphabets, sorry for that!

I've partially addressed it:
- Cyrillic and Greek alphabets are now fully supported for variable names and comments (more tests and feedback are welcome!);
- Hiragana (and other Japanese alphabets), and Chinese characters can be used in comments (and possibly in variable names, although they might disrupt text caret positioning).
- Scripts using right-to-left writing (Arabic, and many others) are posing a real challenge and I will not be able to provide a quick fix until doing a complete overhaul of the tool. Sorry :(

About the VS Code integration, we had a prototype with @Traineratwot (who created the ICX extension), and there is still a lot of work to be compatible with VS Code. That is a Work In Progress.

Cheers!
TwoPoint 19 Mar, 2024 @ 4:48pm 
@Exca133

lol i realise i should have read a little bit more in the comments, sorry about that. thanks for the reply anyways!
Alx 19 Mar, 2024 @ 10:14am 
Thank you very much. Also thanks for the high quality documentation - now I can easily generate code using ChatGPT or Phind.

What's missing in my opinion:
1. Plugin for vscode
2. Support for other language characters in the input window, including Cyrillic
Exca133  [author] 19 Mar, 2024 @ 9:50am 
Hey @TwoPoint ! Thanks for the feedback !

You can CTRL+Scroll to zoom in/out and change the font size. This is the only text setting I've implemented.

About the difficulty, I must recognize that it was not an easy task to create the compiler from scratch. I started 5 months ago, watched a lot of online courses, and worked on it only during my free time.

Cheers!
TwoPoint 19 Mar, 2024 @ 5:30am 
this is amazing, thank you for creating this. would it be difficult to add some text settings? mainly font size... the text is pretty small on my screen but it is still usable.

another question is, how difficult was it to create your own compiler? im a little interested in the process of making one simply for curiosity.
Exca133  [author] 8 Mar, 2024 @ 8:51am 
Hey @lashtear !
That's it. It's a distribution repository, not source code. So people can download and use it directly without having to know how to compile it.
For now, I cannot distribute the source code because of some internal and licensed tools in it. But I will work later on an open-source DLL with the compiler without GUI.
Cheers!
lashtear 3 Mar, 2024 @ 6:01pm 
Nice idea but your repo has zips with the already-built release... what? Are you planning a source release?
BNE 28 Feb, 2024 @ 2:44am 
wow ... - just - double wow. Gonna have a look at it.
Radio Star 17 Feb, 2024 @ 7:36pm 
This is beyond cool.
Exca133  [author] 2 Feb, 2024 @ 2:44pm 
Hey @MerGatto :summercat2023: Thanks for your feedback !

I will continue to develop more features in it, and I'm planning to add some object-oriented programming features for more advanced devs. :steamhappy:

Cheers !
MerGatto 2 Feb, 2024 @ 12:58pm 
I absolutely love this. It sped up my IC Development sooo much.
Exca133  [author] 22 Jan, 2024 @ 4:02am 
Hey @Dunpeal Hunter! I'm happy to see so much positive feedbacks :steamhappy:

You can CTRL+Scroll to zoom in/out and change the font size.

Cheers!
Dunpeal Hunter 21 Jan, 2024 @ 9:00am 
Thanks for this tool! this should my coding make a lot more easier!

One question though, is there any way to make the lettertype bigger within the code? On my 4K monitor the code looks really tiny. For example: https://i.imgur.com/Nl9MCxZ.png