Home » MODDING HQ 1.13 » v1.13 Modding, Customising, Editing » v1.13 XML Customization » pRestriction - Where is Restrictions.xml? (Trying to create LBEs)
icon5.gif  pRestriction - Where is Restrictions.xml?[message #361987] Sat, 05 December 2020 17:21 Go to next message
Kurt is currently offline Kurt

 
Messages:423
Registered:March 2004
I'm trying to create a mortar shell carrying LBE (simply a variant of the old "grenade" thigh pouch), and studied the structure of the LBE-related files. They look quite straightforward, except the <pRestriction> tag, I can't find where it points to, there is no Restrictions.xml I can see. (And since the value seems to be binary and additive, I can't even infer from the existing examples. Which value do I need to put in if I want to restrict something to only mortar shells? How do I create a brand new restriction?)


So, long story short, where do <pRestriction> values point to?

Report message to a moderator

Master Sergeant
Re: pRestriction - Where is Restrictions.xml?[message #361988 is a reply to message #361987] Sat, 05 December 2020 18:24 Go to previous messageGo to next message
Deleted.

 
Messages:2634
Registered:December 2012
Location: Russian Federation
I think pRestriction is a bitmask from allowed item types (<usItemClass>) from Items.xml
From the code
if ( LBEPocketType[pIndex].pRestriction != 0 && !(LBEPocketType[pIndex].pRestriction & Item[usItem].usItemClass) )
{
	return 0;
}



Left this community.

Report message to a moderator

Lieutenant

Re: pRestriction - Where is Restrictions.xml?[message #361989 is a reply to message #361988] Sat, 05 December 2020 19:17 Go to previous messageGo to next message
silversurfer

 
Messages:2787
Registered:May 2009
From "Item Types.cpp" for reference:
Toggle Spoiler



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: pRestriction - Where is Restrictions.xml?[message #361993 is a reply to message #361988] Sun, 06 December 2020 16:21 Go to previous messageGo to next message
Kurt is currently offline Kurt

 
Messages:423
Registered:March 2004
sevenfm wrote on Sat, 05 December 2020 17:24
if ( LBEPocketType[pIndex].pRestriction != 0 && !(LBEPocketType[pIndex].pRestriction & Item[usItem].usItemClass) )
Thanks, but what does that mean in human?... happy

I think I understand the "if the restriction of the LBE item is not" first part, but then I'm hopelessly lost.

Report message to a moderator

Master Sergeant
Re: pRestriction - Where is Restrictions.xml?[message #361994 is a reply to message #361989] Sun, 06 December 2020 16:22 Go to previous message
Kurt is currently offline Kurt

 
Messages:423
Registered:March 2004
silversurfer wrote on Sat, 05 December 2020 18:17
From "Item Types.cpp" for reference:
Thanks, I was fearing it was something undocumented, hidden in the code.

What on earth is "randomitem"? Restrict something to that, and restriction changes each time you use it? suprised ROFL

[Updated on: Sun, 06 December 2020 16:23]

Report message to a moderator

Master Sergeant
Previous Topic: Someone broke the old folding stock...
Next Topic: Could somebody please explain those "Items.xml" tags?
Goto Forum:
  


Current Time: Thu Jun 11 22:30:48 GMT+3 2026

Total time taken to generate the page: 0.00607 seconds