Page 3 of 8 FirstFirst 12345678 LastLast
Results 41 to 60 of 150

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

  1. #41

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

    About the fact the trait is removed only in friendly territory (without EndedInEnemyZOC to acquire it):

    The visual effect of the devastation appears only at the start of a turn, so it seems reasonable to think that GeneralDevastesTile is more or less synchronized. So, maybe the trait is lost with CharacterTurnEnd and acquired once with GeneralDevastatesTile when the character is still in enemy territory, and so potentialy still flagged devastating even after a move (but i am not sure of this, and i cannot test it curently...).

    In any case, i would never have thought than someone named Genghis Skahn would have problems with devastation...

  2. #42

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

    The visual effect of the devastation appears only at the start of a turn, so it seems reasonable to think that GeneralDevastesTile is more or less synchronized. So, maybe the trait is lost with CharacterTurnEnd and acquired once with GeneralDevastatesTile when the character is still in enemy territory, and so potentialy still flagged devastating even after a move (but i am not sure of this, and i cannot test it curently...).

    In any case, i would never have thought than someone named Genghis Skahn would have problems with devastation...
    A few different letters in your name can make a world of difference in one's warfare abilities

    Hmm I would be inclined to believe that--only doesn't tile devastation require you to be stationary??? I say this, because this is how my tests go:

    I move character A into territory B, then end my turn. Next turn, said char doesn't have the raid trait. I end my turn again WITHOUT moving, I then devastate a tile and get the raid trait. Then, for the rest of the time I'm in the territory, whether devastating or not(I've moved from time to time during a 20 turn test), I keep that raid trait. If your hypothesis was true, wouldn't I automatically be losing this trait as soon as I make a move in the province(I know for a fact that I kept said trait for 20 turns)? Since once you make a single move, you stop your character from devastating a tile, and then, according to your theory, the characterturnend trigger would kick in and remove my trait, yes??

    Anyhow, HOPEFULLY my triggers should be totally functional and spawn either the GoodRaider/BadRaider traits(the raid trait is an effectless precursor)--but if not, I can always just remove that one suspect trigger
    Last edited by Genghis Skahn; December 18, 2016 at 03:48 PM.

  3. #43
    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,095
    Blog Entries
    35

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

    If you do not move in enemy territory for a full turn then the devastate trigger AND the removal trigger fire, resulting in a cancellation of each other. Which means the removal can only happen in neutral territory as you experience (no devastation to offset the removal).

    Removing the MP condition in the removal trigger will result in loosing the raid trait when on the move and even in enemy territory.
    Last edited by Gigantus; December 18, 2016 at 07:22 PM.










  4. #44

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

    Seems like you guys were right about this trigger(removing the raid trait and then it being re-added)--thankfully, the "InEnemyLands" condition is a much better substitute for what I want

  5. #45
    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,095
    Blog Entries
    35

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

    It would certainly do what you intended, eg removal of the trait only when back from enemy grounds. Do test if 'not' fires only in your own regions or also in neutral\allied regions. For that matter I think the sea is regarded as neutral region - important for sea based raids I guess.










  6. #46

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

    only doesn't tile devastation require you to be stationary???
    Indeed, it has not changed as far as i know . My phrase was not necessarily clear, contrary to the Gigantus' explaination.

  7. #47

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

    After verification, GeneralDevastatesTile fires just after the FactionTurn End of the slave faction, and for all factions. I expected to be wrong when i have written that the devastation was synchronised with the visual effect. But strangely enough, the engine has no problems with the fact of checking in the same time the remaining MP of all the generals in enemy land, regardless of their faction...

    Once the devastation begins, GeneralDevastatesTile fires each turn.

  8. #48
    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,095
    Blog Entries
    35

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

    Devastating is an event that takes place at a fixed time whereas remaining MP is a condition that gets 'carried forward'. My take is that the MP condition gets established at CharacterTurnEnd (MP gets checked then in most cases) and remains unchanged until the next CharacterTurnStart event.










  9. #49

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

    Yes, you are certainly right. Viewed in isolation, it seems strange to memorize the remaining MP, but the devastation change the appearance of the tile, in the same way as the winter. GeneralDevastatesTile is probably delayed to match with the season change and the update of the map.

  10. #50
    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,095
    Blog Entries
    35

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

    It appeared strange to me that devastation would occur at the utter end of a turn instead of the end of a faction turn - after all the seasonal change of textures is after the end of the slave faction's turn, so a summer texture for devastation would turn into winter texture anyhow. Setting up 'log always' entries for devastation as well as faction preturn start and faction end however confirms it:

    Line 56318: 08:46:49.938 [game.script] [always] start of papal_states turn
    Line 56337: 08:46:49.948 [game.script] [always] end of papal_states turn
    Line 56339: 08:46:49.948 [game.script] [always] start of aztecs turn
    Line 56392: 08:46:49.959 [game.script] [always] end of aztecs turn
    Line 56394: 08:46:49.959 [game.script] [always] start of slave turn
    Line 56514: 08:46:50.092 [game.script] [always] end of slave turn
    Line 56700: 08:46:50.111 [game.script] [always] devastation by england
    Line 58374: 08:46:50.271 [game.script] [always] start of england turn
    Line 58540: 08:46:53.122 [game.script] [always] end of england turn
    Line 58542: 08:46:53.122 [game.script] [always] start of france turn
    Line 58695: 08:46:53.266 [game.script] [always] end of france turn
    Line 58697: 08:46:53.267 [game.script] [always] start of hre turn
    Line 58779: 08:46:53.299 [game.script] [always] end of hre turn

    I posted the finding in this thread as well (where we should continue this discussion )
    Last edited by Gigantus; December 22, 2016 at 09:36 PM.










  11. #51

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

    PreBattle : doesn't work (script and edct)

  12. #52
    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,095
    Blog Entries
    35

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

    How did you test it?










  13. #53
    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)

    Apparently so. I thought it only worked in battle - not autoresolve - but even that didn't work.

  14. #54
    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,095
    Blog Entries
    35

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

    Into the list then










  15. #55

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

    Can we sticky this thread please

  16. #56
    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,095
    Blog Entries
    35

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

    Here is one for the 'weird' column: we were using I_CharacterTypeNearTile to test for the presence next to a town that we also tested with I_SettlementUnderSiege. It simply didn't want to fire with the distance set to 1 (which is the logical choice when using the city's co-ordinates). Just for giggles we set the distance to 2 and it worked. It also works if the character is outside the ZoC of the settlement with an actual distance of 2.

    When using the distance check with the faction's settlements it fired with 1 when the character was next to it.

    Which leads me to believe that it has something to do with the ZoC.










  17. #57
    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)

    Code:
    faction, character type, distance in squares, x, z
    It's a distance in units of square (tile) size, not a count of squares. If a character is anything other than on a direct line north-south or east-west of the x,z origin then it doesn't work as one might expect, as the distance is actually greater than what you think it is.



    The grid = tiles, red = origin, pink = adjacent tile to the east, green = adjacent tile to the north-east.

    The pink dot is 1 tile distances away from the origin, so using 1 as the distance works for a character standing there. So too for north, west or south.

    The green dot is ~1.4 tile distances away (square root of 2 ... trigonometry FTW!). Therefore a distance of 1 fails but a distance of 2 works, as 1.4 <= 2. The picture demonstrates that the green dot doesn't lie within the 1-distance-crircle, so will not give a true answer for distance=1.

    Therefore, to include characters who are diagonally adjacent you must use 2, not 1. But this then means that a character who is 2 tiles away to the east will also give a true answer, when obviously they're not adjacent. In short: I_CharacterTypeNearTile can't be used for testing adjacency, not completely.

    I'm pretty sure that decimals can't be used for the distance. e.g. 1.5 would solve the problem: only adjacent characters would give a true answer, diagonal or otherwise. (Worth a test to see if decimals work. My guess is that it either fails with an error or just trims off the decimal value, giving "1".)
    Last edited by Withwnar; April 13, 2017 at 05:32 AM.

  18. #58
    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,095
    Blog Entries
    35

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

    Thanks for that explanation - still weird, though










  19. #59
    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 Withwnar View Post
    I'm pretty sure that decimals can't be used for the distance.
    Nope.

    A new tutorial on the subject: http://www.twcenter.net/forums/showthread.php?751728

  20. #60
    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,095
    Blog Entries
    35

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

    .
    NumEnemiesInBattle


    This condition has been suspected to cause a crash when re-enforcement is involved (it appears to work otherwise). Can someone confirm this?
    Here is another link to a discussion with Mak at the org.
    Last edited by Gigantus; April 28, 2017 at 11:38 PM.










Page 3 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
  •