Greetings my friend in the mod Hovercrafts have problems for the archive mod-compatibility.lua
(sorry a few part is spanish)
Error al cargar el mod: kry-vehicle-grids/prototypes/mod-compatability.lua:182: attempt to index field 'hovercraft-grid'
stack traceback:
kry-vehicle-grids/prototypes/mod-compatability.lua:182: in main chunk
[C]: in function 'require'
kry-vehicle-grids/data.lua:8: in main chunk
because in the changelog by mod Hovercrafts
Version: 2.0.3
Date: 2024-11-22
Features:
- Hovercrafts now have logistics requests
- Hovercrafts now allow remote driving
- Hovercrafts now have an equipment grid by default
Bugfixes:
- Fixed crash when moving over uncharted chunks in remote view
because in the equipment.lua in mod hovercrafts
local hgridw, hgridh = string.match(settings.startup["hovercraft-grid-size"].value, "(%d+)x(%d+)")
log("grid-hovercraft = " .. tostring(settings.startup["hovercraft-grid-size"].value) .. " " .. tostring(hgridw) .. ", " .. tostring(hgridh))
data:extend({
{
type = "equipment-grid",
name = "hovercraft-equipment",
width = tonumber(hgridw) or 2,
height = tonumber(hgridh) or 2,
equipment_categories = {"armor"}
}
})
my suggestions check the compatibility hovercrafts the code mod-compatability.lua (apply in the test by chat gpt)
-- if mods["Hovercrafts"] and settings.startup["hovercraft-grid"].value then
if mods["Hovercrafts"] and settings.startup["hovercraft-grid-size"] then
-- Extract the grid size from the Hovercrafts mod's settings
local hgridw, hgridh = string.match(settings.startup["hovercraft-grid-size"].value, "(%d+)x(%d+)")
if hgridw and hgridh then
-- Define categories to integrate hovercraft equipment into the game
local categories = {"vehicle", "vehicle-with-storage", "vehicle-with-speed"}
changeEquipmentCategories("hovercraft-equipment", categories)
-- Compatibility with Hovercraft entities
if data.raw["car"]["ecraft-entity"] then
changeEquipmentCategories("ecraft-equipment", categories)
end
if data.raw["car"]["mcraft-entity"] then
changeEquipmentCategories("mcraft-equipment", categories)
end
if data.raw["car"]["lcraft-entity"] then
changeEquipmentCategories("lcraft-equipment", categories)
end
end
end
I hope use the result of the mod hovercrafts for this mod Vehicle Equipment Grids, thanks, by alanovich (alanovich2010), see ya ;-)