Jump to content
  • 0

Addon scripting question-missionconfigfile


hogscraper

Question

Hey guys, I was wondering if there are any online resources around that give a proper description of how epoch recognizes what's in configfile versus missionconfigfile? I wanted to add in a gun that I reskinned/retooled, and packing it up as a pbo with a config.bin works, but adding the files individually to the mission folder and using 

description.ext>>#include "customCfgWeapons.hpp" does not. Does Epoch just ignore anything that wasn't strictly added through a config.bin/config.cpp that was inside a mod like -mod=@mod1? I wanted to utilize this gun without having to make players go download an additional mod but it seems like epoch doesn't recognize anything I add after the mods are loaded. I know that the access level of Default under CfgWeapons is 3, (no read/write), but I've never come across not being able to build on top of what was already in there using 

 

class Mode_SemiAuto; //external reference
class Mode_FullAuto; //external reference
 
class CfgWeapons{
 
    class Makarov; //external reference
 
    class hogs_gun : Makarov { //my definition
 
so that hogs_gun would be accessible in game. I thought that maybe infistar was just not loading it in the Spawn section since it was not listed in configfile but rather in missionconfigfile but even manually adding it into the player's inventory does nothing. If I copy and paste the exact files and code into an Arma 2 mission I wrote everything works fine. Anyone out there with experience using custom cfgs for defining a new weapon type in epoch that could throw me a bone would be much appreciated!,
Link to comment
Share on other sites

19 answers to this question

Recommended Posts

  • 0

Hi, you can't use CfgVehicles or CfgMagazines in mission config files unfortunately. I can't find wiki page right now on what you can actually do with missionConfigFile, but it's rather limited

However it does let you configure your own classes, strings, vars, arrays and all that good stuff you want to be accessed pretty fast, it is especially good for multiple objects that you want to inherit classes and lets you do stuff that otherwise would be complicated or slow using SQF.

Link to comment
Share on other sites

  • 0

I found this page,

https://community.bistudio.com/wiki/CfgWeapons_Config_Reference

but it really only says that you can't edit already defined classes. I was really just confused by the fact that creating an addon and putting the defines in the config.bin seemed like the same thing as adding the files to the mission itself and calling the define through the description.ext but it looks like that's just not going to work. 

Link to comment
Share on other sites

  • 0

You can't add new Items, Weapons, or Vehicles via the Description.ext.

 

Here is all you can add:

https://community.bistudio.com/wiki/Description.ext

 

As you can see there is not a CfgVehicles, CfgWeapons, or CfgMagazines.

 

If you want to add your weapon, you need to make it an addon, or add it into the @DayZ_Epoch addon, but either way your entire playerbase will have to have the same addon as you, even if its a modified @DayZ_Epoch.

 

You will also have to sign or resign the addon.

Link to comment
Share on other sites

  • 0

If you can get your weapon into the game, via an '@' folder, then all you should need to do is add it to the traders table, so that the traders can sell it.

 

Hope that helps!

 

=170= Sven2157

 

*** EDIT ***

Here is a Video to show you how:

Link to comment
Share on other sites

  • 0

I know about using an additional pbo, I just don't want to have zero people join the server because they don't have hogs_weapons_pack.pbo. I wanted to take one weapon out of it that I really wanted to use and call a custom cfgweapons.hpp to define it. After wasting a ton of time on this Vampire set me straight. The game will not only keep you from changing anything called from a pbo's config.bin but it will not let you build off of those definitions either. Which really sucks as there are quite a few things that could be done a lot easier if they did. Like adding custom buildables without having to use maca's right click addon plus custom code. Or editing anything else in the entire configfile and having those changes pushed to the client. If you look at any mod that reskins a vehicle, you could simply add a new definition for that vehicle with your new skin and have a completely new looking vehicle without having to force all of your joining clients to go out and download an entirely new mod and add another part to their Additional Launch Parameters in Dayz Commander.

Link to comment
Share on other sites

  • 0

I know about using an additional pbo, I just don't want to have zero people join the server because they don't have hogs_weapons_pack.pbo. I wanted to take one weapon out of it that I really wanted to use and call a custom cfgweapons.hpp to define it. After wasting a ton of time on this Vampire set me straight. The game will not only keep you from changing anything called from a pbo's config.bin but it will not let you build off of those definitions either. Which really sucks as there are quite a few things that could be done a lot easier if they did. Like adding custom buildables without having to use maca's right click addon plus custom code. Or editing anything else in the entire configfile and having those changes pushed to the client. If you look at any mod that reskins a vehicle, you could simply add a new definition for that vehicle with your new skin and have a completely new looking vehicle without having to force all of your joining clients to go out and download an entirely new mod and add another part to their Additional Launch Parameters in Dayz Commander.

 

The reason why they don't do this, is because it would probably be possible for hackers to redefine or add new classes with overpowered vehicles, and if you did not have the images or sounds for those new vehicles on your computer, they would appear invisible in-game.

 

Imagine hackers in an invisible tank.

Link to comment
Share on other sites

  • 0

I know about using an additional pbo, I just don't want to have zero people join the server because they don't have hogs_weapons_pack.pbo.

There is no other way around it. How else would they receive the definitions, textures and model?

 

After wasting a ton of time on this Vampire set me straight. The game will not only keep you from changing anything called from a pbo's config.bin but it will not let you build off of those definitions either.

Um... This IS how it works. Everything is based of a master class. For example:

 

AH6J is a Helicopter Class, which is based off the Air Class, which is based off the AllVehicle Class.  In your case you are declaring your weapon like a Makarov, and then adjusting what your weapon has different.

Here is the entire A2/OA CfgWeapons Class Tree:  http://browser.six-projects.net/cfg_weapons/tree

 

As you can see from that, every weapon is based off Default.  Then you have CORES: PistolCore, RifleCore, etc, etc.  What Vampire said was that you can't do this via the descriptions.ext file.  And YES, players would need to download your MOD, regardless of where you place it; in its own @ folder, or repacked in the @Dayz_Epoch.pbo.

 

Which really sucks as there are quite a few things that could be done a lot easier if they did. Like adding custom buildables without having to use maca's right click addon plus custom code. Or editing anything else in the entire configfile and having those changes pushed to the client. If you look at any mod that reskins a vehicle, you could simply add a new definition for that vehicle with your new skin and have a completely new looking vehicle without having to force all of your joining clients to go out and download an entirely new mod and add another part to their Additional Launch Parameters in Dayz Commander.

Google re-painting the helicopters in Take on Helicopters( which by the way, is kind of like Arma 2.5 ). The tutorials tell you to do just that. Use the existing classes, create a new skin class and pack it up. Here is my re-paint of the little bird. All I did was use photoshop to create the paint job, and then create a simple class and cfg: Sven2157 170th Lil' Bird Repaint

Hope that helps! ;) ( and clears up bit )

=170= Sven2157

Link to comment
Share on other sites

  • 0

There is no other way around it. How else would they receive the definitions, textures and model?

 

Um... This IS how it works. Everything is based of a master class. For example:

 

AH6J is a Helicopter Class, which is based off the Air Class, which is based off the AllVehicle Class.  In your case you are declaring your weapon like a Makarov, and then adjusting what your weapon has different.

 

I think you misunderstood me. I get that when making a custom pbo that your client's have to download it and that you reference the parent classes and build off of those inside your mod. I have already done that in the above mentioned pack that was wanting to gut and reuse. I was just lamenting that you can't do it totally through the mission file.

 

 

 

The reason why they don't do this, is because it would probably be possible for hackers to redefine or add new classes with overpowered vehicles, and if you did not have the images or sounds for those new vehicles on your computer, they would appear invisible in-game.

 

Imagine hackers in an invisible tank.

I always hear that, and I understand that it really is BIS's and others' go to answer for why they don't leave things up to the people actually paying for the servers, but I never really bought it as a legit reason. If there is someone on a server with the ability to run scripts or inject their own code into the stream, they can already spawn a tank and go invisible. Infistar already allows this and I've seen hacks that basically grant admin rights to anyone with that particular hack. If the hacker wrote his own custom dll's and could inject variable changes and code they can already wipe the entire hard drive of the server if they wanted. 

Link to comment
Share on other sites

  • 0

 

I always hear that, and I understand that it really is BIS's and others' go to answer for why they don't leave things up to the people actually paying for the servers, but I never really bought it as a legit reason. If there is someone on a server with the ability to run scripts or inject their own code into the stream, they can already spawn a tank and go invisible. Infistar already allows this and I've seen hacks that basically grant admin rights to anyone with that particular hack. If the hacker wrote his own custom dll's and could inject variable changes and code they can already wipe the entire hard drive of the server if they wanted. 

 

 

InfiSTAR's invisible "skin" is only a skin that has an invisible texture on it. It's actually pretty hard to make invisible objects and vehicles without redefining a class for them. They can however spawn a tank unless you have scripts preventing that. If you can make an entire new class and inject it to the server though, it could be an invisible tank that is a one shot kill with every gun in the game on it. You could not prevent it from being spawned with scripts because they can give it literally any classname they want.

 

And they couldn't wipe the servers hard drive. When hacking the game, they are still just altering the packets between them and the server when you think about it, so unless Arma has the power to delete server files, then they can't delete files. (Which Arma can't write any files more than logs, unless you wrote a DLL that you had the server call that allowed it)

Link to comment
Share on other sites

  • 0

InfiSTAR's invisible "skin" is only a skin that has an invisible texture on it. It's actually pretty hard to make invisible objects and vehicles without redefining a class for them. They can however spawn a tank unless you have scripts preventing that. If you can make an entire new class and inject it to the server though, it could be an invisible tank that is a one shot kill with every gun in the game on it. You could not prevent it from being spawned with scripts because they can give it literally any classname they want.

 

And they couldn't wipe the servers hard drive. When hacking the game, they are still just altering the packets between them and the server when you think about it, so unless Arma has the power to delete server files, then they can't delete files. (Which Arma can't write any files more than logs, unless you wrote a DLL that you had the server call that allowed it)

You are right about the callExtension exploit. I didn't think about whether or not the code was able to be injected server side.

I did just jump into my test server, spawned a T90, got inside, used the admin menu to call Stealth, (not the invisible skin that you can wear), and the whole thing disappeared. Then I had a tank that was invisible, had infinite ammo and could do 600km/hr. Any example of why we shouldn't be allowed to do X is always predicated upon the assumption that some example hacker already has the ability to change a variable or inject some code and therefore already has the ability to bypass your anti-hacks. If you're working on the assumption that the player already has the ability to do this, then the rest of the argument seems redundant. 

Link to comment
Share on other sites

  • 0

I just want to say that you CAN reskin a VEHICLE without making others download crap.  I do not know about weapons but I am 100% sure about vehicles, PM me if you want more info.

You can. But for others to be able to see the skin, THEY HAVE TO HAVE THE TEXTURE FILE ON THEIR SYSTEM! Otherwise they will just see a default texture. If you change it to something already in Arma2/OA/DayZ/Epoch, then YES, they will see it.

IF you make a custom skin, then people will NOT see it, unless you add it to the mission or another PBO file.

Link to comment
Share on other sites

  • 0

Under CfgVehicles subclass All, the access level is 1 so you can create new items based off of anything in that list. That's buildings, vehicles, people etc. As far as I can tell, CfgWeapons and CfgAmmo are the only ones that seem to be completely locked down to the point you cannot add a new weapon without an additional pbo. Everything else you can define or modify at runtime through the mission.

Link to comment
Share on other sites

  • 0

Under CfgVehicles subclass All, the access level is 1 so you can create new items based off of anything in that list. That's buildings, vehicles, people etc. As far as I can tell, CfgWeapons and CfgAmmo are the only ones that seem to be completely locked down to the point you cannot add a new weapon without an additional pbo. Everything else you can define or modify at runtime through the mission.

 

You can't call or add new CfgVehicles or CfgMagazines entries through the mission or server pbo without an addon.

Link to comment
Share on other sites

  • 0

You can. But for others to be able to see the skin, THEY HAVE TO HAVE THE TEXTURE FILE ON THEIR SYSTEM! Otherwise they will just see a default texture. If you change it to something already in Arma2/OA/DayZ/Epoch, then YES, they will see it.

IF you make a custom skin, then people will NOT see it, unless you add it to the mission or another PBO file.

 

Indeed, yes, you put the texture in the mission pbo and they get it when they connect to the server.  What I meant was that they do not have to go out and download a special addon pack for this to work. 

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
  • Discord

×
×
  • Create New...