New DLL callbacks - any requests?

Moderators: GSH, VSMIT, Red Devil, Commando

User avatar
Red Spot
Attila
Posts: 1627
Joined: Mon Feb 21, 2011 6:14 pm
Location: The Netherlands

Re: New DLL callbacks - any requests?

Postby Red Spot » Tue Jul 21, 2015 5:44 pm

You have the dll set the AIP, so your dll/code should already be aware of it.

User avatar
GSH
Patch Creator
Posts: 2448
Joined: Fri Feb 18, 2011 4:55 pm
Location: USA
Contact:

Re: New DLL callbacks - any requests?

Postby GSH » Tue Jul 21, 2015 6:07 pm

AIPs can self-switch now if desired.

-- GSH

User avatar
Red Spot
Attila
Posts: 1627
Joined: Mon Feb 21, 2011 6:14 pm
Location: The Netherlands

Re: New DLL callbacks - any requests?

Postby Red Spot » Wed Jul 22, 2015 8:45 am

Forgat about that one ...

User avatar
General BlackDragon
Flying Mauler
Posts: 2399
Joined: Sat Feb 19, 2011 6:37 am
Contact:

Re: New DLL callbacks - any requests?

Postby General BlackDragon » Thu Sep 10, 2015 3:35 am

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);
Last edited by General BlackDragon on Tue Oct 20, 2015 2:48 am, edited 1 time in total.
Battlezone Classic Public Forums
*****General BlackDragon*****

User avatar
General BlackDragon
Flying Mauler
Posts: 2399
Joined: Sat Feb 19, 2011 6:37 am
Contact:

Re: New DLL callbacks - any requests?

Postby General BlackDragon » Tue Oct 20, 2015 2:47 am

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);
Battlezone Classic Public Forums
*****General BlackDragon*****

User avatar
General BlackDragon
Flying Mauler
Posts: 2399
Joined: Sat Feb 19, 2011 6:37 am
Contact:

Re: New DLL callbacks - any requests?

Postby General BlackDragon » Thu Nov 26, 2015 1:51 am

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);
Battlezone Classic Public Forums
*****General BlackDragon*****

Commando
Flying Mauler
Posts: 2175
Joined: Fri Feb 18, 2011 6:41 pm

Re: New DLL callbacks - any requests?

Postby Commando » Sat Dec 26, 2015 8:01 pm

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.

Commando
Flying Mauler
Posts: 2175
Joined: Fri Feb 18, 2011 6:41 pm

Re: New DLL callbacks - any requests?

Postby Commando » Thu Dec 31, 2015 4:23 pm

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.

mase
Thunderbolt
Posts: 155
Joined: Sat Mar 05, 2011 11:17 am

Re: New DLL callbacks - any requests?

Postby mase » Fri Jan 01, 2016 5:47 pm

You could replace the factory/constructor with a factory/constructor that can't build that building if the conditions are not met.

Commando
Flying Mauler
Posts: 2175
Joined: Fri Feb 18, 2011 6:41 pm

Re: New DLL callbacks - any requests?

Postby Commando » Fri Jan 01, 2016 7:17 pm

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.

Commando
Flying Mauler
Posts: 2175
Joined: Fri Feb 18, 2011 6:41 pm

Re: New DLL callbacks - any requests?

Postby Commando » Sat Mar 12, 2016 10:48 pm

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.

User avatar
GSH
Patch Creator
Posts: 2448
Joined: Fri Feb 18, 2011 4:55 pm
Location: USA
Contact:

Re: New DLL callbacks - any requests?

Postby GSH » Mon Mar 14, 2016 3:42 pm

Would it be possible for a dll to check if a client/host are out of sync?


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.

-- GSH

User avatar
General BlackDragon
Flying Mauler
Posts: 2399
Joined: Sat Feb 19, 2011 6:37 am
Contact:

Re: New DLL callbacks - any requests?

Postby General BlackDragon » Mon Mar 14, 2016 4:39 pm

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*****

User avatar
Red Devil
Recycler
Posts: 4392
Joined: Fri Feb 18, 2011 5:10 pm
Location: High in the Rocky Mountains
Contact:

Re: New DLL callbacks - any requests?

Postby Red Devil » Mon Mar 14, 2016 9:00 pm

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

User avatar
General BlackDragon
Flying Mauler
Posts: 2399
Joined: Sat Feb 19, 2011 6:37 am
Contact:

Re: New DLL callbacks - any requests?

Postby General BlackDragon » Mon Mar 14, 2016 10:50 pm

Ah, that explains it.
Battlezone Classic Public Forums
*****General BlackDragon*****


Return to “Battlezone 2 Mod Making”

Who is online

Users browsing this forum: No registered users and 2 guests