Exposing all player action to the Unit API
Posted: Fri Feb 03, 2017 1:31 pm
Hi! Been really enjoying Factorio and have been very impressed with the modding API, I've done various experiments from small new items to seeing how far I could take a total conversion of the game to create something entirely new!
For the most part it's been at least possible with some work if not really smooth to implement any ideas that came to mind. Being able to "overwrite" the map generation with my own algorithms was really fun and had a lot of possibilities. However, there was one area that unfortunately didn't appear to have any possibilities of getting working.
I wanted to try and build an AI character for the game, with the ability to mine resources, craft items they needed and build little factories of their own. However, after building the appropriate unit and getting them to detect and travel to nearby resources etc., I quickly realised there were some essential player actions that were seemingly impossible to use in my unit. The first issue was the ability to mine resources like Coal or Trees, but it looks like there may be many more actions that aren't currently available.
From an API design standpoint it seems like there's definitely room to fit these kinds of actions in, but of course I don't know the effort from the game's code standpoint. I would love to hear if exposing these actions is possible or even planned! I think the potential is huge for such features, for instance AI PvP, or even new "races" that exist alongside the player and the biters.
Edit: Apologies, didn't notice this forum section before, where I believe this thread belongs: viewforum.php?f=28
For the most part it's been at least possible with some work if not really smooth to implement any ideas that came to mind. Being able to "overwrite" the map generation with my own algorithms was really fun and had a lot of possibilities. However, there was one area that unfortunately didn't appear to have any possibilities of getting working.
I wanted to try and build an AI character for the game, with the ability to mine resources, craft items they needed and build little factories of their own. However, after building the appropriate unit and getting them to detect and travel to nearby resources etc., I quickly realised there were some essential player actions that were seemingly impossible to use in my unit. The first issue was the ability to mine resources like Coal or Trees, but it looks like there may be many more actions that aren't currently available.
From an API design standpoint it seems like there's definitely room to fit these kinds of actions in, but of course I don't know the effort from the game's code standpoint. I would love to hear if exposing these actions is possible or even planned! I think the potential is huge for such features, for instance AI PvP, or even new "races" that exist alongside the player and the biters.
Edit: Apologies, didn't notice this forum section before, where I believe this thread belongs: viewforum.php?f=28