View Full Version : Modifying ranges of the weapons
Vähäkylä
01-03-2009, 15:52
Could someone make me a small mod that only increases all ranges by 3 or 4 times to make them more realistic. I want to shoot miles away with the tiger, not to the end of the street. I have no knowledge of modding, but I understand this would not be hard to make in a few moments.
Thank you.
Vähäkylä
01-03-2009, 17:45
Or if I would make my own mod for these ranges, where would I find these files to edit all the ranges? Cannons, tanks, small arms and such?
highflyaviato
01-03-2009, 17:52
I think the files are in properties/set folder of the game. You will find other folders that say smg, rifle, gun, etc. in the set folder. If what you are looking for is not in the set folder look in the entity folder and find the tank you wish to modify.
SS-Kommando
01-03-2009, 18:00
\resource\set\stuff\
You can open all of the files with notepad. If there is something you do not understand, feel free to ask and I will answer to the best of my ability.
/SS-Kommando
Vähäkylä
01-03-2009, 18:21
Small arms i a have changed, but i don't understand the "gun" file. So many ranges, so many options. WHat to change? I changed some, but the game crashes.
SS-Kommando
01-03-2009, 18:41
Small arms i a have changed, but i don't understand the "gun" file. So many ranges, so many options. WHat to change? I changed some, but the game crashes.
I will give you an example how to change the range of a gun in the game.
Let's say you wish to increase the range of the PzKpfw IV Ausf.H's gun to 500 metres. First enter the file in the gun folder called "75mm_kwk40(l48)" (without the quotes).
When there, you will see the following piece of code:
{from "75mm_kwk40" ; Pz4H"
("range_100+")
{rechargeTime 6}
{projectileDamage 112}
("damage3" a(122) b(98) c(74))
("accuracy_pz4")
("75-76caliber")
}
The text I highlighted is what decides the range of its cannon, but this is a definition of a range taken from another file called .presets, which is also in the gun folder. Let's enter the file ".presets" and have a look for "range_100+".
The code for "range_100+", found in the file ".presets":
(define "range_100+"
{curve "gun_heavy"}
{spreading
; {radiusFunction
; 0.0 0
; 0.5 0.75
; 1.0 2.5
; 1.5 6.0
; 3.0 15.0
; }
{SpreadXYRatio 1.3}
; {SpreadYadjust 0.2}
{SpreadPower 1.2}
}
{SpreadTolerance 0.5}
{range 110 130}
(mod not "mp"
{range 90 110}
)
{ZeroingAccuracy 0.88 0.76}
{parameters "fg"
{spreading
{SpreadXYRatio 1.8}
{SpreadPower 1.1}
; {SpreadYadjust 0.1}
(mod not "mp"
{SpreadXYRatio 1.4}
{SpreadPower 0.7}
{SpreadYadjust 0.1}
)
}
}
{RelaxationTime 0.3}
{gravity 2.2}
)
There I have highlighted where you change the range for "range_100+". I'm not fully sure why it stands "110" first followed by "130", but I believe that it means that the gun is able to hit its target with reasonable accuracy at 110 metres, while accuracy will significantly decrease at 130 metres, even though it works to shot that far (someone with more knowledge please fill me up on this if possible).
Alright, so let's increase the ranges to 500 metres now. Make the following changes in "75mm_kwk40(l48)":
{from "75mm_kwk40" ; Pz4H"
("range_500")
{rechargeTime 6}
{projectileDamage 112}
("damage3" a(122) b(98) c(74))
("accuracy_pz4")
("75-76caliber")
}
And this you add in ".presets":
(define "range_500"
{curve "gun_heavy"}
{spreading
; {radiusFunction
; 0.0 0
; 0.5 0.75
; 1.0 2.5
; 1.5 6.0
; 3.0 15.0
; }
{SpreadXYRatio 1.3}
; {SpreadYadjust 0.2}
{SpreadPower 1.2}
}
{SpreadTolerance 0.5}
{range 500 500}
(mod not "mp"
{range 90 110}
)
{ZeroingAccuracy 0.88 0.76}
{parameters "fg"
{spreading
{SpreadXYRatio 1.8}
{SpreadPower 1.1}
; {SpreadYadjust 0.1}
(mod not "mp"
{SpreadXYRatio 1.4}
{SpreadPower 0.7}
{SpreadYadjust 0.1}
)
}
}
{RelaxationTime 0.3}
{gravity 2.2}
)
I hope you understood now. Good luck and note that if you mod your core game files, you will not be able to play with those that are using original values.
/SS-Kommando
Vähäkylä
01-03-2009, 20:11
Fine so far, but where can i edit all the mortars?
SS-Kommando
01-03-2009, 21:59
Fine so far, but where can i edit all the mortars?
I'm not sure, but I can look it up tomorrow if you have not found it out by then.
/SS-Kommando
TTorpedo
01-03-2009, 22:07
When changing ranges you will probably want to change vision ranges to, and then awareness..
Vähäkylä
01-03-2009, 22:35
HOw?
First, I would say that you can have all the weapon files in the same folder.
The folders is just there to categorize the weapons as you would giving them labels.
Mortars are inside the \set\stuff\reactive folder.
Most high caliber weapons are inside reactive. Also some special weapons like the torpedo.
This is because they have large rockets or the shell and that they are visible between being shot and hit.
\set\stuff\bombing
is of course if you want to edit the bombs of the planes.
\set\stuff\special
is for things that doesn't fit in any other categories.
\set\stuff\body
is for body armors or equipment that doesn't really do any damage, just for the view.
\set\stuff\head
only needs attention when your adding a new headgear.
Just copy one of the old files and rename it (And the content text) to the name of your headgear.
Other folders are most likely logic.
Every new weapon or equipment must have a file that defines its presence, or it wont show up in the game.
Only as a Huge Red Dot with an question mark!
:typing:
Vähäkylä
02-03-2009, 14:08
Alright, I have done work now. I changed everything. I'm pretty sure I did not miss anything, and now every weapon has a range from 200 meters to 11000 meters. I also modified many of the speeds of SMG, Rifle, Pistol and Mguns. However, I haven't modified the speeds of guns, like cannons and such, cause i can't find where they are?
Same thing with accuracy. Most of the tanks should be able to shoot pinpoint-accuracy to 300 meters, not 30 meters. However, I have no knowledge how to do this.
Vähäkylä
02-03-2009, 17:36
I released a beta of my mod in the "Mod release" section of the forum. Try it.
Vähäkylä
02-03-2009, 21:58
How to add more power to the guns? A AT gun does not easily penetrate the armour at 200 meters. I would like to add more power to these shots.
SS-Kommando
02-03-2009, 23:06
How to add more power to the guns? A AT gun does not easily penetrate the armour at 200 meters. I would like to add more power to these shots.
{from "75mm_kwk40" ; Pz4H"
("range_100+")
{rechargeTime 6}
{projectileDamage 112}
("damage3" a(122) b(98) c(74))
("accuracy_pz4")
("75-76caliber")
}
This is where you decide the damage of a gun (in this case in the file of the 75mm KwK 40 of the PzKpfw IV Ausf.H).
/SS-Kommando
Vähäkylä
02-03-2009, 23:21
Does this help with penetration of armour at the long distances?
Does this help with penetration of armour at the long distances?
Yes, and this is my theory;
Basically, with having 3 different values, the engine calculates the pattern with the numbers that will show up in game as the penetration value (The number when you aim.
So at range a, you'll have 122mm penetration. At range b, you'll have 98mm penetration. And on range c, you'll have 74mm penetration. (We just call it mm, but I'm not sure if it is).
Then the engine calculates the difference between the 2 values (Range and penetration).
So it can make a an X/Y curve. Its like most data systems. Having 3 values will give enough information to calculate the other values.
Its like working with an unknown equation. (I hope I wrote that right, it sounds explainable in Norwegian).
To find the X, you use the number you know.
This is basically the same way the engine finds out the other values with what you write in.
Its the same with a GPS. You need 3 values to have an estemated position.
You should take in account that "damage3" is a preset. So you should check the preset file, before saving your work.
Maybe you can enhance it? :yes:
Vähäkylä
04-03-2009, 13:27
Now I'm having strange crash again.
>>>>>>>main
>>>>>>mp.threa_single.exec
>>>>>thread.exe
>>>>clockthread:onExecute
>>>File"/set/stuff/gun100mm_d10c"
>>file "define 'accuracy_panther' "
>file "define accuracy
2: {spreading
3: {radiusTable {0 0} {50 (* 0.3 %r1)} {110 (* 0.45 %r2)} {130 (* 0.75 %r2)} {170 (* 1.05 %r2)}}
4: }
5: {parameters "fg"
6: {spreading
The game points out that there is something wrong in this:
(define "accuracy"
{spreading
{radiusTable {0 0} {50 (* 0.3 %r1)} {110 (* 0.45 %r2)} {130 (* 0.75 %r2)} {170 (* 1.05 %r2)}}
}
{parameters "fg"
{spreading
{radiusTable {0 0} {50 (* 0.5 %r1)} {110 (* 0.45 %r2)} {130 (* 0.8 %r2)} {170 (* 1.2 %r2)}}
}
}
This sshould not crash. There is nothing wrong with it!
I cannot continue. I have no idea where it fails. I haven't even touched the "100_d10c" file where the error points out. It is over my head. Someone please help.
Hi to all, i'm new here, i have a problem whit range of small arms mguns guns... i've change the range in the set/stuff.. folder, than i've put it in the original game.pak file, but when i lunch the editor, not change i see!! :huh: the range is alway the same...Why..? please help..
Is there an updated version of this for the new patch?
cheers
:realbig:
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.