[Mod 0.15] Shift Tool

Tools which are useful for mod development.
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

[Mod 0.15] Shift Tool

Post 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!
Last edited by darkfrei on Sat Dec 16, 2017 9:56 pm, edited 6 times in total.
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: [Mod 0.14] Shift Tool

Post by darkfrei »

The mod is not for playing, please don't use it for the game.
User avatar
Shenpen
Fast Inserter
Fast Inserter
Posts: 227
Joined: Sat Aug 27, 2016 2:46 pm
Contact:

Re: [Mod 0.15] Shift Tool

Post by Shenpen »

This one I need, so that I can stop facepalming.Thank you for sharing!
User avatar
moon69
Fast Inserter
Fast Inserter
Posts: 183
Joined: Sun Sep 18, 2016 6:53 pm
Contact:

Re: [Mod 0.16] Shift Tool

Post 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
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [Mod 0.16] Shift Tool

Post 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.
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: [Mod 0.16] Shift Tool

Post 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.
Post Reply

Return to “Development tools”