Jump to content

[Release] Vehicle Service Point (Refuel, Repair, Rearm) [Updated for 1.0.7]


salival

Recommended Posts

  • 2 weeks later...

Pushed a commit to reinstate the _folder variable since people wanted it

Also pushed some localization updates so Repair, Refuel, Refuel, free and disabled should now be correctly localized for your language.

It changes the way you disable/make things free in the config, instead of "free" or "disabled" you now use _freeText or _disabledText

i.e 

	["Air",_freeText] will make the vehicle config class of "Air" free for the specific action.
	["Air",_disabledText] will make the vehicle config class of "Air" disabled for the specific action.
	["Air",2000] will make the vehicle config class of "Air" have a worth of 2000 for the specific action.
	["Armored_SUV_PMC",2000] will make the specific vehicle have a worth of 2000 for the specific action.
	["Armored_SUV_PMC",_freeText] will make the specific vehicle be free for the specific action.
	["Armored_SUV_PMC",_disabledText] will make the specific vehicle be disabled for the specific action.

https://github.com/oiad/service_points/commit/0c3d583bbf38a2b01c4c311d22cc8f80a328f657

Link to comment
Share on other sites

  • 2 months later...

Very nice script. Just one question. How do i get custom placed fuel station / pumps to work with this script. All my original pumps works as expected except for the ones i added as custom buildings / bases

Edit : I'm using this in my custom building script which I'm suspecting might be the issue :

_this = createVehicle ["MAP_A_FuelStation_Feed", [6393.1343, 7792.9556, 0.31752014], [], 0, "CAN_COLLIDE"];

Can i add "MAP_A_FuelStation_Feed" to the service point class in service_point.sqf?

//original
_servicePointClasses = dayz_fuelpumparray;

//Changed to this?
_servicePointClasses = dayz_fuelpumparray, MAP_A_FuelStation_Feed;

 

Edited by Cyrus
Added more info and suggestions
Link to comment
Share on other sites

39 minutes ago, Cyrus said:

Very nice script. Just one question. How do i get custom placed fuel station / pumps to work with this script. All my original pumps works as expected except for the ones i added as custom buildings / bases

Edit : I'm using this in my custom building script which I'm suspecting might be the issue :


_this = createVehicle ["MAP_A_FuelStation_Feed", [6393.1343, 7792.9556, 0.31752014], [], 0, "CAN_COLLIDE"];

Can i add "MAP_A_FuelStation_Feed" to the service point class in service_point.sqf?


//original
_servicePointClasses = dayz_fuelpumparray;

//Changed to this?
_servicePointClasses = dayz_fuelpumparray, MAP_A_FuelStation_Feed;

 

Hi Cyrus,

That's pretty much the way you'd need to do it, just with this line instead:

_servicePointClasses = dayz_fuelpumparray + ["MAP_A_FuelStation_Feed"];

 

Link to comment
Share on other sites

  • 2 weeks later...
50 minutes ago, salival said:

Hi guys,

Just pushed some updates for this mod:

  • Fix localizations not working correctly: here
  • Add ammo to existing magazines, dont clear: here
  • Add localization support: here

Translators will be good, see https://github.com/oiad/communityLocalizations

Added Russian translation for servicePoints:

	<Package name="servicePoints">
		<Key ID="STR_SP_MESSAGE">
			<English>Vehicle Service Point nearby</English>
			<Russian>Пункт тех.обслуживания</Russian>
		</Key>
		<Key ID="STR_SP_UNABLE_REARM">
			<English>%1 is unable to be rearmed.</English>
			<Russian>%1 не может быть перезаряжен.</Russian>
		</Key>
		<Key ID="STR_SP_UNABLE_REPAIR">
			<English>%1 is unable to be repaired.</English>
			<Russian>%1 не может быть отремонтирован.</Russian>
		</Key>
		<Key ID="STR_SP_UNABLE_REFUEL">
			<English>%1 is unable to be refueled.</English>
			<Russian>%1 не может быть заправлен топливом.</Russian>
		</Key>
		<Key ID="STR_SP_REFUELING">
			<English>Refueling %1...</English>
			<Russian>Заправка %1...</Russian>
		</Key>
		<Key ID="STR_SP_REFUELING_STOPPED">
			<English>Refueling of %1 stopped</English>
			<Russian>Заправка %1 остановлена</Russian>
		</Key>
		<Key ID="STR_SP_REFUEL_OK">
			<English>%1 Refueled</English>
			<Russian>%1 заправлен</Russian>
		</Key>
		<Key ID="STR_SP_REPAIRING">
			<English>Repairing%1...</English>
			<Russian>Ремонт %1</Russian>
		</Key>
		<Key ID="STR_SP_REPAIRING_STOPPED">
			<English>Repairing of %1 stopped</English>
			<Russian>Ремонт %1 остановлен</Russian>
		</Key>
		<Key ID="STR_SP_REPAIR_OK">
			<English>%1 Repaired</English>
			<Russian>%1 отремонтирован</Russian>
		</Key>
		<Key ID="STR_SP_REARMED">
			<English>%1 of %2 Rearmed</English>
			<Russian>%1 из %2 перезаряжен</Russian>
		</Key>
		<Key ID="STR_SP_FAIL_COINS">
			<English>You need %1 %2 to %3 your %4.</English>
			<Russian>Вам необходимо %1 %2 для %3 Вашего %4</Russian>
		</Key>
		<Key ID="STR_SP_FAIL_BRIEFCASES">
			<English>You need %1 to %2 your %3.</English>
			<Russian>Вам необходимо %1 для %2 Вашего %3</Russian>
		</Key>
	</Package>

 

Link to comment
Share on other sites

6 hours ago, Snowman said:

Added Russian translation for servicePoints:


	<Package name="servicePoints">
		<Key ID="STR_SP_MESSAGE">
			<English>Vehicle Service Point nearby</English>
			<Russian>Пункт тех.обслуживания</Russian>
		</Key>
		<Key ID="STR_SP_UNABLE_REARM">
			<English>%1 is unable to be rearmed.</English>
			<Russian>%1 не может быть перезаряжен.</Russian>
		</Key>
		<Key ID="STR_SP_UNABLE_REPAIR">
			<English>%1 is unable to be repaired.</English>
			<Russian>%1 не может быть отремонтирован.</Russian>
		</Key>
		<Key ID="STR_SP_UNABLE_REFUEL">
			<English>%1 is unable to be refueled.</English>
			<Russian>%1 не может быть заправлен топливом.</Russian>
		</Key>
		<Key ID="STR_SP_REFUELING">
			<English>Refueling %1...</English>
			<Russian>Заправка %1...</Russian>
		</Key>
		<Key ID="STR_SP_REFUELING_STOPPED">
			<English>Refueling of %1 stopped</English>
			<Russian>Заправка %1 остановлена</Russian>
		</Key>
		<Key ID="STR_SP_REFUEL_OK">
			<English>%1 Refueled</English>
			<Russian>%1 заправлен</Russian>
		</Key>
		<Key ID="STR_SP_REPAIRING">
			<English>Repairing%1...</English>
			<Russian>Ремонт %1</Russian>
		</Key>
		<Key ID="STR_SP_REPAIRING_STOPPED">
			<English>Repairing of %1 stopped</English>
			<Russian>Ремонт %1 остановлен</Russian>
		</Key>
		<Key ID="STR_SP_REPAIR_OK">
			<English>%1 Repaired</English>
			<Russian>%1 отремонтирован</Russian>
		</Key>
		<Key ID="STR_SP_REARMED">
			<English>%1 of %2 Rearmed</English>
			<Russian>%1 из %2 перезаряжен</Russian>
		</Key>
		<Key ID="STR_SP_FAIL_COINS">
			<English>You need %1 %2 to %3 your %4.</English>
			<Russian>Вам необходимо %1 %2 для %3 Вашего %4</Russian>
		</Key>
		<Key ID="STR_SP_FAIL_BRIEFCASES">
			<English>You need %1 to %2 your %3.</English>
			<Russian>Вам необходимо %1 для %2 Вашего %3</Russian>
		</Key>
	</Package>

 

Thanks @Snowman

@DAmNRelentless pushed your changes to github here: https://github.com/oiad/communityLocalizations/commit/9faf2cede86e20e46504d0af5a2ad02d7d3d7a60

Link to comment
Share on other sites

  • 3 months later...
  • 1 year later...

I'm trying to install this script and it doesn't show up in game.

In rpt client I get: "Service Points: loading config..."

Nothing in server rpt.

I believe I have it set up right as I've checked it several times and looked at the mission pbos of other servers I've joined that use it.

I'm running Lingor 1.5 and Epoch 1.0.6.2

 

Thanks.

Link to comment
Share on other sites

43 minutes ago, Hux said:

I'm trying to install this script and it doesn't show up in game.

In rpt client I get: "Service Points: loading config..."

Nothing in server rpt.

I believe I have it set up right as I've checked it several times and looked at the mission pbos of other servers I've joined that use it.

I'm running Lingor 1.5 and Epoch 1.0.6.2

 

Thanks.

Hey, 

If it's showing up in the rpt, the mod should be working fine. Would need to see your client rpt

Link to comment
Share on other sites

Didn't expect an answer so soon ;)

I ended up switching the classnames for fuel pumps with: dayz_fuelpumparray + dayz_fuelsources

That works.

Just started an Epoch Lingor server. It's been a few years since I've had one so it's been a struggle to get things set up.

Thanks for the reply.

Edit: BTW, do you know if it's still required to manually add the prefix to PBO when using PBO manager?

Link to comment
Share on other sites

  • 1 month later...

I have made some fixes and updates.

1. Fix for MLRS/GRAD/StrykerMC's ammo issue.
Add

Quote

            {
                if (_ammo == (_x select 0)) then {_ammo = (_x select 1);};
            } foreach [
                ["24Rnd_120mmHE_M120","24Rnd_120mmHE_M120_02"],
                ["ARTY_12Rnd_227mmHE_M270","12Rnd_MLRS"],
                ["ARTY_40Rnd_120mmHE_BM21","40Rnd_GRAD"]
            ];

after 

Quote

        if (_action == "rearm") then {
            _magazines = getArray (configFile >> "CfgWeapons" >> _weaponType >> "magazines");
            _ammo = _magazines select 0;

of servicePointActions.sqf

 

2. If you don't want planes to have many bombs that it should not fly,
Add this

Quote

            if (_vehicle isKindOf "Air") then {
                _vehicle removeMagazinesTurret [_ammo,_turret];
            };

on the same place of servicePointActions.sqf, it must be before 

Quote

            for "_i" from 1 to _magazineCount do {_vehicle addMagazineTurret [_ammo,_turret];};

            [format[localize "STR_CL_SP_REARMED",_weaponName,_name],1] call dayz_rollingMessages;

 

3. Fuel cost depends on the amount of fuel to refuel

Add

Quote

                if (typeName _costs == "SCALAR") then {
                    _costs = _costs * (1.0 - fuel _vehicle);
                    _costs = round (_costs * (1.0 - fuel _vehicle));
                };

after 

Quote

            if ((SP_refuel_action < 0) && {_refuel_enable} && (_refuelPoints > 0)) then {
                _costs = [_vehicle,_refuel_costs] call _fnc_getCosts;

of init.sqf

 

Also, I have two more updates in my repository.

1. I've changed the list of _rearm_costs to use "classname" of weapon instead of fucking "localized name" of weapon ( that sometimes makes the cost of 2 rnd stinger be the same as 8 rnd one. )
2. I have separated the service points of refuel, repair and rearm.
(Refuel at fuel stations, repair at repair center and rearm at heavy factory of military base.)
https://github.com/Schalldampfer/service_points

Edited by Schalldampfer
Add change to fuel cost
Link to comment
Share on other sites

  • 1 year later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...