DB Recharger (use Ecells to recharge your weapons and shields)

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

furstukin
Posts: 179
Joined: Sat, 19. Nov 05, 21:36
x3

DB Recharger (use Ecells to recharge your weapons and shields)

Post by furstukin » Tue, 7. Jul 09, 02:09

Ok here it is my first ever real script that isn't just a tool to save me time in the game. I am looking for suggestions on improvements that can be made and to see if anyone has any problems using it.

Useage:
This is very simple. First you need Cycrow's Plugin Manager and his Hotkey Manager and the EMP mod pack. Then install the .spk with the plugin manager. Next add the hotkey in the controls menu. Then you need to buy the DB Recharger from a Split EQD (requires Split Family Friend). Then when flying hit your hotkey and if you have less than 80% shiled or weapon energy or both and the proper amount of ecells in your cargo bay (amount depends on the class of ship) then you will hear a mechanical sound and after a short delay (delay also depends on ship class) your computer will say "energy cells transfered" and you will instantly be given full weapon energy and shield strength.

If you don't have enough ecells the computer will say command rejected and a subtitle will pop up saying "Not enough energy cells available"

If you dont have the DB Recharger it will also say "command rejected" and disply a message telling you to buy it fro ma Split EQD.

Background:

The DB Recharger was developed by DB Enterprises after extensive research into universal energy conversion. The research was focused on taking any form of energy i.e. mechanical, kinetic, chemical, etc. and converting it instantly and with less than 5% energy loss to the desired energy form. They had many successes with very efficient energy conversions from one type to another, but researchers were unable to make a universal energy convertor. At best they could make one convertor for each energy source that could very efficiently (less than 2.3% energy lost) convert one type of energy into in other form, but it could not work in reverse. After 10 years and 37 billion credits DB Cooper (President and CEO of DB Enterprises pulled the plug on further research and decided to use the research data to make a commercial profit and try to recoop some of his losses. The result was an energy convertor that will take standard energy cells and covert that energy for instant use in a ships shield grid or weapons systems.

http://members.cox.net/dabloomquist/DB%20Recharger.spk

Please reply with suggestions or comments so I can make this better thank you.

*anyone can use or modify this script in anyway they want just please give due credit where deserved.

*UPDATE 9/4/10*

I finally got around to rehosting this file sorry for delay, but the economy has been rough on me...

http://members.cox.net/dabloomquist/DB%20Recharger.spk
Last edited by furstukin on Sun, 5. Sep 10, 03:45, edited 3 times in total.
Don't make me slap Ye!

Meltdown
Posts: 337
Joined: Wed, 6. Nov 02, 20:31

Post by Meltdown » Sun, 12. Jul 09, 16:14

The idea is interesting, but I think there should be no delay. A device like this is going to be used in emergency situations; a few seconds of delay can kill you.
Think Freelancer. Shield/hull repair via batteries/nanobots was instant, and heavens know it was a useful feature.
Eat, drink and be merry, for tomorrow you may die.

furstukin
Posts: 179
Joined: Sat, 19. Nov 05, 21:36
x3

Post by furstukin » Sun, 12. Jul 09, 20:56

I can easily remoce the delay I just found it more realistic to have one
Don't make me slap Ye!

someone else
Posts: 2972
Joined: Sun, 18. Jun 06, 13:37
x3tc

Post by someone else » Sun, 12. Jul 09, 22:55

Can you make 2 hotkeys? one for weapon energy and one for shields? I think that would be best to let player choose where to pour the power.

Maybe reducing the delay as much as possible.
Trade, Fight, Build, Think, Modify.
Ship Rebalance Mod
OOS Rebalance
Resized Aldrin Big Rock
SIDE/TOP/FRONT Ship Size Comparison
Remember young Padawan: money stolen can be, time cannot.

furstukin
Posts: 179
Joined: Sat, 19. Nov 05, 21:36
x3

Post by furstukin » Mon, 13. Jul 09, 01:26

yes that would be easy enough to do, but then you would be going through much more energy. As is the script already checks to see if either shield or weapon energy is low. If niether are low it will tell you comand rejected if only one is low it still runs and refills both, but if I get a a few requests to redo it with 2 hotkeys I certainly will.
Don't make me slap Ye!

DaveyP
Posts: 986
Joined: Mon, 7. Nov 05, 19:06
x3tc

Post by DaveyP » Fri, 24. Jul 09, 10:51

It's a fantastic idea, but, rather than be a case of "you've got enough energy to restore all or none", what if it restored shields/weapons by a specific % per ecell?

That way, if you didn't have enough energy to restore everything it could still be used.

furstukin
Posts: 179
Joined: Sat, 19. Nov 05, 21:36
x3

Post by furstukin » Fri, 24. Jul 09, 18:41

DaveyP wrote:It's a fantastic idea, but, rather than be a case of "you've got enough energy to restore all or none", what if it restored shields/weapons by a specific % per ecell?

That way, if you didn't have enough energy to restore everything it could still be used.
I may be able to wrok something like that out, but atm I am moving so my time is limited.
Don't make me slap Ye!

Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 8074
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp » Tue, 8. Sep 09, 14:08

Hi there,

Sounds nice but potentially a bit exploity...

Roughly how many times can this script be run on ship full of ecells, weapons and shields? Once or twice or 'loads'?

Good work!

Sparky

furstukin
Posts: 179
Joined: Sat, 19. Nov 05, 21:36
x3

Post by furstukin » Wed, 9. Sep 09, 19:09

Sparky Sparkycorp wrote:Hi there,

Sounds nice but potentially a bit exploity...

Roughly how many times can this script be run on ship full of ecells, weapons and shields? Once or twice or 'loads'?

Good work!

Sparky
I tried to keep it from being an exploit as much as possible so most ships have a considerable delay between activation time and the actual transfer of power. Also it takes enough ecells that most ships even fully loaded with ecells couldn't activate this more than 7 or 8 times with out completely exhausting their energy supply. Think of it as converting your cargo bay into fuel storage the way you did with the jumpdrive.
Don't make me slap Ye!

djrygar
Posts: 1841
Joined: Mon, 10. Aug 09, 02:09
x3ap

Post by djrygar » Fri, 11. Sep 09, 02:26

This way is still exploity IMHO.

BUT...

But I would LOVE it done this way:
Pressing hotkey enables BOOST for shield/weapon generator, so it's efficiency rises like 5 times or 10 times. Overheated generator breaks hull a bit (1% per use?). There should be small chance, that some equipment will break.

Actually, it could be like 10x of normal generator output for m5 ships, 8x for M4, 6x for M3, 4x M6, 3x for M7, and 2x for M1/M2/M0 (maybe different numbers, but you get the point), or maybe not considering ships, but shields (10x for 1MJ, 8x for 5MJ.. and so on)

This will ensure that Boreas (5x2GJ or so) in hands of player and 5000 ecells will not turn into idestructible fortress.
Increasing generator output also feels more natural.

Boost extension as required equipment. Price of Boost Extension in stations increased to Jumpdrive's price (100k or something). Boost extension should break after 10-40 boosts (that should be depend of energy cost of single usage of course and how you balance things), or it just break randomly.

edit:
on second tought - cost of engaging this boost, should be dependent of generator power (like rounded 1% of generator power = amount of ecells needed. - so cost will be about 2 ecells for buster, and 1400 for destroyer). This will also balance things - weaker generator - less cells needed)

someone else
Posts: 2972
Joined: Sun, 18. Jun 06, 13:37
x3tc

Post by someone else » Fri, 11. Sep 09, 03:05

djrygar wrote:This will ensure that Boreas (5x2GJ or so) in hands of player and 5000 ecells will not turn into idestructible fortress.
Increasing generator output also feels more natural.
not sure... but I think that a fully armed and shielded Boreas cannot have more than 1500 cells on board. :roll:
Trade, Fight, Build, Think, Modify.
Ship Rebalance Mod
OOS Rebalance
Resized Aldrin Big Rock
SIDE/TOP/FRONT Ship Size Comparison
Remember young Padawan: money stolen can be, time cannot.

djrygar
Posts: 1841
Joined: Mon, 10. Aug 09, 02:09
x3ap

Post by djrygar » Fri, 11. Sep 09, 19:19

yeah, but main point is to modify generator power for period of time (10-20 seconds), not 'magically' set shield to 100% (as this is illogical/unnatural)

Azalyn
Posts: 80
Joined: Sun, 7. Jun 09, 15:07
x3tc

Post by Azalyn » Mon, 7. Dec 09, 06:14

furstukin,

Can you re-upload your mod to a different file service, or re-upload to the existing one? The existing link seems to be broken and really want to get a hold of this mod. Being able to recharge my shields in the manner you've provided is exactly what I've been after (seems that all modders are fixated on recharging lasers only).
The surest way to make something easy to use, with few errors, is to make it impossible to do otherwise
- Donald Norman

mwyeoh
Posts: 10
Joined: Sun, 29. Aug 10, 06:40

Post by mwyeoh » Sun, 5. Sep 10, 13:55

Thanks for reuploading this script. I was trying to get a hold of it earlier but to no avail.

I agree with djrygar- a boost to shield generation rate/weapons recharge rate rather than an instantaneous restoration would work better. A few things I dont agree on though is: I dont think there should be any hull damage as equipment this advanced should operate with some sort of safety switch- so instead perhaps a time limit to the device (similar to the turbo boost in the bonus pack) and also I dont think the boost extension should be a requirement.

I would request separate hotkeys for shields and weapons though and perhaps the device automatically shutting off when shields/weapons reach 100%

Thanks for all your hard work furstukin, and hopefully you get settled in comfortably with your move (Ive been through a couple of moves so I know how much work they can be!)

furstukin
Posts: 179
Joined: Sat, 19. Nov 05, 21:36
x3

Post by furstukin » Tue, 7. Sep 10, 01:05

mwyeoh wrote:Thanks for reuploading this script. I was trying to get a hold of it earlier but to no avail.

I agree with djrygar- a boost to shield generation rate/weapons recharge rate rather than an instantaneous restoration would work better. A few things I dont agree on though is: I dont think there should be any hull damage as equipment this advanced should operate with some sort of safety switch- so instead perhaps a time limit to the device (similar to the turbo boost in the bonus pack) and also I dont think the boost extension should be a requirement.

I would request separate hotkeys for shields and weapons though and perhaps the device automatically shutting off when shields/weapons reach 100%

Thanks for all your hard work furstukin, and hopefully you get settled in comfortably with your move (Ive been through a couple of moves so I know how much work they can be!)
While I do understand the argument, from what I understand of the scripting limitations this would not be possible with out a modification of ship files. At least this is how it was in X3 reunion. Things like shield generators and cargo holds were hard coded so that they could not be modified using hte script editor. You could do it using Cycrow's awesome ship editor, but I am not skilled enough to do it, or I should say I do not have enough free time to learn to do it ... but if someone that knows how wants to take this little script and make it better please by all means go right ahead, just remember me when giving out the credits :)
Don't make me slap Ye!

mwyeoh
Posts: 10
Joined: Sun, 29. Aug 10, 06:40

Post by mwyeoh » Wed, 8. Sep 10, 06:37

I was looking around and found a similar script for X3R made by LV. Its called shield booster and is contained inside the following RAR file which is a collection of his old X3R files (The file is shield.boost1.1.rar)

http://code.google.com/p/x3tcscripts/do ... r&can=2&q=


Would there be a way to somehow implement this into X3TC? and perhaps alter it for weapons too??

I could try helping, but I havent done any scripting before so I dont really know where to start

furstukin
Posts: 179
Joined: Sat, 19. Nov 05, 21:36
x3

Post by furstukin » Wed, 8. Sep 10, 14:20

mwyeoh wrote:I was looking around and found a similar script for X3R made by LV. Its called shield booster and is contained inside the following RAR file which is a collection of his old X3R files (The file is shield.boost1.1.rar)

http://code.google.com/p/x3tcscripts/do ... r&can=2&q=


Would there be a way to somehow implement this into X3TC? and perhaps alter it for weapons too??

I could try helping, but I havent done any scripting before so I dont really know where to start
Well I will look at the scripts and see how they work to determine if they are adaptable, but I will also need to check and see if LV ever gave permission for some one else to modify or borrow his/her work.
Don't make me slap Ye!

furstukin
Posts: 179
Joined: Sat, 19. Nov 05, 21:36
x3

Post by furstukin » Thu, 9. Sep 10, 02:03

Well bad news is LV's script is beyond me...Here is the key piece of LV's code that initiates the shield recharge boost

Code: Select all

044   $math = $maxshield / $am
045   
046   *$ship -> set current shield strength to 1
047   $current = $ship -> get current shield strength
048   
049   [THIS] -> set command: A_LV_SHIELDBOOST
050   set script command: A_LV_SHIELDBOOST
051   
052   = speak text: page=13 id=1320 priority=0
053   = speak text: page=13 id=1269 priority=0
054   $i = 0
055   $hottime = 0
But I have gone through all the script files included in the shield boost pack and I can not find the command A_LV_SHIELDBOOST in any of them... I am certainly no expert in this stuff but it seems to be referencing another script, one that I can't find. So from the commands available to me I can't see how LV is able to increase the recharge rate.

However I thought of a little compromise, I can possibly set it to check your ecells, then use say for an m5 fighter 1 ecell every 5 seconds to boost your shields and weapons by 20%. If I really get picky I could make it check both and use 1 ecell for shields and 1 for weapons as well if they are low... We will see I don't have allot of free time anymore but I will work on it
Don't make me slap Ye!

RATAK
Posts: 5
Joined: Wed, 11. Mar 09, 17:37
x3tc

Post by RATAK » Tue, 5. Oct 10, 14:51

Perhaps instead of changing the shield generator's rate, you can "simulate" the effect adding a certain amount of shield % every second. You can make a script that reads the actual shield level, consumes a certain amount of cells and rise the shields a bit (IE 1%), next second it repeats it again. It can do the same to weapons.

Phosphene
Posts: 57
Joined: Mon, 26. May 08, 07:23
x3tc

Post by Phosphene » Fri, 15. Apr 11, 23:41

I installed this but I don't see the ware in any Split equipment docks.
I have cycrow's plugin manager v1.310 (and the community and ware manager that comes with it), version 2 of the following EMP mod http://www.after-domination.net/phpbb3/ ... ?f=28&t=92, and Cycrow's hotkey manager installed (along with a variety of other mods scripts, if that seems important i will list them).

Anyway I'd really like to try this but it just isn't showing up in the EQ docks. Any ideas?

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”