Jump to content
Halvhjearne

Repair & Rearming script

Recommended Posts

I was personally looking for a repair / re-arming script for arma 3 epoch and noticed that there wasnt really any good out there yet, so i decide to do something about that.

i went back in my a2 mission file and fetched this scrip that was originally written by  ported it to work with crypto changed it so it allows you to re-arm all types of magazines for all types of weapons (from drivers seat), removed re-fuel (as fuel is auto and free on any fuelstation) and added a few extra features like a banned weapons array, banned magazines array, max global amount of magazines, max magazines for each weapon and colour of scroll action, you can check out here:

 

 

http://pastebin.com/uMrvqiGT

 

http://pastebin.com/7MNi6KZc

 

http://pastebin.com/ySETb79x

 

 

for anyone who does not know how to add this:

 

put all files in a folde called addons\service_point\ in your mission

 
if you already have an init.sqf, add the line from the code tag below to the bottom of yours:
 

if you do not have an init,sqf in your mission, then make an empty file, call it init.sqf and add the lines in code tag below:

if(hasInterface) then{
	[] execVM "addons\service_point\service_point.sqf";
};

or you can edit the line:

_folder = "addons\service_point\"; // folder where the service point scripts are saved, relative to the mission file

and put it wherever you want.

 

By default, this will only work with "Land_CarService_F" building types, but you can add any building/vehicle type you like in the array on line 8 of service_point.sqf, like this:

_servicePointClasses = ["Land_CarService_F","myaddedbuilding1","myaddedbuilding2","anotherbuilding2"]; // service point classes (can be house, vehicle and unit classes)

i put notes by the options you can change, so go through the beginning of service_point.sqf and checkout what you can change.

 

all credits goes to axe cop for his original code.

 

have fun

 

regards

Halvhjearne

 

Edit:

Since it is not possible to remove or add crypto to the player from the player himself (wich is ridicules really), i made this little addition and updated the scripts, to ensure the crypto is removed from the player:

 

https://github.com/Halvhjearne/HALV_takegive_crypto

 

to use it updatet the service point script files with the updated code and put both of the .sqf files from github in a folder called custom in your mission.pbo.

 

then add this line to the bottom of your init.sqf:

[] execVM "custom\HALV_takegive_crypto_init.sqf";

now it will actually remove the crypto from the player ...

Share this post


Link to post
Share on other sites

Tested this and it works great!  Is there a way to separate the arrays of buildings or vehicles that can be used for repairing or rearming?  Like say I want to be able to repair a vehicle in several different places, but only want vehicles to be able to be rearmed at military areas.  Just a thought for a future release.  :)  

Share this post


Link to post
Share on other sites

Berry interesting as I just added something similar Last week.
Darth any chance this is area based around the building type on the map?

 

 

EDIT: I only asked Darth since he had tested successfully and was online.

 

ps.Thanks AxeCop and Halv for the port

Share this post


Link to post
Share on other sites

Tested this and it works great!  Is there a way to separate the arrays of buildings or vehicles that can be used for repairing or rearming?  Like say I want to be able to repair a vehicle in several different places, but only want vehicles to be able to be rearmed at military areas.  Just a thought for a future release.   :)

 

yes ofc, ill take a look at that at some point.

 

Berry interesting as I just added something similar Last week.

Darth any chance this is area based around the building type on the map?

 

Darth did not make this, axe cop did ... and i updated it to work for arma 3, to re-arm all weapons in all turrets and all types of magazines.

not sure what you mean tho ... you will have to explain that.

 

Ooh intresting release, nice share :)

 

np, i like to share my work, its just not always i get off my ass to do it, so scripts usually dont make it much further than my own servers ...

Share this post


Link to post
Share on other sites

Berry interesting as I just added something similar Last week.

Darth any chance this is area based around the building type on the map?

Yes it goes off the building or vehicle class. Line 8 of service_point.sqf has an array where you can add any building or vehicle class name you want to be a repair or rearm point.

And no, I didn't make this. I had intended to redo the one from A2 but this fellow here beat me to it. :)

Share this post


Link to post
Share on other sites

I like this but I am stumped as to how to install it. I have created a service_point directory for the service_point.sqf as well as addons\service_point directory for the other to files. I have added those to my epoch.bornholm.pbo file and have added the proper lines to both script.txt and init.sqf. Any help on the proper install instructions would be greatly appreciated. As well does this need to be modified to work on Bornholm?

Share this post


Link to post
Share on other sites

Pay close attention to where you place it in the load order of your init.sqf. Make sure it goes inside an existing if(hasInterface) block if you have one already in your init for other scripts. If not, then make sure you add it just like the example above. It works fine on Bornholm.

Share this post


Link to post
Share on other sites

I like this but I am stumped as to how to install it. I have created a service_point directory for the service_point.sqf as well as addons\service_point directory for the other to files. I have added those to my epoch.bornholm.pbo file and have added the proper lines to both script.txt and init.sqf. Any help on the proper install instructions would be greatly appreciated. As well does this need to be modified to work on Bornholm?

 

i dont know how much simpler i can make this, perhaps you need to edit the _folder variable if you dont have it in same folder as i do, and as long as your map has "Land_CarService_F" it will work, else just change or add whatever building you want to be carservice/rearm station to the _servicePointClasses variable and it will work just fine.

Share this post


Link to post
Share on other sites

yes, the folder structure would be excellent as that was the only thing I was unclear about.

 

service_point.sqf line 7:

_folder = "addons\service_point\"; // folder where the service point scripts are saved, relative to the mission file
 

Maybe you could tell us, where exactly to place the files...?

 
put it anywhere you like and edit the path to match ...

Share this post


Link to post
Share on other sites

and

 

 

service_point.sqf line 7:

_folder = "addons\service_point\"; // folder where the service point scripts are saved, relative to the mission file
 
 
put it anywhere you like and edit the path to match ...

 

Where does the service_point.sqf go?

Share this post


Link to post
Share on other sites

and

 

Where does the service_point.sqf go?

server_point.sqf comes in the folder called service_point....  you can change the file path or file names to whatever you want as long as you edit the paths to match what you have on you server.

so you could have a file name hairybigballs.sqf and put that inside a folder called nutsack  as long as your filepath is nutsack\hairyballs.sqf

 

hairybigballs.sqf will continue to work so long as the filepath matches what you have on your server. If you change your the call line to scripts\hairybigballs.sqf but we all know hairybigballs.sqf is in your folder nutsack, then hairybigballs.sqf won't work because the server doesn't see it where you told it to look.

Share this post


Link to post
Share on other sites

The same holds true for any script.  Any script can go into any folder in the mission file, as long as all other scripts that need that information know where to find it.  Different admins each have their own ideas about organization.  Personally, I like to put everything in its own folder.  Everything that's not native to Epoch goes into 'addons'.  From there it breaks down further into specific scripts, like 'Status_Bar', 'Welcome Messages', 'Ammo_Fix', etc.  The only exceptions to that would be something like R3F, where there's dozens of files all getting called from all over the place.  It's just too much work to try to change them all and then risk something obscure not working right when you least expect it.  But for the most part, you just have to make sure that if there are scripts calling other scripts that you update the paths to where those files actually reside.  

Share this post


Link to post
Share on other sites

Was wondering in regards to refuelling does this use the current fuel stations on say Altis or are they disabled and you use your own customs locations.

If they are not disabled or you use them in this script how does one disable them so people cand get free fuel. I would check but I'm at work

Share this post


Link to post
Share on other sites

Was wondering in regards to refuelling does this use the current fuel stations on say Altis or are they disabled and you use your own customs locations.

If they are not disabled or you use them in this script how does one disable them so people cand get free fuel. I would check but I'm at work

 

if you read what i wrote, then you would know that i removed refueling from this script as it is currently free on any fuel station, if that changes then i can add refueling back, but currently it is kindof irrelevant.

 

edit:

i took a look at the code and currently i do not see a way to easily add a second array of stations for re-arming only, as it is already running in quite a big while loop and i would hate to make it much bigger than it already is just for that.

not to mention the fact that it is also searching that one array in the nearby area of the player with nearestObjects every ~2second or so, wich could become intense depending on how many types of objects it is searching for and how many objects are near the player.

in aras with many buildings, adding another search to that would not exactly be a good idea imho so for now i will have to say no, tho it would not exactly be hard to do.

 

if i come up with a good idea to avoid searching twice i will rethink this.

Share this post


Link to post
Share on other sites

What would be the consequences of making a permanent addAction where a player always has the option to scroll to check if there is a repair or rear station nearby? Only then would the script check nearby buildings or vehicles to see if there was a valid repair or rearm station and execute the actions desired. If that won't work then there's always the option of doing the nearby class checking via a key press instead of an addAction. Doing something like that would alleviate any performance concerns.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Similar Content

    • By webbie
      Hey all, trying to track down the code that determines what the multigun Vehicle attachment will fix. Here is why. A player of mine noticed that the vtols can not be repaired. After some testing on both the epoch and vanilla variant I couldn't get either to work and actually found I couldn't do much with repair on them at all, I'm wondering if this is the same as the Hitpoint issue???
      As always thx in advance for any help or suggestions, always appreciated :)
    • By harcosgoogle
      Hi!
       
      Repair and Salvage Script 1.0.6.1?
       
       
    • By salival
      Hi,
       
      With Axe Cops permission I am releasing my updated version of his amazing Service Points script. 
      This includes support for original briefcases, gems (from epoch 1.0.6.1) and coins.
          (original github url: https://github.com/vos/dayz/tree/master/service_point)
          (original install/discussion url: https://epochmod.com/forum/topic/3935-release-vehicle-service-point-refuel-repair-rearm-script/)
          
      **** *REQUIRES DAYZ EPOCH 1.0.6.1* ****
          
      Major Changes:
          This version adds support for both single currency and gems (from the epoch 1.0.6 update) as well as the original epoch briefcase currency system. 
          Instead of pricing things like the original way, prices are now done on a "worth" similar to how coins are done. The price value of items are below.
          If you are using coins, I would recommend using the _currencyModifier variable since coins typically are 10x the value of briefcase based currency (1 brief == 100,000 coins)
          (You can either set this _currencyModifier variable to 1 then set the proper value or use the modifier, the modifier is mainly for dual currency servers)
          1 silver = 1 worth
          1 10oz silver = 10 worth
          1 gold = 100 worth
          1 10oz gold = 1,000 worth
          1 briefcase = 10,000 worth
          Please see dayz_code\configVariables.sqf for the value of gems (DZE_GemWorthArray) and their relevant worth if they are enabled.
          Example config settings for _refuel_costs, _repair_costs and _rearm_costs:
          All 3 sections can either be made free, disabled or a specifc price with the following examples:
          ["Air","free"] will make the vehicle config class of "Air" free for the specific action.
          ["Air","disabled"] 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","free"] will make the specific vehicle be free for the specific action.
          ["Armored_SUV_PMC","disabled"] will make the specific vehicle be disabled for the specific action.
          Valid vehicle config classes as an example: "Air", "AllVehicles", "All", "APC", "Bicycle", "Car", "Helicopter", "Land", "Motorcycle", "Plane", "Ship", "Tank"
      Visit my Github page to download and read the README.MD : https://github.com/oiad/service_points
    • By Halvhjearne
      so i realized that some server owners has been checking out my github and noticed the Taru pods mod/script i made.
       
      however, unfortunatly not as many has had the courtesy of actually reporting back to me about functionality/bugs, so i decided to just release it here for everyone to enjoy and i can see what everyone has to say about it.
       
      What is this?
       
      this script was inspired by this mod:
      http://www.armaholic.com/page.php?id=27532
       
      one of my players asked me to add this mod, but i feelt that this could be done without having to add an extra mod to every client, so i created this:
       
      this is a script that will allow players to attach the taru pods to the base taru that does not have a pod attached by default, if the pod is dropped above 25m height, the pod will be dropped in a parachute, else the pod is just dropped.
       

      (more pics soon)
       
      i also made possibility to sell pods at the traders without getting in as driver (claim action) that i will be uploading to my github soon.
       
      to attach a pod:
      Land "on" the pod with a wheel on each side as close as possible make sure wheels are touching ground scroll and use the attach scroll action to attach a pod scroll to detach/para drop it again.
       
      to make sure the pod saves new position after being moved, then either enter the pod or change inventory in it.
      pods should now save when dropped.
       
      so here goes:
      https://github.com/Halvhjearne/taru-pods
       
      to install this, add to the bottom of your init.sqf:
      execVM "addons\taru_pods\taru_init.sqf"; (or wherever you decide to install it, folder is not important)
       
      if you have antihack, you will need to disable attach and scroll actions checks (more info on this will come soon).
       
      you will also need to add the pods to traders / epochconfog.hpp
      the pod classnames are:
      "Land_Pod_Heli_Transport_04_bench_F" "Land_Pod_Heli_Transport_04_covered_F" "Land_Pod_Heli_Transport_04_medevac_F" "Land_Pod_Heli_Transport_04_box_F" "Land_Pod_Heli_Transport_04_fuel_F" "Land_Pod_Heli_Transport_04_repair_F" "Land_Pod_Heli_Transport_04_ammo_F"
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...