EnglishGermanFrenchRussianItalianSpanish
Log inRegister
 
[MOD] Shipyard and Player Shipyard - Ship recycling v0.07 (6 Apr 2017)
Post new topic Reply to topic Goto page Previous  1, 2, 3, 4, 5, 6  Next
View previous topic :: View next topic
Author Message
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)



Joined: 15 Dec 2003
Posts: 5021 on topic

Thank you for registering your game
PostPosted: Sat, 4. Apr 15, 03:48    Post subject: Reply with quote Print

BerserkKnights Build shipyards was downloaded a lot because it was the first mod out that allowed building shipyards. My version is a continuation of Berserk's work since Berserk is no longer around. Berserks mod is not supported any more.

Also, JTH, the reason you couldn't load your save when you were using the buildshipyards mod is because it gets added as a dependency in the save file. Editing the save file and removing the small line at the top where it says buildshipyards would allow you to load the save without the mod active.

Back to top
View user's profile Send private message
jth



MEDALMEDAL

Joined: 04 Jan 2006
Posts: 295 on topic
Location: England
Thank you for registering your game
PostPosted: Sun, 5. Apr 15, 15:06    Post subject: Reply with quote Print

Requiemfang wrote:
Noticing something odd and I am not sure if it's been reported. When I go to recycle a ship at a shipyard has 2 or more dockyards. If one of the dockyards/drydocks is occupied by a ship being built and the other yard is free and I choose that one to recycle the ship, the ship in question goes to the dock yard where the ship that's currently being built is located instead of going to the free one. It's a bit of an annoying bug.

The issue is consistent with shipyards that have the 2 large ship dockyards as the two times it happened I tried to recycle Rehannas I capped. Each time one of the dockyards was not currently being used to build a ship by NPC factions.

Edit:

Small question of course is... will this work with Blackrains player shipyard mod? I couldn't figure out if I should or could from the post made about it.


It hasn't been reported yet, so thanks Smile

Are you running the preliminary test patch of version 0.03 ? if not please try it. The test patch should cope better than version 0.02 with two L ship cradles with one caveat.

Known issues

"Using multiple ShipTraders at the same time may have unfortunate consequences, do not attempt to recycle two ships at the same time."

what it probably should say is

"Using multiple ShipTraders at the same time may have unfortunate consequences, do not attempt to recycle two ships or build/repair/modify one ship and recycle another at the same time ."

The reason for me saying this is that I think the NPC_Shiptrader script uses global variables for controlling ship movement and detecting when a ship has arrived in a cradle and each ship dealer runs their own copy of the script, so they can upset each other. So two L cradles equals two copies of the script, two L cradles plus an XL equals 3 copies of the script. The medium ships use a different script NPC_Shiptrader_Small. The medium ship dealers could potentially upset each other too.

Do both L cradles recycle with the ships going to the right cradle if nothing else is happening in the other cradle(s) ?

This mod was intended for use with BlackRain's player shipyard mod.

jth

Back to top
View user's profile Send private message
jth



MEDALMEDAL

Joined: 04 Jan 2006
Posts: 295 on topic
Location: England
Thank you for registering your game
PostPosted: Mon, 14. Dec 15, 19:54    Post subject: Reply with quote Print

- [10.12.2015 - V0.04 Public Beta]
Completely rewrote the ship selection user interface using customised versions of menu_property.lua and menu_buildcost.lua
Moved ship selection logic out of md script and into the GUI
This means that you cannot select a ship for recycling that does not fit in the ShipTraders cradle unlike previous versions where this was allowed initially but detected later and the process aborted
RecycleCostMenu checks the shipyard prerequisites before allowing you to OK which again avoids a later abort for lack of ShipTrader resources
The GUI API calls can get the shields and turrets from a ship that is Out Of Zone (OOZ) so the restriction on the recycled ship being in the same zone as the player has gone
No longer shares the sellship confirm menu so it makes one less change to ShipTrader.xml
Now recycles installed drones, ammunition and cargo
When recycling cargo it pays the full price for any wares that will fit in station storage and 50% if they do not fit or are not standard wares for a shipyard
When cloning the crew to the shipyard bar it now keeps their original names
Now multi lingualwhich means that a lot of the messages will have changed subtly to fit existing translated words
Now makes a single fund transfer for all crew contracts to cut down on event monitor messages
Now uses the FormatThousands library to format the money amounts with a separator between thousands
Removed ship selection logic and its event monitor messages from md script
Removed ship building ware estimate code from md script as this is now done in the RecycleCostMenu lua script which means that it no longer builds a dummy ship to find the necessary wares
Removed ship turret and shields finding code from md script as this is now done in the RecycleCostMenu lua script
Modified the station stocking code to use the less complicated array that RecycleCostMenu creates
Replaced the turret and shields stocking code with a simple loop that adds the drones, ammunition and cargo to the station from another array that RecycleCostMenu creates

Back to top
View user's profile Send private message
Reaperxvii





Joined: 29 May 2014
Posts: 328 on topic

Thank you for registering your game
PostPosted: Mon, 11. Jan 16, 02:04    Post subject: Reply with quote Print

So I tried a standard construction vessel and it let me bring up the menu (I didn't try it yet though)

but when I tried recycling a Heavy sul I got the same error as I posted on the steam workshop link :/

I don't know if it matters but the shipyard being used is a BTO line that builds behemoths (from black rains CWIR mod)

The script works fine on non player owned shipyards though Smile

**EDIT**

I just realized something, can you recycle a ship if it isn't constructed at that station?

I'm testing this theory now, waiting on a shipyard to build.

**EDIT 2**

The light sul didnt work, I just got these errors
Code:


[gamestart: 1] - [01/11/16 01:14:12]: Error: UI::ICom::PointOfInterestSink::IsMessageBlocked() - Invalid state. We tried to retrieve the representative component for a POI which has been removed already. Fallback to not blocking the message.

[gamestart: 1] - [01/11/16 01:15:08]: Error: shiprecycle_menu_cost Recycling - Light Sul

[gamestart: 1] - [01/11/16 01:15:08]: Error: Error while executing onEvent script for event: showShipRecycle_CostMenu.
Errormessage: [string "extensions/shiprecycle/ui/shiprecycle/shiprec..."]:216: attempt to compare nil with number


Could a mod I have running cause these errors? I have quite a few on including the fighters mod which makes fighters able to dock at carriers, going to try a regular rahana now

**EDIT 3**

Sorry for the spams of editing haha, but I got the same error :/
Code:
[gamestart: 2] - [01/11/16 01:24:58]: Error: shiprecycle_menu_cost Recycling - Rahanas (Container)



_________________
"We are the middle children of History. Born too late to explore the earth, born to early to explore the stars."

"Time is the fire in which we burn"

Reaper's Mod Index
Back to top
View user's profile Send private message
jth



MEDALMEDAL

Joined: 04 Jan 2006
Posts: 295 on topic
Location: England
Thank you for registering your game
modified
PostPosted: Mon, 11. Jan 16, 14:27    Post subject: Reply with quote Print

Thanks for posting over here.

As far as recycling is concerned if it fits in the dock then it should recycle and it will tell you if it doesn't fit and won't let you select it.

I did most of my testing in an NPC shipyard in Darned Hot Air just because it was there and had L and XL docks then tried a few ships through one of mine and they all worked.

They were standard ships though Rahamas, Titurel, CV, Taranis

I was more concerned with whether it did the drones, wares and weapons and even then that took a horrendous amount of time

The shipyard should not matter at all although I did find a few things with player shipyards that did not work at the same speed (much slower)

It shouldn't matter where they were built the recycling shipyard just has to understand them .......

My guess is that some piece of data is not coming back which is upsetting the gui if I can work out what it is then I may be able to compensate

Things like

Error: shiprecycle_menu_cost Recycling - Light Sul

actually are not errors it just that the lua command to log stuff sticks "Error:" on the front

DebugError("shiprecycle_menu_cost Recycling - " .. GetComponentData(menu.recycledship, "name"))

From what you are saying it sounds like a bigger problem

The big problem with this stuff is reproducing the fault so I have something that I can debug

Do you have a save game that I could have ? a dropbox link would be ideal you can PM it to me

Otherwise I think that I may have some more save games somewhere with a larger player shipyard

jth
EDIT Might have spotted something

Is your player shipyard essentially empty of wares ?

EDIT2 Found it - happens if the station has zero food or energy which would be true for a brand new player station

EDIT3 Did test if the player shipyard didn't have enough of the two wares but not if it had none at all. Oops Sad

Fixed - v0.05 released on Nexus and Steam



Last edited by jth on Mon, 11. Jan 16, 17:01; edited 5 times in total
Back to top
View user's profile Send private message
jth



MEDALMEDAL

Joined: 04 Jan 2006
Posts: 295 on topic
Location: England
Thank you for registering your game
PostPosted: Mon, 11. Jan 16, 16:27    Post subject: Reply with quote Print

- [11.1.2016 - V0.05 Public Beta]
shiprecycle_menu_cost gui - Fixed failure to recycle any ships when there was zero energycells or foodrations on the shipyard which will happen with a brand new player shipyard

Back to top
View user's profile Send private message
Reaperxvii





Joined: 29 May 2014
Posts: 328 on topic

Thank you for registering your game
PostPosted: Mon, 11. Jan 16, 20:14    Post subject: Reply with quote Print

Worked Like a charm, thanks! I never though about it being completely empty as a factor Embarassed


_________________
"We are the middle children of History. Born too late to explore the earth, born to early to explore the stars."

"Time is the fire in which we burn"

Reaper's Mod Index
Back to top
View user's profile Send private message
Aranov





Joined: 03 Jun 2013
Posts: 29 on topic

Thank you for registering your game
PostPosted: Wed, 3. Feb 16, 20:38    Post subject: Reply with quote Print

Quick question, is this compatible with 4.0 Beta 7?
I'm not getting the option the recycle a ship at any shipyard.

I've tried disabling all my mods but that didn't help, so unless something is baked in my save, i can only see Beta 7 or the Player Shipyard mod itself as the culprit.

Back to top
View user's profile Send private message
jth



MEDALMEDAL

Joined: 04 Jan 2006
Posts: 295 on topic
Location: England
Thank you for registering your game
PostPosted: Wed, 3. Feb 16, 21:42    Post subject: Reply with quote Print

Aranov wrote:
Quick question, is this compatible with 4.0 Beta 7?
I'm not getting the option the recycle a ship at any shipyard.

I've tried disabling all my mods but that didn't help, so unless something is baked in my save, i can only see Beta 7 or the Player Shipyard mod itself as the culprit.


I have just tried it with 4.00 Beta 7 and the option appeared and it managed to recycle a Rahanas OK at the RoC BTO shipyard at Darn Hot Air so I am going to provisionally say it works. FYI My version is not from Steam.

Anything useful in the debug.log ?

Egosoft are releasing so many Beta versions that I can't test everything against every one of them. I tested everything against 4.00 beta 3 and am only testing the mods that I am working on against the newest beta

I just hope that I get enough notice to have one quick go with everything at their final Beta before 4.00 gets released.

Regards

jth
PS What I have found with Beta 5 is that if you have anything in the extensions\md folder from a previous beta then it can do nasty things

Back to top
View user's profile Send private message
Aranov





Joined: 03 Jun 2013
Posts: 29 on topic

Thank you for registering your game
PostPosted: Wed, 3. Feb 16, 23:37    Post subject: Reply with quote Print

Ok false alarm, problem was between chair and keyboard.

Somehow updates for this mod and player shipyards were disabled in the extensions menu, so my version from the workshop was horribly out of date.

Back to top
View user's profile Send private message
jth



MEDALMEDAL

Joined: 04 Jan 2006
Posts: 295 on topic
Location: England
Thank you for registering your game
PostPosted: Thu, 4. Feb 16, 01:14    Post subject: Reply with quote Print

Aranov wrote:
Ok false alarm, problem was between chair and keyboard.

Somehow updates for this mod and player shipyards were disabled in the extensions menu, so my version from the workshop was horribly out of date.

At least you are going now and I can say that it works with 4.00 Beta 7

Please let me know what you think of the new GUI, it was a lot of work and nobody has said a thing about how nice it is Smile

jth

Back to top
View user's profile Send private message
Aranov





Joined: 03 Jun 2013
Posts: 29 on topic

Thank you for registering your game
PostPosted: Fri, 5. Feb 16, 04:22    Post subject: Reply with quote Print

Well the new UI seems flawless.
Quick and easy to use, and perfectly integrated in to the existing UI.

Seriously fantastic mod, makes playing a pirate so much more fun.

Back to top
View user's profile Send private message
jth



MEDALMEDAL

Joined: 04 Jan 2006
Posts: 295 on topic
Location: England
Thank you for registering your game
modified
PostPosted: Sun, 14. Feb 16, 14:02    Post subject: Reply with quote Print

[OCN] Mandrid on Steam wrote:
I think this is a great idea to restock materials into shipyards. But it makes no sense that you can sell a ship for say 10 million, or recycle it for 15 million plus giving the materials to the station.

If anything, if selling gives you 10 million, then recycling should only get you 50-75% of the ship's value. Not 150%. Because now there's no reason to ever sell a ship the vanilla way.


The reason for the discrepancy is that the selling price pays half for the cargo and nothing for drones and missiles and the latest version of Ship Recycle uses the shipyard to do nominal for cargo if its usable by the shipyard or 1/2 if not + nominal price for drones and missiles. Its surprising how much drones and missiles are worth.

Without the ship recycling I think that ES were hoping that you would work this out and empty the ship before selling it at which point you should get a similar amount of money. Note that if you sell drones and missiles at a shipyard then it pays you 100%. EDIT actually it doesn't see below

It would obviously take you a lot longer which is fine for a few times but I found it a pain after that.

The material recovery was put in for the pirate scenario although I felt that NPC shipyards should be able to do this too as it made the game economy a touch more realistic.

I may have been too generous with my prices on usable wares, I will think about it.

However I do feel that shipyards are the ideal place to efficiently recycle and the actual value and quantity of the wares that you get is not as high as you might think which is why you get 100% of the building wares. It does charge you the energy and food costs of doing it.

Maybe I ought to charge a convenience tax on drones and missiles for saving the player time and effort .... Smile

jth

EDIT 24 Feb

I have revisited the sums and you are right they are dodgy as of v0.04 Sad

Managed to loose the tracking of what shipbuilders pay to buy back ships (80%), drones (85%) and ammunition (90%)
Have also done a 90% recycling factor, shipyards should be better at it than construction vessels but they shouldn't be perfect
Also did the handling charge for busy players

Sums should be about right now.

My feelings on payment is that if you sell to an NPC shipdealer then you should be paid about the same amount and then the shipdealer should be allowed to break up the ship and get 90% of the wares back.

For player shipyards you don't get paid but do break up the ship and get 90% of the wares back. You don't pay the handling fee as you own the shipyard.

Have fixed them in v0.06

Apply a 90% recycling factor to ship hull wares
Rebalance prices to track what shipbuilders pay to buy back ships (80%), drones (85%) and ammunition (90%)
Add an extra 10% handling charge to wares that could be sold to the station by the player before the ship is recycled. As the Teladi say "time is money".



Last edited by jth on Wed, 24. Feb 16, 18:48; edited 4 times in total
Back to top
View user's profile Send private message
jth



MEDALMEDAL

Joined: 04 Jan 2006
Posts: 295 on topic
Location: England
Thank you for registering your game
PostPosted: Wed, 24. Feb 16, 18:22    Post subject: Reply with quote Print

- [24.2.2016 - V0.06 Public Beta]

shiprecycle_menu_cost gui - Add remote logging via md script to remove false positive Error messages, caused by DebugError logging commands, in debug.log that were actually informational
shiprecycle_menu_cost gui - Compensate for parameter changes to Encyclopaedia API in 4.00 RC2 to prevent Encyclopaedia buttons crashing the GUI
shiprecycle_menu_cost gui - Apply a 90% recycling factor to ship hull wares
shiprecycle_menu_cost gui - Rebalance prices to track what shipbuilders pay to buy back ships (80%), drones (85%) and ammunition (90%)
shiprecycle_menu_cost gui - Add an extra 10% handling charge to wares that could be sold to the station by the player before the ship is recycled. As the Teladi say "time is money".
shiprecycle_menu_cost gui - Changed API call used for calculating free space to take into account the available space for the ware instead of total available space
shiprecycle_menu_cost gui - Fix issue with calculating refund when recycling where there is no storage space for a specific ware. Now correctly refunds 50%
shiprecycle_menu_cost gui - Adjusted on screen messages a litle for when ware doesn't all fit into shipyard storage
shiprecycle_menu_cost gui - Suppress Drone section when there are no drones

Back to top
View user's profile Send private message
eMYNOCK



MEDALMEDALMEDAL

Joined: 21 Aug 2003
Posts: 1779 on topic
Location: DeVries - Molten Archon
Thank you for registering your game
modified
PostPosted: Tue, 15. Mar 16, 19:38    Post subject: Reply with quote Print

Cheers jth,

i am not longer able to use your Ship Recycle and any Player Shipyard Mod (based on BlackRains Mod) together.

It still works with the slightly outdated Player Shipyards Mod but not with his Updated Ship Dealers from CWIR.

Would be sweet if both were working together again.

Regards

edit:

me self @ steam wrote:

...
Because the only file that both Mods share is the NPC_Shiptrader... and me not knowing how to match both Mods User Interface...
...


Well, we are here now and hoping for Support Very Happy


_________________
For my Steam Workshop, klick below:

MynoCorp. Technologies Präsentiert:X³TC/AP Cockpit Callback Mod
X Rebirth: More Fuel


Last edited by eMYNOCK on Tue, 15. Mar 16, 23:59; edited 2 times in total
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic Reply to topic Goto page Previous  1, 2, 3, 4, 5, 6  Next
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Control Panel
Login Data
The time now is Fri, 22. Jun 18, 22:40

All times are GMT + 2 Hours

[ Disclaimer / Impressum ] | [ Privacy Policy / Datenschutz ]

Board Security

Copyright © EGOSOFT 1989-2018
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.11941 seconds, sql queries = 29