What Tools Are Good For Windows OXP Programming

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Dog G6
Poor
Poor
Posts: 7
Joined: Sat Jan 19, 2013 2:49 pm
Contact:

What Tools Are Good For Windows OXP Programming

Post by Dog G6 »

I would like to start creating OXPs. With Windows, I have Notepad++ and of course Notepad. I would prefer to be able to use Notepad++ or a similar editor, but even though it has Objective-C support, I don't think it has full GNUstep functionality. I could still program it in NPP, and save it as a .plist file and it would work, correct? The JavaScript side wouldn't be a problem.

Otherwise, are there any good editors that support all of the required libraries required for OXP programming?

Also, the OXPs could be written in XML, right? NPP does support XML, although I'm not sure how hard it would be to add compatibility with other OXPs, as I believe it said on the wiki that it would still need to be translated?

Thanks.
User avatar
Cmd. Cheyd
---- E L I T E ----
---- E L I T E ----
Posts: 934
Joined: Tue Dec 16, 2008 2:52 pm
Location: Deep Horizon Industries Manufacturing & Research Site somewhere in G8...

Re: What Tools Are Good For Windows OXP Programming

Post by Cmd. Cheyd »

I use NPP for all of my OXP dev because OXPs are all in JS (and plists).

Obj-C is only needed of you're attempting to modify core/trunk code.
Dog G6
Poor
Poor
Posts: 7
Joined: Sat Jan 19, 2013 2:49 pm
Contact:

Re: What Tools Are Good For Windows OXP Programming

Post by Dog G6 »

Really? I thought JS was only supported for AI and planet scripts. Cool! What I had in mind was an economy and AI OXP. That would be possible, or would the economy part require alterations to core code?
User avatar
GGShinobi
---- E L I T E ----
---- E L I T E ----
Posts: 291
Joined: Tue Dec 25, 2012 7:20 pm

Re: What Tools Are Good For Windows OXP Programming

Post by GGShinobi »

Dog G6 wrote:
I would like to start creating OXPs. With Windows, I have Notepad++ and of course Notepad. I would prefer to be able to use Notepad++ or a similar editor, but even though it has Objective-C support, I don't think it has full GNUstep functionality. I could still program it in NPP, and save it as a .plist file and it would work, correct? The JavaScript side wouldn't be a problem.

Otherwise, are there any good editors that support all of the required libraries required for OXP programming?

Also, the OXPs could be written in XML, right? NPP does support XML, although I'm not sure how hard it would be to add compatibility with other OXPs, as I believe it said on the wiki that it would still need to be translated?

Thanks.
Well, I don't know if it is the right recommendation for a beginner, but I do almost ALL of my work with the nearly omnipotent vim (or gvim, if I'm on Windows). Although I have to admit that it might not be the easiest editor to learn, this might be mitigated by the fact that there is a game where you can learn the basics: http://vim-adventures.com/. :)
忍 knowing that enough is enough, you'll always have enough.

Running Oolite 1.77 on Ubuntu Linux 12.04 LTS
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: What Tools Are Good For Windows OXP Programming

Post by Smivs »

I hope it goes well - developing OXPs can be enormous fun and very rewarding.
Just two points I'd like to make. Firstly, although XML is acceptable openStep is generally preferred as it is far more 'human-readable', which is why most authors use it now and most OXPs are coded in openStep, as is the core game. :wink:
Also, be aware that Windows is not case-sensitive wheras Linux and Macs are. I've probably seen more 'silly' OXP errors caused by this than anything else, so watch your cases, and see if a Mac or Linux user can give anything a quick test for you before release.
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: What Tools Are Good For Windows OXP Programming

Post by Thargoid »

Hammer, bottle of whiskey, stress toy, phone number of the Samaritans, solid brick wall (see <-- for instructions)...

But slightly more seriously, all you need is a good editor (N++ is my tool of choice), the game itself, including the JS console and debug.oxp (the latter ships with the game, but you may need to tick a box to get it to install). Most of the files are either Javascript or openStep/XML plists, and all are text files. The slight exception are AI files, and those are still text files.

Oh and a web browser fairly permanently pointed at the Wiki, as useful reference.
Dog G6
Poor
Poor
Posts: 7
Joined: Sat Jan 19, 2013 2:49 pm
Contact:

Re: What Tools Are Good For Windows OXP Programming

Post by Dog G6 »

How would I use openStep on Windows? Does NPP support it, or is there an editor that does, or should I just use Notepad for it? Thanks guys for all of the quick replies! I'll also look into the gvim GGShinobi.
User avatar
Tricky
---- E L I T E ----
---- E L I T E ----
Posts: 821
Joined: Sun May 13, 2012 11:12 pm
Location: Bradford, UK. (Anarchic)

Re: What Tools Are Good For Windows OXP Programming

Post by Tricky »

Some pointers on using Notepad++ for OXPs...

Save your files as "ANSI as UTF-8", makes sure that special symbols can be shown on other systems. Make sure your file names use the same case, Windows doesn't care, other OS's do! If you use the JSlint plugin (which I do) you will find it is very picky about the format, which is why my JS is formatted differently to other OXPs*. I've associated plist with ObjC (in Notepad++) and it seems to syntax highlight it OK. Use sessions, I use .npp as the extension and have associated it with Notepad++ in Windows so I can just click on the file to load it in.

--
* [EliteWiki] Jaguar Company
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: What Tools Are Good For Windows OXP Programming

Post by Thargoid »

It's just a way of coding the file (both openStep and XML are basically text files).

An example, from the wiki:

XML

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>my_custom_adder</key>
  <dict>
    <key>like_ship</key>
    <string>adder</string>
    <key>name</key>
    <string>Freak Adder</string>
    <key>model</key>
    <string>custom_adder.dat</string>
    <key>roles</key>
    <string>trader my_freaky_adder</string>
  </dict>
</dict>
</plist>
OpenStep:

Code: Select all

{
  my_custom_adder = {
    like_ship = "adder";
    name = "Freak Adder";
    model = "custom_adder.dat";
    roles = "trader my_freaky_adder";
  };
}
Both are equivalent and interchangable (as separate files - you can't have both styles within one file). Some people prefer one and some the other - personally I like openStep as it's easier for me to read and edit. There are a few pro's and con's for each - it's very much a matter of personal taste and the game will happily ingest either.[/color]
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: What Tools Are Good For Windows OXP Programming

Post by Smivs »

Re openstep, Thargoids quotes from the Wiki illustrate nicely the differences (and similarities) between the two. You will see that the openStep is both shorter and easier to read.
Take look at the files in the 'Resources' folder of the core game for examples - in fact as they cover every entity in Oolite there is probably something similar to your project there and the core files therefore also make excellent templates to work with.
Just c&p something similar to what you want into your text editor and start changing the numbers. :)
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: What Tools Are Good For Windows OXP Programming

Post by cim »

Dog G6 wrote:
Really? I thought JS was only supported for AI
AI is one of the few things that doesn't (yet) use Javascript. There's a simple state machine language used instead, which is written using plist entries. N++ will be fine for it, though.

People have already recommended the Wiki: the two pages I keep open almost permanently when doing OXP programming are [wiki]OXP_howto[/wiki] and [wiki]Oolite_JavaScript_object_model[/wiki]. There is a link to almost every necessary reference page on one or the other. [wiki]OXP_Distribution[/wiki] is also worth reading.
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: What Tools Are Good For Windows OXP Programming

Post by Diziet Sma »

Dog G6 wrote:
I would prefer to be able to use Notepad++ or a similar editor, but even though it has Objective-C support, I don't think it has full GNUstep functionality. I could still program it in NPP, and save it as a .plist file and it would work, correct?
Unless you're using a Mac, there is NO editor that has full GNUstep/openStep functionality, sadly. I've recently been searching hard for one, with no success. Yes, NPP will do the job, however.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
gizmo
Deadly
Deadly
Posts: 157
Joined: Mon Nov 22, 2010 2:40 pm
Location: aboard the "Kiss of Time"

Re: What Tools Are Good For Windows OXP Programming

Post by gizmo »

Diziet Sma wrote:
Unless you're using a Mac, there is NO editor that has full GNUstep/openStep functionality, sadly. I've recently been searching hard for one, with no success. Yes, NPP will do the job, however.
For Linux there is at least CodeEditor and ProjectManager (an IDE).

Edited to add:
another good cross-platform editor: SciTE

Although I have to agree with GGShinobi: vi is the only editor you'll ever need. :mrgreen:
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: What Tools Are Good For Windows OXP Programming

Post by Diziet Sma »

gizmo wrote:
Diziet Sma wrote:
Unless you're using a Mac, there is NO editor that has full GNUstep/openStep functionality, sadly. I've recently been searching hard for one, with no success. Yes, NPP will do the job, however.
For Linux there is at least CodeEditor and ProjectManager (an IDE).
CodeEditor has not been maintained since April 2004, and uses StepTalk for scripting support, which has not been maintained since June 2005. ProjectManager hasn't been maintained since mid 2008. That does not bode well. Much has changed since then.

I will take a look at CodeEditor, that is, assuming it will even run on Mint13.

I've already checked ProjectManager out, and apart from the clunky menus which act up under gnome2, the file browser cannot even SEE a folder with an .oxp extension, which would make it a real PITA to use for writing OXPs. :roll:
gizmo wrote:
Edited to add:
another good cross-platform editor: SciTE

Although I have to agree with GGShinobi: vi is the only editor you'll ever need. :mrgreen:
There are plenty of good editors around, but how many can syntax-check openStep code? SciTE can't, and nor can vi/vim.

And if you want a good cross-platform editor, you may as well go with Sublime Text 2 and actually enjoy using it. :mrgreen:
(and you can even enable vi-mode on it, if you're that way inclined)
Last edited by Diziet Sma on Tue Jan 22, 2013 8:56 pm, edited 1 time in total.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: What Tools Are Good For Windows OXP Programming

Post by Diziet Sma »

Oh, and since we've all gone and forgotten our manners..


Welcome aboard, Dog G6! 8)

(and welcome to the Dark Side, which is what we call OXP writing around here.. :twisted:)
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
Post Reply