Spin Khan

Server Mod to Modify some Client Items

4 posts in this topic

So I'm just looking to understand the why or why nots of this idea:

class CfgPatches
{
  class myserverside_customs
  {
    requiredVersion = 0.4633;
    requiredAddons[] = {};
    units[] = {};
    weapons[] = {};
    magazines[] = {"Exile_Item_EMRE"};
    ammo[] = {};
  };
};

class CfgMagazines
{
  class CA_Magazine;
  class Exile_AbstractItem;
  class Exile_AbstractItem_Interaction_Consuming;
  class Exile_AbstractItem_Interaction_Eating;

  class Exile_Item_EMRE: Exile_AbstractItem
  {
    scope=2;
    displayName="EMRE";
    descriptionShort="My New EMRE Item. <br/>Hunger: +100%/60s";
    model="\exile_assets\model\Exile_Item_EMRE.p3d";
    picture="\exile_assets\texture\item\Exile_Item_EMRE.paa";
    mass=20;
    class Interactions
    {
      class Consuming: Exile_AbstractItem_Interaction_Eating
      {
        effects[]=
        {
          {2,100,60}
        };
      };
    };
  };
};

Looking at the infiSTAR [a3_infiSTAR_exile] server side addon, this pattern is virtually identical.  From what I understand, this SAME pattern is exactly how you would build a custom ITEM to ADD to the environment, why not override/redefine.  The hickey I see, is getting this new definition injected into the client. 

Thoughts?

TIA,

Spin Phd.

Share this post


Link to post
Share on other sites

You need to do it via a clientside mod.

Share this post


Link to post
Share on other sites
Advertisement

ArmA server and ArmA client both have separate configFile, which is where all that information gets compiled into. As that both of these configFiles can be identical or different, they do not have access to each other. This is where the separation of server mods and client mods happen. This is why you must run @ExileClient on the server, because without it, the server will not have access to the same files the clients have.

There is no "injecting" the client with config, this is just not possible as that Arma compiles all this information at game start for both server and client. If you added that information to a PBO and added that PBO to the server, assuming it was correctly written, the server would have access to that information.
TECHNICALLY, and I say this because I know someone is going to try to correct me on this, if you ran the client functions on the server (which have a good chance of breaking or causing errors), the server would be able to use the overwritten data. 

But I digress, you can't do what you want to do, it's just not possible. It will have to be via a clientside mod as @kuplion said.

1 person likes this

Share this post


Link to post
Share on other sites

Thanks for the convo on this. 

So correct me here, but this IS EXACTLY the pattern, from my research here at exilemod.com, that is used to create a SERVER side ADDON to add a custom ITEM to the game, ie CfgMagazines. 

Now, I don't know if this is ALL to the story, but in researching this, people report success adding new custom ITEMS to CfgMagazines with a SERVER side ADDON.

So what if MY SERVER ADDON, myserverside_customs, instead defined,

class CfgMagazines
{
  ...
  class MYNEWExile_Item_EMRE: Exile_AbstractItem
  {
    ...

 

ALL would be well?  I started thinking along these lines because,

On CfgMagazines, BI says,  "These classes can be subsequently added to by addons inherent in the game or provided by oem." 

"Addons", this is a very specific word right?  EMRE's are currently defined in the binarized config under exile_client, this is NOT an Addon, right?

BI continues saying, "but it, and all other classes in cfgMagazines are deletable/erasable/modifiable."

 

I think there is a reason the ADDONS pbo must start with the addon's header class, CfgPatches.  And there is a reason it's called CfgPatches, and not CfgAddon or CfgNewAddon!

 

But just like the initServer.sqf script that pops out of the Eden plugin needs to have,

  //ExileRouletteChairs = [];
  //ExileRouletteChairPositions = [];

commented out, I expect that if we could get the client updated with the new "patched" info from any Serverside code all would be well.  At least, the clues point to this being possible, I've just not learned enough about the framework to know what I'm talking about!  :)

Thanks for any contributions,

Spin Phd.

 

 

 

Share this post


Link to post
Share on other sites
Advertisement

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

  • Recently Browsing   0 members

    No registered users viewing this page.