[WIP] Modular Ships

Talk among developers, and propose and discuss general development planning/tackling/etc... feature in this forum.
Hicks
Bounty Hunter
Bounty Hunter
Posts: 153
Joined: Sat Oct 22, 2011 9:17 am

Re: [WIP] Modular Ships

Post by Hicks »

klauss wrote:
TBeholder wrote:
Hicks wrote:Is the speed you travel at in spec mode hardcoded? or is it possible to change it?
Config variable physics/warpMaxEfVel.
see also physics/warpMultiplierMin and physics/warpMultiplierMax.
Which are multiplied by values set per ship uin 'Warp_Min_Multiplier' and 'Warp_Max_Multiplier' columns in units.csv (they're omitted in the default table, but you can see them in saves as default =1).
Yea, but he's speaking of max multiplier per upgrade.

Tweaking per-ship multipliers would be worthwhile, but being able to upgrade your ship's SPEC speed is missing functionality AFAIK.
Got it working. Had to tweak the numbers in the physics section of the config and add the columns to the units.cvs, but you can change the spec speed. I had to change the standard SPEC speed to c, and then used multipliers to upgrade it, as i though that 93c was fast enough. Will look at doing upgrades for speed from 5-100c or something like that.

EDIT: Anyone know of variables that allow you to change the energy consumption of SPEC? doesn't seem to be one in the units.cvs
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: [WIP] Modular Ships

Post by klauss »

It should be a function of speed multiplier, I would imagine.
It might already be there on the engine, though I don't recall.

Hey, feel free to post the patch in SF's tracker when you're done :-)
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
TBeholder
Elite Venturer
Elite Venturer
Posts: 753
Joined: Sat Apr 15, 2006 2:40 am
Location: chthonic safety

Re: [WIP] Modular Ships

Post by TBeholder »

Units got Warp_Usage_Cost, but it's used only in jumps, teleport-autopilot, shield bleeding and Unit::DecreaseWarpEnergy.
The latter, which when not jumping outsystem, decreases by time * Warp_Usage_Cost (unit) / physics/warpbleed (config) but is really used only for jumps and auto-refuel-on-dock. Not used in Unit::AddVelocity which handles SPEC (rampup, rampdown, warpMultiplier).

Edit: disregard, found it in main recharge function (below)
Last edited by TBeholder on Thu Nov 24, 2011 5:05 pm, edited 1 time in total.
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
travists
Expert Mercenary
Expert Mercenary
Posts: 893
Joined: Thu Jul 08, 2010 11:43 pm
Location: Sol III North American Continent

Re: [WIP] Modular Ships

Post by travists »

If that is indeed the case, than SPEC energy usage needs to be (re?)implemented. One less useless (SPEC caps > 1 or 2) upgrade and another upgrade possibility (more efficient SPEC drives). While we are at it: Privateer knockoffs use fuel to jump, VS uses energy, specifically from the SPEC capacitors (shouldn't they then be FTL?), same with afterburners. Is this one a .config or a .csv changeable value? Might be nice to pick which way you want it.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: [WIP] Modular Ships

Post by klauss »

Privateer also uses energy. Only energy recharge is at 0, and only at landing you get it "refilled".
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
travists
Expert Mercenary
Expert Mercenary
Posts: 893
Joined: Thu Jul 08, 2010 11:43 pm
Location: Sol III North American Continent

Re: [WIP] Modular Ships

Post by travists »

That explains it.... :(
Hicks
Bounty Hunter
Bounty Hunter
Posts: 153
Joined: Sat Oct 22, 2011 9:17 am

Re: [WIP] Modular Ships

Post by Hicks »

Code: Select all

insysenergy*RSconverter*Wconv/warpbleed
. Need to be able to modify one of those to change fuel consumption. warpbleed is defined in config/physics, not idea where the rest are.

Going to have all ships with a built in system capable of 1c and you can purchase upgrades for faster systems
With regards to the upgrades, what values do people think are balanced? Was going to have an increasing fuel consumption for higher speed SPEC drives, so its either time or money. For example, 1000energy per lightsecond for the lowest, 1200energy per lightsecond for a medium system, etc. What should be the maximum speed? 100c or more? There can be issues with high speeds and overshooting the target.

(Does anyone know where the code is that does the calculations for SPEC travel? i might be able to derive some predictors to lessen the chances of evershoots at high speeds)

Edit: Do you think that warp cost should increase with ship weight/size? cost more to keep a battleship in spec then a light fighter? I might also try and make it so medium to high end systems will use more energy then reactors can supply, so you will need large SPEC capacitors if you want to do a large stretch at high speed.
travists
Expert Mercenary
Expert Mercenary
Posts: 893
Joined: Thu Jul 08, 2010 11:43 pm
Location: Sol III North American Continent

Re: [WIP] Modular Ships

Post by travists »

Larger size should require more energy, as it requires a larger bubble of distorted space. I think present normal max SPEC is around 270C, I arbatrarily upped mine to C^2 so my ships travel at shipmax*C, though they seldome cruse at that speed, or for long. I think .5C is better if it is a standard feature, but remember the best implimentation is to have most ships come pre-installed with certain systems such as thrusters, RCS, and life support so why not SPEC?
TBeholder
Elite Venturer
Elite Venturer
Posts: 753
Joined: Sat Apr 15, 2006 2:40 am
Location: chthonic safety

Re: [WIP] Modular Ships

Post by TBeholder »

Ah, found this. It's done along with recharge and shield maintainance in Unit::RegenShields() - src/cmd/unit_generic.cpp line 3989
  • bleed = insysenergy/bleedfactor*SIMULATION_ATOM
    warpenergy -= bleed
- same formula as in Unit::DecreaseWarpEnergy and showUnitStats, and if there's not enough, it turns off SPEC and falls into rampdown mode.
Hicks wrote:

Code: Select all

insysenergy*RSconverter*Wconv/warpbleed
. Need to be able to modify one of those to change fuel consumption. warpbleed is defined in config/physics, not idea where the rest are.
insysenergy = "Warp_Usage_Cost" in the table (see units_csv) and you quoted void showUnitStats in basecomputer.cpp, so... the rest are local placeholders.
Wconv = 1 / physics/warp_energy_multiplier @ line 4966 //converts from reactor to warp energy scales,
RSconverter = 100 @ line 4975 //100MJ per reactor or shield recharge energy unit.
I suppose we could make them physics variables, but this isn't a hot issue.
Hicks wrote: With regards to the upgrades, what values do people think are balanced? Was going to have an increasing fuel consumption for higher speed SPEC drives, so its either time or money. For example, 1000energy per lightsecond for the lowest, 1200energy per lightsecond for a medium system, etc.
It's power, but yeah, easy to set with mult_ upgrades that only change Warp_Usage_Cost and Warp_Max_Multiplier.
And separate capship devices. Maybe, pirate variety with Spec_Interdiction values?..
Hicks wrote: What should be the maximum speed? 100c or more? There can be issues with high speeds and overshooting the target.
If they have enough power. Heh-heh. Try current or a slightly better value?
Hicks wrote: Edit: Do you think that warp cost should increase with ship weight/size? cost more to keep a battleship in spec then a light fighter?
Probably, size^2 - size^3. Right now these costs are mostly placeholders (120), except most capships.
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
Hicks
Bounty Hunter
Bounty Hunter
Posts: 153
Joined: Sat Oct 22, 2011 9:17 am

Re: [WIP] Modular Ships

Post by Hicks »

Can't seem to change the power cost. Warp_Usage_Cost doesn't seem to change the values. Not sure why, its set up as a multi. We might need a value in the csv that is just for SPEC power consumption. One that can be set as the mass of the ship by default, then is increased by multiplying factors from SPEC upgrades.

At the moment, the mass for these upgrades will have to be 1, unless someone can think of a way to have mass added, while other vaules are multiplied
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: [WIP] Modular Ships

Post by klauss »

If you need a new CSV column, please file the feature request. I'll probably glance through that list during the weekend and pick the easiest ;-).
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
TBeholder
Elite Venturer
Elite Venturer
Posts: 753
Joined: Sat Apr 15, 2006 2:40 am
Location: chthonic safety

Re: [WIP] Modular Ships

Post by TBeholder »

Hicks wrote:Can't seem to change the power cost. Warp_Usage_Cost doesn't seem to change the values. Not sure why, its set up as a multi. We might need a value in the csv that is just for SPEC power consumption. One that can be set as the mass of the ship by default, then is increased by multiplying factors from SPEC upgrades.
Just looked Shizu.stock vs. Shizu.milspec (in table, Warp_Usage_Cost 120 vs. 50) on Rlaan base - basecomputer indicates 2000 vs 833 MJ/s. With warpbleed 50, [warp_energy_multiplier=0.12], it should be 50*( 100 / 0.12*50) = 833. This part seems to be fine.
We just need to add it into Unit::UpAndDownGrade (attached diff).
Hicks wrote:At the moment, the mass for these upgrades will have to be 1, unless someone can think of a way to have mass added, while other vaules are multiplied
One "add_X" upgrade with another "mult_X" attached - much like in milspec package. Only "add_X" appears as saleable in master parts list, but "mult_X" may be used as built-in in other sets - such as, again, milspec packages.
You do not have the required permissions to view the files attached to this post.
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
Hicks
Bounty Hunter
Bounty Hunter
Posts: 153
Joined: Sat Oct 22, 2011 9:17 am

Re: [WIP] Modular Ships

Post by Hicks »

Where can i get the latest copy of the source code, had a look on the wiki and the only code i found was the released version. And any objections to me changing the basecomputer to display accelerations in m/s instead of gravities, as it looks weird, and king of incorrect, as we don't have gravity in the game yet, and gravity is location dependent. ( This will proabably be all i can do in the way of coding, not my area of expertice.)

When i manage to get the power consumption working with the upgrades, i will send someone the files for testing. I won't add engines in to the files yet, just because of deciding how they will work exactly, whether they are upgrades, or are required for the ship to move at all.
TBeholder
Elite Venturer
Elite Venturer
Posts: 753
Joined: Sat Apr 15, 2006 2:40 am
Location: chthonic safety

Re: [WIP] Modular Ships

Post by TBeholder »

Hicks wrote:Where can i get the latest copy of the source code
SVN.
Hicks wrote: And any objections to me changing the basecomputer to display accelerations in m/s
Dimensional analysis.
Hicks wrote: instead of gravities, as it looks weird, and king of incorrect, as we don't have gravity in the game yet, and gravity is location dependent.
Still a common unit. :P Albeit non-humans and maybe some transhumans really shouldn't use g, so maybe we'll need a way to tweak this by the time PC of different species are allowed in VS or an active mod. Or unified handling in "scale:unit" format. After all, a developer of a mod by Lem could want derivatives of erg for flavour and other folk may use ancient Imperial units... with varied value of "Empire" at that. :wink:
Hicks wrote: I won't add engines in to the files yet, just because of deciding how they will work exactly, whether they are upgrades, or are required for the ship to move at all.
SPEC - does the patch above solve it?
Thrusters - consumption is supposed to be handled internally anyway, though there will be a good reason to bother with custom efficiency and exit velocity once we'll have propellants tracked properly.
Also, here's a separate thread for this particular headache. :wink:
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
Hicks
Bounty Hunter
Bounty Hunter
Posts: 153
Joined: Sat Oct 22, 2011 9:17 am

Re: [WIP] Modular Ships

Post by Hicks »

ok, i will admit i have no idea how to apply the patch and compile it, i am hoping that i can download it for the SVN version soon when it gets updated?
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: [WIP] Modular Ships

Post by pheonixstorm »

adding the patch to review board (if I can do it correctly so klauss can review it. Check out Review Board to see our new code review tool.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: [WIP] Modular Ships

Post by pheonixstorm »

Now posted on review board. klauss have you had a chance to look things over yet and make sure its setup correctly?
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: [WIP] Modular Ships

Post by klauss »

You should be getting a notification email right now.
(if you don't, something's borked in RB config)
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: [WIP] Modular Ships

Post by pheonixstorm »

No email yet, did comment though on what you put up.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
Hicks
Bounty Hunter
Bounty Hunter
Posts: 153
Joined: Sat Oct 22, 2011 9:17 am

Re: [WIP] Modular Ships

Post by Hicks »

ok, i downloaded the new file for the SVN version, and the warp factor seems to change with upgrades, but it only increases, couldn't get it to decrease with a .5 multiplier. SHould be fine though, i can work with it.

Was looking at formulas for energy consumption, was intiall thinking something along the line of mass*SPEC speed*Log natural (1+SPEC speed) in MJ/s. Running some calculations now to see the energy costs for various ships conpared to their base reactor and SPEC capacitors. I think some ships like the Ox and Leonidas might have some issues due to their weight (the Leonidas weighs 3*10^8, so the energy cost is roughly 1.38898E+11 MJ/s for 100c, and 208612004.9 for 1c) but they have plenty of space for upgrades. Going to ply around with it for a while and see what i can come up with. Might add a coefficient to reduce it a bit, depending on what you think of my bit below.

One other thing that i am noticing is that some upgrades don't really scale well. For example, a lvl1 reactor weighs 1 ton, and takes up 2 cubic meters for 1500MJ/s. The lvl15 weighs 24 tons, takes up 5050cubic meters for 14500MJ/s.
So for about 10 times the power, it weighs 24 times as much, and takes up 2525 times the room. It just seems a bit out of wack. If other agree i can go through and try an balance out a few of them. If a small fighter uses the lvl1 reactor, how many lvl15 reactors would a large battleship/carrier require?
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: [WIP] Modular Ships

Post by klauss »

Hicks wrote:One other thing that i am noticing is that some upgrades don't really scale well. For example, a lvl1 reactor weighs 1 ton, and takes up 2 cubic meters for 1500MJ/s. The lvl15 weighs 24 tons, takes up 5050cubic meters for 14500MJ/s.
So for about 10 times the power, it weighs 24 times as much, and takes up 2525 times the room. It just seems a bit out of wack. If other agree i can go through and try an balance out a few of them. If a small fighter uses the lvl1 reactor, how many lvl15 reactors would a large battleship/carrier require?
I would agree in principle, but notice that the repercusions do ripple throughout the game. It will be difficult to analyze and playtest that change (it would be up to you mostly, unless you get volunteers).
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: [WIP] Modular Ships

Post by pheonixstorm »

Forgot to post last night that the patch file has been applied and committed to my branch in svn. Once its been tested out and looks solid it will get into trunk :) Hope it works out the way its supposed to!
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
TBeholder
Elite Venturer
Elite Venturer
Posts: 753
Joined: Sat Apr 15, 2006 2:40 am
Location: chthonic safety

Re: [WIP] Modular Ships

Post by TBeholder »

Hicks wrote: One other thing that i am noticing is that some upgrades don't really scale well. For example, a lvl1 reactor weighs 1 ton, and takes up 2 cubic meters for 1500MJ/s. The lvl15 weighs 24 tons, takes up 5050cubic meters for 14500MJ/s.
So for about 10 times the power, it weighs 24 times as much, and takes up 2525 times the room. It just seems a bit out of wack. If other agree i can go through and try an balance out a few of them. If a small fighter uses the lvl1 reactor, how many lvl15 reactors would a large battleship/carrier require?
Yeah, mass vs. room is a bit messed up, probably after an incomplete overhaul. Though space growing faster to a lesser degree is okay if it's mostly a barrel full of near-vacuum, but with thick walls.
Another interesting question is multiple reactors - that is, why not to take 5x reactor05 instead? IMO it's supposed to be not a complete plug&play generator, but changeable parts.
Of course, feeding/power/coolant/whatever parts should differ in size too, but since big reactors simply don't fit on small ships, we could assume they're made for the biggest reactor a ship can carry. To make it explicit, we'd need several "Reactor Mounting" upgrades, in turn enabling upgrade slots for classes reactors. Probably, going not even in Upgrade space, but Equipment space.
Whether normally changeable or not, reactor slots can be different for some milspec versions.
And ships could have several, depending on their construction. E.g. Llama: 1 light reactor + 2 medium reactors.
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
Hicks
Bounty Hunter
Bounty Hunter
Posts: 153
Joined: Sat Oct 22, 2011 9:17 am

Re: [WIP] Modular Ships

Post by Hicks »

TBeholder wrote:Of course, feeding/power/coolant/whatever parts should differ in size too, but since big reactors simply don't fit on small ships, we could assume they're made for the biggest reactor a ship can carry. To make it explicit, we'd need several "Reactor Mounting" upgrades, in turn enabling upgrade slots for classes reactors. Probably, going not even in Upgrade space, but Equipment space.
Whether normally changeable or not, reactor slots can be different for some milspec versions.
And ships could have several, depending on their construction. E.g. Llama: 1 light reactor + 2 medium reactors.
This was the type of approach i was going for when i was trying to do the engines. It would be a good system, while it does limit the customisation of the ships (no more stacking full or reactors or something), it adds a bit more realism. See my first post where i mention hardpoints.

With regards to the reactors, i might try abd balance them out a bit, make the lvl 15 put out about 100,000, increase their weight and decrease their size, and scale everthing inbetween.
TBeholder
Elite Venturer
Elite Venturer
Posts: 753
Joined: Sat Apr 15, 2006 2:40 am
Location: chthonic safety

Re: [WIP] Modular Ships

Post by TBeholder »

Of course, this means multi-core rigging is possible, if impractical in most cases.
And there could be adapters allowing to use multiple lesser cores instead of one bigger. Probably less compact or powerful, but cheaper and somewhat more reliable
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
Post Reply