Page 1 of 1

[MOD 0.15] Computer Mods

Posted: Mon Nov 13, 2017 7:51 pm
by Relik
Computer is a modification for Factorio that’s all about computer programming. It allows you to write programs using the Lua programming language.

Image

Name: Computer Core
Description: This the main part of computer mod, is required to use another computer module
License: MIT
Version: 1.2.0
Factorio Version: 0.15.x
Category: Utility
Author: Relik
Downloads: Mod portal
Github: Relik77/factorio_computer_core
Long description
Change Log
Name: Onboard Computer
Description: Add a board computer to your cars and write a Lua program to give them an AI
License: MIT
Version: 0.2.0
Factorio Version: 0.15.x
Category: Logistics
Author: Relik
Downloads: Mod portal
Github: Relik77/factorio_onboard_computer
Dependencies:computer_core, any mod that adds an inventory grid to vehicles (eg: Vehicle Grid, VehicleGrids, 5Dim's mod - Vehicle...)

Todo:
What should be done in the future:
- Military computer : provides functions to detect and engage your enemies (waiting for Factorio v0.16 which should fix a bug with the shooting function)
Long description
Change Log

Normally the mod is multiplayer compatible
I try to test all cases of potential crash in order to offer you a system as stable as possible, but if you detected let me know.

If you have suggestions or design images (this is not my specialty), you're welcome :-)

Re: [MOD 0.15] Computer Mods

Posted: Fri Nov 24, 2017 1:09 am
by lost
Hi Relik

I might be interested to work on your computer modes in Github. I can fork both repos, but it might be more convenient for me to have write access to the existing one. What do you think? My GitHub is lostmsu.

My final goal is making a self-expanding factory. I'd be interested in a more direct contact, if you have time. Like Skype, or even meet in person, if you are in Seattle's greater area.

Re: [MOD 0.15] Computer Mods

Posted: Mon Nov 27, 2017 11:28 pm
by Relik
New version done,
Add a placeable computer on the ground and 2 new APIs (LAN and WLAN)


@lost I answered you by private message, I do not know if you saw ;-)

Re: [MOD 0.15] Computer Mods

Posted: Tue Jan 09, 2018 4:44 pm
by Sad_Brother
Hi!
I was able to open gauntlet console at last.
But how to open Placeable Computer's console?
And Onboard Computer's by the way, please...

Re: [MOD 0.15] Computer Mods

Posted: Fri Jan 26, 2018 8:24 pm
by iliketanks1998
Ctrl + click opens the computers on the ground, and on-board computers are a part of the sister mod - here - https://mods.factorio.com/mod/onboard_computer .

Re: [MOD 0.15] Computer Mods

Posted: Mon Jan 29, 2018 8:38 pm
by iliketanks1998
Is there a function/method to get text input from the user via the console? I haven't found one in the term 'library' and read() is undefined.

Re: [MOD 0.15] Computer Mods

Posted: Mon Feb 12, 2018 2:53 am
by SereneRebel
Excellent mod just one question, how quickly does the code actually execute?
does it run as much as it can during a single tick? eg until os.wait() is called
I'd like to know if it is possible to write out "1 tick" outputs as i have a use that would require being able to send a stream of signals

Re: [MOD 0.15] Computer Mods

Posted: Mon Mar 26, 2018 10:40 pm
by Relik
Hi,

Sorry to answer only now, I'm watching the other feeds (mods.factorio.com & github) and since there was almost nothing happening here I was spending less :/
(Ideally, an email alert system could be set up on mods.factorio.com and forums.factorio.com ^^)

So, yes it run as much as it can during a single tick.
For os.wait, I just converted the ticks into seconds because it seemed more convenient to use for most players.
But in the end it just calculates the tick to which the function should be recalled, and if it has already passed it the call anyway.
So:

Code: Select all

os.wait(function()
-- Some code
end, 0)
Will execute the callback function at the next tick