changed the way the ai builds freighters to take into account the research strategy industry weight. likely can do more with these weights here but in any case it uses this as 1+industry weight to limit the number of freighters that can be in the build queue. this pretty much only effects the ai. the AI will still build a lot of freighters though and i am thinking that the planet colonization choices need to be looked at again to reduce the freight load.
later on when the planets get more self sufficient it will cut the freighters down. it does this by looking at idle freighters wanting to have a minimum number of idle freighters. this too is effected by the industry weight. 3+ weight. idle freighters is determined by freighters that have went through the trade timer and come up empty for about 4 seconds. the trade timer is ticked every time it looks for stuff to trade with.
for the actual freight stuff i removed some of the planet checks it was doing. the planets will determine if they need stuff or not and the freighters will figure out if they are the most efficient choice for that planet and will help according to what is already being sent to the planet.
i also put in some fail safes. if the freighter already has cargo and cant find a planet to deliver to it will then fall back to any planet that is not full on food and dump its extra cargo there regardless of import/export. failing that it will purge its cargo.
also i removed the limiters that say this is a food freighter or a production freighter. it will try to handle food first for all freighters. then look for production targets. this may need some adjusting so that there is a minimum number of each as this may limit the ai expansion if it makes a few bad colony choices by starving planet production. may also need to change the way that planets work with production so that they are more aggressive at wanting to import production. this would be good for mid and late game so that ship yards can rush production.
freighters will switch between pop and trade when iterating through the freighters. so that the pop movers will get priority as well. i changed the pop logic a while back to to look at not only planets that are good and need pop but also planets that are bad and dont need pop so that they will remove pop from planets that cant sustain themselves.
i believe there needs to be more logic to how the colonization choices work to take into account freight load. can we sustain this planet?
so currently i see some empires get a lot of their freight going to food early game. and a whole lot of freighters. the freighter budget needs to be looked at.
anyway ill make another issue for more freight enhancement and ill close this issue.
I feel pretty confident that these changes have greatly enhanced the food freight.
Maybe in the future we will completely rip out this freight system and replace it with a more flexible freight system. So that all kinds of goods can be transported and dealt with. for now though we are trying to keep it simple.