Closed Airdolf closed 2 months ago
Hello @Airdolf,
I guess you're talking about this config file HG_GaragesCfg.h, as you can see storePoint is a string not an array.
Let me know if that's not what you meant.
Thank you.
Understood, but then, how do I make more store points? I need to add lines under them, right? storePoints[] = { {"garage_store_air_1"}, {"garage_store_air_2"}; };
As it is right now you can only have a single store point.
I'll add this feature in the next push.
Okay, thanks. And there is single store point for all classes, or one per class? And I got one question too, about extDb3 . I have database, mySQL . Ive setup -\extDB3\@extDB3 , extdb3-conf , but as I look in my database it is empty. Do I need to set up something more?
If you're using MySQL 8.0+ extDB won't work because the extDB database authentication protocol is deprecated.
It hasn't been updated in a while... and I'm not the author of that extension.
If you're using MySQL < 8.0 check your Arma 3 and extDB logs to know what's happening under the hood.
So, Is there single store point for all classes, or one per class? `class HG_DefaultGarage { conditionToAccess = "true"; allowedTypes[] = {"Car","Truck","Tank"}; spawnPoints[] = { {"AirportTerminal",{"garage_spawn_1"}}, {"Dormitory",{"garage_spawn_2","garage_spawn_3"}} }; storePoints[] = {"garage_store_1"}; };
class HG_AirGarage { conditionToAccess = "true"; allowedTypes[] = {"Air"}; spawnPoints[] = { {"Air Terminal",{"garage_spawn_4"}} }; storePoints[] = {"garage_store_air_1"}; }; ` Is this right? Or I should keep one store point for whole garages.Cfg?
A single store point per class:
storePoint = "garage_store_1";
Thanks! Also, I got question, my air transport, planes, do not display in a garage. Aswell , as a name in a shop.
class HG_DefaultGarage
{
conditionToAccess = "true";
allowedTypes[] = {"Car","Truck","Tank"};
spawnPoints[] =
{
{"AirportTerminal",{"garage_spawn_1"}},
{"Dormitory",{"garage_spawn_2","garage_spawn_3"}},
{"POB",{"garage_spawn_pob"}}
};
storePoint = "garage_store_1";
};
class CivilianAir
{
conditionToAccess = "true";
allowedTypes[] = {"Air"};
spawnPoints[] =
{
{"Air Terminal",{"garage_spawn_4"}}
};
storePoint = "garage_store_air_1";
};
VehicleShop.cfg
class CivilianAir
{
displayName = "$STR_HG_SHOP_CIVILIANAIR";
vehicles[] =
{
{"UK3CB_C_Antonov_An2",250000,"true"},
{"UK3CB_C_AC500",750000,"true"},
{"C_Plane_Civil_01_F",500000,"true"},
{"C_Plane_Civil_01_Racing_F", 750000,"true"},
{"UK3CB_C_Cessna_172",250000,"true"},
{"pook_AN26_CIV",750000,"true"},
{"pook_AN24_CIV",750000,"true"}
};
spawnPoints[] =
{
{"$STR_HG_MARKER_1",{"civilian_air_spawn_1"}}
};
Your class in HG_VehiclesShop.h should be a sub-class as in:
YourShopClass {
YourShopCategoryOne {
// Stuff
};
YourShopCategoryTwo {
// Stuff
};
};
Other than that you're missing a closing bracket };
in your last bit of code.
I suggest changing the storing location from the "marker" to the player. Then you can utilize the park function from anywhere that the HG park interaction is available.
I have an example of how I did that in my HG simple shops fork if you are interested in seeing it. Ppgtjmad helped me years ago trying to incorporate an ACE interaction menu for the garage and park functions and that was part of the solution.
@BrianV1981 @Airdolf
To do that you can just leave the storePoint entry empty as described here (taken from HG_GaragesCfg.h):
"if left empty it will detect the nearest owned vehicle inside a 8m radius around the player"
Line 20:
I forgot about that important part because then you helped me with changing the distance from 8m to whatever I wanted, which was an important/key part, to being able to store vehicles that I can only get so close to the parking interaction point.
To help anybody else out in the future that may not be fully up to speed. When Ppgtjmad says to just leave the storePoint entry empty, he is referring to the HG_GaragesCfg.h line 27
Change it from this:
storePoint = "garage_store";
to this:
storePoint = "";
It shows me: Nothing to display there , expect military one. Where did I make a mistake? Iam very sorry, If Iam bothering you!
class HG_DefaultShop // HG_DefaultShop is just a placeholder for testing purposes, you can delete it completely and make your own
{
conditionToAccess = "true"; // Example: "(playerSide in [west,independent]) AND ((rank player) isEqualTo 'COLONEL')"
class Civs {
class CivilianGround {
displayName = "$STR_HG_SHOP_CIVILIANGROUND";
vehicles[] =
{
{"C_SUV_01_F",150000,"true"},
{"C_Offroad_01_F",150000,"true"},
{"C_Hatchback_01_F",80000,"true"},
{"UK3CB_C_SUV",85000,"true"},
{"UK3CB_C_Gaz24",40000,"true"},
{"UK3CB_C_Golf",50000,"true"},
{"UK3CB_C_UAZ_Open",50000,"true"},
{"UK3CB_C_UAZ_Closed",50000,"true"},
{"UK3CB_CCM_O_Ikarus",1000000,"true"},
{"UK3CB_C_YAVA",50000,"true"},
{"UK3CB_C_Lada",50000,"true"},
{"UK3CB_C_Octavia",75000,"true"},
{"UK3CB_C_LandRover_Open",50000,"true"},
{"UK3CB_C_LandRover_Closed",50000,"true"},
{"UK3CB_C_Landcruiser",80000,"true"}
};
spawnPoints[] =
{
{"$STR_HG_MARKER_1",{"civilian_vehicles_spawn_1"}},
{"$STR_HG_MARKER_1",{"civilian_vehicles_spawn_2"}}
};
};
class CivilianAir {
displayName = "$STR_HG_SHOP_CIVILIANAIR";
vehicles[] =
{
{"UK3CB_C_Antonov_An2",250000,"true"},
{"UK3CB_C_AC500",750000,"true"},
{"C_Plane_Civil_01_F",500000,"true"},
{"C_Plane_Civil_01_Racing_F",750000,"true"},
{"UK3CB_C_Cessna_172",250000,"true"},
{"pook_AN26_CIV",750000,"true"},
{"pook_AN24_CIV",750000,"true"}
};
spawnPoints[] =
{
{"$STR_HG_MARKER_1",{"civilian_air_spawn_1"}}
};
};
};
class Military {
displayName = "$STR_HG_SHOP_MILITARY";
vehicles[] =
{
{"rhs_uaz_open_vdv",50000,"true"}
};
spawnPoints[] =
{
{"$STR_HG_MARKER_2",{"military_vehicles_spawn_1"}}
};
};
};
I suggest changing the storing location from the "marker" to the player. Then you can utilize the park function from anywhere that the HG park interaction is available.
I have an example of how I did that in my HG simple shops fork if you are interested in seeing it. Ppgtjmad helped me years ago trying to incorporate an ACE interaction menu for the garage and park functions and that was part of the solution.
Thank you, but what does ACE do in your and @Ppgtjmad ACE version?
@Airdolf I went through and changed all of the files associated with opening up the shops and modified them in order for them to work with the ace interaction framework.
The problem with my fork is that I completely overhauled the money system to function with grad-moneyMenu. I was not smart enough to make a separate fork with HG simp shops and only the ACE interaction overhaul. I may do that at some point, but I have a lot of other stuff that I want to do, if you catch my drift, lol...
If you are up for it/capable, I wrote down and commented on everything that I changed and gave a "Plan of Attack" to myself for changing all of the HG shop addaction buttons into ace interactions. It shouldn't be that hard for someone to go back and create HG simple shops with all ace interactions. I have the blueprint already, it is just mixed in with a bunch of other modifications that I am sure people will not want unless they utilize all of the grad modules.
@Airdolf,
I'am giving you a hand with this one but bear in mind that this is not a support channel.
Just make two different shops:
class CivilianShop
{
conditionToAccess = "playerSide isEqualTo civilian";
class CivilianGround
{
displayName = "$STR_HG_SHOP_CIVILIANGROUND";
vehicles[] =
{
{"C_SUV_01_F",150000,"true"},
{"C_Offroad_01_F",150000,"true"},
{"C_Hatchback_01_F",80000,"true"},
{"UK3CB_C_SUV",85000,"true"},
{"UK3CB_C_Gaz24",40000,"true"},
{"UK3CB_C_Golf",50000,"true"},
{"UK3CB_C_UAZ_Open",50000,"true"},
{"UK3CB_C_UAZ_Closed",50000,"true"},
{"UK3CB_CCM_O_Ikarus",1000000,"true"},
{"UK3CB_C_YAVA",50000,"true"},
{"UK3CB_C_Lada",50000,"true"},
{"UK3CB_C_Octavia",75000,"true"},
{"UK3CB_C_LandRover_Open",50000,"true"},
{"UK3CB_C_LandRover_Closed",50000,"true"},
{"UK3CB_C_Landcruiser",80000,"true"}
};
spawnPoints[] =
{
{"$STR_HG_MARKER_1",{"civilian_vehicles_spawn_1"}},
{"$STR_HG_MARKER_1",{"civilian_vehicles_spawn_2"}}
};
};
class CivilianAir
{
displayName = "$STR_HG_SHOP_CIVILIANAIR";
vehicles[] =
{
{"UK3CB_C_Antonov_An2",250000,"true"},
{"UK3CB_C_AC500",750000,"true"},
{"C_Plane_Civil_01_F",500000,"true"},
{"C_Plane_Civil_01_Racing_F",750000,"true"},
{"UK3CB_C_Cessna_172",250000,"true"},
{"pook_AN26_CIV",750000,"true"},
{"pook_AN24_CIV",750000,"true"}
};
spawnPoints[] =
{
{"$STR_HG_MARKER_1",{"civilian_air_spawn_1"}}
};
};
};
class MilitaryShop
{
conditionToAccess = "playerSide in [west,east,independent]";
class MilitaryGround
{
displayName = "$STR_HG_SHOP_MILITARY";
vehicles[] =
{
{"rhs_uaz_open_vdv",50000,"true"}
};
spawnPoints[] =
{
{"$STR_HG_MARKER_2",{"military_vehicles_spawn_1"}}
};
};
};
Adjust conditionToAccess to you liking.
@Airdolf
I think that your question has been answered my friend, I'm closing this issue.
Re-open it if needed.
Hello! I got an issue, where I cannot park my vehicle, even if it is located at a storePoints[] = {"garage_store_1", "garage_store_2"}; . Ive tried to resize marker, Ive placed an rectangle nothing changed.
Anyway, I appreciate your mod and your work.