Page 3 of 4

Re: [WIP] Carriers OXP v0.7

Posted: Mon Jul 21, 2014 7:19 pm
by mossfoot
StathisR wrote:
I went to a rock hermit and there was a Cobra Mark I Carrier ready to dock. As it entered the docking bay the rock hermit vanished!.It vanished from the radar too.

https://www.dropbox.com/s/5daibcocibwjr ... nished.png
That's not a bug, that's a feature (oh the stories one could tell to explain that spookiness ;) )

Re: [WIP] Carriers OXP v0.7

Posted: Mon Jul 21, 2014 7:27 pm
by StathisR
mossfoot wrote:
That's not a bug, that's a feature (oh the stories one could tell to explain that spookiness ;) )
Cloacked Rock Hermit? :)

Re: [WIP] Carriers OXP v0.7

Posted: Mon Jul 21, 2014 8:10 pm
by Norby
StathisR wrote:
As it entered the docking bay the rock hermit vanished!
Looks like Carriers consume Rock Hermits sometimes. ;)

Thank you for the report, currently I can not reproduce, the Carrier at me docked into the Hermit without problems. Moreover there is not any relevant code what I can fix, this is a simple ship oxp at the moment.
Diziet Sma wrote:
That's a huge bounding-box..
Thanks, I do not know why you get this but now there are normal boxes at me in the next version.

Re: [WIP] Carriers OXP v0.7

Posted: Tue Jul 22, 2014 1:23 pm
by dertien
Ok, so technically speaking, you can now add drones to your ship, that can launch at your command ... Interesting ...

I was fiddling with the idea before this post of adding some drones to the outer hull of the Cobra Mk 3 I am building at the moment. Seems I can still do it then.

Re: [WIP] Carriers OXP v0.7

Posted: Thu Jul 24, 2014 7:03 pm
by mossfoot
Had a pirate carrier attack me today (see Mossfoot's Tales of Woe to see how that turned out ;) ).

Despite having a military laser, I was unable to destroy the carrier itself, and I was on it for what felt like forever. Is the shield recharge just crazy high or what?

Re: [WIP] Carriers OXP v0.7

Posted: Thu Jul 24, 2014 9:03 pm
by Norby
mossfoot wrote:
Had a pirate carrier attack me today (see Mossfoot's Tales of Woe to see how that turned out ;) ).
Nice tale! :)
mossfoot wrote:
Despite having a military laser, I was unable to destroy the carrier itself, and I was on it for what felt like forever. Is the shield recharge just crazy high or what?
Some pirates has unique modifications and stronger than others, yes. A slow and bulky ship should be strong to survive and these are even stronger. You have chance if you buy an aft laser and use in rotation when the other is overheated.

Re: [WIP] Carriers OXP v0.7

Posted: Thu Jul 24, 2014 9:35 pm
by mossfoot
Norby wrote:
Some pirates has unique modifications and stronger than others, yes. A slow and bulky ship should be strong to survive and these are even stronger. You have chance if you buy an aft laser and use in rotation when the other is overheated.
Ah, I'll keep that in mind when I have a ship that has an aft laser ;)

Re: [WIP] Carriers OXP v0.7

Posted: Thu Jul 24, 2014 9:53 pm
by Norby
mossfoot wrote:
Ah, I'll keep that in mind when I have a ship that has an aft laser ;)
Ok, but I do not think that the smallest fighter with a single weapon must be able to knock out a many-many times larger carrier alone.

Re: [WIP] Carriers OXP v0.7

Posted: Thu Jul 24, 2014 11:11 pm
by mossfoot
Norby wrote:
mossfoot wrote:
Ah, I'll keep that in mind when I have a ship that has an aft laser ;)
Ok, but I do not think that the smallest fighter with a single weapon must be able to knock out a many-many times larger carrier alone.
I'm not complaining ;) I'd have assumed it would be useless to take on other navy carries solo as well (or at least, it should be!) I just wanted to make sure that was intentional and not some kind of glitch where the hits weren't registered.

Still, felt satisfying picking off every ship on the hull like a shooting gallery ;)

Re: [WIP] Carriers OXP v0.7

Posted: Fri Jul 25, 2014 12:47 am
by Norby
mossfoot wrote:
some kind of glitch where the hits weren't registered.
If you install [wiki]LogEvents[/wiki] then you can review the damages in the log file.

Re: [WIP] Carriers OXP v0.8

Posted: Sun Jan 11, 2015 8:29 pm
by Norby
[EliteWiki] Carriers v0.8 use EscortDeck and Ship Storage Helper to hold 2 traders and 7 escorts in the default deck, or 10 escorts in XL deck. After enough hunting for derelicts or spending a lot of money for buying escorts finally you will be able to command a decent fleet.
Image

Enjoy! :)


A message for developers:

I need help in fixing the "sit into an escort during flight" feature of Carriers. I tried many variations in the last half year without success.

To enable this feature type the following into the debug console or set in the 9.line in escortdeck.js: worldScripts.escortdeck.$EscortDeckSitInto=true;

You must fly a Carrier (there is a savegame within Carriers_0.8.oxz) and pick up a ship into the Escort Deck which is usable (non-salvage) and playable (has player role and view positions in shipdata.plist and defined in shipyard.plist). If you set worldScripts.escortdeck.$Debug=true then you will get many derelicts in front of the actual station but an Asp is already on the deck in the savegame. Then prime the deck, press mode to select an escort and activate the deck. Normally this launch an escort from your deck but in this case you will found yourself in the launched ship.

To sit back into the Carrier first target it (a direction mark after the Carrier's name on EscortDeck MFD help to determine where is it if not in the screen, for example ^> mean up right). Then go near them within 500m and slow down. After 1s you will see the docking tunnel.

I can not make this round (sit into an escort then back to the Carrier) without errors and strange side effects like losing equipments and MFDs or not changing the ship at all. When I try to solve a problem then another is appear in an endless loop so far.

My steps:
1. Spawn a virtual dock (a ship with a dock subentity) near the player ship.
2. Call dockPlayer() into which show the docking tunnel.
3. Replace player ship to the escort using Ship Storage Helper.
4. Remove the old escort and spawn a Carrier.
5. Call launch() to do not stay within the virtual dock.
6. Remove the virtual dock.

These are not working within a single function so I used shipDockedWithStation and guiScreenChanged events and a timer to split these but got various errors depending on the distribution. I always get the following in trunk after dockPlayer:

Code: Select all

23:11:40.207 [general.error.inconsistentState] -[PlayerEntity isDocked] (PlayerEntity.m:11993): ***** ERROR: status is STATUS_DOCKED, but dockedStation is nil; treating as not docked. This is an internal error, please report it.
Regardless of this I can use replaceShip() in guiScreenChanged and launch in the escort ship but looks like shipWillLaunchFromStation event handlers are not called so CombatMFD is not updating anymore.

When I try to sit back into the Carrier, the first access of ship.missiles (which is a must to replace missiles) give the following error:

Code: Select all

23:11:40.144 [script.javaScript.exception.ooliteDefined] ReportJSError (OOJavaScriptEngine.m:203): ***** JavaScript exception (carriers 0.8): Error: Native exception: Tried to init array with nil object
23:11:40.144 [script.javaScript.exception.ooliteDefined] ReportJSError (OOJavaScriptEngine.m:214): ~/.Oolite/AddOns/Ship_Storage_Helper_0.23.oxz/Scripts/Ship_Storage_Helper.js, line 290.
In Oolite 1.80 the situation is even worse: the launch() show the space but controls are frozen, in F5 still show docked status so I must press F1 by hand to launch and this takeoff start from the main station. Maybe I do something badly in carriers.js but I have no idea at the moment.

Re: [WIP] Carriers OXP v0.8

Posted: Tue Jan 13, 2015 5:53 pm
by cim
Norby wrote:
6. Remove the virtual dock.
This is the problem. Because of how this.$Carriers_Timed is structured, you call ps.launch(), and then immediately after that remove the virtual dock before Oolite has had chance to finish processing the start of the launch sequence. (Or, depending on how the timings work out, you remove the virtual dock while the player is being shown the break pattern for docking with it, which doesn't help either)

You already check for and remove it in shipLaunchedFromStation - you shouldn't need to check in the timer as well. (There's no need to remove it earlier than that as the player can neither switch view nor read the scanner, so they'll never know it's there)

I don't think you need the timer at all. What should work is:
Step 1 and 2 on equipment activation
Steps 3, 4 and 5 on guiScreenChanged on dock (should work in shipDockedWithStation, and would be more reliable if it did)
Step 6 on shipLaunchedFromStation

Re: [WIP] Carriers OXP v0.9

Posted: Tue Jan 20, 2015 1:13 am
by Norby
[wiki]Carriers[/wiki] v0.9 is ready for the public test of sit into feature so I enabled it by default: the launch command of a single selected escort will launch the player within. There is a menu item in the mode list of primed EscortDeck where players can flip a switch from "allow" to "avoid" state to disable the sit into feature.

Please test and report if it is cool or faulty. ;)


Developer notes:

Thanks cim, I tried your suggestion but shipLaunchedFromStation is not called at all when I called launch(), I think due to the incosistentState reported in the first error message which is logged at the launch() call. This was the reason why I removed the dock in the timer also.

I use guiScreenChanged otherwise the screen stop in the status screen and not in the space regardless of a successful launch.

Meantime I made a separated delay timer for removing the dock but the shipWillLaunchFromStation and shipLaunchedFromStation event handlers still missed, so I called these from an FCB for each worldScript because some failed due to dockedStation was null (Commander's Log, Market Inquirer) which blocked the call of others if called at once, but this was not enough good solution in my eyes so I removed this code.

Next time I tried to spawn a casinoship as virtual dock which worked without incosistentState, so I hunted down the source which was the allow_launching=false setting in my dock subentity. In this case the launch() drop this error and produce these strange effects. I thinked this setting should block the launch of NPCs only. Now with allowed launching the sit into feature is working in 1.80 also. NPCs can't launch anyway due to the instant remove of the virtual dock.

There is a marginal core bug: if a player replace his ship to another with max_missiles=0 in shipdata and replace further to one with missiles (for example sit into a Sidewinder then back into the Carrier) then all access of PS.missiles drops an "Error: Native exception: Tried to init array with nil object" and breaks the execution of the js codes in CCL, SSH, Vortex, etc.

This was a problem in Carriers due to I made buyable escorts without missiles. Now I upgraded all escorts to hold at least 1 missile in EscortDeck v1.1 but the core Krait, Mamba and Sidewinder has 0 so if somebody unlock these to be playable then must give max_missiles=1 also to avoid errors when sit into.

Re: [WIP] Carriers OXP v0.9

Posted: Tue Jan 20, 2015 7:51 am
by cim
Norby wrote:
There is a marginal core bug: if a player replace his ship to another with max_missiles=0 in shipdata and replace further to one with missiles (for example sit into a Sidewinder then back into the Carrier) then all access of PS.missiles drops an "Error: Native exception: Tried to init array with nil object" and breaks the execution of the js codes in CCL, SSH, Vortex, etc.
Interesting, and thanks for spotting - with basically no playable ships having no pylons it's not surprising that it's not come up before. I'll investigate further.

Re: [WIP] Carriers OXP v0.9

Posted: Thu Jul 30, 2015 3:01 pm
by zdoofop
can you make an op one with ball turrets for pussies like me?