SuperCobra.OXP and V1.71.2

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

Moderators: winston, another_commander

User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

Surely every Elite player would strive to own a station of his own with a hanger full of a choice of ships that he could take for a spin on a whim... :)
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

..

Post by Lestradae »

I totally second that ... a garage ... or owning a carrier and having your ten other ships aboard, just get out & fly around etc ...

A man can dream, yes? :P
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 »

TGHC wrote:
Cheers Eric, works a treat, plus I've gained a million credits in asset value. :wink:
Downside is of cause that maintenance raises also with your asset value. Hope your income is high enough to keep things in working order. I think even yearly repainting will be expensive as to keep your status, you can't just use any paint but have to use that very special paint that is mentioned in your ships manual. Oh, you lost your manual. In that case better order a duplicate for the bargain prise of 100 000 cr. :idea: And UPS will deliver it to you for only an additional 49 998 cr. :!: (including galactic taxes)

I also changed the addition script of the NPC version. On every jump, 3 supercobras were added in addition to the system ships. The NPC supercobra has an slightly modified traderAI from oolite 1.55. However pirates didn't know this trader type and didn't attack it.
I removed the addition script and gave it a trader role while keeping its original traderAI file. Now it is not added on top of the traders but it becomes one of the traders and will be attacked by pirates.
I also have set bounty to 0 because a fugitive trader doesn't make sense to me.
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

Eric Walsh wrote:
fugitive trader doesn't make sense to me
Isn't a drug-trafficker, a drug-runner or a slave-trader just three variations of a trader who would almost certainly become a fugitive?
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed 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 »

DaddyHoggy wrote:
Isn't a drug-trafficker, a drug-runner or a slave-trader just three variations of a trader who would almost certainly become a fugitive?
Yes, that makes sense. :lol: I'll restore the 100 cr bounty and give it a Narcotics load. Has the player a good reason for attacking him. According to the Wiki it is more a pirate ship, but that is in contradiction with the internal behaviour file: Not attacking other ships unless provoked and going straight to the planet and than dock at the station. That's trader behaviour. :lol:
User avatar
TGHC
---- E L I T E ----
---- E L I T E ----
Posts: 2157
Joined: Mon Jan 31, 2005 4:16 pm
Location: Berkshire, UK

Post by TGHC »

Gold Star award to Eric!

BTW I've always found the SC's to be a bit wimpy, I would expect them to put up a much much tougher fight when attacked.
The Grey Haired Commander has spoken!
OK so I'm a PC user - "you know whats scary? Out of billions of sperm I was the fastest"
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 »

Eric Walch wrote:
Yes, that makes sense. :lol: I'll restore the 100 cr bounty and give it a Narcotics load. :lol:
Done, version 1.2 (Only NPC ship changed). It has narcotics or firearms on board. (When Cargo_wreck_Teaser is installed there are also several of his cargopods ejected. Apparently all cargo becomes narcotics when ejected except scripted cargo).
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Sorry to disturb the wonderful sidetracks here, :wink: but I would like to bring the topic back to the original issue:

@ Thargoid (and the rest): What you have seen is a pefectly normal behaviour. As Eric mentioned, the original SuperCobra has neither viewpoints nor weapon positions defined. This means that both default to a dead center position relative to the ship. It is like you are looking exactly through the barrel of your gun, and this for all directions. So you do see your laser (and you have correctly noticed that it is indeed firing), but you see it exactly from behind. And as a laser is a pointed beam of light, there is not much to see, of course. :? (Technically speaking this is not strictly true. Oolite does not use a pointed laser, but a combination of a horizontal and a vertical stripe. So the shape of the lasers actually looks like a "+". And this produces the strange interferences you have observed.)

Now, as you usually do not look through the barrel of your gun, but the window (or camera) of your ship is mounted somewhere else than the weapon, you usually should look to your laser from an above (or in some cases below) angle. Technically this is achieved by defining the view positions and the weapon positions for each ship. (The designer of the SuperCobra for some reasons skipped that part, producing the result you have seen, as both values default to 0. Probably in 1.65 one of the values defaulted to something else than 0? That would explain why nobody noticed the problem back then.)

Eric has done that in his new upload, so now the view positions and the weapon positions are different. Result: You see your lasers from a view position above the firing position (I suppose). Everything seems to be fine.

Problem is, however, that everything is not fine yet. As already reported repeatedly, the definition of the weapon positions is broken at least since 1.71. So whatever position is defined, the laser will always originate from the same point (my guess: the center of the ship's bounding box). This bug hasn't been fixed yet. So while the laser has become visible by lifting the view position above the plane, the weapon position is actually still somewhere dead center, and not at the position defined in shipdata. And this is true not only for the SuperCobra, but for each and every ship in the Ooniverse. Until the bug in the code gets fixed.
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 »

McLane wrote:
the original SuperCobra has neither viewpoints nor weapon positions defined. This means that both default to a dead center position relative to the ship. It is like you are looking exactly through the barrel of your gun, and this for all directions. ..... (The designer of the SuperCobra for some reasons skipped that part, producing the result you have seen, as both values default to 0. Probably in 1.65 one of the values defaulted to something else than 0? That would explain why nobody noticed the problem back then.)
I found the author. It is "8-Bit Apocalypse". I also looked in some other of his player ships. Greek, Ixian. They also miss these positions and probably behave just as bad.
I had look in both the 1.65 and the 1.71 code why there was a difference. However, both use the same piece of code to define a default value. It is not zero but 5 meter below the centre of the ship. It doesn't use 0 as centre but first calculates a coordinate halfway the ship. (Not all ships have the origin in the centre)
the definition of the weapon positions is broken at least since 1.71. .... So while the laser has become visible by lifting the view position above the plane, the weapon position is actually still somewhere dead center, and not at the position defined in shipdata.
This is probably also the cause that lasers started to behave wrong with the supercobra and it is not because of a changed default value. I just did a quick test. Moved the laserposition out of centre and started it with several Oolite versions. 1.65/1.68/1.69 worked as expected (laser coming from the side). Starting with 1.70 it started to go wrong. Laser always coming from the ships centre. When moving view points, this did work. (laser coming from side of viewer)

I looked in the code and saw the 4 default positions for laser origins are defined at 5 meter below the centre of the ship. And when default view position is exact the centre you always see the beam coming from below. When now, because of the bug, also the laser starts in the centre, you get the weird behaviour with ships with no view position defined.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

So the question remains: Could you find and remove the bug?
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »


Greetings all,

I thank you for the detailed explanation commander, although as yet I've not delved under the hood of Oolite too much to understand the technicalities (although I can follow what you're saying).

On a more mundane note, now that I can use the newer Oolite version and take my pick of OXPs, am I to presume I should avoid "Realistic Shipyards" at the moment as the SuperCobra in there will clash with the newly modified one?
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

...

Post by Lestradae »

On a more mundane note, now that I can use the newer Oolite version and take my pick of OXPs, am I to presume I should avoid "Realistic Shipyards" at the moment as the SuperCobra in there will clash with the newly modified one?
If you wish to combine "Realistic Shipyards" with the new "SuperCobra" oxp, just rename the SuperCobra oxp into "ZzzzzSuperCobra" - then its data will overwrite the Realistic Shipyards data and you get RS plus the new SuperCobra.

:idea:

L

PS: This issue and the Greek & Ixian ships issue is then another inherited bug of Realistic Shipyards - noted and will be fixed in its next version ...
Last edited by Lestradae on Fri Jul 04, 2008 7:28 pm, edited 1 time in total.
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 »

Thargoid wrote:

On a more mundane note, now that I can use the newer Oolite version and take my pick of OXPs, am I to presume I should avoid "Realistic Shipyards" at the moment as the SuperCobra in there will clash with the newly modified one?
Probably one will overwrite the other. It won't crash. In the worst case you must rename the cobra file "zzzzzSuperCobra" so it loads after RS.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Greetings,

A simple but effective solution. Sounds just like me...

I like it :twisted:

User avatar
JohnnyBoy
---- E L I T E ----
---- E L I T E ----
Posts: 490
Joined: Mon May 05, 2008 9:41 pm
Location: West Sussex, UK (rich agricultural)

Post by JohnnyBoy »

I did try Supercobra 1.2 for a while, but my aiming wasn't as accurate as with the old version that allowed me to look down the barrel of my mil laser. So I went back to the old OXP - much to the dismay of the scumbags that I polished off at a 20km distance.... :wink: :twisted:
"That's no vicious Treeoid. That's my wife."
Post Reply