Page 5 of 8 FirstFirst 12345678 LastLast
Results 81 to 100 of 150

Thread: List of non or mal functioning script terms (events, conditions and commands)

  1. #81

    Default Re: List of non functional script terms (events, conditions and commands)

    I tried CharacterPanelOpen on ai characters and it didn't work even once. Thanks for the link, instructive as ever. I guess I can forget to directly triggering events with not local ui, but I have other ways to solve my issues, this one was a little better in gameplay but what the hell.

  2. #82

    Default Re: List of non functional script terms (events, conditions and commands)

    Forget about the non local, it's a non-productive trial... better the alternatives


  3. #83

    Default Re: List of non functional script terms (events, conditions and commands)

    CharacterPanelOpen works when you right click on the portrait of an enemy general, and when you double click on an enemy agent, but only the first time in this last case (if i remember correctly). Changing of character is the only way (i know) to make it fire again for the agents, but right clicking on the general's portrait works each time.

  4. #84

    Default Re: List of non functional script terms (events, conditions and commands)

    PercentageUnitAttribute - creates error message in log (needs a living character with an army) but works
    One thing I noted recently, this condition doesn't give any error message if it is used in a battle event. I tried it with PreBattleWithdrawal and PostBattle, and it fires without creating false error messages. I also tried with PreBattle but this event doesn't work in EDCT and EDA either, it is just ignored.

  5. #85
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,096
    Blog Entries
    35

    Default Re: List of non functional script terms (events, conditions and commands)

    Could you open a thread in the discussion forum and post the triggers you used to test? It's curious that the event would be ignored if withdrawal is fine.










  6. #86
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: List of non functional script terms (events, conditions and commands)

    PercentageUnitAttribute - creates error message in log (needs a living character with an army) but works
    That's true but a bit misleading I think. It only works in some cases, in those that it doesn't it creates the error.

    My experience is that the error only occurs when used on a character who can lead an army but currently does not. e.g. A named character who is in a settlement, ship, another's army, etc. And when the error occurs the condition is ignored (thus effectively "true") which means that the condition will be "true" for anybody inside anything else regardless of what units are with him there.

    http://www.twcenter.net/forums/showt...ving-character

    For a named character outside and in command of an army (or with no army) it works and without errors. It also works for generals (captains), always, because by definition a captain is outside and in command*. I haven't tried admirals though I expect that it would always work, but the "units" in question would be ships in the fleet, not the army on board.

    * An exception there would be siege battles. If the defenders have no named character present then a captain will appear for the battle. I'm sure that the condition would still work on him, just saying that "outside" is not strictly true as a definition.

    PercentageUnitCategory - not sure I've ever used it but I expect that the same applies.

  7. #87

    Default Re: List of non functional script terms (events, conditions and commands)

    Quote Originally Posted by Withwnar View Post
    That's true but a bit misleading I think. It only works in some cases, in those that it doesn't it creates the error.

    My experience is that the error only occurs when used on a character who can lead an army but currently does not. e.g. A named character who is in a settlement, ship, another's army, etc. And when the error occurs the condition is ignored (thus effectively "true") which means that the condition will be "true" for anybody inside anything else regardless of what units are with him there.
    Nope, the triggers I posted in the post battle thread work only on the leader of the army, other generals in it are not affected and there is no error in the log. Though it might come from the NumFriendsInBattle but the docudemon don't say that this condition is specific to a current army leader. More likely, the pre and post battle events work only on the leader, so there is no error in that case?

    On the other hand, Percentage attribute work in EDCT even when it create a error, for a Character turn start or such. But the only available conditions I needed seem only good for battle related things so I didn't test too much.

  8. #88
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: List of non functional script terms (events, conditions and commands)

    Quote Originally Posted by selv View Post
    More likely, the pre and post battle events work only on the leader, so there is no error in that case?
    PostBattle I know only fires on the commanders of the two armies. I don't know about pre-battle ones but it makes sense.

    Quote Originally Posted by selv View Post
    Percentage attribute work in EDCT even when it create a error
    Did it also work on characters when it shouldn't have? Evaluating as true when the character didn't have such a unit with him?

  9. #89

    Default Re: List of non functional script terms (events, conditions and commands)

    Quote Originally Posted by Withwnar View Post
    Did it also work on characters when it shouldn't have? Evaluating as true when the character didn't have such a unit with him?
    I tried.

    Code:
    ;------------------------------------------
    Trigger SEIllegitCommand5
        WhenToTest CharacterTurnEnd
    
    
        Condition FactionCultureType southern_european
    	and CharacterIsLocal
    	and PercentageUnitAttribute can_withdraw > 0
    ;;	and NumFriendsInBattle >= 600
    ;;	and NumFriendsInBattle < 1000
        and not EndedInSettlement
    	and Trait LegalCommand < 1
    	and Trait IllegalCommand < 1
    	and not HasAncType trib
        and not HasAncType chq
        and not HasAncType che
        and not HasAncType chpr
        and not HasAncType chco
    	and not HasAncType chco2
    	and not HasAncType chce
    	and not HasAncType chce2
    	and not HasAncType chd
    	and not HasAncType imp
    
    
        Affects IllegalCommand  3  Chance  100
    two eligible fm to the conditions are in a army, and while error message are created, only the leader get the trait. I think all you need is to not use the IsGeneral when targetting only the leader, though in that case, I have 7 error message when only three generals were eligible to all the conditions... But every unit can withdraw, so maybe it tried the trigger on everyone even when they were inside a settlement or had some of the CH ancillaries?

    Gigantus, I think I got why you wanted me to open a thread but I wasn"t asking a question this time, only saying that PercentageUnitAttribute don't always give errors, and that the PreBattle event don't work not only in the script but also in EDCT and EDA.

  10. #90
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: List of non functional script terms (events, conditions and commands)

    Quote Originally Posted by selv View Post
    maybe it tried the trigger on everyone even when they were inside a settlement or had some of the CH ancillaries?
    Yes. This event always fires on every character currently in the game, therefore this trigger always triggers on every character. Conditions only control whether the Affects line will be reached/executed and also whether any conditions below it will be tested/reached - if a condition ever returns "false" then the game doesn't bother testing the ones below it.

    So, in your trigger, it will be testing PercentageUnitAttribute on every character that is southern_european and local. Their in-settlement status and anc/trait presence is irrelevant at that point because those conditions are further down the list.

    Anyway, I gave it a simple test myself and yes PercentageUnitAttribute is broken (doesn't work + log error) for characters inside things but I was wrong about it being ignored (thus "true") when that happens. It actually breaks the whole trigger, preventing it from reaching the Affects line. My post in that thread I linked earlier found the same thing - I wish that I had read it myself before now! It also says that a campaign_script monitor will break permanently if this error occurs within it - that's a nasty bug.

  11. #91

    Default Re: List of non functional script terms (events, conditions and commands)

    Well at least it seem safe with PreBattleWithdrawal and PostBattle in EDCT and EDA, no error message, probably because the condition is tested only on concerned generals, and the other conditions get read as well since a CH ancillary owner don't get the trait, again without errors. And the traits are given as intended, to fm armies's leaders only.

    Using it in the campaign_script don't seem to be worth the risk however.

  12. #92
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: List of non functional script terms (events, conditions and commands)

    Another one:

    Command: disable_entire_ui & disable_ui
    Does not work on scrolls or their elements (buttons etc.).

    Seems such things are not regarded as "UI", not for these commands at least. It explains why disabling the pre-battle Fight/Auto-resolve buttons never worked.

    Another example: disable_entire_ui does not prevent you from interacting with scrolls that are already open or minimised, e.g. all of the turn start messages can be opened, closed and button-clicked.

    "UI" apparently means only the bottom section of the screen.

  13. #93
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,096
    Blog Entries
    35

    Default Re: List of non functional script terms (events, conditions and commands)

    Yup, UI = bottom stuff. For the pre-battle issue you need to disable the cursor and then script the clicking:

    Code:
        ;--- No Retreat ---
        monitor_event ScrollOpened ScrollOpened prebattle_scroll
            if I_EventCounter Fight_Battle > 0        ; this counter needs to be set in the previous monitor
                campaign_wait 1
                disable_cursor
                ui_flash_start prebattle_fight_button
                campaign_wait 3
                select_ui_element prebattle_fight_button
                simulate_mouse_click lclick_down
                simulate_mouse_click lclick_up
            end_if
            enable_cursor
            set_event_counter Fight_Battle 0
        end_monitor
    For other disabling I use disable_entire_ui, eg for 'cut scenes' during the campaign:

    Code:
                        disable_save      ; start of tour
                        disable_entire_ui
                        disable_movie_view
                        select_ui_element faction_button  ;hide other scrolls by showing our own
                        simulate_mouse_click lclick_up
                        hide_ui
                        disable_cursor
                        disable_shortcuts true
                        snap_strat_camera 411, 200
                        zoom_strat_camera 0.5
                        reveal_tile 407, 196    ; Antiocheia-Margiane
                        reveal_tile 409, 197    ; Army
                        campaign_wait 2
                        reveal_tile 410, 198
                        campaign_wait 0.2
                        reveal_tile 411, 199
                        campaign_wait 0.2
                        reveal_tile 412, 200
                        campaign_wait 0.2
                        reveal_tile 413, 201
                        campaign_wait 0.2
                        reveal_tile 414, 202
                        campaign_wait 0.2
                        reveal_tile 415, 203
                        campaign_wait 0.2
                        reveal_tile 416, 204
                        campaign_wait 0.2
                        move sel_exped1, 416, 204
                        campaign_wait 3
                        enable_entire_ui
                        enable_save
                        show_ui
                        enable_cursor
                        disable_shortcuts false    ; end of tour
    Last edited by Gigantus; May 14, 2018 at 08:23 AM.










  14. #94
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: List of non functional script terms (events, conditions and commands)

    console_command remove_ancillary (including manual "remove_ancillary" from the console)

    If the character does not have the anc then its effects are still removed from him as though he did have it.

    e.g. Anc "xxx" gives +2 Command, character "Bob" has 3 Command but not the anc: after "console_command remove_ancillary Bob xxx" he has 1 Command.

    remove_trait does not do this.
    Last edited by Withwnar; May 27, 2018 at 02:38 AM.

  15. #95

    Default Re: List of non functional script terms (events, conditions and commands)

    I always use the HasAncType condition with uniques anctypes in scripts to remove ancillaries, it seem the logical thing to do, so never noticed that. It could be useful though, using not HasAncType, then the command to downgrade a character attributes without dreaming up yet a other trait or ancillary...

  16. #96

    Default Re: List of non functional script terms (events, conditions and commands)

    @Gigantus, could you add an entry for trait triggers using WhenToTest BecomesFactionLeader? Or is there perhaps a better suited summary post about traits and ancillaries somewhere?

    Edit: Huh, mentions don't work with a @ like on the Org apparently. I'll have to ping him there then.
    Last edited by bovi; September 06, 2018 at 08:26 AM.

    Having problems getting EB2 to run? Try these solutions.
    ================
    I do NOT answer PM requests for help with EB. Ask in a new help thread in the tech help forum.
    ================
    I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image. - Stephen Hawking

  17. #97

    Default Re: List of non functional script terms (events, conditions and commands)

    I_BattleSettlementWallsBreached : doesn't work for a breach done before the current battle

    CharacterNearWitch & CharacterNearHeretic : Rectification, they don't fire around CharacterTurnEnd, but as follows:

    PreFactionTurnStart > CharacterNearHeretic > CharacterNearWitch > FactionTurnStart

    (So with a heretic and a witch spawned close to a settlement, they can be used like two extra forms of CharacterTurnEndInSettlement)

  18. #98
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: List of non functional script terms (events, conditions and commands)

    PreFactionTurnStart > CharacterNearHeretic > CharacterNearWitch > FactionTurnStart
    CharacterTurnStart is somewhere between the two bold ones. Do you know if the Heretic/Witch ones fire after or before that one?

  19. #99

    Default Re: List of non functional script terms (events, conditions and commands)

    They fire after CharacterTurnStart. Logically, it should be before any action of the AI characters, but i haven't tested this precise point.

  20. #100

    Default Re: List of non functional script terms (events, conditions and commands)

    CharacterSelected : fires also between GeneralAssaultsGeneral and PreBattlePanelOpen. So since PreBattle is broken, it can be used as a replacement to test the target local characters before a battle. A surprising point is that nevermind whether or not the player is the attacker, the event will fire, even if in the case of an attack by the player, the character is necessarily already selected.

Page 5 of 8 FirstFirst 12345678 LastLast

Tags for this Thread

Posting Permissions

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