AI & Factorio Mods (Maglev dreams)

Place to post guides, observations, things related to modding that are not mods themselves.
BHakluyt
Filter Inserter
Filter Inserter
Posts: 281
Joined: Sat Oct 08, 2016 12:43 pm
Contact:

AI & Factorio Mods (Maglev dreams)

Post by BHakluyt »

How is the mod scene going with AI these days? I have a dream for a super sleek and fast elevated Maglev rail system. My internet is unfortunately too slow to get anywhere close to doing it myself...

See some inspiration here:
image
Couldn't get this one to run: (AI made mod)
maglev-trains_1.0.0.zip
AI made mod for maglev
(35.31 KiB) Downloaded 32 times
mmmPI
Smart Inserter
Smart Inserter
Posts: 5192
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: AI & Factorio Mods (Maglev dreams)

Post by mmmPI »

there are various point of view , sometimes very opposite about AIs in general, and that is also present in Factorio. I'm not a person who is going to hate on AI , i try to have a rationnal approach, still i think for Factorio modding in particular, there isn't a real good AI i know that can do "everything" as you seem to wish. I tried using AIs to make mods, but i found it better to use them to understand how to make a mod , rather than to make the mod themselves, they don't have good reference on what is availble in factorio API, they make mistake between 1.0 1.1 2.0 space age and overall they are pretty unreliable for task like "can i do this ? or how do i do this ? or can you do this for me ", rather, you can ask "what does this do ?" and giving snippets of code you don't understand ( respecting the license ) , you will have an explanation, which is very often correct, it allows to spot mistakes in what you did, you can also ask utilities stuff, like i have a list and i want to remove only the elements that are also on this other list unless they are present on this 3rd list and i need to do that on those 4 files everywhere needed, AI speed-up stuff with less risk of mistake if you don't rely on them having a perfect, nor even good "game internals knowledge" and follow their own hypothesis.
You can try to "reason" depending on the quality of the AI model you use, try to have a discussion where you explain the AI your goal, or intermediate goal, or tiny step, ask it how it is done by people who know what they are doing, and why ,then it's easier to further ask precisely what you want the AI to do, instead of "the whole mod", you ask for smaller parts that you know you need because of the previous dicussion, where you try to spot if there is inconsistency, like the AI telling you A is the better method then giving intruction for how to make B; and you test if those intermediate step produce the expected result, that the AI doesn't fallback on a proposition C that look like it does the job but not really. If you don't ask it to explain to you what the code is actually doing it's impossible i think for such project in 2026.

There are more expensive AI agents than those i tried, but when i try to document on how it works, i am not convinced there is yet a stage where you can ask for "such a complex mod" to be done reliaby "at the end" without much more intermediate validations. An AI agent as far as i understand very much risk going to otherwise bash his money longer on problems like version inconsistency, never understanding the root cause and developping many alternative wrong theory and test them over and over. Unlike some other development , a factorio mod often time needs to be reloaded and tested humanly to know if the incremental changes and addition by the AI are working.

I feel your "best bet" is to take a month or so for it minimum, and validate a plan for each week, like 1rst one you load the mod and the technology and the icons and the tech, but it's just a placeholder non animated graphic, the week after because it takes time to do the back and forth with the AI, adding a thing, correcting the mistakes, learning in the way so you don't need to always reload the game to spot them in the AI code, you still learn the langage, the data structure the API and so on. I think for the graphics themselves you need no less than a week, and it probably will still look like placeholder, but undertanding which pieces are needed, getting the format right the dimension the proper set you need for a full animated trains, and making mock up version is already going to take time and require intermediate human verification, you will most likely need to correct the AI based on what you visually observe is going wrong, that's more the wiring parts, you need also at least a week for this, the animation in game and the tweaks and corrections for the graphics to be actually displayed as a functionnal train and not just there somewhere.

And you also need a week at least for the polishing, making sure it doesn't break with the other mod you like to use, make sure the performance arent terrible because of leftover scaffold or debug code, typos, stuff you left as "to do" making the mod page on the portal, and for such a mod , i expect also dealing with the early feedback for such a mod, people always find edge cases, some you may want to solve.

Obviously i'm not an experienced modder, i tried to touch things here and there, and if AI were better at helping or i had developped a better method of using them i could have touched some more, i felt the limitations, i'm not doing a generic "AI bad argument" here, i'm saying it's actually much more work than may be anticipated from the fallacious promises of companies selling chatbots ^^ When i say "1 week per stage" it's ambitious and approximation, it's more like "at least a week" or so in my mind, and obviously depending on how much time you can spend and if you are a programmer already, or if you have a background that allows you to learn and remember fast the new concepts. Also Discord can be quite useful, like if you really can't find the answer to a specific stuff even with AI, go ask real humans, but you need to narrow down the problem better than "i asked chagpt once and it didn't immediatly work" , otherwise you're asking someone to review the full mode and finish what could be 95% of the work (and real humans rarely do that x))
Check out my latest mod ! It's noisy !
BHakluyt
Filter Inserter
Filter Inserter
Posts: 281
Joined: Sat Oct 08, 2016 12:43 pm
Contact:

Re: AI & Factorio Mods (Maglev dreams)

Post by BHakluyt »

Thank you for the detailed feedback. I have internet for a few hours about once a week so its extremely difficult for me to do it as you described above. I really wish someone with more internet time and the same burning desire for a maglev can help out.

I've found Gemini and Claude can indeed be very helpful to create a mod with minimal know how from my side. I know how to open a lua in notepad + and thats about it. Still fixing the bugs but I got two mods of the same idea so far. Would anyone like to try it out? The idea is to have a new and additional game loop since Space Age killed the end game for me.
quantum AI entanglement
quantum survival
mmmPI
Smart Inserter
Smart Inserter
Posts: 5192
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: AI & Factorio Mods (Maglev dreams)

Post by mmmPI »

Without a lot of internet it will probably not possible to use AIs much tough.

there exist "maglev mod" not sure how this one is https://mods.factorio.com/mod/maglev-straightaways, but i have used those electric trains as part of the set from Moshine recently : https://mods.factorio.com/mod/se-space-trains and there exist other trains mods that "ressemble" the maglev idea : https://mods.factorio.com/mod/Space_trains https://mods.factorio.com/mod/electric-trains

All of the license are permissive, you can study the mods to understand how it's done all you want offline, and keep the part you don't understand , for that time you can ask an AI x).

Also , although you can technically use notepad + , you would probably much prefer a more "programming" oriented software to review the code, to have the syntax well colored for readability at least.
Check out my latest mod ! It's noisy !
BHakluyt
Filter Inserter
Filter Inserter
Posts: 281
Joined: Sat Oct 08, 2016 12:43 pm
Contact:

Re: AI & Factorio Mods (Maglev dreams)

Post by BHakluyt »

Look, "F AI" and all that yeah (would love to do the coding offline on the laptop but that struggles, responsible data centre usage in mind) and all that but I would never realistically get so far ever and learned a bunch of how the game works in the process. After a weekend of pasting code back and forth between the AI and the computer, we are finally in the game! All the settings show up, great! The space ship crashes! The warnings are given and fate is accepted. Here we go...

10min in and the mod is working! Shall I play it until endgame or anyone want to test it from the get go?

Quantum Survival horror where you need to transport the ore very quickly or it spoils, so maglevs will be needed and probably take another 3 years or another good off weekend. Early days...

Oh yeah its for Factorio 2.0 still, haven't tried the updated 2.1 yet.
N00b techy stuff
So see this post as documentation of my early days prodding with AI and modding...
quantum survival
Let me know if you'd like to test it and I will upload it here...
mmmPI
Smart Inserter
Smart Inserter
Posts: 5192
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: AI & Factorio Mods (Maglev dreams)

Post by mmmPI »

BHakluyt wrote: Sun Jun 28, 2026 7:04 pm Look, "F AI" and all that yeah
Unfortunatly it's often that people stop at that x). I think though it can give a confidence boost to try new things and even sometimes an actual help , and if you like the thing and/or ask the AI to teach you instead of doing it for you, i feel there will be plenty things where you won't need the AI anymore too, it should be even, otherwise you could feel paralized or dependant on the AI for understanding your project.

BHakluyt wrote: Sun Jun 28, 2026 7:04 pm 10min in and the mod is working! Shall I play it until endgame or anyone want to test it from the get go?

Quantum Survival horror where you need to transport the ore very quickly or it spoils, so maglevs will be needed and probably take another 3 years or another good off weekend. Early days...
You made a working mod that launch , where ore can spoil ? If so , i think you should post it, or even on the portal, there is a "license" to choose, which can take a bit of offline thinking ^^ also that part where you think of a description, if you want to add a disclaimer about the use of AI ^^ , or make sure the changelog appears like you want , that the thumbnail and other images are ok , if you want feedback i feel that can only help differentiate it from mods that are more personnal stuff. Plus the mods sounds fun, maybe a bit too masochist for my taste but i guess i depend the spoilage result and the timing, and if there are parameters, that's also a good side of posting on the portal, you can get ideas or suggestions :)

If you update it to 2.1 i will give a quick try alongside mine when i update them
Check out my latest mod ! It's noisy !
BHakluyt
Filter Inserter
Filter Inserter
Posts: 281
Joined: Sat Oct 08, 2016 12:43 pm
Contact:

Re: AI & Factorio Mods (Maglev dreams)

Post by BHakluyt »

Yes! I'd really appreciate it if anyone can have a look, the UPS is all of a sudden down the drain, I think its the control.lua thats a bit of a mess and perhaps the HUD or UI is causing the UPS issue. Otherwise all the entities ore spawn and stuff research etc, so if the UPS issue can be fixed I think it will work great for the most part! Please anyone if you have a bit of time and some know how please please. Its unfortunately also still for 2.0 Space Age.
Quantum Survival for 2.0
BHakluyt
Filter Inserter
Filter Inserter
Posts: 281
Joined: Sat Oct 08, 2016 12:43 pm
Contact:

Re: AI & Factorio Mods (Maglev dreams)

Post by BHakluyt »

Wow I see a few downloaded the mod. That version is garbage, I got it fixed and got the code cleaned up. I'll do a bit of more offline testing and then come paste the full mod here again. Stay tuned.

Its also expanded, now you need to have the quantum stability stabalised, maintain hunger, thirst and oxygen levels for the player. Hard-core suvival coming soon...
mmmPI
Smart Inserter
Smart Inserter
Posts: 5192
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: AI & Factorio Mods (Maglev dreams)

Post by mmmPI »

BHakluyt wrote: Thu Jul 02, 2026 5:44 am Wow I see a few downloaded the mod. That version is garbage, I got it fixed and got the code cleaned up. I'll do a bit of more offline testing and then come paste the full mod here again. Stay tuned.
Hey it can also be just robots that download to try and learn stuff, typically those AI we use they are trained with stuff crawled from the web, so in the download there may be a couple of non-real ones :(.

I can say at least one of the download was from me ! I tried to put it to version 2.1 naively but no it didn't work right away. I couldn't really test the mod then, i just looked at the code and it looks more complicated than "just" adding a different type of trains. The later task i thought would be "easier" because the perfomance and things to do would have been "copy" and "adaptation" from the base game.( a lot more pieces than just adding technology or receipe but still following existing code). But what you did is more "complicated" it involves more systems, some brand new. The performance impact "has to be" on one of those i imagine. But you may have already fixed a few things, from what i read. The AI can help providing code that can be used to test perfomance to some extend,to add in the mod, or let you know which debug already exist in the game and how to access them when it is running, but this is getting outside of the things i'm familiar with, i never had to design my own tools for that.

I think it would be interesting to have pictures of how it looks in game, i see on the code the hunger "bar" , i wonder how it looks, concept art are not representative enough to my taste, but i know other modders use them on the portal, it is really a matter of "taste" i feel. Now if you're excited to see a few downloads, you should definitely make it works for 2.1 and publish on the portal once it is playable. Maybe 2 weeks ? 3 weeks ? Hopefully you are getting closer to the dream maglev mod !
Check out my latest mod ! It's noisy !
Post Reply

Return to “Modding discussion”