Search

Search found 18 matches

by meriton
24 May 2014, 12:22
Forum: AI
Topic: [solved]Colonizing Mexes with java wrapper
Replies: 6
Views: 3422

Re: Colonizing Mexes with java wrapper

Do know about callback.getMap().isPossibleToBuildAt(def, location, facing)? That works fine for me, and is probably more efficient than checking all units (where you would need to handle the size of the unit, as well). Also, initializing with the first spot is incorrect (in case that is occupied and...
by meriton
22 May 2014, 22:40
Forum: AI
Topic: JavaAI how to find error number
Replies: 8
Views: 2326

Re: JavaAI how to find error number

You can of course write it to the spring log file instead: } catch (Throwable t) { StringWriter sw = new StringWriter(); t.printStackTrace(sw); writeToConsole(sw.toString); } The reason I write to a separate file is that I also want to emit other diagnostic information, making the log quite large. W...
by meriton
20 May 2014, 13:29
Forum: AI
Topic: JavaAI how to find error number
Replies: 8
Views: 2326

Re: JavaAI how to find error number

Of course there is :-) Here's how I do it: public class Logger { private static final PrintWriter writer; static { try { String filename = "merai-" + MerAI.callback.getSkirmishAI().getTeamId() + ".log"; String path = MerAI.callback.getDataDirs().allocatePath(filename, true, true,...
by meriton
19 May 2014, 13:23
Forum: AI
Topic: Java AI: Classpath setup
Replies: 10
Views: 3379

Re: Java AI: Classpath setup

Hm ... I am somewhat leery of trying to compile Spring. I'm on Windows, and am not really familiar with C++ build tools. Last time I tried to build a C++ open source project, it took me the better part of a day even though they had good documentation. I think that's too much effort just to get the c...
by meriton
18 May 2014, 23:10
Forum: AI
Topic: Java AI: Classpath setup
Replies: 10
Views: 3379

Re: Java AI: Classpath setup

I will, but they are all I have (as posted above I don't know where I can get a current version) ...
by meriton
18 May 2014, 20:35
Forum: AI
Topic: Java AI: Classpath setup
Replies: 10
Views: 3379

Re: Java AI: Classpath setup

Ok, I'll be using the source attachment from gajop's Git repo, then.

I have updated the wiki page with how to get the other jars.
by meriton
18 May 2014, 17:55
Forum: AI
Topic: Java AI: Classpath setup
Replies: 10
Views: 3379

Re: Java AI: Classpath setup

That Spring build is the same I have installed, and yes, the JAR files are identical. I have been poking around the Git repository, and found the makefile that generates JavaOO-AIWrapper.jar . It appears the JAR file is installed into a local maven repository, from where the ConfigureJavaSkirmishAI ...
by meriton
18 May 2014, 15:47
Forum: AI
Topic: Java AI: Classpath setup
Replies: 10
Views: 3379

Java AI: Classpath setup

Hi folks, Which JARs do I need to my classpath to develop a Java AI? I checked the instructions at http://springrts.com/wiki/AI:Development:Lang:Java, but they appear to be outdated: According to the docs, I should be adding Spring/AI/Interfaces/Java/[version]/jlib/vecmath.jar to the classpath, but ...
by meriton
10 May 2011, 20:57
Forum: AI
Topic: Changes Made to Java AI Wikipage
Replies: 2
Views: 1168

Re: Changes Made to Java AI Wikipage

External batch file just for moving the JAR file? I use eclipse's JAR export tool and set the proper file name and directory so it's exported to the right place to begin with. In order not to have to enter that info whenever I want to deploy I have saved that export configuration in a .jardesc file ...
by meriton
09 Jan 2011, 03:58
Forum: Help & Bugs
Topic: [Solved] How to bind the § key?
Replies: 9
Views: 6567

Re: How to bind the § key?

Thanks a lot Trepan and SirMaverik, that worked like a charm. BTW, I had to use a pure ASCII symbolic key name (with § as symbolic name, the key was not bound). This thread is now linked from the wiki page on keyboard bindings. PS: It's still weird that springsettings.exe would write an incorrect e...
by meriton
08 Jan 2011, 18:59
Forum: Help & Bugs
Topic: [Solved] How to bind the § key?
Replies: 9
Views: 6567

Re: How to bind the § key?

That's cumbersome in windows as far as I can tell. I don't want to change the system default, and switching it for an application requires me to see the task bar (bye bye fullscreen mode), or press a keyboard shortcut (Alt-Shift or Ctrl-Shift) I frequently use for other stuff and have therefore disa...
by meriton
08 Jan 2011, 17:53
Forum: Help & Bugs
Topic: [Solved] How to bind the § key?
Replies: 9
Views: 6567

Re: How to bind the § key?

That didn't work either (nothing happens when I press the key in game). I suspect it's because spring doesn't know what keycode the character § corresponds to. Unfortunately, neither do I.
by meriton
08 Jan 2011, 17:38
Forum: Help & Bugs
Topic: [Solved] How to bind the § key?
Replies: 9
Views: 6567

[Solved] How to bind the § key?

I have a keyboad in locale de-ch, where the key left of 1 is labeled §. I am trying to bind it to the drawinmap command, so far without success. So far, I tried: 1. In springsettings.exe -> hotkeys tab -> commands -> general :click on drawinmap 2. click into "New Shortcut", press the § k...
by meriton
26 Dec 2010, 22:34
Forum: AI
Topic: Java AI interface: Where is the path finding?
Replies: 3
Views: 1440

Re: Java AI interface: Where is the path finding?

Hey, you're exactly the person I was looking for :-) Thanks for pointing out the pureint merge again. Since there has been a release since your announcement, I was under the mistaken impression it would already contain the change. When is 0.83 scheduled to be released? In the meantime, is there a cu...
by meriton
26 Dec 2010, 17:03
Forum: AI
Topic: Java AI interface: Where is the path finding?
Replies: 3
Views: 1440

Java AI interface: Where is the path finding?

I'd like to get approximate travel times to specific map positions. Since the engine has a decent path finder, I'd rather query it than reinvent the wheel. How can I do this through the Java API? Full-text search through AIInterface.jar has revealed several promising looking methods such as com.spri...
by meriton
19 Dec 2010, 14:08
Forum: AI
Topic: The corlab can assist??
Replies: 9
Views: 2141

Re: The corlab can assist??

Thanks for the links Knorke, they already proved helpful in another matter :-)

I am not sure I understand your distinction between units and buildings though. How does the engine know whether a UnitDef represents a "building" or a "unit"?
by meriton
18 Dec 2010, 22:57
Forum: AI
Topic: The corlab can assist??
Replies: 9
Views: 2141

The corlab can assist??

The builder manager of my fledgling AI thinks that in BA, a corlab can assist nearby construction because canAssist is true, and buildDistance is 128. Yet I know the UI doesn't allow ordering a corlab to assist construction. Is the corlab able to assist construction? If not, how can I reliably deter...
by meriton
11 Jul 2009, 14:13
Forum: AI
Topic: AAI v0.90 in SVN / latest Spring release
Replies: 64
Views: 23639

Re: AAI v0.90 in SVN / latest Spring release

Thanks for the new binary, it works much better than the one from spring's installer (i.e. it doesn't crash right away when starting a game). Still, the game experience is far from perfect as AAI still crashes frequently. The last 3 infologs I got are: http://pastebin.com/m36a51703 http://pastebin.c...

Go to advanced search