Pirates Cove

General discussion for players of Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
elite
Deadly
Deadly
Posts: 128
Joined: Thu Jun 21, 2007 9:26 am

Pirates Cove

Post by elite »

I have this oxp and as you know it turns rock hermits into pirate hideouts with a 50% chance of it happening.

Can someone tell me what code or variable to change to bring this down to 10%?

Thanks.
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Post by Cmdr James »

I dont think thats quite true, it doesnt turn rock hermits into pirate coves. I think it adds pirate coves giving an average of approximately half of the rock hermits actually being pirate coves.
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 »

Cmdr James wrote:
I dont think thats quite true, it doesnt turn rock hermits into pirate coves. I think it adds pirate coves giving an average of approximately half of the rock hermits actually being pirate coves.
Both are half true. It does both. It turns part of the Rock Hermits in Pirate rocks and additionally adds Pirate Rocks in systems with much pirates.

Lowering the probability role of rockhermit(0.2) will lower it. But by removing the role completely, one cove will still be added in systems with many pirates. For this reason it is not possible to give a value for a 10% chance.
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 »

Hi elite,

you have to open the shipdata.plist of Pirate_coves.oxp and look for the lines

Code: Select all

		<key>roles</key>
		<string>rockhermit station pirate-cove</string>
Change it to

Code: Select all

		<key>roles</key>
		<string>rockhermit(0.11) station pirate-cove</string>
and you're there.

Note, however, that there is an additional chance to meet a Pirate Cove. The planetinfo.plist adds one in the Diso system, which will be there all the time. And the script.plist adds (without "changing" an existing Rock Hermit) a Pirate Cove to all systems in which there are more than 9 pirates present at the time you witch in.
User avatar
elite
Deadly
Deadly
Posts: 128
Joined: Thu Jun 21, 2007 9:26 am

Post by elite »

Thanks guys.
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 »

Has anybody ever noticed there is a bug in Pirate Coves?

It just failed to attack me the other day. Digging for the reason I found a stupid error in its AI that made it hang forever in a state. This error must have been there since at least Oolite 1.47. Almost unbelievable it was never seen before. But I think most players would have seen such stations that don't attack as normal hermits.

Anyhow, I fixed it, gave the oxp now also a JS addition script and will upload it in a few days. I would prefer a chance in the likelihood of replacement and want others opinions. Now it replaces 50% of the regular hermits. I would prefer to lower this to 20%. There are still the additional additions in pirate systems.

Anybody else that can find the bug now they know it is there? Hint: look for spelling.
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Post by Screet »

Eric Walch wrote:
I would prefer a chance in the likelihood of replacement and want others opinions. Now it replaces 50% of the regular hermits. I would prefer to lower this to 20%. There are still the additional additions in pirate systems.
I haven't installed that oxp yet. Although I rarely dock at hermits (only when I encounter them on my way), the current amount appeared to be much too high to me. With that changed to your suggestion, I surely will give it a try!

Screet
User avatar
wackyman465
---- E L I T E ----
---- E L I T E ----
Posts: 831
Joined: Thu Nov 06, 2008 10:15 pm
Location: Currently hunting you down in an Imperial Courier

Post by wackyman465 »

Oolite 1.47? There was an Oolite 1.47? I jumped on back at 1.62 i think.
I shot him back first. That is to say, I read his mind and fired before he would have fired on me. No, sir, he wasn't a fugitive.
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 »

wackyman465 wrote:
Oolite 1.47? There was an Oolite 1.47? I jumped on back at 1.62 i think.
Presumably somewhere between Oolite 1.40 and 1.51, yes. :-)
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 removed some old bugs in Pirate Cove by Lazygun.

It had a bug that when it found debris it went to a state were it launched a scavenger and kept looking for debris until it received a message "NOT_FOUND". But the code is sending "NOTHING_FOUND" resulting that when it saw debris it entered a loop it could not recover from. Normal players would hardly have noticed this as it than just looked like the real Rock Hermit.

There were more bugs: once it noticed a trader it launched pirates until it received a "TARGET_LOST" message. But this message would not come when the target fled and the rock still launched all its pirates.

When the pirates returned their docking was signalled but pirates are not added to the available defenders. And when looking in the source code one notice that the command "launchPirate" was added to the source by Lazygun himself. He forgot to add code so returning pirated were added back to the stock. Another commander has corrected this for the 1.73 release.

As long as the wiki is on a backup system it is kept read-only so I can't upload it there. I the mean time i uploaded a beta release at the box:
Pirate Cove 1.1b

This beta release has still a logging function in it that logs friendly attacks. The pirate cove suffers the most from this so it is a good tool to see it this new oolite bug can be eliminated.

ps I noticed this is the wrong forum. I'll announce the wiki upload in the right one.
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Post by Screet »

Hi,

I've downloaded that beta version of pirate coves...and since then I've been unable to find a single rock hermit. All those I did encountere were pirate coves instead.

Is this just my usual "luck" or is anyone else experiencing this problem?

Screet
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Post by Screet »

Screet wrote:
I've downloaded that beta version of pirate coves...and since then I've been unable to find a single rock hermit. All those I did encountere were pirate coves instead.

Is this just my usual "luck" or is anyone else experiencing this problem
No answers? Did noone else encounter this problem? Since the installation, I've only been able to find one single Rock Hermit that didn't launch pirates and had proper looking goods list. All other Rock Hermits I encountered obviously were pirate coves instead. They typically have a complete set of goods for sale, with pretty strange prices (Computers for 40 credits? furs for 30?).

So, please, is this just my luck? Is everyone else getting a proper amount of true Rock Hermits?

Screet
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 »

Screet wrote:
I've downloaded that beta version of pirate coves...and since then I've been unable to find a single rock hermit. All those I did encountere were pirate coves instead.
I think it is just your believe. rock hermits are relative rare in systems. This oxp turns about 20% of them into pirate coves so the hermits become even more rare. But in addition it also places pirate coves in every system that has at least 10 pirate ships in it. So you feel that you never see the normal ones anymore, but they were so rare in the first place.
The legacy version even turned half of the normal hermits in pirate coves and could even add a second pirate cove based on pirate count. This JS version will in all cases only add one cove. When the populator had added one it will not add a second one.

I still see enough plain hermits in the system.
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Post by Screet »

Hi Eric,

I'm not sure if I found another bug, but it looks a bit like that to me. I did encounter another pirate cove, this time strangely with a true rock hermits market, thus maybe this was one of the "converted" ones.

It began to launch a Krait, but that fled when I shot at him. Thus I docked, did trade...when I launched, there were multiple defense ships right in my path. They did slightly crash into each other and did not move, thus I shot them down, I didn't have to aim.

Afterwards, the station did launch another ship: A juggernaut. It was offender, but did not begin to attack me. I did wait and then it did dock again. Once it was gone, I began shooting at the pirate cove...and waited - but no ship did launch. Thus I blew it up...and here's what shift-h tells:

Code: Select all

[dumpState]: State for <ShipEntity 0x192a7c38>{"Yakuza Juggernaut" ID: 519 position: (115995, 343822, 868720) scanClass: CLASS_NEUTRAL status: STATUS_IN_FLIGHT}:
  [dumpState.entity]: Universal ID: 519
  [dumpState.entity]: Scan class: CLASS_NEUTRAL
  [dumpState.entity]: Status: STATUS_IN_FLIGHT
  [dumpState.entity]: Position: (115995, 343822, 868720)
  [dumpState.entity]: Orientation: (0.645591 - 0.661851i - 0.272499j - 0.266291k)
  [dumpState.entity]: Distance travelled: 6905.22
  [dumpState.entity]: Energy: 1456 of 1456
  [dumpState.entity]: Mass: 3.87674e+009
  [dumpState.entity]: Owner: <StationEntity 0x26ea2e50>{"Rock Hermit" "Rock Hermit" ID: 275 position: (116849, 342960, 865421) scanClass: CLASS_ROCK status: STATUS_ACTIVE}
  [dumpState.entity]: Flags: isShip, hasMoved, isSunlit
  [dumpState.shipEntity]: Name: Yakuza Juggernaut
  [dumpState.shipEntity]: Display Name: Yakuza Juggernaut
  [dumpState.shipEntity]: Roles: <OORoleSet 0xdfd22a8>{pirate yakuzapiratejuggernaut}
  [dumpState.shipEntity]: Primary role: pirate
  [dumpState.shipEntity]: Script: <OOJSScript 0xdeed260>{"oolite-default-ship-script" version 1.72.2}
  [dumpState.shipEntity]: Subentity count: 35
  [dumpState.shipEntity]: Behaviour: BEHAVIOUR_FLY_TO_DESTINATION
  [dumpState.shipEntity]: Target: <StationEntity 0x26ea2e50>{"Rock Hermit" "Rock Hermit" ID: 275 position: (116849, 342960, 865421) scanClass: CLASS_ROCK status: STATUS_ACTIVE}
  [dumpState.shipEntity]: Destination: (116319, 343490, 868671)
  [dumpState.shipEntity]: Other destination: (0, 0, 0)
  [dumpState.shipEntity]: Waypoint count: 0
  [dumpState.shipEntity]: Desired speed: 128
  [dumpState.shipEntity]: Fuel: 1000
  [dumpState.shipEntity]: Fuel accumulator: 1
  [dumpState.shipEntity]: Missile count: 100
  [dumpState.shipEntity.ai]: AI:
    [dumpState.ai]: State machine name: dockingAI.plist
    [dumpState.ai]: Current state: GO_TO_COORDS
    [dumpState.ai]: Next think time: 743.016
    [dumpState.ai]: Next think interval: 0.125
  [dumpState.shipEntity]: Frustration: 0
  [dumpState.shipEntity]: Success factor: 470.524
  [dumpState.shipEntity]: Shots fired: 0
  [dumpState.shipEntity]: Time since shot: 100084
  [dumpState.shipEntity]: Spawn time: 613.431 (129.528 seconds ago)
  [dumpState.shipEntity]: Hull temperature: 60.245
  [dumpState.shipEntity]: Heat insulation: 1
  [dumpState.shipEntity]: Flags: escortsAreSetUp, isFrangible, canFragment
[dumpState]: State for <StationEntity 0x26ea2e50>{"Rock Hermit" "Rock Hermit" ID: 275 position: (116849, 342960, 865421) scanClass: CLASS_ROCK status: STATUS_ACTIVE}:
  [dumpState.entity]: Universal ID: 275
  [dumpState.entity]: Scan class: CLASS_ROCK
  [dumpState.entity]: Status: STATUS_ACTIVE
  [dumpState.entity]: Position: (116849, 342960, 865421)
  [dumpState.entity]: Orientation: (1 - 0i - 0j - 0k)
  [dumpState.entity]: Distance travelled: 0
  [dumpState.entity]: Energy: 593.565 of 1000
  [dumpState.entity]: Mass: 6.14797e+007
  [dumpState.entity]: Owner: <StationEntity 0x26ea2e50>{"Rock Hermit" "Rock Hermit" ID: 275 position: (116849, 342960, 865421) scanClass: CLASS_ROCK status: STATUS_ACTIVE}
  [dumpState.entity]: Flags: isShip, isStation, isSunlit
  [dumpState.shipEntity]: Name: Rock Hermit
  [dumpState.shipEntity]: Display Name: Rock Hermit
  [dumpState.shipEntity]: Roles: <OORoleSet 0xdeccb08>{pirate-cove rockhermit station}
  [dumpState.shipEntity]: Primary role: rockhermit
  [dumpState.shipEntity]: Script: <OOJSScript 0xdf75640>{"Pirate Cove Rock" version 1.00}
  [dumpState.shipEntity]: Subentity count: 8
  [dumpState.shipEntity]: Behaviour: BEHAVIOUR_IDLE
  [dumpState.shipEntity]: Target: <PlayerEntity 0xb81dbd8>{"Hammer of Sorrow" ID: 100 position: (116934, 342852, 868957) scanClass: CLASS_PLAYER status: STATUS_IN_FLIGHT}
  [dumpState.shipEntity]: Destination: (0, 0, 0)
  [dumpState.shipEntity]: Other destination: (0, 0, 0)
  [dumpState.shipEntity]: Waypoint count: 0
  [dumpState.shipEntity]: Desired speed: 0
  [dumpState.shipEntity]: Fuel: 0
  [dumpState.shipEntity]: Fuel accumulator: 1
  [dumpState.shipEntity]: Missile count: 0
  [dumpState.shipEntity.ai]: AI:
    [dumpState.ai]: State machine name: rockHermitPirateAI.plist
    [dumpState.ai]: Current state: ATTACK
    [dumpState.ai]: Next think time: 922.858
    [dumpState.ai]: Next think interval: 0.125
  [dumpState.shipEntity]: Frustration: 0
  [dumpState.shipEntity]: Success factor: 0
  [dumpState.shipEntity]: Shots fired: 0
  [dumpState.shipEntity]: Time since shot: 100887
  [dumpState.shipEntity]: Spawn time: 28.084 (886.936 seconds ago)
  [dumpState.shipEntity]: Hull temperature: 61.3088
  [dumpState.shipEntity]: Heat insulation: 1
  [dumpState.shipEntity]: Flags: escortsAreSetUp, canFragment
  [dumpState.stationEntity]: Alert level: red
  [dumpState.stationEntity]: Max police: 8
  [dumpState.stationEntity]: Max defense ships: 5
  [dumpState.stationEntity]: Police launched: 5
  [dumpState.stationEntity]: Max scavengers: 1
  [dumpState.stationEntity]: Scavengers launched: 0
  [dumpState.stationEntity]: Docked shuttles: 0
  [dumpState.stationEntity]: Docked traders: 0
  [dumpState.stationEntity]: Equivalent tech level: 1
  [dumpState.stationEntity]: Equipment price factor: 4.5
  [dumpState.stationEntity]: Flags: none
Am I right that the defender which didn't shoot at me and went to dock again did not reduce the number of "police launched" and that "police launched" is indeed referring to "max defense ships"?

Interestingly, on the same run I had a navy mission to destroy a pirate cove. In yours there were boulders, in the navy one there were scrap metals?!?

Screet
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 »

Am I right that the defender which didn't shoot at me and went to dock again did not reduce the number of "police launched" and that "police launched" is indeed referring to "max defense ships"?
Currently launchPirate has a bug that returning pirates are not added to the available ships. (Bug is already corrected for the 1.73 release). And yes, there is only one counter for police, defence or pirate ships for a station and that is the police launched: Any kind of those three launching increased the police launched: counter.
Interestingly, on the same run I had a navy mission to destroy a pirate cove. In yours there were boulders, in the navy one there were scrap metals?!?
That is a "bug' in the definition of the navy rock. That one is not defined as rock, and only rock falls apart in boulders. I think the navy "pirate cove" was yellow on your scanner?

Juggernaut having a pirate role is a bug. Ships with pirate (and trader, scavenger, miner, police, interceptor) roles should always be small enough to be able to dock/launch. It just does not look right seeing such large ships launching/docking.
Post Reply