Jump to content

Bike,Quad,Mosqito Crafting Script


Amdathlon

Recommended Posts

The classname ebike_epoch just needs to be added to the Safe_vehicles array in the vehiclesimulation.fsm and it can be triggered by players the same way the UAV and Parachutes are, without being picked up by the de simulate cleanup. All found in the server_monitor.fsm.

Now the trick is adding it to the said array. Without adding it to the server code directly, and breaking dll CRC checksum. ;) It's possible.

 

Absolutly pr0dukt !

 

So we have to found how to call this custom file without breaking dll as you said :/

Link to comment
Share on other sites

used this pbo and i get a nice menu but wen i select vehicles then bike u get nothing ... not even a action...not even a bike that dissapears

 

if u want a bike that dissapears, than just create a menu.sqf with:

 

private["_veh", "_idx"];

Sleep 15;

_idx = -1;

while {alive player} do {

if(_idx == -1) then {

_idx = (vehicle player) addaction [("" + ("Bike") +""),"custom\Bike.sqf","",5,false,true,"","];

_veh = vehicle player;

};

if (_veh != vehicle player) then

{

_veh removeAction _idx;

_idx = -1;

};

Sleep 2;

};

 

place your path

 

and the bike.sqf from post 1 in your script or custom folder

 

Init:

[] execVM "

custom\menu.sqf";

 

tada, u have the dissapear bike !

 

but this help nothing.... we need to create a addon that added the bike to the Safe_vehicles array in the vehiclesimulation.fsm.... and i have no idea how it works :(

 

but this is not all.... that bike need a not sell funktion, and so on.... example: i buy a salvage metal for 35 crypto and sell a bike for 1500 ?!?   = not good :D

 

 

 

i hope the devs bring back the old bicycle from arma2.... with a normal craft option ! a bicycle in the real craftlist :-)

Link to comment
Share on other sites

The solution to the bike is quite simple. Work around the cleanup by adding it to the array with the parachute and uav in the same manner you did in arma 2. Create a custom compiles, and call it in your init.sqf. remember any array you over-ride there needs to be completely copied from epoch code, then you have to add the missing ingredient. You can custom compile yourself into trouble though. test carefully.

Link to comment
Share on other sites

i hope the devs bring back the old bicycle from arma2.... with a normal craft option ! a bicycle in the real craftlist :-)

 

I hope too cause I think that the Ebike or Quad deploying make the game very easy...

 

Even if I could make this script works, I don't know If I want to put this on my server.

Link to comment
Share on other sites

I'll work on this script a little throughout this week and get it working. keep in mind it may be multiple files in a folder by the end of the week with a few additions you need to make if you changed so on and so forth, and more than likely some battleye changes, but I'll do my best to turn this into a drop in solution and share it with the community. If I can't do it in a manner where it is reasonably easy for everyone to implement, you'll hear back from me here that I couldn't pull it off. But my guess is that I can declare it a safe vehicle and make it work.

 

Anywho, time will tell

 

-helios

Link to comment
Share on other sites

The solution to the bike is quite simple. Work around the cleanup by adding it to the array with the parachute and uav in the same manner you did in arma 2. Create a custom compiles, and call it in your init.sqf. remember any array you over-ride there needs to be completely copied from epoch code, then you have to add the missing ingredient. You can custom compile yourself into trouble though. test carefully.

The Files we need to "copy" "paste" are FSM ? are they usuable as Compiles ?

Link to comment
Share on other sites

The Files we need to "copy" "paste" are FSM ? are they usuable as Compiles ?

 

You need to check the main epoch compiles, to see if it is compiled final. There are ways around this, but I am working on a different approach. Basically, when you need to do something like that, you will find your init.sqf in your MPmission folder, and put something like this is there: func_im_overiding_with_custom_compiles = call compile preprocessFileLineNumbers "filewhereimadechangestovariables.sqf"; What I'm doing is working out ways of changing this process by using something similar to Maca134's Emod, where he effectively compiles everything he wants to before any epoch code is run, therefore invalidating a compileFinal. Epoch dev's don't seem to have a problem with that, however this may become a custom @package, in order to facilitate not only scripts like this, but several addons and still comply with the epoch license agreement. 

 

how do you take multiple of a item and more than one type of item

You could probably use the addItem function to effectively take multiple items. for example, you could count the items, and then from _i to _x do and use the addItem to make the player take that many items

Link to comment
Share on other sites

You need to check the main epoch compiles, to see if it is compiled final. There are ways around this, but I am working on a different approach. Basically, when you need to do something like that, you will find your init.sqf in your MPmission folder, and put something like this is there: func_im_overiding_with_custom_compiles = call compile preprocessFileLineNumbers "filewhereimadechangestovariables.sqf"; What I'm doing is working out ways of changing this process by using something similar to Maca134's Emod, where he effectively compiles everything he wants to before any epoch code is run, therefore invalidating a compileFinal. Epoch dev's don't seem to have a problem with that, however this may become a custom @package, in order to facilitate not only scripts like this, but several addons and still comply with the epoch license agreement. 

 

You could probably use the addItem function to effectively take multiple items. for example, you could count the items, and then from _i to _x do and use the addItem to make the player take that many items

 

Thanks alot for this info.

Link to comment
Share on other sites

Thanks alot for this info.

 

you're welcome! I hope it helps you to imagine a way around your problems. The cool thing about ArmA 3 is that it's basically ArmA 2, with the only difference being the file breakdown and event handler changes. Anything that you used take out of Epoch code in A2 you can basically do in A3, you just have to mind the file system changes, and look out for that pesky compileFinal.

 

As for this script, I haven't made a whole lot of headway there, but the foundation of the system used to work around that compileFinal problem is actually coming along pretty well. I think I will have it re-worked and available as a drop in by Feb. The reason that it is going to take a bit longer than predicted is because I want to get permission to package other mod author's addons along side of the aforementioned code, so as to have a great many things brought into A3 that will be useful to people who want things like bicycles & other A2 vehicles/items/features. It's going to be a rather large .pbo, and I'll have to have it signed, as well as available in the download list on A3Launcher, so that people who don't have the mod will be prompted to download it. It will be similar to what CBA is to Vanilla A3, but for Epoch.

 

I'll keep posting on how it's coming in this thread until I put the first release into it's own thread (If Epochmod.com Moderators will approve the post). 

 

-Helios

Link to comment
Share on other sites

The solution to the bike is quite simple. Work around the cleanup by adding it to the array with the parachute and uav in the same manner you did in arma 2. Create a custom compiles, and call it in your init.sqf. remember any array you over-ride there needs to be completely copied from epoch code, then you have to add the missing ingredient. You can custom compile yourself into trouble though. test carefully.

bingo.

 

 

Ive had it working for awhile now. Really isn't that hard once you got that simple concept down.

 

I do need to increase the crafting recipes for these though. they are far to easy to make by default, and if i could figure out how to run my own PricingCfg.hpp file without it being overwitten, id remove the ebike sell price so people can't exploit this script terribly.

 

One thing that i have not been able to do without touching epoch code is add in my own prices. It will not overwrite the default for some reason.

Link to comment
Share on other sites

bingo.

 

 

Ive had it working for awhile now. Really isn't that hard once you got that simple concept down.

 

I do need to increase the crafting recipes for these though. they are far to easy to make by default, and if i could figure out how to run my own PricingCfg.hpp file without it being overwitten, id remove the ebike sell price so people can't exploit this script terribly.

 

One thing that i have not been able to do without touching epoch code is add in my own prices. It will not overwrite the default for some reason.

 

Logic. pure and simple. You can apply that concept to many things, so long as you have the understanding that you're the boss, and as long as epoch code doesn't lock it down (and remember, they can't compileFinal event handlers, even though some of them are, you can change them!), you can do anything you want, so long as you're dedicated and read english. Every answer that you would need besides the little tidbits I have provided you can find very easily with google, and the beauty of sqf is that it's plain english :)

 

As for your prices problem, I may have a solution. Let me check a few things and try a couple more, and I will get back to you by mid-week. I work full time and then some, so time to sit at the machine and pursue my passion is in short quantity and high demand 

 

-Helios

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×
×
  • Create New...