Page 1 of 2 12 LastLast
Results 1 to 20 of 30

Thread: How to edit in-game text such as unit names and descriptions.

  1. #1
    Thoragoros's Avatar Citizen
    Join Date
    Jan 2006
    Location
    New York
    Posts
    4,822

    Default How to edit in-game text such as unit names and descriptions.

    Tutorial Purpose - To edit most in game text.

    First and foremost, before we begin, you are going need at least a basic grasp of the PFM, and how to create a mod. Please refer to this excellent tutorial for guidance.

    Using the PFM, extract and open the localisation.loc file from the the text file in the data.pack.

    Now, although the contents of the localization.loc may seem a bit daunting at first, since all of the in game names and descriptions are in this single file, you will notice that they actually follow a somewhat logical order.

    Notice that the localization.loc file is broken into two columns ‘Tag’ and ‘Localised String.’

    The Tag column divides the units, buildings, etc.. according to the respective ID, the Localised String is what you can edit to change the name or description of the given in-game object.

    So, for instance, if you wanted to change the name of Prussian Musketeers you would look in the Tag column for units_on_screen_name_Inf_Line_Prussian_Musketeers and then you would change ‘Muskteers’ in the Localised String to whatever you want.

    Follow this for whatever you want to edit, and you are good to go.

    Hope this helps!

    Credits,

    To Swiss Halbedier, who told me how to edit Unit Names.
    Last edited by Thoragoros; April 17, 2010 at 04:14 PM.
    Founder of The Great War - A WWI Mod, Creator of Thorized - Napoleon: Total Combat

    Where Gods Walk Among Men
    The Line of Thor
    Patron of: Bethencourt, Hip63, m_1512

    Under the Patronage of Captain Blackadder, Member of the Legion of Rahl.

  2. #2

    Default Re: How to edit in-game text such as unit names and descriptions.

    I made a _loc pack sorted alphabetically and I have also include the TSV file. You can make the changes straight on the pack or make them fist in TSV and then import it to pack using PFM.

    Also when you enter big texts (e.g. faction description) and you want to have a space between paragraphs, enter the code \n\n between the last word of previous and the first word of next paragraph without spaces.




  3. #3

    Default Re: How to edit in-game text such as unit names and descriptions.

    Quote Originally Posted by Thoragoros View Post
    Tutorial Purpose - To edit most in game text.

    ...snio...

    So, for instance, if you wanted to change the name of Prussian Musketeers you would look in the Tag column for units_on_screen_name_Inf_Line_Prussian_Musketeers and then you would change ‘Muskteers’ in the Localised String to whatever you want.

    Follow this for whatever you want to edit, and you are good to go.

    Hope this helps!

    Credits,

    To Swiss Halbedier, who told me how to edit Unit Names.
    Fist off thank you very much for this...

    Secondly, is it possible to create new enteries for new units? I presumed that you just changed the end of the Tag so

    units_on_screen_name_Inf_Line_Prussian_Musketeers

    became

    units_on_screen_name_Inf_Line_British_Musketeers (after creating such a unit)

    but this does not seem to work?

    Thanks for any help in advance

    SCW

  4. #4

    Default Re: How to edit in-game text such as unit names and descriptions.

    You can do this but in this case you have to add in db\units the custom name Inf_Line_British_Musketeers in the column before Region IDRef.




  5. #5
    alpaca's Avatar Harbinger of saliva
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    4,811

    Default Re: How to edit in-game text such as unit names and descriptions.

    Quote Originally Posted by husserlTW View Post
    You can do this but in this case you have to add in db\units the custom name Inf_Line_British_Musketeers in the column before Region IDRef.
    This is actually not true. I'm don't know what that entry does but for the unit name, the game simply checks the suffix.

    I highly recommend exporting the file to TSV and using open office or excel to edit it.

    No thing is everything. Every thing is nothing.

  6. #6

    Default Re: How to edit in-game text such as unit names and descriptions.

    Quote Originally Posted by alpaca View Post
    This is actually not true. I'm don't know what that entry does but for the unit name, the game simply checks the suffix.

    I highly recommend exporting the file to TSV and using open office or excel to edit it.
    I agree that it's not correct. The coloumn just before Region is for the unit text in the Info card (explaining what the unit is etc.) I have attached an example from my DEK1.1 mod: "unit_description_texts_long_description_text_Small_Galley_DEK_KC" from the loc file is matched to the entry in db/units table (see screenshot) coloumn O.

    I would also recommend using excel or open office, it gives you the ability to freeze panes etc. for easier editing. I have so far not used PFM for editing, always in MS Excel.

    Cheers iutland

  7. #7
    Emperor BLUBBS VII's Avatar Decanus
    Join Date
    Apr 2010
    Location
    New York City, USA
    Posts
    500

    Default Re: How to edit in-game text such as unit names and descriptions.

    Finally I found this thread, thanx thor plus more rep!!!@!#
    Advance to Contact. Duffer Mod.

  8. #8

    Default Re: How to edit in-game text such as unit names and descriptions.

    delete
    Last edited by Braindead Colonel; June 23, 2010 at 06:27 PM.

  9. #9

    Default Re: How to edit in-game text such as unit names and descriptions.

    Does anyone know if it's possible to add special characters such as Ö in the ingame text?
    I have added such to the loc.file, but all the menu displays is the code for it U+00D6

    edit*

    nvm, had to save the loc pack as a movie, of course, GRRRRRRRR *implodes*
    Last edited by Braindead Colonel; June 23, 2010 at 07:04 PM.

  10. #10
    Libertus
    Join Date
    Jan 2010
    Location
    New Zealand
    Posts
    55

    Default Re: How to edit in-game text such as unit names and descriptions.

    can any one explain why, when i add a new unit in to give it a name using PFM .loc editor, i get a error meaning i cant save, says something like no DBnull or something.

    yet when i use The tsv import export method it works, is this the same for others when they add new units, not edit current entries?

  11. #11

    Default Re: How to edit in-game text such as unit names and descriptions.

    Quote Originally Posted by Braindead Colonel View Post
    Does anyone know if it's possible to add special characters such as Ö in the ingame text?
    I have added such to the loc.file, but all the menu displays is the code for it U+00D6

    edit*

    nvm, had to save the loc pack as a movie, of course, GRRRRRRRR *implodes*
    Special characters are fairly easy as ö will be ö and ã is ã The easiest way to find out is to export the .tsv and open with a spreadsheet editor like MS Excel or OpenOffice. Find other instances in the tsv file for the same character and replace the character in question with it. (unless your edit entry solved it?)

    Cheers

    iutland

  12. #12

    Default Re: How to edit in-game text such as unit names and descriptions.

    It worked, though it seems Cyrillic letters can't be added.

  13. #13
    alpaca's Avatar Harbinger of saliva
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    4,811

    Default Re: How to edit in-game text such as unit names and descriptions.

    Quote Originally Posted by Braindead Colonel View Post
    It worked, though it seems Cyrillic letters can't be added.
    Strange, unicode should support them. http://www.unicode.org/charts/

    No thing is everything. Every thing is nothing.

  14. #14

    Default Re: How to edit in-game text such as unit names and descriptions.

    I am able to add them to the file. I can view them properly in the PFM, but ingame it doesn't display anything, just a blank.

    A clanmate of mine said that messages typed ingame by Russian players aren't seen by people with US or western european NTW versions, so maybe that explains it.

    It is not a big issue for me, transliterations are probably better for what I'm trying to do.
    Last edited by Braindead Colonel; June 24, 2010 at 01:40 PM.

  15. #15

    Default Re: How to edit in-game text such as unit names and descriptions.

    Quote Originally Posted by alpaca View Post
    This is actually not true. I'm don't know what that entry does but for the unit name, the game simply checks the suffix.

    I highly recommend exporting the file to TSV and using open office or excel to edit it.
    Quote Originally Posted by Iutland View Post
    I agree that it's not correct. The coloumn just before Region is for the unit text in the Info card (explaining what the unit is etc.) I have attached an example from my DEK1.1 mod: "unit_description_texts_long_description_text_Small_Galley_DEK_KC" from the loc file is matched to the entry in db/units table (see screenshot) coloumn O.

    I would also recommend using excel or open office, it gives you the ability to freeze panes etc. for easier editing. I have so far not used PFM for editing, always in MS Excel.

    Cheers iutland
    I think you are both wrong. There are three entries in _loc file as you can see for example in the case of the unit 2_Decker_50 :

    1. units_on_screen_name_2_Decker_50 is for the name in of the unit.

    2. unit_description_texts_description_text_2_Decker_50 is for the first short paragraph of unit card.

    3. unit_description_texts_long_description_text_2_Decker_50 is for the second long paragraph of unit card.




  16. #16

    Default Re: How to edit in-game text such as unit names and descriptions.

    Quote Originally Posted by husserlTW View Post
    I think you are both wrong. There are three entries in _loc file as you can see for example in the case of the unit 2_Decker_50 :

    1. units_on_screen_name_2_Decker_50 is for the name in of the unit.

    2. unit_description_texts_description_text_2_Decker_50 is for the first short paragraph of unit card.

    3. unit_description_texts_long_description_text_2_Decker_50 is for the second long paragraph of unit card.
    Hi Husserl

    I think not

    It's not mandatory to include both "description texts" but agree that my reply didn't reflect that.
    For information the "unit ID/name" and "unit description text ID/reference" are not linked so no need to be identical.

    Best regards

    iutland

  17. #17

    Default Re: How to edit in-game text such as unit names and descriptions.

    Gentlemen, what if you want to add new entries to it. So you have created new units. I know its pretty basic, I think I know how, but just to be sure, can someone write it up.

    Cheers, MB
    Formally known as 'Marshal Beale' - The Creator the Napoleon TW mods - 'Napoleon Order of War' and 'Revolution Order of War'

  18. #18

    Default Re: How to edit in-game text such as unit names and descriptions.

    Quote Originally Posted by Iutland View Post
    Hi Husserl

    I think not

    It's not mandatory to include both "description texts" but agree that my reply didn't reflect that.
    For information the "unit ID/name" and "unit description text ID/reference" are not linked so no need to be identical.

    Best regards

    iutland
    Actually we say the same thing. In PFM it is one column before Region IdRef as i noted but in TSV it is 2 before in O column as you've noted.

    Quote Originally Posted by ♔Marshal Beale♔
    Gentlemen, what if you want to add new entries to it. So you have created new units. I know its pretty basic, I think I know how, but just to be sure, can someone write it up.
    Though it should be obvious so far I repeat the procedure briefly:

    Give a name which the game will identify in localised strings and place it in units table in the column before the one of Region IdRef (i think 2 before that in TSV). Here you can enter any name you like because it is gonna used only for this purpose. It won't be the name that will be appeared. Let's say you enter mickey_mouse and you want on screen to have Bavarian Line Infantry.

    Go in your localisation.loc and make three new lines entering in columns A, B, C:

    1. units_on_screen_name_mickey_mouse | Bavarian Line Infantry | False

    2. unit_description_texts_description_text_mickey_mouse |a small text for the first short paragraph of unit card | False

    3. unit_description_texts_long_description_text_mickey_mouse | longer text for the rest infos in unit card | False



    It is supposing that for generic units (e.g. generic line infantry) you repeat the same name in units table but for units you want to add specific historic info you make a new name. In long description start your text with code \n\n so an empty line is placed add a new paragraph after short description.




  19. #19

    Default Re: How to edit in-game text such as unit names and descriptions.

    Quote Originally Posted by husserlTW View Post
    Actually we say the same thing. In PFM it is one column before Region IdRef as i noted but in TSV it is 2 before in O column as you've noted.



    Though it should be obvious so far I repeat the procedure briefly:

    Give a name which the game will identify in localised strings and place it in units table in the column before the one of Region IdRef (i think 2 before that in TSV). Here you can enter any name you like because it is gonna used only for this purpose. It won't be the name that will be appeared. Let's say you enter mickey_mouse and you want on screen to have Bavarian Line Infantry.

    Go in your localisation.loc and make three new lines entering in columns A, B, C:

    1. units_on_screen_name_mickey_mouse | Bavarian Line Infantry | False

    2. unit_description_texts_description_text_mickey_mouse |a small text for the first short paragraph of unit card | False

    3. unit_description_texts_long_description_text_mickey_mouse | longer text for the rest infos in unit card | False



    It is supposing that for generic units (e.g. generic line infantry) you repeat the same name in units table but for units you want to add specific historic info you make a new name. In long description start your text with code \n\n so an empty line is placed add a new paragraph after short description.
    I just want to clarify what you have described above, since I ran into some issues:

    1. above, the unit id is used,

    but for 2. and 3. the localisation string (input before Region ID) is used.

    That is you can give multiple units different names, but use the same description for all.

  20. #20

    Default Re: How to edit in-game text such as unit names and descriptions.

    I do not get you. In all three of these entries one and the same locilsation string is used. Files with same descriptions are those with a generic unit name which obviously will have a generic (but unique) localisation string e.g. Inf_Line_Infantry or those with deferents names but with same descriptions. In any case localisation string is one for the three uses in _loc file and in unit card and it is unique becasue unit names are also uniques.





    I think we have said to many for such a simple thing. Just a careful look in files is enough... Or better a small test...
    Last edited by husserlTW; August 18, 2010 at 05:49 AM.




Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •