Building nuclear weapons after WC Ban?

Discussion in 'Civ5 - Creation & Customization' started by TheOneHitPupper, Feb 16, 2022.

  1. TheOneHitPupper

    TheOneHitPupper Chieftain

    Joined:
    Jun 15, 2017
    Messages:
    97
    Is there anyway to reenable nuclear weapons if a Civ is embargoed at the World Congress? Specifically thinking rogue states like North Korea would be a real world example. It would be a nice counterweight to barring nations from world trade imo.

    I'm poking around some of the lua events but I'm not sure what to go off for something like this. If it helps, I am using the latest (beta) Community Patch's DLL. Thanks in advance.
     
  2. 4eeee

    4eeee Chieftain

    Joined:
    Apr 23, 2021
    Messages:
    13
    Unfortunately seems like you can't do this using Lua alone. The relevant UI code is in "UI\InGame\Popups\ProductionPopup.lua", that's where all the units/buildings/projects/wonders are added to the selection list and all the Lua-side checks are. But even after circumventing those checks I was unable to get the game to queue something or buy it.
    Looking at the released source code, the CvGame::cityPushOrder and CvGame::CityPurchase methods that are being called from the Lua script are in turn calling methods from gDLL, which don't have source code provided. The only way in which it might be possible is by editing CvPlayer::canTrain, because that's where the World Congress resolution check is - that's assuming this method is the one used by gDLL to verify that a unit is eligible for production/purchase.
     

Share This Page