Ex3B 266 Posted June 22, 2020 So I am trying to improve a port I did of a Vodnik from Arma 2, and the main 30mm gun works fine, and has the smoke and light effect at the end of the barel, as it should be: However, the coax machinegun effects appear in the wrong place. The muzzle flash is right, the tracers show the rounds are coming out at the right place, but the smoke and the light effects are wrong: I have a similar problem with a further modified version of the Vodnik in which I have scaled down the 30mm barrel, and duplicated and rotated it to look like a gatling gun (and I have changed the animation so the barrels rotate when firing), I made a new weapon class for it based on an HMG (but now with a much higher ROF and muzzle , and lead prediction so its an effective light AA gun). What do I need to do to define where these effects appear for each weapon? Share this post Link to post Share on other sites
reyhard 2082 Posted June 23, 2020 Smoke effects are defined in weapon config itself. For things like that you would most likely have to create duplicated weapon entry with just modified particles configuration class rhs_weap_pkt_bmd_coax : rhs_weap_pkt { class gunParticles { class effect1 { effectname = "MachineGunCloud"; positionname = "Usti hlavne2"; directionname = "Konec hlavne2"; }; }; }; class rhs_weap_pkt_2s3 : rhs_weap_pkt { class gunParticles { class effect1 { effectname = "MachineGunCloud"; positionname = "Usti hlavne3"; directionname = "Konec hlavne3"; }; }; }; class rhs_weap_pkt_bmd_bow1 : rhs_weap_pkt { class gunParticles { class effect1 { effectname = "MachineGunCloud"; positionname = "muzzle2"; directionname = "end2"; }; }; }; class rhs_weap_pkt_bmd_bow2 : rhs_weap_pkt { class gunParticles { class effect1 { effectname = "MachineGunCloud"; positionname = "muzzle3"; directionname = "end3"; }; }; }; Small example from RHS on how to handle multiple weapons on single vehicle Share this post Link to post Share on other sites
Ex3B 266 Posted June 23, 2020 Ah, so if I look at the weapon configs, I should be able to find the names that I need for the memory points? So if I look up those names, and add appropriately named memory points to the model, it should work? Share this post Link to post Share on other sites
Jackal326 1181 Posted June 23, 2020 17 minutes ago, Ex3B said: Ah, so if I look at the weapon configs, I should be able to find the names that I need for the memory points? So if I look up those names, and add appropriately named memory points to the model, it should work? I think what @reyhard means is the other way around - adding the names of the memory points to the config... Share this post Link to post Share on other sites
Ex3B 266 Posted June 24, 2020 7 hours ago, Jackal326 said: I think what @reyhard means is the other way around - adding the names of the memory points to the config... Yes, but I would rather not change nor duplicate the vanillaweapon configs, if all I need to do is change the name of the memory points in the model. So would that work? Share this post Link to post Share on other sites
Jackal326 1181 Posted June 24, 2020 If you start changing the names of memory points in the model you'll end up breaking more than you're fixing. Otherwise you'd only have to redefine all of the existing memory points in the config. Ergo its half the work to just implement it as Reyhard suggested above... Share this post Link to post Share on other sites
Ex3B 266 Posted June 24, 2020 4 hours ago, Jackal326 said: If you start changing the names of memory points in the model you'll end up breaking more than you're fixing. Otherwise you'd only have to redefine all of the existing memory points in the config. Ergo its half the work to just implement it as Reyhard suggested above... Seems to me that I would only need to define memory points for the MG, and all the other existing memory points would be unaffected. Moreover I can have the same vertex part of multiple selections in the memory layer. Share this post Link to post Share on other sites
Ex3B 266 Posted June 26, 2020 On 6/24/2020 at 10:52 AM, Jackal326 said: If you start changing the names of memory points in the model you'll end up breaking more than you're fixing. Otherwise you'd only have to redefine all of the existing memory points in the config. Ergo its half the work to just implement it as Reyhard suggested above... Just a follow up, adding appropriately named memory points worked fine, and nothing is broken. Share this post Link to post Share on other sites
Jackal326 1181 Posted June 26, 2020 Adding =/= renaming. But yes, adding the points would work. You were remarking on changing the names of existing points which of course would break stuff. Share this post Link to post Share on other sites
h4wek 43 Posted January 16, 2023 I have similar problem but it happen with shot round forom ship's gun turret - when Ai fire it fly only forward (no matter what direction and elevation have turret) - but when shoting from it as player it fire rounds in good direction but not direclty form barrel but from center of ship), probably this is connected to memory points in weapon config - but I use in model the same as in vanillas configs (usti hlavneX) anyway it is some not logical solution (if anybody use in weapon config other memory poin'ts names for example "gun_beg" and "gun_end" instead of those czech ones this weapon will not fire rounds form correct place/muzzle - those definitions should be universal like muzzle1, muzzle2 etc no matter what memory points names are in model and turret config - in this way any weapon mounted to designated muzzle fire from this point. Share this post Link to post Share on other sites
Jackal326 1181 Posted January 16, 2023 6 hours ago, h4wek said: I have similar problem but it happen with shot round forom ship's gun turret - when Ai fire it fly only forward (no matter what direction and elevation have turret) - but when shoting from it as player it fire rounds in good direction but not direclty form barrel but from center of ship), probably this is connected to memory points in weapon config - but I use in model the same as in vanillas configs (usti hlavneX) anyway it is some not logical solution (if anybody use in weapon config other memory poin'ts names for example "gun_beg" and "gun_end" instead of those czech ones this weapon will not fire rounds form correct place/muzzle - those definitions should be universal like muzzle1, muzzle2 etc no matter what memory points names are in model and turret config - in this way any weapon mounted to designated muzzle fire from this point. As far as I am aware you can name the memory points whatever you want in both the model and the config.cpp provided that they both marry-up and match. If they aren't defined correctly then of course they wont work... Lets not forget you would also need to define the other connected things such as muzzle-flash affects, gas ejection ports etc. for the full effect. Share this post Link to post Share on other sites
h4wek 43 Posted January 17, 2023 that right - I observe during fire gun cloud made in corct place, gun flash made by anim sources defined in model and animation phases also in corretct place only round not going from right place, points defined in model are working beacouse with replace directionn of muzzle by usti hlavne and konec hlavne the shot is made in backward direction of ship but still in center line in horizontal and vertical axis - turning of turret not cause effect (maybe some reason is in config turret becouse when i fire from inside of turret it shot in correct direction (not from muzzle anyway but shoting some else than fron or back) but when i try to shot in 3-rd person gun and flash is visible on end of barrel but explosion of shell is still on front. I try this from oposite side - I bring to vanilla turret gun my weapon and affect is ...... please check it beacouse maybe I am looking for that too long: turret config: gun = "MainGun"; animationSourceGun = "Maingun"; body = "MainTurret"; animationSourceBody = "MainTurret"; gunBeg = "usti hlavne"; gunEnd = "konec hlavne"; selectionFireAnim = "muzzleflash_cannon"; memoryPointGun = "usti hlavne"; cameraDir = "pos_gunner_view_dir"; animationSourceElevation = "Maingun"; animationSourceCamElev = "camElev"; particlesdir = "pos_fx_dir"; particlespos = "pos_fx"; weapon config: muzzleEnd = "usti hlavne"; muzzlePos = "konec hlavne"; muzzles[] = {"this"}; Share this post Link to post Share on other sites
Jackal326 1181 Posted January 17, 2023 I'm no expert when it comes to vehicle configs/models but only two things I can think of come to mind as possible explanations: The first is that the fire memory points ("usti hlavne" and "konec hlavne") aren't part of the animated turret named selection, however I'm fairly sure that would break the muzzle-flash (not the particle effects as they're defined separately) so its probably not the case. The second, and again this is purely supposition and me thinking out loud, but is it possible the large object geometry issue that is caused by objects being above a certain size are breaking the selections/memory point definitions and defaulting the position and not the direction of the memory points/animations? Again, I'm just spit-balling here. Share this post Link to post Share on other sites
h4wek 43 Posted January 18, 2023 Hmm this 50m limit from center I am afraid too - but will make experiment with single turret model alone and will see, also I will test on vanilla turret adding my wepon to this turret and check if problem will ocure - or add it to tank turret - mechanic should be the same so problem source will be divided to weapon or turret config. I made a test with only turret model < 50m size, still the same problem but something must be in model config or model beacouse test with tank and vanilla turret make on weapon positive state (weapon working corectly on other vehicles so config of ship/turret is problematic). Seems to be a problem in model.cfg definitions but what could cause this kind of issue ( I make test on problematic turret with other weapons like grenade luncher or other canno type and still no effect on ammo but clouds and fire effects are made in correct place and in correct direction WTF? I am close and close to solve problem on RTP I found : Error: bin\config.bin/CfgVehicles/HWK_MK45/Turrets/Mainturret/: Turret body MainTurret not found while initializing the model hwk_mk45\hwk_mk45_gun.p3d Error: bin\config.bin/CfgVehicles/HWK_MK45/Turrets/Mainturret/: Turret gun MainGun not found while initializing the model hwk_mk45\hwk_mk45_gun.p3d I made turret class as new turret but what is missing in this?: class NewTurret; class Turrets { class Mainturret: NewTurret { class turrets {}; class Reflectors {}; aggregateReflectors[] = {}; gun = "MainGun"; animationSourceGun = "Maingun"; body = "MainTurret"; animationSourceBody = "MainTurret"; ........................ }; }; SOLVED: in model.cfg animation class name must be the same as declared as body and gun in turret class (those names are not bones of model but clases of animations of those bones - crazy as usually) - now turret config is like that: gun = "gun_elev"; animationSourceGun = "Maingun"; body = "turret_turn"; animationSourceBody = "MainTurret"; due to model animanames: class turret_turn { type="rotation"; source="MainTurret"; selection="turret"; axis="axis_turret"; //animPeriod = 10.6; memory=1; minValue="(rad -360)"; maxValue="(rad 360)"; angle0="(rad -360)"; angle1="(rad 360)"; }; class gun_elev:turret_turn { source="Maingun"; selection="gun"; axis="axis_gun"; }; Share this post Link to post Share on other sites