Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

The Shipyard at the End of the Ooniverse. Modeller's bit.

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
User avatar
Amen Brick
Deadly
Deadly
Posts: 187
Joined: Sat May 10, 2008 5:22 pm
Location: Bolton!

Post by Amen Brick »

The stderr tells you if you have too many faces or verts and helpfully tells you by how many is too many.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

If I compare the dat files, the Shark one has a section at the end relating to the texture, which the Manta one is missing. The stdrr message is relating to texture, so it looks like Wings isn't generating the dat file properly for some reason.

Both were done in the same way using the same sequence, the only difference is that the Shark is a simpler ship shape with less faces etc. I'd still wonder if the Manta is too complex a shape for something to cope with (perhaps obj2dattex.py?)

I'll try regenerating it again from scratch out of the wings file and see if I can get it to work. I need to do the ManOWar anyway (the jellyfish ship I posted before), then we're ready for a beta test or two...
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

When you have the debug.oxp running than keep following Ahrumans advise and use that one. With that oxp you always can add ships at will, without any restart. When you need them added in sight, no matter were you are, you can type:

system.legacy_addShipsWithinRadius("pirate", 5, "abs", player.position, 8000)

or

player.spawn("pirate", 5)

The latter is adding them very close but, in my experience, rarely kills you by a collision.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

I just noticed that the debug console has a macro for this: “:spawn foo” is equivalent to “system.legacy_addSystemShips("foo", 1, 1)”.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Thanks one and all.

Generally it's now working (I can spawn Shark ships), but there's something wrong with the Manta one. I'll try regenerating it and see if I can get the dat file to work properly (it's missing texture entry at the moment for some reason, and seems to have 'default' as a texture file reference as well as it's correct one).

But the Shark looks ok so far, although I may tweak its texture some more. Will post some pics once I have time to get all three (inc the ManOWar) working.
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2869
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post by LittleBear »

On some systems names are case sensitive (eg if you've put my_texture.PNG when its saved as .png or My_Texture.png when its saved as my_texture.png) it causes a bug. Worth checking to make sure, I've had lots of trouble with this before. :wink:
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Ahruman wrote:
I just noticed that the debug console has a macro for this: “:spawn foo” is equivalent to “system.legacy_addSystemShips("foo", 1, 1)”.
Nice hint. I looked in the "debugConfig.plist" inside the oxp. Probably very easy to add your own macros this way.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

OK, now having sorted the texture out on the Manta (I think there was a mode mis-set in Wings or something equally daft), allow me to introduce it, along with it's sister the Shark.

Image

Image

I'm still working on the ManOWar to make up the set, but that's more an issue with time than anything else. Once that's done I'll make them available to anyone who may want them. The textures aren't the best I admit, and my hardware doesn't support shaders :( (If anyone feels like lending them a respray, feel free)

Can then continue on with the thargoid ship plans, which I hope to include a mission with...

User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Eric Walch wrote:
Ahruman wrote:
I just noticed that the debug console has a macro for this: “:spawn foo” is equivalent to “system.legacy_addSystemShips("foo", 1, 1)”.
Nice hint. I looked in the "debugConfig.plist" inside the oxp. Probably very easy to add your own macros this way.
Don’t; use :setM instead. Macros added with :setM are saved in your GNUstep defaults file.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Quick one, is there a list anywhere of which keys are and aren't usable with sub-entities?

I'm almost done coding "my other OXP" (Aquatics), just putting together a cargo hauler and it's escort. However I've been thwarted twice in as many days by sub-entities:

  • Tried to use exhausts with a sub-ent (a rotating one, having followed a pirate that was barrel-rolling and seeing how nice the swirling jet trails looked) but nothing appeared, only the other exhaust in the main body code.
  • Said cargo hauler has 4 sub-ent cargo sections, which are frangibly blastable. I've got it issuing a notification for each, but I can't give them either an individual bounty, cargo or even death-action spawn cargo pods.
All very irritating when you've got an idea in the hive-mind! Any thoughts or suggestions on the latter would be nice, as I don't really want to just have the cargo booty release when the main ship body is killed, nor to have it non-frangible unless I really have to.
[/color]
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

• Tried to use exhausts with a sub-ent (a rotating one, having followed a pirate that was barrel-rolling and seeing how nice the swirling jet trails looked) but nothing appeared, only the other exhaust in the main body code.
• Said cargo hauler has 4 sub-ent cargo sections, which are frangibly blastable. I've got it issuing a notification for each, but I can't give them either an individual bounty, cargo or even death-action spawn cargo pods.
Witch Oolite version you are using? With 1.71 much more became possible. Exhausts won't work. they are drawn completely separately to the ship. But death_actions should be possible. When writing "buoyRepair.oxp" I had a special buoy given a death_action. To tow the buoy I made a new entry with a ship and the buoy as subentity. I was completely surprised that the death_action was activated when I shot down the subentity. Later on I also tested this for ship-scripts. They also work for subentities. AI scripting of a subentity does not work.

According to Ahruman this was not deliberately but a nice bonus result of other changes to subentities. And with a ship-script you can award a bounty this way or spawn things. (use in the script: this.ship.spawn("xx")

When you want to be sure the main entity still lives you could probably check it with this.ship.owner

EDIT:
Or, alternatively you could take a look in the scripts of the Kestral&Falcon.oxp. Kaks uses only the main script to define script for the subentities. very efficient, I just now realised what he is doing there. I looked at the code before but never took the time to really understand he was doing. I still have a lot to learn I see.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

1.71.2, although at the moment the ships themselves are coded in XML rather than JS (is there a speed improvement from using JS, and will XML support be phased out in the future releases of the trunk code?). The death_action was working in that the comms message is appearing on sub-ent death, but the spawn of the cargo pods wasn't. Perhaps there is a mistake in the spawn command somewhere, I'll give it another review later and check.

Will have a look at the other codes, always a good idea for inspiration and guidance, thanks :)
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8512
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

@Thargoid - many moons ago Dr. Nil did the OO-Haul carrier based on my OO-Haul Ad for YAH and based on that I did a Tescoo Transporter and it was then that we discovered that the Oo-Hauler crates when blown up, never did release scripted cargo (I wanted mine to release either food or luxuries in a 2 to 1 ratio) LB came up with some ideas but we never got it to work properly [then my PC died and I lost all my work on the Tescoo Hauler anyway :( ]

If you do a search for Tescoo (ignoring the YAH stuff) and/or Oo-Hauler you may find the thread and see if LBs solutions work for you
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Thargoid wrote:
is there a speed improvement from using JS
Yes. Legacy ship script actions are dispatched through JavaScript, so you get bonus overhead from both systems. See oolite-default-ship-script.js.
and will XML support be phased out in the future releases of the trunk code?
No, barring a major change such as an Oolite 2.0. (This is not a product announcement…)
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8512
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

@Thargoid found the thread it's here: https://bb.oolite.space/viewtopic.php?t= ... sc&start=0

HTH
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
Post Reply