Page MenuHomeWildfire Games

Fig tree minimap color
ClosedPublic

Authored by temple on Aug 28 2017, 11:04 PM.

Details

Summary

The fig tree inherits the tree template rather than berry, so it shows up looking like wood on the minimap rather than fruit. This fixes that.

Have apple and olive trees inherit from tree too, to be consistent. Notice that they'll now block movement (instead of acting like berries which don't).

Add smaller status bars to the two wood bushes, since they're small.

Test Plan

Agree with the changes.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

temple created this revision.Aug 28 2017, 11:04 PM

The main question is: is it mainly a tree or a bush? If the answer is a bush, you can just change the Minimap stuff in that template.

I don't know the difference between tree and bush. I know that five of the trees/bushes have fruit and the rest of the trees/bushes have wood.

I see now that template_gaia_flora_bush is only used in template_gaia_flora_bush_berry, so it makes sense to combine them if that was your point.

temple updated this revision to Diff 3359.Aug 29 2017, 12:48 AM

Merged bush and bush_berry.

s0600204 added subscribers: Restricted Owners Package, s0600204.Aug 29 2017, 2:18 AM

Are there consequences for changing the generic name? e.g. with the AI.

Unless the AI has learnt to read recently, no. The GenericName is read by human-players, so the consequence in changing it is that it will need re-translation. (For resource gathering, the AI looks at the ResourceSupply component.)

fatherbushido added a comment.EditedAug 29 2017, 8:05 AM

@temple:


"<element name='GenericName' a:help='Generic English-language name for this class of unit.'>"
"<optional>" + "<element name='SpecificName' a:help='Specific native-language name for this unit type.'>"

It seems in fact that the specific names are useless here (or they are used for a different purpose than the one explained in the schema help).


I meant that if you change inheritance only for the minimap it's not the good way to do. In that case you could just have change the Minimap entry in flora_tree_fig.xml/
I don't say that current inheritance or current template namming are right. We just need to do a decision.
For example, I expect flora_tree_olive, flora_tree_fig, flora_tree_oak to all inherit from template_gaia_flora_tree. Nonetheless, 2 among those 3 have ResourceSupply and the 1st one doesn't inherit from tree template. Imo that's completly wrong and I wonder if your fix is ok.
That said, it remains a / design decision / policy / choice /: what do we decide to be tree and bush. Do we decide that by ResourceSupply or by Obstruction behavior. Both choice has its pros and cons. I won't give you an answer. But if you choose to make flora_tree_fig inherit from template_gaia_flora_bush, then imo rename it to flora_bush_fig (and fix obstruction). If you don't choose the converse then fix flora_tree_olive.
A proper solution could be to add a new generic template template_gaia_flora_tree_fruit (where fruit could be replace with another word meaning that it provides food) and makes flora_tree_fig and other trees wich provides food inherits from that.


Are there consequences for changing the generic name? e.g. with the AI.

Unless the AI has learnt to read recently, no. The GenericName is read by human-players, so the consequence in changing it is that it will need re-translation. (For resource gathering, the AI looks at the ResourceSupply component.)

Okay. That's what I assumed, but when poking around I saw a few "generics" so I wanted to at least ask the question.

Checking again, it seems the AI has learned a few words: :)

petra/queueplanBuilding.js:				else if (template.hasClass("GarrisonFortress") && ent.genericName() == "House")
petra/queueplanBuilding.js:				else if (template.genericName() === "Rotary Mill" && ent.hasClass("Field"))
common-api/entity.js:		if (specificName && specificName === "Rabbit")

(and fix obstruction)

I didn't notice that, thanks. I just saw 2-1, apple and olive vs fig.

temple updated this revision to Diff 3368.Aug 29 2017, 5:19 PM

Use the same status bars and selection footprint for fruit as with trees.
Use the default gaia status bars for small trees/fruit (aka bushes).

It's weird to me that berries and grapes don't block movement/pathfinding, but I'll leave it in. (I guess the two wood bushes shouldn't block movement/pathfinding either, in that case?)

It's weird to me that berries and grapes don't block movement/pathfinding, but I'll leave it in. (I guess the two wood bushes shouldn't block movement/pathfinding either, in that case?)

Like unit overlaping and things like that, it's tweaks for the pathfinder (to avoid stucked units for example).


Well, disclaimer: I still don't provide orders / solutions / answers.
It seems clear that we have two kind of things: bushes and trees.
That's well reflected by their template names.


But we have trees with or without food and bushes with or without food.
And it seems also that the inheritence is completly messed with those things.

So that needs to be deeply thought and deeply cleaned.

Rework inheritence, rework namming, merging things,... are tracks to achieve that goal.

An idea:
template_gaia_flora_tree -> template_gaia_flora_tree_fruit and template_gaia_flora_tree_wood
template_gaia_flora_bush -> template_gaia_flora_bush_fruit and template_gaia_flora_bush_wood

To help, here are good (old / outdated) things to read

https://trac.wildfiregames.com/wiki/List%3A_Entities%3A_Nature%3A_Flora
https://trac.wildfiregames.com/wiki/List%3A_Entities%3A_Nature%3A_Flora%3A_Plants
https://trac.wildfiregames.com/wiki/List%3A_Entities%3A_Nature%3A_Flora%3A_Trees

To me, it makes more sense to group as fruit vs wood rather than tree vs bush, because there's more commonality: generic name, tooltip, icon, minimap, resource supply, and sound; compared to footprint height and status bars (and possibly obstruction blocks). Plus there's five fruits but only four bushes.

It's weird to me that berries and grapes don't block movement/pathfinding, but I'll leave it in. (I guess the two wood bushes shouldn't block movement/pathfinding either, in that case?)

Like unit overlaping and things like that, it's tweaks for the pathfinder (to avoid stucked units for example).

Okay, but it still seems weird.

To help, here are good (old / outdated) things to read

"Last modified 8 years ago", before even the pre-alphas existed. :)

temple added a comment.EditedAug 29 2017, 11:03 PM

It's weird to me that berries and grapes don't block movement/pathfinding, but I'll leave it in. (I guess the two wood bushes shouldn't block movement/pathfinding either, in that case?)

Like unit overlaping and things like that, it's tweaks for the pathfinder (to avoid stucked units for example).

Is this causing berries to be sometimes placed in mines?
Edit: Nevermind, I see that's not the case.

Nescio added a subscriber: Nescio.EditedSep 26 2017, 8:46 AM

To complicate things even further, personally I'd prefer:

  • fruit bushes (e.g. grapevine): food
  • fruit trees (e.g. olive, fig, date): both food *and* wood
  • ordinary trees (e.g. birch, oak, pine): wood

And corresponding minimap colours, e.g. animals and fruit bushes red-ish, fruit trees yellow-ish, ordinary trees green-ish, metal blue-ish, and stone grey-ish.

Just my two cents, feel free to ignore :)

temple updated this revision to Diff 3918.Oct 21 2017, 5:55 PM
temple edited the summary of this revision. (Show Details)
temple edited the test plan for this revision. (Show Details)

I originally didn't want to set the food minimap color in four different places, but it seems like this is the easier solution.

elexis added a subscriber: elexis.Oct 21 2017, 6:33 PM
elexis added inline comments.
binaries/data/mods/public/simulation/templates/gaia/flora_tree_olive.xml
9 ↗(On Diff #3918)

I'd expect that the common noun food should do (as we intend that both common and proper noun have the same meaning, so the reader shouldn't have to guess why that thing is written with a capital F.)
Use the proper noun with names and unit classes (Civic Center), or whatever the most recent convention in en-US is for that and what might match with most of the other cases in the Tooltips.
(or not)

14 ↗(On Diff #3918)

Duplicating the color means someone comes along and wants to change one value and forgets to update or doesnt find all copies.
StatusBars are still duped I guess, previous patch had one more copy of the StatusBars than here, dunno what's better.

temple added inline comments.Oct 21 2017, 7:12 PM
binaries/data/mods/public/simulation/templates/gaia/flora_tree_olive.xml
9 ↗(On Diff #3918)

I agree that it looks strange, but the convention in the tooltips is to capitalize Food/Wood/Stone/Metal.

14 ↗(On Diff #3918)

Maybe for now we can say it's okay to set the food minimap color in four different places?
Later someone (not me) can organize the templates so there's not as much duplication.

Wouldn't the proposed new parent template fruit tree fix these things? Well, I didn't want to get involved originally :S

binaries/data/mods/public/simulation/templates/gaia/flora_tree_olive.xml
9 ↗(On Diff #3918)

It seems that the only use of the tooltip is not to inherit a wrong one.

temple updated this revision to Diff 3923.Oct 21 2017, 7:48 PM

Added a fruit tree template to reduce duplication. Now the food minimap color is only defined twice, once for bush berries and once for fruit trees.

binaries/data/mods/public/simulation/templates/gaia/flora_tree_olive.xml
9 ↗(On Diff #3918)

Correct.

In D845#37799, @temple wrote:

Added a fruit tree template to reduce duplication. Now the food minimap color is only defined twice, once for bush berries and once for fruit trees.

Seems the wanted solution.
(The one which fits the original \begin{inception} well thought \end{inception} schemas.)
I can review it for completeness and check it doesn't 'break' the AI (perhaps did you?)

elexis added inline comments.Oct 23 2017, 4:16 PM
binaries/data/mods/public/simulation/templates/gaia/flora_tree_olive.xml
9 ↗(On Diff #3918)

(As in maybe we can find something more imaginative or informative, like olives playing a unique role in history. I recall Romans used olive oil for their body and felt it was more clean than animal fats used by celts or something https://www.thoughtco.com/hygiene-in-ancient-rome-and-baths-119136.

At least there have been complaints about descriptions being crappy (#4505). So perhaps setting it disabled might be better than sending this to transifex if the purpose is not to provide a string the way it should be in the final product but only to prevent the inheritence.)

Here's some other resource tooltips:

A mineral deposit, providing access to rare forms of precious Metal.
A treasure that can be quickly gathered.
Chop down to accumulate Wood.
Collect food from this bountiful oceanic resource.
Collect food from this bountiful riparian resource. [new word to me: riparian = relating to or situated on the banks of a river]
Gather figs for Food.
Gather grapes from these vines for Food.
Gather the fruit from these bushes to accumulate Food.
Kill, then collect food from this bountiful oceanic resource.
Mine these to provide Stone building material.
These ruins that can be mined for resources.

My addition was:

Gather apples for Food.
Gather olives for Food.

I don't have a preference either way. Disabling the tooltip would be fine, for example most fauna don't have a tooltip.

elexis added a comment.EditedOct 23 2017, 6:43 PM

I don't really mind either either, I just wanted to inform that there are such points of view.
(The existing tooltips are not necessarily regarded as a good example by everyone)

fatherbushido added a comment.EditedOct 24 2017, 5:17 PM

\begin{Review}

https://trac.wildfiregames.com/wiki/List%3A_Entities%3A_Nature%3A_Flora
https://trac.wildfiregames.com/wiki/List%3A_Entities%3A_Nature%3A_Flora%3A_Plants
https://trac.wildfiregames.com/wiki/List%3A_Entities%3A_Nature%3A_Flora%3A_Trees

Current flora files:

So:

gaia/flora_bush_badlands
gaia/flora_bush_temperate

should inherit from template_gaia_flora_bush (you can add res wood at that place).

gaia/flora_tree_fig

gaia/flora_tree_apple
gaia/flora_tree_olive

should inherit from template_gaia_flora_tree_fruit

\end{Review}

Else it's ok, I set 'Request Changes' but that's minor.

fatherbushido requested changes to this revision.Oct 24 2017, 5:18 PM
This revision now requires changes to proceed.Oct 24 2017, 5:18 PM
temple updated this revision to Diff 3961.EditedOct 25 2017, 2:16 AM

Did bushes and removed some duplicated things. Changed a couple of obstructions so fruit tree gathering looks slightly better. Removed the new tooltips.

fatherbushido accepted this revision.Oct 25 2017, 9:50 AM

All is fine. (checked validation, placed all units and tested in game with gathering in case of).

You move some stuff in template_gaia_flora to avoid little duplication, that wouldn't be my choice. It could be reverted later if 'we' need non resources flora entities.

I will point out in the commit message (as you pointed out in the summary) that apple and olive trees are not passable anymore. I didn't notice anything wrong in game. I am not sure I have a good improvment / risk ratio on commiting that.

On the other way, wood bushes are kept non passable, we could have change it but it seems better to keep it like that.

Thanks!

This revision is now accepted and ready to land.Oct 25 2017, 9:50 AM

refs r3860, r14727, r7976, r9304, r7259 (I don't put the P after r to not spam those old revs).

This revision was automatically updated to reflect the committed changes.

(AI should be fine as it uses the resourceSupplyType)