Home » MODDING HQ 1.13 » v1.13 Modding, Customising, Editing » v1.13 XML Customization » Changing throwing distances - possible?
Changing throwing distances - possible?[message #352897] Mon, 02 April 2018 12:59 Go to next message
therealmidnite
Messages:4
Registered:April 2018
Location: Roannapur
Raw user here, and knowing where to post stuff is somewhat confusing, but here goes... I've looked everywhere, and I can't find anything in the .xml files that controls min-max throwing distances. Can they be edited? Also, is it possible to edit the characteristics of detonators so that they have a set time? I'm trying to come up with a way to make grenades work in a way that don't suck as hard as the current 1.13 variety.
Re: Changing throwing distances - possible?[message #352901 is a reply to message #352897] Mon, 02 April 2018 13:45 Go to previous messageGo to next message
The_Bob

 
Messages:407
Registered:May 2009
Location: Behind you.
There's a "delayed mode" for grenades, you need to open item details and click the image. Not sure if there's a global toggle for that. There's a forum post here somewhere with the details of how it works and a demo.
Throwing range depends on merc stats and item weight, not sure if the actual modifier is exposed anywhere in ini or xml files, but there's a range modifier for grenades/throwing knives in item_Settings.ini, look for Weapon Range Settings

Re: Changing throwing distances - possible?[message #352915 is a reply to message #352901] Tue, 03 April 2018 02:21 Go to previous messageGo to next message
therealmidnite
Messages:4
Registered:April 2018
Location: Roannapur
Wow, fast reply! I kind of figured that... I thought I'd be clever and use detonators as placeholder grenade fuzes (which would also allow me to mess around with all the different type of IED-devices I'm familiar with). But alas, it just doesn't look like it's going to happen. Just for interest's sake - how much of a coding genius does one have to be to expose these modifiers?

[Updated on: Tue, 03 April 2018 02:25]

Re: Changing throwing distances - possible?[message #352930 is a reply to message #352915] Tue, 03 April 2018 23:35 Go to previous messageGo to next message
The_Bob

 
Messages:407
Registered:May 2009
Location: Behind you.
To be precise, when i wrote modifier there I was thinking about something like ([merc strength]*[modifier])/[item weight], but in reality the formula is much more complicated now, with merc traits and condition, and item stats affecting how far they can throw. Still there probably is some place where weight-to-strength (or weight-to-overall-merc-ability) is calculated for the purpose of throwing stuff and a part of the formula could be exposed, or maybe a modifier could be added to effective item weight when stuff is calculated... Or maybe not, since I don't feel like looking it up the code right now...

Anyhow, when it comes to exposing variables to ini files, I'd say it's 90% looking for where stuff is actually done in the code, and 10% actually adding a new config option to the code and ini files. The second part is rather easy, since it's mostly just copy-paste, while the difficulty of finding stuff in the code can vary... Most of the time it's more about determination rather than coding skill, although there's a bunch of places where things get convoluted to the point where it's nearly impossible to figure out what's going on without some broader idea of what the code was meant to accomplish.

Adding new stats to item XML ix 25x more tedious compared to ini files, but otherwise it's still more about finding a good place to handle the new attributes than adding the code to the XML reader.

Re: Changing throwing distances - possible?[message #352956 is a reply to message #352930] Thu, 05 April 2018 02:21 Go to previous messageGo to next message
therealmidnite
Messages:4
Registered:April 2018
Location: Roannapur
I've been scanning through the 8550 source code for two days now, and if it's there, I sure as hell can't see it. Anyway, thanks for the info.
Re: Changing throwing distances - possible?[message #352957 is a reply to message #352956] Thu, 05 April 2018 05:25 Go to previous messageGo to next message
The_Bob

 
Messages:407
Registered:May 2009
Location: Behind you.
Look for GunRange() and CalcMaxTossRange() in Weapons.cpp, looks to me that the code around these parts is of the interesting variety so good luck big grin

Re: Changing throwing distances - possible?[message #352969 is a reply to message #352957] Thu, 05 April 2018 12:11 Go to previous message
therealmidnite
Messages:4
Registered:April 2018
Location: Roannapur
Aww, thanks! I went over weapons.cpp, but didn't spot that. Learning to wade through these properly is going to be tough...
Previous Topic: Good compact guide about LBE xml-editing?
Next Topic: Bizarre Caliber/Attachment Issue
Goto Forum:
  


Current Time: Wed Nov 14 02:35:52 EET 2018

Total time taken to generate the page: 0.01105 seconds