Lokes AutoHotKey tools for Ascent
17 posts
• Page 1 of 2 • 1, 2
Lokes AutoHotKey tools for Ascent
Lokes AutoHotkey tools
Download current version here:
The .exe file is ready to run, just download it and start it. Since its a .exe you will most likely get security warnings.
The .ahk file is for those who wants to read the code or have AutoHotKey installed
You need to have AutoHotKey installed, copy the code into for example notepad or any text editor and save the file as a .ahk and its ready to run. Make sure .ahk is not just added to the filename in a .txt file, but it actually saves as a .ahk file type.
If using notepad to save the code into a .ahk make sure you add .ahk to file name and you must change "Save as type:" to "All Files"
Its important that you put the file in the same folder as Ascent stores the cache files, should be: C:\Users\<YOURNAME>\AppData\LocalLow\Fluffy Kitten Studios\Ascent _ The Space Game
Features:
Menu buttons are placed out of the way in upper rigth of the screen:

OSB tool:

Mining yield calculator:

Remembers your inputs for skill, MB class etc.
Can calculate yield based on age in days or find age by inputing yield
Outputs a lot of yield info:

Shindis charting tool:

It remembers what you input last for system and automaticly suggests todays date. Saves a lot of typing, and can be edited before saving.
The tool creates a .csv with coloumn description in first row. Saves in same folder as this script is stored
Logging tool for asteroid fields:

It remembers what you input last for system and automaticly suggests todays date. Saves a lot of typing, and can be edited before saving.
1 click asteroid types and number of proms.
The tool creates a .csv with coloumn description in first row. Saves in same folder as this script is stored
Stock Market deleter:
A tool to send many delsell and delbuy commands to SM. Similar GUI as the other tools
Hotkeys:
A list of hotkeys
Esc will immediately close it completely
Download current version here:
- Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
MB := 10
Age := 0
Skill := 0
Miner := 0
Yield2 := 0
Sifi2 := 1
Spawndate := 20190714
guixpos := A_screenwidth - 560
b := 0
s := 0
If not FileExist("Asteroid log.csv") {
FileAppend, Username`,Sector`,Number`,Full system name`,Date`,Col`,Ang`,Ure`,Chron`,Sid`,Kam`,Aut`,Auro`,Neuro`,Cyan`,Bast`,Prom`,Spawn`,Comment`n, Asteroid log.csv
}
If not FileExist("chart.csv") {
FileAppend, Username`,Sector`,Number`,Full system name`,Date`,Type`,Object #`,Aluminium`,Carbon`,Iron`,Silicon`,Titanium`,Geo`,Grain`,Fruit`,Vegetables`,Meat`,Tobacco`,Gems`,Atmosphere`,H2O`,CH4`,NH3`,N`,O2`,CO2`,Pressure`,Temp`,Gravity`,Ocean`,Tritium`,Notes`n, chart.csv
}
If FileExist("AHK_tools_config.csv") {
FileRead, Contents, AHK_tools_config.csv
if not ErrorLevel ; Successfully loaded.
list := StrSplit(Contents, ",")
Skill := list[1]
MB := list[2]
Miner := list[3]
Sifi2 := list[4]
Roidtype := list[5]
Spawndate := list[6]
Age := list[7]
Yield2 := list[8]
Who := list[9]
Sector := list[10]
Number := list[11]
FileDelete, AHK_tools_config.csv
Sleep 100
FileAppend,%Skill%`,%MB%`,%Miner%`,%Sifi2%`,%Roidtype%`,%Spawndate%`,%Age%`,%Yield2%`,%Who%`,%Sector%`,%Number%, AHK_tools_config.csv
}
Gui, +AlwaysOnTop -Caption
Gui, Color, 000000
Gui, Add, Button,, Chart
Gui, Add, Button, X+10, Log
Gui, Add, Button, X+10, Calc
Gui, Add, Button, X+10, OSB
Gui, Add, Button, X+10, More
Gui, Add, Button, X+10, LM
Gui, Add, Button, X+10, X
Gui, Show, X%guixpos% Y25, AHK_tools
return ; End of auto-execute section. The script is idle until the user does something.
ButtonCalc:
^!c:: ; ctrl + Alt + c runs yield calculator
Gui, New, +AlwaysOnTop
Gui, Add, Text,, Skill:
Gui, Add, Text,, MB class:
Gui, Add, Text,, Miner trait:
Gui, Add, Text,,Silicon filter?
Gui, Add, Text,, Asteroid:
;Gui, Add, Text,, Age in days:
Gui, Add, Edit, vSkill w50 ym,%Skill%
Gui, Add, Edit, vMB w50, %MB%
Gui, Add, Edit, vMiner w50, %Miner%
Gui, Add, DropDownList, vSifi Choose%Sifi2% w50, No|Yes
Gui, Add, DropDownList, vRoidtype, %Roidtype%||Colombite|Angrite|Promethicite|Bastnaesite|Autunite|Urelite|Chrondite|Aurostibite|Cyanite|Kamacite|Siderolite
;Gui, Add, Text,x+15, or yield:
Gui, Add, Text,xs,
Gui, Add, Text,xs,Fill in one of the fields below and click the button next to it:
Gui, Add, Text,xs+20,Date format: YYYYMMDD
Gui, Add, Text,xs,Spawn date:
Gui, Add, Edit, vSpawndate x+17 w80,%Spawndate%
Gui, Add, Button, default x+10, CalcYield
Gui, Add, Text,xs,Age in days:
Gui, Add, Edit, vAge x+19 w80,%Age%
Gui, Add, Button, default x+10, CalcYield2
Gui, Add, Text,xs,Yield in tonnes:
Gui, Add, Edit, vYield2 x+5 w80,%Yield2%
Gui, Add, Button, default x+10, CalcAge
Gui, Add, Text,xs,
;Gui, Add, Button, default x+50, CalcAge
Gui, Add, Text,xs,
Gui, Add, Button, default x+160, CloseCalc
Gui, Show,, Mining yield calculator
return
;LogCalcYield:
ButtonCalcYield:
Gui, Submit, NoHide
Today := A_YYYY A_MM A_DD
EnvSub, Today, %Spawndate%, days
Age := Today
Goto, Miningyield
Return
ButtonCalcYield2:
Gui, Submit, NoHide
Today := A_YYYY A_MM A_DD
EnvAdd, Today, -Age, days
FormatTime, Spawndate, %Today%,yyyyMMdd
Miningyield:
If (Sifi = "Yes") {
Sifi2 := 2
}
Else {
Sifi2 := 1
}
If (Roidtype = "Colombite") {
Yield := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 4 * (1 + 0.05 * Miner))
Si := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 60 * (1 + 0.05 * Miner))
If (Sifi = "Yes") {
Si := 0
}
Fe := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 4 * (1 + 0.05 * Miner))
Total := Round(Yield + Fe + Si)
daily := Round((1 + (Skill / (Skill + 100))) * 4 * (1 + 0.05 * Miner),1)
MsgBox, 4096,Colombite yield caclulator,Spawndate: %Spawndate%`nAge: %Age% days`n`n%Roidtype% Yield: %Yield% Niobium`n`nSilicon: %Si%`nIron: %Fe%`n`nTotal amount: %Total%`n`nAccuracy: +/- %daily% Niobium`nThe accuracy number is equal to how much yield increases per day
}
Else If (Roidtype = "Angrite") {
Yield := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 4 * (1 + 0.05 * Miner))
Si := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 32 * (1 + 0.05 * Miner))
If (Sifi = "Yes") {
Si := 0
}
Fe := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 20 * (1 + 0.05 * Miner))
Mag := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 24 * (1 + 0.05 * Miner))
Alu := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 30 * (1 + 0.05 * Miner))
Tit := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 22 * (1 + 0.05 * Miner))
Total := Round(Yield + Fe + Si + Mag + Alu + Tit)
daily := Round((1 + (Skill / (Skill + 100))) * 4 * (1 + 0.05 * Miner),1)
MsgBox, 4096,Angrite yield caclulator,Spawndate: %Spawndate%`nAge: %Age% days`n`n%Roidtype% Yield: %Yield% Tin`n`nMagnesium: %Mag%`nAluminium: %Alu%`nTitanium: %Tit%`nIron: %Fe%`nSilicon: %Si%`n`nTotal amount: %Total%`n`nAccuracy: +/- %daily% Tin`nThe accuracy number is equal to how much yield increases per day
}
Else If (Roidtype = "Promethicite") {
Yield := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 10 * (1 + 0.05 * Miner))
Si := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 80 * (1 + 0.05 * Miner))
If (Sifi = "Yes") {
Si := 0
}
Ura := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 10 * (1 + 0.05 * Miner))
Total := Round(Yield + Ura + Si)
daily := Round((1 + (Skill / (Skill + 100))) * 10 * (1 + 0.05 * Miner),1)
MsgBox, 4096,Promethicite yield caclulator,Spawndate: %Spawndate%`nAge: %Age% days`n`n%Roidtype% Yield: %Yield% Promethium`n`nUranium: %Ura%`nSilicon: %Si%`n`nTotal amount: %Total%`n`nAccuracy: +/- %daily% Promethium`nThe accuracy number is equal to how much yield increases per day
}
Else If (Roidtype = "Autunite") {
Yield := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 20 * (1 + 0.05 * Miner))
Si := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 80 * (1 + 0.05 * Miner))
If (Sifi = "Yes") {
Si := 0
}
Total := Round(Yield + Si)
daily := Round((1 + (Skill / (Skill + 100))) * 20 * (1 + 0.05 * Miner),1)
MsgBox, 4096,Autunite yield caclulator,Spawndate: %Spawndate%`nAge: %Age% days`n`n%Roidtype% Yield: %Yield% Uranium`n`nSilicon: %Si%`n`nTotal amount: %Total%`n`nAccuracy: +/- %daily% Uranium`nThe accuracy number is equal to how much yield increases per day
}
Else If (Roidtype = "Urelite") {
Yield := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 20 * (1 + 0.05 * Miner))
Si := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 40 * (1 + 0.05 * Miner))
If (Sifi = "Yes") {
Si := 0
}
Fe := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 20 * (1 + 0.05 * Miner))
Carb := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 6 * (1 + 0.05 * Miner))
Total := Round(Yield + Fe + Si + Carb)
daily := Round((1 + (Skill / (Skill + 100))) * 20 * (1 + 0.05 * Miner),1)
MsgBox, 4096,Urelite yield caclulator,Spawndate: %Spawndate%`nAge: %Age% days`n`n%Roidtype% Yield: %Yield% Magnesium`n`nCarbon: %Carb%`nSilicon: %Si%`nIron: %Fe%`n`nTotal amount: %Total%`n`nAccuracy: +/- %daily% Magnesium`nThe accuracy number is equal to how much yield increases per day
}
Else If (Roidtype = "Chrondite") {
Yield := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 6 * (1 + 0.05 * Miner))
Si := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 40 * (1 + 0.05 * Miner))
If (Sifi = "Yes") {
Si := 0
}
Alu := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 10 * (1 + 0.05 * Miner))
Fe := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 20 * (1 + 0.05 * Miner))
Carb := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 8 * (1 + 0.05 * Miner))
Total := Round(Yield + Fe + Alu + Si + Carb)
daily := Round((1 + (Skill / (Skill + 100))) * 6 * (1 + 0.05 * Miner),1)
MsgBox, 4096,Chrondite yield caclulator,Spawndate: %Spawndate%`nAge: %Age% days`n`n%Roidtype% Yield: %Yield% Magnesium`n`nCarbon: %Carb%`nSilicon: %Si%`nIron: %Fe%`nAluminium: %Alu%`n`nTotal amount: %Total%`n`nAccuracy: +/- %daily% Magnesium`nThe accuracy number is equal to how much yield increases per day
}
Else If (Roidtype = "Aurostibite") {
Yield := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 3 * (1 + 0.05 * Miner))
Si := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 31 * (1 + 0.05 * Miner))
If (Sifi = "Yes") {
Si := 0
}
Anti := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 6 * (1 + 0.05 * Miner))
Total := Round(Yield + Anti + Si)
daily := Round((1 + (Skill / (Skill + 100))) * 3 * (1 + 0.05 * Miner),1)
MsgBox, 4096,Aurostibite yield caclulator,Spawndate: %Spawndate%`nAge: %Age% days`n`n%Roidtype% Yield: %Yield% Gold`n`nAntimony: %Anti%`nSilicon: %Si%`n`nTotal amount: %Total%`n`nAccuracy: +/- %daily% Gold`nThe accuracy number is equal to how much yield increases per day
}
Else If (Roidtype = "Neurocrystallite") {
Yield := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 20 * (1 + 0.05 * Miner))
Total := Round(Yield)
daily := Round((1 + (Skill / (Skill + 100))) * 20 * (1 + 0.05 * Miner),1)
MsgBox, 4096,Neurocrystallite yield caclulator,Spawndate: %Spawndate%`nAge: %Age% days`n`n%Roidtype% Yield: %Yield% Neurocrystals`n`nTotal amount: %Total%`n`nAccuracy: +/- %daily% Neurocrystals`nThe accuracy number is equal to how much yield increases per day
}
Else If (Roidtype = "Cyanite") {
Yield := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 20 * (1 + 0.05 * Miner))
Total := Round(Yield)
daily := Round((1 + (Skill / (Skill + 100))) * 20 * (1 + 0.05 * Miner),1)
MsgBox, 4096,Cyanite yield caclulator,Spawndate: %Spawndate%`nAge: %Age% days`n`n%Roidtype% Yield: %Yield% ADNA`n`nTotal amount: %Total%`n`nAccuracy: +/- %daily% ADNA`nThe accuracy number is equal to how much yield increases per day
}
Else If (Roidtype = "Bastnaesite") {
Yield := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 10 * (1 + 0.05 * Miner))
Cer := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 8 * (1 + 0.05 * Miner))
Carb := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 40 * (1 + 0.05 * Miner))
Total := Round(Yield + Cer + Carb)
daily := Round((1 + (Skill / (Skill + 100))) * 10 * (1 + 0.05 * Miner),1)
MsgBox, 4096,Bastnaesite yield caclulator,Spawndate: %Spawndate%`nAge: %Age% days`n`n%Roidtype% Yield: %Yield% Yttrium`n`nCerium: %Cer%`nCarbon: %Carb%`n`nTotal amount: %Total%`n`nAccuracy: +/- %daily% Yttrium`nThe accuracy number is equal to how much yield increases per day
}
Else If (Roidtype = "Kamacite") {
Yield := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 60 * (1 + 0.05 * Miner))
Total := Round(Yield)
daily := Round((1 + (Skill / (Skill + 100))) *60 * (1 + 0.05 * Miner),1)
MsgBox, 4096,Kamacite yield caclulator,Spawndate: %Spawndate%`nAge: %Age% days`n`n%Roidtype% Yield: %Yield% Iron`n`nTotal amount: %Total%`n`nAccuracy: +/- %daily% Iron`nThe accuracy number is equal to how much yield increases per day
}
Else If (Roidtype = "Siderolite") {
Yield := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 40 * (1 + 0.05 * Miner))
If (Sifi = "Yes") {
Yield := 0
}
Fe := Round((Age + MB) * (1 + (Skill / (Skill + 100))) * 20 * (1 + 0.05 * Miner))
daily := Round((1 + (Skill / (Skill + 100))) *40 * (1 + 0.05 * Miner),1)
Total := Round(Yield+Fe)
MsgBox, 4096,Siderolite yield caclulator,Spawndate: %Spawndate%`nAge: %Age% days`n`n%Roidtype% Yield: %Yield% Silicon`n`nIron: %Fe%`n`nTotal amount: %Total%`n`nAccuracy: +/- %daily% Silicon`nThe accuracy number is equal to how much yield increases per day
}
Else {
MsgBox, 4096,Yield caclulator,%Roidtype% is not known, please complain to Loke on forum
}
return
ButtonCalcAge:
Gui, Submit, NoHide
If (Roidtype = "Colombite") {
Age2 := Yield2 / ((1 + (Skill / (Skill + 100))) * 4 * (1 + 0.05 * Miner)) - MB
result2 := Round(Age2)
years := Round((result2 / 365),2)
Today := A_YYYY A_MM A_DD
EnvAdd, Today, -Age2, days
FormatTime, Spawndate, %Today%,yyyyMMdd
MsgBox, 4096,Age of roid calculator,Calculating age for a Colombite with yield of %Yield2% niobium:`n`nAge in days %result2%`nAge in years: %years%`n`nSpawndate: %Spawndate%
}
Else If (Roidtype = "Angrite") {
Age2 := Yield2 / ((1 + (Skill / (Skill + 100))) * 4 * (1 + 0.05 * Miner)) - MB
result2 := Round(Age2)
years := Round((result2 / 365),2)
Today := A_YYYY A_MM A_DD
EnvAdd, Today, -Age2, days
FormatTime, Spawndate, %Today%,yyyyMMdd
MsgBox, 4096,Age of roid calculator,Calculating age for a Angrite with yield of %Yield2% tin:`n`nAge in days %result2%`nAge in years: %years%`n`nSpawndate: %Spawndate%
}
Else If (Roidtype = "Promethicite") {
Age2 := Yield2 / ((1 + (Skill / (Skill + 100))) * 10 * (1 + 0.05 * Miner)) - MB
result2 := Round(Age2)
years := Round((result2 / 365),2)
Today := A_YYYY A_MM A_DD
EnvAdd, Today, -Age2, days
FormatTime, Spawndate, %Today%,yyyyMMdd
MsgBox, 4096,Age of roid calculator,Calculating age for a Promethicite with yield of %Yield2% promethium:`n`nAge in days %result2%`nAge in years: %years%`n`nSpawndate: %Spawndate%
}
Else If (Roidtype = "Bastnaesite") {
Age2 := Yield2 / ((1 + (Skill / (Skill + 100))) * 10 * (1 + 0.05 * Miner)) - MB
result2 := Round(Age2)
years := Round((result2 / 365),2)
Today := A_YYYY A_MM A_DD
EnvAdd, Today, -Age2, days
FormatTime, Spawndate, %Today%,yyyyMMdd
MsgBox, 4096,Age of roid calculator,Calculating age for a Bastnaesite with yield of %Yield2% yttrium:`n`nAge in days %result2%`nAge in years: %years%`n`nSpawndate: %Spawndate%
}
Else If (Roidtype = "Neurocrystallite") {
Age2 := Yield2 / ((1 + (Skill / (Skill + 100))) * 20 * (1 + 0.05 * Miner)) - MB
result2 := Round(Age2)
years := Round((result2 / 365),2)
Today := A_YYYY A_MM A_DD
EnvAdd, Today, -Age2, days
FormatTime, Spawndate, %Today%,yyyyMMdd
MsgBox, 4096,Age of roid calculator,Calculating age for a Neurocrystallite with yield of %Yield2% neurocrystals:`n`nAge in days %result2%`nAge in years: %years%`n`nSpawndate: %Spawndate%
}
Else If (Roidtype = "Aurostibite") {
Age2 := Yield2 / ((1 + (Skill / (Skill + 100))) * 3 * (1 + 0.05 * Miner)) - MB
result2 := Round(Age2)
years := Round((result2 / 365),2)
Today := A_YYYY A_MM A_DD
EnvAdd, Today, -Age2, days
FormatTime, Spawndate, %Today%,yyyyMMdd
MsgBox, 4096,Age of roid calculator,Calculating age for a Aurostibite with yield of %Yield2% gold:`n`nAge in days %result2%`nAge in years: %years%`n`nSpawndate: %Spawndate%
}
Else If (Roidtype = "Cyanite") {
Age2 := Yield2 / ((1 + (Skill / (Skill + 100))) * 20 * (1 + 0.05 * Miner)) - MB
result2 := Round(Age2)
years := Round((result2 / 365),2)
Today := A_YYYY A_MM A_DD
EnvAdd, Today, -Age2, days
FormatTime, Spawndate, %Today%,yyyyMMdd
MsgBox, 4096,Age of roid calculator,Calculating age for a Cyanite with yield of %Yield2% ADNA:`n`nAge in days %result2%`nAge in years: %years%`n`nSpawndate: %Spawndate%
}
Else If (Roidtype = "Autunite") {
Age2 := Yield2 / ((1 + (Skill / (Skill + 100))) * 20 * (1 + 0.05 * Miner)) - MB
result2 := Round(Age2)
years := Round((result2 / 365),2)
Today := A_YYYY A_MM A_DD
EnvAdd, Today, -Age2, days
FormatTime, Spawndate, %Today%,yyyyMMdd
MsgBox, 4096,Age of roid calculator,Calculating age for a Autunite with yield of %Yield2% uranium:`n`nAge in days %result2%`nAge in years: %years%`n`nSpawndate: %Spawndate%
}
Else If (Roidtype = "Urelite") {
Age2 := Yield2 / ((1 + (Skill / (Skill + 100))) * 20 * (1 + 0.05 * Miner)) - MB
result2 := Round(Age2)
years := Round((result2 / 365),2)
Today := A_YYYY A_MM A_DD
EnvAdd, Today, -Age2, days
FormatTime, Spawndate, %Today%,yyyyMMdd
MsgBox, 4096,Age of roid calculator,Calculating age for a Urelite with yield of %Yield2% magnesium:`n`nAge in days %result2%`nAge in years: %years%`n`nSpawndate: %Spawndate%
}
Else If (Roidtype = "Chrondite") {
Age2 := Yield2 / ((1 + (Skill / (Skill + 100))) * 6 * (1 + 0.05 * Miner)) - MB
result2 := Round(Age2)
years := Round((result2 / 365),2)
Today := A_YYYY A_MM A_DD
EnvAdd, Today, -Age2, days
FormatTime, Spawndate, %Today%,yyyyMMdd
MsgBox, 4096,Age of roid calculator,Calculating age for a Chrondite with yield of %Yield2% magnesium:`n`nAge in days %result2%`nAge in years: %years%`n`nSpawndate: %Spawndate%
}
Else If (Roidtype = "Kamacite") {
Age2 := Yield2 / ((1 + (Skill / (Skill + 100))) * 60 * (1 + 0.05 * Miner)) - MB
result2 := Round(Age2)
years := Round((result2 / 365),2)
Today := A_YYYY A_MM A_DD
EnvAdd, Today, -Age2, days
FormatTime, Spawndate, %Today%,yyyyMMdd
MsgBox, 4096,Age of roid calculator,Calculating age for a Kamacite with yield of %Yield2% iron:`n`nAge in days %result2%`nAge in years: %years%`n`nSpawndate: %Spawndate%
}
Else If (Roidtype = "Siderolite") {
Age2 := Yield2 / ((1 + (Skill / (Skill + 100))) * 40 * (1 + 0.05 * Miner)) - MB
result2 := Round(Age2)
years := Round((result2 / 365),2)
Today := A_YYYY A_MM A_DD
EnvAdd, Today, -Age2, days
FormatTime, Spawndate, %Today%,yyyyMMdd
MsgBox, 4096,Age of roid calculator,Calculating age for a Siderolite with yield of %Yield2% silicon:`n`nAge in days %result2%`nAge in years: %years%`n`nSpawndate: %Spawndate%
}
Else {
MsgBox, 4096,Age of roid calculator,%Roidtype% is not added to calculation of age, please complain to Loke on forum
}
return
ButtonCloseCalc:
Gui, Submit
return
ButtonChart:
^!m:: ; ctrl + Alt + m runs Charting
Gui, New, +AlwaysOnTop
Gui, Add, Text,,System:
Gui, Add, Edit, vWho x+11 w100 ym,%Who%
Gui, Add, Edit, vSector w50 ym,%Sector%
Gui, Add, Edit, vNumber w50 ym,%Number%
Gui, Add, Text, xs,Date:
Gui, Add, Edit, vDate x+22 w75,%A_DD%.%A_MM%.%A_YYYY%
Gui, Add, Text, xs,Type:
Gui, Add, DDL, vType x+22 w75, Rocky Planet||Moon|Gas Giant
Gui, Add, Text, x+10, Object #:
Gui, Add, Edit, vObject x+10 w50
Gui, Add, Text, xs,Mineral concentrations:
Gui, Add, Text, xs+10,AL:
Gui, Add, Edit, vAL x+1 w50
Gui, Add, Text, x+10,C:
Gui, Add, Edit, vC x+1 w50
Gui, Add, Text, x+10,FE:
Gui, Add, Edit, vFE x+1 w50
Gui, Add, Text, xs+10,SI:
Gui, Add, Edit, vSI x+4 w50
Gui, Add, Text, x+7,TI:
Gui, Add, Edit, vTI x+1 w50
Gui, Add, Text, x+10,Geo:
Gui, Add, DDL, vGeo x+1 w43, 1|2|3|4|5
Gui, Add, Text, xs,Agricultural Analysis:
Gui, Add, Text, xs+10,Grain:
Gui, Add, DDL, vGrain x+1 w30, 0||1|2
Gui, Add, Text, x+10,Fruit:
Gui, Add, DDL, vFruit x+1 w30, 0||1|2
Gui, Add, Text, x+10,Vegetables:
Gui, Add, DDL, vVeg x+1 w30, 0||1|2
Gui, Add, Text, xs+10,Meat:
Gui, Add, DDL, vMeat x+1 w30, 0||1|2
Gui, Add, Text, x+85,Tobacco:
Gui, Add, DDL, vTobacco x+1 w30, 0||1|2
Gui, Add, CheckBox, vGems xs+10, Gems
Gui, Add, CheckBox, vAtmos x+10, Atmosphere
Gui, Add, Text, xs,H2O:
Gui, Add, Edit, vH2O x+1 w50
Gui, Add, Text, x+5,CH4:
Gui, Add, Edit, vCH4 x+1 w50
Gui, Add, Text, x+5,NH3:
Gui, Add, Edit, vNH3 x+1 w50
Gui, Add, Text, xs+14,N:
Gui, Add, Edit, vN x+1 w50
Gui, Add, Text, x+12,O2:
Gui, Add, Edit, vO2 x+1 w50
Gui, Add, Text, x+6,CO2:
Gui, Add, Edit, vCO2 x+1 w50
Gui, Add, Text, xs+61,Pressure:
Gui, Add, Edit, vPress x+1 w50
Gui, Add, Text, x+3,Temp
Gui, Add, Edit, vTemp x+1 w50
Gui, Add, Text, xs+69,Gravity:
Gui, Add, Edit, vGrav x+1 w50
Gui, Add, CheckBox, vTrit xs+10, Trit
Gui, Add, CheckBox, vOcean x+5, Ocean
Gui, Add, Text, xs,Notes:
Gui, Add, Edit, vNotes x+1 w220
Gui, Add, Button, default x+10, Add
Gui, Show,X%guixpos% Y65, Charting
return
ButtonAdd:
Gui, Submit
FileAppend,%Who%`,%Sector%`,%Number%`,%Who%-%Sector%-%Number%`,%Date%`,%Type%`,%Object%`,%AL%`,%C%`,%FE%`,%SI%`,%TI%`,%Geo%`,%Grain%`,%Fruit%`,%Veg%`,%Meat%`,%Tobacco%`,%Gems%`,%Atmos%`,%H2O%`,%CH4%`,%NH3%`,%N%`,%O2%`,%CO2%`,%Press%`,%Temp%`,%Grav%`,%Ocean%`,%Trit%`,%Notes%`n, chart.csv
if not ErrorLevel {
MsgBox,4096,Charting, Charted: %Who%-%Sector%-%Number%,2
}
else {
MsgBox,4096,Error, Failed to save! `nIf you have the file open in a different program, close it and try again
}
return
ButtonLog:
^!l:: ; ctrl + Alt + l runs logger
Gui, New, +AlwaysOnTop
Gui, Add, Text,,System:
Gui, Add, Edit, vWho x+11 w100 ym,%Who%
Gui, Add, Edit, vSector w50 ym,%Sector%
Gui, Add, Edit, vNumber w50 ym,%Number%
Gui, Add, Text,xs,Date:
Gui, Add, Edit, vDate x+22 w100,%A_DD%.%A_MM%.%A_YYYY%
Gui, Add, Text,xs,Comment:
Gui, Add, Edit, vComment x+1 w400
Gui, Add, Text,xs,Asteroids:
Gui, Add, CheckBox, vCol x+3, Col
Gui, Add, CheckBox, vAng x+10, Ang
Gui, Add, CheckBox, vUre x+10, Ure
Gui, Add, CheckBox, vChron x+10, Chron
Gui, Add, CheckBox, vSid xs+49, Sid
Gui, Add, CheckBox, vKam x+10, Kam
Gui, Add, CheckBox, vAut x+8, Aut
Gui, Add, CheckBox, vNeuro xs+49, Neuro
Gui, Add, CheckBox, vCyan x+0, Cyan
Gui, Add, CheckBox, vAuro x+0, Auro
Gui, Add, CheckBox, vBast x+10, Bast
Gui, Add, Text,xs,Mark as newly spawned/reset?
Gui, Add, DropDownList, vSpawnmark, Yes||No
Gui, Add, Text,xs,Prom:
Gui, Add, Edit, vProm x+22 w50, 0
Gui, Add, Button, default x+10, Save
Gui, Add, Button, default x+10, Load
Gui, Show,, Logger
return
ButtonSave:
Gui, Submit
FileAppend,%Who%`,%Sector%`,%Number%`,%Who%-%Sector%-%Number%`,%Date%`,%Col%`,%Ang%`,%Ure%`,%Chron%`,%Sid%`,%Kam%`,%Aut%`,%Auro%`,%Neuro%`,%Cyan%`,%Bast%`,%Prom%`,%Spawnmark%`,%Comment%`n, Asteroid log.csv
if not ErrorLevel {
MsgBox,4096,Logging, Logged: %Who%-%Sector%-%Number%,2
}
else {
MsgBox,4096,Error, Failed to save! `nIf you have the file open in a different program, close it and try again
}
return
ButtonLoad:
Gui, Submit
Line := 0
Oldest := 0
LoadedLog := []
Splitlog := []
SortedLog := []
Splitlog[17] := 0
Loop, read, Asteroid log.csv
{
LoadedLog[Line] := A_LoopReadLine
Splitlog := StrSplit(LoadedLog[Line], ",")
Splitdate := StrSplit(Splitlog[5], ".")
Spawndate := Splitdate[3] Splitdate[2] Splitdate[1]
Age := A_YYYY A_MM A_DD
EnvSub, Age, %Spawndate%, days
If (Splitlog[18] = "Yes") {
If (Prom <= Splitlog[17]) && (Prom > 0) {
Roidtype := "Promethicite"
Oldest := Age
}
Else if (Col = Splitlog[6]) && (Ang = Splitlog[7]) && (Ure = Splitlog[8]) && (Chron = Splitlog[9]) && (Sid = Splitlog[10]) && (Kam = Splitlog[11]) && (Aut = Splitlog[12]) && (Neuro = Splitlog[13]) && (Cyan = Splitlog[14]) && (Auro = Splitlog[15]) {
If (Age > Oldest) {
Oldest := Age
If (Splitlog[16] = "1")
Roidtype := "Bastnaesite"
Else if (Splitlog[15] = "1")
Roidtype := "Cyanite"
Else if (Splitlog[13] = "1")
Roidtype := "Aurostibite"
Else if (Splitlog[14] = "1")
Roidtype := "Neurocrystallite"
Else if (Splitlog[6] = "1")
Roidtype := "Colombite"
Else if (Splitlog[7] = "1")
Roidtype := "Angrite"
Else if (Splitlog[8] = "1")
Roidtype := "Urelite"
Else if (Splitlog[12] = "1")
Roidtype := "Autunite"
Else if (Splitlog[9] = "1")
Roidtype := "Chrondite"
Else if (Splitlog[11] = "1")
Roidtype := "Kamacite"
Else if (Splitlog[10] = "1")
Roidtype := "Siderolite"
}
}
}
;FormatTime, Spawndate, %Today%,yyyyMMdd
SortedLog[Age] := Splitlog[4]
Line := Line + 1
}
Age := Oldest
Spawndate := A_YYYY A_MM A_DD
EnvAdd, Spawndate, -Age, days
FormatTime, Spawndate, %Spawndate%,yyyyMMdd
loadoutput := SortedLog[Oldest]
MsgBox,4096,Loader, Loaded: %loadoutput% %Oldest% days old `nRoidtype: %Roidtype%
goto, ButtonCalc
return
LMrecalc:
ButtonLM:
^!q:: ; ctrl + Alt + q runs LocalMarketCalc
Gui, New, +AlwaysOnTop
carbonprofit := Round(carbonLM / 775 * 100 - 100)
grapheneprofit := Round(grapheneLM / 1100 * 100 - 100)
warpcarbprofit := carbonLM - 210
warpgraphprofit := grapheneLM - 600
warpTritiumprofit := TritiumLM - 2880
Tritiumprofit := Round(TritiumLM / 3000 * 100 - 100)
warpMagnesiumprofit := MagnesiumLM - 8964
Magnesiumprofit := Round(MagnesiumLM / 7500 * 100 - 100)
warpFarmingprofit := FarmingLM - 456
Farmingprofit := Round(FarmingLM / 980 * 100 - 100)
warpMiningprofit := MiningLM - 456
Miningprofit := Round(MiningLM / 980 * 100 - 100)
Gui, Add, Text,xs ym,
Gui, Add, Text,xs,Fill in LM prices:
Gui, Add, Text,xs w100,Carbon:
Gui, Add, Edit, vcarbonLM x+10 w50,%carbonLM%
Gui, Add, Text,x+10 w20,%carbonprofit%
Gui, Add, Text,x+10 w20,%warpcarbprofit%
Gui, Add, Text,xs w100,Farming:
Gui, Add, Edit, vFarmingLM x+10 w50,%FarmingLM%
Gui, Add, Text,x+10 w20,%Farmingprofit%
Gui, Add, Text,x+10 w20,%warpFarmingprofit%
Gui, Add, Text,xs w100,Graphene:
Gui, Add, Edit, vgrapheneLM x+10 w50,%grapheneLM%
Gui, Add, Text,x+10 w20,%grapheneprofit%
Gui, Add, Text,x+10 w20,%warpgraphprofit%
Gui, Add, Text,xs w100,Magnesium:
Gui, Add, Edit, vMagnesiumLM x+10 w50,%MagnesiumLM%
Gui, Add, Text,x+10 w20,%Magnesiumprofit%
Gui, Add, Text,x+10 w20,%warpMagnesiumprofit%
Gui, Add, Text,xs w100,Mining:
Gui, Add, Edit, vMiningLM x+10 w50,%MiningLM%
Gui, Add, Text,x+10 w20,%Miningprofit%
Gui, Add, Text,x+10 w20,%warpMiningprofit%
Gui, Add, Text,xs w100,Tritium:
Gui, Add, Edit, vTritiumLM x+10 w50,%TritiumLM%
Gui, Add, Text,x+10 w20,%Tritiumprofit%
Gui, Add, Text,x+10 w20,%warpTritiumprofit%
Gui, Add, Text,xs,
Gui, Add, Button, default x+160, CalcProfit
Gui, Add, Text,xs,
Gui, Add, Button, default x+160, CloseLMCalc
Gui, Show,X%guixpos% Y500, LocalMarketCalc
return
ButtonCloseLMCalc:
Gui, Submit
return
ButtonCalcProfit:
Gui, Submit
Goto LMrecalc
return
ButtonMore:
Gui, New, +AlwaysOnTop
Gui, Add, Button, X+10, Stock_Market_deleter
Gui, Add, Button, xs, List_of_Hotkeys
Gui, Add, Text, xs,
Gui, Add, Button, xs, Close_this
Gui, Show,, More
return
ButtonClose_this:
Gui, Submit
return
ButtonList_of_Hotkeys:
Gui, Submit
MsgBox,4096,Hotkeys, Exit this app: Ctrl + Esc `n`nHide interface: Ctrl + Alt + h `nUnhide interface: Ctrl + Alt + u`n`nYield calculator: Ctrl + Alt + c `nLog asteroid field: Ctrl + Alt + l `nChart: Ctrl + Alt + m `n`n`nNPCs: `nCheck status: Ctrl + Alt + s `nEmpty cargo holds: Ctrl + Alt + e `n
return
^!u:: ; ctrl + Alt + u unhides GUI
Gui, Show,, AHK_tools
return
^!h:: ; ctrl + Alt + h hides GUI
Gui, Hide
return
^!s:: ;NPC status
Sleep 1000
Send what is your cargo?{Enter}
Sleep 400
Send what are you doing?{Enter}
Sleep 400
Send where are you?{Enter}
Sleep 400
Send What is your trade route?{Enter}
Sleep 400
return
^!e:: ;empty holds
Sleep 500
Send empty holds{Enter}
Sleep 500
return
ButtonOSB:
loop *.settlementcache ;find last modified cache file
if (a_index = 1) || (a_loopfiletimemodified > time) {
file := a_loopfilename
time := a_loopfiletimemodified
}
i := 2
skip := 0
List := []
Loop, read, %file%
{
If InStr(A_LoopReadLine, "Transport Grid") {
goto, Thisiscolony
}
Else if (skip = 0) {
if InStr(A_LoopReadLine, "Stored modules:") {
skip := 1
}
}
Else If InStr(A_LoopReadLine, "||Total Production:") {
goto, Donecounting
}
Else If ( A_LoopReadLine = "||") {
goto, Donecounting
}
Else If InStr(A_LoopReadLine, "||") {
goto, Failedcounting
}
Else If InStr(A_LoopReadLine, "Class") {
If (skip = 1) {
List[i] := A_LoopReadLine
i := i + 1
}
}
}
Donecounting:
j := 0
k := 0
Modules := []
x := i
While ( x > 1 ) { ;Set all to 0 so its an integer and can be incremented later
x := x - 1
k := List[x]
Modules[k] := 0
}
While ( i > 1 ) { ;Go through list of modules and cooutn how many of each, how many is stored in Modules[class # moduletype]
i := i - 1
k := List[i]
j := Modules[k]
Modules[k] := j + 1
}
osboutput := "" ;clear osboutput before adding everything in Modules to osboutput
For key, value in Modules {
if (key != "") {
osboutput .= key " " osboutputClass value "`n"
}
}
;reading the cache again, looking for shipyard status
OSBarray := []
FileRead, Contents, %file%
if not ErrorLevel ; Successfully loaded.
OSBarray := StrSplit(Contents, ":") ;need to split up the line with buildings, otherwise it can contain too many characters to read as one line
for index, element in OSBarray
{
OSBarray2 := []
OSBarray3 := []
If InStr(OSBarray[index], "ETA", CaseSensitive := true) { ;ETA is only seen as part of shipyard status
OSBarray2 := StrSplit(OSBarray[index], "|")
for index, element in OSBarray2 {
If InStr(OSBarray2[index], "Class", CaseSensitive := true) {
OSBarray3 := StrSplit(OSBarray2[index], "`n")
yard := OSBarray3[1]
}
}
}
}
msgbox, 4096,OSB, Stored modules at %file%: `n%osboutput%`nShipyard construction:`n%yard%`n`n`nSometimes cache files need to be loaded twice for info above to be fully up to date
yard := ""
return
Failedcounting:
msgbox, 4096,OSB, Failed counting ship modules at OSB `nDelete %file% and revisit OSB for a fresh copy
return
Thisiscolony:
msgbox, 4096,OSB, %file% seems to be a colony. Maybe the OSB file was not yet fully loaded, try again. `n`nIf you are at a colony, move to an OSB then try again
return
ButtonStock_Market_deleter:
Gui, Submit
Gui, New, +AlwaysOnTop
Gui, Add, Text,, Delsell start number:
Gui, Add, Text,, How many delsell commmands?
Gui, Add, Text,,
Gui, Add, Text,, Delbuy start number:
Gui, Add, Text,, How many delbuy commmands?
Gui, Add, Text,,Fill in which SM orders to delete, click ready, open SM and place the cursor and "Ctrl + Alt + d" to start
Gui, Add, Edit, vSellstart ym
Gui, Add, Edit, vSellnumber
Gui, Add, Text,,
Gui, Add, Edit, vBuystart
Gui, Add, Edit, vBuynumber
Gui, Add, Button, default, Ready
Gui, Show,,SM delete orders
return
ButtonReady:
Gui, Submit
b := Buystart
bstop := Buystart + Buynumber
s := Sellstart
sstop := Sellstart + Sellnumber
return
^!d:: ; ctrl + Alt + d runs the script, check that the cursor is in SM console before you run it. You dont want to run it in chat!
If (s != 0) {
loop {
Send delsell %s%{Enter}
Sleep 500
s:=s+1
} Until s >= sstop
}
if (s != 0) {
loop {
Send delbuy %b%{Enter}
Sleep 500
b:=b+1
} Until b >= bstop
}
bstop := 0
sstop := 0
b := 0
s := 0
return
ButtonX:
^Esc::
If FileExist("AHK_tools_config.csv") {
FileDelete, AHK_tools_config.csv
Sleep 100
FileAppend,%Skill%`,%MB%`,%Miner%`,%Sifi2%`,%Roidtype%`,%Spawndate%`,%Age%`,%Yield2%`,%Who%`,%Sector%`,%Number%, AHK_tools_config.csv
}
Else FileAppend,%Skill%`,%MB%`,%Miner%`,%Sifi2%`,%Roidtype%`,%Spawndate%`,%Age%`,%Yield2%`,%Who%`,%Sector%`,%Number%, AHK_tools_config.csv
ExitApp
return
;P::Pause, toggle
The .exe file is ready to run, just download it and start it. Since its a .exe you will most likely get security warnings.
The .ahk file is for those who wants to read the code or have AutoHotKey installed
You need to have AutoHotKey installed, copy the code into for example notepad or any text editor and save the file as a .ahk and its ready to run. Make sure .ahk is not just added to the filename in a .txt file, but it actually saves as a .ahk file type.
If using notepad to save the code into a .ahk make sure you add .ahk to file name and you must change "Save as type:" to "All Files"
Its important that you put the file in the same folder as Ascent stores the cache files, should be: C:\Users\<YOURNAME>\AppData\LocalLow\Fluffy Kitten Studios\Ascent _ The Space Game
Features:
- Mining yield caclulator, including ship trait miner
- Age of roid calculator, input your max yield and see how old the roid was
- OSB tool that lists all ship modules stored
- Logging of systems and astroid fields, stores directly to a .csv file
- It remembers your inputs from last time, so much less typing
- SM deleter, a tool to delete a lot of sell and buy orders
- Hotkey to ask NPCs all you need to know from them (that they can answer...)
- Hotkey to hide/unhide menu buttons GUI
- Minimalistic main menu, only a few small buttons in the upper right of the screen, where its not in the way of anything while playing ascent.
- Shindis charting tool
Menu buttons are placed out of the way in upper rigth of the screen:

OSB tool:

Mining yield calculator:

Remembers your inputs for skill, MB class etc.
Can calculate yield based on age in days or find age by inputing yield
Outputs a lot of yield info:

Shindis charting tool:

It remembers what you input last for system and automaticly suggests todays date. Saves a lot of typing, and can be edited before saving.
The tool creates a .csv with coloumn description in first row. Saves in same folder as this script is stored
Logging tool for asteroid fields:

It remembers what you input last for system and automaticly suggests todays date. Saves a lot of typing, and can be edited before saving.
1 click asteroid types and number of proms.
The tool creates a .csv with coloumn description in first row. Saves in same folder as this script is stored
Stock Market deleter:
A tool to send many delsell and delbuy commands to SM. Similar GUI as the other tools
Hotkeys:
A list of hotkeys
Esc will immediately close it completely
Last edited by Loke on Sun Oct 02, 2022 2:38 pm, edited 12 times in total.
Callsign: Fraaggii or Loke
My AutohotKey tools: viewtopic.php?f=3&t=4329
Mining yield calculator (google sheets): https://docs.google.com/spreadsheets/d/ ... edit#gid=0
My AutohotKey tools: viewtopic.php?f=3&t=4329
Mining yield calculator (google sheets): https://docs.google.com/spreadsheets/d/ ... edit#gid=0
Re: Ascent companion a AHK tool with yield calc and log
Thank you for the tool and inspiration!
I modified your code to add my charting tool. I did make one change to your base code and modified the data to Month - Day - Year. My tiny American brain can't seem to get past that.
Here is my modified file:
Thanks again for this!
I modified your code to add my charting tool. I did make one change to your base code and modified the data to Month - Day - Year. My tiny American brain can't seem to get past that.
Here is my modified file:
- Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
MB := 10
Age := 0
Skill := 0
Miner := 0
;yield := 0
guixpos := A_screenwidth - 560
guiypos := A_screenheight - 50
If not FileExist("test log.csv") {
FileAppend, Username`,Sector`,Number`,Full system name`,Date`,Col`,Ang`,Ure`,Chron`,Sid`,Kam`,Aut`,Auro`,Neuro`,Cyan`,Bast`,Prom`,Comment`n, test log.csv
}
If not FileExist("chart.csv") {
FileAppend, Username`,Sector`,Number`,Full system Name`,Date`,# of Planets`,# of Moons`,# of GG`,Type`,Object #`,Aluminium`,Carbon`,Iron`,Silicon`,Titanium`,Geo`,Grain`,Fruit`,Vegetables`,Meat`,Tobacco`,Gems`,Atmosphere`,H2O`,CH4`,NH3`,N`,O2`,CO2`,Pressure`,Temp`,Gravity`,Ocean`,Tritium`,Asteroids`,Notes`n, chart.csv
}
Gui, +AlwaysOnTop -Caption
Gui, Color, 000000
Gui, Add, Button,, Chart ; The ym option starts a new column of controls.
Gui, Add, Button, X+10, Log
Gui, Add, Button, X+10, Calc
Gui, Add, Button, X+10, Keys
Gui, Add, Button, X+10, OSB
Gui, Add, Button, X+10, SM
Gui, Add, Button, X+10, Close
Gui, Show, X%guixpos% Y25, Companion
return ; End of auto-execute section. The script is idle until the user does something.
ButtonCalc:
^!c:: ; ctrl + Alt + c runs yield calculator
Gui, New, +AlwaysOnTop
Gui, Add, Text,, Skill:
Gui, Add, Text,, MB class:
Gui, Add, Text,, Miner trait:
Gui, Add, Text,, Asteroid:
Gui, Add, Text,, Age in days:
Gui, Add, Edit, vSkill w50 ym,%Skill% ; The ym option starts a new column of controls.
Gui, Add, Edit, vMB w50, %MB%
Gui, Add, Edit, vMiner w50, %Miner%
Gui, Add, DropDownList, roidtype, Colombite||Angrite
Gui, Add, Edit, vAge w50,%Age%
Gui, Add, Text,x+10, or yield:
Gui, Add, Edit, vYield2 x+10 w50,%Yield2%
Gui, Add, Text,xs,
Gui, Add, Button, default x+60, CalcYield
Gui, Add, Button, default x+50, CalcAge
Gui, Add, Button, default x+50, CloseCalc
Gui, Show,, Mining yield calculator
return ; End of auto-execute section. The script is idle until the user does something.
ButtonCalcYield:
Gui, Submit, NoHide
yield := (Age + MB) * (1 + (Skill / (Skill + 100))) * 4 * (1 + 0.05 * Miner)
daily := (1 + (Skill / (Skill + 100))) * 4 * (1 + 0.05 * Miner)
result := Round(yield)
result2 := Round(daily,1)
MsgBox, 4096,, Yield: %result%`n`nAccuracy: +/- %result2%`nThe accurasy number is equal to how much yield increases per day
return
ButtonCalcAge:
Gui, Submit, NoHide
Age2 := Yield2 / ((1 + (Skill / (Skill + 100))) * 4 * (1 + 0.05 * Miner)) - MB
result2 := Round(Age2)
years := Round((result2 / 365),2)
MsgBox, 4096,,Days old: %result2%`nor %years% years
return
ButtonCloseCalc:
Gui, Submit
return
ButtonLog:
^!l:: ; ctrl + Alt + l runs logger
Gui, New
;Gui, GuiName:Logger
Gui, Add, Text,,System:
Gui, Add, Edit, vWho x+11 w100 ym,%Who%
Gui, Add, Edit, vSector w50 ym,%Sector%
Gui, Add, Edit, vNumber w50 ym,%Number%
Gui, Add, Text,xs,Date:
Gui, Add, Edit, vDate x+22 w100,%A_MM%.%A_DD%.%A_YYYY% ; Changed to month day year
Gui, Add, Text,xs,Comment:
Gui, Add, Edit, vComment x+1 w400
Gui, Add, Text,xs,Asteroids:
Gui, Add, CheckBox, vCol x+3, Col
Gui, Add, CheckBox, vAng x+10, Ang
Gui, Add, CheckBox, vUre x+10, Ure
Gui, Add, CheckBox, vChron x+10, Chron
Gui, Add, CheckBox, vSid xs+49, Sid
Gui, Add, CheckBox, vKam x+10, Kam
Gui, Add, CheckBox, vAut x+8, Aut
Gui, Add, CheckBox, vNeuro xs+49, Neuro
Gui, Add, CheckBox, vCyan x+0, Cyan
Gui, Add, CheckBox, vAuro x+0, Auro
Gui, Add, CheckBox, vBast x+10, Bast
Gui, Add, Text,xs,Prom:
Gui, Add, Edit, vProm x+22 w50
Gui, Add, Button, default x+10, Save
Gui, Show,, Logger
WinSet, AlwaysOnTop, On, Logger
return
ButtonChart:
^!m:: ; ctrl + Alt + m runs Charting
Gui, New
;Gui, GuiName:Chart
Gui, Add, Text,,System:
Gui, Add, Edit, vWho x+11 w100 ym,%Who%
Gui, Add, Edit, vSector w50 ym,%Sector%
Gui, Add, Edit, vNumber w50 ym,%Number%
Gui, Add, Text, xs,Date:
Gui, Add, Edit, vDate x+22 w75,%A_MM%.%A_DD%.%A_YYYY% ; Changed to month day year
Gui, Add, Text, x+5,P:
Gui, Add, Edit, vP x+1 w20,%P%
Gui, Add, Text, x+5,M:
Gui, Add, Edit, vM x+1 w20,%M%
Gui, Add, Text, x+5,GG:
Gui, Add, Edit, vGG x+1 w20,%GG%
Gui, Add, Text, xs w280 h1 0x7
Gui, Add, Text, xs,Type:
Gui, Add, DDL, vType x+22 w75, ||Moon|Rocky Planet|Gas Giant
Gui, Add, Text, x+10, Object #:
Gui, Add, Edit, vObject x+10 w50
Gui, Add, Text, xs w280 h1 0x7
Gui, Add, Text, xs,Mineral concentrations:
Gui, Add, Text, xs+10,AL:
Gui, Add, Edit, vAL x+1 w50
Gui, Add, Text, x+10,C:
Gui, Add, Edit, vC x+1 w50
Gui, Add, Text, x+10,FE:
Gui, Add, Edit, vFE x+1 w50
Gui, Add, Text, xs+10,SI:
Gui, Add, Edit, vSI x+4 w50
Gui, Add, Text, x+7,TI:
Gui, Add, Edit, vTI x+1 w50
Gui, Add, Text, x+10,Geo:
Gui, Add, DDL, vGeo x+1 w43, ||1|2|3|4|5
Gui, Add, Text, xs w280 h1 0x7
Gui, Add, Text, xs,Agricultural Analysis:
Gui, Add, Text, xs+10,Grain:
Gui, Add, DDL, vGrain x+1 w30, ||0|1|2
Gui, Add, Text, x+10,Fruit:
Gui, Add, DDL, vFruit x+1 w30, ||0|1|2
Gui, Add, Text, x+10,Vegetables:
Gui, Add, DDL, vVeg x+1 w30, ||0|1|2
Gui, Add, Text, xs+10,Meat:
Gui, Add, DDL, vMeat x+1 w30, ||0|1|2
Gui, Add, Text, x+85,Tobacco:
Gui, Add, DDL, vTobacco x+1 w30, ||0|1|2
Gui, Add, CheckBox, vGems xs+10, Gems
Gui, Add, CheckBox, vAtmos x+10, Atmosphere
Gui, Add, Text, x+16,Gravity:
Gui, Add, Edit, vGrav x+1 w50
Gui, Add, Text, xs w280 h1 0x7
Gui, Add, Text, xs,H2O:
Gui, Add, Edit, vH2O x+1 w50
Gui, Add, Text, x+5,CH4:
Gui, Add, Edit, vCH4 x+1 w50
Gui, Add, Text, x+5,NH3:
Gui, Add, Edit, vNH3 x+1 w50
Gui, Add, Text, xs+14,N:
Gui, Add, Edit, vN x+1 w50
Gui, Add, Text, x+12,O2:
Gui, Add, Edit, vO2 x+1 w50
Gui, Add, Text, x+6,CO2:
Gui, Add, Edit, vCO2 x+1 w50
Gui, Add, Text, xs+61,Pressure:
Gui, Add, Edit, vPress x+1 w50
Gui, Add, Text, x+3,Temp
Gui, Add, Edit, vTemp x+1 w50
Gui, Add, Text, xs w280 h1 0x7
Gui, Add, CheckBox, vTrit xs+10, Trit
Gui, Add, CheckBox, vOcean x+5, Ocean
Gui, Add, CheckBox, vAst x+5,Asteroids
Gui, Add, Text, xs,Notes:
Gui, Add, Edit, vNotes x+1 w220
Gui, Add, Button, default x+10, Add
Gui, Show,X%guixpos% Y65, Charting
WinSet, AlwaysOnTop, On, Chart
return
ButtonAdd:
Gui, Submit
FileAppend,%Who%`,%Sector%`,%Number%`,%Who%-%Sector%-%Number%`,%Date%`,%P%`,%M%`,%GG%`,%Type%`,%Object%`,%AL%`,%C%`,%FE%`,%SI%`,%TI%`,%Geo%`,%Grain%`,%Fruit%`,%Veg%`,%Meat%`,%Tobacco%`,%Gems%`,%Atmos%`,%H2O%`,%CH4%`,%NH3%`,%N%`,%O2%`,%CO2%`,%Press%`,%Temp%`,%Grav%`,%Ocean%`,%Trit%`,%Ast%`,%Notes%`n, chart.csv
if not ErrorLevel {
MsgBox,4096,Charting, Charted: %Who%-%Sector%-%Number%,2
}
else {
MsgBox,4096,Error, Failed to save! `nIf you have the file open in a different program, close it and try again
}
return
ButtonSave:
Gui, Submit
FileAppend,%Who%`,%Sector%`,%Number%`,%Who%-%Sector%-%Number%`,%Date%`,%Col%`,%Ang%`,%Ure%`,%Chron%`,%Sid%`,%Kam%`,%Aut%`,%Auro%`,%Neuro%`,%Cyan%`,%Bast%`,%Prom%`,%Comment%`n, test log.csv
if not ErrorLevel {
MsgBox,4096,Logging, Logged: %Who%-%Sector%-%Number%,2
}
else {
MsgBox,4096,Error, Failed to save! `nIf you have the file open in a different program, close it and try again
}
return
ButtonKeys:
MsgBox,4096,Hotkeys, Exit this app: Esc `n`nHide interface: Ctrl + Alt + h `nUnhide interface: Ctrl + Alt + u`n`nChart system: Ctrl + Alt + m `nYield calculator: Ctrl + Alt + c `nLog asteroid field: Ctrl + Alt + l `n`n`nNPCs: `nCheck status: Ctrl + Alt + s `n
return
^!u:: ; ctrl + Alt + u unhides GUI of mining companion
Gui, Show,, Mining companion
return
^!h:: ; ctrl + Alt + h hides GUI of mining companion
Gui, Hide
return
^!s:: ;NPC status
Sleep 1000
Send what is your cargo?{Enter}
Sleep 400
Send what are you doing?{Enter}
Sleep 400
Send where are you?{Enter}
Sleep 400
Send What is your trade route?{Enter}
Sleep 400
return
ButtonOSB:
MsgBox,4096,OSB,Not yet added, will show number of modules in future
return
ButtonSM:
Gui, New, +AlwaysOnTop
Gui, Add, Text,, Delsell start number:
Gui, Add, Text,, How many delsell commmands?
Gui, Add, Text,,
Gui, Add, Text,, Delbuy start number:
Gui, Add, Text,, How many delbuy commmands?
Gui, Add, Text,,Fill in which SM orders to delete, click ready, open SM and place the cursor and "Ctrl + Alt + d" to start
Gui, Add, Edit, vSellstart ym
Gui, Add, Edit, vSellnumber
Gui, Add, Text,,
Gui, Add, Edit, vBuystart
Gui, Add, Edit, vBuynumber
Gui, Add, Button, default, Ready
Gui, Show,,SM delete orders
return
ButtonReady:
Gui, Submit
b := Buystart
bstop := Buystart + Buynumber
s := Sellstart
sstop := Sellstart + Sellnumber
;MsgBox,4096,test,%b% %bstop% %s% %sstop%
return
^!d:: ; ctrl + Alt + d runs the script, check that the cursor is in SM console before you run it. You dont want to run it in chat!
loop {
Send delbuy %b%{Enter}
Sleep 500
b:=b+1
} Until b > bstop
loop {
Send delsell %s%{Enter}
Sleep 500
s:=s+1
} Until s > sstop
bstop := 0
sstop := 0
return
ButtonClose:
Esc::
ExitApp
return
;P::Pause, toggle
Thanks again for this!
Re: Ascent companion a AHK tool with yield calc and log
hi Loke
thank you for the work you have put in on this tool, I would love to use it but unfortunately because of the pissing contest between PRC and Google it is not possible for me to access Google Docs, if you could upload to a alternate site it would be appreciated. Again, thanks for the time you have spent on this
thank you for the work you have put in on this tool, I would love to use it but unfortunately because of the pissing contest between PRC and Google it is not possible for me to access Google Docs, if you could upload to a alternate site it would be appreciated. Again, thanks for the time you have spent on this
Re: Ascent companion a AHK tool with yield calc and log
I can put it on a Nextcloud Server Heidistein owns. Not sure he would like the link to be shared here publically.
Senator for Gilead and Amber
We're alive, we feel, we thrive.
We're alive, we feel, we thrive.
Re: Ascent companion a AHK tool with yield calc and log
Stagc, does this work: https://ufile.io/f/t3gbh
I downloaded the spreadsheets in xlsx and ods, but since it made in googledocs, the format gets a bit messed up, think the yield numbers should still be ok though, so hopefully that is ok to use.
Also added ship trait miner to the next 2 sheets. Been a while since I made it, so cant remember completly how it works, so hopefully I edited it correctly.
Assuming you meant the google sheets linked in my signature.
If you want the tools shown in this thread, you need Auto Hot Key installed, copy the code in first post and paste in notepad or similar, then save it as a .ahk file.
Currently the tool only calculate yield for col/ang, other asteroid types will be added soon. Will add how much is wasted do to lack of cargo space and a few more things, but that will have to wait until I have time. Should give all the info that the spreadsheets give, but with a nice GUI instead of messy spreadsheets.
I downloaded the spreadsheets in xlsx and ods, but since it made in googledocs, the format gets a bit messed up, think the yield numbers should still be ok though, so hopefully that is ok to use.
Also added ship trait miner to the next 2 sheets. Been a while since I made it, so cant remember completly how it works, so hopefully I edited it correctly.
Assuming you meant the google sheets linked in my signature.
If you want the tools shown in this thread, you need Auto Hot Key installed, copy the code in first post and paste in notepad or similar, then save it as a .ahk file.
Currently the tool only calculate yield for col/ang, other asteroid types will be added soon. Will add how much is wasted do to lack of cargo space and a few more things, but that will have to wait until I have time. Should give all the info that the spreadsheets give, but with a nice GUI instead of messy spreadsheets.
Callsign: Fraaggii or Loke
My AutohotKey tools: viewtopic.php?f=3&t=4329
Mining yield calculator (google sheets): https://docs.google.com/spreadsheets/d/ ... edit#gid=0
My AutohotKey tools: viewtopic.php?f=3&t=4329
Mining yield calculator (google sheets): https://docs.google.com/spreadsheets/d/ ... edit#gid=0
Re: Ascent companion a AHK tool with yield calc and log
Shindi wrote:Thank you for the tool and inspiration!
I modified your code to add my charting tool. I did make one change to your base code and modified the data to Month - Day - Year. My tiny American brain can't seem to get past that.
Here is my modified file:
Thanks again for this!
Awesome! Thx for sharing, thats very good charting tool.
Good point about the date format, I probably need to find a solution to that so you can choose. I have been thinking of making a "config" file where things like that can be changed, and also to make it remember mining skills etc even when its completely closed. Will look into it at some point, most likely not soon.
I think the GUI works very well for adding more tools, just need to make sure it doesnt grow much in size. If RAM dont mind I could add his NPC comm tool for example.
Callsign: Fraaggii or Loke
My AutohotKey tools: viewtopic.php?f=3&t=4329
Mining yield calculator (google sheets): https://docs.google.com/spreadsheets/d/ ... edit#gid=0
My AutohotKey tools: viewtopic.php?f=3&t=4329
Mining yield calculator (google sheets): https://docs.google.com/spreadsheets/d/ ... edit#gid=0
Re: Ascent companion a AHK tool with yield calc and log
Updated version that saves inputs in a file when its closed. Also improved mining yield calculator, but still need to add more roid types. Date formats is a bit simple, will hopefully be able to make it more fancy and possbile to choose format in future versions.
Files:
Added a .exe version so that anyone can just download and run int. No need to have AurtoHotKey installed.
Files:
Added a .exe version so that anyone can just download and run int. No need to have AurtoHotKey installed.
Last edited by Loke on Thu Aug 04, 2022 3:33 pm, edited 1 time in total.
Callsign: Fraaggii or Loke
My AutohotKey tools: viewtopic.php?f=3&t=4329
Mining yield calculator (google sheets): https://docs.google.com/spreadsheets/d/ ... edit#gid=0
My AutohotKey tools: viewtopic.php?f=3&t=4329
Mining yield calculator (google sheets): https://docs.google.com/spreadsheets/d/ ... edit#gid=0
Re: Ascent companion a AHK tool with yield calc and log
Fixed an error in yield calc for prom.
Added the rest of the asteroids for caclulating yield and age:

https://ufile.io/f/8mtwc
Edit:
FYI the compiled version (the .exe) behave slightly different compared to the non-cmpiled version (the .ahk). Main difference is that on the compiled version hotkeys only works if it is the active window, on the non-compiled version hotkeys work also when the game window or other windows are the active one, so its a bit more useful. So unless someone knows how to fix that, I suggest using the .ahk file if you can (needs AutoHotKey installed on you PC)
Added the rest of the asteroids for caclulating yield and age:

https://ufile.io/f/8mtwc
Edit:
FYI the compiled version (the .exe) behave slightly different compared to the non-cmpiled version (the .ahk). Main difference is that on the compiled version hotkeys only works if it is the active window, on the non-compiled version hotkeys work also when the game window or other windows are the active one, so its a bit more useful. So unless someone knows how to fix that, I suggest using the .ahk file if you can (needs AutoHotKey installed on you PC)
Callsign: Fraaggii or Loke
My AutohotKey tools: viewtopic.php?f=3&t=4329
Mining yield calculator (google sheets): https://docs.google.com/spreadsheets/d/ ... edit#gid=0
My AutohotKey tools: viewtopic.php?f=3&t=4329
Mining yield calculator (google sheets): https://docs.google.com/spreadsheets/d/ ... edit#gid=0
Re: Ascent companion a AHK tool with yield calc and log
New version 0.91:
https://ufile.io/f/ypwyg
Added OSB button that counts and lists all ship modules stored at the OSB you are currently at in game (automatically loads most recent cache file):

Very convenient when building lots of ships to see how many of each modules you currently have. In the example you see there is 6 class 1 Armour Panels.
Might change the layout in future version to make it easier to read, any suggestions for a better layout?
Let me know if you experience wrong numbers of modules, cache files for OSBs tend to keep old data. I added a couple of checks to avoid errors related to this, but if cache file is too messed up you will get a message telling you to delete the cache file. Works perfectly on all my OSBs now at least
Edit:
New version with tweaks to the OSB tool, it was complaining about bad cache file a bit too often
https://ufile.io/f/ypwyg
Added OSB button that counts and lists all ship modules stored at the OSB you are currently at in game (automatically loads most recent cache file):

Very convenient when building lots of ships to see how many of each modules you currently have. In the example you see there is 6 class 1 Armour Panels.
Might change the layout in future version to make it easier to read, any suggestions for a better layout?
Let me know if you experience wrong numbers of modules, cache files for OSBs tend to keep old data. I added a couple of checks to avoid errors related to this, but if cache file is too messed up you will get a message telling you to delete the cache file. Works perfectly on all my OSBs now at least
Edit:
New version with tweaks to the OSB tool, it was complaining about bad cache file a bit too often
Callsign: Fraaggii or Loke
My AutohotKey tools: viewtopic.php?f=3&t=4329
Mining yield calculator (google sheets): https://docs.google.com/spreadsheets/d/ ... edit#gid=0
My AutohotKey tools: viewtopic.php?f=3&t=4329
Mining yield calculator (google sheets): https://docs.google.com/spreadsheets/d/ ... edit#gid=0
Re: Lokes AutoHotKey tools for Ascent
Updated version 0.92 that adds status of shipyard constructions to OSB tool.
https://ufile.io/f/8otpp
Also changed the name as I discovered Ascent Companion has been used a few times before
https://ufile.io/f/8otpp
Also changed the name as I discovered Ascent Companion has been used a few times before
Callsign: Fraaggii or Loke
My AutohotKey tools: viewtopic.php?f=3&t=4329
Mining yield calculator (google sheets): https://docs.google.com/spreadsheets/d/ ... edit#gid=0
My AutohotKey tools: viewtopic.php?f=3&t=4329
Mining yield calculator (google sheets): https://docs.google.com/spreadsheets/d/ ... edit#gid=0
Who is online
Users browsing this forum: No registered users and 1 guest