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.
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.
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
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; [*] = ;
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.
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