How to build a mission?

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

Moderators: winston, another_commander

Post Reply
Dragonfire
---- E L I T E ----
---- E L I T E ----
Posts: 503
Joined: Sat Jun 11, 2011 7:46 pm

How to build a mission?

Post by Dragonfire »

Okay, I'm totally confused, and I can't make heads or tails of the wiki on this matter. How exactly does one build a mission OXP? I want to write one for the Wyvern OXP I'm working on, but I don't know how to get started.

I kinda need a quick step-by-step (tho a link would help, too). Just note, the wiki guide on how to write OXPs is not helping me.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: How to build a mission?

Post by Thargoid »

How are your Javascript skills? Missions are mainly handled by scripts.

The best way to understand them is to look over the existing ones and see if you can follow how they work. For a first look I'd recommend reviewing the scripts for the built-in trunk missions. They are relatively simple and should give you an idea of how things go together.
Dragonfire
---- E L I T E ----
---- E L I T E ----
Posts: 503
Joined: Sat Jun 11, 2011 7:46 pm

Re: How to build a mission?

Post by Dragonfire »

My javascript skills are non-existent, but I've been known to learn programming and scripting languages within a one to two week period. If I learn that, then I should be able to make sense of the existing mission OXPs.

Out of curiosity, are there any alternate scripting languages that could be used in place of a .js? I DO know VBScript and Python. Just thought I'd ask.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: How to build a mission?

Post by Thargoid »

No, the OXP scripts are in Javascript (Spider Monkey JS from the recent version of Mozilla Firefox iirc).

There is the older XML-type scripts as well (I forget the proper name of it), but they are much less capable as to what you can do.

JS isn't that complex (especially with the wiki as a reference guide), and several of us can help you along if you get stuck. Plus you have many examples to go along with as templates.
Dragonfire
---- E L I T E ----
---- E L I T E ----
Posts: 503
Joined: Sat Jun 11, 2011 7:46 pm

Re: How to build a mission?

Post by Dragonfire »

You have just given me great courage. :P I'll start on that tonight, hopefully (after I get some of my REAL programming work done).
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: How to build a mission?

Post by Capt. Murphy »

Dragonfire, as a non programmer (but also someone who picks things up reasonably quickly),
I found the site below a useful resource for basic JS syntax, use of inbuilt objects (Math.random() and the like) etc. The examples are geared towards web scripting, but make the syntax easy to understand.

http://www.w3schools.com/js/js_intro.asp

Coupled with poring over other people's work and the wiki documentation that got me going.
As far as the Wiki documentation goes making sure you understand the use of the event handlers as it's these that kick off the relevant parts of your script at the right time.

http://wiki.alioth.net/index.php/Oolite ... _reference
http://wiki.alioth.net/index.php/Oolite ... t_handlers

And for what aspects of the game engine you can interact with and change via script.

http://wiki.alioth.net/index.php/Oolite ... ject_model

These pages are constantly open whilst I'm writing script.....i.e. you'll use them a lot.

I would suggest starting of with a simple idea, get it working and then go on to something more complex.
[EliteWiki] 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
Post Reply