Notifications
Clear all

P66 Models, one by one

Page 4 / 8

walterar
(@walterar)
Commander Registered
Joined: 7 years ago
Posts: 980
 

I'll try to put in a mod, the magnificent ground stations and orbital built by Gernot and Marcel.

But Pioneer MOD format.


ReplyQuote
Metamartian
(@metamartian)
Warrant Officer Registered
Joined: 13 years ago
Posts: 217
 

yeah, I have kind of got the hang of it now..I even managed to get the caiman with 2 mcu into the pioneer mod format (that stumped me for a while!)

I am having to replace the random numbers generated by rand_reg() with static numbers though but they are working now <img src="' http://spacesimcentral.com/forum/public/style_emoticons//icon_e_smile.gi f"' class='bbc_emoticon' alt=':)' />

*Update* phew, took me a while but I now have all the following working from self contained .zip files located in the users/mods folder!

adc.zip

atomic1.zip

bloodrunner.zip

caiman.zip

defender1.zip

gelios.zip

gunboat.zip

hullcutter.zip

imp_shuttle.zip

mcu.zip

millfalc.zip

orion.zip

rapier.zip

r_41.zip

sepia.zip

shift.zip

supafighter.zip

terra.zip

typhoon.zip

x-wing.zip

I also have the original basic ships also working from self contained zip files but seeing that you do not need to replace the core sub_models folder now these are kind of redundant. (unless there are other modifications to them that I have not spotted yet).


ReplyQuote
Marcel
(@marcel)
Captain Registered
Joined: 7 years ago
Posts: 1188
 

Metamartian, one thing that's changed in the eagles is that the pilots were over sized. Gernot corrected that in his last release.

Walterar, if you want I can send you my latest version of spacestations.lua that includes Gernot and spazeman's randomly changing adverts. I'm not finished with it yet but it works. Are you going to update Gernot's version of the big_crappy too? I don't think he'll mind if we keep playing with his cool toys.


ReplyQuote
Metamartian
(@metamartian)
Warrant Officer Registered
Joined: 13 years ago
Posts: 217
 

I'm going to check on the ships later once I can get everything I can get hold of running as mods....which brings me onto...

spacestations16a_alpha23 - I'm working on the ground_station bit. I can get it running from the mods folder but ONLY if I disable/delete the original ground_station.lua from the main install folder. i get this error if I do not disable/delete the original ground_station.lua

ReplyQuote
walterar
(@walterar)
Commander Registered
Joined: 7 years ago
Posts: 980
 

Marcel, I think I have all your models, along with those of Gernot and graphics of Spaceman. I selected the ones I like and I have them running. But if there are new things I could not live without them. <img src="' http://spacesimcentral.com/forum/public/style_emoticons//icon_e_smile.gi f"' class='bbc_emoticon' alt=':)' />

Metamartian, there are things that do not work as mods yet. <img src="' http://spacesimcentral.com/forum/public/style_emoticons//sad.gi f"' class='bbc_emoticon' alt=':(' />

I think it is convenient to separate the models and not create a mod with all together.


ReplyQuote
Metamartian
(@metamartian)
Warrant Officer Registered
Joined: 13 years ago
Posts: 217
 

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 not

working...thanks

Space Stations & Ground Stations

standard 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...


ReplyQuote
Metamartian
(@metamartian)
Warrant Officer Registered
Joined: 13 years ago
Posts: 217
 

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 then

set_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 then

set_material('head', .65,.75,.8,1,1,1.2,1.5,30)

set_material('body', get_arg_material(0))

elseif rand < 76 then

set_material('head', .65,.75,.8,1,1,1.2,1.5,30)

set_material('body', get_arg_material(1))

elseif rand > 75 then

set_material('head', get_arg_material(0))

set_material('body', get_arg_material(1))

end


ReplyQuote
walterar
(@walterar)
Commander Registered
Joined: 7 years ago
Posts: 980
 

Metamartian, care, math.random disappears in alpha 24.

View https://github.com/p...oneer/pull/1317 to find out how to replace.

Is simpler than it seems.

And welcome to the most beautiful part of the game. <img src="' http://spacesimcentral.com/forum/public/style_emoticons//icon_e_smile.gi f"' class='bbc_emoticon' alt=':)' />)


ReplyQuote
Marcel
(@marcel)
Captain Registered
Joined: 7 years ago
Posts: 1188
 

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.

http://spacesimcentr...s/page__st__540

Finally, 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="' http://spacesimcentral.com/forum/public/style_emoticons//laugh1.gi f"' class='bbc_emoticon' alt='' />

edit - Hey we're all 3 here together, almost like a chatroom! Thanks for the link!


ReplyQuote
Metamartian
(@metamartian)
Warrant Officer Registered
Joined: 13 years ago
Posts: 217
 

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?


ReplyQuote
Marcel
(@marcel)
Captain Registered
Joined: 7 years ago
Posts: 1188
 

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?


ReplyQuote
Metamartian
(@metamartian)
Warrant Officer Registered
Joined: 13 years ago
Posts: 217
 
'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?


ReplyQuote
Metamartian
(@metamartian)
Warrant Officer Registered
Joined: 13 years ago
Posts: 217
 
'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.


ReplyQuote
Metamartian
(@metamartian)
Warrant Officer Registered
Joined: 13 years ago
Posts: 217
 
'walterar' wrote:

Metamartian, care, math.random disappears in alpha 24.

View https://github.com/p...oneer/pull/1317 to find out how to replace.

Is simpler than it seems.

And welcome to the most beautiful part of the game. <img src="' http://spacesimcentral.com/forum/public/style_emoticons//icon_e_smile.gi f"' class='bbc_emoticon' alt=':)' />)

oh feck....back to the drawing board to figure out how to use util.hash_random.... <img src="' http://spacesimcentral.com/forum/public/style_emoticons//suicide.gi f"' class='bbc_emoticon' alt='' />

Off to bed and start again tomorrow.


ReplyQuote
walterar
(@walterar)
Commander Registered
Joined: 7 years ago
Posts: 980
 

"[background=rgb(33, 47, 58)]It's probably not compatible with alpha 24" <img src="' http://spacesimcentral.com/forum/public/style_emoticons//icon_e_smile.gi f"' class='bbc_emoticon' alt=':)' />[/background]

This is selector.lua alpha 24


function selector1() -- decal and squad selection

select1 = util.hash_random(string.sub(get_label(), 4,7), 1, 1000)

end

function selector2() -- skin color selection

select2 = util.hash_random(string.sub(get_label(), 3,6), 1,100)

end

function selector3() -- dress color selection

select3 = util.hash_random(string.sub(get_label(), 2,5), 1,100)

end

function selector4() -- female / male selection

select4 = util.hash_random(string.sub(get_label(), 1,4), 1,100)

end


math.random, and math.randomseed, is replaced by util.hash_random

ver https://github.com/pioneerspacesim/pioneer/pull/1317

Metamartian, It looks bad that EYE, go back. <img src="' http://spacesimcentral.com/forum/public/style_emoticons//icon_e_smile.gi f"' class='bbc_emoticon' alt=':)' />


ReplyQuote
Marcel
(@marcel)
Captain Registered
Joined: 7 years ago
Posts: 1188
 
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="' http://spacesimcentral.com/forum/public/style_emoticons//wink3.gi f"' class='bbc_emoticon' alt=';)' />


ReplyQuote
Metamartian
(@metamartian)
Warrant Officer Registered
Joined: 13 years ago
Posts: 217
 
'Metamartian' wrote:

rand = math.random(0,100)

if rand < 26 then

set_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 then

set_material('head', .65,.75,.8,1,1,1.2,1.5,30)

set_material('body', get_arg_material(0))

elseif rand < 76 then

set_material('head', .65,.75,.8,1,1,1.2,1.5,30)

set_material('body', get_arg_material(1))

elseif rand > 75 then

set_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?


ReplyQuote
Metamartian
(@metamartian)
Warrant Officer Registered
Joined: 13 years ago
Posts: 217
 
'Marcel' wrote:

That look right. I'm sure we'll be able to randomly hash things out. <img src="' http://spacesimcentral.com/forum/public/style_emoticons//wink3.gi f"' 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="' http://spacesimcentral.com/forum/public/style_emoticons//icon_e_smile.gi f"' class='bbc_emoticon' alt=':)' />


ReplyQuote
walterar
(@walterar)
Commander Registered
Joined: 7 years ago
Posts: 980
 

[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 = select2

The correct way is:

[background=rgb(33, 47, 58)]selector2() -- or selector3() or selector4()[/background]

if select2 < 26 then

set_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


ReplyQuote
Metamartian
(@metamartian)
Warrant Officer Registered
Joined: 13 years ago
Posts: 217
 

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="' http://spacesimcentral.com/forum/public/style_emoticons//icon_e_smile.gi f"' class='bbc_emoticon' alt=':)' />


ReplyQuote
walterar
(@walterar)
Commander Registered
Joined: 7 years ago
Posts: 980
 

"[background=rgb(33, 47, 58)]but i can learn quickish..."[/background]

You have learned that the MOD directory, should be called ADD. <img src="' http://spacesimcentral.com/forum/public/style_emoticons//good.gi f"' class='bbc_emoticon' alt='' />

Pioneer does not support mods as expected. I hope this is fixed.


ReplyQuote
Marcel
(@marcel)
Captain Registered
Joined: 7 years ago
Posts: 1188
 

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.


ReplyQuote
Metamartian
(@metamartian)
Warrant Officer Registered
Joined: 13 years ago
Posts: 217
 

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.lua

function selector1()  -- decal and squad selection

  select1 = util.hash_random(string.sub(get_label(), 4,7), 1, 1000)

end

function selector2() -- skin color selection

  select2 = util.hash_random(string.sub(get_label(), 3,6), 1,100)

end

function selector3() -- dress color selection

  select3 = util.hash_random(string.sub(get_label(), 2,5), 1,100)

end

function selector4() -- female / male selection

  select4 = util.hash_random(string.sub(get_label(), 1,4), 1,100)

end


so 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="' http://spacesimcentral.com/forum/public/style_emoticons//icon_e_smile.gi f"' class='bbc_emoticon' alt=':)' />

i do not understand what the (string.sub(get.label(), 1,4) bit is for...


ReplyQuote
robn
 robn
(@robn)
Captain Registered
Joined: 13 years ago
Posts: 1035
 

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.


ReplyQuote
walterar
(@walterar)
Commander Registered
Joined: 7 years ago
Posts: 980
 

[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 seed

martian


ReplyQuote
Page 4 / 8