Skip to main content
Topic: show different age for tree objects (Read 6213 times) previous topic - next topic

show different age for tree objects

show different age for tree objects

old:

[age] months old

new:

age 0 months = 0 months old
age = 1 month = 1 month old
age 2 -11 months = x months old
age 12 - 23 months = 1 year old
age > 23 months = x years old

changed translate string "Monate alt" to "months old"
add translate strings "month old", "year old" and "years old"

different_show_age_treeobjects.diff

Re: show different age for tree objects

Reply #1
Good idea.



Actually... we might as well consider using gettext if we're going to dive into plurals. Czech has three forms (1, 2-4, 5+) and rules for some other languages are a lot more complicated.

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!

Re: show different age for tree objects

Reply #2
I do like this idea...
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Re: show different age for tree objects

Reply #3
Not sure if this is such a good idea, given the speed of many translations. Apart from the plural issues.

 

Re: show different age for tree objects

Reply #4
At least the idea with years instead months is better than now. The numbers are big and noone will calculate the years from it (except he feels very very bored) ;-)

Re: show different age for tree objects

Reply #5
Yeah. Tree ages are generally understood in years (if not centuries) IRL.
--Skreyola
You can also help translate for your language with SimuTranslator.

Re: show different age for tree objects

Reply #6
IMO, 0 months old is a bit lame... "just planted" would sound much better, wouldn't it? :::)

Re: show different age for tree objects

Reply #7
It would, unless it causes too much havoc in the code. Except that also, was it planted? Or did it just germinate naturally? ;-)

Re: show different age for tree objects

Reply #8
And is it growing on chalk or clay soil?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Re: show different age for tree objects

Reply #9
An useful addition would be one comprehensive info window for all trees on tile, instead of a score of these... Of course that is entirely different matter.

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!

Re: show different age for tree objects

Reply #10
I was also thinking of merging trees in a single structure to save memory (like TTD does), but then the "pure" OOP approach let me abstain from it.

However, it seems that tree age in years is a majority vote, so it will be done.

Re: show different age for tree objects

Reply #11
I think trees under 1month old should still say 1 month... perhaps tree ages should start counting at 1... or display in this fashion: 1 month (for 0-1) ... 12 months (for 11-12), then 1 year, etc.
I don't think it should ever give the age as 0 months... Maybe 'sapling' or 'new' or 'days old' (without specifying the number).
--Skreyola
You can also help translate for your language with SimuTranslator.

Re: show different age for tree objects

Reply #12
I would think a string like "%i years %i months" will be added. And honestly, you will almost never ever find a zero aged tree, unless you planted it deliberately at zero age.

Re: show different age for tree objects

Reply #13
I was also thinking of merging trees in a single structure to save memory (like TTD does), but then the "pure" OOP approach let me abstain from it.

A "flyweight" design pattern might help with this. And it's OOP.

Re: show different age for tree objects

Reply #14
Ok, the new translation has been added.


Re: show different age for tree objects

Reply #16
Thiis is slowing going towards offtopic but:
Trees are already only 12bit references and the position and so one is needed, as a tree in simutrans is allowed to be anywhere on a tile.
The only way out I see would be forest tiles with a predefined pattern for the trees (maximum four or so) with individual type and age but fixed position and so on. But I am not sure how to handle loading, or I rather thing this is a lot of work with not so much gain, as memory is usually not the limit nowadays.

Re: show different age for tree objects

Reply #17
Thiis is slowing going towards offtopic but:
Trees are already only 12bit references and the position and so one is needed, as a tree in simutrans is allowed to be anywhere on a tile.
The only way out I see would be forest tiles with a predefined pattern for the trees (maximum four or so) with individual type and age but fixed position and so on. But I am not sure how to handle loading, or I rather thing this is a lot of work with not so much gain, as memory is usually not the limit nowadays.
Also the displaying of multi-tree tiles will become a problem, if multiple trees are organized in one instance.

One possible change could be to remove the position from the ding_t cl****, since many derived cl****es only need to know their position on the map if their image is to be calculated (almost everything in dings/*). Only vehicles/grounds/maybe ways need to know their position always. This could save 5 bytes per object.
Parsley, sage, rosemary, and maggikraut.

Re: show different age for tree objects

Reply #18
I just thought, since a few times it was suggested to players to turn treees off, since they make up for 30% of mein memory apparently, that there must be quite an overhead. I didn't knwo that trees had been optimized this much already.

For me, the trees are something important, particularly that they age, seed new trees, basicially that they are a micro ecological simulation in the Simutrans world.

Re: show different age for tree objects

Reply #19
One could also p**** the position as step() method, then the tree could do without. And we can remove x offset too. Hmm.

Re: show different age for tree objects

Reply #20
[off-topic]
Rate of wood on rectangle map is very bad.
If we start a new game with rectangle map like 1024x256 or 256x1024, more than 80% of land is wood. I feel this is too much.

Re: show different age for tree objects

Reply #21
yes, the create forest function do not scale right with map size.
Parsley, sage, rosemary, and maggikraut.