Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Adorbs

PFM 3.0 beta

daniudaniu Senior MemberPosts: 2,054Registered Users
edited February 2014 in Total War: ROME II
TWC is out of order pretty much right now, I have to move PFM development coordination here.

It looks to me PFM works for Rome II now, so I'm taking it out of beta.
Download PFM 3.0.3

New in version 3.0.3:
- Added option to have csv import replace current data instead of appending
- Added automatic update for first PFM start (there seem to be many people not knowing about the update feature)
- Added Renumber column values feature back in
- Added copy/paste to integrated text editor
- Fixed referenced version for the Zip library (for autoupdate issues)

I have re-enabled the Automatic Update. Since I'm updating schema files quite often right now, you should check back from time to time (DB Descriptions->Search for Update).

New in version 3.0.2:
- R2 Icon added
- Empty db tables displayed in blue font in tree
- Fixed Clone Row
- Fixed the Autoupdater to not abort when trying to overwrite itself (is anyone even using the Autoupdate?)


Please report bugs here for the time being.

If you updated your schema file to be able to read new tables, please send it to me via PM.


Note that questions about "how do I mod table X" are not topical here.
If you post them you're actively slowing down modding by preventing me from seeing relevant PFM issues :mad:
Post edited by daniu on
«1345678

Comments

  • fennix102fennix102 Junior Member Posts: 1Registered Users
    edited September 2013
    I dont know if this is relevant but I might of figure out why some tables are blank. I was going through the raw db tables and some of them are blank and replace by other tables such as the unit table replace with main_unit_table and the unitland table replace with the Land_unit table different wording and all.
  • MaradoX-MaradoX- Junior Member Posts: 3Registered Users
    edited September 2013
    I'm currently working on finalizing the schema file for RTW2.
    I'll send it to you asap, it's based no data from the db's we got on day 1
  • daniudaniu Senior Member Posts: 2,054Registered Users
    edited September 2013
    fennix102 wrote: »
    I dont know if this is relevant but I might of figure out why some tables are blank.
    Yes, I'm aware. Especially the units_table is empty which should surprise most experienced Warscape modders ;)
    MaradoX- wrote: »
    I'm currently working on finalizing the schema file for RTW2.
    I'll send it to you asap, it's based no data from the db's we got on day 1
    Please do. You are using the DecodeTool, right?
    I'm not sure if you're aware of this thread which will help you name the columns if you want to put in that effort.
  • MaradoX-MaradoX- Junior Member Posts: 3Registered Users
    edited September 2013
    daniu wrote: »
    Yes, I'm aware. Especially the units_table is empty which should surprise most experienced Warscape modders ;)


    Please do. You are using the DecodeTool, right?
    I'm not sure if you're aware of this thread which will help you name the columns if you want to put in that effort.

    I'm doing my best to understand the DecodeTool :p.

    I'm using the db files you specified in that thread to name the columns in the schemafile.

    Is there a place we can talk?
  • JinarikJinarik Junior Member Posts: 14Registered Users
    edited September 2013
    Hey guys, to anyone interested here is the schema I generated from the TWaD files. It doesn't work at all, but it does contain all the fkey's that CA's tools use. Combine that with it's info on the new tables, and it helps tremendously with using the DecodeTool to decode the new tables and figure out what columns do what (at least, the ones you can cross reference with the fkey's). Now to get back to the 'B' tables :)
  • MaradoX-MaradoX- Junior Member Posts: 3Registered Users
    edited September 2013
    Jinarik wrote: »
    Hey guys, to anyone interested here is the schema I generated from the TWaD files. It doesn't work at all, but it does contain all the fkey's that CA's tools use. Combine that with it's info on the new tables, and it helps tremendously with using the DecodeTool to decode the new tables and figure out what columns do what (at least, the ones you can cross reference with the fkey's). Now to get back to the 'B' tables :)

    You did what I started working on :p.
    Lol oh well, time to learn the LUA for my mod :p
  • JaM1977JaM1977 Senior Member Posts: 1,789Registered Users
    edited September 2013
    it still needs some work, it doesnt work ok with latest PFM
  • PietroMiccaPietroMicca Senior Member Posts: 196Registered Users
    edited September 2013
    https://github.com/PietroMicca/r2tw/blob/master/schema_R2TW.xml

    here my schema that I update continuously, but so far with minor and not important tables
  • ZowwieZowwie Senior Member Posts: 127Registered Users
    edited September 2013
    As I said on TWC, beta6 (and beta5 too for that matter) does not let me ready any entries. They are just grey and empty. Beta 2 and 3 let me read some of them though.
  • PietroMiccaPietroMicca Senior Member Posts: 196Registered Users
    edited September 2013
    Zowwie wrote: »
    As I said on TWC, beta6 (and beta5 too for that matter) does not let me ready any entries. They are just grey and empty. Beta 2 and 3 let me read some of them though.

    let me see your schema_R2TW
  • lordboblordbob Senior Member Posts: 359Registered Users, Cakes!
    edited September 2013
    any chance of being able to have it for land_units ? thats where all the unit data is :)
  • ZowwieZowwie Senior Member Posts: 127Registered Users
    edited September 2013
    let me see your schema_R2TW

    It's the one that came with the download.
  • PietroMiccaPietroMicca Senior Member Posts: 196Registered Users
    edited September 2013
    Zowwie wrote: »
    It's the one that came with the download.

    replace with this https://github.com/PietroMicca/r2tw
  • ZowwieZowwie Senior Member Posts: 127Registered Users
    edited September 2013

    That works better. It's a little fuzzy who works together on what. Are you officially working together with daniu and updating the schema then? There's "a lot of chef's preparing the food" :-D
  • daniudaniu Senior Member Posts: 2,054Registered Users
    edited September 2013
    Zowwie wrote: »
    That works better. It's a little fuzzy who works together on what. Are you officially working together with daniu and updating the schema then? There's "a lot of chef's preparing the food" :-D
    I'm sure he'll be sending me those tables via PM like I asked in reasonable intervals. It's good that he understands I'm too busy checking his repository myself regularly.

    I uploaded beta7 now. This contains the schema file with autoconverted entries from the old (S2) tables for which only the string encoding needed to be changed, plus some manual updates.
  • PietroMiccaPietroMicca Senior Member Posts: 196Registered Users
    edited September 2013
    Zowwie wrote: »
    That works better. It's a little fuzzy who works together on what. Are you officially working together with daniu and updating the schema then? There's "a lot of chef's preparing the food" :-D

    stay tuned

    now there's a completely new daniu's version
  • ZowwieZowwie Senior Member Posts: 127Registered Users
    edited September 2013
    Great, got that sorted. I tried to figure out campaign_difficulty_handicap_effects since it was no longer yellow, but I'm fumbling in the dark. I'll wait for you guys to figure it all out soon enough. Really, great work seeing as the game is just released! :-)
  • PnutmasterPnutmaster Junior Member Posts: 15Registered Users
    edited September 2013
    Took me two days without instruction, but I taught myself how to decode :D

    Here's the schema for political_parties (one of the files needed for enabling factions), and land_units_to_units_abilities_junctions (for disabling some of these silly special abilities). I'm tackling naval_unit, but so far I can't find any of the integers from the DB xml...
    <table table_name='political_parties_tables'
    table_version='3'
    guid='40beda0e-249a-44fe-b2bb-62770c0219ef'>
    <field name='key' type='string_ascii' />
    <field name='playable' type='boolean' />
    <field name='ui_icon' type='string_ascii' />
    <field name='effect_bundle' type='string_ascii' />
    <field name='initial_power' type='int' />
    </table>
    <table name='land_units_to_unit_abilites_junctions_tables'>
    <field name='ability' type='string_ascii' />
    <field name='land_unit' type='string_ascii' />
    </table>
  • MephalamosMephalamos Senior Member Posts: 1,026Registered Users
    edited September 2013
    Zowwie wrote: »
    As I said on TWC, beta6 (and beta5 too for that matter) does not let me ready any entries. They are just grey and empty. Beta 2 and 3 let me read some of them though.

    Same here.

    Really itching to get at the building_effects tables! ^_^
    Snappera wrote: »
    Culture - Total War fan

    Eternal Virginity: -2 provincial growth rate
    DLC Rage: Taxation negative public order modifier x2
    PC Master Race: -10% unit recruitment cost
    Fake Historical Knowledge: Can recruit units from nearby factions
    Nerdy: +25% Research Rate.
  • ZowwieZowwie Senior Member Posts: 127Registered Users
    edited September 2013
    Pnutmaster wrote: »
    Took me two days without instruction, but I taught myself how to decode :D

    Ok, if I can ask you. :-) As an example, I am looking to get campaign_difficulty_handicap_effects to work. It is in the Schema-file but it does not produce any results so it should be easier perhaps?

    I compare with the 1-Day XMLs and it seems that this table should contain 5 fields and not 4, this is how it is now in the Schema:
      <table table_name='campaign_difficulty_handicap_effects_tables'
             table_version='0'
             guid='d7253ae9-568c-4121-b1e4-53bab296f4cb'>
        <field name='campaign_difficulty_handicap' type='int' />
        <field name='Human' type='boolean' />
        <field fkey='effects_tables.effect' name='Effect' type='string_ascii' />
        <field name='Effect Value' type='float' />
      </table>
    

    Looking at the 1-Day it seems 'Effect Scope' is missing, so I try to add <field name='Effect Scope' type='string_ascii' /> before 'Effect Value' but that did nothing. As I said, I am really fumbling in the dark. If I can see an before->after working example I am usually going to get it.
  • JinarikJinarik Junior Member Posts: 14Registered Users
    edited September 2013
    Hey PietroMicca, how are you going through the tables? I'm starting at the top and just going alphabetically, working through every table as I go; just starting the building_ tables atm.
  • PietroMiccaPietroMicca Senior Member Posts: 196Registered Users
    edited September 2013
    Jinarik wrote: »
    Hey PietroMicca, how are you going through the tables? I'm starting at the top and just going alphabetically, working through every table as I go; just starting the building_ tables atm.

    new daniu's version unlock a great number of tables. I have checked till battle_sequences_tables. I'm also replacing some unknowns.
  • MacVegaMacVega Junior Member Posts: 3Registered Users
    edited September 2013
    For those of you who were experiencing trouble accessing the trait_level_effects_tables, I've forwarded the new working code I needed to adjust for beta6 to daniu. If you desperately want it for something you are modding, send me a private message and I will forward it to you as well.
  • ZowwieZowwie Senior Member Posts: 127Registered Users
    edited September 2013
    Ok, I found the Tutorial and I've been trying to wrap my head around it and I managed to get it to show the correct values with the DecodeTool getting this result:
      <table table_name='campaign_difficulty_handicap_effects_tables'
             table_version='0'
             guid='d7253ae9-568c-4121-b1e4-53bab296f4cb'>
        <field name='campaign_difficulty_handicap' type='int' />
        <field name='Human' type='boolean' />
        <field fkey='effects_tables.effect' name='Effect' type='string_ascii' />
        <field name='Effect Scope' type='string_ascii' />
        <field name='Effect Value' type='float' />
      </table>
    

    When I save this in the file, restart PFM, it still won't read anything from the table even though the DecodeTool says it should. I wondered about the table version, since the tutorial said that "fd fe fc ff" without "fc fd fe ff" = version 1, but that did not work. I feel I'm soooooooooo close to understand how this works, but then again I might be just to the far right of the reservation for all I know ;)

    EDIT1 - Looking at the 1-day XML and their formatting something like this would be closer to what I'd expect though:
      <table table_name='campaign_difficulty_handicap_effects_tables'
             table_version='0'
             guid='d7253ae9-568c-4121-b1e4-53bab296f4cb'>
        <field name='campaign_difficulty_handicap' type='int' />
        <field name='' type='blob0' />
        <field name='Effect' type='string_ascii' />
        <field name='Effect Scope' type='string_ascii' />
        <field name='Effect Value' type='float' />
        <field name='Human' type='boolean' />
      </table>
    

    But I am unsure if I've used the blob0 correctly. It seems there's an unused byte between the int and the string, because the Human boolean actually comes last in the raw-format files.

    EDIT2 - I think I know now why it is difficult. It has an optional campaign string somewhere down the line like in Shogun II. I tried to replicate this from that Schema but I was unsuccessful.

    As far as I know this should work based on what was also in Shogun II, but it does not:
      <table table_name='campaign_difficulty_handicap_effects_tables'
             table_version='0'
             guid='d7253ae9-568c-4121-b1e4-53bab296f4cb'>
        <field name='campaign_difficulty_handicap' type='int' />
        <field name='Unused' type='boolean' />
        <field fkey='effects_tables.effect' name='Effect' type='string_ascii' />
        <field name='Effect Scope' type='string_ascii' />
        <field name='Effect Value' type='float' />
        <field name='Human' type='boolean' />
        <field fkey='campaigns_tables.campaign_name' name='optional_campaign_key' type='optstring' version_start='1' />
      </table>
    

    I am at a loss :)
  • BloodlanceBloodlance Senior Member Posts: 839Registered Users
    edited September 2013
    Hi

    I dont know if you can or will check AI in attack mode vs walled citys and citys,

    Difficulty : Legendary / Legendary and Very Hard / Legendary

    the problem is,

    1 ) AI only attacks one gate

    OR

    2 ) AI only breaks one wall section

    and then rushes 100% of all troops to one hole or one gate.

    Problem 1 : IF player shoots AI unit that is burning the gate, AI goes to passive mode 100%

    Problem 2 : AI should not storm one gate with 100% of its troops as it has also siege ladders that it should use (also AI has siege engines => AI should make more then one hole to the wall and WAIT with land units to storm multiple broken wall sections at the same time).

    Problem 3 : AI only uses one unit at a time to harass the player even if it had 10 skirmishers, it uses only 1. ( AI defending a city with no walls problem ) (always only uses 1 unit to harass player if it has a lot of troops, AI should commit more then that as one unit dies to player and achieves nothing) === AI should be more decisive and if player has too many ranged units, AI should attack out from the actual nonwalled city. AI should also keep 2-3 melee units with his general in the Victory point as ninja grabs is a achilles heel for the AI.

    Problem 4 : AI defending in a unwalled city problem, AI is passive, AI will not attack out of the city if player has 20 archer units player can kill AI with 0 losses, AI only stands in place and waits to get killed.

    Problem 5 : AI does not defend Victory point when defending a city or walled city with less then full stack, player can grab it and then just wait for a win. ( player keeps harassing the stack of AI troops and then he can ninja grab the victory point as AI is in dead AI passive mode in the place it is camping ).

    Problem 6 : When player start taking the victory point from the AI, AI gives full attack orders to all units to storm the closest of player troops, IT DOES NOT TRY TO TAKE THE VICTORY POINT BACK = huge problem.

    Problem 7 : When player breeches a AI gate in walled city, AI has no melee troops behind the gate, ALL AI TROOPS ARE IN VICTORY POINT. Why ? , if AI lets player in the walled city without defending the gates in ground level, why do we have walled citys in the 1st place ? example walled citys are the walled citys that have wall around them 100%.



    These are verified with multiple player playing the game with video material on the side.

    I REALLY hope this helps the devs, thank you.

    and please if you need more information drop me a mail or we can even skype and i can give 100% facts how the AI is not responding and where the problems are.

    I have reinstalled the game and patched it with the Fridays patch , the problem is not hardware the problem is not software, the problem is the AI. PLUS all my friends report the same problem in their end.

    http://www.youtube.com/watch?v=WeISAr7m70k

    http://www.youtube.com/watch?v=JwC98pZsGqQ

    http://www.youtube.com/watch?v=g0ZdBZ2Q8H0

    i will also post this again in the support forum section.
    Bloodlance aka SG4tw
  • JinarikJinarik Junior Member Posts: 14Registered Users
    edited September 2013
    new daniu's version unlock a great number of tables. I have checked till battle_sequences_tables. I'm also replacing some unknowns.
    So, you're just going through and trying to fill in unknown columns, rather than decoding new/non-working tables?

    Zowie, I checked the table, the correct code should be:
    <table table_name='campaign_difficulty_handicap_effects_tables'
             table_version='0'
             guid='d7253ae9-568c-4121-b1e4-53bab296f4cb'>
        <field name='campaign_difficulty_handicap' type='int' />
        <field name='Human' type='boolean' />
        <field fkey='effects_tables.effect' name='Effect' type='string_ascii' />
        <field name='Effect_Scope' type='string_ascii' />
        <field name='Value' type='float' />
        <field name='Optional_Campaign_Key' type='optstring_ascii' />
      </table>
    
    Choosing between bool's and optstring's can be tricky, they will both take up a single byte if the optstring is empty for the entry you are looking at. To figure out which I generally try optstring first, if there are no entries in the column once I get the table viewable, I'll try a boolean, (or an int/float if there are 4 in a row)

    The last line 'Optional_Campaign_Key' is empty except for a few references to the prologue campaign.
  • daniudaniu Senior Member Posts: 2,054Registered Users
    edited September 2013
    Jinarik wrote: »
    So, you're just going through and trying to fill in unknown columns, rather than decoding new/non-working tables?
    Both is worthwhile, but decoding the new tables is much more useful.
    Chances are I'll be able to determine many of the column names automatically from the db xmls provided by CA once the structure has been decoded.
  • MacVegaMacVega Junior Member Posts: 3Registered Users
    edited September 2013
    Zowwie wrote: »
    Ok, I found the Tutorial and I've been trying to wrap my head around it and I managed to get it to show the correct values with the DecodeTool getting this result:
      <table table_name='campaign_difficulty_handicap_effects_tables'
             table_version='0'
             guid='d7253ae9-568c-4121-b1e4-53bab296f4cb'>
        <field name='campaign_difficulty_handicap' type='int' />
        <field name='Human' type='boolean' />
        <field fkey='effects_tables.effect' name='Effect' type='string_ascii' />
        <field name='Effect Scope' type='string_ascii' />
        <field name='Effect Value' type='float' />
      </table>
    

    When I save this in the file, restart PFM, it still won't read anything from the table even though the DecodeTool says it should. I wondered about the table version, since the tutorial said that "fd fe fc ff" without "fc fd fe ff" = version 1, but that did not work. I feel I'm soooooooooo close to understand how this works, but then again I might be just to the far right of the reservation for all I know ;)

    EDIT1 - Looking at the 1-day XML and their formatting something like this would be closer to what I'd expect though:
      <table table_name='campaign_difficulty_handicap_effects_tables'
             table_version='0'
             guid='d7253ae9-568c-4121-b1e4-53bab296f4cb'>
        <field name='campaign_difficulty_handicap' type='int' />
        <field name='' type='blob0' />
        <field name='Effect' type='string_ascii' />
        <field name='Effect Scope' type='string_ascii' />
        <field name='Effect Value' type='float' />
        <field name='Human' type='boolean' />
      </table>
    

    But I am unsure if I've used the blob0 correctly. It seems there's an unused byte between the int and the string, because the Human boolean actually comes last in the raw-format files.

    EDIT2 - I think I know now why it is difficult. It has an optional campaign string somewhere down the line like in Shogun II. I tried to replicate this from that Schema but I was unsuccessful.

    Zowwie,

    I got your code working. The problem's in your code was that the guid was incorrect. Instead of "d7253ae9-568c-4121-b1e4-53bab296f4cb", it should have been "32a531f7-dee5-452d-a44c-af0f7a14de9f"

    The correct guid may be found using any code editor, something as simple and free as notepad++, or Visio and looking for this line at the top of the xml file. <edit_uuid>32a531f7-dee5-452d-a44c-af0f7a14de9f</edit_uuid>

    You also forgot to put in the " pk='true' " after the lines denoted as being classified as string_ascii. You were also on the right trail in your second edit with that line, but maybe your fogot to convert it from string to string_ascii?

    Here is the working schema for this particular table your were working on.
    <table table_name='campaign_difficulty_handicap_effects_tables'
             table_version='0'
             guid='32a531f7-dee5-452d-a44c-af0f7a14de9f'>
        <field name='campaign_difficulty_handicap' type='int' />
        <field name='Human' type='boolean' />
        <field fkey='effects_tables.effect' name='Effect' type='string_ascii' pk='true'/>
        <field name='Effect Scope' type='string_ascii' pk='true'/>
        <field name='Effect Value' type='float' />
        <field fkey='campaigns_tables.campaign_name' name='optional_campaign_key' type='optstring_ascii' version_start='1' />
      </table>
    

    Edit: Darn itJinarik, beat me to it while I was writing things out xD
  • ZowwieZowwie Senior Member Posts: 127Registered Users
    edited September 2013
    Nailed it: campaign_difficulty_handicap_effects_tables ! :)
      <table table_name='campaign_difficulty_handicap_effects_tables'
             table_version='0'
             guid='d7253ae9-568c-4121-b1e4-53bab296f4cb'>
        <field name='campaign_difficulty_handicap' type='int' />
        <field name='Human' type='boolean' />
        <field fkey='effects_tables.effect' name='Effect' type='string_ascii' />
        <field name='Effect Scope' type='string_ascii' />
        <field name='Effect Value' type='float' />
        <field fkey='campaigns_tables.campaign_name' name='optional_campaign_key' type='optstring_ascii' version_start='1' />
      </table>
    

    It was actually very useful to just keep on going, I think I know the magic trick now as well.
  • PietroMiccaPietroMicca Senior Member Posts: 196Registered Users
    edited September 2013
    daniu wrote: »
    Both is worthwhile, but decoding the new tables is much more useful.
    Chances are I'll be able to determine many of the column names automatically from the db xmls provided by CA once the structure has been decoded.

    No, I am also decoding. variants_tables and victory_conditions_tables are decoded now and I have checked several empty old tables.
«1345678
Sign In or Register to comment.