Page 1 of 1

[Mod 0.15] Shift Tool

Posted: Wed Apr 19, 2017 8:26 pm
by darkfrei
Hi all!
The mod you can find at mod portal: https://mods.factorio.com/mods/darkfrei/Shift_Tool

This is a mod, that says what the shift are you need. This toll you are need when you make your own graphics with shadows, but your graphics is not in the middle of the collision box.

For example:

Entity
type = "assembling-machine",
name = "assembling-machine-3",

Code: Select all

animation =
    {
      filename = "__base__/graphics/entity/assembling-machine-3/assembling-machine-3.png",
      priority = "high",
      width = 142,
      height = 113,
      frame_count = 32,
      line_length = 8,
      shift = {0.84, -0.09}
    },
How to use this tool
old versions

code
New shift in this example is the same like in vanilla. Yey!

Re: [Mod 0.14] Shift Tool

Posted: Wed Apr 19, 2017 8:36 pm
by darkfrei
The mod is not for playing, please don't use it for the game.

Re: [Mod 0.15] Shift Tool

Posted: Sat Dec 16, 2017 8:32 pm
by Shenpen
This one I need, so that I can stop facepalming.Thank you for sharing!

Re: [Mod 0.16] Shift Tool

Posted: Tue Jul 03, 2018 2:26 pm
by moon69
Hi Darkfrei,

I'm trying to use this tool in 0.16.51... it loads correctly, I can make the tool, select it and rotate it, but no matter where I click the entity graphic (stone furnace) doesn't move and the tool just generates:
shift = {x=0, y=0}

No other mods are enabled, new game, no obvious errors in factorio-current.log.

I think it was broken in https://wiki.factorio.com/Version_histo ... .0#0.16.37 ...
LuaEntity::teleport puts entity to correct location on the grid when it doesn't have the off-grid flag.
I confirmed the tool still works for landmines (which has entity.prototype.flags["placeable-off-grid"] = true).

Cheers,
moon

Re: [Mod 0.16] Shift Tool

Posted: Tue Jul 03, 2018 2:34 pm
by eradicator
moon69 wrote:I confirmed the tool still works for landmines (which has entity.prototype.flags["placeable-off-grid"] = true).
1) Add flag to your own entity
2) Get shift
3) Remove flag
4) ???
5) Profit

I'm suprised teleport didn't autocorrect in all cases before.

Re: [Mod 0.16] Shift Tool

Posted: Tue Jul 03, 2018 3:16 pm
by darkfrei
eradicator wrote:I'm suprised teleport didn't autocorrect in all cases before.
The mod was broken by game update in april and I've not read about this problem before.