Custom Technology NullPointerException

  • @stalinpasha I am creating a topic here for you problem found here because I am having trouble finding/recreating this error.

    The scripts that you have listed seem to be okay. So I have tried changing other parts that might affect this to recreate this error.

    I have to assume that the unit in question is not called 'caterpillar_combat_vehicle'. Because when I tried that I received the error:
    Attribute value "caterpillar_combat_vehicle" of type ID must be unique within the document.

    It does look like the "TechActivation" is causing this error by the message you posted.

    Maybe a saved game with the error could help. But I am at a loss.

    Maybe others can help.


  • @wc_sumpton I use axis allies 1914 module that I downloaded in this forum as templete. (I can't share the link because I'm on mobile now) I added many new territories, units, historical events, objectives etc. It didn't have any tech rule. I just need to know how to add custom techs to tech exclude map. You can try it on axis allies 1914 map or any other map that doesn't include tech. Pre-ww1 tank designs called as caterpillar tractor, therefore tech name is caterpillar_combat_vehicle which activates tank unit. You can change the names according to your own map, important thing here is unlocking the unit.

  • @stalinpasha

    Ok I have something for you. Your scripts did not include a 'techAttachment'. This is needed for technology. So to fix this you can add:

    <attachment name="techAttachment" attachTo="AustroHungarians" javaClass="games.strategy.triplea.attachments.TechAttachment" type="player">
        <option name="techCost" value="5"/>

    And that should do the trick.


  • @wc_sumpton What a hero, fixed!! 3EFH.gif

Log in to reply