Page 1 of 1

Help me write my first OXP

Posted: Thu Jul 02, 2009 11:16 am
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.

Posted: Thu Jul 02, 2009 11:54 am
by Disembodied
The best starting link (apologies if you have this already) is http://wiki.alioth.net/index.php/OXP_howto

Posted: Thu Jul 02, 2009 12:24 pm
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:

Posted: Thu Jul 02, 2009 3:42 pm
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.