Decoupling equipment from ship definitions

Post Reply
laarmen
Posts: 34
Joined: Fri Jul 05, 2013 8:49 am

Decoupling equipment from ship definitions

Post by laarmen »

Hi,

For those who don't know it, I've been involved since... forever in rewriting the equipment handling in Lua.

In this topic, I'll mainly ask if it some changes that I consider are acceptable to you.

For starters, as of now whenever you change ships you get an hyperdrive for free. This is hardcoded in the C++ core, and even in the ship def where the default hyperdrive is specified.

My proposal is to stop doing that, and provide bare metal ships. It previously made sense to always have an hyperdrive since there pretty much was no way to make money wihout interstellar travel, but the game has evolved a bit since, and intrastellar missions are available. (and of course it would make my life easier). What do you think?
robn
Posts: 302
Joined: Mon Jul 01, 2013 1:11 am
Location: Melbourne, Australia

Re: Decoupling equipment from ship definitions

Post by robn »

Yep, makes it more flexible. The ship market can provide that function if necessary; the equipment system itself shouldn't have to.
impaktor
Posts: 1029
Joined: Fri Dec 20, 2013 9:54 am
Location: Tellus
Contact:

Re: Decoupling equipment from ship definitions

Post by impaktor »

Sounds good.
FluffyFreak
Posts: 1344
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Decoupling equipment from ship definitions

Post by FluffyFreak »

From a gameplay/universe point of view this would be akin to providing a car without an engine, just because you can always free wheel it down the hill.
However I agree with the logical side decoupling and that it should be provided by the shipyard or another system.
laarmen
Posts: 34
Joined: Fri Jul 05, 2013 8:49 am

Re: Decoupling equipment from ship definitions

Post by laarmen »

Your car still has an engine, it is just not suitable to do a roadtrip around Europe.
impaktor
Posts: 1029
Joined: Fri Dec 20, 2013 9:54 am
Location: Tellus
Contact:

Re: Decoupling equipment from ship definitions

Post by impaktor »

But the change was just to stop C++ forcing an engine. I assue the ship market will add one on the Lua-side, if we want to.
laarmen
Posts: 34
Joined: Fri Jul 05, 2013 8:49 am

Re: Decoupling equipment from ship definitions

Post by laarmen »

I'll do that, and also change the defaultHyperdrive definition not to specify an EquipType anymore, but just an integer representative of the power of the default hyperdrive fitted on the ships. This allows for more hyperdrive implementations :-)
laarmen
Posts: 34
Joined: Fri Jul 05, 2013 8:49 am

Re: Decoupling equipment from ship definitions

Post by laarmen »

CALL FOR TESTS!

I *think* my new-equipment branch is closed to being ready. But to be sure of that, I need people to test it. So please go mad, explore the galaxy, create new equipments, do whatever you want to, and wait for the crashes to happen :-)

My money is on TradeShip.lua for the next bug reports ;-)

[edit]
It should be more effective with the URL to the MR:

https://github.com/pioneerspacesim/pioneer/pull/1719/
Post Reply