Search found 6 matches

by DeathTech
Thu May 05, 2016 4:04 pm
Forum: Modding help
Topic: Loading data from script-output
Replies: 6
Views: 3034

Re: Loading data from script-output

prg wrote:You just do global.my_variable = my_value and global.my_variable will still have my_value after a save/load.
Well that worked, I think.

Don't know why it didn't work before when I tried that method. But it works now. Thanks guys.
by DeathTech
Thu May 05, 2016 3:50 pm
Forum: Modding help
Topic: Loading data from script-output
Replies: 6
Views: 3034

Re: Loading data from script-output

No, you can't load/read data from script-output.

Use the global table instead: https://wiki.factorio.com/index.php?title=Lua/Data_Lifecycle#global
Everything stored there will be saved in the savegame and is still there after loading the save.

I though as much, though people keep telling to ...
by DeathTech
Thu May 05, 2016 3:33 pm
Forum: Modding help
Topic: Loading data from script-output
Replies: 6
Views: 3034

Loading data from script-output

Is there a way to load a file from script-output into our control.lua?

Or in another way, how do we store data for mods?
I would like to know how to store / retrieve data.
by DeathTech
Fri Apr 29, 2016 8:34 pm
Forum: Modding help
Topic: What defines contructable for const bots?
Replies: 4
Views: 1538

Re: What defines contructable for const bots?

That mod is plenty to get the job done I think.

I have in the meantime already created a "placeable tree" using a modified solar panel.
If I modify some stuff I should be able to change this to replace the construction event and swap the constructions.

Thanks for the help.
I will let you guys know ...
by DeathTech
Fri Apr 29, 2016 12:28 pm
Forum: Modding help
Topic: What defines contructable for const bots?
Replies: 4
Views: 1538

Re: What defines contructable for const bots?

probably the flag "player-creation" is needed. Or maybe it's that "tree" type is hardcoded to be ignored in this respect.

If anything else fails, you can have a dummy entity of some surely buildable type and then replace it with real tree whenever player or bot places one.

Yeah i'm pretty sure ...
by DeathTech
Thu Apr 28, 2016 9:28 am
Forum: Modding help
Topic: What defines contructable for const bots?
Replies: 4
Views: 1538

What defines contructable for const bots?

Hey guys, I was wondering if anyone knew.

I am basically working on my own mod, and I wanted to mod some trees that can be grown.
But however I can't seem to get my tree to be auto placed by the construction robots.

And I can not place a building ghost. Despite refusing to do this it does not ...

Go to advanced search