News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

Improving the building and factory creation tool

Started by wlindley, August 19, 2013, 12:55:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wlindley

Is it true that these should require no new "core" algorithms, just some new UI bits?

       
  • In the building creation tool, you can choose orientations "Random" and 0,1,2,... -- could we have a choice "Auto" which uses the internal "prefer to rotate a building to face the street" please?  This would make it much easier to add nice-looking buildings and industries in cities -- and also when making datfiles, being sure that your buildings are rotated the right way.
  • In the Build Industries tool, could we have additional check-boxes for "Producers" (if enabled, only shows factories with output goods) and "Consumers" (if enabled, only shows factories with input goods) -- this would make it easy when adding shops in a city, when building raw materials areas.  When both are checked, this would show only factories that have both input and output goods (e.g., steel mills); when both are unchecked, it would display all factories (i.e., not exclude any factory).
  • There is a button "Increase industry density" and while you can manually connect two industries together, it would be quite useful to have a button "Automatically expand this industry's chain" so you could create a factory and click on it to get it connected, using the existing internal algorithm.

Ters

What if there are streets on many sides? What if many of the factory's sides should face a street?

wlindley

The same thing would happen, as already does with the existing algorithm.  The "auto" button would be wonderful when building several shops and especially useful when testing pakset modifications to be sure everything works as you intend.  It merely exposes what the game already does when building things automatically. Yes?

Ters

I apparently read your post too fast and didn't notice that you mentioned that the algorithm already exists. I assume for auto-spawned factories?

kierongreen

Auto direction sounds reasonable will probably add that later. Creating an industry chain for a particular factory sounds interesting. Having check boxes for producers and consumers, well the principle sounds alright but think we need to look at the GUI for this, don't want windows turning into masses of boxes and options really.

kierongreen

Just a quick update on this, attached patch allows for city buildings to have auto rotation when placing. Not tried for other buildings yet. I'm not committing this to trunk yet as the code for auto rotation code is duplicated several times already so I'm thinking how to best tidy this code together to avoid adding more duplication.

prissi

About building factory chains: That is possible using the existing dialoge. If you place and end consumer, and select the chain option, then a chain is built with all intermediate factories. However, obviously without control on their placement but the end consumer. So how would first building the end consumer and then the chain be any different?

wlindley

#7
Quote from: prissi on August 28, 2013, 07:48:35 PM
If you place and end consumer, and select the chain option...

Chain option? Ohhhh... at least on Experimental that has been labeled "Only city chains" which is pretty meaningless. I never thought it would mean "Build a city chain" -- although I see now on the latest Standard that's what the label reads. 

Having tried it, the "chain" check-box on one hand builds several industries automatically, but my unfulfilled expectation is that the consumer industry would be placed where I click -- it isn't; although it seems often nearby... a bit confusing how that actually works?

Thanks prissi for enlightening us on that function!

prissi

It searched the next suitable place close to your click; it may be as well the next city.

kierongreen

Couldn't think of a reasonable tidier way of rotations so have just committed auto rotations for city building tool as above.