Results 1 to 11 of 11

Thread: Editing population

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Editing population

    I have an idea for a small submod, and I would like to ask someone with more knowledge if this is possible within the boundaries of the engine.

    Is it possible to distract population from a settlement when a unit is recruited?

    Example: If you recruit a unit of 200 archers, 200 population would be gone from the settlement.

    Is it possible to return the population if the unit is disbanded in the settlement?

    And at last;

    Would it be possible to change the extermination script so that all factions but your own would be exterminated?

    Example: Take a enemy village with 1000 population and 5% of your own culture. If you exterminate it 50 people would remain with 100% culture.

  2. #2

    Default Re: Editing population

    To the first one, I think it's possible.

    To the second one, less so. I don't think there's a command to check when a unit had been disbanded.

    The last one, certainly not.

    [ Cry Havoc:: ] - [ link ] - [ An Expanded World Submod for Call of Warhammer ]
    My turban brings all the muslims to the yard and they're like العنصرية ش

  3. #3

    Default Re: Editing population

    I found this script while searching if someone had done something similar in the past:

    Code:
    monitor_event UnitDisbanded FactionIsLocal
      and I_SettlementSelected London
      console_command add_population London, 1000
    end_monitor
    Would it be possible to give the population to the settlement they where disbanded in, instead of a hardcoded one? (If this code works, I assume it does)

    Also, if you add population to a settlement with add_population, does it alter the culture%?

  4. #4
    Swagger's Avatar Imperial Coffee-Runner
    Join Date
    Apr 2007
    Location
    Portugal
    Posts
    12,453

    Default Re: Editing population

    Is it possible to distract population from a settlement when a unit is recruited?
    yes, use script to remove population when you recrutied X unit on Y settlement

    Is it possible to return the population if the unit is disbanded in the settlement?
    yes, like above, but add X population when you disband Y unit on Z settlement

    Would it be possible to change the extermination script so that all factions but your own would be exterminated?
    mind to explain this better?
    Under the Patronage of the Dreadful cedric37!
    Ancs Guide, Emergent Factions , Yes/No Events |L'Outremer for Modders| Swagger's Skymod


  5. #5

    Default Re: Editing population

    Quote Originally Posted by Swagger View Post
    mind to explain this better?
    When conquer a city, you can choose to exterminate the population. But it doesn't have the right effect, I think.

    Example;
    If you, as a catholic faction, exterminate a muslim city with 95% muslim culture, 5% catholic and 10000 population, you are left with a lot less population, but still 95% muslim. I wondered if it would be possible to kill off all of the muslims, so that only 500 people would remain, but the culture would be 100% catholic.

  6. #6
    konny's Avatar Artifex
    Join Date
    Jul 2007
    Location
    Germania Inferior
    Posts
    3,631

    Default Re: Editing population

    This is not culture but religion. No, there is no way (I would know of) to change the religion of a single settlement. You can only do so for the entire faction:

    Code:
    Identifier:	set_religion
    Parameters:	faction, religion
    Description:	Changes the religion of a faction.
    Sample use:	set_religion England pagan
    Class:	SET_RELIGION
    	
    Identifier:	change_population_religion
    Parameters:	faction, religion_to, percent, religion_from (religion_from optional, current faction religion by default)
    Description:	Changes the religion of a faction.
    Sample use:	change_population_religion England pagan 50 catholic
    Class:	CHANGE_POPULATION_RELIGION

    Team member of: Das Heilige Römische Reich, Europa Barbarorum, Europa Barbarorum II, East of Rome
    Modding help by Konny: Excel Traitgenerator, Setting Heirs to your preference
    dHRR 0.8 beta released! get it here
    New: Native America! A mini-mod for Kingdoms America

  7. #7

    Default Re: Editing population

    Hm my example didn't make sense then, it is meant for the third age mod and they use culture, not religion. I thought it would work the same.

    Reworked example;

    If you, as a elvish faction, exterminate a orc city with 95% orc culture, 5% elves and 10000 population, you are left with a lot less population, but still 95% orcs. I wondered if it would be possible to kill off all of the orcs, so that only 500 people would remain, but the culture would be 100% catholic.

    Also, is there a way to add a population requirement to units? For example, you can only recruit certain knights if more then 1000 people live in the city, and the culture requirement is met? (I guess not, but I'd like to know for sure. I think something like this was implemented in shogun, but I haven't played that for ages)

  8. #8
    konny's Avatar Artifex
    Join Date
    Jul 2007
    Location
    Germania Inferior
    Posts
    3,631

    Default Re: Editing population

    Quote Originally Posted by Gharbad the Weak View Post
    Hm my example didn't make sense then, it is meant for the third age mod and they use culture, not religion. I thought it would work the same.
    As long as we are talking about the pips in the bar on the detailed overview screen it would still be "religion" for the game (technically), no matter how you call it.

    Also, is there a way to add a population requirement to units? For example, you can only recruit certain knights if more then 1000 people live in the city, and the culture requirement is met? (I guess not, but I'd like to know for sure. I think something like this was implemented in shogun, but I haven't played that for ages)
    None that I know of, but you might check the Docudemons yourself:

    http://www.twcenter.net/forums/showthread.php?t=118578

    Team member of: Das Heilige Römische Reich, Europa Barbarorum, Europa Barbarorum II, East of Rome
    Modding help by Konny: Excel Traitgenerator, Setting Heirs to your preference
    dHRR 0.8 beta released! get it here
    New: Native America! A mini-mod for Kingdoms America

  9. #9

    Default Re: Editing population

    Allright, I will

    I think I've got a solution of sorts. Ill just change the exterminate script so the population of the settlement will reset to 400(The minimum) and spawn a building with 100% convertion bonus. I don't think you can change the culture of a settlement through the console.
    Last edited by Gharbad the Weak; July 31, 2010 at 12:53 PM.

  10. #10

    Default Re: Editing population

    I have an idea for a small submod, and I would like to ask someone with more knowledge if this is possible within the boundaries of the engine.

    Is it possible to distract population from a settlement when a unit is recruited?

    Example: If you recruit a unit of 200 archers, 200 population would be gone from the settlement.

    Is it possible to return the population if the unit is disbanded in the settlement?
    Both these are possible, i have already done all the ground work in a mod i wrote previously for Stainless Steel. Check my sig for Population Control. The script decreases population when a unit is recruited in a settlement and increases population in a random owned settlement when a unit is disbanded. I am in the process of rewriting the script for a mod i am working on called Defender of the Crown. The Population Script i have already written will be quite detailed when i am finished with it. In its current state however it should be more then enough for what u are looking for.

    Also, is there a way to add a population requirement to units? For example, you can only recruit certain knights if more then 1000 people live in the city, and the culture requirement is met? (I guess not, but I'd like to know for sure. I think something like this was implemented in shogun, but I haven't played that for ages)
    This could be somewhat possible. I wrote a similar script for horses where the player had to have enough horses to train cavalry units. The only problem with what u are suggesting is u can not track the exact population in a settlement. You can add and subtract from the population but u can never know its actual size. The only way around this is to use a counter that would attempt to keep track of population. Unfortunatly the script would be to bulky and slow your game down. Your best bet would be to use some alternative idea, such as my horse pastures script (which was never fully completed but works like a charm).

    Your ideas remind me of a Trade and Supply script i had written for a mod where you had to stockpile your resources. If you lacked certain resources then u have less options. Example, you couldnt construct a Castle if you did not have 200 wood and 400 stone. Or you cant train an bowman without 2 wood, 1 leather, 1 ale... Each turn you gain resources dependant on resources you controlled and additional resources when ur merchant is trading on one and less when a foriegn merchant is trading on one of yours. You could lose the benefits a building gives if you lack the resources to keep it functioning, but you could gain additional benefits if u had excess resources. The AI was somewhat different as it is not written to be actual artificially intelligent. The script also had events based around it, such as brigands and thieves and weather destroying your crops and surpluss resources, forcing you to build storage buildings and increase patrols etc... The script was finished and worked with very little turn lag. Unfortunatly, the mod it was written for was disbanded (Vax Lux Luucus - a dark age mod). And i had a copy of the script but my computer died and i lost everything on it, including that script. I could rewrite it, but it did take 8 months to write as it was very detailed and used well over 400 seperate counters in its entirety.
    ...longbows, in skilled hands, could reach further than trebuchets...

  11. #11

    Default Re: Editing population

    Wow, last post was in my last birthday.

    Well, I made it. Or almost.

    What I got is if YOU or the AI exterminate a settlement, than it will instantly convert ALMOST 100% of the remaining population to conqueror's culture.
    "ALMOST" is the cool part: It only converts the enemy's culture. So if I'm Gondor and capture a Orcish settlement, it only converts 100% of Orcish culture, and preserves Elvish and Dwarven ones. But if you want to convert them too, you must edit the files again. I choose not to, to keep the lore.

    The only and most annoying problem is that DAMN AI NEVER EXTERMINATE THE DAMN SETTLEMENTS!!! So I'm desperatelly looking for a command that makes the AI exterminate for a given condition, like "Own religion less than 80" so they won't exterminate a settlement that has over 80% of their own culture.

    But I couldn't find any command to make it work. The nearer I got was to increase chances of extermination, but still not sure if it worked properly. And of course, AI would exterminate even their own settlements =(

Posting Permissions

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