Spidertron Extended


Adds Spidertron MK2, Spidertron MK3, the Immolator and the Ghost Weaver, more powerful upgraded versions of Spidertron that can be crafted from the original, with enhanced firing capabilities, larger inventory size, equipment grid, radar coverage, mobility and much more.

Content
10 months ago
1.0 - 1.1
70.5K
Combat

g Weaving Beam Auto Target & Vehicle Equipment Compatibility

3 years ago

Sorry for the bad title I couldn't figure out what to call it. The first part is basically just me asking if it is possible to use the code of a different mod to make the weaving beam fire automatically. While the second part is about a compatibility issue I found while using Schall Tank Platoon. As their new equipment worked with the Spidertron and also the Spiderling from Spridertron Patrol, but didn't work on the upgraded Spidertrons from this mod so I looked into a fix and figured out how to do it and wanted to share it.

I know this has been brought up before, but I recently noticed a mod called Repair Turret that was able to fire on damaged buildings automatically. I was wondering if it was possible to see how they did it/use code from that to make the weaving beam target automatically. The mod is here https://mods.factorio.com/mod/Repair_Turret

Also as a side note would it be possible to have the Reaping Beam scale with Energy Weapon upgrades? I know the Ghost is meant for building, but I feel it would make sense to make the Reaping stronger with upgrades.

I also found that some mods that add new equipment to vehicles only doesn't include the upgraded Spidertrons. I think this is because the equipment grid is set as "Armor". After messing around a bit I found out how to fix it to make it work. I am not sure which of the fixes did it, but the two things I changed was changing equipment_categories from {"Armor"} to data.raw["equipment-grid"]["spidertron-equipment-grid"].equipment_categories

And then adding the following code into data-final-fixes.lua which then made it able to use those equipment items. I looked at the Spiderling from Spidertron Patrol to figure out how to do it.

local spidertronmk2 = data.raw["equipment-grid"]["spidertronmk2-grid"]
local spidertronmk3 = data.raw["equipment-grid"]["spidertronmk3-grid"]
local spidertron_builder = data.raw["equipment-grid"]["spidertron-builder-grid"]
local immolator = data.raw["equipment-grid"]["immolator-grid"]

if spidertronmk2 then
spidertronmk2.equipment_categories = data.raw["equipment-grid"]["spidertron-equipment-grid"].equipment_categories
end

if spidertronmk3 then
spidertronmk3.equipment_categories = data.raw["equipment-grid"]["spidertron-equipment-grid"].equipment_categories
end

if spidertron_builder then
spidertron_builder.equipment_categories = data.raw["equipment-grid"]["spidertron-equipment-grid"].equipment_categories
end

if immolator then
immolator.equipment_categories = data.raw["equipment-grid"]["spidertron-equipment-grid"].equipment_categories
end

3 years ago

hmm, i'll start looking into it, thank you for all the info.

about the equipment, indeed i was using armor by default and only changing in compatibility files if needed:

for equipment_grid.lua
old code:
{code}
local spidertronmk2_grid = {
type = "equipment-grid",
name = "spidertronmk2-grid",
width = smk2w,
height = smk2h,
equipment_categories = {"armor"}
}

local spidertronmk3_grid = {
type = "equipment-grid",
name = "spidertronmk3-grid",
width = smk3w,
height = smk3h,
equipment_categories = {"armor"}
}

local spidertron_builder_grid = {
type = "equipment-grid",
name = "spidertron-builder-grid",
width = sbuildw,
height = sbuildh,
equipment_categories = {"armor"}
}

local immolator_grid = {
type = "equipment-grid",
name = "immolator-grid",
width = immw,
height = immh,
equipment_categories = {"armor"}
}
{code}

the new code should be:
{code}
local basic_equipment_categories = data.raw["equipment-grid"]["spidertron-equipment-grid"].equipment_categories

local spidertronmk2_grid = {
type = "equipment-grid",
name = "spidertronmk2-grid",
width = smk2w,
height = smk2h,
equipment_categories = basic_equipment_categories
}

local spidertronmk3_grid = {
type = "equipment-grid",
name = "spidertronmk3-grid",
width = smk3w,
height = smk3h,
equipment_categories = basic_equipment_categories
}

local spidertron_builder_grid = {
type = "equipment-grid",
name = "spidertron-builder-grid",
width = sbuildw,
height = sbuildh,
equipment_categories = basic_equipment_categories
}

local immolator_grid = {
type = "equipment-grid",
name = "immolator-grid",
width = immw,
height = immh,
equipment_categories = basic_equipment_categories
}
{code}
this change should help any compatibility issues with other mods more easier,
i'll commit this change on github, but i'll wait a bit more until i make a new version cause i am interested in the auto aim for the healing beam. (the problem with code from other mods is that i'm legally not allowed to use it depending on what kind of license they have, i'll need to look more into it)

3 years ago

For the Repair turret the code is under this license https://opensource.org/licenses/lgpl-3.0

Which looks like it allows it either normally or that it is allowed but you must reference it.

While the code I said fixed the issue is under this license https://opensource.org/licenses/MIT

The code I supplied for the fix may be more compatible as what it does is make the upgraded spidertrons be whatever the normal spidertron is. I am not sure what, basic_equipment_categories does. Since the mod that had the issue was with Schall Tank Platoon aka this mod https://mods.factorio.com/mod/SchallTankPlatoon

It adds a Vehicle category so I don't know if basic_equipment_categories covers that. I hope it does.

New response