• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
Modders take note.
  • Ok, this is a good place to put this info, because I think it's important for modders to see, but I don't want to start a wave of complaints to HBS on the matter.

    Be very careful about deploying mods.

    The issue I've found while working on my mods is.. best describe with the following:

    1. Say you worked out the necessary to introduce a new mech or a new weapon into the game. It works and you can see it in the Skirmish game, and can use it to equip other mechs in the Mechlab. You make up a whole bunch of new mech builds and saves them in the game.

    2. A few days later, you decide to rework some aspect of the mod, and for some reason, needed to remove the mech/ weapon. You code up your new work perfectly and loads up the game, and try to go into Skirmish or MechLab.

    3. The game goes into stunlock. Checking the logs, you see things like this:

    Data.DataManager [ERROR] LoadRequest for THI_WD_Weapon_LaserPulse_Medium of type WeaponDef has an invalid manifest entry. Any requests for this object will fail. (Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

    Data.DataManager [ERROR] LoadRequest for THI_WD_AmmunitionBox_LBX10C of type AmmunitionBoxDef has an invalid manifest entry. Any requests for this object will fail. (Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

    4. Try as you might, you can't get the game to go into Skirmish/ Mechlab. You are now faced with the option of a reinstall, which will wipe your campaign progress.

    The reason for this (IMO) potentially dangerous behaviour is that when you modify a mech build and save it, the game save it into the internal DB or some save file that we don't currently have any idea where it is. That isn't bad, it's a good thing. It lets us save our favorite broke builds to repeatedly bring up to beat people over the head with.

    The bad thing, and unknown to most of you, is that whenever Skirmish or Mechlab starts up, it does a basic verification check against ALL saved builds, and start generating warnings such as the above when they find mech builds that doesn't work. The worse part is that it doesn't ignore these, but goes into stunlock.

    Since these builds are not in JSON and is actually likely in a DB somewhere, we can't manually remove these entries. The solution I went with (since it's my mods and I know what the heck I did), was to reinstate the missing entries that the system is complaining about, and try the Skirmish and Mechlab. Once those are working, I go through the entries and delete any that contains the bad material. And then I can remove the unwanted Manifest entries. If that sound like a lot of work, yes it is.. well actually not that bad since I have certain habits. But that's because I know the crap that I'm working on.

    But imagine if you are a basic user who heard of this great mod and you download but found it not as great as you felt it to be. You remove the mod and then the whole game locks up on you. You reinstall and lose all progress in the main game. How'd that make you feel about the mod creator?

    Also, bear in mind MP Skirmish needs both clients to be on the same basis. That usually implies players would add/ remove mods regularly.

    I know putting this up can have a chilling effect on mods, but you guys do need to know this before too many mods are released and people start having games that freeze up on them. So think carefully how you want to handle a case when your mod has to be removed from an installed game.
     
    Data Dictionary: Mech Tags
  • Was tying up loose ends in my mod. So I wrote up a quick script to comb through Mechdef for Mech Tags. Might as well leave it here:

    BLACKLISTED
    KSBeta
    unit_assault
    unit_fallback
    unit_heavy
    unit_indirectFire
    unit_jumpOK
    unit_lance_assassin
    unit_lance_support
    unit_lance_tank
    unit_lance_vanguard
    unit_light
    unit_mech
    unit_medium
    unit_ready
    unit_release
    unit_role_brawler
    unit_role_scout
    unit_role_sniper
    unit_urbie
     
    KS update 03 May 2018: Btech Roadmap
  • From the latest KS update:

    BATTLETECH Post-Launch Roadmap
    1. Compatibility / Performance Investigations
    Our launch last week wasn't perfect. A subset of players are experiencing hardware/system compatibility and performance issues that our team is working hard to investigate. Solutions for critical issues are always our top priority, and will be released as soon as they're available and tested. Typically, we will release patches to our public_beta branch on Steam for a few days for testing before we push them to the default branch.

    On that note - last Friday we released our first patch to the public_beta branch for testing. Today, that 1.0.1 Patch went live - you can read the full changelog here. We expect to release more patches to public_beta in the coming days and weeks.

    2. General BugFix (Late May)
    We expect to release at least one general bugfix/improvements patch later in May.

    3. Localization (French, German, Russian) and Linux Support
    These are both Kickstarter commitments and high priorities for our post-launch roadmap. (Along with a couple other Kickstarter commitments that didn't make it in for launch.) We don't have a more precise ETA yet for these items but will update you as soon as we do.

    4. Update #1: Customization & Player Options (June/July)
    We're already beginning work on our first larger free Update to BATTLETECH. This Update is all about customization and reacting to common pieces of feedback that we've received from you on the game. Here's a list of items we're currently looking at for Update 1 this summer

    --Accelerated Combat Options - We're working on options for players who would like to accelerate the pace of combat missions.

    --MechWarrior Customization - We know that many players would like to change the appearance, callsign, name, and voice of all their MechWarriors, not just their Commander. This didn't make it in for launch but we'll be adding it in Update 1

    --Granular difficulty settings - A set of discrete options for players to customize the challenge level of the game in different areas.

    --MechLab / Store / Salvage Quality-of-Life Improvements - Interface additions to reduce friction when buying and salvaging new items.

    --Tutorial-skip Option - Allowing players who have already played the prologue missions to skip those missions when starting a new campaign, and get right to the Leopard.

    --Addressing Difficulty Spikes - We'll be working on smoothing out some issues with unexpectedly hard (or easy) content. Not to remove all difficulty variance, but to address clear outliers.

    --Live-streaming Quality-of-Life Improvements - Audio persisting when alt-tabbed, for example.

    It's important to note that the exact contents of Update 1 may shift during development. Please consider these general directions and priorities. We'll post a more detailed and updated list of what's in the Update closer to its release.

    5. More BATTLETECH!!
    The above is just the beginning! We'll be continuing with more free Updates after Update 1, and we'd also love to release a larger paid content Expansion or two - but right now we're staying focused on bugfixes and immediate reactions to launch feedback.


    So take note of what is being done by the team and review if what you are doing still fits the timeline.
     
    How to activate Console and get full combat dump neatly.
  • Thanks to LordCorvin1 on the Discord channel I was able to get this out.

    You can get a neat Combat log but that requires some hoop jumping.

    First, you need to mess with your registry, to enable the Console. You do that by saving the following as a .reg file

    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_CURRENT_USER\Software\Harebrained Schemes\BATTLETECH]
    "last_debug_state_h176629417"=dword:00000001

    This will mess with your registry so make sure you are comfortable and able to do it. This will enable you to turn on the console.

    You can then start the game. Once you start a Skirmish game -- properly, once you start a CombatGame -- you can bring up the following menu at any time by using LEFT-CTRL+SHIFT+MINUS:

    upload_2018-5-3_20-45-0.png


    Use the pull down menu to select the Full Details option. Once selected, you can continue to play -- the game will automatically dump out the file at the end of this session.

    The game puts it in the following folder:

    upload_2018-5-3_20-46-4.png


    They have it by date, so it's fairly obvious which is which. Opening the Combat Log will give you this:

    upload_2018-5-3_20-46-54.png


    Much easier to read.

    I'm providing these instructions to help modders analyse their work so that we can get better mods. The console has many capabilities, so please don't abuse.

    Also, modifying your registry may result in some other effects, like Steam achievements may not register. If you don't need it, how I get back to normal is simply to run another .reg file as below:

    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_CURRENT_USER\Software\Harebrained Schemes\BATTLETECH]
    "last_debug_state_h176629417"=dword:00000000

    You can save both files and doubleclicking on them in folders will run them.
     
    Using Addendum for VersionManifest
  • Ok you 'orrible lots. I realised most of you are going modtek/ btml, I'm just old fashioned.

    Anyway, with help from hbs_pnkElephant, I managed to get the addendum functionality to work. So mods can now put all their defs into a single CSV, and add a single line to the VM to link all of the content in. One line for each CSV.

    This makes old fashioned mods much cleaner and neater; generally a good thing.

    I've tested this in both Skirmish and (with the relevant MDD work) in Career, so both works. Main game should too.

    As usual there are a few things to look out for, so:

    1. Your Mod Manifest must be be a CSV with the standard field headers; you can have ONE Header line, but that has to be at the top, above the standard field headers, like so (as of v1.3.2):

    Code:
    THI_SSW_Mod_Manifest_1.3
    id,type,path,version,addedOn,updatedOn,removedOn,assetBundleName,assetBundlePersistent,assetBundleCRC,<IsTemplate>k__BackingField,addendum

    You then follow up with the normal declarations, and remember that last comma on the last line. Remember there cannot be additional header lines.

    Also, painfully obvious, save the file.

    2. To add this file into the VersionManifest, it's basically a definition declaration, with 3 major difference:
    • The line must be in the FIRST block of the VM. Putting it at the bottom won't work. For simplicity, I'd suggest putting it as the first line under the field headers (i.e., from Line 2 of the file).
    • The type field must be CSV.
    • The addedum field must be set to true.
    So, the example from above would be declared as so:

    Code:
    id,type,path,version,addedOn,updatedOn,removedOn,assetBundleName,assetBundlePersistent,assetBundleCRC,<IsTemplate>k__BackingField,addendum
    THI_Mod_Manifest,CSV,mods/THI_Mod_Manifest.csv,1,2018-03-06T18:42:53.7186911Z,2018-04-05T01:11:43.6755740Z,,,False,0,False,True
    THI_X_Mod_Manifest,CSV,mods/THI_X/THI_X_Mod_Manifest.csv,1,2018-03-06T18:42:53.7186911Z,2018-04-05T01:11:43.6755740Z,,,False,0,False,True
    chrPrfMech_atlasBacker-SBA,Prefab,Assets/Resources/UnlockedAssets/Prefabs/chrPrfMech_atlasBacker-SBA.prefab,79,2018-03-06T22:48:44.0360671Z,2018-12-04T20:29:02.5740043Z,,chrprfmech_atlasbacker-sba,False,4214366826,False,False
    ...
    ...

    The example above is to show that you can declare two or more addendum CSVs and get both to load. This has been tested in Skirmish, but should work in Career (with usual MDD work).

    So for those of you still interested in doing the basic work, this is a way to keep things as clean as possible.
     
    Unit not acting Bug and one triggering point.
  • Oh HO! Fun "Bug". Or Feature, depending on your perspective.

    There had been talk about some occasions when the enemy AI units in missions would do nothing but brace, but AFAIK there's not that much in investigations into it. Well... I ran full into that one, which had the symptoms but the trigger in this case is probably unique to my case.

    So yeah, symptoms are the game will progress but the enemy AI would not move or attack. As it turned out, I had AI logging turned on, so.. opportunity!

    What actually happened is this error in the normal output_log.txt:
    Code:
    DirectoryNotFoundException: Could not find a part of the path "D:\Programs\Steam\steamapps\common\BATTLETECH\AI_Logs\bh_THI\SSW_Assassin_Pilot_e3e3_2019_01_03_22.18.15_r01_p05.txt".
      at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0
      at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0

    What the...?!? :eek:

    Well.. that mech is from my mod, but why was it trying to write a subdirectory? I don't use "/" or "\" in my ID definitions or anything critical. In fact, the relevant block from that mech is here:
    Code:
        "Description": {
            "Cost": 3686014,
            "Rarity": 3,
            "Purchasable": true,
            "Manufacturer": "Tetsuhara Heavy Industries/ Solaris Skunkwerks",
            "Model": null,
            "UIName": "THI/SSW Assassin ASN-21",
            "Id": "THI_SSW_mechdef_assassin_ASN-21",
            "Name": "THI/SSW Assassin",
            "Details": "",
            "Icon": "uixTxrIcon_panther",
        },

    Oh. OH.

    Remembered I said I had AI logging turned on? So.. that AI logging apparently uses the Name field of the definitions as a filename. :rolleyes: So, yes, I need to go resanitize my files.. again.

    It gets better.

    So, the system took a string that got treated as a file directory extension, so the logging system took a hard dump, but that hard dump ended up over at the AI behaviour section, where that hard dump took the brains out of the AI.
    Code:
    AI Behavior Tree Error in Tick for sequence0004 : System.NullReferenceException: Object reference not set to an instance of an object
      at SequenceNode.Tick () [0x00000] in <filename unknown>:0
      at BehaviorNode.Update () [0x00000] in <filename unknown>:0

    That apparently neutered the brains, ALL the brains, because the AI logs for those that managed to log came out like this:
    Code:
    Round: 0
    Phase: 0
    Unit: Blackjack
    Unit GUID: ab9e2bfb-f6c4-4b4b-b540-957dcfc48a27.0
    Pilot Callsign: Pilot
    Lance: Lance d9a28c08-abdb-42bb-a140-ad3927d1f8cf.Lance
    Team: Target
    Role: Undefined
    evaluating behavior tree for Blackjack dynamic role: Brawler
    in update completed for clearSensorLock0000 with result Success.
    NULL order info.
    Two key thing -- first, an Undefined Role. Typically most mechs have a role defined, especially one included in the base game. The second thing is NULL orders. One or the other led down the merry path where the Mech decides it has no order, and, in the nicest behaviour so far, defaults to a BRACE order. And so the Mech just stands there and do nothing.

    "The AI returned NULL orders. Bracing, instead."

    It gets better.

    Null Reference Exception/ Null Pointer Exceptions are downright insidious, because they can lead to a cascading series of problem. This particular one eventually went somewhere and crashed my display drivers, hard. Windows had to step in and restart them:

    Code:
    d3d11: failed to create staging 2D texture w=128 h=128 d3dfmt=28 [887a0005]
    d3d11: failed to create staging 2D texture w=128 h=128 d3dfmt=28 [887a0005]
    d3d11: failed to create buffer (target 0x1 mode 1 size 18560) [0x887A0005]
    d3d11: failed to create buffer (target 0x2 mode 1 size 1416) [0x887A0005]
    d3d11: attempt to lock null buffer
    d3d11: attempt to lock null buffer
    UI went straight out and while I can hear the game in the background, the UI is dead, Jim. Had to kill the entire program.

    So yeah. Sanitize your UI Name and Name fields!