Page 5 of 24

Posted: Mon Aug 04, 2008 1:17 pm
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.

Posted: Mon Aug 04, 2008 1:56 pm
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...

Posted: Mon Aug 04, 2008 2:33 pm
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.

Posted: Mon Aug 04, 2008 3:43 pm
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)”.

Posted: Mon Aug 04, 2008 3:52 pm
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.

Posted: Mon Aug 04, 2008 4:07 pm
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:

Posted: Mon Aug 04, 2008 4:47 pm
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.

Posted: Mon Aug 04, 2008 6:14 pm
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...


Posted: Mon Aug 04, 2008 7:57 pm
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.

Posted: Mon Aug 11, 2008 7:29 pm
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]

Posted: Mon Aug 11, 2008 9:08 pm
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.

Posted: Tue Aug 12, 2008 6:26 am
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 :)

Posted: Tue Aug 12, 2008 8:41 am
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

Posted: Tue Aug 12, 2008 9:51 am
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…)

Posted: Tue Aug 12, 2008 10:55 am
by DaddyHoggy
@Thargoid found the thread it's here: https://bb.oolite.space/viewtopic.php?t= ... sc&start=0

HTH