ScrewTheTrees / WC3-TreeMeleeAi

Melee AI using typescript for WC3
3 stars 2 forks source link

how to build this project #1

Closed keamspring closed 3 years ago

keamspring commented 3 years ago

can you make instruction to this project? I 'm instresting .

ScrewTheTrees commented 3 years ago

Its built using NodeJS. So you have to download NodeJs, then after installation you have to use CMD or Powershell to naviage to the folder where this project is located (where package.json is). 1) After that you run the command "npm install", and it will finish without issues hopefully: 2) Change config.json "gameExecuteable" to your installed path of Warcraft III.exe 3) After everything is set up you can run it with "npm run fullRecompileAndRun"

It requires Warcraft 1.32 minimum.

keamspring commented 3 years ago

I have some exp of npm and NodeJs. Now I can build it. What's the operational principle?

ScrewTheTrees commented 3 years ago

The general idea of this entire project was to see if i could recreate creating warcraft 3 melee AIs solely using triggers/code, this was mainly due to them introducing Lua as a language, in fact this project is originally based on lua code from another repo i have.

The bulk of how to write/operate the AI is in /src/TreeAI/Races/AIRaceHuman.ts, currently i have only really been trying it on humans even if i wrote the AI to "possibly" be able to operate on different races, it never really reached that stage.

Several things remain unfinished, i kind of put the entire project on hold due to some things currently just not being possible to accomplish with the current natives/triggers/etc, like ordering the revival of heroes.

I have been talking to a friend of mine who works at the reforged team about it, so a few of those needed natives are gonna be included (and hopefully work) in 1.33.

keamspring commented 3 years ago

I will make a try when I am off duty.

keamspring commented 3 years ago

It seems that the main window stand in Battle.net after run this project. Should I modify some config to run Warcraft3.exe ? My "gameExecutable" path value (..../Warcraft III Launcher.exe) is correct in "config.json".

keamspring commented 3 years ago

after run this project , it must be entering game , I think , isn't right?

keamspring commented 3 years ago

I see that code "execFile(config.gameExecutable, ["-loadfile", filename, ...config.launchArgs]);" which mean run the Warcraft3 main program, but failed. There may be other parameters to add to "config.json" .

keamspring commented 3 years ago

sorry , I make a mistake for gameExecutable . Now it's running. The exe path must be a Warcraft3.exe , not Warcraft III Launcher.exe.

keamspring commented 3 years ago

The hero cannot learn skills, the normal unit and hero do not escape when it is dying, also the hero can not pick up item and book. It seems that lots of things to do .

ScrewTheTrees commented 3 years ago

Yes, there is far more things to finish than that, like unit target priorities, Scouting, Targeting players, handling of unit abilities, ability priorities, buying in shops, etc etc.. Wont work on anything before 1.33 and even then i'm not sure when i will restart progress on this project.