Fallout Tactics Demo Modding: Python 3.0 Required

Discussion in 'Fallout Tactics Modding' started by Prosper, Dec 14, 2008.

  1. Prosper

    Prosper Where'd That 6th Toe Come From?

    431
    Aug 25, 2007
    This is the source code for a simple mp5Sub.ent Editor.
    You will need to use 7zip to extract your entities.bos file.
    The mp5Sub can be found at

    Fallout Tactics Multiplayer Demo\core\entities\weapons\SMG

    Also the script must be in the same location as the mp5Sub.ent



    Code:
    #Title of the Program
    print ('Weapon Editor for Fallout Tactics Demo')
    
    #Open File
    file = open('mp5Sub.ent', 'rb+')
    #
    print ('1. Name, 2. Magazine Capacity, 3. Minimum Damage, 4. Maximum Damage')
    a = int(input('What would you like to edit? '))
    
    if a == 1:
        file.seek(357)
        b = input('Choose a name that is 6 characters. ')
        file.write(bytes(b, 'utf-8'))
    if a == 2:
        file.seek(97)
        b = input('How large of a magazine capacity? 255 is max. ')
        file.write(bytes(b))
    if a == 3:
        file.seek(158)
        b = input('What do you wish to set minimum damage to? Max 255. ')
        file.write(bytes(b))
    if a == 4:
        file.seek(191)
        b = input('What do you wish to set maximum damage to? Max 255. ')
        file.write(bytes(b))
    file.close()
     
  2. VFSniper

    VFSniper It Wandered In From the Wastes

    109
    Jan 27, 2008
    So this a the basis for a outside entity editor?
     
  3. Prosper

    Prosper Where'd That 6th Toe Come From?

    431
    Aug 25, 2007

    My fallout tactics cd's won't install one of the files correctly so i can't play the real game. That is why I am working with the Fallout Tactics Demo.

    I went through manually with a hex editor to investigate where the values for Name, Magazine Capacity, Minimum/Maximum Damage were at.

    My program only goes to the offsets i specified. It doesn't actually know the format of the entity files.
     
  4. VFSniper

    VFSniper It Wandered In From the Wastes

    109
    Jan 27, 2008
    What file won't install? So if you knew the offsets for more parts of the files you could use your app to edit them?
     
  5. ryuga

    ryuga First time out of the vault

    62
    Nov 29, 2008
    What files are you missing?
     
  6. Prosper

    Prosper Where'd That 6th Toe Come From?

    431
    Aug 25, 2007
    i get a font manager error.
    i think the file i am missing is called 'gui.bos' or whatever.
    i will try to reinstall tomorrow, maybe i will luck out.

    also i am trying to advance the editor a little further.
     
  7. ryuga

    ryuga First time out of the vault

    62
    Nov 29, 2008
    When I googled for hex editing FoT awhile ago, I found some posting on font errors. I didn't pay attention to the details. Maybe those posts will help if re-install doesn't work.
     
  8. Prosper

    Prosper Where'd That 6th Toe Come From?

    431
    Aug 25, 2007
    Hey guys. Just an update on my progress.

    One thing i have discovered is:
    You can edit a file with the game running and then restart a mission and the changes you made externally will appear. So that's sorta nifty. I know with the official editor it won't allow you to run both the game and the editor. So maybe this program will be useful afterall!

    Second thing.
    I am trying to make my program be able to find the addresses itself rather than me telling it manually where they are.
     
  9. ryuga

    ryuga First time out of the vault

    62
    Nov 29, 2008
    On my dual core machine, it allows multiple editors running with one instance of FoT game. I don't know if dual core allows this to happen. It is pretty taxing on the machine with more than 2 instances of FoT running. Each one takes over each core.
     
  10. SniperPotato

    SniperPotato First time out of the vault

    65
    Nov 15, 2008
    Just like you, I'm also running a dual core and the editor used to be the slowest thing known to man. What I did was turn the cursor to software instead of hardware, use 1024x768 16bit, and turn off the aliasing checks. It makes the editor a lot less laggy.
     
  11. ryuga

    ryuga First time out of the vault

    62
    Nov 29, 2008
    Yea, tile aliasing uses a lot of resources. I played with the other settings and found this is probably the biggest slow down contributor, especially on a large map with aliasing tiles.
     
  12. SniperPotato

    SniperPotato First time out of the vault

    65
    Nov 15, 2008
    So now that you did that, how do your 2 editors run?
     
  13. ryuga

    ryuga First time out of the vault

    62
    Nov 29, 2008
    Once one editor running, either use Alt-Tab or Window Key to navigate to Windows desktop, then you can start another instance of editor.

    Each instance of FoT uses exactly 50% of the CPU resource on my machine, which I suspect it is using 100% of one core. There was a thread awhile ago discussing that issue.

    I usually have one editor and one FoT game running. This setup is good for fast testing on modding. Just Alt-Tab from editor to FoT game, reload the modded mission map, test, then back to the editor.
     
  14. requiem_for_a_starfury

    requiem_for_a_starfury So Old I'm Losing Radiation Signs

    Apr 3, 2003
    Doesn't BoSEE allow editing of the demo entities?

    Hmm I'm tempted to install FOT on my quad core, nah maybe not.
     
  15. Prosper

    Prosper Where'd That 6th Toe Come From?

    431
    Aug 25, 2007
    About the editor program.

    You can append any findings about an entity type into a dictionary file. When the editor is loaded it reads the dictionary file and stores the topics + there values.

    This is how you edit a file
    1. Choose between character, container, door, item, light, misc, special, test, and weapon.
    2. Then the program prints out the topics available for edit for the chosen entity type.
    3. Next you are asked to provide the name of the entity file you wish to edit
    4. Finally you just input a topic, then input a value.

    Currently I am having an issue with getting it write to the file. My dad is coming home soon, and he will likely be able to assist me.