Page 2 of 3
Re: System Redux
Posted: Fri Dec 02, 2011 8:53 pm
by Okti
Found another problem with the code,
Code: Select all
this.populate = function()
{
if(this.systemDone || !system.sun || system.isInterstellarSpace) return;
if(this.excl[galaxyNumber].indexOf(system.ID)==-1){
var n = this.system_info[galaxyNumber * 256 + system.ID + 1 + galaxyNumber];
this.addMoons(n);
this.addPlanets(n);
this.homePlanet(n);
}
this.systemDone = true;
}
Is checking for galaxyNumber * 256 + system.ID + 1 + galaxyNumber as index, but changeSystems function sets this.system_info[(i*256)+1+ar
[j]] = 0;
After correcting that line it worked.
So the code must be
Code: Select all
this.changeSystems = function(ar)
{
if(ar){
for(var i=0;i<ar.length;i++){
for(var j=0;j<ar[i].length;j++){
this.system_info[(i*256)+1+i+ar[i][j]] = 0;
}
}
} else this.system_info = this.org_system_info;
return;
}
Re: System Redux
Posted: Sat Dec 03, 2011 12:09 pm
by Svengali
Seems I haven't implemented the galaxy shift. Will fix and upload .-)
Muchas gracias Okti.
Done.
Re: System Redux
Posted: Wed Dec 12, 2012 10:29 pm
by CaptSolo
I have a question regarding excluding systems using OXP Config: Am I able to choose different systems (planets), other than Diso, Lave, and Tianve? Also, is the max number of exclusions set at three? I need a little help at my age.
I like System Redux but there is not enough variety IMO. I had in mind to do a little texturing of my favourite worlds in Chart 1.
Re: System Redux
Posted: Thu Dec 13, 2012 1:19 pm
by Svengali
CaptSolo wrote:I have a question regarding excluding systems using OXP Config: Am I able to choose different systems (planets), other than Diso, Lave, and Tianve? Also, is the max number of exclusions set at three? I need a little help at my age.
You'll have to change the SR script to get more. Let's say you want to get three more exclusions (G0 33, G0 55, G1, 99).
Change in
oxpcSettings
Code: Select all
EInt0: {Name:"exSys",Def:0x0,Max:0xF,Desc:["Lave","Diso","Tianve","SolosSystems"]}
Add in
oxpcNotifyOnChange
Code: Select all
if((this.exSys&8)){
this.excl[0].push(33);
this.excl[0].push(55);
this.excl[1].push(99);
}
The script in SR uses a bitmask to enable/disable specific entries. This can be a single system or a collection of systems. OXPConfig grabs this integer (defined in .oxpcSettings EInt0) and acts as interface, so the user can change it in the game. The Max value just tells how many entries are available. See [wiki]OXPConfig_Doc[/wiki] for more infos.
Re: System Redux
Posted: Thu Dec 13, 2012 2:26 pm
by CaptSolo
Thanks, Svengali. I will save the original script elsewhere, try your changes and post my results here.
Re: System Redux
Posted: Thu Dec 13, 2012 6:20 pm
by CaptSolo
Svengali, it worked! Config stored successfully once I saved game. Many thanks!
Re: System Redux
Posted: Thu Dec 13, 2012 8:02 pm
by Svengali
Nice planet, Solo .-)
Re: System Redux
Posted: Wed Apr 24, 2013 8:47 pm
by CaptSolo
Svengali, I have a question about the array values in:
What are they and how does SR use them?
Thanks in advance.
Re: System Redux
Posted: Wed Apr 24, 2013 9:25 pm
by Svengali
CaptSolo wrote:Svengali, I have a question about the array values in:
What are they and how does SR use them?
This is the original code by Kaks and CaptKev. The values are bitmasks in
hexadecimal notation for every system, ordered by ID. The script does some bitshifting to get the values for mainPlanet, moons and secondary planets.
E.g. for the mainPlanet it uses (((n & 0xFF000) >> 12) + 1)
or translated: take the value n (e.g. 0x21A5), apply bitwise AND 0xFF000 (to get rid of 0x1A5, resulting in 0x2000) and shift 12 bits to the right (resulting in 0x2), then add 1.
Result is 3 which gets used to build the texture name.
Re: System Redux
Posted: Wed Apr 24, 2013 10:28 pm
by CaptSolo
I understand somewhat. I used to code small programs in assembly on my C64. That was a long time ago though.
Re: System Redux
Posted: Thu Jun 13, 2013 2:54 pm
by CaptSolo
Svengali wrote:take the value n (e.g. 0x21A5), apply bitwise AND 0xFF000 (to get rid of 0x1A5, resulting in 0x2000) and shift 12 bits to the right (resulting in 0x2), then add 1. Result is 3 which gets used to build the texture name.
Okay, I see how it works. In your example the 2 in 0x21A5 is the bit for texturing the home planet. I also understand that the range of values (0 to F) results in SR's 16 unique textures. But, if the right shift value was less than 12, the script could be modified to use more textures. What would the shift argument need to be to result in 0x20?
Re: System Redux
Posted: Thu Jun 13, 2013 3:57 pm
by parazaine
I have done my own textures for System Redux and am interested in a 64 planet coded version that's compatible with Oolite 1.77.
So if Capt Kev, Kaks or anyone with some coding knowledge (i possess none) could provide the code to enable this, i could quickly flesh out a 64 random home-planet (and 32 moons and planets) version featuring Gas Giants, Terran-type worlds and cratered planets and moons.
I already tried this with some code Capt Kev posted some time ago....it no longer seems to work in Oolite 1.77 BUT i've done about 65% of the planetary textures necessary.
I'll post a link here to a small selection in a slide-show
http://s877.photobucket.com/user/paraza ... em%20Redux
Re: System Redux
Posted: Fri Jun 14, 2013 11:20 am
by Duggan
I am happy with my current Povray skins but would like very much the extra Planets afforded by System redux.
Is this doable ? because once I put back in my system redux all my shiny Povray Planets go in favour of those in system redux
Re: System Redux
Posted: Fri Jun 14, 2013 11:38 am
by spara
Duggan wrote:I am happy with my current Povray skins but would like very much the extra Planets afforded by System redux.
Is this doable ? because once I put back in my system redux all my shiny Povray Planets go in favour of those in system redux
From script.js of System Redux, change the line 118
to
At least works for me
I have also commented out universal settings from planetinfo.plist in favour of ZygoUgos Cinematic Sky & nebulas.
Re: System Redux
Posted: Fri Jun 14, 2013 12:06 pm
by Duggan
Thank you spara,
I took out information relating to home planet and it works fine
next up...visit one of your extra planet stations .