Home » MODDING HQ 1.13 » v1.13 Modding, Customising, Editing » v1.13 XML Customization » XML-Attribute assignment (Questions about "Weapons.xml")
XML-Attribute assignment[message #343606] Mon, 04 January 2016 03:10 Go to next message
ATigersClaw

 
Messages:130
Registered:October 2014
Location: Braunschweig, Germany
I've just imported the "Weapons.XML" into MS Excel and have received a great list with all the weapons from 1.13. Now I've stumbled upon some questions, some of you might be able to answer.

1. Does this XML-file contain all weapons available in 1.13 or just the newly added weapons, that come with 1.13? If it doesn't contain all the weapons, where are the other weapons to be found?

2. The column "ubWeaponClass" assigns different IDs to the listed weapons. Which file contains the name which this ID represents (e. g. Desert Eagle has ubWeaponClass = 1)? Same goes for "ubWeaponType" and so on.

3. What do the "ub", "n", "sz" or "us" before the heads stand for (e. g. "ubCalibre")?

4. I've found most values that matter to me but can someone confirm to me that I did right?
Name = szWeaponName
Weapon type = ubWeaponType
Weapon class = ubWeaponClass
Calibre = ubCalibre
Mag. size = ubMagSize
Accuracy = nAccuracy
Damage = ubImpact
Range = usRange (/ 10)
APs to ready = ubReadyTime
Shots per burst = ubShotsperBurst
APs to reload = APsToReload

5. I couldn't find the right column/data for the following values. Can anyone help me out on that?
APs to attack
APs to burst
APs to autofire
Weight
Pros
Cons



JASP - Jagged Alliance StrongPoint
ja-strongpoint.com
Your source for useful gameplay information about JA 2 1.13
Re: XML-Attribute assignment[message #343614 is a reply to message #343606] Mon, 04 January 2016 11:21 Go to previous messageGo to next message
silversurfer

 
Messages:2038
Registered:May 2009
1. The file contains all weapons from 1.13.

2. Check the TableData\Lookup folder for translations.

3. Never mind those abbreviations. Usually they are an indication of what type of variable it is (us = unsigned short for example).

4. At a first glance this looks correct but there are two values for accuracy - bAccuracy for OCTH and nAccuracy for NCTH system.

5. AP values are calculated by the game using some formulas. Weight can be found in Items.xml. Pros and Cons are also calculated by the game.



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13 %20Wildfire%206.06%20-%20Maps%20MOD

Aw: Re: XML-Attribute assignment[message #343615 is a reply to message #343614] Mon, 04 January 2016 15:10 Go to previous messageGo to next message
ATigersClaw

 
Messages:130
Registered:October 2014
Location: Braunschweig, Germany
silversurfer schrieb am Mo, 04 Januar 2016 10:21
1. The file contains all weapons from 1.13.

2. Check the TableData\Lookup folder for translations.

3. Never mind those abbreviations. Usually they are an indication of what type of variable it is (us = unsigned short for example).

4. At a first glance this looks correct but there are two values for accuracy - bAccuracy for OCTH and nAccuracy for NCTH system.

5. AP values are calculated by the game using some formulas. Weight can be found in Items.xml. Pros and Cons are also calculated by the game.


Thanks for the quick response. Your answers revealed two more questions to me.

2. I found it but what is the difference between "ubWeaponClass" and "ubWeaponType". I thought one would be a sub-category but it doesn't make too much sense.

5. Aren't there any "base" values from which those formulas operate? Any kind of value which a player could compare?



JASP - Jagged Alliance StrongPoint
ja-strongpoint.com
Your source for useful gameplay information about JA 2 1.13
Re: Aw: Re: XML-Attribute assignment[message #343617 is a reply to message #343615] Mon, 04 January 2016 15:37 Go to previous messageGo to next message
silversurfer

 
Messages:2038
Registered:May 2009
J1v1n wrote on Mon, 04 January 2016 14:10

2. I found it but what is the difference between "ubWeaponClass" and "ubWeaponType". I thought one would be a sub-category but it doesn't make too much sense.

The weapon class is the base property of a weapon. The weapon type further refines that property. For example the AK-47 and DSR-1 are both rifles but one is an assault rifle and the other a sniper rifle.


J1v1n wrote on Mon, 04 January 2016 14:10

5. Aren't there any "base" values from which those formulas operate? Any kind of value which a player could compare?

You can take ubShotsPer4Turns. The higher the better.



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13 %20Wildfire%206.06%20-%20Maps%20MOD

Aw: Re: Aw: Re: XML-Attribute assignment[message #343618 is a reply to message #343617] Mon, 04 January 2016 16:30 Go to previous messageGo to next message
ATigersClaw

 
Messages:130
Registered:October 2014
Location: Braunschweig, Germany
silversurfer schrieb am Mo, 04 Januar 2016 14:37
The weapon class is the base property of a weapon. The weapon type further refines that property. For example the AK-47 and DSR-1 are both rifles but one is an assault rifle and the other a sniper rifle.

You can take ubShotsPer4Turns. The higher the better.


Great, I'm almost done working myself through this. Hopefully the last questions:

6. What does "bBurstAP" stand for? It doesn't resemble the APs needed to shoot a burst (checked ingame).

7. What does "ubDeadliness" stand for? I couldn't assign this value to a particular ingame value.

8. The column "ubCalibre" assigns different IDs to the listed weapons. Which file contains the name which this ID represents? I couldn't find any XML-file at the TableDate\Lookup folder.

[Updated on: Mon, 04 January 2016 16:31]




JASP - Jagged Alliance StrongPoint
ja-strongpoint.com
Your source for useful gameplay information about JA 2 1.13
Re: Aw: Re: Aw: Re: XML-Attribute assignment[message #343619 is a reply to message #343618] Mon, 04 January 2016 20:18 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3728
Registered:July 2009
6. You calculate single shot AP from the S/4T value and then add bBurstAP to get the final cost

7. It's an arbitrary rating of how evil a gun is. Mercs will complain if their gun isn't evil enough (defined by a value in their profile) and enemies may decide to pick up a gun if it's more evil than their current piece.

8. AmmoStrings.xml



Need help or just want to kill some time? Visit the Bear's Pit IRC ChannelNote: Say 'Hi' and be patient, it may take a few minutes for someone to react.
Latest 1.13 Builds
My Inbox is for IMPORTANT stuff, NOT random queries about the game.


Aw: Re: Aw: Re: Aw: Re: XML-Attribute assignment[message #343623 is a reply to message #343619] Tue, 05 January 2016 12:27 Go to previous messageGo to next message
ATigersClaw

 
Messages:130
Registered:October 2014
Location: Braunschweig, Germany
DepressivesBrot schrieb am Mo, 04 Januar 2016 19:18
6. You calculate single shot AP from the S/4T value and then add bBurstAP to get the final cost

7. It's an arbitrary rating of how evil a gun is. Mercs will complain if their gun isn't evil enough (defined by a value in their profile) and enemies may decide to pick up a gun if it's more evil than their current piece.

8. AmmoStrings.xml


Thank you, I'm getting the picture so far.

5. Is the damage Are the APs for single shots, burst or autofire a varying value, which is influenced by different variables or why is it calculated, instead of just using three columns for each base damage?

[Updated on: Fri, 08 January 2016 01:31]




JASP - Jagged Alliance StrongPoint
ja-strongpoint.com
Your source for useful gameplay information about JA 2 1.13
Re: Aw: Re: Aw: Re: Aw: Re: XML-Attribute assignment[message #343625 is a reply to message #343623] Tue, 05 January 2016 13:12 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3728
Registered:July 2009
Eh? I get the feeling that last question got scrambled somewhere along the way. Are you asking about AP cost or Damage?



Need help or just want to kill some time? Visit the Bear's Pit IRC ChannelNote: Say 'Hi' and be patient, it may take a few minutes for someone to react.
Latest 1.13 Builds
My Inbox is for IMPORTANT stuff, NOT random queries about the game.


Aw: Re: Aw: Re: Aw: Re: Aw: Re: XML-Attribute assignment[message #343626 is a reply to message #343625] Tue, 05 January 2016 13:50 Go to previous messageGo to next message
ATigersClaw

 
Messages:130
Registered:October 2014
Location: Braunschweig, Germany
DepressivesBrot schrieb am Di, 05 Januar 2016 12:12
Eh? I get the feeling that last question got scrambled somewhere along the way. Are you asking about AP cost or Damage?


Well you're right. I was talking about APs but wrote about damage. I fixed the post.

I asked the question because I'm working on a table to compare weapons and I would like to include base APs for single shots, burst and autofire as well.
I wouldn't even care to just type it of from the ingame screen, but it only makes sense if those values are always the same and do not differ due to certain variables.
But then, if the values are always the same why didn't they just enter the fixed value in the first place? That's where my question originates from.



JASP - Jagged Alliance StrongPoint
ja-strongpoint.com
Your source for useful gameplay information about JA 2 1.13
Re: Aw: Re: Aw: Re: Aw: Re: Aw: Re: XML-Attribute assignment[message #343628 is a reply to message #343626] Tue, 05 January 2016 15:18 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3728
Registered:July 2009
The actual AP cost will vary both from merc to merc and even for the same merc in different conditions (tired or wounded) according to their respective AP pools at the time.
If you just want to dump a normed value for comparison somewhere, use the following formula with the "Standard JA2 Merc", i.e. AP = 80 and Aim = 80:

Top = 8 * AP * 100
Bottom = floor((100 + Aim) * S4T)

APcost = (Top + Bottom / 2) / Bottom



Need help or just want to kill some time? Visit the Bear's Pit IRC ChannelNote: Say 'Hi' and be patient, it may take a few minutes for someone to react.
Latest 1.13 Builds
My Inbox is for IMPORTANT stuff, NOT random queries about the game.


Aw: Re: Aw: Re: Aw: Re: Aw: Re: Aw: Re: XML-Attribute assignment[message #343629 is a reply to message #343628] Tue, 05 January 2016 16:09 Go to previous messageGo to next message
ATigersClaw

 
Messages:130
Registered:October 2014
Location: Braunschweig, Germany
DepressivesBrot schrieb am Di, 05 Januar 2016 14:18
The actual AP cost will vary both from merc to merc and even for the same merc in different conditions (tired or wounded) according to their respective AP pools at the time.
If you just want to dump a normed value for comparison somewhere, use the following formula with the "Standard JA2 Merc", i.e. AP = 80 and Aim = 80:

Top = 8 * AP * 100
Bottom = floor((100 + Aim) * S4T)

APcost = (Top + Bottom / 2) / Bottom


Thanks alot for that formula.
Ok, I thought all my questions were answered but then I just started a game, hired different mercs with different stats and gave all of them the same weapon, just to see how the APs (due to the calculation) would vary.
Well, the base APs for single shot, burst and autofire were carved in stone and didn't change at anytime.
So, just out of curiosity: what am I not getting here? No base values in the xml-files, you and silversurfer stated so too and then the base AP values are the same for different mercs with different stats.

Just to make sure we don't talk past each other, I've added a screenshot of my comparison.
http://www2.pic-upload.de/thumb/29334079/JA21.13-AP-Comparison.jpg

[Updated on: Tue, 05 January 2016 16:44]




JASP - Jagged Alliance StrongPoint
ja-strongpoint.com
Your source for useful gameplay information about JA 2 1.13
Re: Aw: Re: Aw: Re: Aw: Re: Aw: Re: Aw: Re: XML-Attribute assignment[message #343630 is a reply to message #343629] Tue, 05 January 2016 16:30 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3728
Registered:July 2009
Looks like the code for that interface uses normed values as well. Try actually shooting someone ... for science.



Need help or just want to kill some time? Visit the Bear's Pit IRC ChannelNote: Say 'Hi' and be patient, it may take a few minutes for someone to react.
Latest 1.13 Builds
My Inbox is for IMPORTANT stuff, NOT random queries about the game.


Aw: Re: Aw: Re: Aw: Re: Aw: Re: Aw: Re: Aw: Re: XML-Attribute assignment[message #343631 is a reply to message #343630] Tue, 05 January 2016 16:44 Go to previous messageGo to next message
ATigersClaw

 
Messages:130
Registered:October 2014
Location: Braunschweig, Germany
DepressivesBrot schrieb am Di, 05 Januar 2016 15:30
Looks like the code for that interface uses normed values as well. Try actually shooting someone ... for science.


I did and when aiming the aforementioned calculation executes. Different mercs with the same stance (incl. aiming), the same distance to the enemy, the same weapon and so on get different AP requirements.
Now, for me those base values are all that I need for my comparison table.

5. Is it possible to get the formula on how the game gets to those base values?

[Updated on: Fri, 08 January 2016 01:30]




JASP - Jagged Alliance StrongPoint
ja-strongpoint.com
Your source for useful gameplay information about JA 2 1.13
Aw: Re: Aw: Re: Aw: Re: Aw: Re: Aw: Re: Aw: Re: XML-Attribute assignment[message #343669 is a reply to message #343631] Fri, 08 January 2016 01:28 Go to previous messageGo to next message
ATigersClaw

 
Messages:130
Registered:October 2014
Location: Braunschweig, Germany
Sorry guys, I'm new to all those XML-files and am still trying to figure out how and where different values are being saved.

5. Doesn't anybody know how the game is getting to the above mentioned (and screen-captured) values (base APs for single shot, burst and autofire)?

10. Where can I find all the values about ammunition (e. g. armor piercing, bullet tumble, range modifier, etc.)?

11. Where can I find all the values for the backgrounds? I just realized that many mercs have got their own background which don't fit into the ones you can choose at I.M.P..

[Updated on: Fri, 08 January 2016 03:08]




JASP - Jagged Alliance StrongPoint
ja-strongpoint.com
Your source for useful gameplay information about JA 2 1.13
Re: Aw: Re: Aw: Re: Aw: Re: Aw: Re: Aw: Re: Aw: Re: XML-Attribute assignment[message #343671 is a reply to message #343669] Fri, 08 January 2016 04:34 Go to previous messageGo to next message
edmortimer

 
Messages:757
Registered:January 2015
Location: Home Free
re: 11. - ../Data-1.13/TableData/Backgrounds.XML




Arulco Vacations Blog

Arulco Vacations Bears Pit Forum

Re: Aw: Re: Aw: Re: Aw: Re: Aw: Re: Aw: Re: Aw: Re: XML-Attribute assignment[message #343675 is a reply to message #343669] Fri, 08 January 2016 13:34 Go to previous messageGo to next message
silversurfer

 
Messages:2038
Registered:May 2009
ATigersClaw wrote on Fri, 08 January 2016 00:28
Sorry guys, I'm new to all those XML-files and am still trying to figure out how and where different values are being saved.

5. Doesn't anybody know how the game is getting to the above mentioned (and screen-captured) values (base APs for single shot, burst and autofire)?

You can look at function "DrawWeaponValues" in "Tactical\Interface Enhanced.cpp" of the source code. That shows you how the different AP values are calculated that you can see in the description box.

Base AP is done in function "BaseAPsToShootOrStabNoModifier" in Tactical\Points.cpp.
Base burst AP is base AP + "CalcAPsToBurstNoModifier" which is also in Tactical\Points.cpp.
Base auto AP is base AP + "CalcAPsToAutofireNoModifier" which is also in Tactical\Points.cpp.

The functions and calculations are not easy to explain and best checked with Visual Studio because you can follow references to other functions much easier than you can with a text editor.


ATigersClaw wrote on Fri, 08 January 2016 00:28

10. Where can I find all the values about ammunition (e. g. armor piercing, bullet tumble, range modifier, etc.)?

Ammo values are in TableData\Items\AmmoTypes.xml



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13 %20Wildfire%206.06%20-%20Maps%20MOD

Aw: Re: Aw: Re: Aw: Re: Aw: Re: Aw: Re: Aw: Re: Aw: Re: XML-Attribute assignment[message #343678 is a reply to message #343675] Fri, 08 January 2016 16:47 Go to previous message
ATigersClaw

 
Messages:130
Registered:October 2014
Location: Braunschweig, Germany
edmortimer schrieb am Fr, 08 Januar 2016 03:34
re: 11. - ../Data-1.13/TableData/Backgrounds.XML

Thanks buddy!


silversurfer schrieb am Fr, 08 Januar 2016 12:34
You can look at function "DrawWeaponValues" in "Tactical\Interface Enhanced.cpp" of the source code. That shows you how the different AP values are calculated that you can see in the description box.

Base AP is done in function "BaseAPsToShootOrStabNoModifier" in Tactical\Points.cpp.
Base burst AP is base AP + "CalcAPsToBurstNoModifier" which is also in Tactical\Points.cpp.
Base auto AP is base AP + "CalcAPsToAutofireNoModifier" which is also in Tactical\Points.cpp.

The functions and calculations are not easy to explain and best checked with Visual Studio because you can follow references to other functions much easier than you can with a text editor.

Thank you very much for taking a detailed look into the files. This seems rather complicated from my point of view as I have no skills in any coding language and their functions. Maybe I should just type the info off of the ingame screen.


silversurfer schrieb am Fr, 08 Januar 2016 12:34
Ammo values are in TableData\Items\AmmoTypes.xml

Thank you again, I'll check it out.



JASP - Jagged Alliance StrongPoint
ja-strongpoint.com
Your source for useful gameplay information about JA 2 1.13
Previous Topic: Deleting items in XML editor
Next Topic: Uniform Colors XML Problem
Goto Forum:
  


Current Time: Sun Mar 26 06:28:24 EEST 2017

Total time taken to generate the page: 0.00916 seconds