Results 1 to 2 of 2

Thread: Multiple requirements for units -- game crashes

  1. #1

    Default Multiple requirements for units -- game crashes

    Hey. I'm new to modding and am having trouble. I was trying to mod my game so that deceres can be made at Athens and Carthage with a level 5 city and a dockyard. I added the hidden resource "make_deceres" to the cities in the descr_regions file and added it to the top of the export_descr_buildings file, and added

    recruit "naval deceres" 0 requires factions { greek, carthaginian, } and hidden_resource make_deceres and building_present imperial_palace

    to the dockyard capabilities. (I also copied the UI files of the naval deceres into the Greek and Carthaginian folders). It seemed to work, but the game always crashes when I right-click to inspect the dockyard in the tech tree window. If I instead edit the imperial palace capabilities in export_descr_buildings and add an "and building_present dockyard", then the game crashes when I right-click to inspect the level 5 governor's palace. I tried adjusting the number of spaces before each "and", and writing "building_present_min_level" instead of "building_present", but the same thing still happens.

    When I edit it to not have a building_present requirement, then it works and it lets me inspect the building and recruit the units, etc. The problem seems to only happen when I have both a hidden_resource requirement and a building_present requirement.

    How do I fix this?

  2. #2

    Default Re: Multiple requirements for units -- game crashes

    You have an error in the code:

    "recruit "naval deceres" 0 requires factions { greek, carthaginian, } and hidden_resource make_deceres and building_present imperial_palace"

    When it should be:

    "recruit "naval deceres" 0 requires factions { greek, carthaginian, } and hidden_resource make_deceres and building_present_min_level core_building imperial_palace"

    You see, you have to put the type of building before the level of that building. Example: denfeses stone_wall; market trader; hinterland_farms farms+1, etc. You also forgot the _min_level part.

    Try it now and don't forger to add -show_err to the shortcut of the game. It would have told you what the problem was.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO