Results 1 to 4 of 4

Thread: Population Cost Script Effect Possible?

  1. #1
    Member Member Malachus's Avatar
    Join Date
    Jul 2004
    Location
    Flint, MI
    Posts
    212

    Default Population Cost Script Effect Possible?

    By using scripts, is it possible to mimic the population cost effect that was present in RTW where the number of soldiers in a unit trained were deducted from the settlement's population?

    Maybe something along the lines of: if unit X is created in settlement Y, then add -Z to the population?

    Granted, if this is possible, I'm assuming it would require a separate entry for each unit in the game and one for each settlement resulting in TONS of lines of code.

    But, since realism is the ultimate goal for a lot of mods out there, this would be a pretty cool idea to incorporate. Indeed, for cities that have populations of 30,000+, recruiting 5 units of 150 men each really won't have much of an impact but at least it'd be nice to know that it does matter how many troops you train and when (especially in the early game, where settlement populations are low).

  2. #2
    Relentless Bughunter Senior Member FactionHeir's Avatar
    Join Date
    Dec 2006
    Location
    London, UK
    Posts
    8,115

    Default Re: Population Cost Script Effect Possible?

    Hmmm I guess you'd have to look at the RTW files to figure out which file made the change and whether the same file is present in M2TW.

    As a guess though, you could try the food variable in the unit file. The comment says its no longer used, but maybe that is what took the population? Worth a try anyway.
    Want gunpowder, mongols, and timurids to appear when YOU do?
    Playing on a different timescale and never get to see the new world or just wanting to change your timescale?
    Click here to read the solution
    Annoyed at laggy battles? Check this thread out for your performance needs
    Got low fps during siege battles in particular? This tutorial is for you
    Want to play M2TW as a Vanilla experience minus many annoying bugs? Get VanillaMod Visit the forum Readme
    Need improved and faster 2H animations? Download this! (included in VanillaMod 0.93)

  3. #3
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Population Cost Script Effect Possible?

    Well you should be able to use the UnitTrained event with a monitor_event that executes console_command add_population <settlement> <unit_size> - however you'd have to do that for each unit/settlement combination and it wouldn't change with the unit size setting the player makes.

  4. #4

    Default Re: Population Cost Script Effect Possible?

    I don't know that I like that idea, purely based on the fact that it assumes all troops are drawn from the settlement itself, rather than the countryside surrounding it.

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