Home » MODDING HQ 1.13 » v1.13 Modding, Customising, Editing » v1.13 XML Customization » A Serious of Questions (An evolving list)
A Serious of Questions[message #360982]
|
Sat, 22 August 2020 03:45
|
|
SinMachina |
  |
Messages:48
Registered:August 2020 |
|
|
Edit: The following series of questions are in accordance with " SCI May revision 8796 gameDIV 2531 "
So I've been editing the game on and off for about 10 years now, but I'm really diving in deep for the first time and starting completely fresh with a better understanding of coding, game balance and how JA just functions.
With that said however, I do still have a series of questions that I can't seem to find answers for [ that still seem applicable at least ] or that completely lack documentation [as far as I can tell ]. So, if these have been answered or are documented, apologies, I will gladly read from where they are located from.
1 : The various Personality Traits and Disabilities as mentioned here http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=24450&start=0& , I'm not sure if they actually do anything. silversurfer Says they are hardcoded but I can't find where they are referenced to. They are listed here http://ja2v113.pbworks.com/w/page/4218320/%22How%20does%20it%20work%22%20Part%202%3A%20Character%20Skills on the old PBWorks wiki, but I'm not sure if that is accurate anymore. If the PBWorks information is still correct, I had read elsewhere here that there needs to be sound file with the associated check trigger to notify the player that the trait is happening. Example: Biff is happy that we retreated successfully, and gets a morale boost. Is the sound file actually required for the morale to change, or is it just to let the player be notified that the event happened? If not, is it possible to have a pop up text, or chat log text in place of an audio file?
2: Can all RPC require a salary? Such as, can Miguel require 200$ to hire? Do RPC salaries have to be daily? Is there a pop up text box or audio file required for this, such as with Dynamo? If this is possible, how can I go about adding this? Is it just adding daily salary to the MercProfile.XML ?
3: Is there a reason that JA2_Options.XML has these limits?
; Player mercs, valid values 16 through 32, default is 24
MAX_NUMBER_PLAYER_MERCS = 32
; Player vehicles, valid values 2 through 6, default is 2
MAX_NUMBER_PLAYER_VEHICLES = 2
I seem to recall a video from many years go that that played the Omerta drop with something like 60 characters. Is that still possible? Or is JA2_Options not called on anymore? Is there a way to allow the player to hire everyone in the game?
3: Enhanced Description Box Display, I've read and re-read http://ja2v113.pbworks.com/w/page/4218337/Enhanced%20Description%20Box but I simply cannot find out how the damage is displayed. I've looked at AmmoTypes.XML as that seems the most appropriate [ along with Item and Weapon.XML ] and I see these fields
<dDamageModifierLife>
<dDamageModifierBreath>
which seems to be what I'm looking for, but they are modifiers, not flat values. I can't seem to find the flat values anywhere, or how the values are calculated. I don't care if its what's displayed in the EDB or BobbyRays, I'm just trying to make a table for it all. FruloSK's http://ja2.furlo.sk/index_8670.htm exists, and that is amazing, but I'm looking at just making a spreadsheet to look up on my computer / phone.
4: MercStartingGear.XML ; At the start of each GEARKIT there is <mPriceMod>0</mPriceMod> ; And I'm not sure exactly what that does, or how it is calculated. I'm also not really sure how gearkit prices are calculated, because it doesn't seem like they are all just the total sum of item*quantity + [next.next.next] =$. I'm guessing PriceMod is a % mod to the total cost [if that is even how the base price is calculated], but then there is this field here " <mAbsolutePrice>-1</mAbsolutePrice> " and the value seems to always be -1. So I'm not sure at all how any of this actually works. This topic seemed to be the most recent discussion on this http://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=358203&&srch=Description+Box#msg_358203 but doesn't really provide the answers I need [and even asks some of these questions too].
5: Backgrounds ; If enabled, does every uiID need a background assigned? Can multiple backgrounds be shared? There is also this rather informative topic here http://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=352151&&srch=Description+Box#msg_352151 that goes into some of the minutia that I'm going to be working with, but mentions that some of the values where reversed from what they were intended to be. Does anyone know if these were fixed? If not, I can do it eventually.
Thank you guys for all your hard work and information sharing. I've loved this place since I was a kid and am really looking forward to figuring some of this out again.
[Updated on: Sun, 23 August 2020 16:57] Report message to a moderator
|
Corporal
|
|
|
|
|
|
|
Re: A Serious of Questions[message #360989 is a reply to message #360982]
|
Sun, 23 August 2020 02:59 
|
|
SinMachina |
  |
Messages:48
Registered:August 2020 |
|
|
Edit: The following series of questions are in accordance with " SCI May revision 8796 gameDIV 2531 "
MercProfiles.XML ; Many mercs have <bHatedNationality > -1 </bHatedNationality > with the value being -1, but from what I can tell from the documentation -1 isn't an identified value. The values listed are:
Care Level
Appearance
Refinement
Hated Nationality
0 None
1 Some
2 Extreme
So is this feature not actually working or am I missing something?
Covert Ops; Skill benefits specially reference
; Bonus to cth with covert melee weapons
COVERT_MELEE_CTH_BONUS = 40
; Bonus chance to perform instakill with covert melee weapons
COVERT_MELEE_INSTAKILL_BONUS = 35
, but from what I can find, there is no flag that makes sense that would designate an item as " covert ". So what items does this refer to? Or is it just referring to attacks made while disguised?
Throwing ; So I understand that throwing knives function basically as guns, but with a focus on STR as well as MRK, but what about grenades? Is their distance based on STR? What about accuracy to land where you are aiming? Is the High-Angle Grenade option only for grenade launchers or thrown as well?
Stealth ; is it just calculated based on experience level, stealth skill, and if actively sneaking? Is there any other stat associated [like AGI or WIS]?
How do you use a cleaning kit? Does it have a modifier that I can't find in regards to repairing items, or does it slow degrade rate if carried?
Do the Retractable and Folding stocks actually lower ready AP cost? Their Items.XML file doesn't have any of the following fields
<BurstToHitBonus>0</BurstToHitBonus>
<AutoFireToHitBonus>0</AutoFireToHitBonus>
<APBonus>0</APBonus>
<PercentBurstFireAPReduction>0</PercentBurstFireAPReduction>
<PercentAutofireAPReduction>0</PercentAutofireAPReduction>
<PercentReadyTimeAPReduction>0</PercentReadyTimeAPReduction>
<PercentReloadTimeAPReduction>0</PercentReloadTimeAPReduction>
<PercentAPReduction>0</PercentAPReduction>
<PercentStatusDrainReduction>0</PercentStatusDrainReduction>
<RecoilModifierX>0</RecoilModifierX>
<RecoilModifierY>0</RecoilModifierY>
<PercentRecoilModifier>0</PercentRecoilModifier>
<PercentAccuracyModifier>0</PercentAccuracyModifier>
and instead are only this
<ITEM>
<uiIndex>1008</uiIndex>
<szItemName>Folding Stock</szItemName>
<szLongItemName>Folding Stock</szLongItemName>
<szItemDesc>This new stock will allow you to raise your weapon faster, but you may have a slightly harder time hitting things.</szItemDesc>
<szBRName>Folding Stock</szBRName>
<szBRDesc>Get your weapon up before the other guy does, with this new folding stock. Usable with most fixed stock firearms.</szBRDesc>
<usItemClass>268435456</usItemClass>
<AttachmentClass>32</AttachmentClass>
<nasAttachmentClass>32</nasAttachmentClass>
<ubGraphicType>1</ubGraphicType>
<ubGraphicNum>234</ubGraphicNum>
<ubWeight>3</ubWeight>
<ubPerPocket>2</ubPerPocket>
<ItemSize>25</ItemSize>
<usPrice>400</usPrice>
<ubCoolness>5</ubCoolness>
<bRepairEase>3</bRepairEase>
<Damageable>1</Damageable>
<Repairable>1</Repairable>
<Metal>1</Metal>
<Sinks>1</Sinks>
<Attachment>1</Attachment>
<BigGunList>1</BigGunList>
<BR_NewInventory>3</BR_NewInventory>
<BR_UsedInventory>1</BR_UsedInventory>
<ToHitBonus>-1</ToHitBonus>
<usOverheatingCooldownFactor>100.0</usOverheatingCooldownFactor>
<STAND_MODIFIERS/>
<CROUCH_MODIFIERS />
<PRONE_MODIFIERS />
</ITEM>
I'm also unsure of if something like the Rifle Sling
<ITEM>
<uiIndex>1525</uiIndex>
<szItemName>Rifle Sling</szItemName>
<szLongItemName>Rifle Sling</szLongItemName>
<szItemDesc>This simple sling prevents you from losing your gun in the heat of combat.</szItemDesc>
<szBRName>Rifle Sling</szBRName>
<szBRDesc>Don't waste time putting your rifle back into your inventory. With this you can just drop your rifle and grab your trusted sidearm.</szBRDesc>
<usItemClass>268435456</usItemClass>
<AttachmentClass>524288</AttachmentClass>
<nasAttachmentClass>256</nasAttachmentClass>
<nasLayoutClass>1</nasLayoutClass>
<ubGraphicType>2</ubGraphicType>
<ubGraphicNum>218</ubGraphicNum>
<ubWeight>2</ubWeight>
<ubPerPocket>4</ubPerPocket>
<ItemSize>16</ItemSize>
<usPrice>80</usPrice>
<ubCoolness>3</ubCoolness>
<Sinks>1</Sinks>
<Attachment>1</Attachment>
<BR_NewInventory>5</BR_NewInventory>
<BR_UsedInventory>2</BR_UsedInventory>
<usOverheatingCooldownFactor>100.0</usOverheatingCooldownFactor>
<STAND_MODIFIERS />
<CROUCH_MODIFIERS />
<PRONE_MODIFIERS />
</ITEM>
Actually does anything either. Its listed as LBE Handcuffs... There are loads of items that seem to carry only the identifier flags, and inventory flags. Do the identifier flags do things on their own in the code and I'm not seeing it or are items like the Rifle Sling not actually doing something?
How does <ubNeedForSleep > </ubNeedForSleep > get factored? I assume base sleep requirement is 8 hours, and then 'need for sleep' is a multiplier on that, but testing in game I can't come to a nice % reliably.
Thanks for the above replies. I think edmortimer is right about the condition of the item from MercStartingGear.XML doesn't effect the price. I tried adjusting various types of items in very conditions / consumability and it didn't seem to affect the gearkit price like it does at a shop.
[Updated on: Sun, 23 August 2020 16:57] Report message to a moderator
|
Corporal
|
|
|
|
Re: A Serious of Questions[message #360993 is a reply to message #360989]
|
Sun, 23 August 2020 12:28 
|
|
silversurfer |
  |
Messages:2790
Registered:May 2009 |
|
|
SinMachina wrote on Sun, 23 August 2020 01:59
, but from what I can find, there is no flag that makes sense that would designate an item as " covert ". So what items does this refer to? Or is it just referring to attacks made while disguised?
Covert items have the "covert" <ItemFlag> in Items.xml. Item flags are defined in "Item Types.h":
Toggle Spoiler
// -------- added by Flugente: various item flags --------
// flags used for various item properties (easier than adding 32 differently named variables). DO NOT CHANGE THEM, UNLESS YOU KNOW WHAT YOU ARE DOING!!!
// note that these should not be used to determine what kind of an attachment an item is, that is determined by attachmentclass and the AC_xxx flags above
#define BLOOD_BAG 0x00000001 //1 // this item is a blood bag can can be used to boost surgery
#define MANPAD 0x00000002 //2 // this item is a MAn-Portable Air-Defense System
#define BEARTRAP 0x00000004 //4 // a mechanical trap that does no explosion, but causes leg damage to whoever activates it
#define CAMERA 0x00000008 //8
#define WATER_DRUM 0x00000010 //16 // water drums allow to refill canteens in the sector they are in
#define MEAT_BLOODCAT 0x00000020 //32 // retrieve this by gutting a bloodcat
#define MEAT_COW 0x00000040 //64 // retrieve this by gutting a cow
#define BELT_FED 0x00000080 //128 // item can be fed externally
#define AMMO_BELT 0x00000100 //256 // this item can be used to feed externally
#define AMMO_BELT_VEST 0x00000200 //512 // this is a vest that can contain AMMO_BELT items in its medium slots
#define CAMO_REMOVAL 0x00000400 //1024 // item can be used to remove camo
#define CLEANING_KIT 0x00000800 //2048 // weapon cleaning kit
#define ATTENTION_ITEM 0x00001000 //4096 // this item is 'interesting' to the AI. Dumb soldiers may try to pick it up
#define GAROTTE 0x00002000 //8192 // this item is a garotte
#define COVERT 0x00004000 //16384 // if LBE, any gun inside will be covert. On a gun, it will be covert in any LBE, even if the LBE does not have that tag itself
#define CORPSE 0x00008000 //32768 // a dead body
#define SKIN_BLOODCAT 0x00010000 //65536 // retrieve this by skinning (=decapitating) a bloodcat
#define NO_METAL_DETECTION 0x00020000 //131072 // a planted bomb with this flag can NOT be detected via metal detector. Use sparingly!
#define JUMP_GRENADE 0x00040000 //262144 // add +25 heigth to explosion, used for bouncing grenades and jumping mines
#define HANDCUFFS 0x00080000 //524288 // item can be used to capture soldiers
#define TASER 0x00100000 //1048576 // item is a taser, melee hits with this will drain breath (if batteries are supplied)
#define SCUBA_BOTTLE 0x00200000 //2097152 // item is a scuba gear air bottle
#define SCUBA_MASK 0x00400000 //4194304 // item is a scuba gear breathing mask
#define SCUBA_FINS 0x00800000 //8388608 // this item speed up swimming, but slows walking and running
#define TRIPWIREROLL 0x01000000 //16777216 // this item is a tripwire roll
#define RADIO_SET 0x02000000 //33554432 // item can be used to radio militia/squads in other sectors
#define SIGNAL_SHELL 0x04000000 //67108864 // this is a signal shell that precedes artillery barrages
#define SODA 0x08000000 //134217728 // item is a can of soda, sold in vending machines
#define ROOF_COLLAPSE_ITEM 0x10000000 //268435456 // this item is required in the collapsing of roof tiles. It is used internally and should never be seen by the player
#define DISEASEPROTECTION_1 0x20000000 //536870912 // this item protects us from getting diseases by human contact if kept in inventory
#define DISEASEPROTECTION_2 0x40000000 //1073741824 // this item protects us from getting diseases by human contact if kept in inventory
#define LBE_EXPLOSIONPROOF 0x80000000 //2147483648 // any gear in LBE with this flag is protected from explosions
// extended flagmask to UINT64
#define EMPTY_BLOOD_BAG 0x0000000100000000 // this item is a empty blood bag
#define MEDICAL_SPLINT 0x0000000200000000 // this item is a medical splint that can be applied to some diseases
Check the Garotte for example (item 1579). It has <ItemFlag> 24576, that's 0x00006000. Split that up and you get 0x00002000 and 0x00004000 which means it's "covert" and a Garotte.
SinMachina wrote on Sun, 23 August 2020 01:59
How do you use a cleaning kit? Does it have a modifier that I can't find in regards to repairing items, or does it slow degrade rate if carried?
That depends on the version of JA2 that you are playing. Since r8325 you use cleaning kits to clean guns with the "Repair Items" assignment. Check this for further details. In older versions you'd use the CTRL + "." hotkey on the tactical map to get a menu that allowed you to instantly clean guns using a cleaning kit.
SinMachina wrote on Sun, 23 August 2020 01:59
Do the Retractable and Folding stocks actually lower ready AP cost? Their Items.XML file doesn't have any of the following fields
Folding/Retractable Stocks were changed in the past. I don't remember exactly how, but you can read this for details. I need to leave now and may come back for more answers later.
Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MODReport message to a moderator
|
|
|
|
Re: A Serious of Questions[message #360995 is a reply to message #360989]
|
Sun, 23 August 2020 15:15 
|
|
silversurfer |
  |
Messages:2790
Registered:May 2009 |
|
|
SinMachina wrote on Sun, 23 August 2020 01:59MercProfiles.XML ; Many mercs have <bHatedNationality > -1 </bHatedNationality > with the value being -1, but from what I can tell from the documentation -1 isn't an identified value. The values listed are:
Care Level
Appearance
Refinement
Hated Nationality
0 None
1 Some
2 Extreme
So is this feature not actually working or am I missing something?
Don't confuse bHatedNationality with bHatedNationalityCareLevel. bHatedNationality = -1 means no nationality.
SinMachina wrote on Sun, 23 August 2020 01:59
I'm also unsure of if something like the Rifle Sling
...
Actually does anything either. Its listed as LBE Handcuffs... There are loads of items that seem to carry only the identifier flags, and inventory flags. Do the identifier flags do things on their own in the code and I'm not seeing it or are items like the Rifle Sling not actually doing something?
The Rifle Sling has a specific attachment class 524288 (0x00080000h) which is used for certain stuff in the code. For example guns with a rifle sling cannot be taken by force. Also you don't spend AP for putting a gun with rifle sling from your hands to the sling slot because you basically just "drop" it.
Attachment classes are defined in "Item Types.h":
Toggle Spoiler
#define AC_BIPOD 0x00000001 //1
#define AC_MUZZLE 0x00000002 //2
#define AC_LASER 0x00000004 //4
#define AC_SIGHT 0x00000008 //8
#define AC_SCOPE 0x00000010 //16
#define AC_STOCK 0x00000020 //32
#define AC_MAGWELL 0x00000040 //64
#define AC_INTERNAL 0x00000080 //128
#define AC_EXTERNAL 0x00000100 //256
#define AC_UNDERBARREL 0x00000200 //512
#define AC_GRENADE 0x00000400 //1024
#define AC_ROCKET 0x00000800 //2048
#define AC_FOREGRIP 0x00001000 //4096
#define AC_HELMET 0x00002000 //8192
#define AC_VEST 0x00004000 //16384
#define AC_PANTS 0x00008000 //32768
#define AC_DETONATOR 0x00010000 //65536
#define AC_BATTERY 0x00020000 //131072
#define AC_EXTENDER 0x00040000 //262144
#define AC_SLING 0x00080000 //524288 // rifle sling
#define AC_REMOTEDET 0x00100000 //1048576 // remote detonator for bombs
#define AC_DEFUSE 0x00200000 //2097152 // defuse item for bombs
#define AC_IRONSIGHT 0x00400000 //4194304 // for attachable Iron Sights
#define AC_FEEDER 0x00800000 //8388608 // allow external feeding
#define AC_MODPOUCH 0x01000000 //16777216 // for new modular pouches
#define AC_RIFLEGRENADE 0x02000000 //33554432 // GL, needs a bullet and blocks other firing modes
#define AC_BAYONET 0x04000000 //67108864
#define AC_MISC16 0x08000000 //134217728
#define AC_MISC17 0x10000000 //268435456
#define AC_MISC18 0x20000000 //536870912
#define AC_MISC19 0x40000000 //1073741824
#define AC_MISC20 0x80000000 //2147483648
SinMachina wrote on Sun, 23 August 2020 01:59
How does <ubNeedForSleep > </ubNeedForSleep > get factored? I assume base sleep requirement is 8 hours, and then 'need for sleep' is a multiplier on that, but testing in game I can't come to a nice % reliably.
ubNeedForSleep defines the base need for sleep of a merc in hours. This is modified by injuries, diseases, food and Night Ops trait (or Martial Arts, if using old traits). Check function "CalcSoldierNeedForSleep" in Assignments.cpp for details.
Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MODReport message to a moderator
|
|
|
|
|
Re: A Serious of Questions[message #361392 is a reply to message #360996]
|
Sun, 27 September 2020 18:46 
|
|
SinMachina |
  |
Messages:48
Registered:August 2020 |
|
|
So, I've almost finished remaking mercprofiles, creating a spreadsheet similar to http://ja2.furlo.sk/ on excel for guns, knives, blunt, explosives, grenades, armors, lbe, ammo and attachments [linking ID attachments & ammo to guns for easier look up for modifying later], and am currently trying to figure out a feature I've been wanting to have for a decade.
I want to pay RPCs a fee to work for me. I've always felt it nagging that Dynamo had more self preservation in asking for a bill to carry a gun, but Carlos, who is so concerned with logistics and food, not considering asking for cash to help facilitate that easier.
I've tried adding a daily salary amount to the rebels but that amount isn't deducted from my current cash day to day. Ideally they would charge a $ amount daily or leave, ala Dynamo / Shank, but I would also like a basic text box that is raised when hiring them [ala Dynamo / Shank]. Can anyone help with this please? Or atleast point me in the direction of how it could be done?
I know Flug added Max Payne http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=23770&start=0& and has the pop up dialog with an amount that you have to accept. I just can't figure out how it was done.
Report message to a moderator
|
Corporal
|
|
|
|
Goto Forum:
Current Time: Fri Apr 25 02:42:23 GMT+3 2025
Total time taken to generate the page: 0.01605 seconds
|