Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
LawsonThompson

Registered:
Posts: 625
Reply with quote  #1 
I'd like to deploy my convention bridge with a default set of engineering presets, and then reset them between missions. Has anyone had any experience in some means to do this, short of exiting and relaunching the game?

I'm going to try setting the engineering .dat file to read-only; maybe it gets read at mission launch, permits modifications during the game, then just doesn't write the changes...


__________________
----
Visit us at http://www.ltebridge.com
LawsonThompson

Registered:
Posts: 625
Reply with quote  #2 
In testing thus far, it appears the Engineering presets are read during server connection, held in memory so long as a connection is up, then written on a server disconnect. When I set the engineering preset file to read-only, it silently failed to write changes.

Seems that you don't have to completely exit: just disconnect from the server and immediately reconnect to get the presets read off disk again.

The reason for this question initially: dodgy touchscreen usage caused players to accidentally trigger the "STORE" button and clobbered a preset or two mid-mission. Grr! Maybe the Store button could be moved elsewhere?

__________________
----
Visit us at http://www.ltebridge.com
ryleyra

Registered:
Posts: 3,008
Reply with quote  #3 
I always keep a backup copy of my presets for just this reason. A simple batch file, which sets the file to read only to protect it, and sets it to read/write if you want to edit presets might be a useful tool.

I can see wanting to keep the Store function readily available where most people can easily use it. But maybe Thom could add a configuration switch to the artemis.ini file? If the switch is set, the Store button is not shown, and presets can't be edited.

I can see someone wanting to create a temporary preset, though. Maybe there could be a switch which allows preset editing, but doesn't save them. And a reset button that will restore the saved presets.
LawsonThompson

Registered:
Posts: 625
Reply with quote  #4 
AutoHotKey to the rescue! I've written an Engineering preset resetter.

Video here:



This assumes you have 1280x800 resolution (what my laptops have); all "distances" are in variables near the top of the script and should be easily adjusted to match other resolutions as necessary. Hit Alt-E to fire the script. I tried to write this to be as re-useful as possible. Share and enjoy!

Use: 
  • Adjust pixel locations at the top of the script.
  • Use the SetSystemSlider function as follows:


SetSystemSlider(slider_number,power_percentage,coolant_pips)


And profit!



SendMode Event
SetMouseDelay 10, 10
CoordMode Mouse, Client
; Engineering hotkey programming for 1280x800 resolution.
; Adjust the variables below for other resolutions.
; These are 1280x800.
SliderDistanceX := 157
PowerSliderBaseX := 48
PowerSliderBaseY := 780 
PowerSliderMidY := 694
PowerSliderPixelRange := 258 
PowerPercentageRatio := PowerSliderPixelRange / 300
CoolantSliderBaseX := 96
CoolantSliderBaseY := 780
CoolantSliderDistanceY := 25
#IfWinActive, Game Window
; Alt-e in game
!e::
{
  ; Wait until the Alt key is up.
  KeyWait Alt
  MouseGetPos ReturnX, ReturnY 
  
  ; Preset 1: Beam combat, front shields.
  ; Leave one pip of coolant for Manu and Impl cooling as needed.
  NormalizeSettings()
  SetSystemSlider(1,200,4)
  SetSystemSlider(7,175,3)
  StorePreset(1)
  
  ; Preset 2: Torpedo combat, front shields.
  NormalizeSettings()
  SetSystemSlider(2,200,4)
  SetSystemSlider(7,175,4)
  StorePreset(2)
  
  ; Preset 3: Sensors to maximum.
  NormalizeSettings()
  SetSystemSlider(3,250,8)
  StorePreset(3)
  
  ; Preset 4: EVASIVE MANEUVERS, 10 seconds limit!
  NormalizeSettings()
  SetSystemSlider(4,300,2)
  SetSystemSlider(5,300,2)
  SetSystemSlider(7,300,2)
  SetSystemSlider(8,300,2)
  ; Dropping power out of weapons to let them cool.
  SetPowerSlider(1,35)
  SetPowerSlider(2,35)
  StorePreset(4)
  
  ; Preset 5: Getting into position with coolant to spare.
  NormalizeSettings()
  SetSystemSlider(4,150,2)
  SetSystemSlider(7,150,2)
  SetSystemSlider(8,150,2)
  StorePreset(5)
  
  ; Preset 6: Take Us Out! Warp and Maneuvering.
  NormalizeSettings()
  SetSystemSlider(4,180,4)
  SetSystemSlider(6,180,4)
  StorePreset(6)
    
  ; Preset 7: Emergency shield boost to 190%
  NormalizeSettings()
  SetSystemSlider(7,190,4)
  SetSystemSlider(8,190,4)
  StorePreset(7)
    
  ; Preset 8: Cooling weaps/shields.
  NormalizeSettings()
  SetCoolantSlider(1,2)
  SetCoolantSlider(2,2)
  SetCoolantSlider(7,2)
  SetCoolantSlider(8,2)
  StorePreset(8)
  
  ; Preset 9: All systems normal, cooling shared.
  NormalizeSettings()
  SetCoolantSlider(1,1)
  SetCoolantSlider(2,1)
  SetCoolantSlider(3,1)
  SetCoolantSlider(4,1)
  SetCoolantSlider(5,1)
  SetCoolantSlider(6,1)
  SetCoolantSlider(7,1)
  SetCoolantSlider(8,1)
  StorePreset(9)
  
  ; Preset 0: Emergency shutdown.
  NormalizeSettings()
  SetSystemSlider(1,0,1)
  SetSystemSlider(2,0,1)
  SetSystemSlider(3,100,1)
  SetSystemSlider(4,0,1)
  SetSystemSlider(5,0,1)
  SetSystemSlider(6,0,1)
  SetSystemSlider(7,0,1)
  SetSystemSlider(8,0,1)
  StorePreset(0)
  
  ; Put the mouse back and resume normal ops.
  NormalizeSettings()
  MouseMove ReturnX, ReturnY
}
NormalizeSettings()
{
  ; Just tap space twice to set power to 100% and reset coolant.
  Send {Space}
  Sleep 100
  Send {Space}
}
StorePreset(PreSel)
{
  ; Shift and the number of the preset to store.
  Sleep 100
  SendEvent {Shift Down}%PreSel%{Shift Up}
  Sleep 100
}
SetPowerSlider(SlideNo,PowerLevel)
{
  ; Move the mouse to the centerpoint, then click and drag to the level.
  ; Use some ratios to compute a fairly accurate midline.
  global PowerSliderBaseX, PowerSliderBaseY, PowerPercentageRatio, SliderDistanceX, PowerSliderMidY
  BlockInput On
  XPos := PowerSliderBaseX + ((SlideNo - 1) * SliderDistanceX)
  YPos := PowerSliderBaseY - (PowerPercentageRatio * PowerLevel)
  MouseMove XPos, PowerSliderMidY
  MouseClickDrag Left, XPos, PowerSliderMidY, XPos, YPos, 1
  BlockInput Off
}

SetCoolantSlider(SlideNo,Level)
{
  ; Move and click on the correct coolant level.
  global CoolantSliderBaseX, CoolantSliderBaseY, SliderDistanceX, CoolantSliderDistanceY
  XPos := CoolantSliderBaseX + ((SlideNo - 1) * SliderDistanceX)
  YPos := CoolantSliderBaseY - (CoolantSliderDistanceY * Level)
  BlockInput On
  MouseMove, XPos,YPos
  Click, %XPos%, %YPos%
  BlockInput Off
}
SetSystemSlider(SliderPicked, PowerLevel, CoolantPips)
{
  ; Pass in a slide, power percentage, and how many coolant pips you want.
  ; Call the 2 power and coolant functions separately. Just saves some typing.
  SetPowerSlider(SliderPicked,PowerLevel)
  SetCoolantSlider(SliderPicked, CoolantPips)
}


__________________
----
Visit us at http://www.ltebridge.com
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.