Page 1 of 1

DeveloperSpace

Posted: Fri Mar 31, 2006 4:03 pm
by cactuar
So I created a NPC ship and wanted to look at it in action, so to speak. The easiest way I could think of to do this was to set it up as a trader and hope to come across it. I also edited its' role so that it would be chosen more often, however this is still kinda hit and miss.

Maybe a 'DeveloperSpace' function could be added. It would primarily be just a microcosm of the game, i.e. a single star system. The user can have control over what "items" are placed in it such as specific ships. It's not just for looknig at our new pretty ships but maybe also for testing new AIs and the like, giving the user a one-on-one with his creation, or allowing him/her to see how it interacts with other vessles/AIs.

I'm just thinking aloud, some people may require 2 star systems for wicthdrive jumping specifics.

Posted: Fri Mar 31, 2006 4:23 pm
by Cmdr. Wombat
You can use a script.plist to add your ship somewhere so you can see it. For example, to see it near the witchpoint beacon when you jump into a system:

Code: Select all

{
    "shiptest" = (
                 {  
                    conditions = ( "status_string equal STATUS_EXITING_WITCHSPACE" ); 
                    do = ( "checkForShips: your_ship_role", 
                         {
                            conditions = ( "shipsFound_number equal 0" );
                            do = ( "addShipsAtPrecisely: your_ship_role 1 pwu 0 0 1.01" ); 
                         },
                         );
                 }
                 ); 
}
Copy this into a file called script.plist. Edit "your_ship_role" to make it some unique role you've given your ship in it's shipdata.plist. Put the new script.plist into the Config folder in your oxp. Fire up Oolite and jump to a new system - your new ship should be sitting their near the beacon.

Alternatively, change STATUS_EXITING_WITCHSPACE to STATUS_LAUNCHING and the 1.01 at the end of the addShipsAtPrecisely to 0.01 and your ship should be waiting for you outside the station when you launch.

Posted: Fri Mar 31, 2006 4:32 pm
by cactuar
Sweet, cheer wombat!

Posted: Fri Mar 31, 2006 7:49 pm
by Rxke
Commander: where could this find a place in the Wiki?

it would be a nice addition (as extremely short writeup) amongst the tools...

Posted: Fri Mar 31, 2006 8:43 pm
by Cmdr. Wombat
Rxke wrote:
Commander: where could this find a place in the Wiki?

it would be a nice addition (as extremely short writeup) amongst the tools...
Actually the example script.plists given on the "OXP howto plist" page of the wiki are almost exactly what I have written above (someone else put together the wiki page). I think adding another page might be redundant.