Results 1 to 9 of 9

Thread: Kingdoms commands

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

    Default Kingdoms commands

    Well I have a specific question after getting the campaign scripts and maybe someone could test it:

    Do destroy_buildings and destroy_units only work on a faction-wide level or can we also specify a certain city as the scope?

  2. #2

    Default Re: Kingdoms commands

    We'll need the docudemons more precisely, to know what exact options are available for those buildings. There seems to be nowhere to specify scope in the commands as they're used, but as you are aware there's a 'true' statement, and it's curious what that refers to.

    Anyhow, but possibly unrelated, levy scripts are exceptionally easy now.

    EDIT: also, I'm not entirely clear how destroy_units works, since it seems to refer to a label and regular (non named char) units don't seem to have labels.

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

    Default Re: Kingdoms commands

    Quote Originally Posted by SigniferOne
    We'll need the docudemons more precisely, to know what exact options are available for those buildings. There seems to be nowhere to specify scope in the commands as they're used, but as you are aware there's a 'true' statement, and it's curious what that refers to.

    Anyhow, but possibly unrelated, levy scripts are exceptionally easy now.

    EDIT: also, I'm not entirely clear how destroy_units works, since it seems to refer to a label and regular (non named char) units don't seem to have labels.
    Why are levy scripts exceptionally easy?

  4. #4

    Default Re: Kingdoms commands

    Well not the randomized ones that you have, but static ones are super easy -- make a 'train a legion' building available to be built. Trigger on it being built, create the army, then destroy all legion buildings for that faction, even if global action.

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

    Default Re: Kingdoms commands

    Quote Originally Posted by SigniferOne
    Well not the randomized ones that you have, but static ones are super easy -- make a 'train a legion' building available to be built. Trigger on it being built, create the army, then destroy all legion buildings for that faction, even if global action.
    Yeah but I think triggering on unit recruitment is more in-style anyways. Of course you can do the same with the kill_units command

  6. #6

    Default Re: Kingdoms commands

    Yep that's right, kill_units would make more sense, since both commands are now available. However I am not entirely clear how kill_units works, since it seems to reference a unit label and not the actual unit type.

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

    Default Re: Kingdoms commands

    Quote Originally Posted by SigniferOne
    Yep that's right, kill_units would make more sense, since both commands are now available. However I am not entirely clear how kill_units works, since it seems to reference a unit label and not the actual unit type.
    Ah I had assumed that these labels are specified similarly as a unit-type line in edu. So I guess they aren't?
    Sounds even more hardcoded than I thought :P
    Last edited by alpaca; 09-06-2007 at 16:07.

  8. #8

    Default Re: Kingdoms commands

    Yeah hmmm, "pagan_unit" is nowhere in EDU.

    EDIT: I'd like to make this thread a more or less central reference for the new Kingdoms commands. I don't want to type over again my thread about earlier entries, so:

    send_character_off_map - see the explanatory thread here.
    recruit_priority_offset - see explanatory thread here.


    CHANGE_SETTLEMENT_NAME

    This is used to change the settlement name dynamically in-game, according to certain conditions. Here is the vanilla code:

    Code:
    ;;;;; Louisiana - Choctaw
    
    	declare_counter Choctaw_France
    	
    	;;; France captures Choctaw
    	monitor_conditions I_SettlementOwner Choctaw = france
    		and I_CompareCounter Choctaw_France = 0
    		
    		set_counter Choctaw_France 1
    		change_settlement_name Choctaw Louisiana
    
     	end_monitor
    
    	;;; Natives capture Choctaw
    	monitor_conditions not I_SettlementOwner Choctaw = spain
    		and not I_SettlementOwner Choctaw = england
    		and not I_SettlementOwner Choctaw = france
    		and I_CompareCounter Choctaw_France = 1
    
    		set_counter Choctaw_France 0
    		change_settlement_name Choctaw Choctaw
    
     	end_monitor
    Brief run-down -- if the owner of Choctaw province becomes france, rename that province to "Lousiana". If neither spain nor england nor france own that province, rename it back to Choctaw.

    Choctaw_France is a counter used to keep track of things. monitor_conditions will not monitor just once a turn, it will monitor every second, and thus, when france occupies Choctaw, it will keep firing off and keep re- and re-renaming Choctaw into Lousiana. Thus the counter is set to 1, and the monitor checks to make sure it is zero before changing the name again.

    Important Note: the names to which you change settlements must be contained in /text/expanded.txt. They must contain the following format:

    {Louisiana}Louisiana
    The name in brackets should not be upper-cased, and instead must be letter-for-letter identical to how you write it in "change_settlement_name". It must not be all caps (unless that's what you want it to be called).

    Further: even the name you change it back to, here namely Choctaw, must be contained in expanded.txt. Names of settlements are not stored as variables; once they are parsed from descr_regions.txt, the game forgets about them, how to properly spell them, etc. You must keep both varieties of the settlement's name in expanded.txt if you intend it to be allowed to be renamed back and forth.

    Thus, the Spanish have a starting city Vera Cruz:



    After a few seconds, it is renamed under my name:

    Last edited by SigniferOne; 09-06-2007 at 23:28.

  9. #9
    Finder of Little Oddities Senior Member Makanyane's Avatar
    Join Date
    Jan 2006
    Posts
    2,220

    Default Re: Kingdoms commands

    Was struggling to find link to Kingdoms Docudemons here (which probably means its somewhere very obvious ) - thought I'd add link here for anyone else not finding it:

    Posted by Unspoken Knight on TWC download:
    http://www.twcenter.net/forums/downl...o=file&id=1681
    Not used mods before? Looking for something small and fun?!
    Download the:

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