Search found 7 matches

by Yulgalminakf
Mon Mar 21, 2016 5:44 am
Forum: Modding help
Topic: Access to a robot's energy
Replies: 3
Views: 1404

Re: Access to a robot's energy

Yes. Tried that. I get an error saying "Entity doesn't have an energy_source."
by Yulgalminakf
Sun Mar 20, 2016 3:11 am
Forum: Modding help
Topic: Access to a robot's energy
Replies: 3
Views: 1404

Access to a robot's energy

I wanted to create a robot charging pole that charges every robot within a certain radius. In control.lua, I have everything working except the actual charging of robots. How can I get access to and change the robot's energy levels?

This is what I have so far:


local radius = 50
local ...
by Yulgalminakf
Wed Mar 16, 2016 9:53 pm
Forum: Mods
Topic: [0.11.x] Magnet
Replies: 26
Views: 34290

Re: [0.11.x] Magnet

Hi everyone! I loved this mod, but unfortunately, it doesn't work in 0.12 since there were a lot of name changes to the scripting stuffs. Well, it didn't work, until now!

I went through and updated the mod. Basically, all that changed was some naming conventions, so I added a bunch of under-scores ...
by Yulgalminakf
Fri Jun 12, 2015 3:40 am
Forum: Modding help
Topic: Experienced C++ programmer new to LUA
Replies: 5
Views: 2900

Re: Experienced C++ programmer new to LUA

It'd only really take a performance hit at load/compile time if done properly.

And no, I'm trying to access the number of filters, not set them. I'm attempting to loop through all of the filters in the inserter and add them to the inventory it's pointed at (trying to make a creative chest, based ...
by Yulgalminakf
Wed Jun 10, 2015 3:20 am
Forum: Won't implement
Topic: [Reques] entity.prototype return specific prorotype
Replies: 3
Views: 5288

Re: [Reques] entity.prototype return specific prorotype

Yes, this would be a perfect option. I'd love it if keys didn't have to be added in the C++ code for it to be accessible in lua. Hide only the more important variables that would break the game if changed.
by Yulgalminakf
Wed Jun 10, 2015 3:09 am
Forum: Modding help
Topic: Experienced C++ programmer new to LUA
Replies: 5
Views: 2900

Re: Experienced C++ programmer new to LUA

Really? Every new variable added in lua has to be added in C++ as well? Not only that, it has to be allowed to access it? That's kinda lame and doesn't allow for much creativity in the creation of mods if only the very basic properties are allowed to be accessed and changed.
Even for alpha, that ...
by Yulgalminakf
Wed Jun 10, 2015 12:37 am
Forum: Modding help
Topic: Experienced C++ programmer new to LUA
Replies: 5
Views: 2900

Experienced C++ programmer new to LUA

I'm trying to obtain access to a variable in an entity prototype.

for i = 1, game.entityprototypes["item-name"].filter_count do

Comes up with an error saying that item prototypes doesn't contain the key "filter_count". However, the item I'm trying to access does have a filter_count, it's a smart ...

Go to advanced search