Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: headdie on October 21, 2015, 01:54:29 am

Title: [Request] $Power_Output: Enabled
Post by: headdie on October 21, 2015, 01:54:29 am
Quote from: http://www.hard-light.net/wiki/index.php/Ships.tbl#.24Power_Output:
Actually does *NOTHING* unless set to zero; in which case weapon/shield/burner energy regeneration is disabled. Checked via code inspection 2014/12/29

Is there a chance that a flag can be created to enable this to have an effect on power management?
Title: Re: [Request] $Power_Output: Enabled
Post by: AdmiralRalwood on October 21, 2015, 01:59:27 am
What effect would you want it to have, exactly?
Title: Re: [Request] $Power_Output: Enabled
Post by: headdie on October 21, 2015, 02:56:35 am
So that Recharge values are based on available Power per second rather than as a percentage of the total value of the sub system as exists with the current system regen rate system
Title: Re: [Request] $Power_Output: Enabled
Post by: Cyborg17 on October 21, 2015, 05:59:05 am
I think I would actually want this, too.  Assuming I ever get programming off the ground again, I could work on it if no one else wants to.  Are there any options which currently make power generation independent of difficulty setting? 
Title: Re: [Request] $Power_Output: Enabled
Post by: z64555 on October 21, 2015, 11:00:17 am
Eh, probably would require a significant amount of finagling. Could you elaborate on what you are envisioning?

FringeSpace is interested in this, since Tachyon's system had it so that your engines produced a certain amount of power and power flow to the shield and weapon subsystems was set at a specific rate. Once those subsystems were full in capacity, the power flow to them was shut off, thereby giving the engines more juice.

Title: Re: [Request] $Power_Output: Enabled
Post by: headdie on October 21, 2015, 11:36:32 am
The way I envisioned it

A Power Output of 30 units per second
on a balanced ELS would mean 10 units per system per second
on a 40% 30% 30% ELS distribution would look like 12 9 9 units per second
 in the latter case:
 - 12 units per second would go into the weapons pool taking 10 seconds to charge a 120 unit weapon energy from empty

Engine overclock would probably be untouched
Title: Re: [Request] $Power_Output: Enabled
Post by: Cyborg17 on October 21, 2015, 12:02:06 pm
With that system, the problem could be not with the rate but with the capacity of the systems.  Weapon capacity could be wildly different from Shield and Afterburner capacities, and so one system could be severely over or under powered.

Maybe instead have a system where an alternate rate is defined for each:

Code: [Select]
$Alternate Power Output Enable: Yes [Defaults to No]
+Alternate Engine Recharge Rate: 10
+Alternate Weapon Recharge Rate: 15
+Alternate Shield Recharge Rate: 45

Then the recharge rate is adjusted by percentage for each system.  So:

ETS
40% 40% 20%  Would come out to
12 18 27 

(Round(Base Rate * 3 * New Percentage))
Title: Re: [Request] $Power_Output: Enabled
Post by: headdie on October 21, 2015, 12:21:53 pm
I don't see a problem with an effect modifier to compensate for differing scales
Title: Re: [Request] $Power_Output: Enabled
Post by: z64555 on October 21, 2015, 12:28:14 pm
That, sounds like needless complexity, Cyborg, since FSO's current system allows for fine tuning of the recharge rates.

@headdie
Whats the goal with adding a power output figure? Maybe be able to do something like powerups / leech weapons that affect whole-system power?
Title: Re: [Request] $Power_Output: Enabled
Post by: headdie on October 21, 2015, 12:53:57 pm
My main goal is to simulate the ships power systems as my brain works better with those sort of hard numbers than percentages., especially when it comes to working out balances like drain and charge
Title: Re: [Request] $Power_Output: Enabled
Post by: z64555 on October 21, 2015, 02:55:10 pm
Ok, so in which case something like Cyborg's suggestion would work better, then:

Code: [Select]
$Use_Power_Units: Yes  ;; Instead of parsing the following as %, parse as units

$Shield Regeneration Rate:     100 ;; in units
$Support Shield Repair Rate:   200 ;; in units
$Weapon Regeneration Rate:      50 ;; in units