PDA

View Full Version : Melee Area Attack & New Ancillary Questions



SMZ
02-25-2007, 06:37
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:

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:
;------------------------------------------
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
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
Trigger piracy
WhenToTest CharacterTurnEnd

Condition AgentType = diplomat
and FactionwideAncillaryExists letters_of_marque true

Affects Piracy 1 Chance 10
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

IrishArmenian
02-25-2007, 06:51
What animations are you using for the monk unit?

SMZ
02-25-2007, 07:12
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

Foz
02-25-2007, 08:59
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:

---------------------------------------------------
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:

;------------------------------------------
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.

SMZ
02-25-2007, 09:48
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*

SMZ
02-25-2007, 19:14
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?

Foz
02-25-2007, 21:38
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.

SMZ
02-25-2007, 21:44
It's this trigger in the export_descr_character_traits file, and the unrecognized ancillary it refers to is on the 'and FactionWideAncillaryExists' line:


;------------------------------------------
Trigger piracy
WhenToTest CharacterTurnEnd

Condition AgentType = diplomat
and FactionwideAncillaryExists letters_of_marque true

Affects Piracy 1 Chance 10

Foz
02-26-2007, 01:38
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:


---------------------------------------------------
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:


;------------------------------------------
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.

SMZ
02-26-2007, 01:49
nope, tried that, lol - i'm going nuts trying to figure this out

from the docudemon:

---------------------------------------------------
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:

;------------------------------------------
Trigger armour_custom_trigger1
WhenToTest CharacterComesOfAge
Condition IsGeneral
and FatherAttribute Command > 4
and FactionwideAncillaryExists master_smith true

AcquireAncillary armour_custom chance 15

SMZ
02-26-2007, 02:31
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

Foz
02-26-2007, 03:21
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.

SMZ
02-26-2007, 04:37
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