Results 1 to 3 of 3

Thread: Disable Unit Upgrades

  1. #1

    Default Disable Unit Upgrades

    Dear modders,

    I see a lot of you extensively editing the db tables ( a lot of work!) to stop units from upgrading. It is a lot of work and ofcourse every update will destroy your mod or require you go to work again. Furthermore you will have compatibility issues with other unit changing mods.

    So if you just don't want units to upgrade but also not be aible to recruit the older units, while still keeping them in your forces, the easist way is to change this:


    -------------------------------
    -- upgrade_unit
    -------------------------------
    upgrade_unit = ui_override:new(
    "upgrade_unit",
    function()
    scripting.game_interface:override_ui("disable_upgrade_unit", true);
    end,
    function()
    scripting.game_interface:override_ui("disable_upgrade_unit", false);
    end
    ),

    Last entrene to "true".
    campaigns//script/lib/lib_campaign_ui.lua

    If you do it this way it will be compatible with every mod and you never have to change anything again (brr all those db entries...) or bother about future updates.
    Kind regards

  2. #2

    Default Re: Disable Unit Upgrades

    So I got some feedback on this and it seems that you want to be keeping the old units besides their newer ones. It Should work with te next entry:
    Table: cdir_configs
    Record: CDIR_CVN_UNIT_UPGRADER_UNIT_ARMY_ALLOWED X X 1
    ==> change the last value to 0 or the second box unselect (for player only)

    But it doesn't!!!

    So I will look a little further in this matter.
    Last edited by OpusDei; January 08, 2018 at 12:36 PM. Reason: Not working

  3. #3
    Libertus
    Join Date
    Aug 2010
    Location
    Cemetery land
    Posts
    85

    Default Re: Disable Unit Upgrades

    Maybe you must walk another way? It can do with PFM, not touch scripting.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •