New DLL callbacks - any requests?
Moderators: GSH, VSMIT, Red Devil, Commando
- AI_Unit
- Thunderbolt
- Posts: 186
- Joined: Fri Mar 30, 2012 11:53 pm
- Location: Mire, negotiating with Scions.
- Contact:
Re: New DLL callbacks - any requests?
How about using some DLL Callbacks in AIP format? Like Patrolling and Defending Units? Would save a lot of time, plus might improve AI performance
This might be a good Example:
[Plan 1]
planType = "Patrol"
planPriority = 999
planCondition = "Exists"
planConditionClass = "PATROL_UNIT"
planConditionCount = 2
planConditionClassProvided = true
planCompare = "<="
patrolType1 = "PATROL_UNIT"
patrolPath1 = "PATH_NAME"
buildIfNoIdle = 1
This might be a good Example:
[Plan 1]
planType = "Patrol"
planPriority = 999
planCondition = "Exists"
planConditionClass = "PATROL_UNIT"
planConditionCount = 2
planConditionClassProvided = true
planCompare = "<="
patrolType1 = "PATROL_UNIT"
patrolPath1 = "PATH_NAME"
buildIfNoIdle = 1
Re: New DLL callbacks - any requests?
I'm afraid that would just cause problems as good coding dictates you check what you do before you do it. How are you going to check the existance of a path from the AIPs? You'll still need the dll, afaik.
- AI_Unit
- Thunderbolt
- Posts: 186
- Joined: Fri Mar 30, 2012 11:53 pm
- Location: Mire, negotiating with Scions.
- Contact:
Re: New DLL callbacks - any requests?
The same way that the Hold does and the Basebuildminimus in 1.3 AIP code. That allows the path to be missing or if it's there, it uses it. E.G.Red Spot wrote:I'm afraid that would just cause problems as good coding dictates you check what you do before you do it. How are you going to check the existance of a path from the AIPs? You'll still need the dll, afaik.
planCondition3 = "PathExists"
pathpointsCanBeMissing = true
- Red Devil
- Recycler
- Posts: 4398
- Joined: Fri Feb 18, 2011 5:10 pm
- Location: High in the Rocky Mountains
Re: New DLL callbacks - any requests?
that doesn't work very well, so use the Lua functions for checking pathpoints.
If given the truth, the people can be depended upon to meet any national crisis. The great point is to bring them the real facts - and beer.
Abraham Lincoln
Battlestrat, FE, G66, In The Shadows, Starfleet, Uler, & ZTV
Lifetime member of JBS and NRA
Abraham Lincoln
Battlestrat, FE, G66, In The Shadows, Starfleet, Uler, & ZTV
Lifetime member of JBS and NRA
- AI_Unit
- Thunderbolt
- Posts: 186
- Joined: Fri Mar 30, 2012 11:53 pm
- Location: Mire, negotiating with Scions.
- Contact:
Re: New DLL callbacks - any requests?
I'm just looking for a simpler way lol. It took me about 6 hours to figure it out, with TONS of help too xD
- Zero Angel
- Attila
- Posts: 1536
- Joined: Mon Feb 21, 2011 12:54 am
- Contact:
Re: New DLL callbacks - any requests?
I'm trying to locate/troubleshoot a bug where damage will sometimes fluctuate when it's not supposed to (a so-called 'random damage' bug).
Could a DLL callback be implemented that can get the damage value of any given weapon/explosion, and possibly output it to a DLL/logfile if the DLL supports that? It might help with bug testing and I can test custom DLLs with others through the vsr-alpha program.
Could a DLL callback be implemented that can get the damage value of any given weapon/explosion, and possibly output it to a DLL/logfile if the DLL supports that? It might help with bug testing and I can test custom DLLs with others through the vsr-alpha program.
Regulators
Regulate any stealin' of this biometal pool, we're damn good, too
But you can't be any geek off the street
Gotta be handy with the chains if you know what I mean
Earn your keep
Regulate any stealin' of this biometal pool, we're damn good, too
But you can't be any geek off the street
Gotta be handy with the chains if you know what I mean
Earn your keep
Re: New DLL callbacks - any requests?
Get the damage from the ODF of the weapon probably, though you will need a little bit of logic to dive through the files right, as well as calculations on explosion damage. Track all handles you care about in a big array and all their healths in a 2nd big array. Basically...Zero Angel wrote:I'm trying to locate/troubleshoot a bug where damage will sometimes fluctuate when it's not supposed to (a so-called 'random damage' bug).
Could a DLL callback be implemented that can get the damage value of any given weapon/explosion, and possibly output it to a DLL/logfile if the DLL supports that? It might help with bug testing and I can test custom DLLs with others through the vsr-alpha program.
- General BlackDragon
- Flying Mauler
- Posts: 2408
- Joined: Sat Feb 19, 2011 6:37 am
- Contact:
Re: New DLL callbacks - any requests?
A Get parallel to DLLEXPORT void DLLAPI SetWeaponMask(Handle me, long mask); would be nice.
DLLEXPORT long DLLAPI GetWeaponMask(Handle h);
DLLEXPORT long DLLAPI GetWeaponMask(Handle h);
Battlezone Classic Public Forums
*****General BlackDragon*****
*****General BlackDragon*****
- General BlackDragon
- Flying Mauler
- Posts: 2408
- Joined: Sat Feb 19, 2011 6:37 am
- Contact:
Re: New DLL callbacks - any requests?
Thought of another useful get. A parellel to:
DLLEXPORT void DLLAPI SetGroup(Handle h, int group);
DLLEXPORT int DLLAPI GetCurGroup(Handle h); // Returns which int Group the unit is currently in. (0-9)
DLLEXPORT void DLLAPI SetGroup(Handle h, int group);
DLLEXPORT int DLLAPI GetCurGroup(Handle h); // Returns which int Group the unit is currently in. (0-9)
Battlezone Classic Public Forums
*****General BlackDragon*****
*****General BlackDragon*****
- General BlackDragon
- Flying Mauler
- Posts: 2408
- Joined: Sat Feb 19, 2011 6:37 am
- Contact:
Re: New DLL callbacks - any requests?
Found that classlabel = "assaulthover" returns GetObjInfo Get_GOClass of CLASS_UNKNOWN. I don't see a CLASS_ASSAULTHOVER in the class list in script utils.
Battlezone Classic Public Forums
*****General BlackDragon*****
*****General BlackDragon*****
- AI_Unit
- Thunderbolt
- Posts: 186
- Joined: Fri Mar 30, 2012 11:53 pm
- Location: Mire, negotiating with Scions.
- Contact:
Re: New DLL callbacks - any requests?
Might actually come in useful when the DLL tells a unit to do something first priority, or when a new unit is added to the game.General BlackDragon wrote:Thought of another useful get. A parellel to:
DLLEXPORT void DLLAPI SetGroup(Handle h, int group);
DLLEXPORT int DLLAPI GetCurGroup(Handle h); // Returns which int Group the unit is currently in. (0-9)
- General BlackDragon
- Flying Mauler
- Posts: 2408
- Joined: Sat Feb 19, 2011 6:37 am
- Contact:
Re: New DLL callbacks - any requests?
ATM there is an IsPerson call. It'd be nice to have other similar functions, like IsBuilding and IsVehicle (Craft?), IsWeapon, etc...
Battlezone Classic Public Forums
*****General BlackDragon*****
*****General BlackDragon*****
Re: New DLL callbacks - any requests?
char objclass[64];
GetObjInfo(h,Get_GOClass,objclass);
Already does that
GetObjInfo(h,Get_GOClass,objclass);
Already does that
- General BlackDragon
- Flying Mauler
- Posts: 2408
- Joined: Sat Feb 19, 2011 6:37 am
- Contact:
Re: New DLL callbacks - any requests?
That returns each individual classlabel. There is Get_EntityType though, but it I see that certain types are seperate, like Craft and Vehicle are separate.
I suppose I could write a helper function that does similarly.
I suppose I could write a helper function that does similarly.
Battlezone Classic Public Forums
*****General BlackDragon*****
*****General BlackDragon*****
- General BlackDragon
- Flying Mauler
- Posts: 2408
- Joined: Sat Feb 19, 2011 6:37 am
- Contact:
Re: New DLL callbacks - any requests?
Thought of a really good and probably easy one:
DLLEXPORT const char*DLLAPI GetAIP(int Team); // Returns the current AIP in use by the specified Team. Returns NULL if Team is invalid, or no AIP is running on that team.
DLLEXPORT const char*DLLAPI GetAIP(int Team); // Returns the current AIP in use by the specified Team. Returns NULL if Team is invalid, or no AIP is running on that team.
Battlezone Classic Public Forums
*****General BlackDragon*****
*****General BlackDragon*****