Is it possible to create your own client?

Enhance your gameplay with these tools. This category is also the right place for tools useful for modders.
Mod databases, calculators, cheatsheets, multiplayer, scripts, libs and other useful stuff that is not strictly in-game mods.
Post Reply
User avatar
adamwong246
Fast Inserter
Fast Inserter
Posts: 148
Joined: Tue Dec 01, 2020 5:01 am
Contact:

Is it possible to create your own client?

Post by adamwong246 »

Not sure where to ask this so here goes.

Could you tap into a headless server's API to develop, say, a custom stats board? Or connect a command-line program to a local game to use as a custom crafting interface?

KeepResearchinSpoons
Long Handed Inserter
Long Handed Inserter
Posts: 72
Joined: Tue Dec 01, 2020 6:57 pm
Contact:

Re: Is it possible to create your own client?

Post by KeepResearchinSpoons »

Short answer in general: NO.
You can't create another factorio client without reverse-engineering the current one as the source was not licensed to you in a legal manner.
At best you shall be in a gray zone then. There is at least 5 server scanners and 4 ddos modules that I recall meeting in the wild so you should rather not go this way if possible. At worst you shall be violating a certain act and possibly also your local laws. Not quite worth the trouble.

Possible options:
There was/is a clusterio mod that is a server-to-server communications basically. You can get the idea of what is possible by youtubing some of it. And it's a lot.
There is an rcon interface (see source rcon) which is basically a [`] key console from a possibly remote or tunneled location; allows for running commands for example. But shall require some heavy groundwork.
There is a chat-sync for discord bots. They act differently but all you want to know -- the server runs a mod or a scenario module. Then there's an agent of that bot running at server which in turn communicates somehow with the one outside. Be it rcon or local files or whatever.

Real answer:
You need to control the server.
If by scoreboard you mean the one that is of RedMew scenarios or Comfy Scenarios then its more then possible -- it is ready and running. Comfy' one even shows you the birdview over the person you hoover over at scoreboard for example.
If you want to dump that then you can use smth like serpent.line(data) or smth alike

A: rcon
If you want to make the rcon reciever from the ground up (for some strange reason)
for rcon specs you can see this;
https://developer.valvesoftware.com/wik ... ol#Node.js
for how-to-make-a-loopback-server-with-node use google then gear it together. 2h is more then enough probably.
Then just set localhost:someport as rcon interface in factorio config (or the-rest settings) and get up ssh with a tunnel option (or any other tcp tunnel) if necessary so you would get the rcon from where you want it. Just remember rcon is too raw and bulk for anything big so some checks and validations are necessary if you come this way.

B: script output
just dump to file as most lua scripts do. It shall be in the game dict so you can set a hook or smth of your liking; then you xz or lz it and then you tar it with other stuff you want to send (or the other way around) and use that old scp (ssh file transfer) or sftp with filezilla or even a simple node light-server to serve a dir or a python web server or even apache/nginx/proxy/socksy/woxy/cgi/php etc and etc. That way you can even get stats from a bunch of sharehosted servers in a tar.

KeepResearchinSpoons
Long Handed Inserter
Long Handed Inserter
Posts: 72
Joined: Tue Dec 01, 2020 6:57 pm
Contact:

Re: Is it possible to create your own client?

Post by KeepResearchinSpoons »

On a second reading...
what you really want is JUST a redmew menu or a comfy menu with all those stats marts and such
or
you probably rather need this?
https://wiki.factorio.com/Matchmaking_API
and here i went into the reverse thingz poor me

User avatar
adamwong246
Fast Inserter
Fast Inserter
Posts: 148
Joined: Tue Dec 01, 2020 5:01 am
Contact:

Re: Is it possible to create your own client?

Post by adamwong246 »

I really just want to be able to use a multi-monitor setup, with the main game is on one screen and a custom crafting and inventory management app running on another monitor. (I'm really not crazy about the in-game gui. Too small icons and text, it obscure the playing field, etc)


But if there are legal issues, then drop it like it's hot.

User avatar
ptx0
Smart Inserter
Smart Inserter
Posts: 1507
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: Is it possible to create your own client?

Post by ptx0 »

KeepResearchinSpoons wrote:
Fri Dec 04, 2020 5:14 am
Short answer in general: NO.
god you wrote a lot of lies.

https://www.reddit.com/r/factorio/comme ... d/ga9ih96/

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2339
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: Is it possible to create your own client?

Post by Jap2.0 »

ptx0 wrote:
Fri Dec 04, 2020 5:05 pm
KeepResearchinSpoons wrote:
Fri Dec 04, 2020 5:14 am
Short answer in general: NO.
god you wrote a lot of lies.
That's not interoperable with standard Factorio servers, and thus I don't believe meets the intended definition of "client" here.

(That also isn't the full game, anyway.)
There are 10 types of people: those who get this joke and those who don't.

KeepResearchinSpoons
Long Handed Inserter
Long Handed Inserter
Posts: 72
Joined: Tue Dec 01, 2020 6:57 pm
Contact:

Re: Is it possible to create your own client?

Post by KeepResearchinSpoons »

Oh to make a fully compatible client you JUST need a COPY of (or a mimic of) the [reference version client logic] among other "trivial" things. (licensed to you by userterms which basically say imo: )
quote:"You are not allowed to copy, transfer or distribute the game, its hacked or otherwise altered versions, any of its parts or any of the paid content"
(exept for the personal use ofc, c.f. 1 option the same para)

Otherwise you won't get a good heartbeat pass and shall desync like very soon.
IMO factorio is not quite best with MP design of full determined approach: you CAN'T offload the processing to the better node for some chunks. BUT I can't possibly suggest a better one that works at least the same speed tho.
It *Should* be possible to make some "extra big" chunks probably but you still can't safely decouple ore lane from a plates lane from a power poles net.

User avatar
ptx0
Smart Inserter
Smart Inserter
Posts: 1507
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: Is it possible to create your own client?

Post by ptx0 »

Jap2.0 wrote:
Fri Dec 04, 2020 9:04 pm
ptx0 wrote:
Fri Dec 04, 2020 5:05 pm
KeepResearchinSpoons wrote:
Fri Dec 04, 2020 5:14 am
Short answer in general: NO.
god you wrote a lot of lies.
That's not interoperable with standard Factorio servers, and thus I don't believe meets the intended definition of "client" here.

(That also isn't the full game, anyway.)
well, when you shift the goalpost that way! :roll:

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2339
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: Is it possible to create your own client?

Post by Jap2.0 »

ptx0 wrote:
Sat Dec 05, 2020 2:12 am
well, when you shift the goalpost that way! :roll:
Oh no, the thing isn't the same as the other thing unless they both do the same thing! :o
There are 10 types of people: those who get this joke and those who don't.

Post Reply

Return to “Tools”