(Unofficial) Cossacks 3 Mod Manager

Discussion in 'Modding' started by Lieutenant-Général, Oct 1, 2016.

  1. Lieutenant-Général

    Lieutenant-Général Active Member

    1.4.4
    >Real multi-line, not a fake like 1.4.3

    I find a solution!
    Now you can add multi-line bloc with triple-quote:
    Code:
    """'tur', 'alg' : begin
                      objbase.maxhp := 100;
                      SetObjBaseWeapon(objprop, objbase, 0, 9, default, default, 110, default, default, default, True);
                      SetObjBasePrice(objbase, 55, 0, 0, 0, 2, 0);
                      SetObjBaseProtection(objbase, 0, 0, 0, 0, 0, 0);
                   end;""":"""'tur', 'alg' : begin
                      objbase.maxhp := 200;
                      SetObjBaseWeapon(objprop, objbase, 0, 9, default, default, 110, default, default, default, True);
                      SetObjBasePrice(objbase, 55, 0, 0, 0, 2, 0);
                      SetObjBaseProtection(objbase, 0, 0, 0, 0, 0, 0);
                   end;"""
    Please report any bugs.
     
  2. yquinox

    yquinox Member

    Are u kidding me? You are so fast. If this will work, you will save one life :D. Thank you.
     
  3. yquinox

    yquinox Member

    Code:
    {
    "name":"mod",
    "version":"1.0",
    "info":"nothing",
    "author":"yquinox",
    "file":{
        "data/scripts/lib/unit.script":{
    
                """'tur', 'alg' : begin
                      objbase.maxhp := 100;
                      SetObjBaseWeapon(objprop, objbase, 0, 9, default, default, 110, default, default, default, True);
                      SetObjBasePrice(objbase, 55, 0, 0, 0, 2, 0);
                      SetObjBaseProtection(objbase, 0, 0, 0, 0, 0, 0);
                   end;""":"""'tur', 'alg' : begin
                      objbase.maxhp := 200;
                      SetObjBaseWeapon(objprop, objbase, 0, 9, default, default, 110, default, default, default, True);
                      SetObjBasePrice(objbase, 55, 0, 0, 0, 2, 0);
                      SetObjBaseProtection(objbase, 0, 0, 0, 0, 0, 0);
                   end;"""          
                """'rus' : begin
                      objbase.maxhp := 90;
                      SetObjBaseWeapon(objprop, objbase, 0, 8, default, 35, 90, default, default, default, True); // c1 damage 9, max range was 100, hp was 100. it have much greater attack speed then in c1
                      SetObjBasePrice(objbase, 50, 5, 0, 0, 15, 0);
                      SetObjBaseProtection(objbase, 2, 8, 10, 25, 30, 8);
                      SetObjBaseSearchBuildVisionScore(objprop, objbase, default, 160, default, default);
                   end;""":"""'rus' : begin
                      objbase.maxhp := 190;
                      SetObjBaseWeapon(objprop, objbase, 0, 8, default, 35, 90, default, default, default, True); // c1 damage 9, max range was 100, hp was 100. it have much greater attack speed then in c1
                      SetObjBasePrice(objbase, 50, 5, 0, 0, 15, 0);
                      SetObjBaseProtection(objbase, 2, 8, 10, 25, 30, 8);
                      SetObjBaseSearchBuildVisionScore(objprop, objbase, default, 160, default, default);
                   end;"""
        }  
    },
    "add_file":{},
    "replace_file":{},
    "remove_file":[]
    }
    Your code with "tur" and "alg" works but if I add "rus" it doesnt. Did I something wrong? Or between two sesions of """ (end of first and begin of second) should be something?
     
  4. Lieutenant-Général

    Lieutenant-Général Active Member

    You forgot "," :p
    between

    """'tur', 'alg' : begin
    objbase.maxhp := 100;
    SetObjBaseWeapon(objprop, objbase, 0, 9, default, default, 110, default, default, default, True);
    SetObjBasePrice(objbase, 55, 0, 0, 0, 2, 0);
    SetObjBaseProtection(objbase, 0, 0, 0, 0, 0, 0);
    end;""":"""'tur', 'alg' : begin
    objbase.maxhp := 200;
    SetObjBaseWeapon(objprop, objbase, 0, 9, default, default, 110, default, default, default, True);
    SetObjBasePrice(objbase, 55, 0, 0, 0, 2, 0);
    SetObjBaseProtection(objbase, 0, 0, 0, 0, 0, 0);
    end;"""

    and

    """'rus' : begin
    objbase.maxhp := 90;
    SetObjBaseWeapon(objprop, objbase, 0, 8, default, 35, 90, default, default, default, True); // c1 damage 9, max range was 100, hp was 100. it have much greater attack speed then in c1
    SetObjBasePrice(objbase, 50, 5, 0, 0, 15, 0);
    SetObjBaseProtection(objbase, 2, 8, 10, 25, 30, 8);
    SetObjBaseSearchBuildVisionScore(objprop, objbase, default, 160, default, default);
    end;""":"""'rus' : begin
    objbase.maxhp := 190;
    SetObjBaseWeapon(objprop, objbase, 0, 8, default, 35, 90, default, default, default, True); // c1 damage 9, max range was 100, hp was 100. it have much greater attack speed then in c1
    SetObjBasePrice(objbase, 50, 5, 0, 0, 15, 0);
    SetObjBaseProtection(objbase, 2, 8, 10, 25, 30, 8);
    SetObjBaseSearchBuildVisionScore(objprop, objbase, default, 160, default, default);
    end;"""
     
  5. yquinox

    yquinox Member

    I try "," at first, but it doesnt help so I have writen here to you for help. It doesnt work in my mod - still invalid :(.
     
  6. yquinox

    yquinox Member

    Oh, I found it. It should be like this and it works:
    Code:
    """'tur', 'alg' : begin
                      objbase.maxhp := 100;
                      SetObjBaseWeapon(objprop, objbase, 0, 9, default, default, 110, default, default, default, True);
                      SetObjBasePrice(objbase, 55, 0, 0, 0, 2, 0);
                      SetObjBaseProtection(objbase, 0, 0, 0, 0, 0, 0);
                   end;""":"""'tur', 'alg' : begin
                      objbase.maxhp := 200;
                      SetObjBaseWeapon(objprop, objbase, 0, 9, default, default, 110, default, default, default, True);
                      SetObjBasePrice(objbase, 55, 0, 0, 0, 2, 0);
                      SetObjBaseProtection(objbase, 0, 0, 0, 0, 0, 0);
                   end;""","""'rus' : begin
                      objbase.maxhp := 90;
                      SetObjBaseWeapon(objprop, objbase, 0, 8, default, 35, 90, default, default, default, True); // c1 damage 9, max range was 100, hp was 100. it have much greater attack speed then in c1
                      SetObjBasePrice(objbase, 50, 5, 0, 0, 15, 0);
                      SetObjBaseProtection(objbase, 2, 8, 10, 25, 30, 8);
                      SetObjBaseSearchBuildVisionScore(objprop, objbase, default, 160, default, default);
                   end;""":"""'rus' : begin
                      objbase.maxhp := 190;
                      SetObjBaseWeapon(objprop, objbase, 0, 8, default, 35, 90, default, default, default, True); // c1 damage 9, max range was 100, hp was 100. it have much greater attack speed then in c1
                      SetObjBasePrice(objbase, 50, 5, 0, 0, 15, 0);
                      SetObjBaseProtection(objbase, 2, 8, 10, 25, 30, 8);
                      SetObjBaseSearchBuildVisionScore(objprop, objbase, default, 160, default, default);
                   end;"""
    But is it posible to make this line:
    Code:
    end;""","""'rus' : begin
    looks like this?:
    Code:
    end;""",
    """'rus' : begin
     
  7. Lieutenant-Général

    Lieutenant-Général Active Member

    Normally you can, it is strange.
     
  8. yquinox

    yquinox Member

    Doesnt work for me :(. Sometimes it works, but after adding new parts of """:""", it doesnt. Iam writing it right via scheme but cant force to work.
     
  9. Can you help me find a mistake?
     

    Attached Files:

  10. Lieutenant-Général

    Lieutenant-Général Active Member

    I think string is too long. Try split the string in 2 or 3 part.
     
  11. It works, but divide code to 100 parts is not an option.
    Code:
    {
    "name":"hotkeys",
    "version":"1.2",
    "info":"Hot keys setting",
    "author":"Kind-king",
    "option":[
    ["bC", "C"]
    ],
    "file":{
      "data/game/var/hotkeys.cfg": {
        """hotkeys : section.begin
       // buildings
       [*] : struct.begin
          Key = C
          Action = build|%nat%cen
       struct.end""":"""hotkeys : section.begin
       // buildings
       [*] : struct.begin
          Key = bC
          Action = build|%nat%cen
       struct.end"""
        }
           }
    }
    How to create a fields in the modification?
    1.png
     
  12. Lieutenant-Général

    Lieutenant-Général Active Member

    Are you sure that you using 1.4.4? Your mod work for me.
     
  13. Does not work, but if you divide the code that each individual part is working properly.
    Code:
    {
    "name":"hotkeys",
    "version":"1.2",
    "info":"Hot keys setting",
    "author":"Kind-king",
    "option":[
    ["bbC", "C"],
    ["bbH", "H"],
    ["bbL", "L"],
    ["bbB", "B"],
    ["bbE", "E"],
    ["bbS", "S"]
    ],
    "file":{
      "data/game/var/hotkeys.cfg": {
        """hotkeys : section.begin
       // buildings
       [*] : struct.begin
          Key = C
          Action = build|%nat%cen
       struct.end
       [*] : struct.begin
          Key = H
          Action = build|%nat%hou
       struct.end
       [*] : struct.begin
          Key = L
          Action = build|%nat%bla
       struct.end""":"""hotkeys : section.begin
       // buildings
       [*] : struct.begin
          Key = bbC
          Action = build|%nat%cen
       struct.end
       [*] : struct.begin
          Key = bbH
          Action = build|%nat%hou
       struct.end
       [*] : struct.begin
          Key = bbL
          Action = build|%nat%bla
       struct.end""",
       """[*] : struct.begin
          Key = B
          Action = build|%nat%bar
       struct.end
       [*] : struct.begin
          Key = E
          Action = build|%nat%aca
       struct.end
       [*] : struct.begin
          Key = S
          Action = build|%nat%sta
       struct.end""":"""[*] : struct.begin
          Key = bbB
          Action = build|%nat%bar
       struct.end
       [*] : struct.begin
          Key = bbE
          Action = build|%nat%aca
       struct.end
       [*] : struct.begin
          Key = bbS
          Action = build|%nat%sta
       struct.end"""
        }
           }
    }
     
  14. Fate

    Fate Member

    Day and night mod and More gamespeed mod still work ? I installed both but no effect in game.
     
  15. StriKe jk

    StriKe jk Member

    Weird let me take a look

    Edit: Works fine for me with the latest version of the mod manager on a fresh installed cossacks
     
    Last edited: Nov 25, 2016
  16. Fate

    Fate Member

  17. Lieutenant-Général

    Lieutenant-Général Active Member

  18. Fate

    Fate Member

    So I don't understand why it doesn't work. :(
     
  19. Lieutenant-Général

    Lieutenant-Général Active Member

    Like i said in french topic, are-you sure you haven't mod installed by the official mod manager?
     
  20. StriKe jk

    StriKe jk Member

    What exactly does not work? You can't start the game? You don't see a difference?
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice