Jump to content

[Tutorial] Overpoch - Custom traders, all weapons/ammo/vehicles in menus


Recommended Posts

Trader option always shows for other traders so I have no idea what's going on...

Ahh, try changing a skin for trader, could be whitelisting doing this (variables.sqf). Other than that it's quite weird you use nested array within a nested array for single field ^^

 

 

Hey RayMix  after adding the 0 for Y coordinates the bash and klen traders still do not show up in-game.  Stary trader is still fine.

In the Database table  "trader_tids"  I added a new trader at the end as below:

You define trader ID's in your server_traders

use these variables in database:

[["Weapons",900],["Ammo",901],["Cars",902]],

900, 901, 902 ARE trader IDs (TIDs). They are used as a reference to what will make category to be available in a trader dialog... like a shortcut.

 

Ok so did I miss a step someplace?  I added all the weapons to the traders and when I try to buy certain ones or certain ammo I get an error.  Example:  Warning Message: No entry 'bin\config.bin/CfgWeapons.RH_20Rnd_762x51_AR10'.

 

This happens for several different weapons and ammo types.  When I purchase the item the trader does the trade but the item is not transferred to my inventory.  I have all of the PBOs from Overwatch listed in my Epoch mission.sqm, so it should have all the files loaded into memory.

 

Any ideas??

I'm getting the same. Think it's to do with mission.sqf not loading full list of additional addons. Let me know if you figure this one out, tho. Thanks

Link to comment
Share on other sites

Actually I got it to work.  I redid the traders_data table and it seems to be working.  More testing is needed, but at least I didn't get an error this time.  I was able to see the icons for all the items in the trader window and the items actually transferred to my inventory without issue.  

 

Here's a link to my google drive to the SQL files I used to import the items into the DB:

 

https://drive.google.com/file/d/0B1NA-tLSw7MhblJHZlBPSEVhelk/edit?usp=sharing 

Link to comment
Share on other sites

What about if i just wanted to edit the traders that are there currently does the video cover that?

Sort of... I am aware it is damn long video to watch, but if you fully understand what's going on after seeing it, you should be able to do much more than just edit them

Link to comment
Share on other sites

Sort of... I am aware it is damn long video to watch, but if you fully understand what's going on after seeing it, you should be able to do much more than just edit them

Or should I ask after I am done watching the video will I know where to go to edit the exsisting traders?

Link to comment
Share on other sites

I just did the tutorial and when i load into my server it does not allow me to trade with anyone but the trader i added is there but i cant trade with him... Do you have any idea what went wrong? I really don't want to watch the video again

 

EDIT: Fixed it I left out 

[], in the server_traders file... Such a simple mistake

Thanks for the Tutorial!

 

EDIT:It seems that the ammo tab is broken and under OverPoch weapons RH_    weapons do not show up as icons

Link to comment
Share on other sites

Ahh, try changing a skin for trader, could be whitelisting doing this (variables.sqf). Other than that it's quite weird you use nested array within a nested array for single field ^^

 

 

You define trader ID's in your server_traders

use these variables in database:

[["Weapons",900],["Ammo",901],["Cars",902]],

900, 901, 902 ARE trader IDs (TIDs). They are used as a reference to what will make category to be available in a trader dialog... like a shortcut.

 

I'm getting the same. Think it's to do with mission.sqf not loading full list of additional addons. Let me know if you figure this one out, tho. Thanks

Yea i just figured this... 

 

On a side note if i wanted to add a menu to an existing epoch trader i would just add the new menu name and number (tid) in the mission.sql and then add the same name and tid to the trader_tids  in database?

Link to comment
Share on other sites

i have fillowd this tutorial and now none of my traders are working after reading all the comments there are no missing brackes or quotation marks here is a link to server_traders - http://pastebin.com/BS68gTAd

any help would be grate

file looks good. What exactly does not work? Could you be more specific, mate? Do they spawn? Do they show action menu? Does menu not appear? Is menu not listing items?

 

Before you answer that, please change to a different skin just for a quick test. If that works, you either have typo in skin classname or something is wrong with that skin for some reason (happens often quite weird issue... probably error in config)

 

If all of traders are gone, then you probably borked up your AI spawn code, go back to your mission.sqf file (dayz_server.pbo) and make sure code is correct. Someone else had same problem as you few pages ago.

Link to comment
Share on other sites

file looks good. What exactly does not work? Could you be more specific, mate? Do they spawn? Do they show action menu? Does menu not appear? Is menu not listing items?

 

Before you answer that, please change to a different skin just for a quick test. If that works, you either have typo in skin classname or something is wrong with that skin for some reason (happens often quite weird issue... probably error in config)

 

If all of traders are gone, then you probably borked up your AI spawn code, go back to your mission.sqf file (dayz_server.pbo) and make sure code is correct. Someone else had same problem as you few pages ago.

the trader is there but none of the traders (the ones i added and the epoch ones) show any scroll option to access trader menu

 

just tried changing the skin to a base epoch skin and still no scroll option to access trader menus

Link to comment
Share on other sites

the trader is there but none of the traders (the ones i added and the epoch ones) show any scroll option to access trader menu

 

just tried changing the skin to a base epoch skin and still no scroll option to access trader menus

got the traders to work but no image is showing up for any weapons  or ammo 

any idea how to fix this

Link to comment
Share on other sites

got the traders to work but no image is showing up for any weapons  or ammo 

any idea how to fix this

How did you get it to work?

If image does not show up, you got typo in classnames. For example: if "pistol" exists in config files, it will show image and grab data about that weapon, but if you name it "pistool", it will no longer work, since data does not exist. What weapon list did you use?

Link to comment
Share on other sites

[Help Required]

 

EDIT THIS IS NOW RESOLVED! ---->  Was missing  ];  at the end of the  Server_Traders.sqf

 

Right after many issues before... I decided to start it from scratch doing it step by step to the tutorial video and my problem is "No Trader Menu" when scrolling on any trader in-game including default ones.

 

Below is all the details of what i did and would be great if you could take a look and report back with any errors I may have made.

 

 

At the top of Server_Traders.sqf  I added my skin "RU_Hooker2" as below

serverTraders = ["RU_Hooker2","Tanny_PMC","Drake","BAF_Soldier_AAR_DDPM","US_Delta_Force_AR_EP1","US_Delta_Force_Medic_EP1","Soldier_MG_PKM_PMC","Soldier_MG_PMC","UN_CDF_Soldier_Crew_EP1","GUE_Soldier_1","Soldier_Sniper_PMC","UN_CDF_Soldier_Pilot_EP1","GUE_Soldier_3","BAF_Soldier_EN_MTP","UN_CDF_Soldier_Pilot_EP1","GUE_Worker2","Herrera_Light","Soldier_MG_PKM_PMC","Soldier_MG_PMC","GUE_Soldier_CO","RU_Damsel4","FR_Sykes","GUE_Villager4","TK_GUE_Warlord_EP1","GUE_Commander","GUE_Soldier_2","TK_GUE_Soldier_5_EP1","CIV_EuroWoman02_EP1","Dr_Annie_Baker_EP1","GUE_Soldier_Crew","Citizen3_EP1","ibr_lingorman6","ibr_lingorman6s","TK_CIV_Woman02_EP1","Damsel3"];

At the bottom of Server_Traders.sqf I added my new trader (originally copied from Hero Vendor) see below

// Overpoch Vendor
menu_RU_Hooker2 = [
	[["Assault Rifles",800],["LMGS",801],["Sniper Rifles",802],["Sidearms",803],["Ammo",804],["Cars",805]],
	[],
	"neutral"

Then in Missions/DayZ_Epoch_17.Chernarus/mission.sqf at very bottom I added my 3 trader's as below.

_unit_2000 = objNull;
if (true) then
{
  _this = createAgent ["RU_Hooker2", [6388.85, 7772.12, 0], [], 0, "CAN_COLLIDE"];
  _unit_2000 = _this;
  _this setDir 120;
  _this setVehicleInit "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0;  ";
  _this setUnitAbility 0.60000002;
  _this allowDammage false; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setBehaviour 'CARELESS'; _this forceSpeed 0;_this enableSimulation false;};

_unit_2001 = objNull;
if (true) then
{
  _this = createAgent ["RU_Hooker2", [4073.322, 11671.6, 0], [], 0, "CAN_COLLIDE"];
  _unit_2001 = _this;
  _this setDir 80;
  _this setVehicleInit "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0;  ";
  _this setUnitAbility 0.60000002;
  _this allowDammage false; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setBehaviour 'CARELESS'; _this forceSpeed 0;_this enableSimulation false;};

_unit_2002 = objNull;
if (true) then
{
  _this = createAgent ["RU_Hooker2", [11462.8, 11376.7, 0], [], 0, "CAN_COLLIDE"];
  _unit_2002 = _this;
  _this setDir 200;
  _this setVehicleInit "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0;  ";
  _this setUnitAbility 0.60000002;
  _this allowDammage false; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setBehaviour 'CARELESS'; _this forceSpeed 0;_this enableSimulation false;};
};

processInitCommands;

I then proceeded to the Database and added a new  TID to the trader_tids with entries as below

ID= 693  NAME= Overpoch  Trader= 177

Then I added to the Server_Traders database table the new trader as below

TRADER= 177  CLASSNAME= RU_Hooker2  INSTANCE= 17  STATUS= neutral  STATIC= {NULL}  DESC= Overpoch

After  that I added my weapons ammo and cars into the "Trader_Data" table using this code below, the code seemed to add all the items properly with no errors.  NOTE I used same code for each set of weapons, ammo and cars but changed the 800, to the corresponding TID number in the mission.sqf

INSERT INTO traders_data (`item`, `qty`, `buy`, `sell`, `tid`, `afile`) VALUES ('["vil_ak12",3]', 5000, '[1,"ItemGoldBar10oz",1]', '[5,"ItemGoldBar",1]', 800, 'trade_weapons');

Kind regards Captain Bigzy

Link to comment
Share on other sites

There should be more TID's while you have multiple menu, for example:

ID= 800            NAME= Assault Rifles            Trader= 177

ID= 801            NAME= LMGS                      Trader= 177

ID= 802            NAME= Sniper Rifles             Trader= 177

ID= 803            NAME= Sidearms                  Trader= 177

ID= 804            NAME= Ammo                      Trader= 177

ID= 805            NAME= Cars                      Trader= 177

but i am not sure if that help with no trader menu issue. There must be something else

...

Link to comment
Share on other sites

your "squigly brackers" ( }; ) at the end of lines in mission.sqf are out of position (first bracket is not defined),, happens when copy pasting :P Get yourself a SQF syntax highlight addon for notepad, man

 

 

_this enableSimulation false;};

Link to comment
Share on other sites

How did you get it to work?

If image does not show up, you got typo in classnames. For example: if "pistol" exists in config files, it will show image and grab data about that weapon, but if you name it "pistool", it will no longer work, since data does not exist. What weapon list did you use?

I got it to work by remove the trader tabs and creating 2 overpoch weapons and overpoch ammo

The weapon list I used was the one from Matijs

Also traders don't recognise the weapon you have in ur inventory this may be to do with class names correct ??

Link to comment
Share on other sites

The weapon list I used was the one from Matijs

Also traders don't recognise the weapon you have in ur inventory this may be to do with class names correct ??

Ahh, that weapon list is fine. There is alternative list in first post, btw. I used it for my config traders.

If trader does not recognize you weapon, it means it is missing/not defined in your database. However if you are certain it is 100% in the list and said item is showing up with full name and icon, then there's an underlying problem.

Link to comment
Share on other sites

Ahh, that weapon list is fine. There is alternative list in first post, btw. I used it for my config traders.

If trader does not recognize you weapon, it means it is missing/not defined in your database. However if you are certain it is 100% in the list and said item is showing up with full name and icon, then there's an underlying problem.

Will look into this

Can u explain to me trader tid please do I need a different trader I'd per tab in trader menu or is it simply one per trader ??

Link to comment
Share on other sites

Afaik TIDs can be reused, they are there to generate categories. What's important is the skin that triggers these categories and populates the listbox with items.

 

Basically skin is what is used to attach action to an object that pops up a trader dialog. Arrays in server_traders are used to name categories in that dialog. TID is used to populate listboxes (scroll menu) in those categories with valid items that pass the check.

 

I haven't really tested reusing TIDs between multiple traders myself tho

Link to comment
Share on other sites

Afaik TIDs can be reused, they are there to generate categories. What's important is the skin that triggers these categories and populates the listbox with items.

 

Basically skin is what is used to attach action to an object that pops up a trader dialog. Arrays in server_traders are used to name categories in that dialog. TID is used to populate listboxes (scroll menu) in those categories with valid items that pass the check.

 

I haven't really tested reusing TIDs between multiple traders myself tho

I reuse my TID's for my 3 hooker traders and it works perfect.  All 3 running under 177 TID 

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...