How to add a store?

  • Offline Doyle
  • Fresh Spawn
  • *
  • Posts: 12

Re: Vehicle Shop (How-to?)

« Reply #15 posted: Apr 27, 2014, 07:50 PM »
Hey!

So I added the three files into the Persistence Folder, now where do I put that (that being the code for "isDonator")?
c_savePlayerData.sqf ?

~Doyle

What do you mean? The code is for you do whatever you want with it.
For the PlayerSave, is that something I need to setup a SQL database for?

~Doyle
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2495

Re: Vehicle Shop (How-to?)

« Reply #16 posted: Apr 27, 2014, 07:52 PM »
For the PlayerSave, is that something I need to setup a SQL database for?

~Doyle

Well, are your player saves already working (with iniDBI)? Or you haven't figured that out yet?
  • Offline Doyle
  • Fresh Spawn
  • *
  • Posts: 12

Re: Vehicle Shop (How-to?)

« Reply #17 posted: Apr 27, 2014, 08:06 PM »
For the PlayerSave, is that something I need to setup a SQL database for?

~Doyle

Well, are your player saves already working (with iniDBI)? Or you haven't figured that out yet?
That would be the second option, if you can appoint me to a tutorial :P

~Doyle
  • Offline Doyle
  • Fresh Spawn
  • *
  • Posts: 12

Re: Vehicle Shop (How-to?)

« Reply #18 posted: Apr 28, 2014, 11:42 PM »
For the PlayerSave, is that something I need to setup a SQL database for?

~Doyle

Well, are your player saves already working (with iniDBI)? Or you haven't figured that out yet?
If I can get a tutorial for it, I can set it up, or if you can direct me to a forum link where it was covered, that would be greatly apperciated.

Sorry for being such a hazard, Rev, just on a deadline, and so far you're the only help i've gotten.

~Doyle
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2495

Re: Vehicle Shop (How-to?)

« Reply #19 posted: Apr 29, 2014, 04:05 AM »
If I can get a tutorial for it, I can set it up, or if you can direct me to a forum link where it was covered, that would be greatly apperciated.

Sorry for being such a hazard, Rev, just on a deadline, and so far you're the only help i've gotten.

~Doyle

I've just uploaded a ZIP containing everything you need to set up persistence, including instructions:
https://github.com/A3Wasteland/Release_Files/raw/master/A3W_Saving_Pack.zip
  • Offline Jumbo
  • First Blood
  • ***
  • Posts: 82

Re: Vehicle Shop (How-to?)

« Reply #20 posted: Apr 29, 2014, 04:54 PM »
so no addon pbo or -mod=inidbi required? That's a lot cleaner. I've been putting inidbi.pbo into the addons folder thinking that it was required.
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2495

Re: Vehicle Shop (How-to?)

« Reply #21 posted: Apr 29, 2014, 05:20 PM »
Yeah, all the PBO contains is an SQF file to compile the "iniDB_" functions, which our "fn_inidb_custom.sqf" already does. DLLs can be called directly from the Arma 3 dir without further adjustments, and all iniDB requires is a db folder to write to.

Re: Vehicle Shop (How-to?)

« Reply #22 posted: Apr 29, 2014, 08:21 PM »
Hahah, i did that too  :D(put in inidbi.sqf etc). gonna trow out all that stuff i guess. Thanks AgentRev
  • Offline Doyle
  • Fresh Spawn
  • *
  • Posts: 12

Re: Vehicle Shop (How-to?)

« Reply #23 posted: May 11, 2014, 01:16 AM »
There you go: https://github.com/A3Wasteland/ArmA3_Wasteland.Altis/commit/156e259

All you have to do is set  Donator=1  under  [PlayerInfo]  in a player save, and in your code you can use the following to check if the player is a donator:

Code: [Select]
if (player getVariable ["isDonator", false]) then
{
// do stuff
};
For the cases, where it says things like "uniform" and "Vest", "Backpack", "Goggles", "Headgear", do I put the classnames of the object there?

~Doyle
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2495

Re: Vehicle Shop (How-to?)

« Reply #24 posted: May 11, 2014, 01:25 AM »
For the cases, where it says things like "uniform" and "Vest", "Backpack", "Goggles", "Headgear", do I put the classnames of the object there?

~Doyle

Supposing this line: https://github.com/A3Wasteland/ArmA3_Wasteland.Altis/blob/Development_main/client/functions/getDefaultClothing.sqf#L52

You would replace it with something like this:

Code: [Select]
if (_item == "headgear") then
{
if (_unit getVariable ["isDonator", false]) then
{
_result = "SuperDuperHelmet";
}
else
{
_result = "H_MilCap_mcamo";
};
};
  • Offline Richie
  • Fresh Spawn
  • *
  • Posts: 17

Re: Vehicle Shop (How-to?)

« Reply #25 posted: Oct 12, 2014, 01:51 PM »
Is this Post still the correct way to go for adding new stores/traders ?

In the middle of porting this to Takistan so i'll need to create new stores/traders  :)

Required addons are @Epoch & @allinarmaterrainpack
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2495

Re: Vehicle Shop (How-to?)

« Reply #26 posted: Oct 12, 2014, 02:16 PM »
Is this Post still the correct way to go for adding new stores/traders ?

In the middle of porting this to Takistan so i'll need to create new stores/traders  :)

Yes, it is correct, I keep that very post updated whenever needed.
  • Offline LouD
  • Silent but deadly ;)
  • Moderator
  • Veteran
  • ******
  • Posts: 1415

Re: How to add a store?

« Reply #27 posted: Jan 30, 2015, 10:36 PM »
I could use some help.
I'm familiar with adding stores and have made working stores in self placed buildings.
I have now created a small island with a building on top of it. The floor of this island is made with Land_Pier_F and on top of this there are buildings. The building the shops come in is a Land_MilOffices_V1_F. I use the exact same setup for this building to place the npc's as I did others. But for some reason the npc's either spawn above the building, somewhere around it or under it in the sea. I'm unable to figure out why...
When I check the placed civilians in the editor they are at the correct positions :(
  • Offline JoSchaap
  • Developer
  • Mercenary
  • ******
  • Posts: 481
  • Had a life.. Got a modem.. (~1996)

Re: How to add a store?

« Reply #28 posted: Jan 30, 2015, 11:39 PM »
it's probably because the building is initialized later then the npc :)
  • Offline LouD
  • Silent but deadly ;)
  • Moderator
  • Veteran
  • ******
  • Posts: 1415

Re: How to add a store?

« Reply #29 posted: Jan 30, 2015, 11:46 PM »
it's probably because the building is initialized later then the npc :)
Well if I turn off the spawn setup store npc the npc's are in the building on the right spot. the buildings are added to the sqm and dont get called from an sqf.