Results 1 to 9 of 9

Thread: Is it possible to functionally change the code name of a vanilla faction in the game codes?

  1. #1
    Dominick's Avatar Ordinarius
    Join Date
    Sep 2009
    Location
    Rijeka, Croatia
    Posts
    713

    Default Is it possible to functionally change the code name of a vanilla faction in the game codes?

    Hi everyone,

    I'm interested if it's possible to change the code names of factions in the game codes (e. g. "venice", "hre", "byzantium" etc.) to other names, or are we forced to use those code names for any faction we might be changing the vanilla factions to? Is the reason why modders don't change them the lenghtiness of such a process, or those code names being hardcoded?

    Thank you for your answers in advance!

    All the best,
    Dominik
    Dominik Pešut,
    President of Association "Gromovnik" & Project Leader of Anno Domini,
    mag. educ. geogr. et hist.



  2. #2
    Lusitanio's Avatar Senator
    Join Date
    Jan 2018
    Location
    Portugal
    Posts
    1,496

    Default Re: Is it possible to functionally change the code name of a vanilla faction in the game codes?

    I don't know how, but I know it's possible. In EBII we don't use the original code names for the factions.

  3. #3
    Dominick's Avatar Ordinarius
    Join Date
    Sep 2009
    Location
    Rijeka, Croatia
    Posts
    713

    Default Re: Is it possible to functionally change the code name of a vanilla faction in the game codes?

    Quote Originally Posted by Lusitanio View Post
    I don't know how, but I know it's possible. In EBII we don't use the original code names for the factions.
    I would suppose that the "easiest" method for this would be to just rename all instances of a faction code name in the game files to another name. A somewhat lengthy process for sure, but it makes the code appear cleaner and more accessible to new members of a modding team, or eventual submodders, not needing to decipher what would for example a faction called "hre" in the game files be in a mod like EBII. However, it was probably not a reason enough for most modding teams to actually invest time in changing those names in their mods.

    Thank you for your answer!

    If someone has more insight on this topic, please let us know!
    Dominik Pešut,
    President of Association "Gromovnik" & Project Leader of Anno Domini,
    mag. educ. geogr. et hist.



  4. #4

    Default Re: Is it possible to functionally change the code name of a vanilla faction in the game codes?

    That's correct - the only reason most mods continue to use the vanilla internal faction names is because they don't want to invest the time needed to change all references to that name in all the data files and then fix all the bugs resulting from files they forgot to edit. None of the internal faction names are hard coded.

    Knowing this community, I'm confident that someone has already posted a list of all files that need to be edited and someone has come along and written a program to automate the process. If you look hard enough, I'm sure you will find these things on TWC. Perhaps the EBII team has made such a tool themselves.

    If you do change all of your internal faction names, I would recommend doing as EBII and prefixing them with an identifier such as "f_" so that autocomplete can be used to create full lists of all factions (a very common need for scripting). Aside from that, I wouldn't worry too much about internal names as they're bound to deviate from the display names eventually (again, see EBII which has easily recognizable internal names and almost totally unintelligible display names [for units and factions], try searching "Aruernoi" and see how many hits you get that aren't related to EBII).

  5. #5
    Dominick's Avatar Ordinarius
    Join Date
    Sep 2009
    Location
    Rijeka, Croatia
    Posts
    713

    Default Re: Is it possible to functionally change the code name of a vanilla faction in the game codes?

    Quote Originally Posted by Callistonian View Post
    Knowing this community, I'm confident that someone has already posted a list of all files that need to be edited and someone has come along and written a program to automate the process. If you look hard enough, I'm sure you will find these things on TWC. Perhaps the EBII team has made such a tool themselves.
    I suppose it would be the 14 files listed in the first post of this thread: https://forums.totalwar.org/vb/showt...6-Step-by-Step.

    If someone has a better list of these files, please post a link, or if there is just certain files missing on this list, please let us know which ones.


    Quote Originally Posted by Callistonian View Post
    If you do change all of your internal faction names, I would recommend doing as EBII and prefixing them with an identifier such as "f_" so that autocomplete can be used to create full lists of all factions (a very common need for scripting). Aside from that, I wouldn't worry too much about internal names as they're bound to deviate from the display names eventually (again, see EBII which has easily recognizable internal names and almost totally unintelligible display names [for units and factions], try searching "Aruernoi" and see how many hits you get that aren't related to EBII).
    Some factions will stay the same for my mod as vanilla, but if there is something good to be achieved by adding an identifier to internal faction names for scripting, why not get it out of the way at the very beginning. If I can add new factions or change internal names for 15 factions, why not put identifiers for 30 of them. Rebels I suppose need to remain named "slave", as they are named in EBII without the identifier as the only exception.

    Thank you very much for your elaborated answer!
    Dominik Pešut,
    President of Association "Gromovnik" & Project Leader of Anno Domini,
    mag. educ. geogr. et hist.



  6. #6
    Gigantus's Avatar You should always listen to your inner voice! - Agreed, but which one?
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    50,618
    Blog Entries
    30

    Default Re: Is it possible to functionally change the code name of a vanilla faction in the game codes?

    Quote Originally Posted by Callistonian View Post
    Knowing this community, I'm confident that someone has already posted a list of all files that need to be edited and someone has come along and written a program to automate the process.
    You called? If you remove default factions then you will need to look for references in a whole bunch of files, starting with EDB, EDU and then moving on to traits, ancillaries, missions etc. You basically need to run a content search in all the text files in the data folder: best to copy these files into a stand alone directory as otherwise the browser default search will also go into sub directories and take a very long time.
    You could also open all files in Notepad++ and use it's search function (search in all open documents) which will present you with clickable links to each instance

    Edit: forgot to mention the text files in the imperial_campaign and maps\base directories.




  7. #7
    Dominick's Avatar Ordinarius
    Join Date
    Sep 2009
    Location
    Rijeka, Croatia
    Posts
    713

    Default Re: Is it possible to functionally change the code name of a vanilla faction in the game codes?

    Quote Originally Posted by Gigantus View Post
    You called? If you remove default factions then you will need to look for references in a whole bunch of files, starting with EDB, EDU and then moving on to traits, ancillaries, missions etc. You basically need to run a content search in all the text files in the data folder: best to copy these files into a stand alone directory as otherwise the browser default search will also go into sub directories and take a very long time.
    You could also open all files in Notepad++ and use it's search function (search in all open documents) which will present you with clickable links to each instance

    Edit: forgot to mention the text files in the imperial_campaign and maps\base directories.
    Thank you! If I'll have trouble with getting to all the necessary files, I suppose I will write here again to see which ones are missing. I could definitely use Notepad++ to ease up the process of changing faction code names.
    Dominik Pešut,
    President of Association "Gromovnik" & Project Leader of Anno Domini,
    mag. educ. geogr. et hist.



  8. #8
    Gigantus's Avatar You should always listen to your inner voice! - Agreed, but which one?
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    50,618
    Blog Entries
    30

    Default Re: Is it possible to functionally change the code name of a vanilla faction in the game codes?





  9. #9

    Default Re: Is it possible to functionally change the code name of a vanilla faction in the game codes?

    You need to do any sort of find/replace carefully by looking at what you're changing, not just a universal change all. Eg, if you want to change the game text files from faction name Venice>Fred you need to make sure that in things like the model db file that uses venice as a faction you don't also change venice if it appears as part of the texture or model name for a unit, unless you also find the name in all the file names, copy them into your mod, and change them too...

Posting Permissions

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