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
18 days ago
1.1 - 2.0
1.20K

b Distance change crash

21 days ago
(updated 21 days ago)

Upon changing distance from 1000 to 10 or 1, atteping to teleport freezes the game and gives:

The mod Teleportation Equipment (1.0.11) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event TeleportationEquipment::on_player_used_capsule (ID 89)
TeleportationEquipment/control.lua:73: attempt to index global 'charplayeracter' (a nil value)
stack traceback:
TeleportationEquipment/control.lua:73: in function 'teleport_player'
TeleportationEquipment/control.lua:93: in function <TeleportationEquipment/control.lua:86>

Also, few keys missing for Setting descriptions:

Startup: https://i.imgur.com/6S3SgTZ.png
Map: https://i.imgur.com/iECF7Si.png

Shortcut right click damages buildings? This seems to be the lag i experienced.

21 days ago

Thank you very much for the report. The crash regarding the distance should be fixed. It appears that instead of replacing a variable, I inserted the new one leading to an invalid variable.

The missing locale should be fixed as well. Unfortunately, I couldn't replicate the damaged building. But as the shortcut gives you a capsule that does 0 damage, there could be an issue. I will investigate.

21 days ago
(updated 21 days ago)

I though its my weapons first, as i also have shooting at Right Click, so i put the gun away and ammo too, but still happens.
If i use the shortcut command for teleport it does not damage anything Ctrl + Shift + T (thus no lag)
The range of the damage circle is seems to be massive as well, aprox 31 chunks, which is very close to 1000 tiles set by the mod: https://i.imgur.com/DI6JD1b.jpeg

Might be some mod bad interaction, hard to tell what.

19 days ago

I assume its a bad mod interaction as the damage hasn't happen to others. Do you have a mod installed that changes capsules in some way or the general gameplay? I assume a mod changed the damage value of zero to something else.

19 days ago
(updated 19 days ago)

Identified the culprit mod, Combat mechanics overhaul.
https://mods.factorio.com/mod/combat-mechanics-overhaul

Thanks for fixing the previous issues.
Can you explain how distance settings work? It does not seems to effect anything when i change it. I think if it changes items stats it needs to be a startup settings no?

Changing the power usage also locks you from teleporting anywhere with "Equipment need to be fully charged before teleporting". Batteries are 100% and Teleportion device shows 100% bar.

18 days ago
(updated 18 days ago)

Turns out the distance setting didn't work since updating the mod to space age and changing the equipment type to active-defence. Back then, I changed the calculation of the maximum distance so it took the value from the equipment range. But this value was hard coded instead of being a startup setting. It also affected the message regarding the equipment not being charged.

I have now changed the calculation to use the correct setting value. I keep the hard coded range for the equipment, however, since I want to allow players to change the maximum distance on runtime. The hard coded value should only affect the green circle when having the shortcut in the cursor.

New response