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 Go to next message
SinMachina is currently offline 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 #360983 is a reply to message #360982] Sat, 22 August 2020 07:03 Go to previous messageGo to next message
Hawkeye is currently offline Hawkeye

 
Messages:2448
Registered:October 2005
Location: Australia
For inventory items the price mod can adjust the value of the price, but when I discussed this at Discord some of the figures didn't add up. You can set an absolute price which should adjust the items to whatever price you define it as.

There is also <mAbsolutePrice>-1</mAbsolutePrice> which is supposed to disable that function.

The Price mod can supposedly adjust prices at a percentage, so if you set an inventory kit at <mPriceMod>50</mPriceMod> then the inventory kit price will be adjusted by 50% more, or that's how I gathered from a bit of experimentation. If the value is <mPriceMod>0</mPriceMod> it should be cheaper than the previous 50 value. I discussed this with Tais who added this feature but still some of the values didn't add up and he didn't respond to why that was happening.

I also asked if the status condition of items would also affect price, but I couldn't get an answer on that either.

Report message to a moderator

Lieutenant

Re: A Serious of Questions[message #360984 is a reply to message #360983] Sat, 22 August 2020 07:43 Go to previous messageGo to next message
edmortimer is currently offline edmortimer

 
Messages:1533
Registered:January 2015
Location: Home Free
Quote:
I also asked if the status condition of items would also affect price, but I couldn't get an answer on that either.
I was told the answer is no, status doesn't affect price in MercStartingGear.XML

Report message to a moderator

Sergeant Major
Re: A Serious of Questions[message #360985 is a reply to message #360984] Sat, 22 August 2020 08:02 Go to previous messageGo to next message
Hawkeye is currently offline Hawkeye

 
Messages:2448
Registered:October 2005
Location: Australia
So a 50% Glock will cost you as much as a 100% one?

When I added figures together on items they still weren't adding up entirely correctly, regardless of condition. I wondered if there was some sort of additional 'handling fee' for items as even kits with <mPriceMod>0</mPriceMod> were still costing more than the sum of their parts.

Report message to a moderator

Lieutenant

Re: A Serious of Questions[message #360987 is a reply to message #360985] Sat, 22 August 2020 17:35 Go to previous messageGo to next message
edmortimer is currently offline edmortimer

 
Messages:1533
Registered:January 2015
Location: Home Free
Quote:

When I added figures together on items they still weren't adding up entirely correctly, regardless of condition. I wondered if there was some sort of additional 'handling fee' for items as even kits with <mPriceMod>0</mPriceMod> were still costing more than the sum of their parts.
Perhaps this function has something to do with it:

from JA2Options.ini


MERCS_RANDOM_START_SALARY = TRUE/FALSE
MERCS_RANDOM_START_SALARY_PERCENTAGE_MAX_MODIFIER = n

Report message to a moderator

Sergeant Major
Re: A Serious of Questions[message #360989 is a reply to message #360982] Sun, 23 August 2020 02:59 Go to previous messageGo to next message
SinMachina is currently offline 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 #360991 is a reply to message #360987] Sun, 23 August 2020 08:47 Go to previous messageGo to next message
Hawkeye is currently offline Hawkeye

 
Messages:2448
Registered:October 2005
Location: Australia
edmortimer wrote on Sun, 23 August 2020 00:35
Quote:

When I added figures together on items they still weren't adding up entirely correctly, regardless of condition. I wondered if there was some sort of additional 'handling fee' for items as even kits with <mPriceMod>0</mPriceMod> were still costing more than the sum of their parts.
Perhaps this function has something to do with it:

from JA2Options.ini

MERCS_RANDOM_START_SALARY = TRUE/FALSE
MERCS_RANDOM_START_SALARY_PERCENTAGE_MAX_MODIFIER = n
Nope, mine's set to false, thank God.

Report message to a moderator

Lieutenant

Re: A Serious of Questions[message #360993 is a reply to message #360989] Sun, 23 August 2020 12:28 Go to previous messageGo to next message
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

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%20MOD

Report message to a moderator

Lieutenant
Re: A Serious of Questions[message #360995 is a reply to message #360989] Sun, 23 August 2020 15:15 Go to previous messageGo to next message
silversurfer

 
Messages:2790
Registered:May 2009
SinMachina wrote on Sun, 23 August 2020 01:59
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?
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

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%20MOD

Report message to a moderator

Lieutenant
Re: A Serious of Questions[message #360996 is a reply to message #360995] Sun, 23 August 2020 17:27 Go to previous messageGo to next message
SinMachina is currently offline SinMachina

 
Messages:48
Registered:August 2020
The following series of questions are in accordance with " SCI May revision 8796 gameDIV 2531 "

Holy crap silversurfer thank you so much for explaining and pointing me in the direction of ItemFlag and AttachmentClass . I spent hours trying to match up the sling and covert values to something defined and just couldn't find them anywhere. That will make commenting those fields so much easier.

I forgot oldSkillTrait MA affected sleep. Sleep modifiers are quiet a bit more plentiful than I expected. Thanks for pointing that to me.

And thank you for pointing out the very obvious comment
<!-- (-1) No Nation (only used for HatedNationality) -->
that I just kept overlooking for some reason. Have to read more carefully.

About the folding stock thing; I had seen the item
<uiIndex>1745</uiIndex>
<szItemName>Folding Stock (folded)</szItemName>
<ItemSizeBonus>-1</ItemSizeBonus>
<ToHitBonus>-5</ToHitBonus>
<PercentReadyTimeAPReduction>33</PercentReadyTimeAPReduction>
<usOverheatingCooldownFactor>100.0</usOverheatingCooldownFactor>
<STAND_MODIFIERS>
	<PercentMaxCounterForce>-20</PercentMaxCounterForce>
	<PercentCounterForceAccuracy>-20</PercentCounterForceAccuracy>
but it didn't really make sense to me as that was what I was looking for. I would have assumed that folding [meaning closed, not in use] wouldn't grant the boni, but instead unfolded [meaning open, in use] would.

I guess my next biggest step stone project is figuring out how to make rebels charge you money properly, how item damage is displayed in enhanced display and if personality and attitude function.

Thanks again guys!

Report message to a moderator

Corporal
Re: A Serious of Questions[message #361392 is a reply to message #360996] Sun, 27 September 2020 18:46 Go to previous messageGo to next message
SinMachina is currently offline 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
Re: A Serious of Questions[message #361393 is a reply to message #361392] Sun, 27 September 2020 22:19 Go to previous message
edmortimer is currently offline edmortimer

 
Messages:1533
Registered:January 2015
Location: Home Free
Quote:
Can anyone help with this please? Or atleast point me in the direction of how it could be done?
You will need to modify their .NPC file, and probably their .EDT files. Check this info: http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=13298&start=0&

Report message to a moderator

Sergeant Major
Previous Topic: Randomitem.XML
Next Topic: inbetweenImpactReductionMultiplyDivisor
Goto Forum:
  


Current Time: Fri Apr 25 02:42:23 GMT+3 2025

Total time taken to generate the page: 0.01605 seconds