Creating an AI for Terraria

GDBobby

Terrarian
Hey guys, awhile ago I had set my goals on creating an AI that could hopefully learn and progress through Terraria. I set my sights on Terraria for a couple reasons, mainly that it is single player, has a complex goal system, and is highly dynamic.

I ran in to an issue recently in which I couldn't send inputs to Terraria directly through C++ and I came to the conclusion that I needed to create my own driver (insanely difficult) or create a VM (second copy of windows 10??). After taking a little break and hearing about the SC2 AI API, an idea came up that I could do use some mods to circumvent this. I'm not familiar with Java or the limits of modding at all and I really don't mind learning, but time is limited for us all and I'm trying to be as efficient as possible. My question is, are there any mods related to developing Player AI? If not, does anyone have any recommendations for the approach?

Any other related discussion is welcome.
 
I love the videos that show AI learning a game, so I would love to see a mod that does this, so I support this idea, sadly I don't know how to program or help:( (am I motivating you? cuz motivation helps, sometimes)
 
And have you ever made an AI (for another game)? It's not that easy.
Should your AI know the Terraria Code as well or can it only see the same as a normal user can do?

And why the key-press should not work? You might used the wrong function?
You also need to hold down the key for some time. E.g. send key down, hold 200ms and release again. Terraria might not react if you press and release a key in very short time.

Some easy way to to do some key inputs is a software called Autohotkey (https://en.wikipedia.org/wiki/AutoHotkey) or AutoIt. If you can't figure out how it works in C++ you could run some scripts in that script language. It can also used for other computing or visual analysis of the current picture. But it is very slow.
 
Back
Top Bottom