Allow accessing equipment prototype

Post Reply
User avatar
SHiRKiT
Filter Inserter
Filter Inserter
Posts: 706
Joined: Mon Jul 14, 2014 11:52 pm
Contact:

Allow accessing equipment prototype

Post by SHiRKiT »

Currently, there's already a way to get attributes from item/entity/fluid prototypes, but there's no actual way of getting attributes from an equipment. The goal I wanted to achieve is to allow supporting moded personal roboports on the mod I created, by getting the number of bots supported by a personal roboport and the range it covers.

I'm leaving this here just as a reminder for Rsending.

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: Allow accessing equipment prototype

Post by Adil »

Wait a minute, you cannot alter or create prototypes ingame. You wouldn't be able to grab the vanilla personal roboport parameters on the fly and put them in your modded one.
During the data loading process you have the access to all prototypes that are already loaded and vanilla roboport is accessible under

Code: Select all

data.raw['roboport-equipment']['personal-roboport-equipment']
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Allow accessing equipment prototype

Post by DaveMcW »

data.raw is not accessible from control.lua.

vzybilly
Fast Inserter
Fast Inserter
Posts: 143
Joined: Thu May 14, 2015 6:10 pm
Contact:

Re: Allow accessing equipment prototype

Post by vzybilly »

I think the full thing here would be to change values of prototypes in a game, like a tech to increase personal roboport range?

more of a moddy way, if you're standing on concrete then it's range increases to the same change as walking speed?
Will code for Food. I also have 11+ mods!

Post Reply

Return to “Implemented mod requests”