Home   Help Search Login Register  

Author Topic: adding a unit in warfare  (Read 1672 times)

0 Members and 1 Guest are viewing this topic.

Offline dingbat91

  • Members
  • *
adding a unit in warfare
« on: 08 Jun 2008, 19:21:47 »
hi everyone nice to meet you

me and a few friends are playing the new ARMA gametype warfare through LAN, and recently the v22 Osprey by gnat has been released, i was wondering if anyone could give me some help adding it into the warfare gametype menu for the Helicopter factory, as i haven't found any scripting assistance when it comes to the warfare gametype.
i'm currently using Matt Rochelle's Warfare v1.5 N&S mission : here
and Gnats V22 Osprey Addon : here

i apologise if i'm acting like a noob, as i'm fairly new to ARMA scripting
-
Ding

Offline Inkslinger

  • Members
  • *
Re: adding a unit in warfare
« Reply #1 on: 09 Jun 2008, 01:59:41 »
Bare with me as I'm new to this myself.

first you'll have to unpbo the warfare.pbo, then open the newly created warfare folder and into mpmissions. Open the appropriate mission, the 16 or 32 player vs.

next look in common/cfg, and configairfactory. you will see some lines like this

_u = _u      + ["AH1W"]
_d = _d      + [Localize "STR_DN_AH1Z"]
_c = _c      + [7500]
_m = _m      + [7500 + (westBarracksCosts Select WPILOTTYPE) * 2]
_t = _t      + [55]
_p = _p      + [50]
_o = _o      + [false]
_i = _i      + ["\ca\air\data\ico\ah1z_CA.paa"]

change the "AH1W" to "classname of v-22", For the name to show up in the dialog ingame this is what I did. Change the Localize "STR_DN_AH1Z" to Localize "STR_V22", then go back out to the stringtable.csv and add this line:

STR_V22, V-22 Osprey

the +[7500] is the base cost for empty unit, change this to whatever you wish, repack the warfare file and your good to go. Also I would suggest making a backup of the originall pbo as well.

hope this helps, as I said I'm still new to this myself and learning as I go along.

Almost forgot: for the right picture to show you'll have to change the parameters for the paa file to match the one for the Osprey, sry sure what that is at the moment. I'd have to ask Gnat or unpbo the osprey to look at the paa files.

Edit: try this  + ["\ca\gnt_v22\GNT_v22pic.paa"]
« Last Edit: 09 Jun 2008, 02:05:27 by Inkslinger »

Offline Rommel92

  • Members
  • *
Re: adding a unit in warfare
« Reply #2 on: 09 Jun 2008, 07:33:19 »
You are kind've getting rid of the AH-1 there... why not just add another section of that, and then do your code changes, rather then replacing them.  :whistle:

Offline Inkslinger

  • Members
  • *
Re: adding a unit in warfare
« Reply #3 on: 09 Jun 2008, 11:52:21 »
actually thats what I did, but i just copy/pasted the format then put in my own stuff. like the mapfact AH-64's the flight model on those are so great.

Note: if you want your AI teams to purchase and us any new vehicles you put in the game you have to alter the common/config/config_AITeams.sqs. just scroll down and you should be able to figure it out pretty easy.

Offline ToadBall

  • Members
  • *
Re: adding a unit in warfare
« Reply #4 on: 10 Jun 2008, 01:09:25 »
Will this method work for altering/adding weapons? I've been getting a whole host of errors when I change various default BI weapons to things like weapons from wipmans m4 pack.

Offline Inkslinger

  • Members
  • *
Re: adding a unit in warfare
« Reply #5 on: 10 Jun 2008, 01:27:18 »
heres a line that I use in my common/config/configloadouts.sqs

_weapon        = "wip_m4aim_m203_sd"
_ammo         = "30Rnd_556x45_StanagSD"
_w = _w         + [_weapon]
_n = _n      + [Localize "STR_m4amsd"]
_i = _i      + [GetText (configFile >> "CfgWeapons" >> _weapon >> "picture")]
_c = _c      + [90]
_a = _a      + [_ammo]
_an = _an   + [GetText (configFile >> "CfgMagazines" >> _ammo >> "displayName")]
_ai = _ai   + [GetText (configFile >> "CfgMagazines" >> _ammo >> "picture")]
_as = _as   + [GetNumber (configFile >> "CfgMagazines" >> _ammo >> "type") / 256]
_ac = _ac   + [10]

this works fine for me. Same as before though with the names: the line with _n = _n I pointed it to the stringtable.csv and added my own name in there.
STR_m4amsd, M4A1 M203 Aim SD

I wouldnt try to copy paste this though as it seems to have gotton screwed when i did it here. Also I seem to still get an error sometimes saying the required addon is missing but they still work. I think I might have to go into the mission.sqm and manually put in the addon names.
« Last Edit: 10 Jun 2008, 01:30:21 by Inkslinger »

Offline ToadBall

  • Members
  • *
Re: adding a unit in warfare
« Reply #6 on: 10 Jun 2008, 01:34:17 »
Thanks, will give it a test, will be a huge help if/when it works.

Edit: Big thanks got it working  :good:
The warfare game mode has pretty much cut out half the work required for a mod i was working on, though I may continue building that from scratch for the learning experience :)
« Last Edit: 11 Jun 2008, 01:35:02 by ToadBall »