[Done] Autoplace Help

Place to get help with not working mods / modding interface.
Post Reply
TheSAguy
Smart Inserter
Smart Inserter
Posts: 1449
Joined: Mon Jan 13, 2014 6:17 pm
Contact:

[Done] Autoplace Help

Post by TheSAguy »

Hi,

I'm trying to remove the autoplace from my worms, but the result is the opposite. I get all worms.

I'm copying the base game worm, and updating it's values
I thought all I had to do was give autoplace = {}

Code: Select all

local big_player_worm = util.table.deepcopy(data.raw["turret"]["big-worm-turret"])
big_player_worm.name = "big-worm-turret-player"
big_player_worm.flag = {"placeable-player", "not-repairable", "player-creation", "breaths-air"}
big_player_worm.minable = {hardness = 1.5, mining_time = 1.6, result = "big-worm-hatching-exhausted"}
big_player_worm.autoplace = {}
data:extend({big_player_worm})
What I get:
Image

How do I remove the autoplace?

Thanks.
Last edited by TheSAguy on Mon Mar 25, 2019 5:54 pm, edited 1 time in total.

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Autoplace Help

Post by orzelek »

Check in RSO in file prototype_utils.lua.
Method removeProbability is used for entities.

(And I did have screenshots like these earlier when upgrading the mod).
I think that setting autoplace.probability_expression to nill might also work now since it was added recently to react on nil properly.

TheSAguy
Smart Inserter
Smart Inserter
Posts: 1449
Joined: Mon Jan 13, 2014 6:17 pm
Contact:

Re: Autoplace Help

Post by TheSAguy »

Thanks Orzelek,

I looked at RSO and got it working using big_player_worm.autoplace = nil vs. big_player_worm.autoplace = {}

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Autoplace Help

Post by orzelek »

TheSAguy wrote:
Mon Mar 25, 2019 5:54 pm
Thanks Orzelek,

I looked at RSO and got it working using big_player_worm.autoplace = nil vs. big_player_worm.autoplace = {}
Hmm thats the option that didn't work for me before... might need to simplify whole thing. I wonder if it will work on resources.

Post Reply

Return to “Modding help”