

I expect the reverse normal to be used lots by fellow Ooliters! Fantastic trick. Bravo.
Moderators: winston, another_commander
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.
This is actually a bug in the script. I reported it a few years ago, but it didn’t matter then because everyone was using Wings3D. :-)Scarecrow wrote:Unless... some of my OBJs had variables in that were supposed to be integers (or at least the Python script is expecting them to be integers) but were in fact assigned the value 'off' - this caused the script to have a paddy and strop off.
Quote for emphasis. The debug console is truly an invaluable tool no OXPer should be without, regardless of the platform they are working on.Commander McLane wrote:My suggestion is the same as Thargoid's: Before having a nervous breakdown, or frantically yelling for help, just look in the logfile.
Actually strike that and replace with: Always look in the logfile. On my computer I have the logfile open in a window next to my Oolite window all the time. This way I don't only immediatly see all errors I have made, but also can inform other OXPers about the errors they made when the wrote their OXPs without consulting the log.
Sometimes even better than the log file is the JS-console. If you're on a Mac, it is integrated in Debug.oxp. Once you've started working with Debug.oxp and the console you won't know anymore how you ever could live and script without it. Seriously. Just one example: To what a hassle you went just to make your ship appear. And then it doesn't even appear as a ship, but as a buoy. With Debug.oxp it's a piece of cake: You just launch and choose 'Create Ship...' from the new drop-down menu named 'Debug'. A small box opens and asks you to type the role of the ship you want to create. Do it, and the ship appears immediately within 10 km of your current position, in all its beauty. And if you want another one, just choose 'Create Ship...' again, as often as you want.
And the console is the place where you (a) find debugging information, error messages, and the like, with valuable extra information compared to the log, and (b) can type all JavaScript-commands with immediate effect, so you can manipulate the Ooniverse and anything around you on the fly. In-val-u-a-ble!![]()
If you have (and know hat to use) these instruments, OXP-understanding and OXP-creating immediatly becomes twice as easy.
Just so non-Mac OXPers don’t feel left out: many of the Debug menu commands just issue JavaScript commands. For instance, Create Ship… uses: system.legacy_addShipsWithinRadius('whatever-role-you-specified', 1, 'abs', player.ship.position, 10000), which works fine in the cross-platform JS console. If you want to use it a lot, you can create a macro, like this:Commander McLane wrote:Just one example: To what a hassle you went just to make your ship appear. And then it doesn't even appear as a ship, but as a buoy. With Debug.oxp it's a piece of cake: You just launch and choose 'Create Ship...' from the new drop-down menu named 'Debug'. A small box opens and asks you to type the role of the ship you want to create. Do it, and the ship appears immediately within 10 km of your current position, in all its beauty. And if you want another one, just choose 'Create Ship...' again, as often as you want.
Code: Select all
> :setM create system.legacy_addShipsWithinRadius(PARAM, 1, 'abs', player.ship.position, 10000)
> :create my-role
"buoy" is (one of) the role(s) of the buoy entity (look in shipdata.plist in the resources/config folder to see). So to generate a con-store, you'll need to look in the shipdata.plist file for the OXP with it in, find out what the role is for the con-store entity, and then :create constorerole, replacing constorerole with whatever the role is defined as.Pangloss wrote:I downloaded Debug, just for kicks & giggles. I can generate buoys by typing "buoy". How would I generate a Mall-Wart Griff Con Store?