Page 1 of 1

Another "do everything..almost" mod

Posted: Sun Feb 18, 2018 3:40 pm
by SereneRebel
Long story...
So i was having a good play with the AII vehicles and AII structures mods and i found myself needing something _more_

to control things how id like would take enourmous amounts of combinator logic. so off i went to find something that could help
i tried microcontroller mod, i tried computer core. both were kind of non user firendly and not quite right for the task.
So here i am.. getting itchy fingers contemplating a mod, i look over to my junk heap randomly and i saw it. the holy grail. exactly the tool for the job.
A PLC! now idea in hand and very little Lua knowledge i went inward head first all guns blazing.

The dust settled 2 days later, hungry, tired, getting in trouble with the wife...

Introducing, the very raw, very untested, definitely buggy Programmable Logic Controller Unit for facotrio

It will accept up to 8 signals into its left hand input converting them into variables to be used by the program
Input
It will then use those variables and others depending on the program outlined in this tab
Output
After all the lines get executed (one after the other) the chosen variables will get outputted to the signals defined on this tab
Program
The entire PCLs settings can be exported and imported using the save/load tab
Save-Load
Once you are happy with the program clicking the run button (on the program tab) and provided it has enough power it will execute the program each tick
Now i have not done extensive testing on performace and i have not done any graphics for it yet i did however manage to get a quick video demonstrating a couple things...right before it crashed :)
https://www.youtube.com/watch?v=JhPmNOr7rEg

Let me know what you think. if it's good, if it's crap etc etc as i have no idea if anyone else would use this

EDIT: put images in spoilers - shorter post

Re: Another "do everything..almost" mod

Posted: Tue Feb 20, 2018 6:47 pm
by GodsFather
Really needs a big UI and usability improvement - but I would already have some use cases for it and I like this kind of flexibility.
Just leave your wife and keep coding :D

Re: Another "do everything..almost" mod

Posted: Wed Feb 21, 2018 1:16 am
by SereneRebel
I'm currently polishing up some graphics for it which has been a fun challenge having never used blender before, granted i have quite a background in 3D design and printing just not rendering.

I'm keen to hear what improvements you had in mind for the UI specifically since this has been quite a hack n slash affair i didnt put too much thought into the user friendliness of it

Re: Another "do everything..almost" mod

Posted: Wed Feb 21, 2018 1:32 pm
by SereneRebel
Good news is..... I'm kind of happy with the status of the mod to call it alpha.
  • There is some graphics - albeit probably crap and I'm open to suggestions / someone more creative to do them better
  • It doesn't crash the moment you breathe on it
Bad news is there is still no manual or instructions other than a crappy soundless video
I'll be working on proper in game manual / decent tool tips to explain things

I think once I've done the manual/tool tips I'll release it to you guys to bash it to death and complain make suggestions

EDIT: almost forgot i still need suggestions as to balancing
  • How much power should it use - currently 123kW
  • Should it use power all the time or only while in "run mode" - currently always
  • What should the recipe be? - currently 24x Constant Comb, 32x Arith Comb, 32x Decoder Comb and 48x Green Circuits
  • Input/Output/Program line count? - currently 8, 8, 100

Re: Another "do everything..almost" mod

Posted: Wed Feb 21, 2018 2:51 pm
by SereneRebel
Ok another update.. i know but I'm getting excited

Graphic:
Graphic
I think the base might be a bit tall and I'm not really happy with the texture but it's a start

Tech Graphic: - also the same as the item icon
Tech Graphic

Re: Another "do everything..almost" mod

Posted: Wed Feb 21, 2018 5:39 pm
by steinio
But you tried your best :D

Re: Another "do everything..almost" mod

Posted: Sun Feb 25, 2018 1:53 am
by SereneRebel
Ok another update since i've had some time to play a game with the new mod and have found some usability issues, mostly just i'ts "clunkyness"
The graphics, albeit simple, are usable as it stands and i have added a lot of tool-tips to hopefully help

If anyone's interested i should have a release candidate in a couple days once i've found a solution to the usability problems

Re: Another "do everything..almost" mod

Posted: Mon Feb 26, 2018 9:58 pm
by wvlad
I had a very similar idea but abandoned it since it was too big. Basically it is executing lua in lua via loadstring. So a player can code any behavior he wants.

I thought about making an API that will allow script to retrieve data or interact with game state in a non-cheaty way. [Also I tried to do this with C# to lua compiler so that you can write in C#, compile and paste into game)].

It's a huge work, I don't like lua and I don't like the feeling of playing into making mods instead of playing the game itself so it was only an idea + some experimenting with loadstring and C# to lua compiler (and Factorio lua wiki parser to generate C# stub methods).

Re: Another "do everything..almost" mod

Posted: Tue Feb 27, 2018 10:30 am
by SereneRebel
wvlad wrote:I had a very similar idea but abandoned it since it was too big. Basically it is executing lua in lua via loadstring. So a player can code any behavior he wants.

I thought about making an API that will allow script to retrieve data or interact with game state in a non-cheaty way. [Also I tried to do this with C# to lua compiler so that you can write in C#, compile and paste into game)].

It's a huge work, I don't like lua and I don't like the feeling of playing into making mods instead of playing the game itself so it was only an idea + some experimenting with loadstring and C# to lua compiler (and Factorio lua wiki parser to generate C# stub methods).
I too had that idea once upon a time but i also don't like LUA that much but it seems to be quite popular. plus there's a bunch of other LUA mods and well its been done to death.

On other news i have tested the mod and I'm happy to release to beta testers - as soon as i zip it and make it ready - back in a few minutes.
I'm going to play through with it over the next week and if I'm happy ill consider putting it on the portal then.

Re: Another "do everything..almost" mod

Posted: Tue Feb 27, 2018 10:56 am
by SereneRebel
Well here it is.
plc_0.1.0.zip
(170.65 KiB) Downloaded 176 times
Criticism, Comments, Tips etc are welcome since this is the first mod I have actually written I'd like to know where i stuffed it up

Re: Another "do everything..almost" mod

Posted: Fri Mar 16, 2018 12:46 am
by SereneRebel
Mod has been released https://mods.factorio.com/mod/plc