Results 1 to 16 of 16

Thread: How to add a faction from scratch

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default How to add a faction from scratch

    So, I've finally figured out what my missing ingredient was to adding new factions to the DB (it's always a dumb little mistake)

    I would recommend doing it through the Assembly Kit with its automatically generated ID numbers. You need to modify or add your faction to the:
    1. factions_table
    2. faction_banners_table
    3. faction_rebellion_units_junctions_table
    4. faction_to_mercenary_set_junctions table
    5. faction_uniform_colours_table
    6. commander_unit_permissions_table


    I would recommend copying and pasting the info related to units based on a faction with the same military group type (column in the factions_table). So, if you made a faction that had the roman military_group, just copy Rome's info for the commander_unit_permissions and faction_rebellion_units_junctions (Rome doesn't have mercenary sets, but the same logic applies, though I don't think it's as rigid as the others). This has gotten my new factions working, but you also want to match the faction up to a group in the faction_to_faction_group_table, and it should be possible to create civil war factions for fully playable minors now by linking a new faction to the playable faction in the faction_civil_wars_setup_table (you would also need to create the political parties.

    On the commander_unit_permissions, most factions will need them, but it depends on the subculture. Carthaginian, Germanic, Britannic, and Gallic (note - not Celtic) subcultures are defined at the subculture level and don't need to be done. But the other subcultures all need to be defined at the factional level (the faction column) and those are the ones you will need to add in.

    Then add your faction into the start_pos as normal, and follow the rest of this tutorial to tweak your faction in other ways (icons, effect bundles etc.):
    http://www.twcenter.net/forums/showt...ly-Kit-and-PFM

    I will try to repeat the process in Attila, but I would imagine it will be very similar.

    Hope this is spurs on some creative modders and overhauls to try new things.
    Last edited by ABH2; February 23, 2015 at 09:22 PM.

  2. #2

    Default Re: How to add a faction from scratch

    Thank you for making this. This really helped me get the DB files together but would there be a tutorial on how to create a new faction in the startpos file? I've done everything I know to do and it still crashes when I use BoB. I've restarted the mod from scratch twice and I'm all out of ideas.

  3. #3

    Default Re: How to add a faction from scratch

    There is not a tutorial that covers just that aspect. To get a new faction into the startpos, using the assembly kit, go to the startpos_factions. Add a new entry into the table. The form editor is useful, but less so for adding a faction as it won't fill in or give you all the entries you need to make it work.

    The easiest way to get a faction working is copy and paste the info from one that has the same sort of military group (it's a reoccuring theme). Things that can cause crashes, though:
    1. Make sure to double check whether a faction is marked as playable and major.
    2. The cai_starting_personality and cdir_military_generator_config info. This is why I say copy and paste another faction.
    3. I believe turn order can also cause issues, so it's best to just set it to zero to get the faction in and then tweak it along with anything else.
    4. Obviously, make sure you set the campaign you want it to go into.

    From there, you can give it regions. The Assembly Kit is pretty sensitive, so most likely you are making some small mistake that is throwing everything off.

  4. #4

    Default Re: How to add a faction from scratch

    Quote Originally Posted by ABH2 View Post
    There is not a tutorial that covers just that aspect. To get a new faction into the startpos, using the assembly kit, go to the startpos_factions. Add a new entry into the table. The form editor is useful, but less so for adding a faction as it won't fill in or give you all the entries you need to make it work.

    The easiest way to get a faction working is copy and paste the info from one that has the same sort of military group (it's a reoccuring theme). Things that can cause crashes, though:
    1. Make sure to double check whether a faction is marked as playable and major.
    2. The cai_starting_personality and cdir_military_generator_config info. This is why I say copy and paste another faction.
    3. I believe turn order can also cause issues, so it's best to just set it to zero to get the faction in and then tweak it along with anything else.
    4. Obviously, make sure you set the campaign you want it to go into.

    From there, you can give it regions. The Assembly Kit is pretty sensitive, so most likely you are making some small mistake that is throwing everything off.
    I triple checked all of that. It's all correct. This is a tough one. Well thanks for the help. If I find out what's wrong, I'll post it here so the next guy will know to look out for it.

  5. #5

    Default Re: How to add a faction from scratch

    Hey, Ron. Message me on Steam next time you see me on, and I'll do my best to help (go over your files, etc.). It's tough to say without seeing the work. I had been busy the past few days, but I should be available over the next couple.

  6. #6

    Default Re: How to add a faction from scratch

    Hi ABH2, was hoping you could help. I'm currently working in the Vae Victis mod and we are having and issue with the Samnite faction we added to the main campaign. The faction emerges as a rebel faction in southern Italy. The faction doesn't have a problem appearing when the Ocsii rebels take a settlement, but if someone tries to subjugate the Sanmites or ties to liberate them after taking a Roman settlement the game crashes. Do you have any idea what could cause this?
    Balbor

    Former Creative Director
    Former Head Unit Modeller and Texture
    Fourth Age:Total War

  7. #7

    Default Re: How to add a faction from scratch

    On Ron's issue above - we solved it. The issue was related to a mistake made editing the startpos files in the AK (it's better not to touch the startpos_victory_conditions).

    On another note, some issues with the Assembly Kit and startpos compiling with BOB can result from when you are relying on changed DB tables to make the new startpos (such as when adding factions). When BOB runs to assemble a startpos, it launched the game and runs through the pack files and seems to depend on them to an extent to compile the new startpos. So, if your new startpos in AK references stuff in the DB that doesn't exist in vanilla, you can get a CTD. The solution is to take your edited AK DB tables and put them into a pack file. Place that in your Rome 2 -> data folder like any other mod when you go to assemble. That should clear up some CTD issues that can prevent BOB from assembling a new startpos.

    Balbor-I haven't actually encountered that issue. A few questions (I was a bit confused by the scenario laid out, based on when you said taking of another Roman settlement and referenced the Osci which I guessed was the name of the Samnite faction):
    1. Is the Samnite faction ported from another campaign, or one made from scratch?
    2. In this scenario, they have been liberated/established in their region where they are set as primary rebels, right? And then the issue is retaking that territory?
    3. Did you say you were trying to liberate the same region a second time, if I understood that all correctly?

    From my experience, you can only liberate a settlement to one level, so to speak. By which I mean the primary rebel faction, whatever you set that as. So, i was a little confused on what was described there in the paragraph.

    If the faction is liberated and brought into the game on the initial attempt, the faction itself in the DB and starptos would seem to be ok with no issues. So, I'm guess the issue the second time around stems in some way from the secondary rebel faction. But that's kind of a guess on my part. The secondary rebels, since they operate a bit differently than the primary rebels, are best left as the generic rebel factions in my experience (rom_rebel_latin or whatever).

    The big issue I've had with rebel factions like that has tended to stem from the faction itself somehow being flawed. Like not having rebels assigned, having some wrong units compared to the military generators the AI faction has. I've had some issues, as well, where certain settlements didn't have buildings that will cause a CTD if you go to conquer, liberate, or subjugate. But that stemmed from me porting over to the IA campaign map.


  8. #8

    Default Re: How to add a faction from scratch

    Quote Originally Posted by ABH2 View Post
    Balbor-I haven't actually encountered that issue. A few questions (I was a bit confused by the scenario laid out, based on when you said taking of another Roman settlement and referenced the Osci which I guessed was the name of the Samnite faction):
    1. Is the Samnite faction ported from another campaign, or one made from scratch?
    2. In this scenario, they have been liberated/established in their region where they are set as primary rebels, right? And then the issue is retaking that territory?
    3. Did you say you were trying to liberate the same region a second time, if I understood that all correctly?

    From my experience, you can only liberate a settlement to one level, so to speak. By which I mean the primary rebel faction, whatever you set that as. So, i was a little confused on what was described there in the paragraph.

    If the faction is liberated and brought into the game on the initial attempt, the faction itself in the DB and starptos would seem to be ok with no issues. So, I'm guess the issue the second time around stems in some way from the secondary rebel faction. But that's kind of a guess on my part. The secondary rebels, since they operate a bit differently than the primary rebels, are best left as the generic rebel factions in my experience (rom_rebel_latin or whatever).

    The big issue I've had with rebel factions like that has tended to stem from the faction itself somehow being flawed. Like not having rebels assigned, having some wrong units compared to the military generators the AI faction has. I've had some issues, as well, where certain settlements didn't have buildings that will cause a CTD if you go to conquer, liberate, or subjugate. But that stemmed from me porting over to the IA campaign map.
    1 . Samnites (screen name Oscii) were ported from the HATG campaign, the the pack files they are pun_samnite
    2. At the start of the campaign Rome occupies the Oscii's settlement, if that regions rebels the rebels are samnites who if they take the settlement the Samnite/Oscii faction arise/emerge. There are no issues i'm aware of at this point, and while playing as the insurbre they existed for at least 20+ turns, i was able to form an alliance with them. But i could not see them most of the time.

    3. Bit hard to explain. In the campaign mentioned the Samnite/Oscii faction got into a war with Syracuse which lasted a long time. Then the game crash all of a sudden on Syracuse's turn, i reloaded and the same thing happened so i installed a mod to remove FOW and watch what happened, this time a could see a Syracuse Army close to the Samnite/Oscii settlement, which on the Syracuse turn attacks the settlement, but this time they conquered and occupied and the game doesn't crash.

    In a separate playthrough as the roman's, i was attacked by a large carthage army in the same region as mentioned above, this time the game crashed after my defeat. I was using Dresdens sack/liberate mod and I thought this had cause the issue, but i know believe that the two events have one thing in common, Liberating the Samnites from the faction occupying their settlement or defeating their last settlement and subjugating them causes the AI to generate a new army for the Samnites. I've seen it before when we removed all the vanilla units from the Boii but forgot to assign them new units, they could recruit and whenever someone tried to liberate them or subjugate them the game would crash... but we have assigned units to the samnites.

    The samnites have only ever entered the game as the result of the region they once owned (pre campaign start if you like) rebelling against it current owners (Romans at the start of the game) and then those rebels taking the settlement (meaning the Samnite army would be the rebels which just took the settlement). Liberating the Samnites seems to cause the game to crash.

    Edit:

    I tried making the faction start the game but giving them possession of a region, which was easy, although i couldn't make them playable i could start the campaign as Rome. Quite a few odd things happened though:

    Trying to use the eye icon to spy on them after selecting there settlement caused the game to crash.

    Faction did not have a turn, or appear on the diplomatic map, even though i was standing next to it with a roman army. (in contrary to when they emerged in a campaign when they did appear on the map).

    the faction icon was on the faction map how ever

    Attacking the faction brought up the diplomatic screen and i was unable to see there diplomatic relationship with me, although could see no icon for them still.

    Raiding their region cause my roman settlement to go into negative food.

    In 3 turn they recruited no general.

    I guess something is wrong with the faction
    Last edited by Balbor; March 04, 2015 at 03:29 PM.
    Balbor

    Former Creative Director
    Former Head Unit Modeller and Texture
    Fourth Age:Total War

  9. #9

    Default Re: How to add a faction from scratch

    The inability to recruit a general usually stems from buildings or rather a lack of them. Same thing with attempting to occupy. If you have the fog of war turned off, hover over their settlement. You should be able to see what buildings they have in it. If there aren't any, that is your issue.

    It could be something with the military generators and commander unit permissions, but since you're re-using a faction I am assuming you didn't make many changes in that area. But I wouldn't be in a position to know.


  10. #10

    Default Re: How to add a faction from scratch

    In Vae Victis we also have Cypress (from main campaign) and Judea (from emp campaign) set as factions that own a region but do not posses it at the start of the campaign, I tried both these factions, and was able to liberate them into existence from egypt without the game crashing.

    I then took another faction that had been removed from the mod (Sardis) and gave them the ownership of one of the regions the pun_samnites had once had own and gave the ownership of the other back to rome. Playing as rome i let the Sardis rebels appear, although carthage spoiled it a little by taking the settlement first. I was how ever able to take the settlement off Carthage and the liberate Sardis into the game. I then instantly took there settlement and Subjugated them.

    Because the game would crash when trying to look at the settlement when the Oscii/Samnites had possession i'm guessing the issue more more than just unit recruitment, perhaps a spelling mistake somewhere.
    Last edited by Balbor; March 05, 2015 at 05:19 AM.
    Balbor

    Former Creative Director
    Former Head Unit Modeller and Texture
    Fourth Age:Total War

  11. #11

    Default Re: How to add a faction from scratch

    Are you not using the Assembly Kit?


  12. #12

    Default Re: How to add a faction from scratch

    Nope, i can't as i didn't build the startpos the mod uses.

    I have however been able to turn Sardis into the Oscii faction and they work fine... from a possible glitch where a oscii rebel army appeared but i liberated the oscii meaning the game had oscii and rebel oscii, and then the rebel oscii army captured their settlement, which i think meant Syracuse was able to capture the settlement without going to war with in oscii.
    Balbor

    Former Creative Director
    Former Head Unit Modeller and Texture
    Fourth Age:Total War

  13. #13

    Default Re: How to add a faction from scratch

    Sorry on not responding. It's just when doing it by scratch a lot more can go wrong, honestly. I'd really need to see the file itself. This is one reason I've taken to even just recreating my startpos if for some reason something becomes corrupted and have the process down to a few hours.

    Another tool you may be interested in, given how you're working:
    http://www.twcenter.net/forums/showt...tpos-esf-Files

    It's been extremely useful for me to add in info to startpos's that I don't want to use the AK for. Not sure it would help on this issue, but in general it has its uses.


  14. #14

    Default Re: How to add a faction from scratch

    In the end I decided to bypass it, the faction is still on the startpos but not assigned to any regions. It's also working fine in the CB. Had no problems converting Sardes into the Oscii faction. What ever cause problems with the pub_samnite in the main campaign has something which causes it to crash when highlighting there settlement, could be building, culture I dunno
    Balbor

    Former Creative Director
    Former Head Unit Modeller and Texture
    Fourth Age:Total War

  15. #15

    Default Re: How to add a faction from scratch

    Yes, it's tough to say. Usually the only issues I've had adding factions across campaigns are related to the military/CDIR generators and buildings in the region themselves once you get past the DB tables which all seem to be good here. Sorry I couldn't help you more.


  16. #16
    smoesville's Avatar Vicarius
    Join Date
    Feb 2008
    Location
    Dublin, Ireland
    Posts
    2,803

    Default Re: How to add a faction from scratch

    I'm trying to add a faction as a rebel in a region, as in for example if Sicily Tarentum rebels then instead of a 'rebels' faction it would be the Tarentines (a minor faction which can grow as a proper nation). Any idea how to do this?
    Were there but a tree in this godforsaken place i would have hanged myself.

Posting Permissions

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