Runtime error on unit placement


  • Moderators

    I'm working on a map and starting yesterday it has started giving me the message "RuntimeException - Exception on remote" when I try to place Russians starting in round 2. It's only the Russians, it only starts in round 2, and it only started doing this yesterday and I've been working on this a long time. Any ideas what usually causes this kind of error?

    The only thing I did to the Russians yesterday was I added a trigger attachment for the them to have a different production frontier starting in turn 8.


  • Moderators

    Ok, i think I figured out what is causing the error. There is something wrong with the factories. I have a different factory for each player, GermanFactory, RussianFactory, etc. Whenever a player builds a factory, the error appears when you try to place the factory, or you try to place any other unit on an existing factory. But if you don't build a factory, the error does not happen.

    Is there a way to have player specific units that are factories? I want to have player specific factories because I want to give the factories each the ability to generate 1 PU per turn, and to make the factories cost different amounts for each player. For example, Italian factories cost 20 PUs but American factories cost 7. The US player can rapidly grow his income by building factories (there is no limit to number of factories which can be built in a territory) but the Italian player will probably build very few. I know how to do the XML properties but something about it is causing an error.

    If I have to use plain old factories which are the same for each player and don't generate extra income (I don't see the point of having income generating factories unless I can make the cost different for each player) I will but i'd really like to have this feature if possible. Thanks



  • @andrewthree I would think you can. Each player has it's own "productionFrontier" ? Seems weird it's been working all that time and now isn't.

    Maybe the "isFactory" is screwing things up ? Could just add the factory stuff separate and try that


  • Moderators

    That is what i'm trying now. Still getting error... I wonder if there are certain things that have to be there, or that I should leave out


  • Moderators

    This is my unit attachment so far:

    <attachment name="unitAttachment" attachTo="GermanFactory" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
      <option name="attack" value="0"/>
      <option name="defense" value="0"/>
      <option name="createsResourcesList" value="1:PUs"/>
      <option name="isConstruction" value="true"/>
      <option name="constructionType" value="bunker"/>
      <option name="constructionsPerTerrPerTypePerTurn" value="1"/>
      <option name="maxConstructionsPerTypePerTerr" value="1"/>
      <option name='canProduceUnits' value='true'/>
      <option name='canProduceXUnits' value='-1'/>
      <option name='canBeDamaged' value='true'/>
      <option name='maxDamage' value='2'/>
    </attachment>


  • @andrewthree hmm...can you post the xml ? The different factories were working before the turn 8 trigger ?

    If you want it to act like regular factory, probably add all the factory stuff.

    Ahh...just saw you latest. Check your properties and make sure the right ones are true. I think you might have to turn some on. Not sure tho. Worth a try ūüôā


  • Moderators

    I would try to remove the trigger you added to the Russians first. See if that eliminates the error. If it does... then you know something is wrong with it and you can now isolate what is wrong with the trigger.


  • Moderators

    @Hepps without the trigger it doesn't work. There is something about my factories that is not working. I don't get it. Maybe I'll just go back to normal factories and find another way to generate PUs.


  • Moderators

    @andrewthree I'd have to look at the entire XML to be sure.

    Good luck



  • @andrewthree

    What is the error that you are getting? The only error I have received is the "Missing Unit Image" error, because I did not create the factory units in every unit folder. Besides that error, which I ignored, I was able to go several rounds with no problems.

    I used the 'GermanFactory' as a guide and created the same unit for each player, with different production cost. The factories worked good, even the generated PUs worked. Since the is no 'whenCapturedChangesInto', but no attack or defense the unit could not be taken as a casualty, thus when Germany captured a 'RussianFactory' I received the error stated above. But Germany was still able to use the missing factory to produce units.

    I also created one 'factory' using the 'GermanFactory' with different production cost for each player. Because each player used the same 'factory' the was no error, and everything worked well.

    As others have stated, without more information, I have been unable to recreate the problem. But I have tried. Sorry.

    Cheers...


  • Moderators

    Thanks for the responses. I'm glad it's working for somebody. My xml is just screwed up. I'll have to get it straightened out.


Log in to reply