is it possible for .dll to raise water levels on the fly?

Moderators: GSH, VSMIT, Red Devil, Commando

Post Reply
User avatar
TheJamsh
Bull Dog
Posts: 689
Joined: Sat Feb 19, 2011 5:49 pm

is it possible for .dll to raise water levels on the fly?

Post by TheJamsh »

As per topic title, is it possible to have a .dll that modified the height of a water layer?

My plan is for a volcanic map, which will raise the level of 'lava' in stages as a game progresses, cutting off certain areas of the map. Is such a thing possible?
User avatar
Semaphore
Rattler
Posts: 51
Joined: Sun Feb 20, 2011 10:10 am

Re: is it possible for .dll to raise water levels on the fly

Post by Semaphore »

The only rising anything I've ever seen is the path to the secret Scion base in the singleplayer campaign, just before you side with the Scions. But that's probably an object of some sort. Might be worth checking out if modifying the water thing doesn't work out for you. You can probably still make it kill you somehow..
User avatar
Ded10c
Recycler
Posts: 3815
Joined: Sun Feb 20, 2011 11:05 am
Location: Stoke-on-Trent
Contact:

Re: is it possible for .dll to raise water levels on the fly

Post by Ded10c »

I'm actually not sure. I do think it's possible to change the damage caused by water, though.
User avatar
TheJamsh
Bull Dog
Posts: 689
Joined: Sat Feb 19, 2011 5:49 pm

Re: is it possible for .dll to raise water levels on the fly

Post by TheJamsh »

@ Semaphore - The idea was to use the water damage settings to enable the water to deal the damage to anyone caught in/under it. The map would have high and low areas but underneath all the terrain would be a full layer of water.

I'm pretty sure, that if the console is able to raise water levels (I don't see why it should be able to), then it should be possible. Not sure how MP will handle it, but may as well do a quick test.

Hell even the BZ2 Scriptor could write console commands.
User avatar
GSH
Patch Creator
Posts: 2486
Joined: Fri Feb 18, 2011 4:55 pm
Location: USA
Contact:

Re: is it possible for .dll to raise water levels on the fly

Post by GSH »

DLLs can execute console commands just fine in 1.3. Look for this callback in ScriptUtils.h, which includes a sample bit of code:
// Feeds a command to the command console, as if it'd been typed by the user.
//
// DLL authors - just sprintf_s your own strings to pass in, e.g. :
//
// char ExecCmd[256];
// sprintf_s(ExecCmd,sizeof(ExecCmd),"sky.fogColor %d %d %d", ColorR, ColorG, ColorB);
// IFace_ConsoleCmd(ExecCmd);
//
// [Style comment: sprintf is *DANGEROUS*, and can trash memory if not
// careful. sprintf_s is *SAFE*. (I previously recommended _snprintf,
// but that takes more lines of code to use correctly. MS has finally
// made security fairly easy out of the box with the _s versions of things
// like sprintf_s, strcat_s, strcpy_s, etc)]
//
//
// If bSquelchOutput is true, then nothing will be printed to the console
// as the result of the command. This is the default
DLLEXPORT void DLLAPI IFace_ConsoleCmd(const char* pStr, bool bSquelchOutput = true);
-- GSH
User avatar
TheJamsh
Bull Dog
Posts: 689
Joined: Sat Feb 19, 2011 5:49 pm

Re: is it possible for .dll to raise water levels on the fly

Post by TheJamsh »

Hopefully then water height can be controlled via console... I assume it can, most things are.
User avatar
Semaphore
Rattler
Posts: 51
Joined: Sun Feb 20, 2011 10:10 am

Re: is it possible for .dll to raise water levels on the fly

Post by Semaphore »

How will you let the AI driving skills handle this changing map layout? Path nodes that move as well?
User avatar
GSH
Patch Creator
Posts: 2486
Joined: Fri Feb 18, 2011 4:55 pm
Location: USA
Contact:

Re: is it possible for .dll to raise water levels on the fly

Post by GSH »

BZ1/2 do not use path node based pathing, or navmeshes or anything "new." Instead it tries to dynamically divvy up the terrain into strips and do an A* on them. After significantly modifying pathing, should call calc cliffs or similar to cause the strips to be re-examined.

-- GSH
User avatar
TheJamsh
Bull Dog
Posts: 689
Joined: Sat Feb 19, 2011 5:49 pm

Re: is it possible for .dll to raise water levels on the fly

Post by TheJamsh »

The map wouldn't be for base building systems either, its mainly for infantry-based MP matches, maybe vehicles, but vehicles could escape rising tide/lava a bit too quickly if you ask me.
User avatar
Ded10c
Recycler
Posts: 3815
Joined: Sun Feb 20, 2011 11:05 am
Location: Stoke-on-Trent
Contact:

Re: is it possible for .dll to raise water levels on the fly

Post by Ded10c »

Would also be a nice little trick for singleplayer. In fact, I'd love a tech demo of this. Would suit one of my missions perfectly.
User avatar
S.cavA.rmyG.en
Sabre
Posts: 296
Joined: Fri Mar 04, 2011 3:15 am
Location: ISDF Junk Yard
Contact:

Re: is it possible for .dll to raise water levels on the fly

Post by S.cavA.rmyG.en »

AHadley wrote:Would also be a nice little trick for singleplayer. In fact, I'd love a tech demo of this. Would suit one of my missions perfectly.
I think it would be fun to have a DM map where you race the lava and battel for high ground.
I am sort of reminded of the toxic tower level in Donkey Kong 2[NES] but if some one desides to make a 3D version count me out becous that was the hardest level in the game.for those of you who have not played it is a race agest the refresh rate to the top of a tower thats filling with acid. :twisted:
Post Reply