News:

Simutrans Chat Room
Where cool people of Simutrans can meet up.

New to simutrans, how to increase spawn rate of custom factory

Started by FatesChoice, August 10, 2015, 09:03:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

FatesChoice

Hello, I am new to Simutrans. I wanted to see if I could successfully create a factory to use in the game so I made a .dat file and used makeobj to create the .pak file and put that into the PAK folder. I know the factory is in the game because one time out of luck it spawned when I created a new game, however 90% of the time I am just getting incinerators and coal power stations when the game starts. In the .dat file I specified for it to spawn in January, 1920 but yet it almost never appears. Also, I messed around with the DistributionWeight setting in the .dat file because the wiki says the higher the number the more likely it is to appear, with a max number of 127. It still isn't showing up with 127 DistributionWeight however. I have only seen my factory in game once, I know the game still recognizes its existence though because it shows up in the industry list when I de-select the "show only used" button. Basically I really want to test my custom factory, so I need it to spawn consistently, how can I do this? For example the Incinerator seems to spawn 100% of the time in all new games I make, how can I make my custom factory spawn that much? Thanks

Vladki

I really do not know how to make it spawn more often. But you can switch to public player and build the factory (or whole chain) by yourself.

TurfIt

DistributionWeight max value is 65535, not 127...
You don't mention which pak is being added to, but most factories in pak64 have a weight of 100, so you'd want much greater to ensure your factory spawns regularly.

Ters

Quote from: Vladki on August 10, 2015, 09:19:08 PM
But you can switch to public player and build the factory (or whole chain) by yourself.

Doing everything manually won't really test that the factory is correctly set-up. But I think that selecting the checkboxes for complete chain construction does the same thing as when construction is triggered by the simulation. However, if the factory in question is not at the end of the chain, and there are alternative chains leading to the selected end consumer, one might still need several tries. In that case, that is testing something in itself: how the weighting works in practice.

FatesChoice

Quote from: Vladki on August 10, 2015, 09:19:08 PM
I really do not know how to make it spawn more often. But you can switch to public player and build the factory (or whole chain) by yourself.

How do I switch to public player?

Quote from: TurfIt on August 10, 2015, 09:39:58 PM
DistributionWeight max value is 65535, not 127...
You don't mention which pak is being added to, but most factories in pak64 have a weight of 100, so you'd want much greater to ensure your factory spawns regularly.

Sorry I should have mentioned I am using pak64. I changed the distributionweight to 65535 but it still isn't showing up. I attached my .dat file to this post, perhaps I am doing something wrong?

Quote from: Ters on August 10, 2015, 10:18:11 PM
Doing everything manually won't really test that the factory is correctly set-up. But I think that selecting the checkboxes for complete chain construction does the same thing as when construction is triggered by the simulation. However, if the factory in question is not at the end of the chain, and there are alternative chains leading to the selected end consumer, one might still need several tries. In that case, that is testing something in itself: how the weighting works in practice.

Where are those checkboxes located? Also if I am understanding you correctly could my factory not be showing up because the full chain did not spawn? What I mean is my factory takes in oil as an input and outputs chemicals, if their is no way of receiving oil because whatever produces oil did not spawn, does that mean my factory will not spawn?


Thanks for the help everyone.



Ters

Quote from: FatesChoice on August 11, 2015, 02:13:24 PM
How do I switch to public player?

By selecting the player option in the game menu, and selecting the public player. This will activate the world editing tools. One of these tools is for building factories...

Quote from: FatesChoice on August 11, 2015, 02:13:24 PM
Where are those checkboxes located?

...in which there are options to build entire chains.

Quote from: FatesChoice on August 11, 2015, 02:13:24 PM
What I mean is my factory takes in oil as an input and outputs chemicals, if their is no way of receiving oil because whatever produces oil did not spawn, does that mean my factory will not spawn?

Simutrans avoids building factories that don't serve any purpose due to lack of suppliers and/or consumers. From what I understand, it starts by building an ultimate consumer, and will at the same time build suppliers recursively unless there already are suitable suppliers with free capacity in range. Spawning of incomplete chains have been reported, but that's because of bugs related to not finding suitable ground, if I remember correctly.

prissi

Well, one end-product chain is built. If a consumer has more than one chain (like the supermarket) then chains are added gradually to avoid sudden cluttering of the map with industries. (And in some paks the gorw industry function had a shortcut, like 'I')