Thanks. I think you've just saved me at least one problem (offender cargo pods). But as usual this thread and the board are giving many very useful hints, tips and helps to a confused alien. Now got a lot of things to play with and try, and probably annoy the other half by sitting at the PC all night (again)
It definitely sounds like your work was on a similar line to mine, so who knows maybe you could do a re-skin on it and rebirth the Tescoo presuming of course I can get the thing working myself...
Added - ship coding are now switched over to JS (except demoships.plist, I presume that has to stay XML as I've not seen it JS anywhere?). Not a very hard re-code, was most pleasantly surprised (says he before he's been able to actually test they still work ).
I'm gonna be glad when I can finally send this OXP on it's way, although after all that it'll just be 6 new ships I guess...
Looks good to me, the code below works, to generate 2 cargo pods per sub-entity.
The only thing I'd like to do now is randomise the number of pods. What would I have to replace the "2" with to do that? I tried d25_number to generate 1-25, but all it did was make Oolite hang... I'd also like to use the same randomisation for the number of escort ships in the shipdata.plist (now in JS).
The random generation function in Javascript is called Math.random(). This will create (pseudo)random numbers between 0 and 1. If you want to create whole numbers between 1 and 25 (that's quite a lot, isn't it?), you would have to multiply this by 25 and then round up to the next whole number. So:
The 1-25 range is cargo per hauler pod (the ship has 4 pods). The ship is envisaged as performing the same kind of function as an Anaconda, so the overall load range would be similar. But once it's running a beta-test can see if it's too much in practice.
In terms of escorts, I was thinking of max 4, or perhaps 6.
I just noticed the code contains a "call". This is a method to use old type legacy scripts in JS. It will not work with 1.72. (Kestrel&Falcon OXP has to be updated before 1.72)
Spawns a random number between 1 and 6 explosive_shrapnel's. But probably you want to spawn something else as the explosive_shrapnel is not in Oolite itself.
This should also work with 1.71 AND with 1.72
EDIT: Your this.plea contains expandable text. So I think you must use: player.commsMessage(expandDescription('this.plea'), 5); instead of the line above.
Last edited by Eric Walch on Wed Aug 13, 2008 2:02 pm, edited 1 time in total.
The 1-25 range is cargo per hauler pod (the ship has 4 pods). The ship is envisaged as performing the same kind of function as an Anaconda, so the overall load range would be similar.
The load range, yes. But does an Anaconda actually spawn that much cargo pods when killed? Just asking, it's a while since I've annihilated my last unsuspecting Anaconda...
I've had a few which have generated quite a cloud of pods. But your point is a valid one, I've downgraded it to 1-15 units per pod, and may lower it a little more once I've tried it in proper testing. And given it's a random number (well 4 of them), the bonanza hauls are going to be balanced by the meagre ones.
The other thought was that it gives the player a dilemma, do they chase the pods down and let the remainder of the craft go, or keep on the craft and then have to spend time rounding up all the cargo from all four pods...
EDIT: Your this.plea contains expandable text. So I think you must use: player.commsMessage(expandDescription('this.plea'), 5); instead of the line above.
Sadly it doesn't quite work. The comms message is "this.plea" (literally that as text, unexpanded) using either the above or the original.
Editted to add - sorted it, your code above, without the single quotes around the this.plea works as it should Yet again many thanks!
His main page http://www.arildwiro.com/ has links to a few more of his tutes including some modeling and UV unwrapping ones although they may be 3D Studio Max specific.
Loads and loads of graphics tutorials here covering a lot of subjects & software, http://www.computerarts.co.uk/tutorials ... _animation
there are a lot of pop-ups and flash animations on this site though so it can be annoying to search through.
Blimey!! Certainly shows off what the pros can achieve! Some extraordinarily beautiful end-effects.
The technique seems to be a transposition of painting metal AD&D models, with layering and dry brushing to produce realistic metal textures. And I really need to master the use of masks for layering effects!
His main page http://www.arildwiro.com/ has links to a few more of his tutes including some modeling and UV unwrapping ones although they may be 3D Studio Max specific.
its quite cool, but note the shineniness of the armour... is a max only thing... you would have to remove that before export and use oolite shaders to archive something similar....
while 3d max unwrap is quite good, its default flattening breaks up the faces, making it quite hard to use it in a paint program...
the unwrapping is really tedious work... especially for complex models...
on my first read, i thought that texporter did a flatten first... but it seems it just exports the uvmap... gonna try it though, since max render to texture is allways just a tad unprecise...
this is my first ship build, and im having problems with the external views, meaning when I hit "v" the views do not cycle. The ship shows up fine in the shipyard, and on the loading screen but i can't get a single external view of it while in game. Is there some "golden Rule" for setting the views or a certain range that I need to stay with in for the views to work. If i use custom views and set my own do the coordinates go in x,y,z order and are they in meters just like wings3d? Thanks
"To boldly go where no man has gone before, and drop off my Trumbles." ~ Ashby