How to add a store?

Re: How to add a store?

« Reply #45 posted: Dec 31, 2016, 11:09 PM »
Okay after help from GriffinZS here is the code you need in your  storeowner.sqf:

Code: [Select]
storeOwnerConfig = compileFinal str
[
    ["GenStore1", -1, [], []],
    ["GenStore2", -1, [], []],
    ["GenStore3", -1, [], []],
    ["GenStore4", -1, [], []],
    ["GenStore5", -1, [], []],
 
    ["GunStore1", -1, [], []],
    ["GunStore2", -1, [], []],
    ["GunStore3", -1, [], []],
    ["GunStore4", -1, [], []],
 
    // Buttons you can disable: "Land", "Armored", "Tanks", "Helicopters", "Boats", "Planes"
    ["VehStore1", -1, [], []],
    ["VehStore2", -1, [], []],
    ["VehStore3", -1, [], []],
    ["VehStore4", -1, [], ["Planes"]],
    ["VehStore5", -1, [], ["Planes"]],
    ["VehStore6", -1, [], ["Boats"]]
];
 
// Outfits for store owners
storeOwnerConfigAppearance = compileFinal str
[
    ["GenStore1", [["weapon", ""], ["uniform", "U_IG_Guerilla2_2"]]],
    ["GenStore2", [["weapon", ""], ["uniform", "U_IG_Guerilla2_3"]]],
    ["GenStore3", [["weapon", ""], ["uniform", "U_IG_Guerilla3_1"]]],
    ["GenStore4", [["weapon", ""], ["uniform", "U_IG_Guerilla2_1"]]],
    ["GenStore5", [["weapon", ""], ["uniform", "U_IG_Guerilla3_2"]]],
 
    ["GunStore1", [["weapon", ""], ["uniform", "U_B_SpecopsUniform_sgg"]]],
    ["GunStore2", [["weapon", ""], ["uniform", "U_O_SpecopsUniform_blk"]]],
    ["GunStore3", [["weapon", ""], ["uniform", "U_I_CombatUniform_tshirt"]]],
    ["GunStore4", [["weapon", ""], ["uniform", "U_IG_Guerilla1_1"]]],
 
    ["VehStore1", [["weapon", ""], ["uniform", "U_Competitor"]]],
    ["VehStore2", [["weapon", ""], ["uniform", "U_Competitor"]]],
    ["VehStore3", [["weapon", ""], ["uniform", "U_Competitor"]]],
    ["VehStore4", [["weapon", ""], ["uniform", "U_Competitor"]]],
    ["VehStore5", [["weapon", ""], ["uniform", "U_Competitor"]]],
    ["VehStore6", [["weapon", ""], ["uniform", "U_Competitor"]]]
];

The StoreAI will be in the location you set in the editor.

Thanks GriffinZS for your help on this as this will help others who wants to create Wasteland on other maps like I am now doing. There are hundreds of maps out there and well its up to us to convert Altis or Stratis to other maps, AgentRev has done his part. Again thank you GriffinZS...

The clan I am helping and been a part of {PST} Phoenix Sniper Team realized the more Wasteland maps there are the less people will get burned out on just playing one map all the time like I did...
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2652

Re: How to add a store?

« Reply #46 posted: Jan 11, 2017, 04:08 PM »
updated for Eden

Re: How to add a store?

« Reply #47 posted: Jan 12, 2017, 07:26 AM »
Hmmmm I did a search in the forums for store and the only one that came up was your OUTDATED one.

Really weird but thanks for the updated fix AgentRev...


EDIT: Nevermind I see what you did AgentRev by updating the original tutorial...
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2652

Re: How to add a store?

« Reply #48 posted: Jan 12, 2017, 11:54 AM »
No I mean I updated the original post with the new method for Eden.

Re: How to add a store?

« Reply #49 posted: Jan 26, 2017, 11:26 AM »
Thank you for updating it AgentRev..

.
Code: [Select]
You Da' Man!!!!

 ;D

Re: How to add a store?

« Reply #50 posted: Mar 29, 2017, 05:18 AM »
Hi everyone.

I am following AgentRev's post on the first page to create a store, but I am having some issues:

I have placed down a civ named GenStore1 with 0 = [this] spawn A3W_fnc_setupStoreNPC in the init


However when I launch the server to test it, i recieve this message:
http://iforce.co.nz/i/e1qzedsn.kkw.jpg
How to add a store?


The general store works but there is no cashdesk or crate:
http://iforce.co.nz/i/bndlzajx.2bz.jpg
How to add a store?



storeOwners.sqf:
Code: [Select]
// ******************************************************************************************
// * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.com *
// ******************************************************************************************
// @file Name: storeOwners.sqf
// @file Author: AgentRev, JoSchaap, His_Shadow

// Notes: Gun and general stores have position of spawned crate, vehicle stores have an extra air spawn direction
//
// Array contents are as follows:
// Name, Building Position, Desk Direction (or [Desk Direction, Front Offset]), Excluded Buttons
storeOwnerConfig = compileFinal str
[
        ["GenStore1", -1, [], []],
["GenStore2", 4, 310, []],
["GenStore3", 4, 340, []],

["GunStore1", 0, 5, []],
["GunStore2", 1, 130, []],
["GunStore3", 5, 85, []],
["GunStore4", 1, [30, 1.5], []],

// Buttons you can disable: "Land", "Armored", "Tanks", "Helicopters", "Boats", "Planes"
["VehStore1", 0, 195, ["Planes"]],
["VehStore2", 2, 285, ["Boats"]],
["VehStore3", 1, 245, ["Planes"]]
];

// Outfits for store owners
storeOwnerConfigAppearance = compileFinal str
[
["GenStore1", [["weapon", ""], ["uniform", "U_IG_Guerilla2_2"]]],
["GenStore2", [["weapon", ""], ["uniform", "U_IG_Guerilla2_3"]]],
["GenStore3", [["weapon", ""], ["uniform", "U_IG_Guerilla3_1"]]],

["GunStore1", [["weapon", ""], ["uniform", "U_B_SpecopsUniform_sgg"]]],
["GunStore2", [["weapon", ""], ["uniform", "U_O_SpecopsUniform_blk"]]],
["GunStore3", [["weapon", ""], ["uniform", "U_I_CombatUniform_tshirt"]]],
["GunStore4", [["weapon", ""], ["uniform", "U_IG_Guerilla1_1"]]],

["VehStore1", [["weapon", ""], ["uniform", "U_Competitor"]]],
["VehStore2", [["weapon", ""], ["uniform", "U_Competitor"]]],
["VehStore3", [["weapon", ""], ["uniform", "U_Competitor"]]]
];

And the CreateStoreFurniture.sqf
Code: [Select]
// ******************************************************************************************
// * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.com *
// ******************************************************************************************
// @file Version: 1.0
// @file Name: createStoreFurniture.sqf
// @file Author: His_Shadow
// @file Args:

if (!isServer) exitWith {};

private ["_storeOwner", "_bPos", "_pDir", "_pDDirMod", "_chair", "_desk", "_base", "_deskPos"];

//grab our arguments
_storeOwner = _this select 0;
_bPos = _this select 1;
_pDir = _this select 2;
_pDDirMod = _this select 3;
_base = getPosATL _storeOwner;

//create the bench NOTE: was going to use a plastic chair, but the bench looks nicer
//_chair = "Land_Bench_F" createVehicle _base;
//_chair setVelocity [0,0,0];
//_chair setPos [(_bPos select 0), (_bPos select 1), (_bPos select 2) - .2];
//_chair setDir _pDir + 90;
//_chair removeAllEventHandlers "hit";
//_chair removeAllEventHandlers "dammaged";
//_chair removeAllEventHandlers "handleDamage";
//_chair addeventhandler ["hit", {(_this select 0) setdamage 0;}];
//_chair addeventhandler ["dammaged", {(_this select 0) setdamage 0;}];
//_chair addEventHandler["handledamage", {false}];
//_chair allowDamage false;
//_chair enableSimulation false;

_pDDirMod = _pDDirMod + 180; // desk model is inverted

_bPos set [2, (_bPos select 2) + 0.05];
_deskPos = ASLtoATL ((ATLtoASL _bPos) vectorAdd ([[0, -0.8, 0], -_pDDirMod] call BIS_fnc_rotateVector2D));

//create the cashier station.
_desk = createVehicle ["Land_CashDesk_F", _base, [], 0, "None"];
_desk allowDamage false;
_desk setPosATL _deskPos;
_desk setDir _pDDirMod;
_desk setVariable ["R3F_LOG_disabled", true, true];
_desk disableCollisionWith _storeOwner;

//_chair disableCollisionWith _desk;
//_chair

_desk

Line 34 reads: _pDDirMod = _pDDirMod + 180; // desk model is inverted

Hope someone can help, as I can't understand what's wrong.

Cheers.

techladdie
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2652

Re: How to add a store?

« Reply #51 posted: Mar 29, 2017, 05:27 AM »
The 2 most important pieces are missing: your mission.sqm and arma3.rpt log

Re: How to add a store?

« Reply #52 posted: Mar 29, 2017, 05:43 AM »
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2652

Re: How to add a store?

« Reply #53 posted: Mar 29, 2017, 06:02 AM »
The civilians placed in the editor must not be yellow, they have to be purple, otherwise it's not gonna work. I don't even understand how you managed to place yellow units in the first place.

Re: How to add a store?

« Reply #54 posted: Mar 29, 2017, 06:53 AM »
Changing the civilians from yellow to purple doesn't look like it has solved any issues :(

  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2652

Re: How to add a store?

« Reply #55 posted: Mar 29, 2017, 07:07 AM »
Well, post the new mission.sqm and I'll see for myself.

Re: How to add a store?

« Reply #56 posted: Mar 29, 2017, 07:16 AM »
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2652

Re: How to add a store?

« Reply #57 posted: Mar 29, 2017, 07:30 AM »
I can't find the problem, I have to sleep, will look again tomorrow.

Re: How to add a store?

« Reply #58 posted: Dec 03, 2018, 01:17 AM »
Hi, need help Id like to have a vehicle store selling some choppers but not the armed ones, anyway to do that without changing all the vehicle store in the storeconfig?