Results 1 to 10 of 10

Thread: Boats out of the human player control

Hybrid View

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

    Default Boats out of the human player control

    It's me again with difficult (or even impossible ) features to be included in a script.

    In a moment of the campaign I want that the starting region and a set of boats belonging to a faction pass directly to the rebels.

    In the case of the settlement, the only method I've been able to implement is surrender_regions, that must be fired before the conquest of a second settlement. The faction survives even without settlement thanks to the horde ability.

    But in the case of boats, I'm not able to give them to rebels. I can prevent their use by the human player by placing in a corner, surrounded by ground, but the human will see them in that corner and I would prefer some more "elegant" solution in such a way the human cannot see his "former" boats.

    Any idea?:hmmm:

  2. #2
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,851
    Blog Entries
    10

    Default Re: Boats out of the human player control

    I think you are going about this the wrong way. Tell me if this is correct.

    Since you dont know which faction the player will choose, you want to remove some units from the players control at the start of the game.



    Instead do it the other way around. Spawn every faction with very little, then at the start of the game check to see what faction is local and spawn new units for every other faction. Its easier to create them than it is to remove them.

  3. #3

    Default Re: Boats out of the human player control

    Quote Originally Posted by GrnEyedDvl View Post
    I think you are going about this the wrong way. Tell me if this is correct.

    Since you dont know which faction the player will choose, you want to remove some units from the players control at the start of the game.



    Instead do it the other way around. Spawn every faction with very little, then at the start of the game check to see what faction is local and spawn new units for every other faction. Its easier to create them than it is to remove them.
    I explained myself very badly, Sorry.

    This campaign has only two factions (spain and moors), and probably I will have to make two different campaigns to adjust the AI behavior depending on which faction is played by human player.

    In case of playing with spain, the human player starts in one small corner with 10 armies and 10 boats, and the first goal is to reach the island of Mallorca (the main target of the campaign). My idea is to make the player to take a decission about where to land (either the historically correct one or a different one), and in that moment the boats will disappear and he will have to play the rest of the campaign from that landing point.

    It is a non-recruiting and non-construction campaign, and the only goal is to develop a military campaign. As the player won't be able to recruit any other boat, if he cannot use the starting 10 ones, the campaign will continue from that landing point.

    I hope this will be clearer now. :hmmm:
    Last edited by Monkwarrior; August 29, 2008 at 06:56 PM.

  4. #4

    Default Re: Boats out of the human player control

    I've been thinking in another possibility:
    disband the boats.

    As the admirals are named at the beginning of the campaign, it is easy to select them using select_character. Then I can call the unit card by using select_ui_element hud_show_units_tab and simulating the mouse click.
    If I were able to right-click on the unit card, the info scroll has the disband_unit_button and clicking on it the unit would disappear.

    But now the question is: how do I select the unit card? In norman prologue we have point_at_card command, but it does not select the card. I've tried with strat_next_card, but it doesn't work.

    Is it possible to select the unit card and how?:hmmm:

  5. #5

    Default Re: Boats out of the human player control

    I don't know about selecting unit cards, but what if you edited your export_descr_character_traits.txt file to make a trait called immobile, giving -100% movement points, and then gave it to your admiral?

    Coder on Dark Ages: Roman Revival, the alternate history mod for BI.

    Under the Patronage of Augustus Lucifer, member of the House of Ward.

  6. #6

    Default Re: Boats out of the human player control

    Quote Originally Posted by Mythic_Commodore View Post
    I don't know about selecting unit cards, but what if you edited your export_descr_character_traits.txt file to make a trait called immobile, giving -100% movement points, and then gave it to your admiral?
    I can make them immobile in different ways. My fear is that their presence may interfere in the victory condition of the other faction, as they won't be ever destroyed. And also it would be more "elegant" if the boats disappear completely from campaign map.

  7. #7
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,851
    Blog Entries
    10

    Default Re: Boats out of the human player control

    destroy_units
    faction, attribute_or_type
    Disbands all units in the faction's armies with the specified name or attribute.
    destroy_units England free_upkeep_unit
    DESTROY_UNITS
    Just use the name of the unit and it should get them all. Note that this is a Kingdoms only command.
    Last edited by GrnEyedDvl; August 31, 2008 at 04:13 PM.

  8. #8

    Default Re: Boats out of the human player control

    Quote Originally Posted by GrnEyedDvl View Post
    Just use the name of the unit and it should get them all. Note that this is a Kingdoms only command.
    It works!!!
    I cannot understand how I missed this command in you docudemons 4.0.

    You are my hero, GrnEyedDvl.

  9. #9
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,851
    Blog Entries
    10

    Default Re: Boats out of the human player control

    Welcome

    Its easy to miss stuff because there is so much there. I use the search feature heavily. Do a search for destroy_ or kill_ or Anc, make sure you check the whole workbook, and you will get good results.

    For example if you wanted to find out what you can do with Ancillaries, you search for Anc because in some commands its spelled Anc, in others its spelled out all the way. Search the whole book and you get this:
    Spoiler Alert, click show to read: 

  10. #10

    Default Re: Boats out of the human player control

    Yes, I searched kill_, but it only works with characters. I didn't think in destroy_ command, and looking for _unit led to soooooooo many entries.
    Thanks again.

Posting Permissions

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