Currently Online

Latest Posts

Topic: English translation thread

GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 2883
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2014-10-31, 12:38

How would you distinguish then between a building needing either fish or meat, or the building needing both fish and meat?


Busy indexing nil values

Top Quote
DragonAtma
Avatar
Joined: 2014-09-14, 01:54
Posts: 254
Ranking
Tribe Member
Posted at: 2014-11-01, 00:43
English is a weird language. England started with celtic inhabitants, it was conquered by the roman empire, then recieved immigrants from germany, it was conquered by William the Conqueror of the french, and eventually absorbed a whole bunch of words from multiple languages. As a result, the english language has a whole bunch of quirks and influences in it, hence this discussion.

So far, nothing in the game requires both fish and meat (which is good, because none of the three tribes can get unlimited amounts of BOTH fish and meat!). But all three tribes have requirements for both bread and (either meat or fish) -- which quickly becomes "This building needs both bread and meat!" or "this building needs both bread and fish!". So let's pretend for a moment that only bread and meat existed. Then the proper messages would be as following:

{--Building needs bread or meat, but not both--}
(at least one is there) "This building has bread or meat."
(both are missing) "This building is missing both bread and meat."

{--Building needs both bread and meat--}
(both are there) "This building has both bread and meat."
(at least one is missing) "This building is missing bread or meat."

But wait! We have both meat and fish, although we don't need both. So...

{--Building needs bread or (fish or meat), but not both--}
(at least one is there) "This building has bread, fish, or meat."
(both are missing) "This building is missing bread, fish, and meat."

{--Building needs both bread and (fish or meat)--}
(both are there) "This building has both bread and either fish or meat."
(at least one is missing) "This building is missing either bread or both fish and meat."

Keep in mind that if a building has four bread but no meat or fish, it has bread or fish (the bread), and is missing bread or fish (the fish).

...English really is a weird language.

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 2883
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2014-11-01, 09:24

This might work with "both", but what about if it's three or four different wares? We need something that doesn't depend on the number of ware types. The logic also doesn't know what the ware types are called either, so we can't reduce the case to just fish or meat.

Maybe we can change "fish or meat are missing" to "there is neither fish nor meat", but I'd have to look at the code again to see if we can make this work. At the moment, the "fish or meat" part doesn't know what's happening with the rest of the sentence. BTW we also can have cases like "3x fish or 2x meat are missing"

BTW the code is in src/logic/production_program.cc, in case you want to have a look.

Edited: 2014-11-01, 09:25

Busy indexing nil values

Top Quote
DragonAtma
Avatar
Joined: 2014-09-14, 01:54
Posts: 254
Ranking
Tribe Member
Posted at: 2014-11-01, 12:56
Okay, if we're going to be thorough, then let me take a crack at it. It'd probably be best to list each problem on a specific line. For example:

"This building failed to train evade from level 0 to level 1 because:
This building does not have any bread.
This building does not have at least three meat and one fish.
This building does not have at least three of parsley, sage, rosemary, and thyme."

Since a fan may wind up making complex requirements, I'll give examples for up to three types (more is doable, see below). Keep in mind that I'm not a professional programmer; I have some skill, but this may not be optimal!


{-- Building needs X (only one X) --}
"This building does not have any X."
example: "This building does not have any bread."

{-- Building needs X (2 or more of X) --}
"This building does not have at least X."
example: "This building does not have at least 3 bread."

{-- Building needs at least one of (X,Y, 1 of each) --}
"This building does not have X or Y."
example: "This building does not have meat or fish."

{-- Building needs at least one of (X,Y -- at least one is 2+) --}
"This building does not have at least X or Y."
example: "This building does not have at least three meat or one fish."

{-- Building needs both of (X,Y, 1 of each) --}
"This building does not have both X and Y."
example: "This building does not have both meat and fish."

{-- Building needs both of (X,Y -- at least one is 2+) --}
"This building does not have at least X and Y."
example: "This building does not have at least three meat and one fish."

{-- Building needs one of (X,Y,Z -- only one of each) --}
"This building does not have X, Y, or Z."
example: "This building does not have bread, fish, or meat."

{-- Building needs one of (X,Y,Z -- at least one is 2+) --}
"This building does not have X, Y, or Z."
example: "This building does not have one bread, two fish, or two meat."

{-- Building needs at least two of (X,Y,Z -- only one of each) --}
"This building does not have at least two of X, Y, or Z."
example: "This building does not have at least two of bread, fish, and meat."

{-- Building needs at least two of (X,Y,Z -- at least one is 2+) --}
"This building does not have at least two of the following: X, Y, or Z."
example: "This building does not have at least two of the following: one bread, three fish, and three meat."

{-- Building needs all of (X,Y,Z -- only one of each) --}
"This building does not have each of X, Y, or Z."
example: "This building does not have each of bread, fish, and meat."

{-- Building needs all of (X,Y,Z -- at least one is 2+) --}
"This building does not have all of the following: X, Y, and Z."
example: "This building does not have all of the following: one bread, three fish, and three meat."

{-- Building needs (one or all) of (four or more items) --}
Use the three-item format, but expand the X, Y, or Z part.
example: "This building does not have bread, fish, meat, cheese, and fruit."
example: "This building does not have all of the following: six bread, five fish, five meat, three cheese, and five fruit."

{-- Building needs (more than one, but not all) of (four or more items) --}
Use the three-item format, but change the "at least two" part (if needed) and expand the X, Y, or Z part.
"This building does not have bread, fish, meat, cheese, and fruit."
example: "This building does not have at least two of bread, fish, meat, cheese, and fruit."
example: "This building does not have at least four of the following: six bread, five fish, five meat, three cheese, and five fruit."

It's getting late, so I'll take another look tomorrow and see if I made any stupid mistakes; right now, though, it looks as this format should cover any requirements, even ones as complex as "You need (three bread) and both of (two meat or two fish) and three of (one parsley, one sage, one rosemary, or one thyme) and (one heavy double trident)."

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 2883
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2014-11-01, 19:20

The first things that spring to mind is that it should be six loaves of bread and three cheeses, but that's something we can't do at the moment due to how the programming works.

I will certainly use you suggestions as inspiration to have another look at this sometime. There is some stuff that will have to happen under the hood first though.


Busy indexing nil values

Top Quote
DragonAtma
Avatar
Joined: 2014-09-14, 01:54
Posts: 254
Ranking
Tribe Member
Posted at: 2014-11-01, 22:48

Yeah, "six loaves of bread" sounds better than "six bread" -- although if it's really six loaves of bread instead of six units of bread, it suggests that even the largest maps are smaller than most micronations. XD

But for things like that, it'd probably be best to define it as [number] [prefix][ware]. Note the spacing; if we're going with individual items, then some items may not need a prefix. Many prefixes would be empty, and both prefixes and wares would need both a singular form (such as "loaf of ") and a plural form (such as "loaves of "), again, minding the spacing.

EDIT: Still getting used to this board, sorry; I'll eventually remember that bbcode eats text in [brackets] and markdown sometimes has trouble keeping lines separate.

Edited: 2014-11-02, 00:08
Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 2883
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2014-11-01, 23:23

As I said, we can't do that yet anyway, because this kind of stuff is defined in the conf files. We are planning to change them to Lua files though, and we may have some programming power after that to improve things.


Busy indexing nil values

Top Quote
DragonAtma
Avatar
Joined: 2014-09-14, 01:54
Posts: 254
Ranking
Tribe Member
Posted at: 2014-11-02, 00:06

Ah, my apologies; I'm not that good at programming.


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 2883
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2014-11-02, 11:39

Don't apologize. Ideas are always good - I want these to be as good as they can be, within the limitations of what can actually be done. Since you're not a coder, you can't know what these limitations are.


Busy indexing nil values

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 2883
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2014-11-04, 08:37

I noticed that we are using both "Building Spaces" and "Building Plots" for places where buildings can be built. We should always use the same term. I have no preference right now as to which term we pick, so I'm open to suggestions face-smile.png


Busy indexing nil values

Top Quote