Consuming power

Freeform discussion about anything related to modding Transcendence.
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

Having talked a bit with Betel about this on the forums, how about adding an optional timer to itmSetPowerUsage (kind of like Betal suggested)

This would make the function:

Code: Select all

(itmSetPowerUsage itm power [duration])
// or perhaps, in case it only makes sense to set power usage on items on objects
(objSetItemPowerUsage spaceObject itm power [duration])
The idea as I see it is: Item has a base power usage that can be overridden permanently by a call to *SetPowerUsage without the duration set.
If the duration is specified, then the poweer value given will be in effect for that many "iterations" of power usage, after which it falls back to it's previous value (which in turn could have been set by the same function, but without a duration)
Multiple calls to this function overrides the previous value, so you would have to track up to three values: the item types power usage, and the current base power usage, and an optional temporary usage.

A getter function would return the current real use, not the types base use. If we want the base use we should query the type.

I think this would solve it for most purposes, although it might be a lot of work :)
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

maybe we could get itmSetPower and itmGetPower in a "close to the future" version and timed power events in a more distant future (as far as I can understand those are much more difficult to implement)

itmSetPower would resolve all my troubles with weapons, I can simulate dinamically changing weapons, link weapons to other weapon powers (alphastrike project).
With a bit more work we could even make a power management system, with panels where you can choose how much power to give at each device.
You have a 50MW shield and a too small reactor ? Run the shield at 20MW at reduced stats.

I already see an entire power management mod wwhere the player can adjust the power output of installed devices to suit all his needs. :D
Post Reply