Closed pennomi closed 13 years ago
Some of this won't work as expected for all languages. Example:
buy_price=Buy Price: sell_price=Sell Price: currency_lowercase= gold each= each
Some languages will structure this phrase completely differently, so this might not be the right approach.
It might be better to do something like printf style:
buy_price_single = "Buy Price: %d gold" buy_price_multiple = "But Price: %d gold each"
That way it should be possible to handle any sentence structure?
It would be cool if e.g. "Physical" has to only be defined once and is applied through all these strings, but not sure if there's a way to do that without making a mess.
Ah, I was thinking if that might be the best way, though I thought that it might cause the programming to be more difficult. Actually, I can see an easy way to do that now; thanks!
Have you figured out a good class to put this in? The only thing I can think of that is that far reaching is InputState (which doesn't make sense and still doesn't touch everything) and maybe Settings? Perhaps it's still better to just have a new class to handle it.
Yeah I think this probably should be a new class.
Oh, and on the "Physical only has to be defined once" thing, what if you had a small amount of markup, like %physical% which would take the "physical=Physical" tag and insert it into the string? So imagine:
physical=Physical
offense=Offense
physical_offense=%physical% %offense%
You still have the issue of capital "Physical" vs. lowercase "physical."
I think we won't worry about getting that fancy, in case a game wants to define words differently in different places.
Example: Maybe you want to relabel "Physical" as "Strength" and Offense as "Agility". But then it'll sound clunky to say "Requires Strength Agility 5", so you might reword that phrase completely differently.
Ah, good point. Okay, expect some large codebase changes soon. How does MessageEngine sound?
Sounds good
Great work, looks pretty much done for now. We may tweak some things as language situations arise, but this should be a killer start.
Here's my inventory of the internal strings currently in FLARE. This config file will be called messages.txt
Clint, please review this list to make sure that the message naming scheme is how you want it. It is easiest to change right before converting all of the code.
Also, we need to find the appropriate place to put the variable (map) that will hold all these values.