Help me write my first OXP

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

Moderators: winston, another_commander

Post Reply
Ragged
Above Average
Above Average
Posts: 28
Joined: Mon Jun 29, 2009 10:55 am

Help me write my first OXP

Post by Ragged »

OK, so having explored a bit of the Ooniverse, I feel that I want to have a crack at writing a sort of mission-based oxp.

I have a little background in coding, so javascript won't be a mystery to me.

I am not asking for anyone to write code for me - what I would like is links to documentation, examples, sample code etc. that will help me do what I do. Frankly, the biggest problem I have at the moment is where to start.

So, this is what I want to do:

The 1657th Congress of People's Deputies of Communist Systems is taking place at some communist system or other. Comrades from across the eight sectors are gathering to discuss such topics as welcoming their Thargoid Worker Brethren, Counterrevolutionary Suppression, and whether Communism in individual systems is Historically Achievable at this time.

Obviously, they cannot do the People's business on empty stomachs, so there is a great demand for wine, food and luxuries at the conference.

So the requirements are

1) Spawn an Astro-mine (from Dr Nil's excellent Commies.oxp) near a particular jump point, or maybe a bit further away. This should broadcast X on the Advanced Space Compass.

2) Rename this to 'People's Conference Center'

3) Spawn some billboards (like at the station navpoints) nearby.

4) The conference center should be offering high, but not ludicrous, prices for food, wines and luxuries. Enough to make it worthwhile to make the trip. It should have no stock of anything else, and not buy anything else.

5) The conference should 'end' a fixed game time after the commander first enters the system. A really quick commander might just have enough time to make two runs. After that, conference center and billboards disappear.

That should do for starters.

Thanks in advance for your suggestions.
User avatar
Disembodied
Jedi Spam Assassin
Jedi Spam Assassin
Posts: 6885
Joined: Thu Jul 12, 2007 10:54 pm
Location: Carter's Snort

Post by Disembodied »

The best starting link (apologies if you have this already) is http://wiki.alioth.net/index.php/OXP_howto
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

And after that, take a few mission OXPs (aim for the Javascript based ones rather than the legacy ones - ones with script sub-folders or script.js files in) and examine their code. Read, understand, inwardly digest and then mercilessly pillage and pilfer as required... :twisted:
User avatar
Nemoricus
---- E L I T E ----
---- E L I T E ----
Posts: 388
Joined: Mon May 18, 2009 8:51 pm

Post by Nemoricus »

This has links to just about all of the various things you'd do while scripting. It's a very useful reference.

Thargoid's right, by the way. Digging through what other people have done is a good way to figure out what does what.
Dream as if you'll live forever
Live as if you'll die tomorrow
Post Reply