Posted by: ZachHox Sep 16 2009, 05:30
Hi guys,
Can anyone help with adding units to warfare, version v1.1 for example?
So far I have the pbo extracted but got stuck in the "Common\Config" folder.
I know what the "_u, _d etc etc" mean, except that I don't know what exactly to put it for every unit/file I download.
For starters I would like to add all units from the russian armor pack, http://www.armaholic.com/page.php?id=3613, for example.
But I don't know exactly what to put at _u, _d and _i. And to make it appear in my menu so I can buy it or use it.
QUOTE
_u = ["Vulcan"]
_d = [Localize "STR_DN_VULCAN"]
_c = [800]
_m = [800 + (westBarracksCosts Select WCREWTYPE) * 2]
_t = [20]
_p = [25]
_i = ["\ca\tracked\Data\ico\m163_vulcan_CA.paa"]
_o = [false]
I tried it with a bradly, http://www.armaholic.com/page.php?id=3283, but that failed unfortunately.
Can anyone please tell me exactly what to put it and how to spot the exact code for future unit downloads?
Thanks guys.
Posted by: JynX Sep 16 2009, 11:57
The things needed to add a vehicle to a warfare script are:
vehicle cfg name
string in the stringtable or manually formatted one as description.
vehicle icon path
QUOTE
_u = ["Vulcan"]
_d = [Localize "STR_DN_VULCAN"]
_c = [800]
_m = [800 + (westBarracksCosts Select WCREWTYPE) * 2]
_t = [20]
_p = [25]
_i = ["\ca\tracked\Data\ico\m163_vulcan_CA.paa"]
_o = [false]
The items in bold are the values that need changing with the new vehicles values respectively.
To find these values your going to have to open up the addon's cfg file, this may or may not require one of the un-bin programs there are for ArmA, I'll leave you to find one.
The vehicle config name should be in the earlier parts of the config if the addon maker has kept the model cfg seperate. Should be easy to spot, as I'm at uni atm I can't tell you exactly what it is.
To do the description you can add it to the warfare string table (look for an XSL file iirc) OR you can do the easy thing:
change: _d = [Localize "STR_DN_VULCAN"]
for: _d = Format["vehicle name of your choosing"]
the icon all you have to do is use your note pads search function for "icon" and replace the path in the script with the addon's one.
so, to reiterate:
open up your addons cfg file and replace the values in the script or add the new entry like bellow
QUOTE
_u = ["vehicle's config name"]
_d = Format["vehicle name or whatever you want it to appear as in the list"]
_c = [800]
_m = [800 + (westBarracksCosts Select WCREWTYPE) * 2]
_t = [20]
_p = [25]
_i = ["replace with the icon value from the addon's cfg file"]
_o = [false]
Do not be tempted to add to many things as it gradually gets tedious goign through it all and increases the chance of things going tits up with the script.
It also gets a pita to debug every time it does crash if you have to trawl through a huge list of entries ensuring every little bit of syntax is correct and all the classnames are also correct.
Hope this helps
Posted by: ZachHox Sep 17 2009, 08:07
Yes that helps, thanks very much.
But so far it still doesn't work, to give you the bradly example:
QUOTE
_u = ["VILPAS_BRADLEY_ERA"]
_d = [Format"M2A2 Bradley (ERA)"]
_c = [800]
_m = [800 + (westBarracksCosts Select WCREWTYPE) * 2]
_t = [20]
_p = [25]
_i = ["\desert_bradley\bradley_icon.paa"]
_o = [false]
That gives me a "format" error message.
But usually I would have this:
QUOTE
_u = ["VILPAS_BRADLEY_ERA"]
_d = ["M2A2 Bradley (ERA)"]
_c = [800]
_m = [800 + (westBarracksCosts Select WCREWTYPE) * 2]
_t = [20]
_p = [25]
_i = ["\desert_bradley\bradley_icon.paa"]
_o = [false]
But that doesn't work either, no error message or whatever though but its like nothign appears in teh menu, like I didn't put anything... :S
And also I loaded it in the mission.sqm under both AddOns parts. Simply with "desert_bradley" and a comma above the other like this for example:
"mk19_tripod",
"dshkm_mini",
But still no luck.
Am I missing something or whatever? Is htere a separate scrip part for the menu specially? Somehthing would have to show up won't it, even if it won't work right...?
Thanks for your reply btw.
Posted by: JynX Sep 17 2009, 14:05
Ah sorry forgot how the warfare system worked, thats a syntax error it should be:
_d = [Format ["M2A2 Bradley (ERA)"]]
my bad, not dug around warfare in a while with any luck that's the right syntax for it.