Scrap Mechanic

Scrap Mechanic

ScriptableComputer
272 Comments
mimi♥ 11 Feb @ 2:00pm 
how can i detect terrain in specified range? do i use radar?
stalkerassassim 9 Nov, 2024 @ 8:00am 
Thank you very much!
BananaPen  [author] 9 Nov, 2024 @ 7:16am 
stalkerassassim: an example for working with hard drives, etc. is in my fork of this mod (+ optimized displays): https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2949350596
stalkerassassim 7 Nov, 2024 @ 6:23am 
can you send an example of how the HDD works?
stalkerassassim 7 Nov, 2024 @ 6:16am 
And where can I get them?
Kototop_CMB 7 Nov, 2024 @ 6:15am 
use examples
stalkerassassim 7 Nov, 2024 @ 6:14am 
hello, I don't understand how HDD works.Can you send the script?
porkmaster4000 7 Sep, 2024 @ 11:29am 
Truly appreciative of your work! It has propelled the Scrap Mechanic Military Industrial Complex in more ways than you can imagine. I wish you well in your future endeavours!
TheFattestCat  [author] 7 Sep, 2024 @ 10:51am 
As the author of this project, I don't claim copyright for the use and borrowing of SC code.

I no longer support this mod and place all my hopes on the community - creators of forks and analogues. I was pioneer in this modding direction and I'm glad the community began to work in the direction of creating computer mods. Now this mod will live on the shoulders of the community - each fork will carry the memory of the day when I first published the mod and started a new era - era of computers science in SM mods.

I hope that Scrap Mechanic developers will add support for creating render surfaces with GPU acceleration to LuaAPI one day. Also I hope they allow using of built-in Lua tools like 'loadstring' to avoid writing "VM on VM".

My last with is that BananaPen and NokoDev will become friends someday and stop arguing about their computer mods.
FightingDragon 31 May, 2024 @ 11:26pm 
when printing a msg like print("text here") in chat it always prints it with
" ScriptableComputer: text here " , is their a way to disable it from naming its self when printing
so like it only prints the " text here " ?
chleb 19 May, 2024 @ 1:16am 
When will the non-square displays be available?
I'm Dydnik 11 May, 2024 @ 10:07am 
Знал бы луа, может быть и разобрался)
dajonave82 11 Feb, 2024 @ 5:41am 
BananaPen: I wrote to you privately on Steam
dajonave82 6 Feb, 2024 @ 7:46am 
BananaPen: I wrote to you privately on Steam
THEDIMONDK 3 Feb, 2024 @ 11:49am 
Хорошо, спасибо. Думаю я уже вас заколебал своими вопросами)
BananaPen  [author] 2 Feb, 2024 @ 11:53pm 
THEDIMONDK: удаленные камеры можно сделать используя антенны, сделать картинку меньше можно используя библиотеку image в SComputers.

вы можете изуть документацию SComputers по этой ссылке: https://github.com/igorkll/SComputers_docs

кста, не обязательно общаться так официально))
THEDIMONDK 2 Feb, 2024 @ 11:12am 
Благодарю за ответ. Я как раз недавно предложил пару идей для SComputers, можете изучить их по следующей ссылке: https://steamhost.cn/steamcommunity_com/workshop/filedetails/discussion/2821133117/3454842785098719657/
BananaPen  [author] 2 Feb, 2024 @ 10:56am 
THEDIMONDK: форк (SComputers) развивается и будет развиваться. в этот мод (ScriptableComputer) больше не будут добавлены никакие новые вещи, только будут перенесены оптимизации и исправления от SComputers
dajonave82 2 Feb, 2024 @ 8:44am 
BananaPen: OK thanks i Look monday in the files because I'm on vacation
I can write to you privately if I can find any problems
THEDIMONDK 2 Feb, 2024 @ 7:29am 
Разработчики, добрый день. У меня есть пару вопросов.
1. Будет ли далее развиваться форк этого мода, который был здесь недавно? 2. И будут ли в (этот откат) модификации добавлены предметы со схожим функционалом, как были в форке?
Пожалуйста ответьте на все вопросы. И кстати, я ранее написал вам пару идей в Suggestions, просьба тоже обратить внимание.
BananaPen  [author] 2 Feb, 2024 @ 6:01am 
dajonave82: by the way, my fixes will soon be transferred to the main mod
BananaPen  [author] 2 Feb, 2024 @ 5:56am 
dajonave82: this fork is uploaded to my steam account, try it and see how the file systems work in it. I've done a lot of tests and haven't found a single bug related to paths
BananaPen  [author] 2 Feb, 2024 @ 5:55am 
dajonave82: I fixed all the bugs in the file system half a year ago in my fork: SComputers
dajonave82 1 Feb, 2024 @ 7:02am 
I created a better file system that only had a few changes but worked much better and is 1KB smaller, it's only 9KB.

Changes to FileSystem.lua:
function FileSystem.parsePath(pathStr) removed
function FileSystem.concatPaths(path, to) removed

Added function FileSystem._Decodepathname(path)
Added function FileSystem._Decodepath(path)

All functions changed to the new path system

It would be great if I could work on the project with you
BananaPen  [author] 1 Feb, 2024 @ 3:28am 
ATTENTION:
based on the results of the surveys conducted, I found out that not everyone is happy with the transition of ScriptableComputer to SComputers. therefore, at the moment it will be rolled back to the original, and then I will transfer all optimizations and fixes from SComputers to the original, without transferring the contents (i.e. blocks)
if someone needs SComputers specifically, you can subscribe to it in my steam profile.
igroin_the_cat 31 Jan, 2024 @ 1:03pm 
And btw the SC compatibility is perfect. makes so much easier to set up when i screw up my world playing around in unsafe mode.And accidentaly spawning in 1000 characters. (happened more then once XD)
igroin_the_cat 31 Jan, 2024 @ 1:00pm 
@bananapen.
1.About my antena.If you mean the built in "sendTo" in the mods code (i constantly look up the mod scripts to know how something works cuz the guide needs to be expanded) then no cuz last time i checked it was disabled. So i made my own send to that is based on every device having a name (set in code) and the device only records messages that have their name in them or "" in case you need to send it to all on the same network.(network is also specified in the code and all antenas on that network can comunicate ignoring the divices with the different network name).

2.About your mod not having recipes. You should probably try to reach out to someone like 00fant or the devs behind the modpack. im sure they encountered it.

P.S Check out my display UI creator i posted it in comments below. My biggest completed project yet.(building looking thing) (tho im not very experienced with coding so it's probably a nightmare code wise)
BananaPen  [author] 31 Jan, 2024 @ 12:35pm 
igroin_the_cat: the fact is that the crafts in my mods have broken down for some reason. as far as I understand this is a "custom game" problem for recipes, a lot of people and I have encountered it, and I honestly don't know how to fix it. everything used to work
BananaPen  [author] 31 Jan, 2024 @ 12:34pm 
igroin_the_cat: Does your antenna communication use the "sendTo" method for private communication?
BananaPen  [author] 31 Jan, 2024 @ 12:33pm 
dajonave82: oh... this needs to be fixed, there will be a new fork soon, based on SComputers, and we will make a dependency on it. in fact, it will be the original mod, but with bug fixes and SComputers optimizations. to make everyone happy
igroin_the_cat 31 Jan, 2024 @ 12:04pm 
@bananapen. i've seen you put that the world antena is craftable in it's description but i can't realy find it in custom game. Is it a feature for later ?
dajonave82 31 Jan, 2024 @ 5:57am 
how can you destroy an almost perfect mod so hard with unnecessary stuff
igroin_the_cat 30 Jan, 2024 @ 3:41am 
if anyone is looking for a simple antena comunication. i built one. https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3150023143
It's 2 way and suports up to 128 devices at once.With naming and ability to separate them into separate networks.
igroin_the_cat 29 Jan, 2024 @ 11:09am 
@bananaPen YAY Thanks !
BananaPen  [author] 29 Jan, 2024 @ 10:58am 
igroin_the_cat: ok, I'll add a small yellow "ScriptableComputer compatibility" button under the YES button, which will disable all restrictions (except safe mode) and I also think it's worth removing the command in the chat
igroin_the_cat 29 Jan, 2024 @ 9:00am 
@Danetta. And to clarify. The reader acts like a output device . So connect it to your light like you would with a regular vanila logic block.
igroin_the_cat 29 Jan, 2024 @ 8:57am 
@Danetta.To add to reader. The writer is used to put data into a computer. The same principal as reader but the command is getreg("name of writer").Can recieve a logical input or a number value from the modpack.
igroin_the_cat 29 Jan, 2024 @ 8:53am 
@Danetta. The reader can output a value read from a computer. The text in the reader is its name and can be anything. The command setreg("name Of Reader",some value) sets the reader to output a value declared as the second argument. The reader keeps its ouput untill changed again by the same command. Important detail ! you connect the computer to a reader and not the oter way around. (im a friend of M1sty_)
Danetta 29 Jan, 2024 @ 8:47am 
@M1sty_ do I understand correctly that I need to put a reader block and specify which block in it? and then send a signal from the computer block to that block?
M1sty_ 29 Jan, 2024 @ 8:20am 
@danetta of you're trying to turn on a light, you need to use a reader (it's the easiest way) press e on the reader and type "X", type setreg("X", true) in the computer.
Danetta 29 Jan, 2024 @ 7:56am 
Hello @bananaPen I am faced with such a problem, I want to send a signal to another block, for example (a block of light), how do I do output? Thank you in advance!
igroin_the_cat 28 Jan, 2024 @ 7:18am 
@bananapen. No i was not talking about that window its fine. I was talking that it takes way to many steps to deactivate all limitations. At least put 1 button on the initial activation window that will disable all that automatically if you're the host. That reverts all safety setting to what the original mod had. Just below the big,yes/no buttons.Because to disable all limits you need to put in a command then find those parameters among that giant list in a permition book. Just add a button that has 2 states. SAFE/UNSAFE. With all these functions disabled or enabled at once. The permition tool should be for fine tuning.
BananaPen  [author] 28 Jan, 2024 @ 6:39am 
igroin_the_cat: if by "sets to active in multyplayer" you mean the initial activation window of the mod. this is a precautionary method against various kinds of lagging. since a bad person can create a computer overflowing the host's RAM, causing the game to crash. this window allows you to save the world by temporarily disabling the mod
BananaPen  [author] 28 Jan, 2024 @ 6:36am 
igroin_the_cat: the only thing that "call limit" does is prevent the "getTargets" method from being called more than once per tick (and some GPS methods). also, I did not understand what limitations in multiplayer you are talking about
igroin_the_cat 27 Jan, 2024 @ 12:22pm 
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3148546664 I created a UI creator with a touch screen that allows you to easily create interactive menus for your builds with displays.
igroin_the_cat 23 Jan, 2024 @ 1:08am 
@bananaPen cant you add that it sets to active in multyplayer.Cuz its annoying when you work on your builds in solo worlds.AND PLEASE disable the call limit by default it requires way to much prep in each world.
BananaPen  [author] 22 Jan, 2024 @ 11:49am 
john.cage: disabling the "print" and "debug" methods by default is due to the terrible people I play with. if you give the opportunity to write to the chat automatically, then expressions like "this person has an unconventional sexual orientation" and/or "I with that person's parents did IT" immediately appear in it
BananaPen  [author] 22 Jan, 2024 @ 11:44am 
john.cage: displaying fewer pixels is an optimization that is already disabled by default. but if it bothers you, then you can disable it in the "Displays" settings section, although I don't remember which item is responsible for this... but there are quite a few settings.
there you can adjust, among other things, the display rendering range
john.cage 21 Jan, 2024 @ 3:58pm 
@BananaPen :
(part 3/3)
A hint (from someone with >30years of programming experience) for any kind of updates/upgrade of published software:
Make the old settings the default, so that your new version doesn't break functionality of what's already out there using the old version. You don't want people to get angry, throw it in a corner, unstall that sh.., fire you, sue you, .... You get the point.
"(Backwards) compatible" means: Users (here: using programmers) don't have to change a single thing (no program, no configuration setting) and it keeps working. If you think you have to make breaking changes for new functionality (there are sometimes good reasons): Put a new mod next to the old one and add a higher version number to the new one's name and add a hint in the old version, that there is a better but incompatible new version. No spectacular new info here, that's just the common way to handle that.
john.cage 21 Jan, 2024 @ 3:58pm 
@BananaPen :
(part 2/3)
Do these settings get permanently stored with the creation, so I can upload that to the workshop and it works for others, or do I need to add a "You have to find the duck and enter stuff you will not understand ..." description?

With those setting changes my programs technically "work" again as it seems (which is a relief), but:
If you stand further than about ~5 blocks away (player character eyes to display), only a seemingly random portion of the pixels (about 60%) drawn by the program (via commands drawText, drawCircle, etc.) are rendered, even when I set "display render distance:30" instead of your default of 15.
That was no problem with the old mod. (Yes there was a "nothing is shown at all" render cutoff distance, if you were much further away, but no: Hey I'm right here staring at the screen, but getting only about 60% of the pixels. That's quite close to unusable for many use cases.)
Any solution for that?