My ambitious oolite project
Moderators: winston, another_commander
-
- Poor
- Posts: 7
- Joined: Mon Apr 02, 2007 10:47 pm
- Location: Home
My ambitious oolite project
Hi everyone, I'm new here to the forums, but have been playing Oolite for several months now. I have two questions.
1. Is it really true that you have to be on a mac to make your ships into a .dat file?
2. Is it possible to add/remove planets, solar systems, galaxies, or ships?
I also would like to create an entire new universe, with an overall storyline, using the basic oolite engine. I'm fairly inexperienced with modding at this point, so I will be using this thread to ask for help and to inform you all on my progress. If you might be interested in helping me with this project, please let me know.
Thank you,
Treetrunker
1. Is it really true that you have to be on a mac to make your ships into a .dat file?
2. Is it possible to add/remove planets, solar systems, galaxies, or ships?
I also would like to create an entire new universe, with an overall storyline, using the basic oolite engine. I'm fairly inexperienced with modding at this point, so I will be using this thread to ask for help and to inform you all on my progress. If you might be interested in helping me with this project, please let me know.
Thank you,
Treetrunker
- LittleBear
- ---- E L I T E ----
- Posts: 2882
- Joined: Tue Apr 04, 2006 7:02 pm
- Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.
1. Don't think so.
2. Oh yes. (at least you can add them, not sure you can take them away)
If you build it he will come!
Welcome to the boards!
You can mod Oolite in pretty much anyway. Check the Wiki and the OXPs already out. If you wanna write a mission pack, best way to learn is to play a few OXP missions. You can see how they work and crib the code to do the things you want to do with Oolite.
OXPers are generally flatered if you pick up their ideas and use their code in an new OXP. Feel free to c&p any of my stuff if it works for you. I made my mission OXPs by looking at the code of Selezen, Murgh, Wombat, Giles et al and thinking "Ah so thats how they did that. I'll have that code" C&p and change."
If you download Assassins.oxp and look at the readme past the Big Spoiler Warning, there's a step by step guide to everything the OXP does in code. Might be helpful if you're writing a big mission pack. Look forward to playing it!
2. Oh yes. (at least you can add them, not sure you can take them away)
If you build it he will come!
Welcome to the boards!
You can mod Oolite in pretty much anyway. Check the Wiki and the OXPs already out. If you wanna write a mission pack, best way to learn is to play a few OXP missions. You can see how they work and crib the code to do the things you want to do with Oolite.
OXPers are generally flatered if you pick up their ideas and use their code in an new OXP. Feel free to c&p any of my stuff if it works for you. I made my mission OXPs by looking at the code of Selezen, Murgh, Wombat, Giles et al and thinking "Ah so thats how they did that. I'll have that code" C&p and change."
If you download Assassins.oxp and look at the readme past the Big Spoiler Warning, there's a step by step guide to everything the OXP does in code. Might be helpful if you're writing a big mission pack. Look forward to playing it!
Last edited by LittleBear on Mon Apr 02, 2007 11:41 pm, edited 2 times in total.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
1. No.
2. Yes, no, no, and yes.
I was going to refer you to the wiki on #1, but it’s wrong. There are converter scripts written in Python; it should be possible to get these running under Windows. Unfortunately there doesn’t seem to be a sensible place to download them, so here’s a somewhat unsensible way to get the one that matters: Obj2DatTex.py.
The JavaScript support being phased in over the next few versions will make it much large-scale modding much easier, so I’d reccomend starting at the other end (i.e. ships) for now. Adding/removing/moving galaxies and solar systems isn’t possible at the moment, but if you really need it – and show some progress – it may become possible in future.
2. Yes, no, no, and yes.
I was going to refer you to the wiki on #1, but it’s wrong. There are converter scripts written in Python; it should be possible to get these running under Windows. Unfortunately there doesn’t seem to be a sensible place to download them, so here’s a somewhat unsensible way to get the one that matters: Obj2DatTex.py.
The JavaScript support being phased in over the next few versions will make it much large-scale modding much easier, so I’d reccomend starting at the other end (i.e. ships) for now. Adding/removing/moving galaxies and solar systems isn’t possible at the moment, but if you really need it – and show some progress – it may become possible in future.
E-mail: [email protected]
-
- Poor
- Posts: 7
- Joined: Mon Apr 02, 2007 10:47 pm
- Location: Home
Yeah, I looked at the wiki, and thats why I asked the question. Another question. What is Python, and how do I get that script to work. Also, is removing ships an option, I wasn't clear on your answer to that. I would like to be able to create a whole new set of ships for my mod. Thanks for the help so far though.
Progress so far:
I have created the basic storyline, and have begun working on some basic naval ships. I have also created a map of what I want the Galaxies/Solar Systems to look like.
Yet again I am clueless: Is there a spoiler block function within these forums?
Progress so far:
I have created the basic storyline, and have begun working on some basic naval ships. I have also created a map of what I want the Galaxies/Solar Systems to look like.
Yet again I am clueless: Is there a spoiler block function within these forums?
- Captain Hesperus
- Grand High Clock-Tower Poobah
- Posts: 2310
- Joined: Tue Sep 19, 2006 1:10 pm
- Location: Anywhere I can sell Trumbles.....
When you say 'ships' do you mean the basic set of ships or ships that are OXPs?
P.S. Welcome to the boards and happy coding!:D
Captain Hesperus
You can try rot13 or change the colour of the text (suitably forewarned with SPOILER!!! or something) to match the background, like this.treetrunker wrote:Yet again I am clueless: Is there a spoiler block function within these forums?
P.S. Welcome to the boards and happy coding!:D
Captain Hesperus
-
- Poor
- Posts: 7
- Joined: Mon Apr 02, 2007 10:47 pm
- Location: Home
A whole new set of ships would indeed mean removing all the old ones. I don't know if there's another way, but one way to remove them is to replace them (using the same names in the code) by new ships.treetrunker wrote:I mean the basic set of ships.
Author of Tales from the Frontier - official Elite 4 anthology.
Author of Marcan Rayger adventures - unofficial fan-fic novellas set in the Frontier universe.
Author of Marcan Rayger adventures - unofficial fan-fic novellas set in the Frontier universe.
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Wolfwood’s way is the only one I can think of. Replacing them with ships that never appear would be entirely possible - although you’d have to consider what would happen when the player opens a saved game with a standard ship.
E-mail: [email protected]
You'd be in Witchbase, with no way out but Alt-F4.Ahruman wrote:Wolfwood’s way is the only one I can think of. Replacing them with ships that never appear would be entirely possible - although you’d have to consider what would happen when the player opens a saved game with a standard ship.
The Grey Haired Commander has spoken!
OK so I'm a PC user - "you know whats scary? Out of billions of sperm I was the fastest"
OK so I'm a PC user - "you know whats scary? Out of billions of sperm I was the fastest"
- Selezen
- ---- E L I T E ----
- Posts: 2530
- Joined: Tue Mar 29, 2005 9:14 am
- Location: Tionisla
- Contact:
How to create OXPs / DATs:
Download the Python scripting language from www.python.org.
Get that script thing that Ahruman mentioned or download it from the main oolite page.
Get a copy of Wings3d from www.wings3d.com nd learn how to use it.
When you've created your ship, export it as a Wavefront OBJ file.
Copy the OBJ and MTL files into the Python24 folder on your hard drive.
Open a command window. Go to the Python24 folder and type obj2dattex.py shipname.obj.
Tadaaaa! A nice DAT file.
Download the Python scripting language from www.python.org.
Get that script thing that Ahruman mentioned or download it from the main oolite page.
Get a copy of Wings3d from www.wings3d.com nd learn how to use it.
When you've created your ship, export it as a Wavefront OBJ file.
Copy the OBJ and MTL files into the Python24 folder on your hard drive.
Open a command window. Go to the Python24 folder and type obj2dattex.py shipname.obj.
Tadaaaa! A nice DAT file.
- LittleBear
- ---- E L I T E ----
- Posts: 2882
- Joined: Tue Apr 04, 2006 7:02 pm
- Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.
If your doing a big mod, it might be best to confine it to a single galaxy to avoid a clash with other OXPs. Nobody has written any missions set in Galaxies 6 or 8 yet.
Adding planets / moons to a system is pretty easy. In planetinfo.plist have a series of commands like this:-
The first command defines the moon, the second command adds the moon (and other planets) at this particular system. First number is the Galaxy (1 is 0, so Galaxy 7 is 6), next is the planet number. This command adds a moon and two gas giants only at this system.
All the properties of the System can be changed with commands like this:-
To add ships to the system, use commands like this:-
A series of commands like this adds the special cops to the system (but only whilst the war variable is a zero). Once the OXPs plot developes then other things start happening here.
Adding a load of ecops doesn't remove the Vipers as such, but so many ecops are added that very few vipers will be encountered and so it feels to the player that the cops in this system are different.
You define your ships in shipdata.plist and add them by role in script.
Adding planets / moons to a system is pretty easy. In planetinfo.plist have a series of commands like this:-
Code: Select all
"rebel_moon" = {
position = "-40000 0 463000";
radius = 1500;
orientation = "1.0 0.0 0.0 0.0";
texture = "hitsplanet10.PNG";
seed = "1 2 3 4 5 6";
"polar_color_factor" = 2.5;
"rotational_velocity" = 0.13;
};
"6 13" = {
"ambient_level" = "3.0";
"sky_blur_alpha" = "0.85";
"sky_blur_cluster_chance" = "0.55";
"sky_blur_scale" = "25";
"script_actions" = (
debugOn, "addMoon: rebel_moon",
"addMoon: gas_giant",
"addMoon: gas_giantA",
"addMoon: gas_giantB",
debugOff
);
All the properties of the System can be changed with commands like this:-
Code: Select all
"setSpecificPlanetInfo: 6=13=description=Eszausve is famous for its rocky moon and the twin gas giants Hades and Lernean, but cursed by one of the most oppressive governments in the Galaxy. Although the People's Popular Front bravely resists the oppressive regime of Governor Tarkin, thus far they have made little progress in restoring freedom to the planet.",
"setSpecificPlanetInfo: 6=13=productivity=98764",
"setSpecificPlanetInfo: 6=13=techlevel=14",
"setSpecificPlanetInfo: 6=13=inhabitants=Oppressed harmless fat birds",
"setSpecificPlanetInfo: 6=13=station=abcstat",
Code: Select all
{
conditions = (
"galaxy_number equal 6",
"planet_number equal 13",
"mission_assassins_war equal 0",
"status_string equal STATUS_EXITING_WITCHSPACE"
);
do = ( "checkForShips: ecop",
{ conditions = ( "shipsFound_number lessthan 14" );
do = ( "addSystemShips: ecop 6 0.0");
},
);
},
Adding a load of ecops doesn't remove the Vipers as such, but so many ecops are added that very few vipers will be encountered and so it feels to the player that the cops in this system are different.
You define your ships in shipdata.plist and add them by role in script.
Last edited by LittleBear on Tue Apr 03, 2007 9:27 am, edited 1 time in total.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Or, in JavaScript:LittleBear wrote:Code: Select all
{ conditions = ( "galaxy_number equal 6", "planet_number equal 13", "mission_assassins_war equal 0", "status_string equal STATUS_EXITING_WITCHSPACE" ); do = ( "checkForShips: ecop", { conditions = ( "shipsFound_number lessthan 14" ); do = ( "addSystemShips: ecop 6 0.0"); }, ); },
Code: Select all
this.willExitWitchSpace = function()
{
if (galaxyNumber == 6 && planetNumber == 13)
{
if (missionVariables["assassins_war"] == 0 && system.countShipsWithRole("ecop") < 14)
{
system.legacy_addSystemShips("ecop", 6, 0.0);
}
}
}
JavaScript is currently only available for “world scripts”, equivalent to script.plist in the old model. Addressing this is a major goal for 1.69.
E-mail: [email protected]
- LittleBear
- ---- E L I T E ----
- Posts: 2882
- Joined: Tue Apr 04, 2006 7:02 pm
- Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.
Will the old script still work?
Anything new I write I'll write in Java, but given the size of the script I really coudn't face having to redo it in java as it has 800+ commands!
Anything new I write I'll write in Java, but given the size of the script I really coudn't face having to redo it in java as it has 800+ commands!
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Yes. If at some point there’s an Oolite 2.0 with architectural changes that make such support difficult, it might break there. (On the other hand, it may be possible to automatically translate the old scripts to JS. Or not.)LittleBear wrote:Will the old script still work?
JavaScript is not Java. Otherwise, fair enough.LittleBear wrote:Anything new I write I'll write in Java, but given the size of the script I really coudn't face having to redo it in java as it has 800+ commands!
E-mail: [email protected]