Jump to content
Sign in to follow this  
IchBinJager

Set Supply Amount for City in Warfare?

Recommended Posts

Hey there, I am trying to create Warfare on a map. I have the city and all that set up, but the supply amount is too low for my liking. Is there some way I can raise the supply amount?

Share this post


Link to post
Share on other sites

I mean for setting the amount of supplies received per unit/time/truck/what have you for a city.

Like for example, I made a military base a "city". It currently has a supply/SV of sixty, I would like it to be a hundred and twenty. Is there some way I could do this?

Edited by IchBinJager

Share this post


Link to post
Share on other sites

In your editor City location's Init field, give the city a name:

this setVariable ["name","NW Airport"];

In Warfare module Init field, tell it to run a custom Init_Mission:

BIS_WF_Common SetVariable ["customInitMissionScript","Init_Mission.sqf"];

In your mission folder create a script file, Init_Mission.sqf. In there you tell Warfare to run a custom Towns script:

BIS_WF_Common SetVariable ["customTownsScript","Config_MapTowns.sqf"];

The custom Town script is a copy of the Warfare Config_Maptowns script, which you place in your mission folder. When Warfare reads from the Init_Mission that there is a "customTownsScript", it will run that script from your mission file instead of the core Towns script. The core Towns script already sets higher SV values for Cherno, Elektro and Berezino, than the defaults used for all other towns. All you have to do is add your own city to it and set the min/max SV you want it to have.

_n = _n		+ ["NW Airport"];	// Name matches the editor name.
_scripts	= ["DefaultTown"];	// Use DefaultTown if you don't use a custom town path to custom configure town defense units.
_range		= 450;			// Range at which defense units will spawn when an enemy approaches.
_side		= ObjNull;		// Side which owns the town at game start (East, West, Resistance). Default is objNull.
_minSV		= 65;			// Starting SV. -1 uses value from script, and 0 calculates SV based on town size.
_maxSV		= 180;			// Maximum SV. -1 uses value from script, and 0 calculates SV based on town size.
_l = _l		+ [[_scripts,_range,_side,_minSV,_maxSV]];

----edit--- to change the amount a supply truck delivers, create a custom Init_Common as Darren Brant describes and put this in it:

//Max amount a location can increase in value from supply trucks.
BIS_WF_Constants SetVariable["SUPPLYINCREASE",15];   // You set the amount

Edited by OpusFmSPol

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×