Jump to content
  • 0

Determine Vehicle Type (isKindOf) In Database?


Aristoi

Question

Is there a way (other than building an xref table myself) to determine whether an object_data record is a vehicle (as opposed to building, etc), and what type in the database for trigger purposes?  Something along the lines of the function isKindOf?

 

Thanks for the help!

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

There is no isKindOf function of course, even if there was one how would the database know the ArmA2 type hierarchy? :D

All you can do is is build your own or use ArmA script for that kind of things, since the game has always all objects from the database loaded in anyways (unless the dead/destroyed objects) you can write a simple script in game maybe? depending what you want to do

Link to comment
Share on other sites

  • 0

Hey Aristoi,

 

if you are looking to do this in MySQL and not ArmA scripting, you can use the following query. From what I can gather it is all of the possible objects you can build. (I think tents are missing?)

SELECT * FROM `object_data` WHERE `Classname` NOT IN ('WoodFloor_DZ','WoodFloorHalf_DZ','WoodFloorQuarter_DZ','Land_DZE_LargeWoodDoorLocked','WoodLargeWallDoor_DZ','WoodLargeWallWin_DZ','WoodLargeWall_DZ','Land_DZE_WoodDoorLocked','WoodSmallWallDoor_DZ','WoodSmallWallWin_DZ','Land_DZE_GarageWoodDoor','Land_DZE_GarageWoodDoorLocked','WoodLadder_DZ','WoodStairsSans_DZ','WoodStairs_DZ','WoodSmallWall_DZ','WoodSmallWallThird_DZ','CinderWallHalf_DZ','CinderWall_DZ','CinderWallDoorway_DZ','Land_DZE_LargeWoodDoor','MetalFloor_DZ','CinderWallDoorSmallLocked_DZ','CinderWallSmallDoorway_DZ','CinderWallDoor_DZ','Plastic_Pole_EP1_DZ','VaultStorageLocked','WorkBench_DZ')
Link to comment
Share on other sites

  • 0

i think there are some missing items in your list? complete list from epoch code is:

dayz_allowedObjects = ["TentStorage","TentStorageDomed","TentStorageDomed2", "VaultStorageLocked", "Hedgehog_DZ", "Sandbag1_DZ","BagFenceRound_DZ","TrapBear","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ","Land_HBarrier3_DZ","Land_HBarrier5_DZ","Fence_corrugated_DZ","M240Nest_DZ","CanvasHut_DZ","ParkBench_DZ","MetalGate_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","Plastic_Pole_EP1_DZ","Generator_DZ","StickFence_DZ","LightPole_DZ","FuelPump_DZ","DesertCamoNet_DZ","ForestCamoNet_DZ","DesertLargeCamoNet_DZ","ForestLargeCamoNet_DZ","SandNest_DZ","DeerStand_DZ","MetalPanel_DZ","WorkBench_DZ","WoodFloor_DZ","WoodLargeWall_DZ","WoodLargeWallDoor_DZ","WoodLargeWallWin_DZ","WoodSmallWall_DZ","WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","LockboxStorageLocked","WoodFloorHalf_DZ","WoodFloorQuarter_DZ","WoodStairs_DZ","WoodStairsSans_DZ","WoodSmallWallThird_DZ","WoodLadder_DZ","Land_DZE_GarageWoodDoor","Land_DZE_LargeWoodDoor","Land_DZE_WoodDoor","Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoorLocked","Land_DZE_WoodDoorLocked","CinderWallHalf_DZ","CinderWall_DZ","CinderWallDoorway_DZ","CinderWallDoor_DZ","CinderWallDoorLocked_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorSmall_DZ","CinderWallDoorSmallLocked_DZ","MetalFloor_DZ","WoodRamp_DZ","GunRack_DZ","FireBarrel_DZ"];

you could use that for a SQL query but well, depends what you want to do :D

Link to comment
Share on other sites

  • 0

Thanks for the help, guys. Regarding how the database would know the structure (it wouldn't! :) ), in the non-Epoch hive they are in separate tables, so you can tell. I thought maybe there was some wizardry there, or perhaps a custom MySQL function. I think I will go with the reference table. My ultimate goal is to move some data into the database for easy modification (the inventory sizes of vehicles, for one). I'll keep everyone updated as it goes.

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
  • Discord

×
×
  • Create New...