Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Naylenas
Sep 11, 2003

I was out of my head so it was out of my hands


Are there any mods that allow you to save logistics request "states" that you can switch between easily?

Adbot
ADBOT LOVES YOU

Taffer
Oct 15, 2010


Naylenas posted:

Are there any mods that allow you to save logistics request "states" that you can switch between easily?

You can do that with circuits. Just setup your requests in constant combinators, set the chest to set requests based on circuit conditions, and wire it up. If you want to switch between them on automatic conditions you'll need to do a little extra wiring, but it shouldn't be too complex.

Naylenas
Sep 11, 2003

I was out of my head so it was out of my hands


Oh yeah, that should do it. I only recently got into circuits, so this should be a good little project

Fishbus
Aug 30, 2006


"Stuck in an RPG Pro-Tour"

I'm working on my own little mod right now.

I'm always a fan of building into and around the core game, extending options, items, content etc so there's more ways to do things.

I also scripted in turret veterancy stuff which was a cool little project.

Check out Factorio Plus mod

neogeo0823
Jul 4, 2007

NO THAT'S NOT ME!!

Naylenas posted:

Oh yeah, that should do it. I only recently got into circuits, so this should be a good little project

I'm not sure what exact situation you've got going on, but it sounds like it's kinda similar to the vanilla automated train network project I was working on when I was last playing this.

Part of that project involved automatically handling requests from the various stations for trains that either had specific items(like smelting stations needing ore) or for empty trains(like the mining outposts). The method I had settled on for this was that whenever a station needed a specific train, it would output a pulsed signal of what it actually needed. So like, if a station needed iron ore, it'd output an iron ore signal. If it needed an empty fluid train, it'd output a fluid wagon signal. If it needed red and green circuits, it'd output a red circuit signal and green circuit signal. These signals would travel along the tracks, through branch stations. The branch stations were switching stations that just repeated the signal along the line, and if a train came along, it would match the train contents against the signal it received.(Are you full of iron ore? No? Ok, then are you an empty fluid train? Yes? Ok, head left. Delete the stored fluid wagon signal. Oh, next train. Do you have iron ore? No? Ok, go straight.)

Eventually, the signal would make it back to the train waiting depot. There, I had a separate dispatcher circuit that would take all the signals received from the rest of the train network and send them in aggregate along with a numbered signal that corresponded to the number of depot stations you had. The numbered signal would cycle from 1 to the number of depot stations in one second increments. Each station in the depot had circuitry that allowed that station to basically say "I have(or don't) a train with X characteristics(empty fluid, solid, has these Y items, etc), and my station number is #".

The net effect was, every second, the dispatcher circuit would output signalling that basically said "Depot station #1, do you have a train that either is an empty fluid wagon, OR a train with iron ore, OR a train with red and green circuits?" and Depot station #1 might respond with "No, I have none of that." Then 1 second later the dispatcher circuit would say "Depot station #2, do you have a train that either is an empty fluid wagon, OR a train with iron ore, OR a train with red and green circuits?" and depot station #2 might say "Oh, I have the empty fluid wagon. I'm gonna tell that train to leave." and the dispatcher circuit would delete the empty fluid wagon signal. Then 1 second later, the dispatcher circuit would say "Depot station #3, do you have a train with iron ore, OR a train with red and green circuits?", and on and on it would go, back and forth until all the requests were satisfied.

This allowed me to have trains that could carry basically anything, coming and going from any station. All the trains could be programmed to just "go to Station, wait for green signal". The depot would dispatch a train carrying whatever was needed, the branch circuits would guide the trains to their destinations, and then they would make their way back to the depot to await their next destination.

Bhodi
Dec 9, 2007

Oh, it's just a cat.
Pillbug
Please. Modders. I need this for the car/tank.

I am begging, GotLag

https://twitter.com/oriwa_/status/1310162019769671680?s=20

Darox
Nov 10, 2012


I built Artillery for the first time and immediately fired off 50~ shells with the remote, it's hard to express just how satisfying the experience was. The sound was especially good, hearing thuds from the cannons firing salvos next to my dude mixed with the impact explosions from the radar view. Sorry Rocket Silo, you're not going to match up to that pinnacle of achievement.

GotLag
Jul 17, 2005

食べちゃダメだよ
A new lovely mod: Glass
Smelt 1 stone into 2 glass plates in a furnace (stone bricks are now made by hand or in assembling machines), glass plates replace iron in electronic circuits and lamps, and copper in solar panels.

Communist Zombie posted:

And they dont seem to be working with Krastorio 2, theyll take in fluids but not burn them. And I had just checked them about half an hour ago.

Did the previous version burn them?

GotLag
Jul 17, 2005

食べちゃダメだよ

Bhodi posted:

Please. Modders. I need this for the car/tank.

I am begging, GotLag

https://twitter.com/oriwa_/status/1310162019769671680?s=20

Thinking about how best to implement this.

Platystemon
Feb 13, 2012

BREADS

GotLag posted:

Thinking about how best to implement this.

Gnomes steal fuel from your car while you’re in a Factorissimo structure.

Gadzuko
Feb 14, 2005

GotLag posted:

Thinking about how best to implement this.

A beam of light from space puts a boot on any vehicle not parked on hazard concrete that's been stationary for x minutes.

Freaksaus
Jun 13, 2007

Grimey Drawer
Is there a way to detect a car is in a certain zone? Making you declare parking zones somehow and any car parked outside will get removed after x minutes.

In a similar vein, I remember seeing a mod that added car keys. It let you lock your car so others couldn't use it in MP.

GotLag
Jul 17, 2005

食べちゃダメだよ
No I mean in terms of finding a robust and not-performance-heavy way of tracking vehicles and of adding a ticket to them after a set time

Platystemon
Feb 13, 2012

BREADS
I don’t know what options mods have access to, but just poll and compare vehicle locations once a minute or so?

FUCK SNEEP
Apr 21, 2007




GotLag posted:

No I mean in terms of finding a robust and not-performance-heavy way of tracking vehicles and of adding a ticket to them after a set time

For each vehicle track the last time the player exited the vehicle, and every minute or so check if that's longer than your time-to-ticket. I think adding a wheel boot you have to right-click on to pick at it and destroy it would fit better imo

Platystemon
Feb 13, 2012

BREADS
Parking meter entity consumes copper plate

XkyRauh
Feb 15, 2005

Commander Keen is my hero.

Communist Zombie posted:

And they dont seem to be working with Krastorio 2, theyll take in fluids but not burn them. And I had just checked them about half an hour ago.

Krastorio has Flare Stacks and a similar-looking one for Fluids. I forget what they're called, but they're blue instead of orange. If one doesn't work, try the other. :)

TheOneAndOnlyT
Dec 18, 2005

Well well, mister fancy-pants, I hope you're wearing your matching sweater today, or you'll be cut down like the ugly tree you are.

Communist Zombie posted:

And they dont seem to be working with Krastorio 2, theyll take in fluids but not burn them. And I had just checked them about half an hour ago.
IIRC you need to put in a certain amount of fluid first, because burning is a "recipe" that requires 500 of the fluid or whatever before it can start.

Communist Zombie
Nov 1, 2011
Re Krastorio & flares I completely missed that the mod had their own version, so Ill use those. And I havent used them before with Krastorio 2 so cant say if they used to work.

Fishbus
Aug 30, 2006


"Stuck in an RPG Pro-Tour"

GotLag posted:

No I mean in terms of finding a robust and not-performance-heavy way of tracking vehicles and of adding a ticket to them after a set time

My thought would be to have an event polling every 10 seconds or even longer of a list of vehicle objects.

Vehicles would be added to the vehicle object list when they are initially placed/built on the surface.

Then it's a case of tracking how long each has been out for, adding that time per event call and maybe use the position like someone said in a k,v table like:
["vehicle entity"] = {[position] = {x, y}, [stoppedtime] = { t } [isTicketed] = { bool } }

Fishbus
Aug 30, 2006


"Stuck in an RPG Pro-Tour"

Updated my mod so trains just randomly pick a colour when made, added bonus is cargo trains can also be coloured.

Also added it so the location of my murdered body is marked on the map.

KillHour
Oct 28, 2007


Fishbus posted:

My thought would be to have an event polling every 10 seconds or even longer of a list of vehicle objects.

Vehicles would be added to the vehicle object list when they are initially placed/built on the surface.

Then it's a case of tracking how long each has been out for, adding that time per event call and maybe use the position like someone said in a k,v table like:
["vehicle entity"] = {[position] = {x, y}, [stoppedtime] = { t } [isTicketed] = { bool } }

I've never modded Factorio, nor have I done anything in Lua, but instead of checking each vehicle every tick, I think a queue would be better - each vehicle would enter the back of the queue when you get out in an "illegal" spot and you would know that vehicles behind the first in the queue never have to be ticketed yet, so you'd just check the first. When a vehicle is ticketed, you check to see if the next vehicle is in the same location it was when you entered the queue, and if it isn't, you'd remove it from the queue and keep going until you find one that is in the same spot. Technically, if you parked illegally, moved it, then moved it back to the exact same spot before the queue expired, you'd still get a ticket - but that's how real parking spots work so :v:

KillHour fucked around with this message at 18:50 on Sep 29, 2020

Sweeper
Nov 29, 2007
The Joe Buck of Posting
Dinosaur Gum

KillHour posted:

I've never modded Factorio, nor have I done anything in Lua, but instead of checking each vehicle every tick, I think a queue would be better - each vehicle would enter the back of the queue when you get out in an "illegal" spot and you would know that vehicles behind the first in the queue never have to be ticketed yet, so you'd just check the first. When a vehicle is ticketed, you check to see if the next vehicle is in the same location it was when you entered the queue, and if it isn't, you'd remove it from the queue and keep going until you find one that is in the same spot. Technically, if you parked illegally, moved it, then moved it back to the exact same spot before the queue expired, you'd still get a ticket - but that's how real parking spots work so :v:

You have to simulate the chalk mark

LordAdakos
Sep 1, 2009
Any tips to improve fps/ups with bot factories?

My main game has about 6k logistics bots running things around at any given time.

Do I ditch logistic bots in favor of a huge bus?

Is there a mod that just automatically moves items from providers to requesters automatically with no bot middleman???

Taffer
Oct 15, 2010


You definitely shouldn't be getting slowdowns from bots with only 6k of them unless you're running on some super old hardware. What else do you have going on in your factory? Check your timings too: f4 -> show-time-usage

LordAdakos
Sep 1, 2009
A bunch of trains, Tons of artillery, few thousand laser turrets. I'll check the f4 timings for more details when I get back inside.

And it works okayish most of the time but starts to chug when I queue up a lot of buildings or a new expansion.

GotLag
Jul 17, 2005

食べちゃダメだよ

Fishbus posted:

My thought would be to have an event polling every 10 seconds or even longer of a list of vehicle objects.

Vehicles would be added to the vehicle object list when they are initially placed/built on the surface.

Then it's a case of tracking how long each has been out for, adding that time per event call and maybe use the position like someone said in a k,v table like:
["vehicle entity"] = {[position] = {x, y}, [stoppedtime] = { t } [isTicketed] = { bool } }
If I use a table the structure is probably going to be global.vehicles[unit_number] = (entity, tick, ticketed}
Using a table as key is not recommended as they may be changed in serialisation, and position is already a property of the entity.

However it looks like there may be a way it can be done without having to track vehicles, which is nice.

Fishbus
Aug 30, 2006


"Stuck in an RPG Pro-Tour"

GotLag posted:

If I use a table the structure is probably going to be global.vehicles[unit_number] = (entity, tick, ticketed}
Using a table as key is not recommended as they may be changed in serialisation, and position is already a property of the entity.

However it looks like there may be a way it can be done without having to track vehicles, which is nice.

Yeah, that's better, using entities as a key has been nothing but trouble, using the unit number when possible is a better idea.

I'm looking forward to getting tickets!

GotLag
Jul 17, 2005

食べちゃダメだよ
Using the unit_number as index and also storing a reference to the entity lets you go both ways: iterating over the table gives you the entity references and all you have to do is check if they're still valid, and starting from an entity reference means you can just look up table[entity.unit_number].

Platystemon
Feb 13, 2012

BREADS

KillHour posted:

Technically, if you parked illegally, moved it, then moved it back to the exact same spot before the queue expired, you'd still get a ticket - but that's how real parking spots work so :v:

The precision with which position is stored with makes that extremely unlikely.

Koobze
Nov 4, 2000
Speaking of mods, is there one that reskins all biter species as Captain Planet/various planeteers? Would love to see a mob of Ma-Ti's shouting "Heart" at my fortifications.

Collateral Damage
Jun 13, 2009

Fishbus posted:

Updated my mod so trains just randomly pick a colour when made, added bonus is cargo trains can also be coloured.


You should definitely release that as a stand alone mod. I'd use it.

Fishbus
Aug 30, 2006


"Stuck in an RPG Pro-Tour"

Collateral Damage posted:

You should definitely release that as a stand alone mod. I'd use it.

Yeah, I'll pluck out some of the scripts that will work well as standalone.

Dietrich
Sep 11, 2001

Would it be possible to write a mod that would color a train to match the cargo that is currently in it, provided that it is all the same thing?

GotLag
Jul 17, 2005

食べちゃダメだよ
New mod: Free Cable!
Copper cables and circuit wires are not consumed when manually connecting poles/machines. Doesn't change any recipes, and you still need to have a cable/wire in your hand to use them.

Freaksaus
Jun 13, 2007

Grimey Drawer

Dietrich posted:

Would it be possible to write a mod that would color a train to match the cargo that is currently in it, provided that it is all the same thing?

It's already been made actually. I've been using it for quite a while and it works pretty well.

https://mods.factorio.com/mod/Automatic_Train_Painter

There's also https://mods.factorio.com/mod/automatic-station-painter for the train stops.

Dietrich
Sep 11, 2001

Freaksaus posted:

It's already been made actually. I've been using it for quite a while and it works pretty well.

https://mods.factorio.com/mod/Automatic_Train_Painter

There's also https://mods.factorio.com/mod/automatic-station-painter for the train stops.

Awesome!

Erwin
Feb 17, 2006

If I just unlocked purple science, how close would you say I am to launching a rocket? 75% there? 50? This is the furthest I've gotten since I started playing Factorio on and off years ago, and I'm kind of eager to get one "win" over so I can start over and implement all the lessons I've learned.

KillHour
Oct 28, 2007


You don't start over. You drive a mile or two away and build a second base with materials from the first. You'll probably end up doing that before you even launch a rocket because I'm positive you didn't leave yourself enough space.

Adbot
ADBOT LOVES YOU

M_Gargantua
Oct 16, 2006

STOMP'N ON INTO THE POWERLINES

Exciting Lemon

Erwin posted:

If I just unlocked purple science, how close would you say I am to launching a rocket? 75% there? 50? This is the furthest I've gotten since I started playing Factorio on and off years ago, and I'm kind of eager to get one "win" over so I can start over and implement all the lessons I've learned.

Very close. At that stage launching a rocket is more about just directing the resources to it and waiting. Slow and steady wins the race, you can have just a few assemblers building parts and by the time to remember to check back in you've already got a rocket ready for launch.

As for starting over remember you can just build drive off into the wilderness and build a second base somewhere with all the tools and tech you've already got unlocked. That way if you ever have a problem you can just drive back and your original base will have a full chest of whatever you need waiting for you.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply