Screenshots
Moderators: winston, another_commander
- Star Gazer
- ---- E L I T E ----
- Posts: 633
- Joined: Sat Aug 14, 2004 4:55 pm
- Location: North Norfolk, UK, (Average Agricultural, Feudal States,Tech Level 8)
- pagroove
- ---- E L I T E ----
- Posts: 3035
- Joined: Wed Feb 21, 2007 11:52 pm
- Location: On a famous planet
@ CaptKev
How do I add my Lave texture to only Lave? Because now it's a temporarily replacement the System Redux Texture that happened to be layered over the planet Lave.
Please explain it in a sort of dummy guide
I can also send the texture to you if you want.
I now have to add a cloud layer.
How do I add my Lave texture to only Lave? Because now it's a temporarily replacement the System Redux Texture that happened to be layered over the planet Lave.
Please explain it in a sort of dummy guide
I can also send the texture to you if you want.
I now have to add a cloud layer.
Last edited by pagroove on Mon May 19, 2008 9:34 pm, edited 1 time in total.
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
https://bb.oolite.space/viewtopic.php?f=4&t=13709
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
https://bb.oolite.space/viewtopic.php?f=4&t=13709
Add this code just before the call to system.mainPlanet.setTexturepagroove wrote:@ CaptKev
How do I add my Lave texture to only Lave. Because now it's a temporarily replacement the System Redux Texture that happened to be layered over the planet Lave.
Please explain it in a sort of dummy guide
I can also send the texture to you if you want.
Code: Select all
if ((galaxyNumber * 256 + system.ID) == 7) {
system.mainPlanet.setTexture('my_lave_texture.png');
return;
}
Download Fighter HUD, Stingray and System Redux from the EliteWiki
- pagroove
- ---- E L I T E ----
- Posts: 3035
- Joined: Wed Feb 21, 2007 11:52 pm
- Location: On a famous planet
@CaptKev.
Do I have to make a planetinfo.plist for this and then put these lines of code into it or is more needed?
@Svengali
It's a design beauty!
Do I have to make a planetinfo.plist for this and then put these lines of code into it or is more needed?
@Svengali
It's a design beauty!
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
https://bb.oolite.space/viewtopic.php?f=4&t=13709
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
https://bb.oolite.space/viewtopic.php?f=4&t=13709
@pagroove, edit script.js in the Config folder (use wordpad or something similar), the system.mainPlanet.setTexture call is near to the bottom.
@Svengali, that looks like one mean machine.
@Svengali, that looks like one mean machine.
Download Fighter HUD, Stingray and System Redux from the EliteWiki
- pagroove
- ---- E L I T E ----
- Posts: 3035
- Joined: Wed Feb 21, 2007 11:52 pm
- Location: On a famous planet
I added an atmosphere to Lave
DomicaL is meant to be Domica (typing error)
DomicaL is meant to be Domica (typing error)
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
https://bb.oolite.space/viewtopic.php?f=4&t=13709
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
https://bb.oolite.space/viewtopic.php?f=4&t=13709
- pagroove
- ---- E L I T E ----
- Posts: 3035
- Joined: Wed Feb 21, 2007 11:52 pm
- Location: On a famous planet
I can't get it to work. The texture name is Lave.png. I have 2 versions. One big sized and one for the 256*128 set. I added this code. Do I have to fill in: galaxynumber = 0 and then the planet number 20, 173??
I did this an then it still isn't working.
I did this an then it still isn't working.
Code: Select all
this.homePlanet = function()
{
if (oolite.compareVersion("1.71") != 1) {
if ((galaxyNumber * 256 + system.ID) == 7) {
system.mainPlanet.setTexture('Lave.png');
return;
}
system.mainPlanet.setTexture('home_planet' + (((system_info[galaxyNumber * 256 + system.ID] & 0xF000) >> 12) + 1) + '.png');
} else {
var radius = system.mainPlanet.radius / 2560;
var type = (system_info[galaxyNumber * 256 + system.ID] & 0xF000) >> 12;
system.addMoon(type + "planet" + (radius.toFixed(0) - 11));
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
https://bb.oolite.space/viewtopic.php?f=4&t=13709
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
https://bb.oolite.space/viewtopic.php?f=4&t=13709
Hi Pagroove,
It looks like the code should work.
One problem could be the cache. Oolite preloads scripts and textures in order to run faster, and it could still load an old copy of the script. To clear the cache, keep 'shift' pressed as you start oolite.
And if that doesn't do the trick: is Lave.png in the same place as the other planet textures? Maybe oolite can't find it because it's somewhere else...
If the problem is the cached script, you'll see the 'normal' system redux texture on Lave, if it's oolite not being able to find Lave.png, Lave will be untextured...
Hope this helps!
It looks like the code should work.
One problem could be the cache. Oolite preloads scripts and textures in order to run faster, and it could still load an old copy of the script. To clear the cache, keep 'shift' pressed as you start oolite.
And if that doesn't do the trick: is Lave.png in the same place as the other planet textures? Maybe oolite can't find it because it's somewhere else...
If the problem is the cached script, you'll see the 'normal' system redux texture on Lave, if it's oolite not being able to find Lave.png, Lave will be untextured...
Hope this helps!
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
You will need an else block. This code replaces the planets texture with your texture and then with the 'original' system_redux texture. So you won't see your work.
Code: Select all
if ((galaxyNumber * 256 + system.ID) == 7) {
system.mainPlanet.setTexture('Lave.png');
return;
}
else {
the rest of the code
}
@svengali: not really!
edit: jargon alert!
if something it's true the function returns without executing any of the code after the if block, if it's false, the if block doesn't get executed, and all the remainder of the function is executed....
in other words the else is entirely optional, and just adds the chance of making bracketing mistakes...
Code: Select all
if(something) {
...blah blah blah....
return;
}
if something it's true the function returns without executing any of the code after the if block, if it's false, the if block doesn't get executed, and all the remainder of the function is executed....
in other words the else is entirely optional, and just adds the chance of making bracketing mistakes...
Last edited by Kaks on Tue May 20, 2008 10:40 pm, edited 1 time in total.
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
- pagroove
- ---- E L I T E ----
- Posts: 3035
- Joined: Wed Feb 21, 2007 11:52 pm
- Location: On a famous planet
Hi Kaks,
Do you have to include the file extension .png after the name?
Because it still doesn't work.
The texture Lave.png is in the addons/Sytem-Redux.oxp/textures and in the addons/System-Redux.opx/textures 128*256 folder (resized to 129 * 256
I pressed shift when starting up
I jumped out and back into the system
Both things don't work
is the function case sensitive?
Shall I send the texture to you? Maybe you can include it for me?
Anyway thanx for the help.
Do you have to include the file extension .png after the name?
Because it still doesn't work.
The texture Lave.png is in the addons/Sytem-Redux.oxp/textures and in the addons/System-Redux.opx/textures 128*256 folder (resized to 129 * 256
I pressed shift when starting up
I jumped out and back into the system
Both things don't work
is the function case sensitive?
Shall I send the texture to you? Maybe you can include it for me?
Anyway thanx for the help.
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
https://bb.oolite.space/viewtopic.php?f=4&t=13709
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
https://bb.oolite.space/viewtopic.php?f=4&t=13709
Ah. Thanks Kaks for an explanation. I didn't noticed the return, but now I understand some more of your scripts :-)Kaks wrote:@svengali: not really! :)
if something it's true the function returns without executing any of the code after the if block, if it's false, the if block doesn't get executed, and all the remainder of the function is executed.... :)
in other words the else is entirely optional, and just adds the chance of making bracketing mistakes...
(One step more, hehe)