Results 1 to 6 of 6

Thread: handover

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Libertus
    Join Date
    May 2006
    Location
    Croatia
    Posts
    85

    Default handover

    can anyone please explain what do 6 and 15 stand for, or in other worth, how do these two parameters define the handover:

    scripting.game_interface:grant_faction_handover("britain", "thirteen_colonies", 6, 15, context)

    tried different numbers but got some weird results.

  2. #2

    Default Re: handover

    isnt it variation in turns before handover happens? 6-15 turns after start..

  3. #3
    Libertus
    Join Date
    May 2006
    Location
    Croatia
    Posts
    85

    Default Re: handover

    Quote Originally Posted by JaM View Post
    isnt it variation in turns before handover happens? 6-15 turns after start..
    That was my first guess, but putting 2,2, instead of 6,15, triggered the handover in turn 4...

    here's a few more examples:

    2,2, handover in turn 4
    3,4 handover in turn 6
    4,6 handover in turn 6

    (Had more examples written down but can't find them right now... )

    This doesn't make any sense to me
    Last edited by tamabald; August 21, 2013 at 06:08 PM.

  4. #4
    Libertus
    Join Date
    May 2006
    Location
    Croatia
    Posts
    85

    Default Re: handover

    Anyone, please? Some help would be appreciated.

  5. #5

    Default Re: handover

    They're documented as the first and last possible turns for the handovers. If you are loading up a game with an edited scripting.lua you might get weird results; it's possible the values would become relevant to when the script was first implemented, rather than turn 0.
    My Tools, Tutorials and Resources

    Was running out of space, so see the full list here!

    Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.- Josh Billings
    The creatures outside looked from pig to man, and from man to pig, and from pig to man again; but already it was impossible to say which was which.- George Orwell

  6. #6
    Libertus
    Join Date
    May 2006
    Location
    Croatia
    Posts
    85

    Default Re: handover

    Quote Originally Posted by T.C. View Post
    it's possible the values would become relevant to when the script was first implemented, rather than turn 0.
    I wasn't loading games, I always tested by starting a new campaign (that's why I was playing with smaller numbers, so I wouldnt have to wait too long).
    But this answer of yours pointed me to something interesting. If I assume that the game doesn't start counting till turn 2 then:

    0=2

    2,2, = 4,4, --- handover in turn 4
    3,4 = 5,6 ----- handover in turn 6
    4,6 = 6,8, ----- handover in turn 6

    this makes sense. Buty why always counting from turn 2? Damned if I knew.

    This is how my OnFactionTurnStart in scripting.lua looks like (and this is the only thing in the file that I changed)

    local function OnFactionTurnStart(context)
    if conditions.TurnNumber(context) == 5 then
    scripting.game_interface:enable_auto_generated_missions(true)
    end
    if conditions.FactionName("britain", context) then
    scripting.game_interface:grant_faction_handover("britain", "thirteen_colonies", 2, 2, context)
    end
    if conditions.FactionName("spain", context) then
    scripting.game_interface:grant_faction_handover("spain", "new_spain", 2, 2, context)
    end
    end

Posting Permissions

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