sahisahi

Member
Im changing the way Slayergroup names are displayed in weapons also translating them:

So i changed DaemonDismissal to MataDemonios

SlayerName.cs

changed Daemondismissal to MataDemonios

DemonSlayerDeed.cs

Same as above

SlayerEntry.cs

No changes

So i have a file that handle item names:


Code:
  if (bw.Slayer != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(bw.Slayer);
                if (entry != null)
                {
                    string slayername = CliLoc.LocToString( entry.Title );
                    name = slayername + " " + name.ToLower();
                }
            }

Removed that method and added this one:


Code:
 /////////added/////////////
          if (bw.Slayer == SlayerName.MataDemonios || bw.Slayer2 == SlayerName.MataDemonios)
            {
                name = "[Daemon Mortem]  "  + name.ToLower();
          
            }
      
////////added////////////

I just have to add every slayername there, right? :)

daemonmortem.png

Edit: Now i just have to discover how to change the ''of vanquishing'' thing....

It is right here but seems way too complex for me, i removed the accuracy bonus from my server tho:

Code:
            if ((bw.DamageLevel != WeaponDamageLevel.Regular || bw.AccuracyLevel != WeaponAccuracyLevel.Regular) && bw.Resource == CraftResource.Iron)
            {
                //weap is magical or accurate
                if (bw.DamageLevel != WeaponDamageLevel.Regular && bw.AccuracyLevel != WeaponAccuracyLevel.Regular)
                    name = string.Format("{0} {1} of {2}", ComputeAccuracyLevel(bw), name.ToLower(), CliLoc.LocToString((1038015 + (int) bw.DamageLevel)).ToLower());
                else if (bw.AccuracyLevel != WeaponAccuracyLevel.Regular)
                    name = string.Format("{0} {1}", ComputeAccuracyLevel(bw), name.ToLower());
                else
                    name = string.Format("{0} of {1}", name, CliLoc.LocToString((1038015 + (int) bw.DamageLevel)).ToLower());

                if (bw.Quality == WeaponQuality.Exceptional)
                    name = "Excepcional" + name.ToLower();
            }
 
Last edited:
question, doesn't the client have a spanish option when you install it? if so, it would be automatically translate all clilocs for you
 
question, doesn't the client have a spanish option when you install it? if so, it would be automatically translate all clilocs for you
I wish it had, im using and old client 6.0.0.0, the package im using came in a rar file, so theres no real installation, just have to extract the files.

There are many things that are in spanish such as skillnames, tiles.. etc i choosed ''ES" (spanish) as language somewhere i dont remember.

Thanks for reply
 
Just adding that here for the native english speakers ;) . The clilocs are horrible since there is like a translation for maybe 20% of the stuff
 
Im changing the way Slayergroup names are displayed in weapons also translating them:

So i changed DaemonDismissal to MataDemonios

SlayerName.cs

changed Daemondismissal to MataDemonios

DemonSlayerDeed.cs

Same as above

SlayerEntry.cs

No changes

So i have a file that handle item names:


Code:
  if (bw.Slayer != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(bw.Slayer);
                if (entry != null)
                {
                    string slayername = CliLoc.LocToString( entry.Title );
                    name = slayername + " " + name.ToLower();
                }
            }

Removed that method and added this one:


Code:
 /////////added/////////////
          if (bw.Slayer == SlayerName.MataDemonios || bw.Slayer2 == SlayerName.MataDemonios)
            {
                name = "[Daemon Mortem]  "  + name.ToLower();
         
            }
     
////////added////////////

I just have to add every slayername there, right? :)

View attachment 7073

Edit: Now i just have to discover how to change the ''of vanquishing'' thing....

It is right here but seems way too complex for me, i removed the accuracy bonus from my server tho:

Code:
            if ((bw.DamageLevel != WeaponDamageLevel.Regular || bw.AccuracyLevel != WeaponAccuracyLevel.Regular) && bw.Resource == CraftResource.Iron)
            {
                //weap is magical or accurate
                if (bw.DamageLevel != WeaponDamageLevel.Regular && bw.AccuracyLevel != WeaponAccuracyLevel.Regular)
                    name = string.Format("{0} {1} of {2}", ComputeAccuracyLevel(bw), name.ToLower(), CliLoc.LocToString((1038015 + (int) bw.DamageLevel)).ToLower());
                else if (bw.AccuracyLevel != WeaponAccuracyLevel.Regular)
                    name = string.Format("{0} {1}", ComputeAccuracyLevel(bw), name.ToLower());
                else
                    name = string.Format("{0} of {1}", name, CliLoc.LocToString((1038015 + (int) bw.DamageLevel)).ToLower());

                if (bw.Quality == WeaponQuality.Exceptional)
                    name = "Excepcional" + name.ToLower();
            }
you would need to lookup each cliloc and enter its name

change
name = string.Format("{0} {1} of {2}", ComputeAccuracyLevel(bw), name.ToLower(), CliLoc.LocToString((1038015 + (int) bw.DamageLevel)).ToLower());
to
name = string.Format("{0} {1} of {2}", ComputeAccuracyLevel(bw), name.ToLower(), ("Supremely Accurate" + (int) bw.DamageLevel).ToLower());
 
you would need to lookup each cliloc and enter its name

change

to

But i have accuracylevel desactivated, my weapons give no accuarcybonus... i would like to translate each weapondamage level to spanish

i changed what you said and i added there ''Destruccion'' in game it looks ''Destruccion5'' :p
 
A risky thing would be to create your own sort of cliloc system that would be serverside, ex: an XML reader/writer that you could even link ingame and affix translations on the go.
That would prevent having to edit every scripts to change the translation.

Or heck, you could even import JSON in your server, and make a translation such as:
Code:
{
	"spanish"
	{
		
		"weapons":
 		[
			{
				"bardiche": "whatever",
				"stuff": "thing"
			},
 		],
 		"armors":
		[
 			{
  				"bla": "blop"
  			}	
 		]
	}
}
(The format above might be off track tho, i don't do stuffs often using JSON)
Also note that if you make an ingame gump that saves in a json format, you won't ever have to open the file to edit it.

Opening the server you could read the file once and dumping it into a "Dictionary<string, string>", and when you have world saves, resaving the translations modified ingame to the json file. (or whenever you make a change, at choice).

I'm not sure what would happen with the performance with such change tho, it might get a bit complex after a certain point, or slower, or problems could arise and reverting would be painful. It would also use some memory, considering the game has quite alot of clilocs.

The good side is, you would be able to translate everything, and you could even make an ingame editor for this, creating while ingame and won't need to relaunch the server each time. You would also not have to bother messing around with XML, which is takes more space than JSON due to all those <> and stuffs.

Working that way would warranty uniformity and you could even add that file to the core in the base namespace and call Translate('weapons.bardiche'), and tada, the name's there!

references for downloading and installing JSON to an existing project:
http://www.newtonsoft.com/json

Also, warning, this is hours of investment! xD
I just wanted to offer something that is not XML, but XML can do the same job too.
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back