Page 1 of 1
Questipon on QueryDB function...
Posted: Tue Jul 14, 2020 6:24 pm
by jkgarner
The CommandLua help page says the following about ScenEdit_QueryDB
ScenEdit_QueryDB
Query database use the wrapper_object_variable.fields to see what can be returned
Parameters
objectType string The type of item to query; 'weapon', 'mount', 'sensor'
DBID number The databse id of item to query
Returns
objectObject wrapper
Can this function be used to get DB data for more than just weapon, mount, sensor objects. For example, could I pass in the DBID of a 'Facility', or an 'Aircraft' type to get data regarding the facility or aircraft?
RE: Questipon on QueryDB function...
Posted: Tue Jul 14, 2020 7:19 pm
by KnightHawk75
fb.asp?m=4802328 was that last I heard on the status about that.
RE: Questipon on QueryDB function...
Posted: Tue Jul 14, 2020 8:45 pm
by jkgarner
@KnightHawk75:
I don't think you understood what I was asking. I'll give you a concrete example.
Say that from my Lua script I want to access operation service that is part of the Facility, as stored in the DB.
I have the dbid of the facility from the unit object.
ScenEdit_QueryDB returns a nil when I pass in 'Facility'.
It also returns nil if I use 'Aircraft', or 'Ship'.
It ONLY seems to work for 'weapon','mount', or 'sensor' (what they call an object type)
I don't see a way to access any data about the unit other than what is directly in the unit object.
Any thoughts?
RE: Questipon on QueryDB function...
Posted: Wed Jul 15, 2020 12:43 am
by KnightHawk75
I understood perfectly, if you read the post I linked the answer for the rest, in April was...
Only weapon, mount and sensor have been converted.
So no, nothing but those are available as of 1147.5
RE: Questipon on QueryDB function...
Posted: Wed Jul 15, 2020 9:59 am
by jkgarner
I wonder when they will 'convert' the other objects, like units.
RE: Questipon on QueryDB function...
Posted: Wed Jul 15, 2020 9:04 pm
by KnightHawk75
I have no idea, perhaps more pressing priorities, but it would be crazy useful for scripting more adaptive or detailed logic, not to mention other things like the ToT Special Action 'thingy' I was working on.
RE: Questipon on QueryDB function...
Posted: Thu Jul 16, 2020 5:24 am
by michaelm75au
The reason I tackled the component parts first was to allow better control over using them in Lua scripts. And then things got 'busy'.[:D]
RE: Questipon on QueryDB function...
Posted: Fri Jul 17, 2020 12:04 pm
by jkgarner
And then things got 'busy'.
'busy'!? I never get 'busy'
--yeah right! [X(]
OK, Mike, I understand busy...
Is there a plan to 'finish' and do the other objects?