World Conquest NM

Discussion of all aspects of multiplayer development: unit balancing, map development, server development, and so forth.

Moderator: Forum Moderators

Post Reply
Groznij
Posts: 16
Joined: February 23rd, 2010, 5:47 pm

Re: World Conquest NM

Post by Groznij »

Still chugging along? I know at least a few, including myself, who are waiting.... anxiously?
User avatar
Natasiel
Moderator Emeritus
Posts: 60
Joined: February 28th, 2007, 7:43 pm

Re: World Conquest NM

Post by Natasiel »

Then I hope what's in the oven is quite worth your anxiety. Unfortunately, raising heat won't bring anything faster but rather just burn it. In the meanwhile, if someone could point me to a ready-to-eat poedit crash tutorial, it might avoids ending up translating macros in a near future.
I wonder if ones look for a unit.name rather than a unit.id, is it possible to detect the client's native language and send a custom message?
User avatar
Coffee
Inactive Developer
Posts: 180
Joined: October 12th, 2010, 8:24 pm

Re: World Conquest NM

Post by Coffee »

Natasiel wrote:In the meanwhile, if someone could point me to a ready-to-eat poedit crash tutorial, it might avoids ending up translating macros in a near future.
I wonder if ones look for a unit.name rather than a unit.id, is it possible to detect the client's native language and send a custom message?
$unit.language_name| gives a translated version of the unit name. Want some help? I built my campaign initially around the ideas of WC and it is fully translatable. I make heavy use of built-in translations where possible for all menus so that it is translated into all languages Wesnoth is translated into.
User avatar
Natasiel
Moderator Emeritus
Posts: 60
Joined: February 28th, 2007, 7:43 pm

Re: World Conquest NM

Post by Natasiel »

I've checked it out; using already translated strings is quite clever! I was wondering if we could use "ability_damage +2" and translate it as "ability damage +2" in english?
User avatar
Coffee
Inactive Developer
Posts: 180
Joined: October 12th, 2010, 8:24 pm

Re: World Conquest NM

Post by Coffee »

Natasiel wrote:I was wondering if we could use "ability_damage +2" and translate it as "ability damage +2" in english?
What I would suggest is simply translating "ability_damage" to "ability damage" in English and tacking on the +2 part with string concatenation. This way you will only need to translate what you need and save on doubling of entries to translate.

I've done this with TRANSLATE macros for campaign text translations (mostly Polish for me). This makes it nice to break large text blocks into parts for translation and intermix text domains for built-in translations without having to put in the custom text domain each time. However, this breaks the python poedit translation export macros built in to Wesnoth (basically everything will break these scripts), but regular string concatenation should do it also, like:

Code: Select all

#textdomain wesnoth-WC
text=_"ability_damage"+" +2"
Then in the .po file for your language you would add these in (I just copied another file from another default campaign and replaced the text strings with my own). Save the file with Poedit and you get a nice .mo file that works.

One thing to note is that it (seems to me to be) easiest to add in your translations into a .po file as you are going along and finish a particular section of code.
ShakeZula
Posts: 21
Joined: September 18th, 2010, 2:04 am

Re: World Conquest NM

Post by ShakeZula »

Is this basically the same as the WC where you pick between heroic units, upgrades, gold and items in the beginning, then play 6 rounds vs an increasing # of AI players?

I've been trying to find it on the add on server and it doesn't seem like it's there anymore, where can I find it?

Edit: Never mind just checked again and I guess someone put it back on there.
User avatar
Natasiel
Moderator Emeritus
Posts: 60
Joined: February 28th, 2007, 7:43 pm

Re: World Conquest NM

Post by Natasiel »

Coffee wrote:What I would suggest is simply translating "ability_damage" to "ability damage" in English and tacking on the +2 part with string concatenation. This way you will only need to translate what you need and save on doubling of entries to translate.
So far, so good, it's perfect.
Coffee wrote:I've done this with TRANSLATE macros for campaign text translations (mostly Polish for me). This makes it nice to break large text blocks into parts for translation and intermix text domains for built-in translations without having to put in the custom text domain each time. However, this breaks the python poedit translation export macros built in to Wesnoth (basically everything will break these scripts), but regular string concatenation should do it also, like:

Code: Select all

#textdomain wesnoth-WC
text=_"ability_damage"+" +2"
Then in the .po file for your language you would add these in (I just copied another file from another default campaign and replaced the text strings with my own). Save the file with Poedit and you get a nice .mo file that works.
Then is the english original "ability damage" translated by core wesnoth translation? ...a bit like a recursive translation where _"ability_damage" is translated to en_US "damage" then to xx_YY "whatever 'damage' is in that language"?
Coffee wrote:One thing to note is that it (seems to me to be) easiest to add in your translations into a .po file as you are going along and finish a particular section of code.
That seems like wise advices that I ain't wise enough to follow yet.

Could it be possible to only use some generic builtin translations? (burrowing from original campaigns and core)
User avatar
Coffee
Inactive Developer
Posts: 180
Joined: October 12th, 2010, 8:24 pm

Re: World Conquest NM

Post by Coffee »

Natasiel wrote:
Coffee wrote:I've done this with TRANSLATE macros for campaign text translations (mostly Polish for me). This makes it nice to break large text blocks into parts for translation and intermix text domains for built-in translations without having to put in the custom text domain each time. However, this breaks the python poedit translation export macros built in to Wesnoth (basically everything will break these scripts), but regular string concatenation should do it also, like:

Code: Select all

#textdomain wesnoth-WC
text=_"ability_damage"+" +2"
Then in the .po file for your language you would add these in (I just copied another file from another default campaign and replaced the text strings with my own). Save the file with Poedit and you get a nice .mo file that works.
Then is the english original "ability damage" translated by core wesnoth translation? ...a bit like a recursive translation where _"ability_damage" is translated to en_US "damage" then to xx_YY "whatever 'damage' is in that language"?
I suggest using text domain #wesnoth-WC for your campaign as this follows the same pattern as for the main campaigns (#wesnoth-short form of campaign).

I believe the second underscore will just be interpreted as a string character. Save your self some work and just leave it in regular English, only adding on translations to replace English words. If there is a gender difference, use _"word^female"
Natasiel wrote: Could it be possible to only use some generic builtin translations? (burrowing from original campaigns and core)
Stick the following at the top of your _main.cfg file:

Code: Select all

#textdomain wesnoth-WC
[textdomain]
    name="wesnoth-WC"
    path="data/add-ons/Word_Conquest/translations"
[/textdomain]
This will default the translation strings to come from your translations folder for your addon for each language (if present -- if not will be English as put in addon).

Then where you want to use a built-in translation, you would change text domain to an internal one. i.e.

Code: Select all

...(some code)
#textdomain wesnoth
[message]
message=_"Difficulty: "+"

"+_"Nightmare"
[/message]
#textdomain wesnoth-WC
...(more code)
User avatar
Rigor
Posts: 941
Joined: September 27th, 2007, 1:40 am

Re: World Conquest NM

Post by Rigor »

Natasiel, could you use parts or all of mattsc's generic AI in world conquest? just had this idea when i was waiting for your post of the savegame in the coders corner.
User avatar
Natasiel
Moderator Emeritus
Posts: 60
Joined: February 28th, 2007, 7:43 pm

Re: World Conquest NM

Post by Natasiel »

Coffee wrote:I believe the second underscore will just be interpreted as a string character. Save your self some work and just leave it in regular English, only adding on translations to replace English words. If there is a gender difference, use _"word^female"
The goal was to produce single code with easily editable definitions within the fewer amount of lines. E.g: "ability_damage" being both a string AND a macro. The workaround implies to translate "ability_damage" to "New ability: Damage" within the campaign WML. I was just wondering if we could leave all instances of translations at the same place for uber redundancy; translating only once instead of twice. (saving on cycles thus heat, efficiency and battery life)

Thank you for your help, that did lit the right dark corner. One last question; Do you have to manually grep every '=_"' within the campaign to feed up the po file? Somehow I thought poedit would gather itself every single instances of translatable text: The '=_"' or '= _ "' and all other variant of any amount of white spaces.
User avatar
Coffee
Inactive Developer
Posts: 180
Joined: October 12th, 2010, 8:24 pm

Re: World Conquest NM

Post by Coffee »

Natasiel wrote:I was just wondering if we could leave all instances of translations at the same place for uber redundancy; translating only once instead of twice. (saving on cycles thus heat, efficiency and battery life)
All instances are automatically translated, so you don't have to do anything in particular to get this working.
Natasiel wrote:One last question; Do you have to manually grep every '=_"' within the campaign to feed up the po file? Somehow I thought poedit would gather itself every single instances of translatable text: The '=_"' or '= _ "' and all other variant of any amount of white spaces.
Look into wmlint, which is just a python script to do a grep (and pretty poorly for anything advanced by way of code -- so keep it simple in terms of making translations go round in macros if you want to use this).

Good luck and happy translating.
User avatar
FAAB
Inactive Developer
Posts: 52
Joined: November 15th, 2008, 12:15 pm

UMC support in World Conquest NM

Post by FAAB »

I have put an add-on (named "World Conquest UMC") on BFW 1.11 server that introduce "native" support for UMC factions in World Conquest NM.
This is done using the very promising new concept of MP modification (announced here) and consequently requires 1.11.0+svn (trunk).
By "native", I mean that it can be played with UMC factions without no change in World Conquest WML. It requires some preparation work on the faction though.
As a proof of concept, I have put another modification called "World Conquest NoM" that implement support to Nightmares of Meloen.

As a result, the World Conquest UMC can be played in three modes:
  • "3p - World Conquest for UMC" scenario: WC campaign with default factions (full recruit lists)
  • "3p - World Conquest for UMC" scenario + "Modification to support World Conquest UMC" modification: original WC campaign (groups and bonus are activated)
  • "3p - World Conquest for UMC" scenario + "Modification to support World Conquest UMC" modification + "Nightmares of Meloen definitions for World Conquest UMC" modification: WC campaign with Nightmares of Meloen
As a matter of fact you can play with "Modification to support World Conquest UMC" modification on any 4 player map (AI is expected to be at side 4).

I hope I am not hijacking this thread. I announce this here as I hope we can converge to have these changes (when stable) to be integrated in the original WC or WC2.

[edit] Update "3p - World Conquest for UMC" to version 0.2 to fix problem with AI faction [/edit]
Last edited by FAAB on November 27th, 2012, 12:36 am, edited 2 times in total.
Reason: Clarify BFW version requirement (thanks Pentarctagon!)
User avatar
Pentarctagon
Project Manager
Posts: 4653
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: World Conquest NM

Post by Pentarctagon »

Though perhaps it would be better to wait until 1.11.1 is released with the support for modifications?
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
User avatar
Natasiel
Moderator Emeritus
Posts: 60
Joined: February 28th, 2007, 7:43 pm

Re: UMC support in World Conquest NM

Post by Natasiel »

FAAB wrote:I hope I am not hijacking this thread. I announce this here as I hope we can converge to have these changes (when stable) to be integrated in the original WC or WC2.
It is likely the place where it shall goes. Thank you for your inputs, I'll check it out as soon as there is some free time on hand.
Honor
Posts: 13
Joined: July 18th, 2011, 8:01 pm

Re: World Conquest NM

Post by Honor »

Can you make WC be playable with Khalifate + default Era? It worked in the past. Thanks!
Post Reply