-
List of non or mal functioning script terms (events, conditions and commands)
I have been looking for a list or mentioning of script terms, be it events, conditions or commands that don't work, but haven't been successful. So far I can only recall the 'LeaderDestroyedFaction' event which is supposed to trigger when a faction has been defeated. And the 'GeneralWithAncKilled' condition. I am sure there have been discussions about this but I just can't find them - any input is welcome.
No comment means the entry does not work at all.
- Event -
LeaderDestroyedFaction
LeaderOrderedAssassination - does not export target_faction as stated in DocuDemons
GovernorBuildingDestroyed
PlugInCompleted - not implemented? Confirmed not working - no code
GovernorPlugInCompleted - Confirmed not working - no code
CharacterNearHeretic: - event is triggered around CharacterTurnEnd, not immediately
CharacterNearWitch: - event is triggered around CharacterTurnEnd, not immediately
GeneralPrisonersRansomedCaptor - causes a CTD when used in EDA
PreBattle : doesn't work (at least in a script)
BecomesFactionLeader - EDCT\EDA test may lead to crash in battle death related succession
PostBattle - conditions underneath require an intermittent 'wait' command, will not work in EDA\EDCT triggersI_NumberOfSettlements
I_SettlementOwner
I_CharacterExists
I_WorldWideAncillaryExists
I_CharacterTypeNearTile
I_FactionLeader...
- Condition -
GeneralWithAncKilled
building_present_min_level - EDB only, leads to crash if used in recruit_pool line
PreBattle
FactionwideAncillaryExists - works but not in EDCT.
FatherAnc - http://www.twcenter.net/forums/showt...1#post14166711
HighestAttAdjacentChar - does not include other generals (named characters) in adjacent armies, only their commanders.
HighestAttSharedChar - only for characters of another faction: http://www.twcenter.net/forums/showt...7#post14449777
I_CharacterTypeNearTile - I have had some problems with "not", for admirals at least.
I_FactionLeaderAttribute - PostBattle: if leader was killed in that battle then looks like it is still treating him as leader, i.e. this is not testing the new leader.
CeasedFactionLeader - PostBattle: if leader was killed in that battle then looks like it is still treating him as leader, i.e. this is not testing the new leader.
I_IsTriggerTrue - never understood what this is for but it doesn't appear to work in script.
I_NumberOfHeirs - seems to be a count of ALL named characters (family or otherwise) including the leader. Teutonic trees too. Does NOT count off map characters.
I_NumberUnitsInSettlement - cannot use types that have spaces.
I_WorldwideAncillaryExists - works but not in EDCT.
PercentageUnitAttribute - creates error message in log (needs a living character with an army) but works
PercentageUnitCategory - creates error message in log (needs a living character with an army) but works
IsGeneral - creates error message in log (needs a living character) but works
IsRegionOneOf - accepts ID or data name in script, only ID in ancillary and and trait triggers
I_UnitStatus: "idling" works only after a first action of the unit. Apparently, at the beginning of a battle, the status is considered as undetermined.
I_IsUnitIdle: same limitation
I_IsUnitMoveFastSet: works only once per unit, or to be clearer: once the unit is flagged to move fast, it's definitive.
I_CharacterTypeNearTile: when testing next to a non faction settlement a distance of 2 (instead of 1) has to be used.
NumEnemiesInBattle - crashes when reinforcements are involved. Or maybe not?
GeneralNumKillsInBattle: Works, but it only counts the number of kills the general himself gains, not how many kills his BG unit gains. More details.
I_ConflictType: works so well in battle that even "I_ConflictType banana" is regarded as true (and incidentally all the real parameters ("normal" excepted) whatever the situation)
New tests appear to suggest that the command does work as intended, with the above being addressed as well.
BattleArmyTired: may ignore the connected conditions...can also fire with PostBattle
I_SoundPlaying - will return 'true' only while sound is playing, eg when testing in the monitor that triggers the sound or using monitor_conditions. The latter needs terminating (terminate_monitor, stop_sound_event) to avoid multiple firing. See here.
- Command -
play_video
jericho
game_quit
e_select_character - If is general (NC) and in another character's army then doesn't work: seems that it is the commander who is selected instead (e.g. "give_ancillary this ..." gave it to the commander). If in settlement and other generals are present then it doesn't seem to work at all, on anybody in there, regardless of being governor (e.g. "give_ancillary this ..." did not give it to the governor, the intended character or anybody else).
unit_toggle_task_interrupt - The parameter "melee" works ("melee off": only the engaged archers change their weapon, not the whole unit, and the other ones can fire if a target is manualy designated), "fire_at_will" too (regardless of the IG mode though, and by taking precedence over it), but i have never been able to make work "skirmish", "rout", "berserk", and "infighting".
unit_group_order_attack_group : broken for both sides, player and AI
unit_order_attack_closest_unit - The command works, but there is a subtlety not explained in its description: the search arc in degrees is multiplied by two. For example, by using 15 as parameter, you will in fact have an effective arc of 30 degrees (15 degrees on each side of the directional axis as i understand it). Hence, if one uses 360, the command won't work, but with 180 the affected unit will effectively attack the closest unit around.
give_everything_to_faction - works but CTD if TO faction is catholic and FROM faction owns current crusade target.
reduce_unit_strength - hangs game.
engage_armies - may causes save game failure (unconfirmed)
process_rq - only works in script although it needs to be prefixed with console_command
damage_wall: The parameter "gate" is partly broken: the gatehouse is not destroyed, but a section of the wall is damaged as expected.
camera_shake - doesn't work: script breaks with "don't recognize this token" error.
spawn_army & spawn_character - don't work in advisor scripts: "not a valid tile" log error no matter what coordinates are used.
set_option unknown parameter settings? Only for console?
spawn_battle seems to be broken. http://www.twcenter.net/forums/showt...4-Spawn_battle
disable_entire_ui & disable_ui - does not work on scrolls or their elements (buttons etc.).
unit_unset_morale
unit_group_unset_morale
unit_toggle_task_interrupt: The parameter "rout" provokes CTDs by conflicting with the morale update when the general is killed in action.
remove_ancillary (console) - removes ancillary's effects even if the ancillary isn't present.
stop_sound_event - does not accept event id, uses tag instead. See at the bottom here.
-
Re: List of non functional script terms (events, conditions and commands)
The engage_armies command destroys the savegames. I advise not use it in scripts, because it will cause CTD when loading the game.
Code:
Identifier: engage_armies
Parameters: attacking general, defending general
Description: Instruct the attacking general to attack the defending general
Sample use: engage_armies Gaius Julius, Epiroderix
Class: ENGAGE_ARMIES
-
Re: List of non functional script terms (events, conditions and commands)
We had that script in 1648, triggered at a certain round - always firing for every player. While there were error messages of crashes and save game problems the game still continued until far later stages. The save game issues (bloating of file beyond 50MB) were caused by continous killing and re-spawning of the fort names (250 per turn).
Did you manage to confirm this?
-
Re: List of non functional script terms (events, conditions and commands)
Happened to me when I added this command in a mod. I looked for if it was happening to other users and found this. I didn't return use that command.
http://www.twcenter.net/forums/showt...Crash!!!!!HELP
-
Re: List of non functional script terms (events, conditions and commands)
The difference between our cases (mine is working) seems to be because my script had the engagement between two unplayable factions. The problem seems to lie within the actual battle triggered by this, not the command itself.
Certainly something to keep in mind.
Code:
if I_TurnNumber = 100
campaign_wait 1
inhibit_camera_input true
historic_event 1626_05
reveal_tile 351, 92
snap_strat_camera 342, 92
zoom_strat_camera 0.4
inhibit_camera_input false
spawn_army
faction spain
character Stefan Fadinger, named character, age 41, x 351, y 94, label fader1, direction SE
traits GoodCommander 2 , Intelligent 1 , ReligionStarter 1
unit Reformatoren exp 0 armour 0 weapon_lvl 0
unit Badner exp 0 armour 0 weapon_lvl 0
unit Badner exp 0 armour 0 weapon_lvl 0
unit Badner exp 0 armour 0 weapon_lvl 0
unit Badner exp 0 armour 0 weapon_lvl 0
unit Fanatiker exp 0 armour 0 weapon_lvl 0
unit Fanatiker exp 0 armour 0 weapon_lvl 0
unit Fanatiker exp 0 armour 0 weapon_lvl 0
unit Fanatiker exp 0 armour 0 weapon_lvl 0
unit Eiferer exp 0 armour 0 weapon_lvl 0
unit Eiferer exp 0 armour 0 weapon_lvl 0
unit Eiferer exp 0 armour 0 weapon_lvl 0
unit Eiferer exp 0 armour 0 weapon_lvl 0
unit Musketiere exp 0 armour 0 weapon_lvl 0
unit Musketiere exp 0 armour 0 weapon_lvl 0
end
reveal_tile 351, 92
spawn_army
faction portugal
character Adam von_Herberstorff, named character, age 41, x 352, y 92, label herber1, direction NW
traits GoodCommander 2 , Intelligent 1 , ReligionStarter 1
unit 1648 Bodyguard exp 0 armour 0 weapon_lvl 0
unit Badner exp 0 armour 0 weapon_lvl 0
unit Badner exp 0 armour 0 weapon_lvl 0
unit Pikeniere exp 0 armour 0 weapon_lvl 0
unit Musketiere exp 0 armour 0 weapon_lvl 0
unit Italiener exp 0 armour 0 weapon_lvl 0
unit Kuerassiere exp 0 armour 0 weapon_lvl 0
end
reveal_tile 352, 92
engage_armies fader1, herber1
end_if
-
Re: List of non functional script terms (events, conditions and commands)
Good idea for a thread Gig. Some notes I've made along the way... not sure they're all broken all of the time or only in some circumstances. Some are just oddities, not broken as such; not sure if you want to include those.
Events:
GovernorBuildingDestroyed
Conditions:
FactionwideAncillaryExists - works but not in EDCT.
FatherAnc - http://www.twcenter.net/forums/showthread.php?670453
HighestAttAdjacentChar - does not include other generals (named characters) in adjacent armies, only their commanders.
HighestAttSharedChar - only for characters of another faction: http://www.twcenter.net/forums/showt...7#post14449777
I_CharacterTypeNearTile - I have had some problems with "not", for admirals at least.
I_FactionLeaderAttribute - PostBattle: if leader was killed in that battle then looks like it is still treating him as leader, i.e. this is not testing the new leader. CeasedFactionLeader: ditto.
I_IsTriggerTrue - never understood what this is for but it doesn't appear to work in script.
I_NumberOfHeirs - seems to be a count of ALL named characters (family or otherwise) including the leader. Tuetonic trees too. Does NOT count off map characters.
I_NumberUnitsInSettlement - cannot use types that have spaces.
I_WorldwideAncillaryExists - works but not in EDCT.
Commands:
e_select_character - If is general (NC) and in another character's army then doesn't work: seems that it is the commander who is selected instead (e.g. "give_ancillary this ..." gave it to the commander). If in settlement and other generals are present then it doesn't seem to work at all, on anybody in there, regardless of being governor (e.g. "give_ancillary this ..." did not give it to the governor, the intended character or anybody else).
game_quit
give_everything_to_faction - works but CTD if TO faction is catholic and FROM faction owns current crusade target.
play_video
reduce_unit_strength - hangs game.
-
Re: List of non functional script terms (events, conditions and commands)
Thanks for the input - I was looking for stuff that doesn't work 'as advertised' or has some quirks (forgot the PUA stuff actually), so your collection is most welcome.
Your info has been added to the OP, I am going to move this thread later to the tutorial section as resource.
Miguel's info is added as well
-
Re: List of non functional script terms (events, conditions and commands)
Quote:
IsGeneral - creates error message in log (needs a living character) but works
I don't recall ever seeing a log error for that before. Are you sure PUA wasn't the culprit?
-
Re: List of non functional script terms (events, conditions and commands)
I took it from my post in the PUA discussion - but I can't recall having had this error in recent times. Let me test it.
Edit: nope, can't confirm it.
-
Re: List of non functional script terms (events, conditions and commands)
I've been testing the "engage_armies" command in BareGeomod and it works correctly. But in Mod of other user causes a CTD when loading a saved game and if I remove the script works correctly. I don't understand, What circumstances can determine the functioning of this command?
Same code adapted to BareGeomod:
Code:
monitor_event FactionTurnEnd FactionIsLocal
and not I_LocalFaction france
and not I_LocalFaction venice
engage_armies fra1, ven1
terminate_monitor
end_monitor
monitor_event FactionTurnStart FactionType france
and I_LocalFaction france
engage_armies fra1, ven1
terminate_monitor
end_monitor
monitor_event FactionTurnStart FactionType venice
and I_LocalFaction venice
engage_armies fra1, ven1
terminate_monitor
end_monitor
-
Re: List of non functional script terms (events, conditions and commands)
I am getting reminded of an issue that was related to saving and having a battle. Something to do with saving shortly before the battle which corrupted the save - I'll try to trace the discussion. Or was it the use of quick save during the pre-battle decision window?
-
Re: List of non functional script terms (events, conditions and commands)
The script works correctly, but then the saved game no longer serves. No need to play the battle, nor be the local faction the attacker, etc. Simply by playing 2 or 3 turns with another faction, save it, and then this savegame file already unable to load.
However, in BareGeomod, works well with all combinations. I think the error can be the trigger of several factors. If in BareGeomod and in 1648 Mod works, I think it's better remove it from the list, or simply notify that check the "savegame".
EDIT: Now, I've tried what you mentioned. And yes it causes CTD when loading the saved game at this point.
-
Re: List of non functional script terms (events, conditions and commands)
I have updated the entry to this: engage_armies - may causes save game failure (unconfirmed)
-
Re: List of non functional script terms (events, conditions and commands)
Ok. At the moment, in Hispania in the Middle Ages Mod and in Bellum Crucis 7, the command works correctly. Only corrupts the "savegame", if saves the game before starting the battle, with the pre-battle menu.
-
Re: List of non functional script terms (events, conditions and commands)
Quote:
Originally Posted by
Miguel_80
Ok. At the moment, in Hispania in the Middle Ages Mod and in Bellum Crucis 7, the command works correctly.
Great to hear.
Quote:
Originally Posted by
Miguel_80
Only corrupts the "savegame", if saves the game before starting the battle, with the pre-battle menu.
This is certainly not related to the script command (I tried myself and can confirm your above findings), so I think I am going to take the command completely off the list.
I am going to put my favorite IsRegionOneOf on the list :tongue:
-
Re: List of non functional script terms (events, conditions and commands)
One more command - process_rq doesn't work.
-
Re: List of non functional script terms (events, conditions and commands)
That's a console only command afaik - process_rq [settlement name] and will only process the first item in the queue. How did you test it?
-
Re: List of non functional script terms (events, conditions and commands)
It doesn't work in the console, like a bunch of other console_command ones don't. Does it work from script is the question. Never tried it myself.
EDIT: just tried. It does work from script, e.g.
console_command process_rq London
It only processes the ones that are in the 'available' slots, not ones that are queued up beyond those for future-turn recruitment.
-
Re: List of non functional script terms (events, conditions and commands)
That's what I meant - used in the console, in-game, process_rq doesn't work. Interesting that it does work in the script.
-
Re: List of non functional script terms (events, conditions and commands)
PlugInCompleted and GovernorPlugInCompleted events don't work. Plugins can be built directly via descr_strat and indirectly via campaign_script but neither method triggers those events.
To be fair I don't think that the demons are suggesting that they should, rather that these events are in response to the action of constructing a plugin - an action that the game doesn't provide.