[MOD 0.10.x] Telelogistics v0.2.4

Topics and discussion about specific mods
gnemonix
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sun Apr 27, 2014 10:06 pm
Contact:

Re: [MOD 0.9.x] Telelogistics v0.1.2

Post by gnemonix »

darius456 wrote:
Gonozal wrote:Seems like there is another small but annoying bug:

When I install the mod all filtert options for the smart inserter are filled with near endless copies of the MK2 and MK3 tele inserter.

I'm using the latest version of Factorio.
Link. If you know how to fix it please tell me.
I played around with your mod to see if I could resolve this and found out that it works just fine without the need to define all 1024 unique recipes and items such as:

<mod_path>/Telelogistics/prototypes/recipe/telelogistics.lua
lines 66 - 9577

Code: Select all

type = "recipe",
    name = "tele-inserter-mk4-1",
and

<mod_path>/Telelogistics/prototypes/item/telelogistics.lua
lines 58 - 10338

Code: Select all

type = "item",
    name = "tele-inserter-mk4-1",
Hope this helps.

--
Happy Building!

User avatar
darius456
Fast Inserter
Fast Inserter
Posts: 222
Joined: Thu Jan 02, 2014 6:33 am
Contact:

Re: [MOD 0.9.x] Telelogistics v0.1.2

Post by darius456 »

Woow that is a brilliant idea. I will try it, and if it work I will do another update. Thx for help.
Lenovo Y580 8GB Ram GF660m 128GB SSD W7

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: [MOD 0.9.x] Telelogistics v0.1.2

Post by FreeER »

gnemonix wrote:define all 1024 unique recipes and items
this made me take another look at your code...and I um, rewrote the entities file like so. Seems simpler/shorter to me but I'm not certain as to the loading time so you might want to check that if you use it :)

User avatar
darius456
Fast Inserter
Fast Inserter
Posts: 222
Joined: Thu Jan 02, 2014 6:33 am
Contact:

Re: [MOD 0.9.x] Telelogistics v0.1.2

Post by darius456 »

FreeER wrote:
gnemonix wrote:define all 1024 unique recipes and items
this made me take another look at your code...and I um, rewrote the entities file like so. Seems simpler/shorter to me but I'm not certain as to the loading time so you might want to check that if you use it :)
Thank you for your work. I was trying to do this but with no success. So I have one question... Can I use it in my mod and make official update useing part or all of Your code?
Lenovo Y580 8GB Ram GF660m 128GB SSD W7

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: [MOD 0.9.x] Telelogistics v0.1.2

Post by FreeER »

darius456 wrote:Can I use it in my mod
absolutely, use as much or as little as you would like :D I wouldn't have bothered sharing it if I didn't want you to be able to use it :lol:

User avatar
darius456
Fast Inserter
Fast Inserter
Posts: 222
Joined: Thu Jan 02, 2014 6:33 am
Contact:

Re: [MOD 0.9.x] Telelogistics v0.1.3

Post by darius456 »

To FreeEr:
Calculation of the power* values for each teleinserter use this formula:
For mk1: value in table = (10^(X/50))*44000
For mk2: value in table = (10^(X/49,5))*50000
For mk3: value in table = (10^(X/49))*56000
For mk4: value in table = (10^(X/48,5))*62000

where X is variable from 1 to 128,5 with step of 0,5

I think that simpler is to use tables, and I'm almost sure that using table is faster then calculating all the values.
But I will create two version of entity.lua first with table second with formulas, and I will compare loading time, and let You know.

Ps. Could you help me in understanding this line of Your code: nextEntity.order = modularName .. "-place" I know what is nextEntity and modularName but what is order?
nextEntity.order is used only once.

Ps2. I thing that this nextEntity.icon = nextEntity.icon .. modularName .. ".png" line should be little higher. Before if i ~= 0 then.
I think that nextEntity.icon = nextEntity.icon .. modularName .. ".png" will generate:
icon = "__Telelogistics__/graphics/icons/tele-inserter-mk2.png",
icon = "__Telelogistics__/graphics/icons/tele-inserter-mk2-1.png",
icon = "__Telelogistics__/graphics/icons/tele-inserter-mk2-2.png",
icon = "__Telelogistics__/graphics/icons/tele-inserter-mk2-3.png",... etc.
Becouse of this line: nextEntity.name = modularName .. "-" .. i
Lenovo Y580 8GB Ram GF660m 128GB SSD W7

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: [MOD 0.9.x] Telelogistics v0.1.3

Post by FreeER »

darius456 wrote:I think that simpler is to use tables, and I'm almost sure that using table is faster then calculating all the values.
Yeah, probably :)
darius456 wrote:nextEntity.order = modularName .. "-place"
This is creating the order string for the entity, which was "tele-inserter-mkX-place" where X is the number 1-4, as in the old version (I tried not to change what the prototypes were, only how they are found/created). Anything that is inside of NextEntity is part of the prototype definition that is going to be read by Factorio. :)
darius456 wrote:I think that nextEntity.icon = nextEntity.icon .. modularName .. ".png" will generate:
hm...no, it would have if I'd used nextEntity.name for the icon but I used modularName instead, nextEntity.icon = nextEntity.icon .. modularName .. ".png". The ModularName variable almost an after thought, I'd gotten most of it done and then looked at the code I'd written and noticed that I was using constants.name .. h quite a bit (constants.name because I'd already changed the entity name to be ...X-Y), so why not do that only once and place it in a variable? You might also note that if it was generating ...X-Y.png, aka mk2-1.png, etc. then Factorio would have failed to find those icons when it tried to load them (and it did do that initially because I had used nextEntity.name, and I had to figure out the best way to resolve that. I chose creating/using modularName)

User avatar
darius456
Fast Inserter
Fast Inserter
Posts: 222
Joined: Thu Jan 02, 2014 6:33 am
Contact:

Re: [MOD 0.9.x] Telelogistics v0.1.3

Post by darius456 »

True... Sorry... My fault.
Ps. But you do not change *.png of inserter so mk1,2,3,4 look the same. Fixed allready.
Ps2. Converted entity.lua from table to formula version and do not observed any loading time increasing. So I will use formula version becouse it's easier to extend.
Lenovo Y580 8GB Ram GF660m 128GB SSD W7

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: [MOD 0.9.x] Telelogistics v0.1.3

Post by FreeER »

darius456 wrote:True... Sorry... My fault.
No problem, you now understand how it is working better :)
darius456 wrote:Ps. But you do not change *.png of inserter so mk1,2,3,4 look the same. Fixed allready.
Oops, sorry, but good that you can fix it now :D
darius456 wrote:Ps2. Converted entity.lua from table to formula version and do not observed any loading time increasing. So I will use formula version becouse it's easier to extend.
Interesting, I actually was expecting a bit of an increase...but yeah, it does make it easier to modify/extend if there's no noticeable increase in loading.

filippe999
Long Handed Inserter
Long Handed Inserter
Posts: 52
Joined: Sat May 03, 2014 12:45 pm
Contact:

Re: [MOD 0.9.x] Telelogistics v0.1.3

Post by filippe999 »

What about a config file to setup the energy requirement for teleporting over distance but still be limited to 256 blocks? that way you can be your own judge

User avatar
darius456
Fast Inserter
Fast Inserter
Posts: 222
Joined: Thu Jan 02, 2014 6:33 am
Contact:

Re: [MOD 0.9.x] Telelogistics v0.1.3

Post by darius456 »

filippe999 wrote:What about a config file to setup the energy requirement for teleporting over distance but still be limited to 256 blocks? that way you can be your own judge
My apologise filippe but I have no idea what are you talking about, could you describe it little more.
Lenovo Y580 8GB Ram GF660m 128GB SSD W7

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: [MOD 0.9.x] Telelogistics v0.1.3

Post by FreeER »

darius456 wrote:My apologise filippe but I have no idea what are you talking about, could you describe it little more.
I think what he'd like is for you to separate the power formulas into a different file so that he can modify them easily...though I don't think it's really necessary since the entitie.lua file is now quite small and easy to see where the formulas are if someone wanted to change them. I could be wrong however, but that's what a config file is often for in other programs (it's actually fairly rare for Factorio mods to be changed by it's users I think, so most mods don't have dedicated config files)

User avatar
darius456
Fast Inserter
Fast Inserter
Posts: 222
Joined: Thu Jan 02, 2014 6:33 am
Contact:

Re: [MOD 0.9.x] Telelogistics v0.1.3

Post by darius456 »

FreeER wrote:
darius456 wrote:My apologise filippe but I have no idea what are you talking about, could you describe it little more.
I think what he'd like is for you to separate the power formulas into a different file so that he can modify them easily...though I don't think it's really necessary since the entitie.lua file is now quite small and easy to see where the formulas are if someone wanted to change them. I could be wrong however, but that's what a config file is often for in other programs (it's actually fairly rare for Factorio mods to be changed by it's users I think, so most mods don't have dedicated config files)
I thought that He thought about that... but i see no reason to create a separate confing file. All values that are responsible for power consumption are clear to Me, and if you want to change it you will have to adapt - sorry. By the way 256 i very easy to change limit... it will be even more easy because i will make some modifications in control.lua that it should detect how much of teleinserter entities was created during the game start, so you need to modify only a entity.lua to increase range.
Lenovo Y580 8GB Ram GF660m 128GB SSD W7

jenova99sephiros
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sat May 10, 2014 5:31 am
Contact:

Re: [MOD 0.9.x] Telelogistics v0.1.3

Post by jenova99sephiros »

This mod is very good! but very heavy....
Where I placed three it, the game was not start

User avatar
darius456
Fast Inserter
Fast Inserter
Posts: 222
Joined: Thu Jan 02, 2014 6:33 am
Contact:

Re: [MOD 0.9.x] Telelogistics v0.1.3

Post by darius456 »

jenova99sephiros wrote:This mod is very good! but very heavy....
Where I placed three it, the game was not start
I don't understand. The game crashes when you build 3 teleinserter/telechest or when you put 3 copies of the mod to mods folder? Give me some photos may be I will be able to help.
Lenovo Y580 8GB Ram GF660m 128GB SSD W7

jenova99sephiros
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sat May 10, 2014 5:31 am
Contact:

Re: [MOD 0.9.x] Telelogistics v0.1.3

Post by jenova99sephiros »

darius456 wrote:
jenova99sephiros wrote:This mod is very good! but very heavy....
Where I placed three it, the game was not start
I don't understand. The game crashes when you build 3 teleinserter/telechest or when you put 3 copies of the mod to mods folder? Give me some photos may be I will be able to help.
I placed 3 teleinserter.
Burden overlord

I have PC Spec is
Intel core 2 duo E8800
Geforce 8800GT
3GB Memory

User avatar
darius456
Fast Inserter
Fast Inserter
Posts: 222
Joined: Thu Jan 02, 2014 6:33 am
Contact:

Re: [MOD 0.9.x] Telelogistics v0.1.3

Post by darius456 »

How much video ram memory?
Windows/linux/mac is?
Any other mods?
Try to use low graphic.
Any message? What are you doing, please explain step by step.
Lenovo Y580 8GB Ram GF660m 128GB SSD W7

filippe999
Long Handed Inserter
Long Handed Inserter
Posts: 52
Joined: Sat May 03, 2014 12:45 pm
Contact:

Re: [MOD 0.9.x] Telelogistics v0.1.3

Post by filippe999 »

darius456 wrote:
FreeER wrote:
darius456 wrote:My apologise filippe but I have no idea what are you talking about, could you describe it little more.
I think what he'd like is for you to separate the power formulas into a different file so that he can modify them easily...though I don't think it's really necessary since the entitie.lua file is now quite small and easy to see where the formulas are if someone wanted to change them. I could be wrong however, but that's what a config file is often for in other programs (it's actually fairly rare for Factorio mods to be changed by it's users I think, so most mods don't have dedicated config files)
I thought that He thought about that... but i see no reason to create a separate confing file. All values that are responsible for power consumption are clear to Me, and if you want to change it you will have to adapt - sorry. By the way 256 i very easy to change limit... it will be even more easy because i will make some modifications in control.lua that it should detect how much of teleinserter entities was created during the game start, so you need to modify only a entity.lua to increase range.
Yes, i meant a separate config file to edit the range limitation and energy requirement for your mod, but thanks for the instructions on where to find the range requirements, is the energy formula there too?

User avatar
darius456
Fast Inserter
Fast Inserter
Posts: 222
Joined: Thu Jan 02, 2014 6:33 am
Contact:

Re: [MOD 0.9.x] Telelogistics v0.1.3

Post by darius456 »

Yes it is X...

Calculation of the power* values for each teleinserter use this formula:
For mk1: value in table = (10^(X/50))*44000
For mk2: value in table = (10^(X/49,5))*50000
For mk3: value in table = (10^(X/49))*56000
For mk4: value in table = (10^(X/48,5))*62000

where X is variable from 1 to 128,5 with step of 0,5 = (distance/2)+0,5
Lenovo Y580 8GB Ram GF660m 128GB SSD W7

filippe999
Long Handed Inserter
Long Handed Inserter
Posts: 52
Joined: Sat May 03, 2014 12:45 pm
Contact:

Re: [MOD 0.9.x] Telelogistics v0.1.3

Post by filippe999 »

darius456 wrote:Yes it is X...

Calculation of the power* values for each teleinserter use this formula:
For mk1: value in table = (10^(X/50))*44000
For mk2: value in table = (10^(X/49,5))*50000
For mk3: value in table = (10^(X/49))*56000
For mk4: value in table = (10^(X/48,5))*62000

where X is variable from 1 to 128,5 with step of 0,5 = (distance/2)+0,5
i see... you added the values to an array and you reference said array position when defining energy requirements, i modified mine so energy requirements are +1000 every tile rather than the exponential curve you have by default, your mod is very valuable when hooking up my systems to my already stupidely crowded base(i have no empty space whatsoever in the area around my science packs assembly and just recently i started to produce science packs 3 and lready got the MkI hopefully it would be easier to setup these systems in the future, thanks for your mod, it's exactly like using a tesseract in minecraft.

Post Reply

Return to “Mods”