jackiebean wrote:
Say for instance i wanted to replace all models in an older OXP with ships from the default OOlite (like griffs models) or add a few from a comparable shipset to fill out the rest with the only difference being textures would be new to emulate the color scheme of the older models.
Unless the texture map for the old model is identical to the new model textures this probably won't work, but you can change the color scheme of Griffs models with shader code and you can add custom decals if there are any logos that you would like to add.
Check out the link to the tutorial at the bottom of this page.
http://wiki.alioth.net/index.php/User:S ... _in_Oolite
Have a look at this for more info on decal shader code
https://bb.oolite.space/viewtopic.php?f= ... =60#p42090
Station Ads uses the setMaterial code.
I was able to set the color by manipulating the shipdata;plist for one of Griff's ships, I changed:
Code: Select all
PaintColor1 ={type = "randomUnitVector"; scale = 0.8;}
to
Code: Select all
PaintColor1 = { type = vector; value = "0.24 0.0 0.76"; };
The values are red, green, and blue. Not all colors seem to apply very well.
jackiebean wrote:
But in the bigger picture, relating to the event driven music, is there an OXP i can examine that uses this extensively or does that not exist yet?
Yes, in fact, there is one that does exactly that, download the:
Lib_Music_Orchestral+Demo.oxp
- Extract it, rename it so it ends with .oxp and place it in your home/.Oolite/AddOns directory.
- Place your desired .ogg sound files in the Music folder in the Demo.oxp. Vorbis is the supported sound format, I use vlc to convert them.
- Now use xedit or similar text editor to edit the script.js file in the Config folder, you may replace the .ogg filenames with yours.
Changing
Code: Select all
docked:{
any:[{snd:"lib_orch_aegis_enter04.ogg",dur:109}]
to
Code: Select all
docked:{
any:[{snd:"mycustomsong.ogg",dur:109}]
will result in mycustomsong.ogg being plated at any station you are docked at as long as mycustomsong.ogg is in the music folder.
Make sure you push shift until you see the spinning cobra to reload cache when starting Oolite for testing oxps.
Here is my script so far:
Code: Select all
(function(){
"use strict";
this.name = "Lib_Music_Orchestral_Demo";
this.author = "Svengali";
this.copyright = "(C)2016, License:CC-by-nc-sa-4.0";
this.description = "Small demo for Lib_Music.";
this.version = "0.6";
this.startUpComplete = function(){
delete this.startUpComplete;
// Add event music
var r = this.name;
worldScripts.Lib_Music._addEventMusic({
aegis:{
enter:[{snd:"fandanguillo.ogg",dur:99}]
},
alert:{
red:[{snd:"Schism.ogg",dur:407},
{snd:"ThingThatShouldNotBe.ogg",dur:397},
{snd:"orion.ogg",dur:508}]
},
docked:{
any:[{snd:"Altiplanos.ogg",dur:158},
{snd:"allegrosolemne.ogg",dur:183},
{snd:"lamuerte.ogg",dur:231},
[snd:"fandanguillo.ogg",dur:99},
{snd:"Schism.ogg",dur:407},
{snd:"Lateralus.ogg",dur:564},
{snd:"orion.ogg",dur:508},
{snd:"Sanitarium.ogg",dur:387},
{snd:"GuerrillaRadio.ogg",dur:234},
{snd:"bluegrass01.ogg",dur:435},
{snd:"ymsbNoExpectations.ogg",dur:592},
{snd:"ymsbAngel.ogg",dur:122},
{snd:"ymsbfollowmedowntotheriverside.ogg",dur:725},
{snd:"bluegrass02.ogg",dur:435},
{snd:"allegrosolemne.ogg",dur:183}]
},
exitWS:{
inter:[{snd:"fandanguillo.ogg",dur:99}],
standard:[{snd:"ymsb_followmedowntotheriverside.ogg",dur:725},
{snd:"bluegrass02.ogg",dur:435}]
},
killed:{
any:[{snd:"orion.ogg",dur:508}]
},
launch:{
any:[{snd:"EonBlueApocalypse.ogg",dur:64},
{snd:"etude.ogg",dur:183}]
},
planetIn:{
enterMain:[{snd:"allegrosolemne.ogg",dur:183}],
enterSun:[{snd:"lamuerte.ogg",dur:231}]
},
rescued:{
any:[{snd:"farewell.ogg",dur:183}]
}
},r);
worldScripts.Lib_Music._toggleGroup(r); // Turn them on
// Playlist music
worldScripts.Lib_Music._addChannel({name:"docking",sounds:[
{snd:"milonga.ogg",dur:322}
]});
worldScripts.Lib_Music._addChannel({name:"fight",sounds:[
{snd:"orion.ogg",dur:508}
]});
worldScripts.Lib_Music._addChannel({name:"generic",sounds:[
{snd:"allegrosolemne.ogg",dur:183},
{snd:"lamuerte.ogg",dur:231},
{snd:"milonga.ogg",dur:322},
{snd:"Altiplanos.ogg",dur:158},
{snd:"fandanguillo.ogg",dur:99},
{snd:"Schism.ogg",dur:407},
{snd:"Lateralus.ogg",dur:564},
{snd:"orion.ogg",dur:508},
{snd:"Sanitarium.ogg",dur:387},
{snd:"GuerrillaRadio.ogg",dur:234},
{snd:"bluegrass02.ogg",dur:435},
{snd:"ymsbNoExpectations.ogg",dur:592},
{snd:"ymsbAngel.ogg",dur:122},
{snd:"ymsbfollowmedowntotheriverside.ogg",dur:725},
{snd:"etude.ogg",dur:183}
]});
// Specific station music
worldScripts.Lib_Music._addChannel({name:"Rock Hermit",sounds:[
{snd:"fandanguillo.ogg",dur:99}
]});
};
}).call(this);
Its described as "Unified event driven and generic music handling" and it seems to work really well,.
More you might want to look at on this page:
Customsounds
Welcome to the darkside commander, have some cookies.
jackiebean wrote:
Edit: Ok, i think i know what the issue is, there seems to be a discrepancy between the latest version on the OOlite download page and what is available via Synaptic package manager, which could probably be alleviated if there was a way to add a PPA to Synaptic for the latest stable build. That is why Staer9 shipset will not work (more than likely) and my first install was with the more recent build, what confused me was the older build available in Synaptic when i had to reinstall linux a few months ago, which i thought was the same one, but obviously the version number is different. I wonder why it takes so long for them to push updates in the official repositories? So in short, yes i have to reinstall with the dreaded tar.gz method (ugh).
Dreaded? What exactly do you have against tar.gz? I feel this does a great disservice to the developers of independent software. Just because it hasn't be recognized by the repository maintainers doesn't mean its bad, in fact I don't believe everything in the repository is all that good. Much of it is pretty good but some of it is awful.
I don't know if maintaining a PPA makes much sense for the stable release which seems to be released on a yearly schedule. It might make sense for the nightly, but to be honest, I wouldn't use one for that either as I like to update it on my own schedule. Its great that Oolite is available in synaptic but the repository maintainers don't have time to compile every package available to the latest version and Debian/Ubuntu focus specifically on stability. This, unfortunately, leads to most software available from synaptic being a few versions behind what might be currently available even though the latest version may actually be more stable.
jackiebean wrote:
Well the reinstall worked, however the performance of the run version of the install is not as good as the official repository was
I can honestly say I have never noticed anything like this. What kind of performance issues are you experiencing?