If you are on Windows, the AIs are located in <Folder where you installed Oolite>/oolite.app/Resources/AIs.Shipbuilder wrote:[Sorry to be a pain and I'm sure it is easy to find but I don't know where to locate oolite.app/Resources to find the above AI.plists If anyone could point me in the right direction it would be much appreciated.
New ships under development
Moderators: winston, another_commander
-
- Quite Grand Sub-Admiral
- Posts: 6682
- Joined: Wed Feb 28, 2007 7:54 am
Re: New ships under developemnt
Re: New ships under developemnt
In your oolite install directory - that will depend on where you put it and which OS you are on.Shipbuilder wrote:Sorry to be a pain and I'm sure it is easy to find but I don't know where to locate oolite.app/Resources to find the above AI.plists If anyone could point me in the right direction it would be much appreciated.If you look in the AI for the police ships (usually route1patrolAI.plist - found in the AI folder under oolite.app/Resources)
Edit - Ninja'd by A_C in a role reversal from normal stylie.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
- Capt. Murphy
- Commodore
- Posts: 1127
- Joined: Fri Feb 25, 2011 8:46 am
- Location: UK South Coast.
Re: New ships under developemnt
Oh....the wiki entry for lightsActive suggested you can hence my post. Maybe it's just for shaders on sub-ents?Thargoid wrote:Except for the minor point that you can't actually attach flashers to sub-entities?Capt. Murphy wrote:Smiv's shipset is an example of where it's done via script. The JS equivalent isship.lightsActive (read/write boolean)
. There is an advantage to doing it via script in that if you have flashers attached to a ships sub entities they can be controlled independently of each other or flashers attached to the main entity using JS.
Setting this property to true turns on all the entity’s flashers, and setting it to false turns them off. Setting it sets the lightsActive property for all subentities, but subentities’ setting can also be manipulated separately. In addition to affecting flashers, the value can be used by shaders.
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
- Shipbuilder
- ---- E L I T E ----
- Posts: 877
- Joined: Thu May 10, 2012 9:41 pm
- Location: Derby
Re: New ships under developemnt
Thanks guys - I'll check it out later and give it a go.
Looks like being my first steps in to a hopefully very simply AI exercise (Something that I have been putting off but definitely something that I need to get in to in order to develop more specific behaviour for future OXPs I intend to work on)
EDIT - I intend to write a specific AI for the Cylon Raider Mark 1 so this will be the first big test !
Looks like being my first steps in to a hopefully very simply AI exercise (Something that I have been putting off but definitely something that I need to get in to in order to develop more specific behaviour for future OXPs I intend to work on)
EDIT - I intend to write a specific AI for the Cylon Raider Mark 1 so this will be the first big test !
The GalTech Industries Corporation - Building ships to populate the galaxies.
Increase the variety of ships within your Ooniverse by downloading my OXPs
Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
Increase the variety of ships within your Ooniverse by downloading my OXPs
Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
Re: New ships under developemnt
Unless I'm missing something or we have a special case, it would be a sub-ent of a sub-ent, which I don't think is allowed. There's possibly no reason why it couldn't be for flashers (as there would be no recursion risk), but unless it's already been made an exception could possibly be requested there?Capt. Murphy wrote:Oh....the wiki entry for lightsActive suggested you can hence my post. Maybe it's just for shaders on sub-ents?
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Re: New ships under developemnt
I think the entry is clear and exact. Nowhere does it claim that a subentity can have a flasher (= can have another subentity). It speaks about affecting subentities of an entity, namely those subentities that are flashers.Capt. Murphy wrote:Oh....the wiki entry for lightsActive suggested you can hence my post. Maybe it's just for shaders on sub-ents?Setting this property to true turns on all the entity’s flashers, and setting it to false turns them off. Setting it sets the lightsActive property for all subentities, but subentities’ setting can also be manipulated separately. In addition to affecting flashers, the value can be used by shaders.
lightsActive
will de-/activate subentities that are flashers and entities/subentities that use shaders. I find that quite clear to understand.- Shipbuilder
- ---- E L I T E ----
- Posts: 877
- Joined: Thu May 10, 2012 9:41 pm
- Location: Derby
Re: New ships under developemnt
I'm still struggling to get police ships with flashers turned on before I have attacked them.
I have updated the section in the shipdata.plist for the police version as follows: -
I then created a new subfolder in the .oxp folder named AIs and placed a copy of both route1patrolAI and policeInterceptAI in to this folder.
I renamed the route1patrolAI to colonial_viper_mark1_policeAI, changed the GLOBAL switchLightsOff to switchLightsOn and replaced any references to setAITo: interceptAI to setAITo: colonial_viper_mark1_InterceptAI.
I renamed the policeInterceptAI to colonial_viper_mark1_InterceptAI and changed all references to switchLightsOff to switchLightsOn.
Once I'd done this I thought that I had it........But unfortunately not.
Any ideas ?
I have updated the section in the shipdata.plist for the police version as follows: -
Code: Select all
<key>ai_type</key>
<string>colonial_viper_mark1_policeAI.plist</string>
<key>auto_ai</key>
<string>no</string>
I renamed the route1patrolAI to colonial_viper_mark1_policeAI, changed the GLOBAL switchLightsOff to switchLightsOn and replaced any references to setAITo: interceptAI to setAITo: colonial_viper_mark1_InterceptAI.
I renamed the policeInterceptAI to colonial_viper_mark1_InterceptAI and changed all references to switchLightsOff to switchLightsOn.
Once I'd done this I thought that I had it........But unfortunately not.
Any ideas ?
The GalTech Industries Corporation - Building ships to populate the galaxies.
Increase the variety of ships within your Ooniverse by downloading my OXPs
Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
Increase the variety of ships within your Ooniverse by downloading my OXPs
Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
Re: New ships under developemnt
Hold down shift when you restart the game (until the spinning cobbie). Until you do, the changes in the OXP won't get recognised as the cached version will be used (ie with the original trunk AIs).
You can check by looking in the latest.log (it should tell you near the start that the cache was flushed due to shift being pressed), or by targetting one of the ships and using the console command
You can check by looking in the latest.log (it should tell you near the start that the cache was flushed due to shift being pressed), or by targetting one of the ships and using the console command
PS.target.AI
and PS.target.AIState
to show the current AI and AI state of your target ship.My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
- Shipbuilder
- ---- E L I T E ----
- Posts: 877
- Joined: Thu May 10, 2012 9:41 pm
- Location: Derby
Re: New ships under developemnt
Thanks for the suggestions.
With regard to the console command how do i use this ?
I have tried this and also removed the oxp from the addons folder reloaded Oolite then closed down put the oxp back in the addons folder and restarted but still no joy.Hold down shift when you restart the game (until the spinning cobbie). Until you do, the changes in the OXP won't get recognised as the cached version will be used (ie with the original trunk AIs).
I will have a look at the log file tonight (I assume that it is in the Oolite folder where Oolite is installed).You can check by looking in the latest.log (it should tell you near the start that the cache was flushed due to shift being pressed), or by targeting one of the ships and using the console command PS.target.AI and PS.target.AIState to show the current AI and AI state of your target ship.
With regard to the console command how do i use this ?
The GalTech Industries Corporation - Building ships to populate the galaxies.
Increase the variety of ships within your Ooniverse by downloading my OXPs
Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
Increase the variety of ships within your Ooniverse by downloading my OXPs
Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
-
- Quite Grand Sub-Admiral
- Posts: 6682
- Joined: Wed Feb 28, 2007 7:54 am
Re: New ships under developemnt
The Debug Console is a must if you are doing OXP development or writing code for the core game. Using it lets you generate test conditions in the game in real-time in order to test OXPs, spawn ships you have created, change the AIs of entities on the fly, inject JavaScript code directly into the game and much more. It even allows for remote debugging sessions between two computers, where one is running the console and the other is running the game.Shipbuilder wrote:With regard to the console command how do i use this ?
To enable it, you need to have Basic-debug.oxp installed in your AddOns folder. If you are using Windows, then Basic-debug.oxp is offered during installation of the game and by default it is installed, so unless you have changed the setting, you should have it already present.
Then you need to download the console program itself. It is found here: http://developer.berlios.de/project/sho ... e_id=18953.
To use it, you must run the OoDebugConsole.exe program before running Oolite. When run, the console window will open and report that it is waiting for connection. Starting up Oolite with the Basic-debug.oxp installed will establish this connection. From that point onwards, you can issue commands like the ones Thargoid mentioned earlier to the game via the console and see the responses/output in its window.
A simple search for "debug console" and "debug oxp" in the wiki yields some useful more in-depth information.
- Shipbuilder
- ---- E L I T E ----
- Posts: 877
- Joined: Thu May 10, 2012 9:41 pm
- Location: Derby
Re: New ships under developemnt
Thanks for the info another commander - It'll give me something to get my teeth in to this week
The GalTech Industries Corporation - Building ships to populate the galaxies.
Increase the variety of ships within your Ooniverse by downloading my OXPs
Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
Increase the variety of ships within your Ooniverse by downloading my OXPs
Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
- Shipbuilder
- ---- E L I T E ----
- Posts: 877
- Joined: Thu May 10, 2012 9:41 pm
- Location: Derby
Re: New ships under developemnt
I have managed to install the Debug Console which has opened a connection with Oolite.
As a trial run I have started a new game, armed the ident computer and locked the computer on to a standard Galcop Viper.
I have typed the following 2 commands in to the Debug Console (with the reply from the debug also noted).
Am I doing this correctly as I was expecting the Debug to report a particular AI ? (I get the same result if I fire at the Galcop Viper).
As a trial run I have started a new game, armed the ident computer and locked the computer on to a standard Galcop Viper.
I have typed the following 2 commands in to the Debug Console (with the reply from the debug also noted).
Code: Select all
>:PS.target.AIState
Macro :PS.target.AIState is not defined
>:PS.target.AI
Macro :PS.target.AI is not defined
Am I doing this correctly as I was expecting the Debug to report a particular AI ? (I get the same result if I fire at the Galcop Viper).
The GalTech Industries Corporation - Building ships to populate the galaxies.
Increase the variety of ships within your Ooniverse by downloading my OXPs
Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
Increase the variety of ships within your Ooniverse by downloading my OXPs
Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
- SandJ
- ---- E L I T E ----
- Posts: 1048
- Joined: Fri Nov 26, 2010 9:08 pm
- Location: Help! I'm stranded down here on Earth!
Re: New ships under developemnt
Remove the colon from before the PS.
Flying a Cobra Mk I Cobbie 3 with nothing but Explorers Club.OXP and a beam laser 4 proper lasers for company
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
- Shipbuilder
- ---- E L I T E ----
- Posts: 877
- Joined: Thu May 10, 2012 9:41 pm
- Location: Derby
Re: New ships under developemnt
Thanks SandJ I've got the debug console working fine now thanksSandJ wrote:Remove the colon from before the PS.
So getting back to the original topic i.e. trying to specify a police ship where the flashers are on before being attacked I have checked that the cache has been flushed by holding shift down in the latest log file.
I have also checked using the PS.target.AI command in the debug console which has confirmed that the OXP is using the standard planetPatrolAI.plist for the AI hence the reason that flashers are off until attacked.
At least now I understand why the ship is not behaving in the way I want I just don't understand why the OXP is not using the colonial_viper_mark1_policeAI file
I'll have a double check through to make sure that I don't have any silly typos but I reckoned to have done this yesterday evening.
The GalTech Industries Corporation - Building ships to populate the galaxies.
Increase the variety of ships within your Ooniverse by downloading my OXPs
Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
Increase the variety of ships within your Ooniverse by downloading my OXPs
Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
- Shipbuilder
- ---- E L I T E ----
- Posts: 877
- Joined: Thu May 10, 2012 9:41 pm
- Location: Derby
Re: New ships under developemnt
Thanks to the advice I have recieved by using the Debug Console I have established that if I spawn ships using the debug console or if I encounter them in general play, i.e. flying between planets, they are using my colonial_viper_mark1_policeAI and colonial_viper_mark1_InterceptAI AI.
The issue where the Colonial Viper doesn't use my tweaked AI seems to be only when the ships launch from a station. In this case they use the standard route1patrolAI and policeInterceptAI AI.
Does anyone have any ideas how I can get the ships launching from stations to use the tweaked AI ?
The issue where the Colonial Viper doesn't use my tweaked AI seems to be only when the ships launch from a station. In this case they use the standard route1patrolAI and policeInterceptAI AI.
Does anyone have any ideas how I can get the ships launching from stations to use the tweaked AI ?
The GalTech Industries Corporation - Building ships to populate the galaxies.
Increase the variety of ships within your Ooniverse by downloading my OXPs
Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
Increase the variety of ships within your Ooniverse by downloading my OXPs
Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"