Oolite AIs
Moderators: winston, another_commander
- RyanHoots
- ---- E L I T E ----
- Posts: 958
- Joined: Fri May 20, 2011 8:10 pm
- Location: Nowhere
- Contact:
Oolite AIs
I am going to work on AIs for Oolite, maybe an escort fighter, or a clown that blows up after a bit. Any tips or ideas? Thanks.
- Smivs
- Retired Assassin
- Posts: 8408
- Joined: Tue Feb 09, 2010 11:31 am
- Location: Lost in space
- Contact:
Re: Oolite AIs
Yeah, read the Wiki page, then realise it really doesn't give you any idea how they actually work.
The good news is, as always, there will be plenty of help here if you need it.
The good news is, as always, there will be plenty of help here if you need it.
Commander Smivs, the friendliest Gourd this side of Riedquat.
- RyanHoots
- ---- E L I T E ----
- Posts: 958
- Joined: Fri May 20, 2011 8:10 pm
- Location: Nowhere
- Contact:
Re: Oolite AIs
Yep. I just completed a simple AI. If it works it will be very funny. If attacked, it blows up like a Q-Bomb.Smivs wrote:
The good news is, as always, there will be plenty of help here if you need it.
- Smivs
- Retired Assassin
- Posts: 8408
- Joined: Tue Feb 09, 2010 11:31 am
- Location: Lost in space
- Contact:
Re: Oolite AIs
I can think of something else that does that.RyanHoots wrote:..... it will be very funny. If attacked, it blows up like a Q-Bomb.
Commander Smivs, the friendliest Gourd this side of Riedquat.
Re: Oolite AIs
Try looking at these to give you some ideas . . .
http://wiki.alioth.net/index.php/AI
That should get you started. Also, try looking at any OXPs that do things that you enjoy with the AI.
http://wiki.alioth.net/index.php/AI
That should get you started. Also, try looking at any OXPs that do things that you enjoy with the AI.
OXPs: Furball 1.8, Factions 1.12
- Capt. Murphy
- Commodore
- Posts: 1127
- Joined: Fri Feb 25, 2011 8:46 am
- Location: UK South Coast.
Re: Oolite AIs
In addition to the Wiki take a look at the AI's included in the core game to get a bit of a grip on how they are put together. It's a pretty complex area.
If testing a new creation's AI I suggest giving it an attached script with this code snippet.
This will help you tweak/bugfix your AI from the log file.
I'll be releasing version 1.1 of my escort contracts OXP in a day or two which includes a custom AI and ship script built from scratch. It's only taken me about a month to get it right.... . If you are interested take a look.
If testing a new creation's AI I suggest giving it an attached script with this code snippet.
Code: Select all
this.shipSpawned = function()
{this.ship.reportAIMessages = true;}
I'll be releasing version 1.1 of my escort contracts OXP in a day or two which includes a custom AI and ship script built from scratch. It's only taken me about a month to get it right.... . If you are interested take a look.
Last edited by Capt. Murphy on Wed Jun 15, 2011 11:36 am, edited 1 time in total.
Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
- RyanHoots
- ---- E L I T E ----
- Posts: 958
- Joined: Fri May 20, 2011 8:10 pm
- Location: Nowhere
- Contact:
Re: Oolite AIs
I hope to write AIs for some ships I've made. I then need to find out why I can't install Wings... but getting a LInux app to work is my specialty.
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: Oolite AIs
Yes, if you really want to understand, you must start logging them. That helps in understanding how they work. They probably work different than you first think. And instead of setting the messages on with a script you can also switch it on during the addition command:Capt. Murphy wrote:If testing a new creation's AI I suggest giving it an attached script with this code snippet.
this.shipSpawned = function()
{this.ship.reportAIMessages = true;}
This will help you tweak/bugfix your AI from the log file.
Code: Select all
system.addShips('pirate', 1, player.ship.position, 10000)[0].reportAIMessages = true
One other way is targeting the ship and use:
Code: Select all
player.ship.target.reportAIMessages = true
Anyhow, you do need the console to do this all.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Re: Oolite AIs
There’s also the generate-ai-graphviz hidden setting, which makes graphs of the possible state transitions in each AI that’s loaded. Have I mentioned that I like graphs? ;-)
E-mail: [email protected]
Re: Oolite AIs
Anyone know where these files are created, I have yet to locate one - it's either missing, or absent . . . ?Ahruman wrote:There’s also the generate-ai-graphviz hidden setting, which makes graphs of the possible state transitions in each AI that’s loaded. Have I mentioned that I like graphs?
OXPs: Furball 1.8, Factions 1.12
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Re: Oolite AIs
They should be generated in the same place as the log. Also, they’re only generated when an AI is first loaded, so start Oolite with shift held down to clear the cache.m4r35n357 wrote:Anyone know where these files are created, I have yet to locate one - it's either missing, or absent . . . ?
E-mail: [email protected]