SuperCobra.OXP and V1.71.2

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

Moderators: another_commander, winston

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 »

HeHe different strokes and all that.

I prefer 1.2, and can still take out Mussuranas on afterburn when they are only one pixel.

<wakes up>
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
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 »

Well it wasn't just my position relative to the laser, it was also my position relative to the scoop; with version 1.2, I kept ramming cargo pods rather than picking them up....

With the old Supercobra OXP, normal service has been resumed. 8)
"That's no vicious Treeoid. That's my wife."
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 »

JohnnyBoy wrote:
Well it wasn't just my position relative to the laser, it was also my position relative to the scoop; with version 1.2, I kept ramming cargo pods rather than picking them up....
It is just that what you were accustomed to has changed a little. In the old situation your viewpoint was from the centre of he ship. Now it is a more realistic value from the position of the ships windows.

For the target it could mean you have to aim a pixel higher and for scooping you probably have to change that distance too. (take a little more distance because of the higher viewpoint)

What I strongly changed was the eject position. Now the ship has external views, you can really see the cargo leave the ship. The position didn't look good to me, so I changed it a little till it did look good. After above reactions, I was afraid this could have influenced the scooping also, but looking into the code itself, it shouldn't. There is an explicit key for "scoop_position". By default it is the zero vector. (I noticed that this key is still missing in the wiki). Oolite 1.65 already used this key and probably also older versions.

However, none of the build-in ships uses this key and all current ships use the default value of centre ship. When all these values would be changes to the actually bottom of the ship, all pilots would have to get accustomed to that more realistic position too.

EDIT:
Having said this, I added a scoop_position to my Boa-MK2 at the bottom side of my ship. Three out of four barrels I scooped without crashing into it on my first trial. And when looking from outside with the external views (V-key), this scooping looked much better, more realistic.

Normally, with external views you see the cargo circling inside the ship, but now you saw it disappearing at the bottom where I just defined the new scoops.
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 »

Please put the keys on the wiki. Would be very helpful for everybody. Thanks! :)
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 »

Commander McLane wrote:
Please put the keys on the wiki. Would be very helpful for everybody. Thanks! :)
After seeing it worked as intended, I already did it. Adding this key has small effect and I had scooping went on as usual. Only when looking at my ship in side-view during scooping, I often saw cargo circling around the middle of my ship and with the key it circled around the bottom of the ship.
I would have thought Giles would have at least added this key to some of the internal ships. Maybe someone else volunteers for this job?

EDIT:
Out of interest I looked into the code of scooping. The scoop_position has no direct influence on the scooping process.

Scooping is part of the collision handling. When the front half of a non-player ship collides with cargo, scooping is started. When a player collides with cargo, there is an extra check for collision with the underside of the ship. Effective a player has to hit the cargo with the front-botem part to scoop. This makes scooping with ships with a wide backside (like my boa) a little more difficult. With my boa it can smash into pieces on my backside when I fly a little to high, while other ships just miss the cargo and get an second change.

So, the position of the scoop has no influence on the decision if cargo will be scooped and won't make it harder or easier. However, when the system decides that scooping has started, it determines the position the cargo will be sucked in to.
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 »

There were some comments that the super cobra was strong as player ship, but an easy target as NPC ship.

I changed the AI a little and gave it a script. It stays a trader and won't attack if not attacked first. Because of its illegal cargo it has a high bounty. This makes it worth to kill it for the player.

When the Super Cobra detects that he is loosing the battle, he will flee. In this process he often drops mines to discourage persuaders to follow him. He will be harder to kill than version 1.2

No changes to the player version, only the NPC is tougher.

Super cobra 1.3
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 »

I just uploaded a new version of the super cobra. Super cobra 1.4
Oolite 1.73 has changed something in its code that causes the old script to give warnings in the log about "setPosition", although the oxp still works with 1.73. (But probably not with 1.74 anymore).

Changes:
- This version should work with both 1.72 and 1.73.
- The SC reacts now better on attacks while docking. (I gave it a custom dockingAI)
- The SC has a chance to dock at an other station than the main station.
- No changes to the player ship itself, only the NPC version.
Post Reply