Teleportation Equipment

by Wannie

A power armor equipment which allows players to teleport a short distance. Equipment needs to be fully charged before it can be used. Range stacks with number of equipment used

Utilities
a month ago
1.1
504

g Won't chanage by my mod

a month ago
(updated a month ago)

Hey Sorry for earlier. I know u mentioned I could do a conversion on the tech. So the shortcut could be unlocked. i had added a code section to convert from modular to my counterpart witch i have. Still the game don't do any thing regarding it.

here is some of it:
local replace = {
["modular-armor"] = "armour_1",
["power-armor"] = "armour_2",
["power-armor-2"] = "armour_3",
}

local function replace_prerequisites(prerequisites)
if not prerequisites then return end
for i, prereq in pairs(prerequisites) do
if replace[prereq] then
prerequisites[i] = replace[prereq]
end
end
end

for _, technology in pairs(data.raw.technology) do
if technology.normal then
replace_prerequisites(technology.normal.prerequisites)
end
if technology.expensive then
replace_prerequisites(technology.expensive.prerequisites)
end
replace_prerequisites(technology.prerequisites)
end

a month ago

It seems the fault comes from my side. The teleportation shortcut required the technology "modular_armour" to unlock. So to unlock it, you would have had to change the shortcut protoype as well.

I changed the required technology to "teleportation equipment" instead. With this, the shortcut should unlock after researching the teleportation equipment.

Keep in mind that a shortcut only has to be unlocked once. After being unlocked, it will be permantly unlocked for every new save you start.

a month ago
(updated a month ago)

that much i know. thanks for all the help regardless of the disturbance.

a month ago

Sorry to bother u again but u may have forgotten to add a version migration as of your latest version.

a month ago
(updated a month ago)

Not entirely sure if a migration is needed since there isn't much data saved globaly. And the saved data has not been changed. But I had some errors I had to fix.

However, I now see the error in your code. Currently, the teleportation technology requires the "solar-panel-equipment" technology as a prerequisite. This was done since to me it doesn't make sense to research a module that requires energy before it can be charged. Hence why your code won't do anything since it won't find the string "modular-armor". So the automatic replacement won't work unless you include the solar-panel-equipment as well. You could, however, simply add the armour_1 to its prerequistes and it should work.

a month ago

I have beta versions on my discord at the moment that would make every thing slightly work. 100% with your mod but i see bugs regarding other mods atm. that i will fix as fast i get some sleep.

New response