Results 1 to 13 of 13

Thread: Melee Area Attack & New Ancillary Questions

  1. #1

    Default Melee Area Attack & New Ancillary Questions

    1. I'm trying to create a monk/eastern priest style unit which while in small numbers will be able to wade into the midst of the enemy and use kungfu of the strong sort, lol. Problem being, I've added "launching" "area" "ap" and even "bp" to my 'Magus' unit, I've set the attack absurdly high, given them a huge charge bonus... everything I can think of, and they still struggle.

    I'm using the Mutatawwi'a model, although I tried the Naffatun one first - neither worked as I would hope. So, does anybody know how to make an infantry unit function as a mini-elephant? It's not so much that I want a high kill rate, I mainly want to see bodies flying in every direction.


    2. I added ability for a few factions to recruit pirate ships, and as a balance upon that I wanted to set up a character trait on the diplomats so that if you build lots of pirate ships, you will have a harder time negotiating with other factions. Best way I could figure out for this was a two step process, first I set up a trigger to give my Faction Leader a "Letters of Marque" ancillary after recruiting a number of pirate ships; and then second a trigger so that my diplomats would have lowered influence if anybody in my faction had the "Letters of Marque" ancillary. Unfortunedly, the log file shows this error:
    Quote Originally Posted by log file
    23:01:15.125 [game.script] [error] Condition parsing error in data/export_descr_character_traits.txt, at line 16396, column 38
    Ancillary not recognised
    Here are the relevant pieces of code I've done:
    Spoiler Alert, click show to read: 
    ;------------------------------------------
    Trigger letters_of_marque_vnv_trigger
    WhenToTest UnitTrained
    Condition UnitType Pirate Ship
    and IsFactionLeader
    and not I_WorldwideAncillaryExists letters_of_marque

    AcquireAncillary letters_of_marque chance 5

    ;------------------------------------------
    Trigger letters_of_marque_vnv_trigger
    WhenToTest UnitTrained
    Condition UnitType Privateer
    and IsFactionLeader
    and not I_WorldwideAncillaryExists letters_of_marque

    AcquireAncillary letters_of_marque chance 10

    Spoiler Alert, click show to read: 
    Ancillary letters_of_marque
    Type Naval
    Transferable 0
    Image item_documents.tga
    ExcludeCultures mesoamerican, middle_eastern, southern_european, eastern_european, greek
    Description letters_of_marque_desc
    EffectsDescription letters_of_marque_effects_desc
    Effect Authority -1
    Effect Chivalry -1

    Spoiler Alert, click show to read: 
    Trigger piracy
    WhenToTest CharacterTurnEnd

    Condition AgentType = diplomat
    and FactionwideAncillaryExists letters_of_marque true

    Affects Piracy 1 Chance 10

    Spoiler Alert, click show to read: 
    Trait Piracy
    Characters diplomat

    Level Dubious_Connections
    Description Dubious_Connections_desc
    EffectsDescription Dubious_Connections_effects_desc
    Threshold 2

    Effect Influence -1

    Level Aids_and_Abets
    Description Aids_and_Abets_desc
    EffectsDescription Aids_and_Abets_effects_desc
    Threshold 4

    Effect Influence -2

    Level Pirate_Lord
    Description Pirate_Lord_desc
    EffectsDescription Pirate_Lord_effects_desc
    Epithet Pirate_Lord_epithet_desc
    Threshold 8

    Effect Influence -3
    Drink water.

  2. #2
    Join the ICLADOLLABOJADALLA! Member IrishArmenian's Avatar
    Join Date
    May 2006
    Location
    Writing the book, every day...
    Posts
    1,986

    Default Re: Melee Area Attack & New Ancillary Questions

    What animations are you using for the monk unit?

    "Half of your brain is that of a ten year old and the other half is that of a ten year old that chainsmokes and drinks his liver dead!" --Hagop Beegan

  3. #3

    Default Re: Melee Area Attack & New Ancillary Questions

    the Mutatawwi'a set - so right now they're wielding the two handed club

    before that I tried it with the Naffatun set, so without zooming in on the closest level they appeared to be punching
    Drink water.

  4. #4
    Masticator of Oreos Member Foz's Avatar
    Join Date
    Dec 2006
    Posts
    968

    Default Re: Melee Area Attack & New Ancillary Questions

    Hmm... the error says it doesn't recognize that ancillary. Not completely sure, but I'm guessing you didn't go and add the name of the ancillary to export_descr_ancillary_enums.txt

    I believe the game uses that file as a link between text references and sequential entries in the file w/ the triggers, basically as a lookup table to reference the actual ancillary file. So, be sure to add the new entry in the exact position you've added the text in the ancillary file (i.e. between the same entries, or at the bottom if its there).

    Some other things to look at:

    - Probably a bad idea to use the same name for two triggers. I don't know for sure that it causes a problem, but it could.
    - Have you added the actual text descriptions for the new ancillary and trait you've put into the files? If not, you'll need to do so in export_ancillaries.txt and Export_VnVs.txt respectively. Both are in data/text. Again it's one of those that I'm not certain causes crashes, but you'll want to have the in-game descriptions (you know, the ones that appear when you hover the mouse over something) in either case.
    - You can't really use "IsFactionLeader" like you have. What you have basically asks the trained unit if it is the factionleader of your faciton... which it never will be. This works like this because all the conditions use the info sent to them from the event used for that trigger. The bad news is, to do what you want done actually looks impossible from what I'm seeing. There's just no event that involves the faction leader of a unit that's been completed, and so no way to give the leader traits when a unit completes. About the closest you can come is to use:
    Code:
    ---------------------------------------------------
    Identifier:         GovernorUnitTrained
    Event:              A unit has been trained
    Exports:            nc_character_record, character_record, faction, region_id, character_type, settlement, resource_description, unit
    Class:              ET_GOVERNOR_UNIT_TRAINED
    Author:             Lee
    ---------------------------------------------------
    This would allow you to setup triggers to give the ancillary to a governor if his settlement builds pirate ships. To achieve the desired effect you may have to raise the chance he gets it, as a given settlement will certainly make less pirate ships than the whole faction would have... though come to think of it your only requirement is that someone in the faction has the ancillary, which the same odds should continue to do the same amount of the time (just not on the faction leader alone now). The new triggers might look like this:
    Code:
    ;------------------------------------------
    Trigger letters_of_marque_vnv_trigger1
    WhenToTest GovernorUnitTrained
    Condition UnitType Pirate Ship
    and not I_WorldwideAncillaryExists letters_of_marque
    
    AcquireAncillary letters_of_marque chance 5
    
    ;------------------------------------------
    Trigger letters_of_marque_vnv_trigger2
    WhenToTest GovernorUnitTrained
    Condition UnitType Privateer
    and not I_WorldwideAncillaryExists letters_of_marque
    
    AcquireAncillary letters_of_marque chance 10
    So the triggers were largely correct, it's just that a few things don't work quite like you'd think. You do seem to have a pretty good handle on things though.

    Hope that helps.


    See my Sig+ below! (Don't see it? Get info here)

  5. #5

    Default Re: Melee Area Attack & New Ancillary Questions

    thnx for the good feedback, found a couple things that might be it from that info

    I didn't have the exact same placement, good point about duplicate names, and I guess with a lil description tweak - the governer solution should do what I want

    *goes to test*
    Drink water.

  6. #6

    Default Re: Melee Area Attack & New Ancillary Questions

    ok, followed the above suggestions, still no luck...

    from the log file, I keep thinking that I must have a typo somewhere, but I've checked and rechecked and rechecked.... any other ideas?
    Drink water.

  7. #7
    Masticator of Oreos Member Foz's Avatar
    Join Date
    Dec 2006
    Posts
    968

    Default Re: Melee Area Attack & New Ancillary Questions

    Can you figure out exactly which line that is in the file, and post it, along with the one right above and below it? That might help.


    See my Sig+ below! (Don't see it? Get info here)

  8. #8

    Default Re: Melee Area Attack & New Ancillary Questions

    It's this trigger in the export_descr_character_traits file, and the unrecognized ancillary it refers to is on the 'and FactionWideAncillaryExists' line:

    Code:
    ;------------------------------------------
    Trigger piracy
        WhenToTest CharacterTurnEnd
    
        Condition AgentType = diplomat
    	  and FactionwideAncillaryExists letters_of_marque true
    
        Affects Piracy  1  Chance  10
    Last edited by SMZ; 02-25-2007 at 21:46.
    Drink water.

  9. #9
    Masticator of Oreos Member Foz's Avatar
    Join Date
    Dec 2006
    Posts
    968

    Default Re: Melee Area Attack & New Ancillary Questions

    Lol... that's exactly where I was expecting it would be... so unfortunately that doesn't help me much.

    I think I've got it though! While I can't seem to find any game files that use FactionwideAncillaryExists at all, I did find a condition very similar: I_WorldwideAncillaryExists:

    Code:
    ---------------------------------------------------
    Identifier:              I_WorldwideAncillaryExists
    Trigger requirements:    character_record
    Parameters:              logic token
    Sample use:              I_WorldwideAncillaryExists actor true
    Description:             Does this ancillary already exist in the world?
    Battle or Strat:         Strat
    Class:                   WORLDWIDE_ANCILLARY_EXISTS
    Implemented:             Yes
    Author:                  Lee
    ---------------------------------------------------
    That wouldn't be remarkable in and of itself, except that this one I DO see used in the game files, for instance like this:

    Code:
    ;------------------------------------------
    Trigger shard_of_the_true_cross_anc_trigger
        WhenToTest GeneralCaptureSettlement
        Condition Attribute Piety > 3
              and SettlementName Tripoli
              and not I_WorldwideAncillaryExists shard_of_the_true_cross
              and not HasAncType Relic
    
        AcquireAncillary shard_of_the_true_cross chance  10 
    
    ;------------------------------------------
    Notice anything? It's used almost exactly like the sample, except for one thing: There is no true following the name of the ancillary like they use in the example. It's about the last thing I can think of, but seems pretty solid: it's likely the condition descriptions for these two are incorrect, and should NOT have true following the name of the ancillary. My bet is that the parser picks up "letters_of_marque true" as the name of the ancillary from that line you have highlighted up there, and therefore cannot find it. Try it without true... and hope it works.


    See my Sig+ below! (Don't see it? Get info here)

  10. #10

    Default Re: Melee Area Attack & New Ancillary Questions

    nope, tried that, lol - i'm going nuts trying to figure this out

    from the docudemon:
    Code:
    ---------------------------------------------------
    Identifier:              FactionwideAncillaryExists
    Trigger requirements:    character_record
    Parameters:              logic token
    Sample use:              FactionwideAncillaryExists actor true
    Description:             Does this ancillary already exist in this faction?
    Battle or Strat:         Strat
    Class:                   FACTIONWIDE_ANCILLARY_EXISTS
    Implemented:             Yes
    Author:                  Lee
    and as used in the ancillaries file:
    Code:
    ;------------------------------------------
    Trigger armour_custom_trigger1
        WhenToTest CharacterComesOfAge
        Condition IsGeneral
              and FatherAttribute Command > 4
              and FactionwideAncillaryExists master_smith true
    
        AcquireAncillary armour_custom chance  15
    Drink water.

  11. #11

    Default Re: Melee Area Attack & New Ancillary Questions

    ok, something odd... in an attempt to see if maybe my text files weren't working correctly I deleted the string bins in the folder - although I've made description alterations before and seen them show up in game, but at this point I'm trying anything...

    however when I check the log file after running the game like that, all of a sudden there is a loooong list of "missing" descriptions which I've added, even tho they are all in the text files... so I put the string bins back, and once again, only that one Ancillary is said to be unrecognized

    I thought that once you had the text files you didn't need the string bins? I just left them because before it seemed to be working regardless... so now I'm more confused than ever
    Drink water.

  12. #12
    Masticator of Oreos Member Foz's Avatar
    Join Date
    Dec 2006
    Posts
    968

    Default Re: Melee Area Attack & New Ancillary Questions

    From comments I've seen, the game is supposed to MAKE the strings.bin files from the txt files if the txt files are present. So when you delete the strings.bin files, it should mean the game decides to compile the txt file into a strings.bin file again, and then should theoretically use that new bin file to run the game.


    See my Sig+ below! (Don't see it? Get info here)

  13. #13

    Default Re: Melee Area Attack & New Ancillary Questions

    that's what I thought too, lol - but I started the game, then exited, checked the log file - saw the long line of reported errors from "missing" items, looked in the folder and it was just text files, no string.bins... so me confused and I manually pulled them from the recycle bin and put them back

    started the game again, exited again - checked the log file, no long list of errors, just the one ancillary item left
    Drink water.

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