New DLL callbacks - any requests?
Moderators: GSH, VSMIT, Red Devil, Commando
Re: New DLL callbacks - any requests?
You have the dll set the AIP, so your dll/code should already be aware of it.
Re: New DLL callbacks - any requests?
AIPs can self-switch now if desired.
-- GSH
-- GSH
- General BlackDragon
- Flying Mauler
- Posts: 2408
- Joined: Sat Feb 19, 2011 6:37 am
- Contact:
Re: New DLL callbacks - any requests?
Similar to the Goto vector version, vector versions of these would be nice.
DLLEXPORT void DLLAPI Mine(Handle me, Vector &pos, int priority = 1);
DLLEXPORT void DLLAPI Retreat(Handle me, Vector &pos, int priority = 1);
DLLEXPORT void DLLAPI Dropoff(Handle me, Vector &pos, int priority = 1);
DLLEXPORT void DLLAPI Mine(Handle me, Vector &pos, int priority = 1);
DLLEXPORT void DLLAPI Retreat(Handle me, Vector &pos, int priority = 1);
DLLEXPORT void DLLAPI Dropoff(Handle me, Vector &pos, int priority = 1);
Last edited by General BlackDragon on Tue Oct 20, 2015 2:48 am, edited 1 time in total.
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?
Not sure if I mentioned this yet or not, A parellel to SetSkill, the ability to get the current skill of the unit.
DLLEXPORT int DLLAPI GetSkill(Handle h);
DLLEXPORT int DLLAPI GetSkill(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?
Requesting a few more things:
// Like SelfDamage()/Damage()/DamageF(), but sets the damage causer to him.
// This allows the DLL to implicate someone else taking credit for a kill on them,
// if this damage does the job of killing them.
DLLEXPORT void DLLAPI OtherDamage(Handle me, Handle him, float amt);
// Like SelfDamage()/Damage()/DamageF(), but sets the damage causer to him.
// This allows the DLL to implicate someone else taking credit for a kill on them,
// if this damage does the job of killing them.
DLLEXPORT void DLLAPI OtherDamage(Handle me, Handle him, float amt);
Battlezone Classic Public Forums
*****General BlackDragon*****
*****General BlackDragon*****
Re: New DLL callbacks - any requests?
GetExplosion, basically returning the name of the explosion, a ship is damaged by.
Would be useful in creating special explosions, like EMP explosions, via dll.
Would be useful in creating special explosions, like EMP explosions, via dll.
Re: New DLL callbacks - any requests?
Not sure what it would be called but being able to have a DLL prevent you from building an object could be useful. For example, having a unit only buildable if an ivar value is a specific amount. Basically a way for mod makers to create their own scrap system, if they choose to do so.
For clarification. A dll callback that interacts with the build requirement system as well as the scrap requirement system.
For example
1. As long as the player has a custom extractor (ibscup_33), ivar33 increments upward for the player. Up to a value specified in the odf.
2. If the unit is lost, ivar33 reverts back to 0.
3. The player wants to build a new tank, but it requires ivar33 to be 50 or higher, if the player tries to build with this value too low, it is rejected due to the dll callback.
In the above example, all of the behavior being handled by the dll.
For clarification. A dll callback that interacts with the build requirement system as well as the scrap requirement system.
For example
1. As long as the player has a custom extractor (ibscup_33), ivar33 increments upward for the player. Up to a value specified in the odf.
2. If the unit is lost, ivar33 reverts back to 0.
3. The player wants to build a new tank, but it requires ivar33 to be 50 or higher, if the player tries to build with this value too low, it is rejected due to the dll callback.
In the above example, all of the behavior being handled by the dll.
Re: New DLL callbacks - any requests?
You could replace the factory/constructor with a factory/constructor that can't build that building if the conditions are not met.
Re: New DLL callbacks - any requests?
True, figured a dll callback would be cleaner as you don't have to have x number of different factory variant odfs to account for all of the combinations.
Re: New DLL callbacks - any requests?
Would it be possible for a dll to check if a client/host are out of sync? Currently I'm seeing quite a few resyncs in G66.
Unfortunately I have no way of knowing if the dll is triggering the resyncs or something in the engine is.
Being able to log what the dll is doing, and within the same log, being able to log the game is out of sync, will give clues what is going on at the time.
Unfortunately I have no way of knowing if the dll is triggering the resyncs or something in the engine is.
Being able to log what the dll is doing, and within the same log, being able to log the game is out of sync, will give clues what is going on at the time.
Re: New DLL callbacks - any requests?
Not easily. Periodically (every 1.6 or 3.2 seconds at 10tps), clients send checksums of where every gameobject was during those 16/32 turns. And, that checksum is only 32 bits; impossible to unscramble those bits back to ~4096-32768 bytes of original data. Server checks against its checksums, and if different, reports what client(s) are out of sync. The DLL's state is not part of that checksummed data, but any decisions made by differing DLLs tend to cause gameobjects to be out of sync quickly.Would it be possible for a dll to check if a client/host are out of sync?
-- GSH
- General BlackDragon
- Flying Mauler
- Posts: 2408
- Joined: Sat Feb 19, 2011 6:37 am
- Contact:
Re: New DLL callbacks - any requests?
Could always swap out the G66 DLL for a Stock DLL to see if it still happens. If I had the source to RD's G66 I could check to make sure it's not DLL caused.
Battlezone Classic Public Forums
*****General BlackDragon*****
*****General BlackDragon*****
- 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?
the incorrect folder and, hence, the incorrect dll was being used, hence, the resyncs; correct one is resync free.
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
- General BlackDragon
- Flying Mauler
- Posts: 2408
- Joined: Sat Feb 19, 2011 6:37 am
- Contact:
Re: New DLL callbacks - any requests?
Ah, that explains it.
Battlezone Classic Public Forums
*****General BlackDragon*****
*****General BlackDragon*****