Goal #1: Complete! Figure out where in the world to start. That is, which language should I try and tackle.
Goal #2: Complete! Lua, that's the one. Now, to figure out what in the world I'm doing. Actually, to figure out the simple tasks, like placement.
Goal #3: Complete! Now that I can place units, determine which territories are involved, and even make units switch states/perform actions, I need to figure out how to properly reference specific units. Damn that infernal 'attempt to index ('51') a nill value' error! How can 51 be a nill value?!
Goal #4 : Learn how to get fleet to react to situations. As of this moment, I can place all units (ground and naval) and move units, but only statically, not dynamically. That is, place ship at x/y, move ship to x/y. I need to be able to see enemy ships/ground units (like Radar) and approach/avoid as necessary.
Goal #5: Learn how to launch appropriate planes and move them dynamically.
Goal #6: Learn to use the OnEvent() function to launch silos.
Help #1: Complete! I need a name for this Bot, and being the creatively handicapped person I am, I look to you for suggestions.
- BM's (nukes) will inflict damage to a radius of 1.8 from ground zero.
- Minimum placement distance for ground units is 3.6 (radius from center of existing unit).
- GetAllUnits() does not gather information about enemy silos that are only visible because they have launched. I.e., silos that have not been seen by radar.
- OnEvent (eventtype, sourceID, targetID, unittype, longitude, latitude) =
- eventtype: see the DEFCON AI Luabot Reference for eventtypes
- sourceID: The ID of the gunshot or missile if eventtype is Destroyed or Hit. ID of the unit causing the eventtype
- targetID: ID of the unit getting Destroyed or Hit.
- unittype: Not sure about this, only prints 'Invalid'. For units, I just use targetID:GetUnitType().
- longitude: x coordinates of eventtype location. E.g., the spot your carrier, Silo, etc dies.
- latitude: y coordinates of eventtype location
Alright boys and girls, I'm going to try my hand at making a Defcon Bot. I have zero coding skills (well, slightly above zero, negligible at best) but loads of willingness to attempt to learn whatever is needed to create a Bot to crush it's human and perhaps fellow Bot opponents.
I keep waiting and waiting for something to appear Bot-wise, and have been surprisingly disappointed. Of necessity, I'll make this a public work log and solicit your help where needed. Read that as, "you that have real coding skills".
Once this bot is functional, I'll try to work out some way to host a Bot enabled server for those interested to test out it's skills. I do not anticipate having anything functional for quiet some time, but promise to provide a Bot of Bots.
Let the (Defcon) world tremble in fear.