Page 2 of 3 FirstFirst 123 LastLast
Results 21 to 40 of 45

Thread: Fleet_to_army_supply effect bundle?

  1. #21
    Jake Armitage's Avatar Artifex
    Patrician

    Join Date
    Apr 2011
    Location
    apartment 6
    Posts
    4,694

    Default Re: Fleet_to_army_supply effect bundle?

    LogSupply("SupplyCivForChar()","Start army close to Fleet in region for: "..region_name.." Command Queue Index: "..army);
    this I can't say, you should check similar existing lines and try to adapt them EXACTLY

    if not char_is_general_with_navy(naval_char) - this means char is not an admiral
    think it's wrong, just use: if (char_is_general_with_army(context:character()))

    local army = curr_char:cqi() - this won't check if there is a land army nearby, this will just make sure the effects are given to the correct character army << something like: scripting.game_interface:apply_effect_bundle_to_characters_force("TESTUDO_stan_1", army,1); >>
    anyway it's better to use this: local army = context:character():cqi();



    remember to check if on the top of the script there is:
    require "DeI_utility_functions";
    Last edited by Jake Armitage; April 06, 2019 at 12:51 PM.

  2. #22

    Default Re: Fleet_to_army_supply effect bundle?

    Quote Originally Posted by ~Seleukos.I.Nikator~ View Post
    MrTimber,

    It would be actually easier if you paste in the whole code and just redmark those lines you are unsure about.

    Otherwise, the lines you've posted above are out of context so it's pretty hard to say anything.
    My apologies, just found the [CODE] -action

    Quote Originally Posted by Jake Armitage View Post
    LogSupply("SupplyCivForChar()","Start army close to Fleet in region for: "..region_name.." Command Queue Index: "..army);
    this I can't say, you should check similar existing lines and try to adapt them EXACTLY

    if not char_is_general_with_navy(naval_char) - this means char is not an admiral
    think it's wrong, just use: if (char_is_general_with_army(context:character()))

    local army = curr_char:cqi() - this won't check if there is a land army nearby, this will just make sure the effects are given to the correct character army << something like: scripting.game_interface:apply_effect_bundle_to_characters_force("TESTUDO_stan_1", army,1); >>
    anyway it's better to use this: local army = context:character():cqi();



    remember to check if on the top of the script there is:
    require "DeI_utility_functions";
    Spoiler Alert, click show to read: 

    Code:
    ---- Fleet close to army, fleet gets own effect bundle ----
    if context:character():has_military_force() == true
        and (char_is_general_with_navy(context:character())) == true
        and context:character():has_region() == false
        and Unit_Is_In_Army(context:character(), supply_ship_list)
        and context:character():turns_at_sea()  <= 8
        and context:character():faction():has_food_shortage() == false  
            then local char_list = context:character():faction():character_list()
            for l = 0, char_list:num_items() - 1 do
              local curr_char = char_list:item_at(l)
              local force = curr_char:cqi() 
                if char_is_general_with_army(curr_char)
                  and curr_char:cqi() ~= context:character():cqi() 
                  and distance_2D(curr_char:logical_position_x(), curr_char:logical_position_y(), x, y) < supply_values_table["radius_fleet"] 
                  and not SupplyNearEnemyFleet(curr_char:logical_position_x(), curr_char:logical_position_y(), supply_values_table["radius_enemy_fleet"], char_faction, EnemyFactionKeys)
                 then scripting.game_interface:apply_effect_bundle_to_characters_force("Fleet_to_Army_Supply", army,-1);
                end
            end
    end


    I see... well the require "DeI_utility_functions" is there. The Log part goes to trashcan, theres no actual need for that....What I must emphasize here is that the fleet is the "(context:character()" and the land army is the "curr_char". Thats why I can't use the context:character():cqi(); at those point your referring Jake. Or at least I'm just feeling really strong about that
    Last edited by ♔Greek Strategos♔; April 25, 2019 at 06:34 AM. Reason: Merged posts.

  3. #23
    Jake Armitage's Avatar Artifex
    Patrician

    Join Date
    Apr 2011
    Location
    apartment 6
    Posts
    4,694

    Default Re: Fleet_to_army_supply effect bundle?

    until you're using "phrases" taken EXACTLY from existing scripts you're ok
    I was just reporting "phrases" I'm using for other scripts

    yes I simplified abot curr_char, into supply script it's used in a more complex way than I thought
    Last edited by Jake Armitage; April 06, 2019 at 01:25 PM.

  4. #24

    Default Re: Fleet_to_army_supply effect bundle?

    Quote Originally Posted by Jake Armitage View Post
    until you're using "phrases" taken EXACTLY from existing scripts you're ok
    I was just reporting "phrases" I'm using for other scripts

    yes I simplified abot curr_char, into supply script it's used in a more complex way than I thought
    I agree, with copy-paste you cannot go wrong And theres a lot of that in this script believe me but to turn the tables around there had to be some changes. The most diffucult part here is to undestand the relations and I just not clear to me. Heres my thoughs...

    Spoiler Alert, click show to read: 

    Code:
    ---- Fleet close to army, fleet gets own effect bundle ----
    if context:character():has_military_force() == true                                        *If character has army
        and (char_is_general_with_navy(context:character())) == true                        *Character is Admiral
        and context:character():has_region() == false                                        *Character is not in land
        and Unit_Is_In_Army(context:character(), supply_ship_list)                            *Fleet has supply ship
        and context:character():turns_at_sea()  <= 8                                        *<=8 turns at sea...
        and context:character():faction():has_food_shortage() == false                      *Requires no food shortage
            then local char_list = context:character():faction():character_list()            *Local char list is constructed, data includes character, faction, and a list of ???
            for l = 0, char_list:num_items() - 1 do                                            *No idea...
              local curr_char = char_list:item_at(l)                                        *List curr_char objects, in this case land army
              local army = curr_char:cqi()                                                     *curr_char list (that is unique) is referred to local army
                if char_is_general_with_army(curr_char)                                        *This curr_char has to be land army
                  and curr_char:cqi() ~= context:character():cqi()                             *beats me....
                  and distance_2D(curr_char:logical_position_x(), curr_char:logical_position_y(), x, y) < supply_values_table["radius_fleet"]         *curr_char has to be inside "radius_fleet"
                  and not SupplyNearEnemyFleet(curr_char:logical_position_x(), curr_char:logical_position_y(), supply_values_table["radius_enemy_fleet"], char_faction, EnemyFactionKeys)
                 then scripting.game_interface:apply_effect_bundle_to_characters_force("Fleet_to_Army_Supply", army,-1);
                end
            end
    end

  5. #25
    Jake Armitage's Avatar Artifex
    Patrician

    Join Date
    Apr 2011
    Location
    apartment 6
    Posts
    4,694

    Default Re: Fleet_to_army_supply effect bundle?

    Code:
    ---- Fleet close to army, fleet gets own effect bundle ----
    if context:character():has_military_force() == true                                        *If character has army = YES, SHOULD BE FORE EVERY DEPLOYED CHARACTER
        and (char_is_general_with_navy(context:character())) == true                        *Character is Admiral = YES
        and context:character():has_region() == false                                        *Character is not in land = YES
        and Unit_Is_In_Army(context:character(), supply_ship_list)                            *Fleet has supply ship = YES
        and context:character():turns_at_sea()  <= 8                                        *<=8 turns at sea... = YES
        and context:character():faction():has_food_shortage() == false                      *Requires no food shortage = YES
            then local char_list = context:character():faction():character_list()            *Local char list is constructed, data includes character, faction, and a list of ??? = THIS IS JUST AN EQUIVALENCE FOR NOT WRITING DOWN LONG "PHRASES". IT MEANS THAT EVERY TIME YOU WRITE char_list IT WILL BE context:character():faction():character_list()  
            for l = 0, char_list:num_items() - 1 do                                            *No idea... = IF YOU FOUND THAT ON SIMILAR FUNCTIONS LEAVE IT AS IT IS, IT'S FOR THE LOOP (ACTUALLY HAVE NO IDEA EITHER)
              local curr_char = char_list:item_at(l)                                        *List curr_char objects, in this case land army = JUST AN EQUIVALENCE
              local army = curr_char:cqi()                                                     *curr_char list (that is unique) is referred to local army = JUST AN EQUIVALENCE
                if char_is_general_with_army(curr_char)                                        *This curr_char has to be land army = YES
                  and curr_char:cqi() ~= context:character():cqi()                             *beats me.... = THIS MEANS CONTEXT CHARACTER MUST BE DIFFERENT FROM THE LIST IT HAS BEEN PREVIOUSLY DONE, CHECK INTO THE SCRIPT HOW THIS LIST WORK BY SEARCHING EVERY curr_char
                  and distance_2D(curr_char:logical_position_x(), curr_char:logical_position_y(), x, y) < supply_values_table["radius_fleet"]         *curr_char has to be inside "radius_fleet" = YES
                  and not SupplyNearEnemyFleet(curr_char:logical_position_x(), curr_char:logical_position_y(), supply_values_table["radius_enemy_fleet"], char_faction, EnemyFactionKeys)
                 then scripting.game_interface:apply_effect_bundle_to_characters_force("Fleet_to_Army_Supply", army,-1);
                end
            end
    end
    this sounds weird to me
    local army = curr_char:cqi() = so a character from a list
    and curr_char:cqi() ~= context:character():cqi() = but here they should be different
    then scripting.game_interface:apply_effect_bundle_to_characters_force("Fleet_to_Army_Supply", army,-1); = and here you put the effect to all the characters in the list but not the context one

  6. #26

    Default Re: Fleet_to_army_supply effect bundle?

    Quote Originally Posted by Jake Armitage View Post
    Code:
    ---- Fleet close to army, fleet gets own effect bundle ----
    if context:character():has_military_force() == true                                        *If character has army = YES, SHOULD BE FORE EVERY DEPLOYED CHARACTER
        and (char_is_general_with_navy(context:character())) == true                        *Character is Admiral = YES
        and context:character():has_region() == false                                        *Character is not in land = YES
        and Unit_Is_In_Army(context:character(), supply_ship_list)                            *Fleet has supply ship = YES
        and context:character():turns_at_sea()  <= 8                                        *<=8 turns at sea... = YES
        and context:character():faction():has_food_shortage() == false                      *Requires no food shortage = YES
            then local char_list = context:character():faction():character_list()            *Local char list is constructed, data includes character, faction, and a list of ??? = THIS IS JUST AN EQUIVALENCE FOR NOT WRITING DOWN LONG "PHRASES". IT MEANS THAT EVERY TIME YOU WRITE char_list IT WILL BE context:character():faction():character_list()  
            for l = 0, char_list:num_items() - 1 do                                            *No idea... = IF YOU FOUND THAT ON SIMILAR FUNCTIONS LEAVE IT AS IT IS, IT'S FOR THE LOOP (ACTUALLY HAVE NO IDEA EITHER)
              local curr_char = char_list:item_at(l)                                        *List curr_char objects, in this case land army = JUST AN EQUIVALENCE
              local army = curr_char:cqi()                                                     *curr_char list (that is unique) is referred to local army = JUST AN EQUIVALENCE
                if char_is_general_with_army(curr_char)                                        *This curr_char has to be land army = YES
                  and curr_char:cqi() ~= context:character():cqi()                             *beats me.... = THIS MEANS CONTEXT CHARACTER MUST BE DIFFERENT FROM THE LIST IT HAS BEEN PREVIOUSLY DONE, CHECK INTO THE SCRIPT HOW THIS LIST WORK BY SEARCHING EVERY curr_char
                  and distance_2D(curr_char:logical_position_x(), curr_char:logical_position_y(), x, y) < supply_values_table["radius_fleet"]         *curr_char has to be inside "radius_fleet" = YES
                  and not SupplyNearEnemyFleet(curr_char:logical_position_x(), curr_char:logical_position_y(), supply_values_table["radius_enemy_fleet"], char_faction, EnemyFactionKeys)
                 then scripting.game_interface:apply_effect_bundle_to_characters_force("Fleet_to_Army_Supply", army,-1);
                end
            end
    end
    this sounds weird to me
    local army = curr_char:cqi() = so a character from a list
    and curr_char:cqi() ~= context:character():cqi() = but here they should be different
    then scripting.game_interface:apply_effect_bundle_to_characters_force("Fleet_to_Army_Supply", army,-1); = and here you put the effect to all the characters in the list but not the context one
    Interesting, now this is where I fell of the wagon. I indeed want the effect to go to context:character():cqi(), thats because it is the navy fleet. But to locate the curr_char is essential because I want it to be used in "radius_fleet" part. I though that I was searching fleet as context:character():cqi() and land army as curr_character... and indeed they are different, or they must be different because there are the entity thas is given the effect and the entity that is used to check the distance

    In this syntax: ("Fleet_to_Army_Supply", army,-1) the army part is not referring in my experience to local funtion. It is actually targeting to both army and/or fleet and what ever entity is determined in the beginning of the code for example contecx:character()...how this binding applies is not so clear to me.

    Now I'm not sure what Jake was pointing out but to clarify the code I made this change...

    Spoiler Alert, click show to read: 

    Code:
    ---- Fleet close to army, fleet gets own effect bundle ----
    if char_is_general_with_navy(naval_char)                                         *Lets make this character straight to naval_char, this entity gets the effect bundle
        and Unit_Is_In_Army(naval_char, supply_ship_list)
        and naval_char:turns_at_sea() <= 8
        and naval_char:faction():has_food_shortage() == false               *This is a bit unstable statement?? could be left outside the script...    
            then local char_list = naval_char:faction():character_list()        *char list contais naval_char(s)
            for l = 0, char_list:num_items() - 1 do
              local curr_char = char_list:item_at(l)                                     *curr_char(s) are actually in different char list?
              local army = curr_char:cqi()                                                  *curr_char is land army
                if char_is_general_with_army(curr_char)
                  and curr_char:cqi() ~= naval_char:cqi()                            *this states that curr_char is different from naval_char... true that
                  and distance_2D(curr_char:logical_position_x(), curr_char:logical_position_y(), x, y) < supply_values_table["radius_fleet"] 
                  and not SupplyNearEnemyFleet(curr_char:logical_position_x(), curr_char:logical_position_y(), supply_values_table["radius_enemy_fleet"], char_faction, EnemyFactionKeys)
                 then scripting.game_interface:apply_effect_bundle_to_characters_force("Fleet_to_Army_Supply", army,-1);
                end
            end
    end
    Last edited by ♔Greek Strategos♔; April 25, 2019 at 06:33 AM. Reason: Merged posts.

  7. #27
    ~Seleukos.I.Nikator~'s Avatar Campidoctor
    Join Date
    Nov 2010
    Location
    The United Europe, currently residing in Norway
    Posts
    1,642

    Default Re: Fleet_to_army_supply effect bundle?

    Quote Originally Posted by MrTimbe68 View Post
    In this syntax: ("Fleet_to_Army_Supply", army,-1) the army part is not referring in my experience to local funtion. It is actually targeting to both army and/or fleet and what ever entity is determined in the beginning of the code for example contecx:character()...how this binding applies is not so clear to me.
    In that syntax above 'army' does actually seem to refer to the local function. See here;

    Code:
    local army = curr_char:cqi()

  8. #28

    Default Re: Fleet_to_army_supply effect bundle?

    Quote Originally Posted by ~Seleukos.I.Nikator~ View Post
    In that syntax above 'army' does actually seem to refer to the local function. See here;

    Code:
    local army = curr_char:cqi()
    So actually it should be "local army = naval_char:cgi()"... OK, have to try that out

    Had a little brake with this...

    I really believe I've become blind to this, heres something that still is missing or the syntax is corrupted

    I've dedicated own function for this but not sure what should be put to ()... theres variables that need to refer somewhere else? The script runs OK but it does not spawn any bundles...

    Spoiler Alert, click show to read: 

    Code:
    ---Timbe Fleet close to army supply, fleet gets own bundle---
    function SupplyLandArmyFleetEffectBundle(naval_char, curr_char, SupplyNearEnemyFleet, EnemyFactionKeys)
        local army = naval_char:cqi()
        local x = naval_char:logical_position_x()
        local y = naval_char:logical_position_y() 
        local char_faction = curr_char:faction():name();
        if char_is_general_with_navy(naval_char)
        and Unit_Is_In_Army(naval_char, supply_ship_list)
        and naval_char:turns_at_sea()  <= 8
        then local char_list = naval_char:faction():character_list()
            for l = 0, char_list:num_items() - 1 do
             local curr_char = char_list:item_at(l)
             local force = curr_char:cqi() 
                  if (char_is_general_with_navy(curr_char)) == false
                  and curr_char:has_region() == true
                  and curr_char:character_type("general")
                  and curr_char:cqi() ~= naval_char:cqi() 
                  and distance_2D(curr_char:logical_position_x(), curr_char:logical_position_y(), x, y) < supply_values_table["radius_fleet"] 
                  and not SupplyNearEnemyFleet(curr_char:logical_position_x(), curr_char:logical_position_y(), supply_values_table["radius_enemy_fleet"], char_faction, EnemyFactionKeys)
                 scripting.game_interface:apply_effect_bundle_to_characters_force("Fleet_to_Army_Supply", army,-1);
                 return
                end
            end
        end
    end
    ---Timbe Fleet close to army supply, fleet gets own bundle---
    Last edited by ♔Greek Strategos♔; April 25, 2019 at 06:33 AM. Reason: Merged posts.

  9. #29
    Jake Armitage's Avatar Artifex
    Patrician

    Join Date
    Apr 2011
    Location
    apartment 6
    Posts
    4,694

    Default Re: Fleet_to_army_supply effect bundle?

    where are you putting this script, into dei's supply?
    did you put a callback triggered by an event, something like: scripting.AddEventCallBack... ?

    upload your mod pack so I can have a look entirely, it's not easy to track down an issue

  10. #30

    Default Re: Fleet_to_army_supply effect bundle?

    Quote Originally Posted by Jake Armitage View Post
    where are you putting this script, into dei's supply?
    did you put a callback triggered by an event, something like: scripting.AddEventCallBack... ?

    upload your mod pack so I can have a look entirely, it's not easy to track down an issue
    I'm trying to do this without the event callback, to make it more dynamic. Not turn start type or so. I though if I give a unique function to it, I could build it up from the scratch but I see this is not working very well

    http://www.mediafire.com/file/i8gkccmq2888cyt/%2540Rome_II_DeI_Timbe.pack/file


  11. #31
    Jake Armitage's Avatar Artifex
    Patrician

    Join Date
    Apr 2011
    Location
    apartment 6
    Posts
    4,694

    Default Re: Fleet_to_army_supply effect bundle?

    I don't really think it would work.
    If a script contains Rome 2 lua functions, then it should need an event callback to be put in action by the game engine.

    I'll check the file and see if I'm capable to make it works

  12. #32
    ♔Greek Strategos♔'s Avatar THE BEARDED MACE
    took an arrow to the knee

    Join Date
    Feb 2008
    Location
    Athens, Greece
    Posts
    11,588

    Default Re: Fleet_to_army_supply effect bundle?

    Moved to the appropriate thread.

  13. #33

    Default Re: Fleet_to_army_supply effect bundle?

    OK,

    Some break from last post and further development... I actually now added lines to check naval_chars and curr_chars individually from entire faction. I believe this is necessary...
    Now, some questions. What do the variables inside brackets in function do? They are some references to other functions or I can use these variables from other functions aswell?
    I believe "char_faction, EnemyFactionKeys" are a must to function work properly but do I need "naval_char" if I'm not going to use this function in enywhere else?

    Spoiler Alert, click show to read: 

    Code:
    ---Timbe Fleet close to army or fleet supply, fleet gets own bundle---
    function FleetGetsOwnBundle(naval_char, char_faction, EnemyFactionKeys)
    for s = 0, faction:character_list():num_items() - 1 do
    local naval_char = faction:character_list():item_at(s)
        if naval_char:has_military_force()
        and char_is_general_with_navy(naval_char) then    
        if Unit_Is_In_Army(naval_char, supply_ship_list)
        and naval_char:turns_at_sea() <= 8
            then local char_list = naval_char:faction():character_list()
            local army = naval_char:cqi()
            local x = naval_char:logical_position_x()
            local y = naval_char:logical_position_y()
            local char_faction = naval_char:faction():name()
            for p = 0, char_list:num_items() - 1 do
              local curr_char = char_list:item_at(p)
              local force = curr_char:cqi()
                if curr_char:has_region()
                and curr_char:military_force():is_army()
                and curr_char:character_type("general")
                and curr_char:military_force():unit_list():num_items() >= 1
                and curr_char:cqi() ~= naval_char:cqi() 
                and distance_2D(curr_char:logical_position_x(), curr_char:logical_position_y(), x, y) < supply_values_table["radius_fleet"] 
                and not SupplyNearEnemyFleet(curr_char:logical_position_x(), curr_char:logical_position_y(), supply_values_table["radius_enemy_fleet"], char_faction, EnemyFactionKeys)
                 then scripting.game_interface:apply_effect_bundle_to_characters_force("Fleet_to_Army_Supply", army,-1);
                 return;
                end;
                if curr_char:has_military_force()
                and (char_is_general_with_navy(curr_char)) == false
                and curr_char:has_region() == false
                and curr_char:military_force():unit_list():num_items() >= 1
                and curr_char:character_type("general")
                and curr_char:turns_at_sea() <= 1
                and curr_char:cqi() ~= naval_char:cqi()
                and distance_2D(curr_char:logical_position_x(), curr_char:logical_position_y(), x, y) < supply_values_table["radius_transport"] 
                 then scripting.game_interface:apply_effect_bundle_to_characters_force("Fleet_to_Army_Supply", army,-1);
                 return;
                    end;
                end;
            end;
        end;
    end;
    end;
    ---Timbe Fleet close to army or fleet supply, fleet gets own bundle---

  14. #34
    Jake Armitage's Avatar Artifex
    Patrician

    Join Date
    Apr 2011
    Location
    apartment 6
    Posts
    4,694

    Default Re: Fleet_to_army_supply effect bundle?

    sorry, I completely forgot to check previous script, were you able to make it works?

    What do the variables inside brackets in function do: please, write down an example
    naval_char: naval_char is not a function is a simple abbreviation (I use to call it equivalence into my scripts) of "faction:character_list():item_at(s)" (condition which contains other abbreviations, to tell the truth)
    if you won't need to count how many admirals you have, then you won't need nor the condition nor the abbreviation.
    Last edited by Jake Armitage; May 21, 2019 at 04:12 AM.

  15. #35

    Default Re: Fleet_to_army_supply effect bundle?

    Quote Originally Posted by Jake Armitage View Post
    sorry, I completely forgot to check previous script, were you able to make it works?

    What do the variables inside brackets in function do: please, write down an example
    naval_char: naval_char is not a function is a simple abbreviation (I use to call it equivalence into my scripts) of "faction:character_list():item_at(s)" (condition which contains other abbreviations, to tell the truth)
    if you won't need to count how many admirals you have, then you won't need nor the condition nor the abbreviation.
    Sorry, I mean this -> function FleetGetsOwnBundle(naval_char, char_faction, EnemyFactionKeys)

    "naval_char" here is the fleet, we need to check every fleet
    "curr_char" is army or transport depending on situation... and no, this script does not work

    OK, you mean this code is only for counting the admirals? Wow, I though it scans through characters and checks if the conditions are met

    Code:
    for s = 0, faction:character_list():num_items() - 1 do
    local naval_char = faction:character_list():item_at(s)
    Last edited by MrTimbe68; May 21, 2019 at 05:03 AM.

  16. #36
    ~Seleukos.I.Nikator~'s Avatar Campidoctor
    Join Date
    Nov 2010
    Location
    The United Europe, currently residing in Norway
    Posts
    1,642

    Default Re: Fleet_to_army_supply effect bundle?

    Code:
    for s = 0, faction:character_list():num_items() - 1 do
    The one above is the loop that lists all your characters. In the following lines you have further conditions set for that function and at the end the script performs an action for each item from that list depending on whether all the conditions are met, or not.

  17. #37

    Default Re: Fleet_to_army_supply effect bundle?

    Quote Originally Posted by ~Seleukos.I.Nikator~ View Post
    Code:
    for s = 0, faction:character_list():num_items() - 1 do
    The one above is the loop that lists all your characters. In the following lines you have further conditions set for that function and at the end the script performs an action for each item from that list depending on whether all the conditions are met, or not.
    OK, so this line is not needed, it only counts for logging reasons?

    Code:
    local naval_char = faction:character_list():item_at(s)

  18. #38
    ~Seleukos.I.Nikator~'s Avatar Campidoctor
    Join Date
    Nov 2010
    Location
    The United Europe, currently residing in Norway
    Posts
    1,642

    Default Re: Fleet_to_army_supply effect bundle?

    No, no, it has nothing to do with logging and yes, it is needed.

    In this line you declare a new variable that you use kind of as a shortcut further in the script.

    So, instead of writing every time faction:character_list():item_at(s), you just write naval_char. It's simply for convenience reasons.

  19. #39

    Default Re: Fleet_to_army_supply effect bundle?

    Quote Originally Posted by ~Seleukos.I.Nikator~ View Post
    No, no, it has nothing to do with logging and yes, it is needed.

    In this line you declare a new variable that you use kind of as a shortcut further in the script.

    So, instead of writing every time faction:character_list():item_at(s), you just write naval_char. It's simply for convenience reasons.
    Whew! I was pretty sure it was needed, but in this situation you begin to doubt everything In this script I believe that the hard part is to handle both fleet AND army discovery. since both have to bee looked up in this same script without any referring to already existing code. I tried to use this naval char function in litharion code but all in all I just copied it without any referrals to original. I mean is the same thing whether you copy or refer to it

  20. #40
    Jake Armitage's Avatar Artifex
    Patrician

    Join Date
    Apr 2011
    Location
    apartment 6
    Posts
    4,694

    Default Re: Fleet_to_army_supply effect bundle?

    please, post the entire script.
    probably you're adding a function to DeI's supply_system.lua, and I would need the entire script to begin understanding something (with your function included).
    Seems to me, by a preliminary glance, the number of end you've put are too many and I'm not sure if the position of the return is correct.
    Not sure though, post the script and I'll have a look.

    Also, can you describe what you want to do, in terms of difference regarding DeI's lua?

Page 2 of 3 FirstFirst 123 LastLast

Posting Permissions

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