Author Topic: factory configuration  (Read 3076 times)

0 Members and 1 Guest are viewing this topic.

Offline hreintke

factory configuration
« on: May 05, 2013, 03:19:24 PM »
LS,

I'd like to configure a factory to have two or more "independent productions".

From input "Goods1" produce "OutputGood1"
From input "Goods2" produce "OutputGood2"

Now i configured as test :

Code: [Select]
InputGood[0]=Oel
InputCapacity[0]=1000
InputSupplier[0]=2
InputFactor[0]=200
OutputGood[0]=ContainerOil
OutputCapacity[0]=500
InputGood[1]=Kohle
InputCapacity[1]=1000
InputSupplier[1]=2
InputFactor[1]=200
OutputGood[1]=ContainerCoal
OutputCapacity[1]=500

But in this way I need both oil and coal to start production on both output goods.

I would like to start production on any of the two when the needed input is available.

Is that possible in the current simutrans ?

Herman

Offline The Hood

Re: factory configuration
« Reply #1 on: May 05, 2013, 04:09:20 PM »
Not so far as I am aware. But it would be nice to have an "or" logic as well in factories...

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4866
  • Total likes: 202
  • Helpful: 108
  • Languages: EN, NO
Re: factory configuration
« Reply #2 on: May 05, 2013, 06:44:39 PM »
Previous request have been more towards either of two inputs to produce one output. In this case, it sounds more like two different factories.

Offline ucho

Re: factory configuration
« Reply #3 on: May 05, 2013, 08:12:24 PM »
There were also requests for optional inputs - like fertilizer for farms. Pak128 dairy works with either glass or milk. Maybe it is time to allow LUA code in pak files? Alternatives are hardcoding more options/factory types  or inventing some kind of "recipes" DSL.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4866
  • Total likes: 202
  • Helpful: 108
  • Languages: EN, NO
Re: factory configuration
« Reply #4 on: May 06, 2013, 05:03:22 AM »
Lua is DSL (among other things).

Offline ucho

Re: factory configuration
« Reply #5 on: May 19, 2013, 12:53:06 PM »
Let's say that if recipes are defined as "inputFactors->outputFactors" and, if present, replace the standard production rules and Input/OutputFactors. Recipes are processed in order, until production for this step is exhausted.

pak128 Diary, old:
Code: [Select]
InputGood[0]=milk
InputFactor[0]=108
InputCapacity[0]=1400

InputGood[1]=glass
InputFactor[1]=55
InputCapacity[1]=3000
new:
Code: [Select]
InputGood[0]=milk
InputCapacity[0]=1400

InputGood[1]=glass
InputCapacity[1]=3000
#require both inputs to produce nothing
Recipe[0]=108;55->

hreintke's factory:
Code: [Select]
Recipe[0]=200;200->256;256
Recipe[1]=0;200->0;256
Recipe[2]=200;0->256;0
#or, if production lines are not independent
Recipe[0]=100;100->128;128
Recipe[1]=0;200->0;256
Recipe[2]=200;0->256;0

pak 128Corn field, old:
Code: [Select]
OutputGood[0]=corn
OutputCapacity[0]=200
OutputFactor[0]=100

new:
Code: [Select]
InputGood[0]=fertilizer
InputCapacity[0]=100

OutputGood[0]=corn
OutputCapacity[0]=200
#fertilizer is optional
Recipe[0]=50->200
Recipe[1]=0->100

Would it be flexible enough?

Offline greenling

  • Lounger
  • *
  • Posts: 1728
  • Total likes: 2
  • Helpful: 15
  • Simutransarchology it my hobby!
  • Languages: DE,EN
Re: factory configuration
« Reply #6 on: May 19, 2013, 01:36:22 PM »
Hello ucho
your idea to configuration the factory's its a usefull idea.
Opening hours 20:00 - 23:00
(In Night from friday on saturday and saturday on sunday it possibly that i be keep longer in Forum.)
I am The Assistant from Pakfilearcheologist!
Working on a big Problem!

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8823
  • Total likes: 323
  • Helpful: 229
  • Languages: De,EN,JP
Re: factory configuration
« Reply #7 on: May 19, 2013, 08:32:55 PM »
I see no way to show this to the User without adding more confusion.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4866
  • Total likes: 202
  • Helpful: 108
  • Languages: EN, NO
Re: factory configuration
« Reply #8 on: May 19, 2013, 08:54:28 PM »
I think it is possible, but it would have to be very verbose, and the factory information window is quite tall as it is already. But I foresee that users will request being able to control which recipe has priority, perhaps even turning off down those that don't suit them completely. This has every potential to become a UI nightmare.

It might be better to instead have clusters of factories, where each factory has only one production process/recipe. These could maybe even deliver outputs directly to eachother, but this might not be easy for players to understand. With more than four factories in a complex, it also becomes difficult for a player to deliver goods to only the wanted factory.

In the end, I think optional inputs, either for boosting production or as alternative inputs, might work and be a nice addition, but one factory should only have one production process with fixed outputs regardless of inputs.

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4849
  • Total likes: 25
  • Helpful: 63
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: factory configuration
« Reply #9 on: May 20, 2013, 09:10:31 AM »
I think users asking for control of industry can go to Experimental ;) The transport company is a transport company, not industry company.

Possible display:
5 wood + 5 steel = 15 goods
5 wood = 5 goods
5 steel = 5 goods
If goods had icons, that would be very compact...

However, I like the idea Ters has - having the current setup for production and adding some goods as boosters. Some ideas how this could be used apart from simple boosters:
1) allow basis of production as requiring 0 none with 0 productivity + booster goods -> any of goods makes this work
2) allow basis of production as requiring x something with 0 productivity + booster goods -> needs the one material and any of the others

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Offline hreintke

Re: factory configuration
« Reply #10 on: May 20, 2013, 11:41:03 AM »
LS,

I have also been thinking and experimenting on this.

My opinion is that if we limit the options to be configurable in datfiles, the "only" challenge is to update the UI to reflect the inputgoods needed to produce a specific outputgood.

Something like :

Now :

Production :
 - OutGood1 93/250m3 , OutGood1Cat 100%
 - OutGood2 10/1000t, OutGood2Cat 100%

Option :

Production :
 - OutGood1 93/25m3, Ingood1 100%, InGood2 200%, OutGood1Cat 100%
 - OutGood2 10/100t,  InGood1 100%, OutGood2Cat 100%

Other option might be pop-up when hoovering over OutGood line. Then the base UI can be (almost) unchanged.

By keeping it limited to datfiles it is up to the pakdesigner to integrate and keeps Simutrans to transportation.
But it would open up to much more flexible transport chains.

Herman

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4866
  • Total likes: 202
  • Helpful: 108
  • Languages: EN, NO
Re: factory configuration
« Reply #11 on: May 20, 2013, 12:17:15 PM »
The confusing part is that you have Ingood1 listed two times. What does this mean? Are there two separate input queues for Ingood1, or just one? This is not a question I ask for you to answer here in this post, but a question that must be answered every time a player opens this dialog for the first few times, until they remember.

The lines will also easily become very long. Ingood1 and outgood1 are relatively short names. The way I imagined it was to have line breaks and slight indentation where you have commas, but that leads to an issue with height instead, though height is less of an issue than width, since the dialog already scrolls vertically.

Offline hreintke

Re: factory configuration
« Reply #12 on: May 20, 2013, 12:40:31 PM »
Besides the Production lines of course there are also still the Consumption lines.

That's the place where currently for each of the inputgoods a combination of
- currently on stock
- currently in transit
- max on stock
- percentage for usage
is displayed.

That is also a complete set of different values which are not clear on first sight and need considerable understanding of the details.
Of course, that doesn't mean that we have to/can overcomplicate other parts too.

I think, with some combined effort there should be a way to get the UI clearer and even when included outputgoods not needing all inputgoods.

Herman

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4866
  • Total likes: 202
  • Helpful: 108
  • Languages: EN, NO
Re: factory configuration
« Reply #13 on: May 20, 2013, 12:56:50 PM »
One thing your example is missing is how to tell whether OutGood1 needs both InGood1 and InGood2, either InGood1 or InGood2, only InGood1 with InGood2 optional, or only InGood2 with InGood1 optional. This should be without pop-ups, since players don't know they're there, and without symbols that aren't obvious is some cultures. Simutrans has been criticized for having a complicated GUI as it is.