EnglishGermanFrenchRussianItalianSpanish
Log inRegister
 
[SCR] Hotkey: Transfer Energy (To Shields, Weapons, Engines) v2
Post new topic Reply to topic Goto page 1, 2  Next
View previous topic :: View next topic
Author Message
s9ilent





Joined: 29 Jun 2005
Posts: 2009 on topic
Location: Galactic Sector ZZ9-Plural Z alpha +10 GMT
Thank you for registering your game
modified
PostPosted: Tue, 27. Jan 09, 04:47    Post subject: [SCR] Hotkey: Transfer Energy (To Shields, Weapons, Engines) v2 Reply with quote Print

A basic hotkey script, that switches your FIGHTER (only) between 4 modes.

energyto.zip

energyto.zip

Installation.
Unzip to your scripts folder
eg program files\egosoft\x3 terran conflict\scripts
eg program Files\Steam\SteamApps\common\x3 terran conflict\scripts





When you press the hotkey, It sends the following subtitles:
Power to Shields
Power to Weapons
Power to Engines
Power Balanced (Off)


  • It draws powers from the shields, weapons reserves and engines; and shunts it to one of them.
  • It draws 20% from two, and gives a 30% bonus to one (or it does nothing in the balanced case)
  • Now works on all ships (You still need to be flying it)
  • The fighter, needs to have shields
  • It idles when your dock (i.e Reverts back to the original settings). And then up to 10 seconds after you undock, it will turn back on again (to its last mode)
  • Changing modes makes your ship auto accelerate to full speed (design feature)

    CAUTION
  • Leaving energy transfer on for extended periods of time, can causes seriously system damage (temporary, albeit dangerous), causing the loss of energy and engines.




Last edited by s9ilent on Wed, 28. Jan 09, 11:52; edited 8 times in total
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Legionnaire





Joined: 08 Feb 2004
Posts: 1158 on topic
Location: M3 Cockpit
Thank you for registering your game
PostPosted: Tue, 27. Jan 09, 05:34    Post subject: Reply with quote Print

Actually this reminds me more of X-Wing and Tie Fighter than Freespace Lol
as for keys, i cant think of any immediately obvious ones, but 3 in a row together would make sense i believe Gazz created some scripts/libs? that enabled different actions on multiple presses of the same key,so that might let you cycle through settings, but seeing as ive never managed to get my head round scripting, i dont actually know if that might do what you need.

Legionnaire


_________________
Mobo MSI Z77A-G45 CPU i5 3570K@4.2
RAM 16Gb Corsair Vengeance 9-9-9-24
2x 1TB (RAID 0)+ 3TB HDD
Windows 7 Home Premium
4GB EVGA GTX 770 Classified ACX
Back to top
View user's profile Send private message
s9ilent





Joined: 29 Jun 2005
Posts: 2009 on topic
Location: Galactic Sector ZZ9-Plural Z alpha +10 GMT
Thank you for registering your game
PostPosted: Tue, 27. Jan 09, 05:43    Post subject: Reply with quote Print

Hrm.. his multiple clicker has some application here, but its not quite enough as there are essentially four modes.
(Engine, las, shield, balanced)

And forcing someone to quadruple click to do something is a little cruel.


Hrm.. I suppose f6-8 are currently unbound. Although I'm swinging more towards a single hotkey for cycling between the four modes. As the increments I can do are limited to essentially 1 engine tunning. (which is 10% of the base speed, not including other engine tunnings) but I want it to be a consistent increase across ships (I think?) so it will be a fixed increased/decreased (proportion) to all stats.


Hrm... potential problem.... There is no get laser energy recharge rate...

Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Axeface





Joined: 18 Nov 2005
Posts: 864 on topic
Location: Naos Nihal
Thank you for registering your game
PostPosted: Tue, 27. Jan 09, 10:20    Post subject: Reply with quote Print

Ok... awesome! DLing now.

A little bit of X-Wing Alliance for TC Smile Thanks.

Back to top
View user's profile Send private message
u24j7x5



MEDALMEDALMEDAL

Joined: 01 Sep 2005
Posts: 585 on topic

Thank you for registering your game
PostPosted: Tue, 27. Jan 09, 11:51    Post subject: Reply with quote Print

hi,

@s9ilent

the scripts 'lib.math.fixed.multi2' and 'lib.math.fixed.multi3' are missing in the zip, i guess.

greez

Back to top
View user's profile Send private message
s9ilent





Joined: 29 Jun 2005
Posts: 2009 on topic
Location: Galactic Sector ZZ9-Plural Z alpha +10 GMT
Thank you for registering your game
PostPosted: Tue, 27. Jan 09, 11:54    Post subject: Reply with quote Print

Hrm.. Whoops

Re uploaded with the maths libs

Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Hexenhammer





Joined: 10 Aug 2007
Posts: 124 on topic
Location: Avarice
Thank you for registering your game
PostPosted: Tue, 27. Jan 09, 17:45    Post subject: Re: [SCR] Hotkey: Transfer Energy (To Shields, Weapons, Engines) Reply with quote Print

s9ilent wrote:


  • It only works on fighters
  • The fighter, needs to have shields



please specifiy what you mean with 'fighters'. m3,4,5 only or can i use this script with my hyperion m6 also?


_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website
s9ilent





Joined: 29 Jun 2005
Posts: 2009 on topic
Location: Galactic Sector ZZ9-Plural Z alpha +10 GMT
Thank you for registering your game
PostPosted: Tue, 27. Jan 09, 22:23    Post subject: Reply with quote Print

Fighters is an object class used by X3. It specifically means M3-5 and possibly M8's.
A M6 is not a fighter

Back to top
View user's profile Send private message Visit poster's website MSN Messenger
LV
Sith Lord




Joined: 06 Nov 2002
Posts: 6359 on topic
Location: The Dark Side
Thank you for registering your game
PostPosted: Tue, 27. Jan 09, 22:47    Post subject: Reply with quote Print

a couple of things

1. a very good script

2. i don't like your docking procedure, i'd personally feel a short hotkey use of this may be better

3. It only works on fighters
why? a good idea should not wasted, why not have ts/tl ships sacrifice laser and shield power for a faster escape? (outrun a missile or a short quick engine tuning/and/or rudder increase?

4.Changing modes makes your ship auto accelerate to full speed (design feature)

why not also consider slower speed in combat as an idea?

5. Penalty (in my book: low chance of eqip/rudd/tun/etc breakage)

you should refine this one, it has muchos potential Thumb up


feel free to ignore me, you've written a good script even i'd consider installing as default with the correct balancing imo


_________________
LV's TC Scripts
Readme's For All My Scripts


I felt a great disturbance in the forum, Like millions of voices cried out in terror, then were silenced

si tacuisses, philosophus mansisses
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
s9ilent





Joined: 29 Jun 2005
Posts: 2009 on topic
Location: Galactic Sector ZZ9-Plural Z alpha +10 GMT
Thank you for registering your game
PostPosted: Tue, 27. Jan 09, 23:40    Post subject: Reply with quote Print

@LV (Wooo first moderator complimented script <3)

2. I have to put back a temporary "Power Balanced" mode when docking, as a player would sooner or latter notice.. hey I have 14/10 engine tunnings, and inevitable try to "upgrade" the ship, which will in fact put it back to 10 and "refund" those 4. The script does auto-restore the ship back to the amount its suppose to be at (charging the player.. oh DOH!!!... right... it doesn't charge the player yet... GRRR I haven't made that script yet... I just left a place holder...)
But yeh, in short, it reverts the ship to prevent tinkering. Then it un-re-reverts?? the ship 0 - 10123ms after its launched (!dockedat)

How would you have done the docking thing?


3, One of the main reasons I wanted to exclude capitol ships, is because there is no "get laser recharge rate" command. And right now the script just uses the shields change / 5 to approximate the correct amount to add to lasers. "/5" is aprox correct for fighters (with the M4+ and M3+ being weird, standing at about /4.5). But with capitol ships its just all over the shop. (2-4ish)
And I can't exactly build a self-generating library, as AFAIK laser energy is only for insector ships. (So it would be a very laggy & noisy, self generating library)
Leaching power from near-non existant weapon banks, I needed something to balance them to prevent continuous engine-maxing. (I see your point 5)
Ill considering opening this up to transport ships (TL's may need a library.. *sigh* a manually generated one...)

4) Speed Control. Originally the script kept your ships speed constant at xx% with the set speed command. However, I quickly realised that the set speed command is actually cheating, as it would instantly accelerate you.
(the code is still there, just commented out.. hrm... or I deleted it.. that too). So now I have the choice of, don't change speeds, full speed, or speed 0.
I had to pick one, so I figured pick the max. I could make two copies of the script, one with out the speed-max-er. OOOORRRRR, if speed is already max, then re-max, else nothing.


5. Hrmm.. Sad But I luv my ship.. What to break what to break... I know, I can break things with out breaking them!
a) Remove wares, insert "place holder" debris sort of wares, which will be restored in time,
b) Just remove wares (boom they exploded)
c) Random energy spikes, loss of shields/laser/engines sporadically set speed to 0
Which is/are your favourite(s)?
each tick, randomly generate a number between -10 -20(Mean 5) (Mean/second 25) Desired expected failure time, 60s? 25 * 60 150 0, 1500 is the burnout, does something "bad" to the boosted system, reverts count, disables power boost.


But Ill have to stick this to the "todo" list for now Oops SFM needs tweakage (again) and I've got work soon

Back to top
View user's profile Send private message Visit poster's website MSN Messenger
s9ilent





Joined: 29 Jun 2005
Posts: 2009 on topic
Location: Galactic Sector ZZ9-Plural Z alpha +10 GMT
Thank you for registering your game
PostPosted: Wed, 28. Jan 09, 12:06    Post subject: Reply with quote Print

Ok updated as per LV's suggestions.

Changes:

If your at 100% speed, it will keep you at 100% speed when your engines change, otherwise, it'll stay at the same level (number, not percent) its current at.

Works on all ships (it still gains /5 laser energy thou Oops I couldn't find an effective balancing solution for the /2 - /5 issue)

Keeping it on for extended periods of time can cause energy surges to your ship. Resulting in random loss of engines/shields/lasers. It will beep slowly when your at minor fluctuations, then beep madly, then beep madly and loudly, then your ship will short out and go funny. Shorting out will also cause energy transfers to turn off, and disable for the duration of the short.
Once the short is over, the system begins it's re-power up cycle, and when it says power balanced again, you can turn it on again.

Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Hexenhammer





Joined: 10 Aug 2007
Posts: 124 on topic
Location: Avarice
Thank you for registering your game
PostPosted: Wed, 28. Jan 09, 14:53    Post subject: Reply with quote Print

Really a useful script, I love it - and thanks for making it work with *all* vessels (esp. my Hyperion) Smile

I yet have some ideas for improvement:

1. 20 seconds until the first warning occurs seems a bit short, especially in bigger battles with many enemies. How about 30 second steps (30,30,15,15 until it shorts)?

2. +1 on more usable keys, like F5 - F8 or so!

3. It would be even cooler if the script gave an audio signal upon changing modes, like the computer saying "diverting power to the shields now, SIR" Wink

4. If possible, do some visual icons for the different modes which appear in the HUD when changing modes, so that the pilot can see which mode currently is activated.


Great script! Keep up the good work!


_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website
s9ilent





Joined: 29 Jun 2005
Posts: 2009 on topic
Location: Galactic Sector ZZ9-Plural Z alpha +10 GMT
Thank you for registering your game
PostPosted: Wed, 28. Jan 09, 22:46    Post subject: Reply with quote Print

1. The time between modes is slightly random. On average.. your ships should last about a minute. However... despite the fact its a neg bin dist with 300 iterations... the expected number rarely happens...
So Currently, the warnings are at 20s, 40s, 55s (alarm beeps) (On average)
How long would you recommend spacing out the warnings (given that it runs only for a minute)

2. What does the second key do?
I was considering useing Gazz's double click manager to do a "restore defaults"

3. Someone would have to record and upload the sound file. And it can't be me, as it would take a LONG time for me to upload a wav (and I lack the storage space). Plus I don't exactly have the most awesome recording setup (People complain on left for dead that they can never hear me Oops)

4. I made subtitles. Turn them on in your audio controls menu. As for a blip or something, AFAIK, the custom GUI doesn't work with X3TC (Well the gui is an external app so that always works, but the interface doesn't)
And short of creating a different coloured Sun (or blip) in the universe, my options are limited.

Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Hexenhammer





Joined: 10 Aug 2007
Posts: 124 on topic
Location: Avarice
Thank you for registering your game
PostPosted: Wed, 28. Jan 09, 23:39    Post subject: Reply with quote Print

Hi s9ilent,
thanks for the fast reply Smile

1. If it is that complicated to change the timer settings, just leave it as it is now. I only wanted to suggest that the whole "shorting out" thing be delayed a bit, e.g. 30s first warning, 60s second warning, 75s third warning, 85s short - or so.
In the range of only one minute, the 20s,40s,55s setting is ok!

2. I meant using different keys for different modes: F5 = power balanced, F6 = power shields, F7 = power engines, F8 = power weapons. That should be possible, isn't it? I don't know bout Gazz's manager so I can't say anything about it.

3. No no, it is possible to use the ingame text-to-speech engine to tell stuff I think. It's huefte's Space Loot Transporter script which made me think about it:
http://forum.egosoft.com/viewtopic.php?t=217169
Quote:
If an error occures, the reason will be told with audio-comments.

There are *no* .wav or .mp3 files whatsoever included here, only the scripts - and the computer tells you a lot of stuff when using this script; which was not so before (e.g. "target is out of range, it is impossible to transport" and such)!
Therefore it must be possible to include audio messages used by the game engine to tell the pilot exactly what just happens Smile

4. I have subtitles enabled and can read the "Power to Weapons" messages, but they don't stay on the HUD and in the midst of battle it would be nicer to just look at an icon or button which tells what mode is currently active, instead of pressing the plugin-button over and over again.
But this is not so important; the script is working fine.. only suggestions here Smile


_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website
adecoy





Joined: 24 Jan 2007
Posts: 203 on topic

Thank you for registering your game
PostPosted: Thu, 29. Jan 09, 02:38    Post subject: Reply with quote Print

is it possible to script in the pyramid from xwing/freespace, the one thats like this?



e
/.\
s w
shield engine weapons

and you could move the dot around with your mouse.


_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic Reply to topic Goto page 1, 2  Next
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Control Panel
Login Data
The time now is Wed, 13. Dec 17, 16:57

All times are GMT + 2 Hours


Board Security

Copyright © EGOSOFT 1989-2017
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.13398 seconds, sql queries = 29