• 0
STARTairsoft780

Difference between TraderCategories and ItemList.hpp?

Question

Not sure if I'm posting in the right spot but what is the difference between TraderCategories and ItemList.hpp?

What does each one actually define in game, and do they both need to be the same? 

I'm trying to remove a helmet from the trader, do I need to do that for both files? And does the same thing go for adding items as well?

Share this post


Link to post
Share on other sites

12 answers to this question

  • 0

Posted (edited)

so I'm guessing you got a file from someone else and they use a .hpp file to define their trader.

If I'm right then in your config.cpp you should see something like #include "itemlist.hpp";

Assuming that is correct ill give you a few pointers to remove an item from the trader, its very simple.

 

So, say you want to remove it so that players cant buy it but can still sell it if they find it laying around all you need to do is find that item wherever it is listed, it should only be defined once either in your itemlist.hpp or your config.cpp (unless you have it in two different catagorys....to each their own)

This is just an example. but say I want to get rid of "H_cap_blk_Raven" from my trader. I would find it wherever I have it listed, in my case its in class "headgear"

Spoiler

 class Headgear
 {
  name = "Headgear";
  icon = "a3\ui_f\data\gui\Rsc\RscDisplayArsenal\headgear_ca.paa";
  items[] =
  {
   "H_Cap_blk", 
   "H_Cap_blk_Raven", //<------- This one
   "H_Cap_blu",
   "H_Cap_brn_SPECOPS",
   "H_Cap_grn",
   "H_Cap_headphones"

  };
 };
 

All you have to do is comment it out here for it to not show in the trader, but if you don't remove the price then it can still be sold for caps, if you don't know how to comment something out....slap yourself....and then throw a // infront of it....since this is not the last one in a list I don't have to worry about removing the coma from the item prior. However, if its the last one make sure to remove the coma from the item prior, in this case it would be H_Cap_Blk.

if its in your itemlist.hpp , depending on how the item list is set up just do the same or delete it (remembering the coma rule)

If you would like to get rid of the price as well then comment it out from the price array (in your case you may have a file called something like itemprice.hpp) No idea what your set up is

Here's an example of commenting out from the price aray.

Spoiler

 ///////////////////////////////////////////////////////////////////////////////
 // Caps
 ///////////////////////////////////////////////////////////////////////////////
 class H_Cap_blk         { quality = 1; price = 6; };
// class H_Cap_blk_Raven        { quality = 1; price = 6; };
 class H_Cap_blu         { quality = 1; price = 6; };
 class H_Cap_brn_SPECOPS       { quality = 1; price = 6; };
 class H_Cap_grn         { quality = 1; price = 6; };
 class H_Cap_headphones        { quality = 1; price = 6; };
 class H_Cap_khaki_specops_UK      { quality = 1; price = 6; };
 class H_Cap_oli         { quality = 1; price = 6; };
 class H_Cap_press         { quality = 1; price = 6; };
 class H_Cap_red         { quality = 1; price = 6; };
 class H_Cap_tan         { quality = 1; price = 6; };
 class H_Cap_tan_specops_US       { quality = 1; price = 6; };

/* class H_Cap_blk_Raven        { quality = 1; price = 6; }; */ would also work but /* */ is used for comenting out like multiple lines of code and // is  from comenting out a single line.

Hope I didn't insult your intelligence at all but I wasn't sure how much you know and how much you don't.

Also, if you don't mind me asking, where did you get the item list if you didn't make it yourself?

Edited by SaintZ
2 people like this

Share this post


Link to post
Share on other sites
  • 0
14 hours ago, SaintZ said:

so I'm guessing you got a file from someone else and they use a .hpp file to define their trader.

If I'm right then in your config.cpp you should see something like #include "itemlist.hpp";

Assuming that is correct ill give you a few pointers to remove an item from the trader, its very simple.

 

So, say you want to remove it so that players cant buy it but can still sell it if they find it laying around all you need to do is find that item wherever it is listed, it should only be defined once either in your itemlist.hpp or your config.cpp (unless you have it in two different catagorys....to each their own)

This is just an example. but say I want to get rid of "H_cap_blk_Raven" from my trader. I would find it wherever I have it listed, in my case its in class "headgear"

  Hide contents

 class Headgear
 {
  name = "Headgear";
  icon = "a3\ui_f\data\gui\Rsc\RscDisplayArsenal\headgear_ca.paa";
  items[] =
  {
   "H_Cap_blk", 
   "H_Cap_blk_Raven", //<------- This one
   "H_Cap_blu",
   "H_Cap_brn_SPECOPS",
   "H_Cap_grn",
   "H_Cap_headphones"

  };
 };
 

All you have to do is comment it out here for it to not show in the trader, but if you don't remove the price then it can still be sold for caps, if you don't know how to comment something out....slap yourself....and then throw a // infront of it....since this is not the last one in a list I don't have to worry about removing the coma from the item prior. However, if its the last one make sure to remove the coma from the item prior, in this case it would be H_Cap_Blk.

if its in your itemlist.hpp , depending on how the item list is set up just do the same or delete it (remembering the coma rule)

If you would like to get rid of the price as well then comment it out from the price array (in your case you may have a file called something like itemprice.hpp) No idea what your set up is

Here's an example of commenting out from the price aray.

  Hide contents

 ///////////////////////////////////////////////////////////////////////////////
 // Caps
 ///////////////////////////////////////////////////////////////////////////////
 class H_Cap_blk         { quality = 1; price = 6; };
// class H_Cap_blk_Raven        { quality = 1; price = 6; };
 class H_Cap_blu         { quality = 1; price = 6; };
 class H_Cap_brn_SPECOPS       { quality = 1; price = 6; };
 class H_Cap_grn         { quality = 1; price = 6; };
 class H_Cap_headphones        { quality = 1; price = 6; };
 class H_Cap_khaki_specops_UK      { quality = 1; price = 6; };
 class H_Cap_oli         { quality = 1; price = 6; };
 class H_Cap_press         { quality = 1; price = 6; };
 class H_Cap_red         { quality = 1; price = 6; };
 class H_Cap_tan         { quality = 1; price = 6; };
 class H_Cap_tan_specops_US       { quality = 1; price = 6; };

/* class H_Cap_blk_Raven        { quality = 1; price = 6; }; */ would also work but /* */ is used for comenting out like multiple lines of code and // is  from comenting out a single line.

Hope I didn't insult your intelligence at all but I wasn't sure how much you know and how much you don't.

Also, if you don't mind me asking, where did you get the item list if you didn't make it yourself?

Not at all man I'm learning step by step.

I've got the item list from the isntalled mods. Not sure if that's the answer your looking for but it was in Exile.Esseker > Traders > (Mod name) > ItemList.hpp

Share this post


Link to post
Share on other sites
Advertisement
  • 0
21 minutes ago, STARTairsoft780 said:

Not at all man I'm learning step by step.

I've got the item list from the isntalled mods. Not sure if that's the answer your looking for but it was in Exile.Esseker > Traders > (Mod name) > ItemList.hpp

no idea, guessing its something your server provider includes. But did my answer help you at all?

Share this post


Link to post
Share on other sites
  • 0
12 minutes ago, SaintZ said:

no idea, guessing its something your server provider includes. But did my answer help you at all?

i think he is using a #include "modnameitemlist.hpp" for stuff. so its all in different files for easy editing i guess

 

Share this post


Link to post
Share on other sites
  • 0
5 minutes ago, Metalman10 said:

i think he is using a #include "modnameitemlist.hpp" for stuff. so its all in different files for easy editing i guess

 

yeah that's what I was guessing, but just comenting out the item in whatever list its in should give him the result he is wanting.

1 person likes this

Share this post


Link to post
Share on other sites
  • 0
8 minutes ago, SaintZ said:

yeah that's what I was guessing, but just comenting out the item in whatever list its in should give him the result he is wanting.

let me take a look cause i just wizzed thru the post. Imma  go see what you guys posted and ill see what your talking about.

Share this post


Link to post
Share on other sites
  • 0
26 minutes ago, SaintZ said:

no idea, guessing its something your server provider includes. But did my answer help you at all?

Yea it did somewhat. 

Got me through what I needed though to find out my confusion haha

(:

Share this post


Link to post
Share on other sites
  • 0
6 minutes ago, STARTairsoft780 said:

Yea it did somewhat. 

Got me through what I needed though to find out my confusion haha

(:

sooo you dont need help? got it all down?

Share this post


Link to post
Share on other sites
  • 0
24 minutes ago, Metalman10 said:

sooo you dont need help? got it all down?

Ah didn't even see your post. Yea I'm all set man.

I just wasn't really sure what the differences between the two files were, let alone they were unique to the server

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.