.
Moderators: hoijui, Moderators
Re: Include 'crans-java-ai' in main build?
I'm all for it. Also you have an unread message in your PM, dating since last year.It seems to run slightly more reliably then other ai's in the current Spring build :)
edit: removed FUD.
Last edited by Anarchid on 23 Mar 2015, 09:42, edited 1 time in total.
Re: Include 'crans-java-ai' in main build?
I am not 100% sure LoadMap is what broke it, but it coincides on date and touched files.What is LoadMap and why does it break AI's
LoadMap is a new Spring feature which allows a gadget to instruct the engine to reset itself with a new map, basically starting a new game without restarting the engine.
It probably breaks Java interface because it included a requirement to make SkirmishAIHandler reusable, and the change which fulfilled this requirement was likely not tested with Java AIs.
(also possibly kloot hates java ai interface because of it being a kludge)
Re: Include 'crans-java-ai' in main build?
Just hardwire something like "if zk, then cormex", or use the ismex customparam via this.
It seems i was too unfair to the state of the java ai interface. It actually works. I think there were some issues reported by others but they were not as grave as i expected.
As i also mentioned in the PM, placement of these also is required to be super precise. You can get elmo-precise positions of those either by parsing them from GameRulesParams, or parsing json-encoded message sent to the AI on first gameframe, like this, or this
It seems i was too unfair to the state of the java ai interface. It actually works. I think there were some issues reported by others but they were not as grave as i expected.
As i also mentioned in the PM, placement of these also is required to be super precise. You can get elmo-precise positions of those either by parsing them from GameRulesParams, or parsing json-encoded message sent to the AI on first gameframe, like this, or this
Last edited by Anarchid on 21 Mar 2015, 12:59, edited 1 time in total.
Re: Include 'crans-java-ai' in main build?
create a pull request to the spring develop branch which adds it to the repo and which compiles. for an example CMakeLists.txt file see hughai i guess...cranphin wrote:What would need to be done for this?
I think the only issue is to get a CMakeLists.txt set up for it, which I've got no idea how those things work o.O
At the moment building is done with a simple Ant script.
Re: Include 'crans-java-ai' in main build?
Mods can have a file unitdefs_post.lua that alters all the unitdefs during loading.Hmm, what also puzzles me is 'energyMake' isn't provided either, but it's set in the unitdef lua files.
zero-K has such a file , it seems to set energyMake of units to zero, probally to use its own scripted resource system:
https://github.com/ZeroK-RTS/Zero-K/blo ... t.lua#L634
Code: Select all
if not reverseCompat then <--see top of file what that is
...
if ud.energymake and ud.energymake > 0 then
ud.customparams.income_energy = ud.energymake
ud.activatewhenbuilt = true
ud.energymake = 0
end
/edit basically same as with the metal extractors viewtopic.php?f=15&t=33276&p=567999#p567927
Re: Include 'crans-java-ai' in main build?
Actual internal storage is 100500 so that the energy that overflows over the scripted limit is shared to allies / spent on overdrive grid / etc.
There should be a TeamRulesParam for this.
There should be a TeamRulesParam for this.
Re: Include 'crans-java-ai' in main build?
Broken how? My AI seems to run fine...Anarchid wrote:Except in dev build, Java ai's are all broken wholesale at interface level since LoadMap.
Re: Include 'crans-java-ai' in main build?
I'll edit that post if i can to not spread further FUD. I apologize for doing it in the first place.It seems i was too unfair to the state of the java ai interface. It actually works. I think there were some issues reported by others but they were not as grave as i expected.
Hmm i guess i can do PR's, too, eventually.I'm starting to doubt if this is a good plan
It seems Zero-K has so many overrides and special things outside of the game engine, that it's not really a good fit for any AI that also tries to play other games (which means it has to be introspective, and relies on what the engine tell it) :)
Re: Include 'crans-java-ai' in main build?
I've been in a secretive mood and now my "ZK-compat" fork got to the point where it builds first three mexes, a solar, a factory, and then breaks and just spams solars until forever.
One of the things i had to do to get there was to completely disable the order validation check, which seems to be completely broken for bleeding edge engine (99-RC1) on BA as well.
That's a significant contra to inclusion. Is there a better way to circumvent this?
I guess i'm going to fix the "permanent estall" problem due to 100500 storage, add some hax to allow it to plop factory in ZK before mexes, and leave it there.
One of the things i had to do to get there was to completely disable the order validation check, which seems to be completely broken for bleeding edge engine (99-RC1) on BA as well.
That's a significant contra to inclusion. Is there a better way to circumvent this?
I guess i'm going to fix the "permanent estall" problem due to 100500 storage, add some hax to allow it to plop factory in ZK before mexes, and leave it there.