Page 2 of 2

Re: 0.15 modding related changelog as of March 6, 2017

Posted: Thu Apr 06, 2017 12:36 pm
by BenSeidel
Rseding91 wrote:Added support for LuaFlowStatistics read on electric poles.
Does this effectively give us access to a poles electricity network? Such as max power output, accumulator charge etc?

Re: 0.15 modding related changelog as of March 6, 2017

Posted: Thu Apr 06, 2017 1:00 pm
by Rseding91
BenSeidel wrote:
Rseding91 wrote:Added support for LuaFlowStatistics read on electric poles.
Does this effectively give us access to a poles electricity network? Such as max power output, accumulator charge etc?
Not really. That data isn't part of what's exposed.

Re: 0.15 modding related changelog as of March 6, 2017

Posted: Thu Apr 06, 2017 1:28 pm
by BenSeidel
Rseding91 wrote:
BenSeidel wrote:
Rseding91 wrote:Added support for LuaFlowStatistics read on electric poles.
Does this effectively give us access to a poles electricity network? Such as max power output, accumulator charge etc?
Not really. That data isn't part of what's exposed.
NOOOOOOO :*(

Re: 0.15 modding related changelog as of March 6, 2017

Posted: Fri Apr 21, 2017 6:46 pm
by Doomquill
Rseding91 wrote:
  • Added LuaItemPrototype fuel_category, burnt_result, fuel_acceleration_multiplier, fuel_top_speed_multiplier read.
Sorry to ask something so long after you posted this, but does fuel already in the game utilize these parameters? Presumably nuclear fuel will use burnt_result, but how about the others?

What I'm really asking is will I have (get) to make a mod that will make Rocket Fuel make trains go faster?

Re: 0.15 modding related changelog as of March 6, 2017

Posted: Fri Apr 21, 2017 8:14 pm
by Rseding91
Doomquill wrote:
Rseding91 wrote:
  • Added LuaItemPrototype fuel_category, burnt_result, fuel_acceleration_multiplier, fuel_top_speed_multiplier read.
Sorry to ask something so long after you posted this, but does fuel already in the game utilize these parameters? Presumably nuclear fuel will use burnt_result, but how about the others?

What I'm really asking is will I have (get) to make a mod that will make Rocket Fuel make trains go faster?
Rocket fuel already makes the train go faster in 0.15. That's why I added the mechanics and the lua API.

Re: 0.15 modding related changelog as of March 6, 2017

Posted: Fri Apr 21, 2017 8:18 pm
by daniel34
Rseding91 wrote:Rocket fuel already makes the train go faster in 0.15. That's why I added the mechanics and the lua API.
I realize this is not the correct forum to ask, but since we're already talking about this are there also differences when using wood vs. coal vs. solid fuel?

Re: 0.15 modding related changelog as of March 6, 2017

Posted: Fri Apr 21, 2017 8:19 pm
by Doomquill
Rseding91 wrote:
Doomquill wrote:
Rseding91 wrote:
  • Added LuaItemPrototype fuel_category, burnt_result, fuel_acceleration_multiplier, fuel_top_speed_multiplier read.
Sorry to ask something so long after you posted this, but does fuel already in the game utilize these parameters? Presumably nuclear fuel will use burnt_result, but how about the others?

What I'm really asking is will I have (get) to make a mod that will make Rocket Fuel make trains go faster?
Rocket fuel already makes the train go faster in 0.15. That's why I added the mechanics and the lua API.
I'M SO HAPPY! Thanks for answering :)

Re: 0.15 modding related changelog as of March 6, 2017

Posted: Fri Apr 21, 2017 9:13 pm
by Kane
Rseding91 wrote:
Doomquill wrote:
Rseding91 wrote:
  • Added LuaItemPrototype fuel_category, burnt_result, fuel_acceleration_multiplier, fuel_top_speed_multiplier read.
Sorry to ask something so long after you posted this, but does fuel already in the game utilize these parameters? Presumably nuclear fuel will use burnt_result, but how about the others?

What I'm really asking is will I have (get) to make a mod that will make Rocket Fuel make trains go faster?
Rocket fuel already makes the train go faster in 0.15. That's why I added the mechanics and the lua API.
https://www.youtube.com/watch?v=yfGjLIPRgDA

Re: 0.15 modding related changelog as of March 6, 2017

Posted: Tue Apr 25, 2017 1:59 pm
by Sean Mirrsen
I spent fifteen minutes trying to make a simpler burner generator (a stirling generator, if you will) after I got 0.15.

Took me a reread of the changelog afterwards to notice that it says "burner type generator-equipment".

How has burner type wearable generator equipment been made a thing before burner type regular generators? :(

Re: 0.15 modding related changelog as of March 6, 2017

Posted: Tue Apr 25, 2017 2:08 pm
by 321freddy
Sean Mirrsen wrote:I spent fifteen minutes trying to make a simpler burner generator (a stirling generator, if you will) after I got 0.15.

Took me a reread of the changelog afterwards to notice that it says "burner type generator-equipment".

How has burner type wearable generator equipment been made a thing before burner type regular generators? :(
IIRC Some entities have a energy_source parameter which you can set to either burner or electric. Open entities.lua from the base mod and have a look at the furnace for an example definition. I don't know if equipment was possible before.

Re: 0.15 modding related changelog as of March 6, 2017

Posted: Tue Apr 25, 2017 2:14 pm
by Sean Mirrsen
That's exactly what I tried. Both using burner type energy like in the current boilers, and burner as a separate parameter field like it was in the boilers before this version, all copied from respective entity prototypes. Neither works. No UI opens to add fuel, can't add fuel through other means, etc.

Re: 0.15 modding related changelog as of March 6, 2017

Posted: Tue Apr 25, 2017 2:20 pm
by 321freddy
It does not work for all entity tyoes (again check entities.lua to see if your type support an energy source)
What entity type are you using? Maybe post the data.lu so I can take a look?

Re: 0.15 modding related changelog as of March 6, 2017

Posted: Tue Apr 25, 2017 2:34 pm
by Sean Mirrsen
Uh. I wanted to make a burner-type generator. The entity type I used was, appropriately, generator. :P

It used to be that the game complained if you put the burner energy source type into a generator. It doesn't seem to do that now. Instead it just refuses to do anything.

Re: 0.15 modding related changelog as of March 6, 2017

Posted: Mon May 01, 2017 5:14 pm
by bobingabout
Q: Can you use energy_source type = "heat" on anything other than a boiler? EG, a furnace or assembling machine?

Heat powered furnaces does sound like something you should be able to do.

Re: 0.15 modding related changelog as of March 6, 2017

Posted: Mon May 01, 2017 7:20 pm
by Rseding91
bobingabout wrote:Q: Can you use energy_source type = "heat" on anything other than a boiler? EG, a furnace or assembling machine?

Heat powered furnaces does sound like something you should be able to do.
Yes in that it shouldn't crash (assuming the machine supports dynamic energy source types). It's untested though :)

Re: 0.15 modding related changelog as of March 6, 2017

Posted: Thu May 04, 2017 9:45 am
by bobingabout
Rseding91 wrote:Removed LuaPlayer::build_from_cursor + LuaPlayer::rotate_for_build as they aren't replay/MP safe.
I used rotate_for_build in one of my mods, which now throws up an error, obviously because rotate_for_build was removed.

Is there an alternative to rotate the entity in your cursor?

Re: 0.15 modding related changelog as of March 6, 2017

Posted: Thu May 04, 2017 12:43 pm
by Rseding91
bobingabout wrote:
Rseding91 wrote:Removed LuaPlayer::build_from_cursor + LuaPlayer::rotate_for_build as they aren't replay/MP safe.
I used rotate_for_build in one of my mods, which now throws up an error, obviously because rotate_for_build was removed.

Is there an alternative to rotate the entity in your cursor?
Nope. The cursor rotation isn't part of the game state until after the player has clicked to build and the action was processed by the game to the point it builds the entity.

Re: 0.15 modding related changelog as of March 6, 2017

Posted: Thu May 04, 2017 1:10 pm
by Nexela
bobingabout wrote:
Rseding91 wrote:Removed LuaPlayer::build_from_cursor + LuaPlayer::rotate_for_build as they aren't replay/MP safe.
I used rotate_for_build in one of my mods, which now throws up an error, obviously because rotate_for_build was removed.

Is there an alternative to rotate the entity in your cursor?
Easiest alternative would be to switch from an underground pipe to a storage tank

Re: 0.15 modding related changelog as of March 6, 2017

Posted: Thu May 04, 2017 3:22 pm
by bobingabout
Nexela wrote:
bobingabout wrote:
Rseding91 wrote:Removed LuaPlayer::build_from_cursor + LuaPlayer::rotate_for_build as they aren't replay/MP safe.
I used rotate_for_build in one of my mods, which now throws up an error, obviously because rotate_for_build was removed.

Is there an alternative to rotate the entity in your cursor?
Easiest alternative would be to switch from an underground pipe to a storage tank
Pretty much. Though then that would result in a different error... entity type mismatch, so I'll have to rename and migrate it.
Fortunately, the main reason why I didn't use a storage tank in the first place has been removed, and would give the advantage of being able to connect the valve to the logistic network.
It's a good solution.