Recent content by Caba`drin

  1. Caba`drin

    Resolved beta e1.4.1 Control groups are all mixed together in some siege battle

    I'm seeing this in the non-beta branch e1.4, too. Even with no custom groups, in offensive sieges I participate in, I have 3 mixed groups all acting as infantry. Archers won't even shoot.
  2. Caba`drin

    MOVED: Putting a mod weapon in a later version of said mod

    This topic has been moved to The Forge - Mod Development. https://forums.taleworlds.com/index.php?topic=346795.0
  3. Caba`drin

    Modding Q&A [For Quick Questions and Answers]

    Yes it is seconds.

    More detail:
    Caba`drin said:
    A trigger in mission templates (and in module_triggers for that matter) takes the following form
    First Part: how often the trigger is checked, either in seconds* or as a hard-coded event such as "ti_on_agent_hit"
    Second part: the delay, in seconds*, between reading the conditions block and executing the consequences block. This does not work if you are using a "word"/hard-coded event interval, such as "ti_on_agent_hit"
    Third part: the re-arm delay, in seconds*, between when the consequences block was finished and when the trigger can be checked again. A special re-arm delay "ti_once" is used for triggers that should only complete themselves (have their condition pass and then execute their consequence) once and then never fire again.
    Fourth part: the conditions block, always executed when the trigger is called
    Fifth part: the consequences block, only executed if the conditions block does not fail, and after the delay interval has passed.
    *Note, unlike other numbers in the module system, the 3 intervals/delays of triggers do NOT need to be integers.

    In practice, it looks like this:
    Code:
     (10, 2, 60,
       [
        (eq, 1, 1),
       ],
       [
        (val_add, "$global_variable", 10),
       ]),
    In this instance, the check interval is every 10 seconds, so the trigger will be checked every 10 seconds. The delay interval is 2 seconds, so if the conditions block is true, the consequences block will fire 2 seconds later. The re-arm interval is 60 seconds, so after the conditions block is found to be true, it will be one minute until this trigger can be checked again.

    The conditions block is a simple equality test 1==1, that will always pass, so the consequences block will always fire 2 seconds after the trigger is checked. The consequences block then takes a global variable and increments it by 10.

    Timed Triggers
    Understanding the check interval/delay/re-arm intervals of timed triggers can be tricky so here is an illustration:
    Code:
    (2, 1, 3, [<a condition that sometimes fails, sometimes passes>],
       [
        #some consequences
       ]),

    This trigger, like all timed triggers with a check interval >0, will start to be checked around the first 1 second of the mission:
    Code:
    Second      Event   
    1                Trigger checked; condition fails--apply check interval (+2 seconds)
    3                Trigger checked; condition fails--apply check interval (+2 seconds)
    5                Trigger checked; condition passes--apply consequence delay (+1 second)
    6                Consequence fires and completes--apply check interval (+2); apply re-arm delay (+3)
    11              Trigger checked; condition fails--apply check interval (+2 seconds)
    13              Trigger checked; condition passes--apply consequence delay (+1 second)
    14              Consequence fires and completes--apply check interval (+2); apply re-arm delay (+3)
    19              Trigger checked....
    So, although we have specified a "check interval" of 2 seconds, we see that the trigger is not checked only on even seconds; instead it is checked in seconds 1, 3, 5, 11, 13, 19.

    If one wants a completely "scheduled" trigger, both consequence and re-arm delays cannot be used.

    Two Triggers of the Same Type/Interval
    When there are two triggers of that have the same check interval (be that in seconds, or on an event ti_*) the order they appear in the mission template matters. The trigger that appears first in the template will fire first, followed by the next trigger of the same interval, and so on. That means if you have two triggers that fire ti_on_agent_spawn, the one that appears in the file first will execute before the second one.

    Triggers near the beginning of a Mission
    Logically, the trigger ti_before_mission_start takes place before the scene is set up and before agents are spawned into the scene. Next, spawning takes place before any other triggers fire--ti_on_agent_spawn triggers are the only triggers firing at this point. Next, ti_after_mission_start triggers fire, as well as any triggers with a check interval of 0 (every frame) as the mission timer starts. Event-based triggers will not be called until their ti_* event occurs; other timed triggers begin being called somewhere in the first second of the mission, though after ti_after_mission_start triggers and every frame (check interval 0) triggers.

    If you have triggers that do not need to fire that close to mission start, adding something like
    Code:
    (store_mission_timer_a, reg0),(gt, reg0, <second-to-start-checking>),
    to the conditions block will help ease the CPU load at mission start.

    Neither ti_before_mission_start nor ti_after_mission start need "ti_once" in their re-arm delay as they will only ever fire one time.

    To summarize, at the start of a mission we have:
    ti_before_mission_start
    --Spawning-- (ti_on_agent_spawn)
    --Time Begins--
    ti_after_mission_start & triggers with check intervals of "0" (which fire @ a mission time of approximately 0.2 seconds)
    --Timed Triggers (still within the first 1 second of the mission)
    --Event-based triggers
  4. Caba`drin

    MOVED: Started Own Kingdom, Game Thinks I'm Still Vassal

    This topic has been moved to Prophesy of Pendor [S]. https://forums.taleworlds.com/index.php?topic=346641.0
  5. Caba`drin

    MOVED: Direct x7 on Mac?

    This topic has been moved to Town Watch - Warband Tech Support. https://forums.taleworlds.com/index.php?topic=346349.0
  6. Caba`drin

    MOVED: i cant see some servers my friend see's

    This topic has been moved to Town Watch - Warband Tech Support. https://forums.taleworlds.com/index.php?topic=346222.0
  7. Caba`drin

    Is Companion AI Moddable?

    NeverUseCavalry said:
    When I try to start the game with the provided shortcut, it says I do not have a valid product key.  I put in the product key provided by Steam and it rejects it.

    Apologies for the problems. You could try converting your serial with this: http://www2.taleworlds.com/en/Account/ConvertSerial and using what this Taleworlds site generates.

    I'll also check if there's something that's changed with Steam and WSE compatibility.
  8. Caba`drin

    Is Companion AI Moddable?

    NeverUseCavalry said:
    The problem I had, though, is that when I installed the latest version of PBOD + Diplomacy with WB 1.168, I got a bunch of red error messages all the time while playing.  It didn't seem to impact my game in any way other than the error messages being annoying, but I was afraid down the line it would.  Is it safe to ignore the error messages?
    This is most likely due to not starting the game with the Warband Script Enhancer (WSE) shortcut, but just starting the game normally. You need to use the new shortcut the installer should have created.
  9. Caba`drin

    MOVED: Can't equip sword that I made using Morgh's editor

    This topic has been moved to The Forge - Mod Development. https://forums.taleworlds.com/index.php?topic=345408.0
  10. Caba`drin

    Modding Q&A [For Quick Questions and Answers]

    Well, I mean, you could look at what the script calls...

    It initializes merchants, noble families, relationships between lords and between kingdoms, initial economy/prosperity levels, and simulates a chunk of game history in terms of wars/relationship developments.
    Additionally, any triggers and simple triggers with 0 or very small check intervals will run.
  11. Caba`drin

    Is Companion AI Moddable?

    I believe I've responded to one of your posts before, NeverUseCavalry, but I'm not certain...in any case, this along with many similar (and toggle-able) adjustments are available in PBOD and it's merger with Diplomacy, or their joint implementation in mods like Floris and Silverstag.

    The way this particular script works isn't entirely as you indicate, but largely so. Rather than timing, it checks that the agent (actor/soldier/whatever word you want to use) is currently in combat, and then that it has 3 enemies that are, on average, within 5 meters. If they are in battle and the 3 closest enemies are within 5 meters (on average), a lancer or a spearman or an archer will switch to side-arms melee weapons.

    As all my codes are open source, you'd be free to adjust it to your liking of course.
  12. Caba`drin

    MOVED: Any way to buy Ladies' clothes in Native?

    This topic has been moved to The Warlord's Den - Single Player. https://forums.taleworlds.com/index.php?topic=345385.0
  13. Caba`drin

    MOVED: HELP! Characters not saving and deleting themselves

    This topic has been moved to Town Watch - Warband Tech Support. https://forums.taleworlds.com/index.php?topic=345400.0
  14. Caba`drin

    2016 U.S. Presidential Elections: The Circus Is In Full Swing

    While I can't speak for Mage, my understanding is that part of the frustration around this type of counter-Clinton argument draws from the fact (bah, I wish I could find that article back now) that "I just don't trust her" tends to be tied strongly with her "her-ness". (And, as Mage indicated, similar language has routinely shown up as guise for peoples issues with Obama's race.)

    On a broader level, it goes to the devoid-of-worth horse-race media-frenzy of reporting that gets people thinking about garbage like "he's a guy I would have a beer with", rather than discussing actual, feasible policy alternatives.
Back
Top Bottom