19th Century Mod

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

  1. Loner

    Loner Well-Known Member

    Planning to update my mod at the week-end, it's taken me longer than I thought so I am leaving the Artillery crew until the next update.
    There is one problem that I am stuck on, can't figure out how to stop Musket and Cannon fire from shooting through mountains, apart from that everything seems to be working okay, fingers crossed.;)
     
  2. Loner

    Loner Well-Known Member

    Here is the link to my mod update:-

    https://www.dropbox.com/s/knditzg3nluxw25/data.7z?dl=0

    Using Awars models, some of his graphics and a lot of his help, I have updated the uniforms of all Nations.
    Probably not all historically accurate.
    As Nations go I have removed Algeria, China, Maratha, Turkey and Venice but added Ireland, Italy, Mexico and Ottoman.
    Added a very expensive General unit, which is needed for the healing upgrade, some of which I have named but will entertain any suggestions for those that I haven't.
    Haven't changed the A.I. much but each Nation will only produce a pre-determined 3 of the possible 5 available Infantry soldiers, which gives a little bit of variety.
    I've had to leave the Artillery crew for now but they are definitely on my to do list.
     
    Npeter87, Awar, Foeurdr and 1 other person like this.
  3. Fedot

    Fedot Member

    Thanks a lot to Loner, I think your new update turned out very well, great!
     
    Loner likes this.
  4. Fedot

    Fedot Member

    Loner, you have a very good and quite interesting mod turned out!
     
    Loner likes this.
  5. Loner

    Loner Well-Known Member

    Must be missing something.:confused:

    Artillery2.JPG
     
    Fedot and Npeter87 like this.
  6. Npeter87

    Npeter87 Moderator Staff Member

    There is a wine festival somewhere. As far as I know, the british people do not specifically like wine, but the other nations do: D :D :D
     
    Loner likes this.
  7. Fedot

    Fedot Member

    This is the first step in order for it to turn out well in the end!
     
    Loner likes this.
  8. Awar

    Awar Well-Known Member

    You need to change "procedure InitRollBehaviour" for creating artillery wheels

    native procedure
    ..\data\scripts\units\unit.inc\initial.inc

    72
    [*] = ;procedure InitRollBehaviour;
    [*] = ;begin
    [*] = ; case basename of
    [*] = ; 'cannon', 'howitzer', 'mortar', 'multicannon', 'framegun' : begin
    [*] = ; //SetGameObjectMyTrackPointTurnStepInterval(20);
    [*] = ; //SetGameObjectMyTrackPointTurnStep(1);
    [*] = ; SetGameObjectMyTrackPointMoveStep(0.01);
    [*] = ; var pxl, pxr, py, py2, pz, radius : Float;
    [*] = ; var wheelcount : Integer = 2;
    [*] = ; case basename of
    [*] = ; 'cannon' : begin
    [*] = ; radius := 0.34;
    [*] = ; pxl := 0.68;
    [*] = ; pxr := -pxl;
    [*] = ; py := -0.0; //-0.35
    [*] = ; pz := 0.675;
    [*] = ; end;
    [*] = ; 'multicannon' : begin
    [*] = ; radius := 0.34;
    [*] = ; pxl := 0.718;
    [*] = ; pxr := -pxl;
    [*] = ; py := 0;//-0.5725;
    [*] = ; pz := 0.675;
    [*] = ; end;
    [*] = ; 'howitzer' : begin
    [*] = ; radius := 0.34;
    [*] = ; pxl := 0.6515;
    [*] = ; pxr:=-pxl;
    [*] = ; py := 0;//-0.5845;
    [*] = ; pz := 0.675;
    [*] = ; end;
    [*] = ; 'mortar' : begin
    [*] = ; radius := 0.078;
    [*] = ; pxl := 0.599;
    [*] = ; pxr:=-pxl;
    [*] = ; py := -0.93;
    [*] = ; py2 := 0.93;
    [*] = ; pz := 0.16;
    [*] = ; wheelcount := 4;
    [*] = ; end;
    [*] = ; 'framegun' : begin
    [*] = ; radius := 0.34;
    [*] = ; pxl := 0.68;
    [*] = ; pxr := -pxl;
    [*] = ; py := -0.0; //-0.35
    [*] = ; pz := 0.675;
    [*] = ; end;
    [*] = ; end;
    [*] = ; pz:=radius*2;
    [*] = ;
    [*] = ; var bhHnd : Integer;
    [*] = ; var i : Integer;
    [*] = ; for i:=0 to (wheelcount div 2)-1 do
    [*] = ; begin
    [*] = ; var suffix : String;
    [*] = ; if (i=1) then
    [*] = ; begin
    [*] = ; suffix := '_rear';
    [*] = ; py := py2;
    [*] = ; //radius:=0.01;
    [*] = ; end;
    [*] = ; var chHnd : Integer = GetGameObjectGOHandleChildByCustomName(myHnd, basename+'_wheel_left'+suffix);
    [*] = ; if (chHnd<>0) then
    [*] = ; begin
    [*] = ; bhHnd := BehaviourCreate(chHnd, 'TXRollBehaviour', True, False);
    [*] = ; SetBehaviourFloatProperty(bhHnd, 'Radius', radius);
    [*] = ; SetBehaviourAffineVectorProperty(bhHnd, 'MoveDir', 0, 1, 0);
    [*] = ; SetBehaviourAffineVectorProperty(bhHnd, 'RollDir', 1, 0, 0);
    [*] = ; SetGameObjectPositionByHandle(chHnd, pxl, py, pz);
    [*] = ; end;
    [*] = ;
    [*] = ; chHnd := GetGameObjectGOHandleChildByCustomName(myHnd, basename+'_wheel_right'+suffix);
    [*] = ; if (chHnd<>0) then
    [*] = ; begin
    [*] = ; bhHnd := BehaviourCreate(chHnd, 'TXRollBehaviour', True, False);
    [*] = ; SetBehaviourFloatProperty(bhHnd, 'Radius', radius);
    [*] = ; SetBehaviourAffineVectorProperty(bhHnd, 'MoveDir', 0, 1, 0);
    [*] = ; SetBehaviourAffineVectorProperty(bhHnd, 'RollDir', 1, 0, 0);
    [*] = ; SetGameObjectPositionByHandle(chHnd, pxr, py, pz);
    [*] = ; end;
    [*] = ; end;
    [*] = ; end;
    [*] = ; end;
    [*] = ;end;
    [*] = ;

    "state of country" procedure
    72
    [*] = ;procedure InitRollBehaviour;
    [*] = ;begin
    [*] = ; var art_usage : Integer = gObjProp[arg_obj.cid][arg_obj.id].usage; //awar по назначению
    [*] = ; var art_ind : Integer = gObjProp[arg_obj.cid][arg_obj.id].artind; //awar по группе выпуска
    [*] = ; var standartbasename : String = basename;
    [*] = ;
    [*] = ; //case basename of
    [*] = ; // 'cannon', 'cannon17', 'cannon17tur', 'cannon18', 'howitzer', 'howitzer18', 'mortar', 'mortartur', 'mortar16', 'mortar17', 'mortar18', 'multicannon', 'framegun', 'frameguntur' : begin
    [*] = ; if (art_usage=gc_obj_usage_cannon) or (art_usage=gc_obj_usage_mcannon) or (art_usage=gc_obj_usage_mortar) or (art_usage=gc_obj_usage_supermortar) then
    [*] = ; begin
    [*] = ; SetGameObjectMyTrackPointMoveStep(0.01);
    [*] = ; var pxl, pxr, py, py2, pz, radius : Float;
    [*] = ; var wheelcount : Integer = 2;
    [*] = ; case art_usage of
    [*] = ; gc_obj_usage_cannon : begin
    [*] = ; if (art_ind = gc_obj_artind_cannon) then
    [*] = ; begin
    [*] = ; radius := 0.34;
    [*] = ; pxl := 0.68;
    [*] = ; pxr := -pxl;
    [*] = ; py := -0.0; //-0.35
    [*] = ; pz := 0.68; //0.675
    [*] = ; standartbasename := 'cannon';
    [*] = ; end else begin
    [*] = ; radius := 0.300;
    [*] = ; pxl := 0.600;
    [*] = ; pxr := -pxl;
    [*] = ; py := -0.0;
    [*] = ; pz := 0.67; //0.15
    [*] = ; standartbasename := 'framegun';
    [*] = ; end;
    [*] = ; end;
    [*] = ; gc_obj_usage_mcannon : begin
    [*] = ; radius := 0.34;
    [*] = ; pxl := 0.718;
    [*] = ; pxr := -pxl;
    [*] = ; py := 0;//-0.5725;
    [*] = ; pz := 0.68; //0.675
    [*] = ; standartbasename := 'multicannon';
    [*] = ; end;
    [*] = ; gc_obj_usage_mortar : begin
    [*] = ; radius := 0.34;
    [*] = ; pxl := 0.6515;
    [*] = ; pxr:=-pxl;
    [*] = ; py := 0;//-0.5845;
    [*] = ; pz := 0.68; //0.675
    [*] = ; standartbasename := 'howitzer';
    [*] = ; end;
    [*] = ; gc_obj_usage_supermortar : begin
    [*] = ; radius := 0.078;
    [*] = ; pxl := 0.599;
    [*] = ; pxr:=-pxl;
    [*] = ; py := -0.93;
    [*] = ; py2 := 0.93;
    [*] = ; pz := 0.156; //0.16
    [*] = ; wheelcount := 4;
    [*] = ; standartbasename := 'mortar';
    [*] = ; end;
    [*] = ; end;
    [*] = ;
    [*] = ; var bhHnd : Integer;
    [*] = ; var i : Integer;
    [*] = ; for i:=0 to (wheelcount div 2)-1 do
    [*] = ; begin
    [*] = ; var suffix : String;
    [*] = ; if (i=1) then
    [*] = ; begin
    [*] = ; suffix := '_rear';
    [*] = ; py := py2;
    [*] = ; end;
    [*] = ; var chHnd : Integer = GetGameObjectGOHandleChildByCustomName(myHnd, standartbasename+'_wheel_left'+suffix); //basename
    [*] = ; if (chHnd<>0) then
    [*] = ; begin
    [*] = ; bhHnd := BehaviourCreate(chHnd, 'TXRollBehaviour', True, False);
    [*] = ; SetBehaviourFloatProperty(bhHnd, 'Radius', radius);
    [*] = ; SetBehaviourAffineVectorProperty(bhHnd, 'MoveDir', 0, 1, 0);
    [*] = ; SetBehaviourAffineVectorProperty(bhHnd, 'RollDir', 1, 0, 0);
    [*] = ; SetGameObjectPositionByHandle(chHnd, pxl, py, pz);
    [*] = ; end;
    [*] = ;
    [*] = ; chHnd := GetGameObjectGOHandleChildByCustomName(myHnd, standartbasename+'_wheel_right'+suffix); //basename
    [*] = ; if (chHnd<>0) then
    [*] = ; begin
    [*] = ; bhHnd := BehaviourCreate(chHnd, 'TXRollBehaviour', True, False);
    [*] = ; SetBehaviourFloatProperty(bhHnd, 'Radius', radius);
    [*] = ; SetBehaviourAffineVectorProperty(bhHnd, 'MoveDir', 0, 1, 0);
    [*] = ; SetBehaviourAffineVectorProperty(bhHnd, 'RollDir', 1, 0, 0);
    [*] = ; SetGameObjectPositionByHandle(chHnd, pxr, py, pz);
    [*] = ; end;
    [*] = ; end;
    [*] = ; end;
    [*] = ;end;
    [*] = ;
     
  9. Loner

    Loner Well-Known Member

    Thank you very much Awar, I'll get right on it.:cool:
     
    Fedot likes this.
  10. Loner

    Loner Well-Known Member

    Getting there, slowly.:)

    Artillery3.JPG
     
  11. Foeurdr

    Foeurdr Moderator Staff Member

    It's certainly has this plastic soldier toy feeling ^^
     
    Loner likes this.
  12. Awar

    Awar Well-Known Member

    Excellent. Now, you need to check the texture names in the unit object description.
     
  13. Loner

    Loner Well-Known Member

    Oh yes! :):):)
    Thank you so much Awar and everyone who have supported me.:cool:

    Artillery4.JPG
     
  14. Loner

    Loner Well-Known Member

    Created a Cannon crew for Ukraine, another of Awars models, all works fine except for the death animation, been through everything with a fine toothed comb but cannot see what the problem is.:(:confused:
    Artillery5.JPG
     
    Fedot and Npeter87 like this.
  15. Fedot

    Fedot Member

    Very good gunners! I think, in the end, all the animation will turn out very good!
     
    Loner likes this.
  16. Awar

    Awar Well-Known Member

    You need to check the animation file.

    cannon19_death.aaf
    AAF
    1
    "death",1,58,morph

    cannon17_death.aaf (or cannon_death.aaf)
    AAF
    1
    "death",1,33,morph


    cannon17_death.actor
    section.begin {refurl=.\data\actors\ref\refunit.actor}
    ShaderLODList.List[0].ShaderID = 28
    ShaderLODList.List[0].ShaderIDIM = 25
    Animations.LoadFromFile = .\data\animations\aaf\cannon17_death.aaf
    ActorList.Items[0].Name = cannon17_death.mesh
    ActorList.Items[0].LODList.Items[0].MeshObjects.LoadFromFile = .\data\actors\units\cannon17_death.oss
    section.end
     
    Loner and Fedot like this.
  17. Loner

    Loner Well-Known Member

    Thank you Awar, got it sorted.:)
    Next up, Poland.;)
     
    Fedot likes this.
  18. Loner

    Loner Well-Known Member

  19. Fedot

    Fedot Member

    It Turned Out Very Well, wonderful! Great result! Very beautiful animation!
     
    Loner likes this.
  20. Loner

    Loner Well-Known Member

  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