Author Topic: How the "tip" on <name> works?  (Read 1075 times)

lazyanttu

  • Guest
How the "tip" on <name> works?
« on: 11 June 2011, 16:40:37 »
When I'm trying to produce, for example worker, i write:
      <name value="produce_worker" tip="worker_info"/>
But where is that "tip"'s text file? When I create my custom-made units, how can I change the tip?

Well, I couldn't find the answer from the forums/guides (i believe this is explained somewhere, but perhaps I'm just blind  ::)), so could you help me with this problem?
« Last Edit: 11 June 2011, 16:45:30 by lazyanttu »

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: How the "tip" on <name> works?
« Reply #1 on: 11 June 2011, 22:02:24 »
hi lazyanttu,

  The 'tip' strings are looked up in the faction lang file, this is a separate lang file that is located in techs/my_tech/factions/my_faction/ and should be named my_faction_en.lng,  changing "my_faction" and 'en' as needed, of course :)

  You can also include a tech wide lang file, techs/my_tech/my_tech_en.lng, in theory when a unit/command/level/etc name needs translating, it is looked up in the relevant faction lang file first, if not found there then it looks in the tech lang file, and if its not there then it would be looked up in the global lang file.

  I say 'in theory' because there are likely numerous places where this doesn't happen atm, so if you notice anything you think may be wrong, please don't be shy, take a screen-shot and post it up, chances are it is an error and simply hasn't been noticed yet.

Cheers.
Glest Advanced Engine - Code Monkey

Timeline | Downloads

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: How the "tip" on <name> works?
« Reply #2 on: 12 June 2011, 04:41:35 »
Hmm, can't believe I missed this feature when I was trying to mass-document GAE... I added it to the wiki now: https://docs.megaglest.org/GAE/Translating

This page also marks the introduction of true syntax highlighting on the wiki. Take a look at the page's source to see how it was done! I'll start using that more often.

Full list of features:
https://docs.megaglest.org/GAE/Features
« Last Edit: 18 June 2016, 14:53:57 by filux »
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

lazyanttu

  • Guest
Re: How the "tip" on <name> works?
« Reply #3 on: 12 June 2011, 10:29:57 »
Thanks for help! Now it works fine :).