19th Century Mod

Discussion in 'Modding' started by Loner, Feb 17, 2019.

  1. Awar

    Awar Well-Known Member

    [​IMG]

    mods\test\data\scripts\lib\unit.script

    1100 'officer18' : begin
    objbase.maxhp := 125;
    SetObjBaseWeapon(objprop, objbase, 0, 50, 0, 35, 65, 0, 400, gc_obj_weapon_kind_pike, True);
    //SetObjBaseWeapon(objprop, objbase, 0, 50, 0, 35, 65, 0, 100000, gc_obj_weapon_kind_pike, True);
    SetObjBasePrice(objbase, 50, 0, 0, 200, 10, 0);
    SetObjBaseWeapon(objprop, objbase, 1, 0, 0, 400, 950, 400, 50000, gc_obj_weapon_kind_bullet, False);
    SetObjBaseMaterialCanKill(objprop, gc_obj_material_body, gc_obj_material_body, gc_obj_material_woodwall, 0, 0, 0);
    SetObjBaseSearchBuildVisionScore(objprop, objbase, 1000, 192{150}, 4, 10);
    //SetObjBaseSearchBuildVisionScore(objprop, objbase, 500, 192{150}, 4, 10);
    objprop.consume[gc_resource_type_gold] := 90;
    objprop.bstandground := True;
    objprop.bturnoff := True;
    objprop.usage := gc_obj_usage_lightinfantry;
    objprop.bofficer := True;
    objprop.aiforce := 2;
    objprop.walkintervalfactor := cWalkIntervalInf;
    end;
    'drummer', 'drummerrus', 'drummertur', 'bagpiper', 'drummer18' : begin
    objbase.maxhp := 75;
    SetObjBasePrice(objbase, 60{50}, 0, 0, 20, 0, 0);
    SetObjBaseWeapon(objprop, objbase, 1, 0, 0, 400, 1000, 400, 50000, gc_obj_weapon_kind_bullet, False);
    SetObjBaseMaterialCanKill(objprop, gc_obj_material_body, gc_obj_material_body, 0, 0, 0, 0);
    SetObjBaseSearchBuildVisionScore(objprop, objbase, 1000, 160, 6, 10);

    //SetObjBaseMaterialCanKill(objprop, gc_obj_material_body, 0, 0, 0, 0, 0);
    //SetObjBaseSearchBuildVisionScore(objprop, objbase, 0, 160, 6, 10);

    objprop.bturnoff := True;
    objprop.usage := gc_obj_usage_lightinfantry;
    objprop.bdrummer := True;
    objprop.aiforce := 2;
    objprop.walkintervalfactor := cWalkIntervalInf;
     
    Loner likes this.
  2. Ftoomsh

    Ftoomsh Well-Known Member

    I noticed a couple of odd effects when testing State vs Country in the in-game editor. One time a drummer became stuck after his formation attacked an enemy. He didn't march into the enemy but then he also would not march away after his formation had won the engagement. He was completely stuck. I also noticed the occasional unit in a formation die for no reason. Arquebusiers shooting at pikes on stand ground for a test. One arquebusier just died. I am sure these are rare events but it could mean there is a little bug or two somewhere.
     
  3. Awar

    Awar Well-Known Member

    The game like life is both unpredictable
     
    Ftoomsh likes this.
  4. Loner

    Loner Well-Known Member

    It works, many thanks Awar.
     
    Awar likes this.
  5. Loner

    Loner Well-Known Member

    One thing I have noticed about this is, if the Drummer (Standard Bearer) is left alive after all his troops have been killed he is no longer able to move, not a major problem just wondered if there was a fix for this.
     
  6. Johny

    Johny Member

    Could somehow the classic: if (number of units) is less than / is equal to (number) set (officer_animation) to (death): work?
     
  7. Awar

    Awar Well-Known Member

    The drummer doesn't follow your orders?
     
  8. Loner

    Loner Well-Known Member

    That's right Awar.
     
  9. Awar

    Awar Well-Known Member

    Who was left in front of the drummers ?
    Drummer will not react until he kills the target.
    Does the drummer now have a command to disable the attack?
     
  10. Loner

    Loner Well-Known Member

    Didn't try that, thanks Awar, I'll give it a go.
     
  11. Loner

    Loner Well-Known Member

    Creating the required circumstances is not as easy as I thought it would be.
     
  12. Awar

    Awar Well-Known Member

    Run one drummer in the editor. Forbid the enemy to attack.
     
  13. Loner

    Loner Well-Known Member

    Played a game, most of my Squad were killed, disbanded it, retreated, couldn't move the Drummer.
     
  14. Ftoomsh

    Ftoomsh Well-Known Member

    I am interested to see the final outcome of this. Setting up drummers and officers so that they don't run ahead in musket attacks seems like a good idea to me. :)
    Would it be worthwhile to have pike officers who do advance with pike troops and musket officers who don't advance with musket troops? Maybe this has already been done, I don't know.

    I have a bunch of questions about client lag but I will start a new topic on that subject.
     
  15. Awar

    Awar Well-Known Member

    Did you change files?
    drummeralg.aaf, drummeraus.aaf, drummerbav.aaf ... drummerukr.aaf, drummerven.aaf (21 files)
    The files contain types of animations. You need to change them, as they need a transition from shooting to movement.
    The model for drummer is the misflagman model. You need to use misflagman.aaf for its purpose.
    There is an example file for the state Vs Country mod
    misflagman.aaf
    AAF
    9
    "idle",104,153,morph
    "idle0",155,254,morph
    "walk",1,24,morph
    "walk0",1,24,morph
    "death",49,102,morph
    "attack1",104,153,morph
    "attack0",26,48,morph
    "trans01",152,153,morph
    "trans10",152,153,morph
     
  16. Loner

    Loner Well-Known Member

    Yes Awar, changed all 21.
     
  17. Loner

    Loner Well-Known Member

    Another thing I've noticed, when the A.I produces a Squad with Officer and Drummer while moving all is fine, but after engaging the enemy the Drummer gets left behind.
     
  18. Awar

    Awar Well-Known Member

    I need to test this situation
     
  19. Loner

    Loner Well-Known Member

    I think I know why this is happening, in State vs Country the Flagman has melee ability, where as in my mod it doesn't.
     
  20. Awar

    Awar Well-Known Member

    Don't you want to add this feature?
     
  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