RealismusModding / FS17_seasons

Farming Simulator 17 seasons mod
https://www.realismusmodding.com/mods/seasons
75 stars 55 forks source link

[GM] Crop Cycles and Season Length #3

Closed theSeb1979 closed 7 years ago

theSeb1979 commented 8 years ago

Posting as myself until Akuenzi has an account.

Akuenzi: We're working on this crop growth thing at the moment. Right now it sets the growth cycle ONCE for all crops. Is there any reason we couldn't set this mod up to change the growth cycles during the game? With a counter of some type thrown in there, it seems like a way could be found to get the grass to grow at the right times... or the growth times could even be elongated over the designated 'winter' time, and then be adjusted when spring hits.

Something should likely be built in to notify the player as to which season they are in at any given time. I suppose it could even be linked up with a 'real' year if you wanted. Maybe a 'day' in Farming Sim could be treated the same as 1 week in real life? That'd be 52 days for a complete cycle. The specific day could even be chosen at random within a particular week to make it look more 'normal.' And the crops could be timed with it...

theSeb1979 commented 8 years ago

Need to decide the initial design of this as discussed. Two options that I see

  1. Setting growth initially and let the growth dictate the cycle. For example, could set the season length based on a calculation using the growth cycle, or could check the growth every hour, or whatever, and decide to skip to the next season
  2. Have a set period for a season (configurable). Based on an initial table of fruit seeding and growth times. Then force the growth to comply with the season and change it accordingly as the game clock progresses. This seems more technically challenging, but looks like a far more elegant solution. In the update (or maybe updatetick?) we could have code which basically sleeps for 60 minutes, wakes up, checks growth and manipulates it as appropriate and then goes back to sleep. This option is more inline what your thoughts.

What about killing crops when we reach winter? If any crop that is at a ready to harvest stage, it should be killed for example. Is it possible to reduce the growth stage? Can we reduce grass? I think it's possible...

Will need to add new crops, like spring barley and spring wheat. We can consider base game wheat and barley as winter wheat and barley for simplicity's sake.

A lot of thought is going to be required here as it will be the main basis of the mod.

theSeb1979 commented 8 years ago

Further thoughts on this. The simplest implementation and what has currently been started assumes that a season is x days (configurable) and then the growth cycles durations need to be adjusted to correspond with the season when the mod loads. Once the growth duration is set, the mod will not try to manipulate the growth in real time, apart from maybe withering crops in the winter that have not been harvested and were not planted in the autumn.

My current assumption is that wheat and barley in the base game are "winter" crops, so they should be sown in the autumn. We can then add spring barley and spring wheat. These will have shorter growth cycles. I need some input here before analysing this further and splitting it into discrete piece of work.

If we go for the simplest implementation, it does not mean that we cannot revisit it and attempt something more complex after this is released. For example,

We definitely do need something to be constant, and in my opinion, that should be the season based on the current day.

joskuijpers commented 8 years ago

I think we should allow spring versions of wheat and barley. You need a lot of it for animals (straw).

On 08 Nov 2016, at 21:03, theSeb1979 notifications@github.com wrote:

Further thoughts on this. The simplest implementation and what has currently been started assumes that a season is x days (configurable) and then the growth cycles duration need to be adjusted to correspond with the growth cycle.

My current assumption is that wheat and barley in the base game are "winter" crops, so they should be sown in the autumn. We can then add spring barley and spring wheat. These will have shorter growth cycles. I need some input here before analysing this further and splitting it into discrete piece of work.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/theSeb1979/FS17_seasons/issues/3#issuecomment-259243909, or mute the thread https://github.com/notifications/unsubscribe-auth/AEyN0KKTMQeg6BrVFeRMerFo5w5rsTTPks5q8NWhgaJpZM4Kpxrd.

theSeb1979 commented 8 years ago

Yes, spring wheat and barley is what I envisioned from the start.

akuenzi commented 8 years ago

I guess my mind is on artwork at the moment. Do we need new textures for this, or would we use the existing textures for wheat and barley?

joskuijpers commented 8 years ago

It might be a bad idea to start the game in the autumn. Better start it in spring so that the player has enough time to prepare for winter.

On 08 Nov 2016, at 21:16, akuenzi notifications@github.com wrote:

I guess my mind is on artwork at the moment. Do we need new textures for this, or would we use the existing textures for wheat and barley?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/theSeb1979/FS17_seasons/issues/3#issuecomment-259247234, or mute the thread https://github.com/notifications/unsubscribe-auth/AEyN0CtbLQsAlmSN2CUT6EX9Y7apqWvsks5q8NiqgaJpZM4Kpxrd.

ian898 commented 8 years ago

I agree with Seb I think we should proceed with simplest route get a working version of the mod then expand from there because at least then we have a kind of blue print and a visual aid of were to go from there. I think we need to head towards getting the growth times correct withering at the correct stage ect.

theSeb1979 commented 8 years ago

I guess my mind is on artwork at the moment. Do we need new textures for this, or would we use the existing textures for wheat and barley?

Good point. I haven't even thought of that. If we are thinking about graphics, wouldn't browner grass be more important?

It might be a bad idea to start the game in the autumn. Better start it in spring so that the player has enough time to prepare for winter.

Darn. That is true. Let me think about this.

theSeb1979 commented 8 years ago

Main features which we can split out into more separate issues, if necessary / complex:

Short hand for this will be CSSL ( crop cycles and season length). Please prefix all related issues with "CSSL -"

  1. Modify growth cycle duration for each crop to correspond with a season (FP: urgent)
  2. Implement xml configuration file to make season length customisable by the user (FP: urgent)
  3. Implement spring barley and spring wheat (FP: high)
  4. Wither crops that should have been harvested before winter (FP: medium)
  5. Prevent harvesters and seeders from working in the wrong season (FP: medium) https://github.com/theSeb1979/FS17_seasons/issues/10

Does everyone agree with feature priority (FP) ?

Will be adding to this, as I think of more stuff.

Outstanding discussion points:

  1. Start of game season. What should day 1 be? Once we have agreed on this, calculate season based on day number will need to be modified
joskuijpers commented 8 years ago

I am not sure how you will do ‘winter crops’, but I think that Barley should be the exact same grain as Winter Barley? It makes it all so much more complicated to add a new crop.

On 09 Nov 2016, at 11:09, theSeb1979 notifications@github.com wrote:

Main features which we can split out into more separate issues, if necessary / complex:

Short hand for this will be CSSL ( crop cycles and season length). Please prefix all related issues with "CSSL -"

Modify growth cycle duration for each crop to correspond with a season (FP: urgent)

Implement xml configuration file to make season length customisable by the user (FP: urgent)

Implement spring barley and spring wheat (FP: high)

Wither crops that should have been harvested before winter (FP: medium)

Prevent harvesters and seeders from working in the wrong season (FP: medium) #10 https://github.com/theSeb1979/FS17_seasons/issues/10 Does everyone agree with feature priority (FP) ?

Will be adding to this, as I think of more stuff.

Outstanding discussion points:

Start of game season. What should day 1 be? Once we have agreed on this, calculate season based on day number will need to be modified — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/theSeb1979/FS17_seasons/issues/3#issuecomment-259377898, or mute the thread https://github.com/notifications/unsubscribe-auth/AEyN0BFzFRKMe34YxQVFs7nU-UYGZczOks5q8ZvjgaJpZM4Kpxrd.

ian898 commented 8 years ago

There is the problem though of how will we work out the different types with the script if we dont have multiple crop types?

joskuijpers commented 8 years ago

Could you outline what you want to achieve exactly with the (winter) crops?

On 09 Nov 2016, at 11:14, ian898 notifications@github.com wrote:

There is the problem though of how will we work out the different types with the script if we dont have multiple crop types?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/theSeb1979/FS17_seasons/issues/3#issuecomment-259378862, or mute the thread https://github.com/notifications/unsubscribe-auth/AEyN0PIAfjiPeDHbtZm1bXcf9G5yoR5Vks5q8ZzygaJpZM4Kpxrd.

theSeb1979 commented 8 years ago

@ian898 , @joskuijpers not sure if the below answers your questions?

Assumption is that the in-game barley and wheat will act as winter crops. In other words, if sown in autumn, they will be ready in the summer. Looking at the functions in FruitUtil, it's very doable.

https://gdn.giants-software.com/documentation_scripting.php?version=script&category=68&class=1536

The crops we add, like spring barley and spring wheat will have shorter growth times, so that they can be sown in spring and will be ready in summer.

This is what I know about crops, so, guys, feel free to comment. Initial implementation will aim to keep this simple and probably disregard things like late autumn, late spring etc.

Potatoes: normally planted from March till April. Usually the plants sown in March will be ready around June, but the main potato harvesting period is between August and October.

Sugarbeet: Harvesting is done in Autumn and into early winter. Usually the fields are fertilised and ploughed immediately after the harvest. Cutlvating and sowing happens in the spring followed by weed and pest control (weeding and spraying in the game).

Maize / Corn: I am not fully clued up on how maize is grown for harvesting as cereal. I do know that for silage it's normally planted in the spring, since it's a plant that does not do well in cold temperatures. Although I believe they do have some varieties now that can survive the winter. Cutting maize for silage normally happens in the autumn and I've seen it done in very late autumn, although I am not sure why as the fields certainly took a lot of damage.

Canola / Oil seed rape: Normally sown in spring and harvested in August. I believe it is sometimes sown in the winter as a cover crop (just like the oilseed radishes in the game) and then ploughed back into the soil. but I don't believe that works in the game.

Wheat and Barley: can be planted in both autumn and spring. Harvested in late July and August. Sometimes in September too. (hence why I want to add spring barley and wheat)

Sunflower: In the UK usually planted in late spring (May), but can be done in April, if the soil reaches the right temperature. Normally harvested in September.

Soybean: I don't know much about this, but what I've found out from google is that in the US it's normally planted from late April till June. Harvest starts in late September and finishes around the end of November.

Grass: best planted in spring or autumn. For hay grass is usually left to dry out in the field and cut in July or August. Depending on the weather, I have seen people doing hay in October even For grass (not hay), usually first cut is in May, depending on how wet the spring was and then there will be multiple cuts. Usually 3 or 4, with the final cut in September. Grass is the one that's trickiest to get right in my opinion, because you would have to switch growth on during the summer to let it grow back between cuts.

How to handle radishes, normally I've seen them sown pretty much after harvest and they will be cultivated in autumn, or spring.

theSeb1979 commented 8 years ago

One last thing from me for you guys to mull over, even though it will probably be a separate feature, is the impacts on the game economy. You will see that I created a few issues around that, but it will be important, because I think these changes will make the game unplayable from a money point of view.

Please comment if you disagree with any of the features above, before I proceed.

reallogger commented 8 years ago

Just some thoughts (discard them if it is too difficult to implement):

theSeb1979 commented 8 years ago

It's an interesting thought, but, in my view, there has to be a constant. If the weather is random and the crop cycle duration is based on that, we could end up with crops never growing. This will introduce complexity beyond the scope of the initial implementation.

theSeb1979 commented 7 years ago

Implemented