Info on some of the settings in the files for mods requested

Place to get help with not working mods / modding interface.
midnight109
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Thu Jun 27, 2013 3:59 pm
Contact:

Info on some of the settings in the files for mods requested

Post by midnight109 »

Ok so I managed to add a few mods into a pack, and while they work like I want them to, I dont understand what some of the info is for or how to use it for when needed, so here we go >.>

Starting off in the Entity file

Code: Select all

{
    collision_box = {{-1.4, -1.4}, {1.4, 1.4}},
    selection_box = {{-1.5, -1.5}, {1.5, 1.5}},
    picture =
    {
      filename = "image",
      priority = "high",
      width = 52,
      height = 48
    },
shift = {0.25, 0},
  },
Ok in that Block, the numbers for Selection and Collision, is that Pixies or a grid and if a grid what is the grid size? If you set the collision to 0 would the item become like a deco item like a rug ie can walk overtop of ?
The Image priority, I see thier are diffrent prioritys based on what is reffering to, so is it the priority on images for like the order its loaded? Like a means to "layer" a image?
What is the "shift" param for?
effectivity = 0.5, what would this mean for things like dilling units? If the energy_usage_per_tick controls the electric usage and the mining_speed controls how fast it gathers/ectracts/ resources, that what does the effectivity change for a entity?


Also in the Items data file, order = "h-h-b",for example, what is the order? I can understand for example a order X being its importance on the listing order in the menu/gui, like load A before B but what is to order "a-d-g" do? is it like a multi ordering for like if you have 5 things for order A then go by second letter then third?


Also have a question on the "global" table. From my understanding on the wiki, all the data is loaded into a more or less like a global array of data, thinking in C++ and PHP a global can be edited by any function not just a relative function. So if for example I wanted to make a research project that "improves" the efficeny of something, say I want to add a research set that each step adds 5% to the speed of a factory crafting ability. Or to reduce the energy usage each step, how do you use the Modifier flag in the tech lua to do it? The ones thier for the lab speed I cant seem to trace how they work, thier is a lua for the name-modifier but how does that effect a accual value of data? Like the lab efficency has a modify value of 0.2 and in the name lua dosent seem to directly point to the "lab" or a lab param so how does it modify the lab speed/efficeny?
User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: Info on some of the settings in the files for mods reque

Post by FreeER »

midnight109 wrote:Starting off in the Entity file
Ok in that Block, the numbers for Selection and Collision, is that Pixies or a grid and if a grid what is the grid size? If you set the collision to 0 would the item become like a deco item like a rug ie can walk overtop of ?
Grid, 1 = 32 pixels. As for setting the collision to 0, that 'may' crash the game I haven't tried. However you can simply not add a collision property, in which case yes you are capable of walking right over it (or if you do so to a car it can drive over water and through trees xD)
The Image priority, I see thier are diffrent prioritys based on what is reffering to, so is it the priority on images for like the order its loaded? Like a means to "layer" a image?
I think this is actually the priority for Factorio's rendering thread, not the order of loading.
What is the "shift" param for?
This is used to shift the image/selections&collisons boxes when displayed in game (in case the image is off center, eg. check out the tree descriptions). Again I believe this would be a 1 = 32px ratio
effectivity = 0.5, what would this mean for things like dilling units? If the energy_usage_per_tick controls the electric usage and the mining_speed controls how fast it gathers/ectracts/ resources, that what does the effectivity change for a entity?
If I remember correctly the actual mining speed is a multiplication of mining_speed and effectivity.
Also in the Items data file, order = "h-h-b",for example, what is the order? I can understand for example a order X being its importance on the listing order in the menu/gui, like load A before B but what is to order "a-d-g" do? is it like a multi ordering for like if you have 5 things for order A then go by second letter then third?
The order in the item descriptions are the order in which they are displayed in the player's inventory. And yes if you have 5 things that start with a those five would then be ordered by the next letter. Thus 3 items of a-b-d, a-b-g, b-b-g they would be arranged in the order listed with the two that start with a being the first two items in the player's inventory and then the one starting with b. If you have two with the exact same order then I believe one is randomly selected to be first.
Also have a question on the "global" table. From my understanding on the wiki, all the data is loaded into a more or less like a global array of data, thinking in C++ and PHP a global can be edited by any function not just a relative function.
I assume you mean the glob table. This is not a Global table like you are thinking, this is simply a table that will be saved with save files of the map. So that modders may store variables inside and have them 'reliably' loaded when the player starts the game again. You can not affect other mods coding from your mod without the other mod implementing a remote interface (there is an example of this inside of Factorio's freeplay data\base\scenarios\freeplay\control.lua "remote.addinterface" and the wiki page is here). The exception is that you can change the descriptions of a mod (or of the base) using the data.raw in the but only while your mod is being loaded in game, just a note but your mod needs to be loaded after the mod you want to change when using data.raw.
So if for example I wanted to make a research project that "improves" the efficeny of something, say I want to add a research set that each step adds 5% to the speed of a factory crafting ability. Or to reduce the energy usage each step, how do you use the Modifier flag in the tech lua to do it? The ones thier for the lab speed I cant seem to trace how they work, thier is a lua for the name-modifier but how does that effect a accual value of data? Like the lab efficency has a modify value of 0.2 and in the name lua dosent seem to directly point to the "lab" or a lab param so how does it modify the lab speed/efficeny?
Improving things by research is very limited right now. There is a wiki page describing technology modifiers here. As for how the lab modifier works, it's hard coded to affect the speed of all labs by the the amount specified by the modifier.
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me :)
Or drop into #factorio on irc.esper.net
zaybu
Manual Inserter
Manual Inserter
Posts: 1
Joined: Thu Aug 27, 2015 6:44 am
Contact:

Re: Info on some of the settings in the files for mods requested

Post by zaybu »

I unable to understand the decoration of Rug?
Rug Culture Online https://www.clicknbuyaustralia.com/brand/rug-culture/ Australia @ 70% OFF SALE.
Post Reply

Return to “Modding help”