Results 1 to 16 of 16

Thread: Modding a Mod with Nonstandard Tables

  1. #1

    Default Modding a Mod with Nonstandard Tables

    Hello. I apologize if this is the wrong section for this, but I'm trying to figure out which tool or tools I need to use to accomplish this. I want to mod some otomo units for Shogun 2 for my own personal use (not to publish anywhere). I have the Assembly Kit 1.2 unofficial patch and realize I have to extract it every time (annoying as that is). However, since I use Darthmod I noticed a new problem: they use table names that will are not shown in PFM or TWeak (launched through MMS). I updated master_schema.xml to the one hosted on sourceforge for PFM but it didn't help. Do I need to edit master_schema.xml to manually add (ugh) every table that is exclusive to Darthmod just so I can edit them in PFM, or is there some other tool I can use that will be able to CRUD nonstandard tables? Another alternative I'm thinking: what if I made my own small mod with special tablenames, where only the units I wanted to modified were entries in the tables? Could I ensure that those values would overwrite the values of the other mods?

  2. #2

    Default Re: Modding a Mod with Nonstandard Tables

    Nevermind, I figured out why I couldn't find the units I was looking for. I sent a request to have the thread deleted.

  3. #3
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: Modding a Mod with Nonstandard Tables

    Please let us know how you fixed your situation - others will profit\learn from your conclusion. Deleting the thread would be counter productive.










  4. #4

    Default Re: Modding a Mod with Nonstandard Tables

    Quote Originally Posted by Gigantus View Post
    Please let us know how you fixed your situation - others will profit\learn from your conclusion. Deleting the thread would be counter productive.
    I feel quite silly for it really.
    First with MMS and TWeak/BOB I was getting confused when trying to rebuild the mod because there were two tables showing up under each tablename category (one with Darth_ prefixed and the default one).
    Next, when I tried relying solely on PFM, I didn't realize I would be looking at rows that were out of order. DaVE had been showing me "unit_stats_land", which is an unmodified table where the rows are in alphabetical order. PFM was showing me "Darth_unit_stats_land".
    Since "Darth_unit_stats_land" was not in alphabetical order, I couldn't figure out why I could not see the "Inf_Missile_Matchlock_Ashigaru_Otomo" and "Inf_Missile_Matchlock_Samurai_Otomo" entries with all the other similar entries. For example, "Inf_Missile_Matchlock_Ashigaru" is entry 185/339, and all other similar entries - like "Inf_Missile_Matchlock_Hattori" at 186/339 - are very close to it.
    At the very bottom of the Darth_unit_stats_land table were the units I was looking for.
    "Inf_Missile_Matchlock_Ashigaru_Otomo" is at 333/339
    "Inf_Missile_Matchlock_Samurai_Otomo" is at 334/339

    I could have avoided all of this if I had just realized they weren't in alphabetical order and clicked on the "key" column in PFM to have it sort them that way for me.

  5. #5
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: Modding a Mod with Nonstandard Tables

    Much obliged, thanks for sharing.










  6. #6
    WhiskeySykes's Avatar Miles
    Join Date
    Feb 2017
    Location
    Bedlam, somewhere around Barstow
    Posts
    314

    Default Re: Modding a Mod with Nonstandard Tables

    Unclear how to edit an existing mod in TWeak. MMS only crashes, when I try to load Tweak for an existing mod. No offense to the op, but their clarifying post is obfuscating what exactly, step by step, they did to edit the tables of an existing mod using TWeak. I'll gladly make a tutorial about this, if someone knows how. Thanks!
    Shogun 2 Mods:
    Spoiler Alert, click show to read: 

  7. #7

    Default Re: Modding a Mod with Nonstandard Tables

    Quote Originally Posted by WhiskeySykes View Post
    Unclear how to edit an existing mod in TWeak. MMS only crashes, when I try to load Tweak for an existing mod. No offense to the op, but their clarifying post is obfuscating what exactly, step by step, they did to edit the tables of an existing mod using TWeak. I'll gladly make a tutorial about this, if someone knows how. Thanks!
    Ok, just to clarify. You can't mod an existing mod, if you don't have the raw db files that comes in to Tweak. You can modify an existing mod with PFM (if you don't have the raw db files). Also, some modders can rename the db tables. As long as the normal naming of the table stays the same. For example: in db you have units_tables > units, you could make your own mod with the same table, but name it like this: units_tables > (modname)_units.

    If you want to use Tweak (better for bugs), you can ask the modders to give them the raw db files to you and than you can use Tweak to re-mod the mod.
    I hope i explained it well.

  8. #8
    WhiskeySykes's Avatar Miles
    Join Date
    Feb 2017
    Location
    Bedlam, somewhere around Barstow
    Posts
    314

    Default Re: Modding a Mod with Nonstandard Tables

    No, I get it now. Thanks izzi.

    I'm using Shogun 2 Converter to convert the files I need to edit into .xml and back again. That should work, eh? As long as, like you say, the file names are the same.
    Shogun 2 Mods:
    Spoiler Alert, click show to read: 

  9. #9

    Default Re: Modding a Mod with Nonstandard Tables

    Quote Originally Posted by WhiskeySykes View Post
    No, I get it now. Thanks izzi.

    I'm using Shogun 2 Converter to convert the files I need to edit into .xml and back again. That should work, eh? As long as, like you say, the file names are the same.
    Yes and no. Some fields in PFM are unknown or are not the same as in Tweak. You can try, but i am not sure it will work.

  10. #10
    WhiskeySykes's Avatar Miles
    Join Date
    Feb 2017
    Location
    Bedlam, somewhere around Barstow
    Posts
    314

    Default Re: Modding a Mod with Nonstandard Tables

    I need to try, because I've got to edit the "start_pos_settlement" to assign an indestructible building to a town slot, so that its there from the start. Like in rots, how the Tadokoro was present by default. I'll notify you guys once there's progress, or if I decide to take an alternative approach.
    Shogun 2 Mods:
    Spoiler Alert, click show to read: 

  11. #11

    Default Re: Modding a Mod with Nonstandard Tables

    Quote Originally Posted by WhiskeySykes View Post
    I need to try, because I've got to edit the "start_pos_settlement" to assign an indestructible building to a town slot, so that its there from the start. Like in rots, how the Tadokoro was present by default. I'll notify you guys once there's progress, or if I decide to take an alternative approach.
    start_pos editing is very sensitive if you don't have all needed info (and or files) that it needs to be created. It crashes very easy. If the mod you are using doesn't have a new campaign map and/or new settlements, than it could work. If it is a new created campaign map, than you also need the raw .cs2 files and only the creator of the mod has them.

  12. #12
    WhiskeySykes's Avatar Miles
    Join Date
    Feb 2017
    Location
    Bedlam, somewhere around Barstow
    Posts
    314

    Default Re: Modding a Mod with Nonstandard Tables

    Quote Originally Posted by izzi View Post
    start_pos editing is very sensitive if you don't have all needed info (and or files) that it needs to be created. It crashes very easy. If the mod you are using doesn't have a new campaign map and/or new settlements, than it could work. If it is a new created campaign map, than you also need the raw .cs2 files and only the creator of the mod has them.
    I found the start_pos .pack : Total War SHOGUN 2\modding\raw_data\EmpireDesignData\campaigns

    I copied the db file and sent it to desktop, then added the file to my own .pack, aaaand pfm can't read the table. I added the file just fine, but it shows up in red text in the window. The format must be a different code, or something, which is beyond my ken - I'm no programmer!

    So like you warned, pfm can't read the file, izzi. Damn shame, that. I'll have to change how I wanted units recruited. I'll ask Weierstrass if he still has the .cs2 files, he's been helpful before.

    btw, Is all of this explained in a tutorial? Possibly for Empire or Rome 2? I feel like throwing money at you for all the free advice I only started modding in January, so I'm unfamiliar with what's available.


    Ok, I know how to make this happen. I'll update with a tutorial, or link to one I find, once I can confirm the results.
    Last edited by WhiskeySykes; March 16, 2017 at 01:25 PM. Reason: update
    Shogun 2 Mods:
    Spoiler Alert, click show to read: 

  13. #13

    Default Re: Modding a Mod with Nonstandard Tables

    Quote Originally Posted by WhiskeySykes View Post
    I found the start_pos .pack : Total War SHOGUN 2\modding\raw_data\EmpireDesignData\campaigns

    I copied the db file and sent it to desktop, then added the file to my own .pack, aaaand pfm can't read the table. I added the file just fine, but it shows up in red text in the window. The format must be a different code, or something, which is beyond my ken - I'm no programmer!

    So like you warned, pfm can't read the file, izzi. Damn shame, that. I'll have to change how I wanted units recruited. I'll ask Weierstrass if he still has the .cs2 files, he's been helpful before.

    btw, Is all of this explained in a tutorial? Possibly for Empire or Rome 2? I feel like throwing money at you for all the free advice I only started modding in January, so I'm unfamiliar with what's available.


    Ok, I know how to make this happen. I'll update with a tutorial, or link to one I find, once I can confirm the results.
    Ok first of all, don't copy a raw and/or working data file in to your mod pack without converting the raw files first. Add your raw xml file in to the raw db file. Open Tweak.Release (find in binaries) and tweak the data that is needed (to open the database, click on "Tools" and open DAVE. This will connect to the raw db file (click Yes to connect). Click on View and open "Table Launcher". Look for the file that has to be tweaked (when finished, save the file by clicking on Apply).

    After, open "BOB" (find in the binaries folder), and to the raw section (Raw data), go to "EmpireDesignData", click on the db xml file and click on both Provider and Consumer action. Now go to Working section (Working data), look for db and click on the db file you need to convert (normally you will find it filled with black), click on it and same as previous (Consumer and Provider action has to be selected). Click on start to start the conversion (if its green and/or orange than you successful converted your file). Find your .pack file in the retails folder and open it with PFM.

  14. #14
    WhiskeySykes's Avatar Miles
    Join Date
    Feb 2017
    Location
    Bedlam, somewhere around Barstow
    Posts
    314

    Default Re: Modding a Mod with Nonstandard Tables

    I don't have a retail folder. Which, by don't have, I mean there is no retail folder in my modding directory, nor in the the original .zip file.


    Nevermind, its generated after the process.


    Izzi, I'm not making any changes to the db, only start_pos. The file I need generated is the esf. Or do I need to generate the db for it's xml's? Start_pos_settlement is coded differently from other S2 db's, so I can't open it in pfm, but I can read the xml easily.
    Last edited by WhiskeySykes; March 18, 2017 at 09:11 AM. Reason: correction/clarity
    Shogun 2 Mods:
    Spoiler Alert, click show to read: 

  15. #15

    Default Re: Modding a Mod with Nonstandard Tables

    Quote Originally Posted by WhiskeySykes View Post
    I don't have a retail folder. Which, by don't have, I mean there is no retail folder in my modding directory, nor in the the original .zip file.


    Nevermind, its generated after the process.


    Izzi, I'm not making any changes to the db, only start_pos. The file I need generated is the esf. Or do I need to generate the db for it's xml's? Start_pos_settlement is coded differently from other S2 db's, so I can't open it in pfm, but I can read the xml easily.
    The start_pos file uses data from the db file. In db you need to find the campaign_settlements. Do your changes there and save. After you change the start_pos_settlements and save. Than export via BOB.

  16. #16
    WhiskeySykes's Avatar Miles
    Join Date
    Feb 2017
    Location
    Bedlam, somewhere around Barstow
    Posts
    314

    Default Re: Modding a Mod with Nonstandard Tables

    Gotcha, thanks again izzi. I also managed to find Akaie's tutorial, and followed it with sucksess. If interfacing in TWeak is less time-consuming, I'll substitute methods... Looks like it will be.
    Shogun 2 Mods:
    Spoiler Alert, click show to read: 

Posting Permissions

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