Search found 158 matches

by Linver
Fri Jul 17, 2020 11:40 am
Forum: Already exists
Topic: Weird ElectricEnergyInterface behaviour and drain property behaviour
Replies: 1
Views: 1460

Weird ElectricEnergyInterface behaviour and drain property behaviour

Hi! I'm trying to create an entity (animated when work) that do nothing more than drain energy from the energy network, and maintain a buffer that will be modified via script for modding purpose. So for example: 4MW drain 24MW max input 48MW of storage The best fit prototype should be the ElectricEn...
by Linver
Mon Jul 13, 2020 9:33 am
Forum: General discussion
Topic: Modal of available energy production in vanilla games
Replies: 7
Views: 2220

Re: Modal of available energy production in vanilla games

Hey! I'm more interested in the mid game, in fact I don' t think that we can say that 20GW is about mid game, maybe is more a sort of 1GW, efore the nuclear power is difficult reach 1GW, but I'm not sure of the experience of other players. Ps: 44GW seems not late game, seems a very far from rocket l...
by Linver
Mon Jul 13, 2020 7:36 am
Forum: General discussion
Topic: Modal of available energy production in vanilla games
Replies: 7
Views: 2220

Modal of available energy production in vanilla games

Hi all! I'm just balancing a mod content, and because I want release a new feature included in a big mod (Krastorio 2) and a standalone version usable pratically only with vanilla stuff, I'm thinking about how balance the energy consumption of this feature. Because with a big mods the modal energy p...
by Linver
Fri Jul 10, 2020 10:17 am
Forum: Modding interface requests
Topic: on_player_placed_equipment by mod/player
Replies: 7
Views: 2202

on_player_placed_equipment by mod/player

Hi, is possible add to the event on_player_placed_equipment a new argument like "raised_by_a_mod" or a sort of, that with a boolean value, will inform the callback if the event was raised from a mod using the function LuaEquipmentGrid .put(...) ? As always, thank you for the attention.
by Linver
Fri Jul 10, 2020 10:11 am
Forum: Won't implement
Topic: Pointer to LuaEquipmentGrid associated LuaEntity
Replies: 16
Views: 3236

Re: Pointer to LuaEquipmentGrid associated LuaEntity

Yes, my bad. LuaPlayer.opened already referse to the grid itself at that point. You could indeed try caching opened, but keep in mind that grids can be changed by mods too. Yeah in fact I'm trying to design a way to understand how catch when a mod do this but is not simply, I will try to ask for th...
by Linver
Fri Jul 10, 2020 10:09 am
Forum: Won't implement
Topic: Pointer to LuaEquipmentGrid associated LuaEntity
Replies: 16
Views: 3236

Re: Pointer to LuaEquipmentGrid associated LuaEntity

..This isn't possible to implement... Making the impossible possible: ... -- Return the gui type name from the identifier number local function getGUITypeName(given_id) for name, id in pairs(defines.gui_type) do if given_id == id then return name end end end -- Called when a player open a gui local...
by Linver
Thu Jul 09, 2020 10:53 am
Forum: Modding interface requests
Topic: LuaEquipmentGrid index
Replies: 2
Views: 678

Re: LuaEquipmentGrid index

but is weird that miss an unique identificator when all other LuaObject have it. Not all Lua Objects have a Unique ID, in fact very many don't, even many entities, such as resources, trees, don't have a unique ID. Looking at the equipment grid, there is nothing internally to give to you, there is n...
by Linver
Thu Jul 09, 2020 9:13 am
Forum: Won't implement
Topic: Pointer to LuaEquipmentGrid associated LuaEntity
Replies: 16
Views: 3236

Re: Pointer to LuaEquipmentGrid associated LuaEntity

Can't you just read LuaPlayer.opened? Looking better in the documentation: opened :: LuaEntity or LuaItemStack or LuaEquipment or LuaEquipmentGrid or LuaPlayer or LuaGuiElement or defines.gui_type [Read-Write] The GUI target the player currently has open; nil if none. Note: Write supports any of th...
by Linver
Thu Jul 09, 2020 8:57 am
Forum: Won't implement
Topic: Pointer to LuaEquipmentGrid associated LuaEntity
Replies: 16
Views: 3236

Re: Pointer to LuaEquipmentGrid associated LuaEntity

eradicator wrote: ↑
Thu Jul 09, 2020 7:14 am
Can't you just read LuaPlayer.opened?

Code: Select all

local entity = player.opened and (player.opened.grid == event.grid) and player.opened or nil
I try ur code, this is the result:

Code: Select all

on_player_placed_equipment (ID 38)
LuaEquipmentGrid doesn't contain key grid.
But I don't give up
by Linver
Thu Jul 09, 2020 8:37 am
Forum: Won't implement
Topic: Pointer to LuaEquipmentGrid associated LuaEntity
Replies: 16
Views: 3236

Re: Pointer to LuaEquipmentGrid associated LuaEntity

Can't you just read LuaPlayer.opened? local entity = player.opened and (player.opened.grid == event.grid) and player.opened or nil In fact I said over: I think if the player is installing the equipment manually, he have some reference in the GUI. I think that in a way is possible. But I have to thi...
by Linver
Thu Jul 09, 2020 6:42 am
Forum: Won't implement
Topic: Pointer to LuaEquipmentGrid associated LuaEntity
Replies: 16
Views: 3236

Re: Pointer to LuaEquipmentGrid associated LuaEntity

Also, in what situations is this possible? I can't figure out in what state this is legal for the game engine. What are you trying to achieve? I'm try to monitor an entity(A), that have installed in equipment grid a precise equipment, and when this entity(A) is in range with another entity(B), do s...
by Linver
Thu Jul 09, 2020 6:18 am
Forum: Won't implement
Topic: Pointer to LuaEquipmentGrid associated LuaEntity
Replies: 16
Views: 3236

Re: Pointer to LuaEquipmentGrid associated LuaEntity

Rseding91 wrote: ↑
Thu Jul 09, 2020 6:04 am
..and may not even be owned by an entity..
Also, in what situations is this possible? I can't figure out in what state this is legal for the game engine.
by Linver
Thu Jul 09, 2020 6:14 am
Forum: Won't implement
Topic: Pointer to LuaEquipmentGrid associated LuaEntity
Replies: 16
Views: 3236

Re: Pointer to LuaEquipmentGrid associated LuaEntity

Rseding91 wrote: ↑
Thu Jul 09, 2020 6:04 am
..it just doesn't exist on the C++ side. Sorry..

Then is possible add the entity as param in the events on_player_placed_equipment and on_player_removed_equipment? I think if the player is installing the equipment manually, he have some reference in the GUI.
by Linver
Thu Jul 09, 2020 6:09 am
Forum: Modding interface requests
Topic: LuaEquipmentGrid index
Replies: 2
Views: 678

LuaEquipmentGrid index

Hi again, related to the post of LuaEquipmentGrid , why the LuaEquipmentGrid doesen't have an index? I suppose that is why they are in a one to one association to an entity, so for identify it is possible use the index of the entity, but is weird that miss an unique identificator when all other LuaO...
by Linver
Thu Jul 09, 2020 3:52 am
Forum: Won't implement
Topic: Pointer to LuaEquipmentGrid associated LuaEntity
Replies: 16
Views: 3236

Re: Pointer to LuaEquipmentGrid associated LuaEntity

Oh, I'm sorry, seems that my post it's a duplicate: viewtopic.php?f=65&t=85443

Anyway, this show another use case of why this property should be available :lol:
by Linver
Thu Jul 09, 2020 3:40 am
Forum: Won't implement
Topic: Pointer to LuaEquipmentGrid associated LuaEntity
Replies: 16
Views: 3236

Pointer to LuaEquipmentGrid associated LuaEntity

Hi, try to mod something using the LuaEquipmentGrid , I found a very strange a thing; from the API documentation, inside the LuaObject of the LuaEquipmentGrid , there isn't any reference to the LuaEntity that own the Equipment Grid . Add a property, "entity" read-only, will improve a and s...
by Linver
Wed Jun 24, 2020 1:39 am
Forum: Mods
Topic: [MOD 0.18] KRASTORIO^2
Replies: 198
Views: 143786

Re: [MOD 0.18] KRASTORIO^2

hellman.wow wrote: ↑
Tue Jun 16, 2020 3:06 pm
Same Problem .. see attachment
Not anymore from the 0.9.23
by Linver
Fri Jun 12, 2020 9:48 am
Forum: Mods
Topic: [MOD 0.18] KRASTORIO^2
Replies: 198
Views: 143786

Re: [MOD 0.18] KRASTORIO^2

I will just leave here tiny note: in Factorio 0.18.31, Krastorio2's greenhouses have 10k (instead of 1k) volume for water since base_area from input fluid box prototype is now taken into account when there is at least one output or input-output connection for it (see changelog) Thank u to notify me...
by Linver
Mon Jun 08, 2020 4:54 am
Forum: Mods
Topic: [MOD 0.18] KRASTORIO^2
Replies: 198
Views: 143786

Re: [MOD 0.18] KRASTORIO^2

pichutarius wrote: ↑
Sun Jun 07, 2020 7:12 am
when i put 2 transceiver, the game crash. cant i put 2?
(one is activated, plopping the second one crash the game)
Untitled.png
Already fixed in the 0.9.21 (that will be released soon)
by Linver
Sat May 30, 2020 12:39 am
Forum: Mods
Topic: [MOD 0.18] KRASTORIO^2
Replies: 198
Views: 143786

Re: [MOD 0.18] KRASTORIO^2

All fixed in the version 0.9.19

Go to advanced search