catmorbid Posted June 9, 2014 Share Posted June 9, 2014 Hi, Does anyone know of any way to adjust grenade range? It seems it's hardcoded and strength-related, which kinda sucks since you can't make a proper grenade launcher. Quote Link to comment Share on other sites More sharing options...
catmorbid Posted June 9, 2014 Author Share Posted June 9, 2014 Yeah, I know, but for grenades it doesn't seem to work. The "gasgrenade" bullettype which is used by all grenades gives them the nice arc of throw + ability to fly over obstacles but also seems to have a bunch of other hardcoded behaviour tied to it. I did make a grenade launcher based off the grenade code (see my mod thread in the forum), but there's some problems with it, hence the question Quote Link to comment Share on other sites More sharing options...
Mikhail Ragulin Posted June 9, 2014 Share Posted June 9, 2014 I'm pretty sure it only works with bulletType="rocket": <Weapon name="weapon.ags17" bulletType="rocket" emptySound="Empty Click 1"> <props range="70" hands="2" recoil="0" weight="31" isHeavy="1" clipSize="30" reloadAPCost="50" reloadSound="Weapon Shotgun Reload" reactionModifier="0.5" disableReactionFire="1" disableDamageScaling="1" /> <SingleShot /> <BurstFire ap="80" accuracy="30" sound="Weapon Assault Rifle Burst" delay="0.7" burstdelay="0.05" shotCount="6" suppressionValue="40" suppressionRadius="3" /> <GUIImage name="gui/mod/ags17.png"/> <GroundImage name="grounditemimages/ballistic_machinegun.png"/> <Ammos> <Ammo name="ammo.ags17_ammo" type="kinetic" damage="30" mitigation="0" isOverdamage="1"> <Projectile spectre="projectiles/grenades/grenade_frag" speed="1000" /> <Impact spectre="particles/explosion/explosion" radius="1.5" sound="Weapon Frag Grenade" fireChance="5" smokeChance="5" gasType="GrenadeFragSmoke" /> </Ammo> </Ammos></Weapon> That's how I have it for the AGL's in M'nauts. I think that's pretty much the only way to do it. The nades don't have an arc though, it's like direct fire, but it does look like nades (because of the projectile image). Slowing down the spectre will probably make it look better too. Stick a disclaimer in the Xenopedia saying that 'nauts aren't allowed to use indirect fire, and you can get away with it. Quote Link to comment Share on other sites More sharing options...
Max_Caine Posted June 9, 2014 Share Posted June 9, 2014 Now that I'm in front of my own computer, there's a key variable that people have (unsurprisingly) missed, because you don't see it on many (if any!) grenades, and it was only mentioned in passing by Aaron several complete builds ago. Here's a line from the flare with the key variable highlighted. <props range="20" hands="1" recoil="0" weight="0" isHeavy="0" clipSize="1" reloadAPCost="0" disableDamageScaling="1" throwingRangeModifier="5.0" /> throwingRangeModifier adds X.X number of tiles to the throwing range of a grenade. When I made a concussion grenade launcher as a secondary vehicle weapon for my Grease Pit mod, I did this: <Weapon name="VV.CONCUSSION" bulletType="gasgrenade" emptySound="Empty Click 1"> <props range="10" hands="1" recoil="0" weight="1" isHeavy="0" clipSize="6" reloadAPCost="0" hpLimit="80" disableDamageScaling="1" throwingRangeModifier="10.0" /> <SingleShot delay="0.85" sound="Weapon Grenade Throw" suppressionValue="100" suppressionRadius="5"> <Set1 ap="20" accuracy="60" /> </SingleShot> <BurstFire/> <GUIImage name="gui/weapons/GrenadeSmoke.png"/> <GroundImage name="grounditemimages/grenade2.png"/> <Ammos> <Ammo name="default" type="chemical" damage="1" stunDamage="50" mitigation="10"> <Projectile spectre="projectiles/grenade" speed="600" /> <Impact spectre="particles/smallgrenade/small_grenade" radius="4" sound="Weapon Gas Grenade" fireChance="0" smokeChance="0" gasType="GrenadeFragSmoke"/> </Ammo> </Ammos> </Weapon> A vehicle doesn't have a strength value, so the only thing that gave the grenade launcher any range was throwingRangeModifier. That's what you want to add/alter. Quote Link to comment Share on other sites More sharing options...
Mikhail Ragulin Posted June 9, 2014 Share Posted June 9, 2014 Does that allow the projectile to arc like a nade then? and go over stuff? Quote Link to comment Share on other sites More sharing options...
Max_Caine Posted June 9, 2014 Share Posted June 9, 2014 Yupyup. From a code perspective, it's NOT a grenade launcher. It's a customised grenade with a clip and a large positive throwing modifier (throwingRangeModifier can be positive or negative). Because vehicles don't have a strength value it will maintain a constant range (because it can only draw from the throwingRangeModifier) so it behaves like a grenade launcher. Like so many tricks in programming it's not about the actual, it's all about the virtual. Quote Link to comment Share on other sites More sharing options...
Mikhail Ragulin Posted June 9, 2014 Share Posted June 9, 2014 Aye, just tried it out. Works nicely, but with a couple of limitations. The weapon animation disappears during the action - not really a biggie, specially if one is looking at the back of a soldier - and it doesn't support multiple single fire modes. For example, my M79 has a snap and normal fire mode, but it's not possible to cycle through them - i.e. like a nade, there is only one way to use it, so I can only use snap fire with it. Haven't tried burst yet. Quote Link to comment Share on other sites More sharing options...
catmorbid Posted June 9, 2014 Author Share Posted June 9, 2014 Yeah, thanks to you guys I also found it and tested it. It doesn't seem to support burst fire either, and I'm also not sure about the accuracy calculations - they might also disregard the weapon accuracy stat. Quote Link to comment Share on other sites More sharing options...
Max_Caine Posted June 9, 2014 Share Posted June 9, 2014 Well, I did that under a very specific set of circumstances where I could control most of the elements and the rest didn't matter. But if you guys can figure out something better that would be pretty sweet! Quote Link to comment Share on other sites More sharing options...
Mikhail Ragulin Posted June 9, 2014 Share Posted June 9, 2014 (edited) Another problem...it's not just the animation that vanishes, it's the weapon too. Albeit on the next turn, but that's no consolation. And burst fire doesn't work....it just lobs one nade. However, the vanishing only happened to the single shot weapon (m79). The ags (burst firing, but only one nade) didn't disappear. Maybe the way forward is to use burst fire as the only fire option, but treat it like single shot...it only uses one round, and isn't as pricey as a normal burst, if you know what I mean ('arry). It also breaks the quick-throw slot, as the game'll be thinking there's a nade being thrown, but there's not. This soldier isn't carrying any nades, but check out the "1" in the slot. And also the lack of ammo in the weapon frame, where this weapon should have 30: Edited June 9, 2014 by Mikhail Ragulin Quote Link to comment Share on other sites More sharing options...
Dogbarian Posted July 18, 2014 Share Posted July 18, 2014 I'm looking at both CatMorbid's mod and Mikhail's Magnum-nauts, wanting to get an M79 that works nicely. Mikhail, looks like you never got yours working, because I don't see it in your release. Did either of you get one working, and by working, I mean with an arcing shot (with or without indirect ability, although with would be ideal)? It seems to work fine as a rocket. I'm kind of picking and choosing items out of various mods, rather than making wholesale changes. Quote Link to comment Share on other sites More sharing options...
Mikhail Ragulin Posted July 18, 2014 Share Posted July 18, 2014 I had them in previous releases, but dropped them to make room for the flamethrowers. They work as rockets, but obviously only direct fire. I've tried various methods to work around this, but it's just not (quite) possible. I had another go the other day, changing the nade throw animation to a gun firing - but with the game still thinking it's a nade, the gun disappears (like it's been thrown). So, basically, one-shot disposable launchers (with an arc) are feasible by mucking around with the animations (and a lot of headscratching). Quote Link to comment Share on other sites More sharing options...
TacticalDragon Posted July 19, 2014 Share Posted July 19, 2014 (edited) Now that I'm in front of my own computer, there's a key variable that people have (unsurprisingly) missed, because you don't see it on many (if any!) grenades, and it was only mentioned in passing by Aaron several complete builds ago. Here's a line from the flare with the key variable highlighted. I use this value and not that only one, in config.xml there is the base of throwing range for all grenades. I'm looking at both CatMorbid's mod and Mikhail's Magnum-nauts, wanting to get an M79 that works nicely. Mikhail, looks like you never got yours working, because I don't see it in your release. Did either of you get one working, and by working, I mean with an arcing shot (with or without indirect ability, although with would be ideal)? It seems to work fine as a rocket. I'm kind of picking and choosing items out of various mods, rather than making wholesale changes. Is not possible put a hand weapon with "gasgrenade" type projectile? really? I think that is possible Edited July 19, 2014 by TacticalDragon Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.