Agrippa Material Requirement Script
More actions
This page documents a script created and donated by User:Doctor for computing, well, anything recursively really. But specifically it was created to solve the problem of Agrippa nested builds. IE: In order to build a Multiforus Multiplico Effervo Quinque you need a SOOA, in order to build an SOOA, you need a Hull Mesh Laminate III, in order to build a Hull Mesh Laminate III you need a Collegia Research Authorization MXXIC. This script resolves that dependency chain for you.
Note: Not all builds are included in the 'intermediates' file. Feel free to add missing entries as you find them.
Setup
If you are on a linux host, or have a linux VM, no setup is needed. If you are on Windows you'll probably want to install cygwin (taking all the defaults is fine) in order to run the script.
The Script
#!/bin/bash
# Agrippa Material Requirement Script by 'Doctor'
# https://www.net-7.org/wiki/index.php/Agrippa_Material_Requirement_Script
# This script was created to solve the problem of Agrippa nested builds.
# Not all builds are included in the 'intermediates' file. You fix it!
# Setup - linux host, just run it. If you are on Windows you'll need cygwin.
# IMPORTANT This script rips player-made-only components (such as CE3K Model 4)
# If you do not desire this behavior, change rips from yes to no
rip=yes
# No user configurable options beyond this point
# cleanup last run
rm -f intermediates final_build
echo "Stage II Encryption|Vodka,Diamond,Chalcophanium,Persephonite
Reaction Vulgus|Plutonium,Mirandium,Neutronium,K3 Providence Pro
Valde Fervens Lux Lucius|Nova Emerald Foramen,Focus 450 Flare 4,CE3K Adm BL24,K3 Optic Amplifier
Multiforus Multiplico Effervo Quinque|Vortex Titanium Barrel,Evolver Fire Master,Centuriata Lancearate Gene-Map,Security Optimal Override Alpha
Security Optimal Override Alpha|Ultra Improved Capacitor,CE3K Model 4,Evolver AllTemp Circuit Board,Hull Mesh Laminate III
Hull Mesh Laminate III|Raw Sapphire,Duplium Ore,Boron,Graphite,Collegia Research Authorization MXXIC
Collegia Research Authorization MXXIC|Raw Topaz,Meteoric Sand,Phosphorous,High-Impact Plastic
Foedius vox Redivivus|Electro LX Unifier,CE3K Model 6,Nebula PowerVamp XL,K3 LoadTECH QL2
Profero Manus Manus|CE3K PM-89,Nova Emerald Foramen,Electro Platinum Wound Relay
Auctoritas Remoror Quinque|Ultra Quad Capacitor,Vortex CoreFocus 9000,Ostarae Energy Sac,Security Optimal Override Alpha
Seco Secare Secui Sectum Quinque|Evolver GenR8 MS,Electro Gold Wound Relay,Ancient Dzurai Hide,Security Optimal Override Alpha
Aspectus Limo Quinque|Lunar Eye,Evolver Metamorph Pro,Vortex 10k TeraByte Memory Chip,Security Optimal Override Alpha
Skirmish Alpha|Stage II Encryption,Evolver GenR8 MX,BlackBox U88
Flechette Alpha|Profero Manus Manus,Foedius vox Redivivus,Stage II Encryption
Ambush Alpha|Reaction Vulgus,Valde Fervens Lux Lucius,Stage II Encryption
Tactical Advantage Alpha|Stage II Encryption,Evolver GenR8 MX,Quark Charged Conductor Sphere
Agrippa Technology Stage II Blank Form|Electro Optical Fiber,Duplium
Ambush Beta|Ambush Alpha,Nebula PowerVamp XTR
Flechette Beta|Flechette Alpha,K3 Max Protector
Skirmish Beta|Skirmish Alpha,Quark Transience
Tactical Advantage Beta|Tactical Advantage Alpha,Evolver PowR6
Stage III Encryption|Security Optimal Override Alpha
Ambush Omega|Stage III Encryption,Warlock Channeler,K3 OptiProc IRU,Evolver Icebox
Flechette Omega|Stage III Encryption,CE3K TR-12,Warlock Scorpio,Athanor Luna XRT
Skirmish Omega|Stage III Encryption,Ten-Gu Rib,K3 GenTECH Wraith,Warlock OptiDrive 2120
Tactical Advantage Omega|Stage III Encryption,Electro AI InfoROM v8.0,Quark Optical Relay,K3 OptiProc IRU
Effervo Flechette|CE3K Eruption II,Hull Mesh Laminate III,Iron Eater Cytoplasm
Impact Flechette|Evolver Blitz,Warlock Morgan LF,Quark P92 Slugs
Explosive Flechette|Evolver Blitz,Athanor Immortal Shell Casing,Quark P92 Slugs,Incendiary Substrate
Plasma Flechette|Evolver Blitz,Athanor Immortal Shell Casing,Quark P92 Slugs,Ionized Substrate
Chemical Flechette|Evolver Blitz,Athanor Immortal Shell Casing,Quark P92 Slugs,Toxic Substrate
Incendiary Substrate|Worm Bits,Minosium Ore
Ionized Substrate|Worm Bits,Boragon
Toxic Substrate|Worm Bits,Persephonite" > intermediates
if [[ $rip == "yes" ]] ;then
echo "BlackBox U88|Iridium,Universal Steel,Universal Steel
CE3K Eruption II|Ceresite,Saganite
CE3K Adm BL24|Adamantine,Platinum,Solaris Solarshield
CE3K Model 4|Herculinium,Refined Centauricite,Silver
CE3K Model 6|Adamantine,Mirandium,Platinum
CE3K PM-89|Adamantine,Hafnium,Solaris Solarshield
CE3K TR-12|Arthurian Plastic,Asmodeusium,Kronosium
Athanor Luna XRT|Modredium,Promethium,Transparent Steel
Athanor Immortal Shell Casing|Brood Oil,Brood Oil" >> intermediates
fi
function findItem() {
if [ `grep -c "^$1|" intermediates` -eq 0 ] ;then
echo "$1" >> temp_build
else
IFS=','
for item in `grep "^$1|" intermediates | awk -F'|' '{print $NF}'` ;do
findItem "$item"
done
unset IFS
fi
}
if [[ ! -e $1 ]] ;then
echo "This script requires an input file on the cmdline, you provided: $1"
exit 1
fi
while read line ;do
#Skip commented out lines in input file
if [[ "$line" =~ \#.* ]] ;then
continue 1
fi
IFS=',' read -a values <<< "$line"
for i in `seq 1 ${values[0]}` ;do
findItem "${values[1]}"
done
done < $1
cat temp_build | sort | uniq -c | sort -rn > tmp
# Create Net 7DB Links
while read line ;do
IFS=' ' read count item <<< "$line"
html_item=$(echo $item |sed 's/ /+/g')
item_link="https://www.net-7.org/#item/${html_item}"
echo $count $item $item_link >> final_build
done < tmp
rm -f tmp temp_build
cat final_build
Usage
To use it, create an input file (it can be named anything) and fill it with how many items you need, and what that item is named. For example, a sample build list to create all stage 1 devices, Flechette Alphas for a PS, PP, and PW, Ambush Alphas for all 3 as well, a single skirmish shield for the PS, and a Tactical Advantage Alpha for the PS as well. In the future you might want 4 Flechette Omegas, so we have those commented out for now.
1,Aspectus Limo Quinque 2,Evolver GenR8 MX 1,Quark Charge Conductor Sphere 4,Stage II Encryption 1,Seco Secare Secui Sectum Quinque 1,BlackBox U88 1,Auctoritas Remoror Quinque 1,Valde Fervens Lux Lucius 1,Reaction Vulgus 1,Multiforus Multiplico Effervo Quinque 1,Foedius vox Redivivus 1,Profero Manus Manus 3,Ambush Alpha 15,Flechette Alpha #4,Flechette Omega 1,Tactical Advantage Alpha 1,Skirmish Alpha
You'd then simply call the script by ./<script name> <input file> and it would give you output like this:
36 Adamantine https://www.net-7.org/#item/Adamantine 24 Vodka https://www.net-7.org/#item/Vodka 24 Persephonite https://www.net-7.org/#item/Persephonite 24 Diamond https://www.net-7.org/#item/Diamond 24 Chalcophanium https://www.net-7.org/#item/Chalcophanium 20 Solaris Solarshield https://www.net-7.org/#item/Solaris+Solarshield 20 Platinum https://www.net-7.org/#item/Platinum 20 Nova Emerald Foramen https://www.net-7.org/#item/Nova+Emerald+Foramen 20 Mirandium https://www.net-7.org/#item/Mirandium 16 Nebula PowerVamp XL https://www.net-7.org/#item/Nebula+PowerVamp+XL 16 K3 LoadTECH QL2 https://www.net-7.org/#item/K3+LoadTECH+QL2 16 Hafnium https://www.net-7.org/#item/Hafnium 16 Electro Platinum Wound Relay https://www.net-7.org/#item/Electro+Platinum+Wound+Relay 16 Electro LX Unifier https://www.net-7.org/#item/Electro+LX+Unifier 4 Universal Steel https://www.net-7.org/#item/Universal+Steel 4 Ultra Improved Capacitor https://www.net-7.org/#item/Ultra+Improved+Capacitor 4 Silver https://www.net-7.org/#item/Silver 4 Refined Centauricite https://www.net-7.org/#item/Refined+Centauricite 4 Raw Topaz https://www.net-7.org/#item/Raw+Topaz 4 Raw Sapphire https://www.net-7.org/#item/Raw+Sapphire 4 Plutonium https://www.net-7.org/#item/Plutonium 4 Phosphorous https://www.net-7.org/#item/Phosphorous 4 Neutronium https://www.net-7.org/#item/Neutronium 4 Meteoric Sand https://www.net-7.org/#item/Meteoric+Sand 4 K3 Providence Pro https://www.net-7.org/#item/K3+Providence+Pro 4 K3 Optic Amplifier https://www.net-7.org/#item/K3+Optic+Amplifier 4 High-Impact Plastic https://www.net-7.org/#item/High-Impact+Plastic 4 Herculinium https://www.net-7.org/#item/Herculinium 4 Graphite https://www.net-7.org/#item/Graphite 4 Focus 450 Flare 4 https://www.net-7.org/#item/Focus+450+Flare+4 4 Evolver GenR8 MX https://www.net-7.org/#item/Evolver+GenR8+MX 4 Evolver AllTemp Circuit Board https://www.net-7.org/#item/Evolver+AllTemp+Circuit+Board 4 Duplium Ore https://www.net-7.org/#item/Duplium+Ore 4 Boron https://www.net-7.org/#item/Boron 2 Iridium https://www.net-7.org/#item/Iridium 1 Vortex Titanium Barrel https://www.net-7.org/#item/Vortex+Titanium+Barrel 1 Vortex CoreFocus 9000 https://www.net-7.org/#item/Vortex+CoreFocus+9000 1 Vortex 10k TeraByte Memory Chip https://www.net-7.org/#item/Vortex+10k+TeraByte+Memory+Chip 1 Ultra Quad Capacitor https://www.net-7.org/#item/Ultra+Quad+Capacitor 1 Quark Charged Conductor Sphere https://www.net-7.org/#item/Quark+Charged+Conductor+Sphere 1 Quark Charge Conductor Sphere https://www.net-7.org/#item/Quark+Charge+Conductor+Sphere 1 Ostarae Energy Sac https://www.net-7.org/#item/Ostarae+Energy+Sac 1 Lunar Eye https://www.net-7.org/#item/Lunar+Eye 1 Evolver Metamorph Pro https://www.net-7.org/#item/Evolver+Metamorph+Pro 1 Evolver GenR8 MS https://www.net-7.org/#item/Evolver+GenR8+MS 1 Evolver Fire Master https://www.net-7.org/#item/Evolver+Fire+Master 1 Electro Gold Wound Relay https://www.net-7.org/#item/Electro+Gold+Wound+Relay 1 Centuriata Lancearate Gene-Map https://www.net-7.org/#item/Centuriata+Lancearate+Gene-Map 1 Ancient Dzurai Hide https://www.net-7.org/#item/Ancient+Dzurai+Hide