P66 Models, one by one

This forum area is to share and discuss modding projects, models, music and other modding activities of Pioneer. Please use the 'Alpha Mods' or 'Beta Mods' folders to upload your files in the Pioneer section in the download area.
Post Reply
Metamartian
Private
Posts: 217
Joined: Tue Mar 08, 2011 3:53 pm

RE: P66 Models, one by one

Post by Metamartian »

they do work...you just need to disable the original .lua first. oh and could someone re upload the following please as the original links are notworking...thanksSpace Stations & Ground Stationsstandard groundstations (mod)slightly changed to what's in alpha23, makes use of the new "random" advertisings.standard spacestations (mod)slightly changed to what's in alpha23, makes use of the new "random" advertisings.i splitted them to leave the opportunity to use either one or both if you use them as a mod.groundstations P66 (mod)actually only two groundstations made by me**updated** with the modding system not working as it should i just rechecked and even the ship mods do not work if there is an existing .lua in the data/ship and data/model folders. they must both be disabled/deleted for the replacement files to work in the mods structure. New ships will work fine from the mods folder...
Metamartian
Private
Posts: 217
Joined: Tue Mar 08, 2011 3:53 pm

RE: P66 Models, one by one

Post by Metamartian »

I'm getting there!finally seemed to have fixed all those rand_reg() errors. I've started to replace it with the math.random(lower,upper) method.--rand_reg()rand = math.random(0,100)if rand < 26 thenset_material('head', .65,.75,.8,1,1,1.2,1.5,30)set_material('body', .65,.75,.8,1,1,1.2,1.5,30)elseif rand < 51 thenset_material('head', .65,.75,.8,1,1,1.2,1.5,30)set_material('body', get_arg_material(0))elseif rand < 76 thenset_material('head', .65,.75,.8,1,1,1.2,1.5,30)set_material('body', get_arg_material(1))elseif rand > 75 thenset_material('head', get_arg_material(0))set_material('body', get_arg_material(1))end
walterar
Private
Posts: 978
Joined: Fri Nov 25, 2016 8:22 pm

RE: P66 Models, one by one

Post by walterar »

Metamartian, care, math.random disappears in alpha 24.View [url]https://github.com/p...oneer/pull/1317[/url] to find out how to replace.Is simpler than it seems.And welcome to the most beautiful part of the game. <img src="'[url]http://spacesimcentral.com/forum/public/style_emoticons//icon_e_smile.gif[/url] class='bbc_emoticon' alt=':)' />)
Marcel
Private
Posts: 1188
Joined: Tue Dec 06, 2016 6:45 pm

RE: P66 Models, one by one

Post by Marcel »

Metamartian, spacestations_alpha23 isn't packaged as a mod. You're supposed to drag the enclosed data folder from your file compression program, i.e. 7zip, into your main Pioneer folder. If you do things should be placed where they should be. Sorry if I didn't make that clear. Glad you got it to work manually. Did you place the enclosed textures folder as a sub folder to stations? If you're missing a texture it defaults to an orange and black grid pattern texture which actually doesn't look too bad in some places. The game used to crash if a texture was missing, so kudos for whoever did that.Looking at the mod issue, I find it can be rather confusing figuring out what will work with what, especially if you have many mods installed at once. I got them all to work together by looking at their file structures and placing them into the game manually. As an example, if you install standard groundstations (mod) and standard spacestations (mod) it will probably remove all the latest details I put into those stations. I recommend doing this instead. Install Potsmoke's sub_models_alpha23_6 first, then disable spacestations.lua (again). This file contains my latest stuff for the space and ground stations and uses the random adverts. It goes in the stations folder, not the models folder. The different placement is necessary for the adverts to work.[attachment=1320:spacestations_alpha23_with_ads_wip.zip]Walterar, not only does this have the ads, but it also has windows in the big crappy station.If anyone wants an equivalent for a standard alpha 23 without the ads here it is. It goes in the models folder not the stations folder.[attachment=1321:spacestations_alpha23_standard_wip.zip]Neither of these includes the textures. Those are in spacestations16a_alpha23 over here.[url]http://spacesimcentr...s/page__st__540[/url] here's Potsmoke's ground stations mod. You must have the multi-adverts from his sub models listed above installed for this to work.[attachment=1322:mods_groundstations_p66_alpha23_4.zip]Hope I've gotten that all right. I'm sure you'll let me know if I didn't. It's probably not compatible with alpha 24 anyway. <img src="'[url]http://spacesimcentral.com/forum/public/style_emoticons//laugh1.gif[/url] class='bbc_emoticon' alt=':laugh:' />edit - Hey we're all 3 here together, almost like a chatroom! Thanks for the link!
Metamartian
Private
Posts: 217
Joined: Tue Mar 08, 2011 3:53 pm

RE: P66 Models, one by one

Post by Metamartian »

attached is an image from the model viewer of the E.Y.E.there appears to be 2 blue things hanging in mid air. I assume they should be attached to the two pylon things? how do i correct this?
Marcel
Private
Posts: 1188
Joined: Tue Dec 06, 2016 6:45 pm

RE: P66 Models, one by one

Post by Marcel »

I don't know. It appears normally in my installation. Does it look like that in the shipyard and if you buy it does it look like that in the game?
Metamartian
Private
Posts: 217
Joined: Tue Mar 08, 2011 3:53 pm

RE: P66 Models, one by one

Post by Metamartian »


'Marcel' wrote:
Metamartian, spacestations_alpha23 isn't packaged as a mod. You're supposed to drag the enclosed data folder from your file compression program, i.e. 7zip, into your main Pioneer folder. If you do things should be placed where they should be. Sorry if I didn't make that clear. Glad you got it to work manually. Did you place the enclosed textures folder as a sub folder to stations? If you're missing a texture it defaults to an orange and black grid pattern texture which actually doesn't look too bad in some places. The game used to crash if a texture was missing, so kudos for whoever did that.
so this image is showing the wrong texture for the spacestation?
Metamartian
Private
Posts: 217
Joined: Tue Mar 08, 2011 3:53 pm

RE: P66 Models, one by one

Post by Metamartian »


'Marcel' wrote:
I don't know. It appears normally in my installation. Does it look like that in the shipyard and if you buy it does it look like that in the game?
yep it does look the same in the shipyard, I must have accidentally altered a value in the .lua...**Update** nope i replaced it with P66's eye and it still displays the same. The original alpha 23 version shows correctly however.
Metamartian
Private
Posts: 217
Joined: Tue Mar 08, 2011 3:53 pm

RE: P66 Models, one by one

Post by Metamartian »


'walterar' wrote:
Metamartian, care, math.random disappears in alpha 24.View [url]https://github.com/p...oneer/pull/1317[/url] to find out how to replace.Is simpler than it seems.And welcome to the most beautiful part of the game. <img src="'[url]http://spacesimcentral.com/forum/public/style_emoticons//icon_e_smile.gif[/url] class='bbc_emoticon' alt=':)' />)
oh feck....back to the drawing board to figure out how to use util.hash_random.... <img src="'[url]http://spacesimcentral.com/forum/public/style_emoticons//suicide.gif[/url] class='bbc_emoticon' alt=':suicide:' />Off to bed and start again tomorrow.
walterar
Private
Posts: 978
Joined: Fri Nov 25, 2016 8:22 pm

RE: P66 Models, one by one

Post by walterar »

"[background=rgb(33, 47, 58)]It's probably not compatible with alpha 24" <img src="'[url]http://spacesimcentral.com/forum/public/style_emoticons//icon_e_smile.gif[/url] class='bbc_emoticon' alt=':)' />[/background]This is selector.lua alpha 24function selector1() -- decal and squad selectionselect1 = util.hash_random(string.sub(get_label(), 4,7), 1, 1000)endfunction selector2() -- skin color selectionselect2 = util.hash_random(string.sub(get_label(), 3,6), 1,100)endfunction selector3() -- dress color selectionselect3 = util.hash_random(string.sub(get_label(), 2,5), 1,100)endfunction selector4() -- female / male selectionselect4 = util.hash_random(string.sub(get_label(), 1,4), 1,100)endmath.random, and math.randomseed, is replaced by util.hash_randomver [url]https://github.com/pioneerspacesim/pioneer/pull/1317[/url] It looks bad that EYE, go back. <img src="'[url]http://spacesimcentral.com/forum/public/style_emoticons//icon_e_smile.gif[/url] class='bbc_emoticon' alt=':)' />
Marcel
Private
Posts: 1188
Joined: Tue Dec 06, 2016 6:45 pm

RE: P66 Models, one by one

Post by Marcel »


Quote:
so this image is showing the wrong texture for the spacestation?
That look right. I'm sure we'll be able to randomly hash things out. <img src="'[url]http://spacesimcentral.com/forum/public/style_emoticons//wink3.gif[/url] class='bbc_emoticon' alt=';)' />
Metamartian
Private
Posts: 217
Joined: Tue Mar 08, 2011 3:53 pm

RE: P66 Models, one by one

Post by Metamartian »


'Metamartian' wrote:
rand = math.random(0,100)if rand < 26 thenset_material('head', .65,.75,.8,1,1,1.2,1.5,30)set_material('body', .65,.75,.8,1,1,1.2,1.5,30)elseif rand < 51 thenset_material('head', .65,.75,.8,1,1,1.2,1.5,30)set_material('body', get_arg_material(0))elseif rand < 76 thenset_material('head', .65,.75,.8,1,1,1.2,1.5,30)set_material('body', get_arg_material(1))elseif rand > 75 thenset_material('head', get_arg_material(0))set_material('body', get_arg_material(1))end
so could one of you fine gents convert the above code and show me how to do it using util.hash_random please?
Metamartian
Private
Posts: 217
Joined: Tue Mar 08, 2011 3:53 pm

RE: P66 Models, one by one

Post by Metamartian »


'Marcel' wrote:
That look right. I'm sure we'll be able to randomly hash things out. <img src="'[url]http://spacesimcentral.com/forum/public/style_emoticons//wink3.gif[/url] class='bbc_emoticon' alt=';)' />
if my picture look ok Marcel, then yes it is working properly and i did place the textures in a subfolder. at least something works... oh and thanks for those links earlier <img src="'[url]http://spacesimcentral.com/forum/public/style_emoticons//icon_e_smile.gif[/url] class='bbc_emoticon' alt=':)' />
walterar
Private
Posts: 978
Joined: Fri Nov 25, 2016 8:22 pm

RE: P66 Models, one by one

Post by walterar »

[background=rgb(67, 88, 104)] rand = math.random(0,100)[/background][background=rgb(67, 88, 104)] if rand < 26 then[/background][background=rgb(67, 88, 104)] set_material('head', .65,.75,.8,1,1,1.2,1.5,30)[/background][background=rgb(67, 88, 104)] set_material('body', .65,.75,.8,1,1,1.2,1.5,30)[/background][background=rgb(67, 88, 104)] elseif rand < 51 then[/background]The quick way is:[background=rgb(33, 47, 58)]selector2() -- or selector3() or selector4()[/background]rand = select2The correct way is:[background=rgb(33, 47, 58)]selector2() -- or selector3() or selector4()[/background]if select2 < 26 thenset_material('head', .65,.75,.8,1,1,1.2,1.5,30)set_material('body', .65,.75,.8,1,1,1.2,1.5,30)eseif select2 < 51 then
Metamartian
Private
Posts: 217
Joined: Tue Mar 08, 2011 3:53 pm

RE: P66 Models, one by one

Post by Metamartian »

cheers walterar ,i get it now.... sorry but i am not a programmer but i can learn quickish...thanks for the heads up <img src="'[url]http://spacesimcentral.com/forum/public/style_emoticons//icon_e_smile.gif[/url] class='bbc_emoticon' alt=':)' />
walterar
Private
Posts: 978
Joined: Fri Nov 25, 2016 8:22 pm

RE: P66 Models, one by one

Post by walterar »

"[background=rgb(33, 47, 58)]but i can learn quickish..."[/background]You have learned that the MOD directory, should be called ADD. <img src="'[url]http://spacesimcentral.com/forum/public/style_emoticons//good.gif[/url] class='bbc_emoticon' alt=':good:' />Pioneer does not support mods as expected. I hope this is fixed.
Marcel
Private
Posts: 1188
Joined: Tue Dec 06, 2016 6:45 pm

RE: P66 Models, one by one

Post by Marcel »

At the risk of exposing my stupidity to the members of the forum, there's still something I don't understand. I'm not a programmer either and I learn rather slowly. How does one determine the range of the random number generated? I rand still supported? Do I still put[background=rgb(67, 88, 104)]rand = math.random(0,100)[/background]above the rest of that to make a random number range of 0 to 100? Does selectorX() select different seeds? I haven't seen any documentation on this and obviously I haven't downloaded the latest daily builds to check it out. I'm waiting for alpha 24. I'm not even sure if lua scripted models will be supported in the future.
Metamartian
Private
Posts: 217
Joined: Tue Mar 08, 2011 3:53 pm

RE: P66 Models, one by one

Post by Metamartian »

don't worry marcel, there is no exposing of stupidity, i don't get it either but....as far as i can tell the selectorX() function is pre coded in the selector.luafunction selector1()  -- decal and squad selection  select1 = util.hash_random(string.sub(get_label(), 4,7), 1, 1000)endfunction selector2() -- skin color selection  select2 = util.hash_random(string.sub(get_label(), 3,6), 1,100)endfunction selector3() -- dress color selection  select3 = util.hash_random(string.sub(get_label(), 2,5), 1,100)endfunction selector4() -- female / male selection  select4 = util.hash_random(string.sub(get_label(), 1,4), 1,100)endso just use which ever selector gives you a random number in the range you require...or i'm guessing you could create your own variable locally.....but i have not had a chance to play with that to see how i would create a random number between 1 and 10 using this method for a variableX. walterar may have the answer though <img src="'[url]http://spacesimcentral.com/forum/public/style_emoticons//icon_e_smile.gif[/url] class='bbc_emoticon' alt=':)' />i do not understand what the (string.sub(get.label(), 1,4) bit is for...
robn
Private
Posts: 1035
Joined: Mon Jan 31, 2011 10:29 pm

RE: P66 Models, one by one

Post by robn »

Alpha 24 will be released later today, which will see math.random removed. As noted, its replacement is util.hash_random. It works the same way except that it takes a seed value. In this way you get a "random" number, but always the same result given the same inputs. This ensures consistency across game runs and platforms.The selectorX() functions use some fragment from the model's label (in the case of a ship, its registration number) as the seed. This is randomly generated in the game core somewhere, but of course its saved. In this way ship AB-1234 will always have the same colour.There's no particular reason to use the selectorX() functions if they're not suitable. They're there for convenience and historical reasons.This is how the intro ship is always the same colour each run - the label "PIONEER" , run though the appropriate selector, always results in silver with an orange/yellow stripe. Previously selectorX() used math.random, which called out to the system random number generator, which would give different results on different platforms. Issue #183 has some details and screenshots that might be of interest.
walterar
Private
Posts: 978
Joined: Fri Nov 25, 2016 8:22 pm

RE: P66 Models, one by one

Post by walterar »

[background=rgb(33, 47, 58)]seed = string.sub('Metamartian', 1,4)[/background][background=rgb(33, 47, 58)]print seed[/background][background=rgb(33, 47, 58)]Meta[/background][background=rgb(33, 47, 58)]seed = string.sub('Metamartian', 5,11)[/background]print seedmartian
Post Reply

Return to “Pioneer Mods”