Is there any Blueprint String to Lua converter?
Posted: Tue May 29, 2018 4:40 pm
I want to convert blueprint strings like this:
0eNqdm91u20YQhV+l4LUUcH+51H2eIJdBEMg26xKgSIGiihqG3z1U3NZCwhW/oytDsvXpzO7OjHxm9Vo8dOfmOLb9VOxei/Zx6E/F7utrcWqf+313eW56OTbFrmin5lBsin5/uDyaxn1/Og7jtH1ouql42xRt/9T8U+zM22b1xadp6Jvtn+ex3z82V6+1b982RdNP7dQ27yp+Pnj53p8PD804w3PvvymOw2l+2dBf3nRGbetN8TL/iDP9qR2bx/ff2Yu6X6CWQysMdRyaMNRzaMDQwKERQyOHOgytONRjaOJQswj1C9CaQy1WakpMNRzKU4pvlOEpJYTPU4offsNTih8pw1OKFxTDU4qnqeEpxeup4SnFS5/hKXXJE1r6y0xPWqjSn/49Ve5TeFtCfSRS25+acZqfzHalsF5CrMXS4po0R6RVXNpH0pwO+67bNt3852P7uD0OXZNvRn5RXMBxurU4I4nT8zgrLM2sSdPbTADHtyYBWxyww+mwFq/7yIbz/NlufB6H+Wcm4nI54M3/Hx774/nyEfP3d7EgfsPDd9q5Lm8ca+fpUq6dahdAkI4HGdU2uqyqEjbYr2zwcJ5yO5y0LblVaVxNt2StoPoSbEnEW+INFbbWhDxJiMSFiQlhbmWE90KDtEDcR150Q/+8/Ws/n8On7Q124uwodEzCq35ZyG5/OOYbpV1cv6TGG7m+WmU7zA6l0JUJz6haDWdboaESnkP7Xt7Y9uB5jyOK1KwRgo28UREcy5lbKRPUlBFOoZoxvFhEobsQnJovvARHod0QHMsWcytdopctQgPsLMEk+08ewUZVbAmglayVUJPskpIFqGWbFFCrUtUKFqAyqlQCtbKjS+J3sqVLqLL7TBZAdp8JVHefSfy6/UyoSdVKFqBWpQJoKmULA8SfjGyVE6pVtZIFcKpUAvWqqU/C51nFm1WKolISfSUKJcykTjRI8LU60QDQuhSVguhrIwolTKtaRiR4p05eCNSLSkn0QRRKmFGdEJHgK3VCRKBJVEqir0WhJRmOluooyxCqUWdZiGpFrWgBnCgVQb08ILPL1qQpA/f/zDIhyiOxrJjqPvMwIyxxuzBDqBWDcJlxdT9AMggzNCPP5XKLfXUdQHIXM8Ic9xMzBC/P9bKhhfvMyIywyO3HDKFSJ3jZyJJgXWbE1Ni6XAbw8fzaEbTmLtszI8tiozMDcIK1mUH4u6zNDCyok7HsOse7bNGMrAoboRlAUgdr2bjqu0zUZVmuxLZpBmAUozTDsLwd+2WCcK0kQ7jvIolbhgXeFzJyouoaeHJtreJFPaMryZcpvHyXwjherZdlXk3FhesTy5vpDS6xGTHq/6x+fT5hrubh9NKD1+88GO/vufSQWciAa2hmISMuVhlAddclgkw4SZ2YBHIJVB5DEGqQxxCIalTHHFHlQQSiOtWHRlSvWuaIGtTiv/xJIUTVJUbqKtF8RVDVKUVQ1Skl0FiKHhyCGrFFIKgVvS0EdaIJh6Be9IsQNIjOFoJG9e73b9Rvm/evIO2uvu60Kbr9TJmf+7wfu5c/vhxmZNs/z7/4uxlPP18ZU2VNcrF0c3P7AeCWj3g=
to Lua files, like this:
local ce = entity.surface.create_entity
local fN = entity.force
local center = entity.position
ce{name = "express-transport-belt", position = {center.x + (-1), center.y + (-5)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (-2), center.y + (-5)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (1), center.y + (-5)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (0), center.y + (-5)}, force = fN}
ce{name = "express-splitter", position = {center.x + (-1.5), center.y + (-4)}, force = fN}
ce{name = "express-underground-belt", position = {center.x + (-1), center.y + (-3)}, force = fN,type = "output"}
ce{name = "express-transport-belt", position = {center.x + (-2), center.y + (-3)}, force = fN}
ce{name = "express-splitter", position = {center.x + (0.5), center.y + (-4)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (1), center.y + (-3)}, force = fN}
ce{name = "express-underground-belt", position = {center.x + (0), center.y + (-3)}, force = fN,type = "output"}
ce{name = "express-transport-belt", position = {center.x + (-1), center.y + (-2)}, force = fN,direction = 6}
ce{name = "express-splitter", position = {center.x + (-0.5), center.y + (-1)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (-2), center.y + (-2)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (1), center.y + (-2)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (0), center.y + (-2)}, force = fN,direction = 2}
ce{name = "express-transport-belt", position = {center.x + (-1), center.y + (0)}, force = fN}
ce{name = "express-underground-belt", position = {center.x + (-1), center.y + (1)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (-2), center.y + (1)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (-2), center.y + (0)}, force = fN,direction = 2}
ce{name = "express-transport-belt", position = {center.x + (1), center.y + (0)}, force = fN,direction = 6}
ce{name = "express-transport-belt", position = {center.x + (1), center.y + (1)}, force = fN}
ce{name = "express-underground-belt", position = {center.x + (0), center.y + (1)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (0), center.y + (0)}, force = fN}
ce{name = "express-splitter", position = {center.x + (-0.5), center.y + (2)}, force = fN}
ce{name = "express-splitter", position = {center.x + (-1.5), center.y + (3)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (-2), center.y + (2)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (1), center.y + (2)}, force = fN}
ce{name = "express-splitter", position = {center.x + (0.5), center.y + (3)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (-1), center.y + (4)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (-2), center.y + (4)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (1), center.y + (4)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (0), center.y + (4)}, force = fN}
Is there a easy way?
0eNqdm91u20YQhV+l4LUUcH+51H2eIJdBEMg26xKgSIGiihqG3z1U3NZCwhW/oytDsvXpzO7OjHxm9Vo8dOfmOLb9VOxei/Zx6E/F7utrcWqf+313eW56OTbFrmin5lBsin5/uDyaxn1/Og7jtH1ouql42xRt/9T8U+zM22b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mAUozTDsLwd+2WCcK0kQ7jvIolbhgXeFzJyouoaeHJtreJFPaMryZcpvHyXwjherZdlXk3FhesTy5vpDS6xGTHq/6x+fT5hrubh9NKD1+88GO/vufSQWciAa2hmISMuVhlAddclgkw4SZ2YBHIJVB5DEGqQxxCIalTHHFHlQQSiOtWHRlSvWuaIGtTiv/xJIUTVJUbqKtF8RVDVKUVQ1Skl0FiKHhyCGrFFIKgVvS0EdaIJh6Be9IsQNIjOFoJG9e73b9Rvm/evIO2uvu60Kbr9TJmf+7wfu5c/vhxmZNs/z7/4uxlPP18ZU2VNcrF0c3P7AeCWj3g=
to Lua files, like this:
local ce = entity.surface.create_entity
local fN = entity.force
local center = entity.position
ce{name = "express-transport-belt", position = {center.x + (-1), center.y + (-5)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (-2), center.y + (-5)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (1), center.y + (-5)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (0), center.y + (-5)}, force = fN}
ce{name = "express-splitter", position = {center.x + (-1.5), center.y + (-4)}, force = fN}
ce{name = "express-underground-belt", position = {center.x + (-1), center.y + (-3)}, force = fN,type = "output"}
ce{name = "express-transport-belt", position = {center.x + (-2), center.y + (-3)}, force = fN}
ce{name = "express-splitter", position = {center.x + (0.5), center.y + (-4)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (1), center.y + (-3)}, force = fN}
ce{name = "express-underground-belt", position = {center.x + (0), center.y + (-3)}, force = fN,type = "output"}
ce{name = "express-transport-belt", position = {center.x + (-1), center.y + (-2)}, force = fN,direction = 6}
ce{name = "express-splitter", position = {center.x + (-0.5), center.y + (-1)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (-2), center.y + (-2)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (1), center.y + (-2)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (0), center.y + (-2)}, force = fN,direction = 2}
ce{name = "express-transport-belt", position = {center.x + (-1), center.y + (0)}, force = fN}
ce{name = "express-underground-belt", position = {center.x + (-1), center.y + (1)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (-2), center.y + (1)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (-2), center.y + (0)}, force = fN,direction = 2}
ce{name = "express-transport-belt", position = {center.x + (1), center.y + (0)}, force = fN,direction = 6}
ce{name = "express-transport-belt", position = {center.x + (1), center.y + (1)}, force = fN}
ce{name = "express-underground-belt", position = {center.x + (0), center.y + (1)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (0), center.y + (0)}, force = fN}
ce{name = "express-splitter", position = {center.x + (-0.5), center.y + (2)}, force = fN}
ce{name = "express-splitter", position = {center.x + (-1.5), center.y + (3)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (-2), center.y + (2)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (1), center.y + (2)}, force = fN}
ce{name = "express-splitter", position = {center.x + (0.5), center.y + (3)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (-1), center.y + (4)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (-2), center.y + (4)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (1), center.y + (4)}, force = fN}
ce{name = "express-transport-belt", position = {center.x + (0), center.y + (4)}, force = fN}
Is there a easy way?