Gobolino Posted September 28, 2019 Share Posted September 28, 2019 Hi!. I know this is not a programming board, but I'm kinda desperate and frustrated here. =/ This all started reading that you can "add" stations by modding the productionsindex.lua So great, I thought... in my game (SP) I have a trading port with too many drones and drones can only be sold to another one and as their goods that buy/sell are random, I literally have 158 sectors with trading ports... NONE buys me. So I went... ok, I have this mine, this TP that sells drones... okey, maybe I can get something useful from it. (transforming "ore" into "materials ore"). And here started my nightmare... After trying and trying and trying, I came up with this code: table.insert(productions, {factory="${good} Factory ${size}", ingredients={{name="Drone", amount=5, optional=0}, {name="Ore", amount=1, optional=0}, {name="Food Bar", amount=1, optional=0}}, results={{name="Mining Robot", amount=1}}, garbages={{name="Xanion Ore", amount=70}}}) Why Mineral Robots?, because it had everything (ingredients, results and garbage). Made a mod with that, started the game, open up the ~dev debug menu and there, in the factories, there is the "last one", mine!. (checked too trying to "build one" with a founder able ship). Everything good until now... I click the button, spawn one.... and it adds a "Vanilla" Mineral Robots.... After trying a bit, I just went with a "modified" Mineral Robots, just in case the "ore" was the one blocking it: table.insert(productions, {factory="${good} Factory ${size}", ingredients={{name="Drone", amount=1, optional=0}, {name="Ore", amount=1, optional=0}, {name="Food Bar", amount=1, optional=0}}, results={{name="Mining Robot", amount=1}}, garbages={{name="Scrap Metal", amount=1}}}) As you see, it's EXACTLY a copy of the vanilla one, just with the ingredients modified. (there are a lot of "duplicates" with different ingredients in the lua, so what I did was not much different?). Did the same... and.... it again spawns a "normal" vanilla one... Ok... maybe if I can change it again, so I did this: table.insert(productions, {factory="${good} Farm ${size}", ingredients={{name="Drone", amount=1, optional=0}, {name="Ore", amount=1, optional=0}, {name="Food Bar", amount=1, optional=0}}, results={{name="Mining Robot", amount=1}}, garbages={{name="Scrap Metal", amount=1}}}) So, it's now a farm... (and I wanted to know if I was clicking the right button). Did all again and *YES*, in the ~dev menu, it SAYS: "Mining Robot Farm". Good.... click on it... it spawns the vanilla one AGAIN. BUT!!!... the actual station that spawned, says: "Mining Robot Factory". So, the line is being read well (shows in the ~dev as Farm) but the actual station that it creates, it's the normal one. Ok, maybe if I try something that's not in the lua by default, something like this: table.insert(productions, {factory="${good} Mine ${size}", ingredients={{name="Drone", amount=1, optional=1}, {name="Food Bar", amount=35, optional=0}, {name="Ore", amount=5, optional=0}}, results={{name="Xanion Ore", amount=12}}, garbages={{name="Trinium Ore", amount=1}}}) Great, in the ~dev, it shows "Xanion Ore Mine", click on it and YES!, it spawns a mine with the name of "Xanion Ore Mine" but of course when I try to trade goods with it to see if it worked at last.... and this: https://steamcommunity.com/sharedfiles/filedetails/?id=1874362762 Of course it doesn't "produce" anything... and it demands the same things as other mines. Now, in the SAME sector, I have a Cooper and a Zync mine, and they DO produce, they do work well... Back in 2017, there was this: https://www.avorion.net/forum/index.php?topic=4049.0 And in there, it says: "But when you add new stations to to productionsindex.lua, you do not need to add them anywhere else. The game automaticly creates factories from all stations in productionsindex.lua." So... I just CAN'T imagine, what's wrong... =( Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now