217 lines
5.5 KiB
YAML
217 lines
5.5 KiB
YAML
- name: containers
|
|
regex: '(?-s)capacity="(?<capacity>!num)"(?:!anyslotsperrow="(?<slotsperrow>!num))?'
|
|
lua: |
|
|
if capacity == 1 then return false end
|
|
-- file:find("fabricators.xml") then
|
|
-- apacity=round(capacity*1.5)
|
|
-- eturn true
|
|
--
|
|
capacity=round(capacity*3)
|
|
if capacity > 50 then capacity=50 end
|
|
if not slotsperrow then return true end
|
|
slotsperrow=1
|
|
while slotsperrow * slotsperrow < capacity do
|
|
slotsperrow = slotsperrow + 1
|
|
end
|
|
files:
|
|
- "Content/Items/**/*.xml"
|
|
|
|
- name: containerscontainable
|
|
# Just to be safe... Probably not needed though...
|
|
isolate: true
|
|
regex: capacity="(?<capacity>!num).{0,200}?Containable.{0,50}?items="([^"]+)"
|
|
lua: |
|
|
-- If we fuck with the diving gear the game fucking explodes
|
|
-- Thinking we don't have oxygen tanks and killing us
|
|
if file:find("divinggear.xml") then return false end
|
|
if file:find("weapons.xml") then return false end
|
|
if capacity == 1 then return false end
|
|
|
|
print(s1)
|
|
local gurantee = {"ammobox", "deepdiving", "smallitem", "mediumitem", "largeitem"}
|
|
local has = {}
|
|
|
|
local items = strsplit(s1, ",")
|
|
for i, item in pairs(items) do
|
|
for _, g in pairs(gurantee) do
|
|
if string.find(item, g) then
|
|
has[g] = true
|
|
end
|
|
end
|
|
end
|
|
|
|
for _, g in pairs(gurantee) do
|
|
if not has[g] then
|
|
s1 = s1 .. "," .. g
|
|
end
|
|
end
|
|
files:
|
|
- "Content/Items/**/*.xml"
|
|
|
|
- name: excludeditems
|
|
regex: <Containable!any(\s?excludeditems="[^"]+")
|
|
lua: |
|
|
s1 = ""
|
|
files:
|
|
- "Content/Items/**/*.xml"
|
|
|
|
- name: upgrade
|
|
regex: (?:maxforce|capacity|maxrechargespeed|overloadvoltage|healthmultiplier|maxhealth|fabricationspeed|deconstructionspeed|rotationspeedlowskill|offsetonselectedmultiplier|range|maxpoweroutput|meltdowndelay|maxflow|fixdurationlowskill|skillrequirementmultiplier)="\+?!num%?"
|
|
lua: |
|
|
*2
|
|
files:
|
|
- "**/UpgradeModules.xml"
|
|
- name: upgradetooltip
|
|
regex: 'increaseontooltip="(?<increaseontooltip>!num)"'
|
|
lua: |
|
|
increaseontooltip=increaseontooltip*2
|
|
files:
|
|
- "**/UpgradeModules.xml"
|
|
|
|
- name: missionreward
|
|
regex: 'reward="!num'
|
|
lua: |
|
|
*4
|
|
files:
|
|
- "**/Missions.xml"
|
|
|
|
- name: maxstacksize
|
|
regex: 'maxstacksize="!num'
|
|
lua: |
|
|
=60
|
|
files:
|
|
- "Content/Items/**/*.xml"
|
|
|
|
- name: maxstacksizecharacterinventory
|
|
regex: 'maxstacksizecharacterinventory="!num'
|
|
lua: |
|
|
=60
|
|
files:
|
|
- "Content/Items/**/*.xml"
|
|
|
|
- name: lightrange
|
|
regex: '(?-s)LightComponent!anyrange="(!num)"'
|
|
lua: |
|
|
*4
|
|
files:
|
|
- "Content/Items/**/*.xml"
|
|
|
|
- name: toolrange
|
|
regex: (?-s)RepairTool!anyrange="!num"
|
|
lua: |
|
|
*4
|
|
files:
|
|
- "Content/Items/**/*.xml"
|
|
|
|
- name: merchantstock
|
|
regex: (?-s)<Price(?:!anymultiplier="(?<multiplier>!num)")?(?:!anyminavailable="(?<minavailable>!num)")?
|
|
lua: |
|
|
--Price might actually be price multiplier and not a stock multiplier...
|
|
--if multiplier then
|
|
-- multiplier = round(multiplier * 3, 2)
|
|
--end
|
|
if minavailable then
|
|
minavailable = round(minavailable * 3, 2)
|
|
end
|
|
files:
|
|
- "Content/Items/**/*.xml"
|
|
|
|
- name: repairthroughwalls
|
|
regex: <RepairTool!anyrepairthroughwalls="(?<repairthroughwalls>!any)"
|
|
lua: |
|
|
repairthroughwalls = "true"
|
|
files:
|
|
- "Content/Items/**/*.xml"
|
|
|
|
- name: itembonanzaamount
|
|
regex: (?-s)(?i)<Preferredcontainer!anyamount="!num"
|
|
lua: |
|
|
v1 = round(v1 * 2, 2)
|
|
files:
|
|
- "Content/Items/**/*.xml"
|
|
- name: itembonanzaspawnprobability
|
|
regex: (?-s)(?i)<Preferredcontainer!anyspawnprobability="!num"
|
|
lua: |
|
|
v1 = round(v1 * 2, 2)
|
|
if v1 > 1 then
|
|
v1 = 1
|
|
end
|
|
files:
|
|
- "Content/Items/**/*.xml"
|
|
- name: itembonanzaminamount
|
|
regex: (?-s)(?i)<Preferredcontainer!anyminamount="!num"
|
|
lua: |
|
|
v1 = round(v1 * 2, 2)
|
|
files:
|
|
- "Content/Items/**/*.xml"
|
|
- name: itembonanzamaxamount
|
|
regex: (?-s)(?i)<Preferredcontainer!anymaxamount="!num"
|
|
lua: |
|
|
v1 = round(v1 * 2, 2)
|
|
files:
|
|
- "Content/Items/**/*.xml"
|
|
|
|
- name: morebetterquality
|
|
regex: (?-s)QualityStat!anyvalue="!num"
|
|
lua: |
|
|
round(v1 * 3, 2)
|
|
files:
|
|
- "Content/Items/**/*.xml"
|
|
|
|
- name: extinguishamount
|
|
regex: (?-s)(?i)<RepairTool!anyextinguishamount="!num"
|
|
lua: |
|
|
round(v1 * 4, 2)
|
|
files:
|
|
- "Content/Items/**/tools.xml"
|
|
|
|
- name: morelongerextinguisher
|
|
regex: <RepairTool.{0,100}?extinguishamount="[^"]+".{0,400}?StatusEffect.{0,60}?Condition="!num"
|
|
lua: |
|
|
v1 = round(v1 / 8, 2)
|
|
files:
|
|
- "Content/Items/**/tools.xml"
|
|
|
|
- name: propulsionforce
|
|
regex: (?-s)<Propulsion!anyforce="!num"
|
|
lua: |
|
|
round(v1 * 3, 2)
|
|
files:
|
|
- "Content/Items/**/*.xml"
|
|
|
|
- name: morewires
|
|
nodedup: true
|
|
regex: (?-s)<output!any(maxwires="(?<maxwires>!num)"|/>)
|
|
lua: |
|
|
print(maxwires, v1, s1)
|
|
if maxwires then
|
|
maxwires = round(maxwires * 4, 2)
|
|
else
|
|
s1 = " maxwires=\"10\" />"
|
|
end
|
|
files:
|
|
- "Content/Items/**/*.xml"
|
|
|
|
- name: deconstruction
|
|
isolate: true
|
|
regex: <Deconstruct.{0,50}?>(.{0,400}?)</Deconstruct>
|
|
lua: |
|
|
-- print("start:", s1)
|
|
local lines = strsplit(s1, "\n")
|
|
local newLines = {}
|
|
for _, line in pairs(lines) do
|
|
if line:find("Item identifier=") then
|
|
local amount = line:match("amount=\"(%d+)\"")
|
|
if amount then
|
|
line = line:gsub("amount=\"%d+\"", "amount=\"" .. amount*2 .. "\"")
|
|
else
|
|
line = line:gsub("(identifier=\"%w+\")", "%1 amount=\"2\"")
|
|
end
|
|
end
|
|
newLines[#newLines + 1] = line
|
|
end
|
|
-- print("end:", table.concat(newLines, "\n"))
|
|
s1 = table.concat(newLines, "\n")
|
|
files:
|
|
- "Content/Items/**/*.xml"
|