Jump to content

Line Break for item's descriptions

Recommended Posts

Hello, does anyone know the new method for line break when used in an item's text description?


I used to use "\n" and it would work, but now it doesn't?



<!--This is in progression.xml -->
	<set xpath="/progression/perks/perk[@name='perkArchery']/effect_group/effect_description[@level='1']/@long_desc_key">Bow Novice\n 10% More Damage, Shoot Spread, Faster Aim, and Reload with Bows.\nCrafting Quality: 2</set>



Link to comment
Share on other sites

I'm not sure about why its behaving this way, but if you put your "long descriptive text" in a "Localization.txt" file in your mod ( and link it to a unique short string like "myItemNameDesc", which you would likely put as the value for it in the XML you posted should work). The Localization.txt data used to not be synced to clients from servers but now it does.  Because of this, I would say its likely recommended to put things like the names and descriptions of things in Localization.txt


example (not tested):

<set xpath="/progression/perks/perk[@name='perkArchery']/effect_group/effect_description[@level='1']/@long_desc_key">myItemNameDesc</set>


Than in a Localization.txt file you add to your mod under /Config.  This is just an example of just an English localization/usage and for your specific usage you would only need the top line and the line beginning with myItemNameDesc, See the game's Localization.txt file (where the moddable XMl files are) for examples on how to use it for other items/blocks/etc as its a little confusion how to get all the first few fields correct

Key,File,Type,UsedInMainMenu,NoTranslate,english,Context / Alternate Text,german,latam,french,italian,japanese,koreana,polish,brazilian,russian,turkish,schinese,tchinese,spanish
myItemName,items,Gun,,,"Item Name",,,,,,,,,,,,,,
myItemNameDesc,items,Gun,,,"Bow Novice\n 10% More Damage, Shoot Spread, Faster Aim, and Reload with Bows.\nCrafting Quality: 2",,,,,,,,,,,,,,


Edited by doughphunghus (see edit history)
Link to comment
Share on other sites

Thanks for the reply!


I tested your method and it works, thanks!



perkArcheryRank1LongDesc_TEST,progression,perk Agi,,,"This is some \n Test Text for a national \n test of Line Break testing.\nTest 1 2 3 Testing in session."



   <set xpath="/progression/perks/perk[@name='perkArchery']/effect_group/effect_description[@level='1']/@long_desc_key">perkArcheryRank1LongDesc_TEST</set>



Here is the result:


Quick edit / note: it seems that for the changes to take place in Localization.txt, I had to start a saved game, exit the saved game, and start it again for the Description to actually show up.

Edited by Bladestorm Games (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...