Aller au contenu

Photo

No Fade 4x4 Ice placeable (Need!)


  • Veuillez vous connecter pour répondre
21 réponses à ce sujet

#1
GIANTSWORD

GIANTSWORD
  • Members
  • 88 messages

If anyone has any links or can point me in the direction of some non fading ice placeables I would be GREATLY appreciative.

 

I'm doing a mountainous lake that freezes at night and all the 4x4 ice placeables that came with CEP 2.4 Fade when you walk away from them and you lose the effect.

 

(Floor: Ice 1 4x4*) or (Floor: Ice 3 4x4*) look the best if anyone has any of them converted to non-fading.  No idea how you would go about doing that.

 

Anyway, thanks for reading guys and here's to hoping my lake will someday freeze :}



#2
Rolo Kipp

Rolo Kipp
  • Members
  • 2 791 messages

<breaking...>

 

Sorry to say, you've just run into a limitation of the engine. *Placeables* fade out when the player gets 4 tiles away from the origin. The rendering pipeline culls them out.

 

To get a feature to be visible farther away, it has to be a tile, or perhaps tilemagic?

Henesua, did you ever do tests with fading when you were experimenting with tilemagic?

 

<...the ice>



#3
henesua

henesua
  • Members
  • 3 863 messages

Placeables with the tile classification seem to have the same limitation. Yes, it is annoying. Not sure if the only way around this is to go "static".

 

But in general this is just one of those things that you need to keep in mind with NWN. Its better to make or expand a tileset than it is to try to build the whole thing with placeables in NWN1.


  • Rolo Kipp aime ceci

#4
GIANTSWORD

GIANTSWORD
  • Members
  • 88 messages

There are Water 4x4 placeables and an Oil 4x4 floor placeable that do not fade no matter how far I get.  So somehow, someone has gotten around the fade mechanic.  Now if only I knew how to change the textures of those non-fading 4x4 floors to ice... >.>



#5
Sheldomar

Sheldomar
  • Members
  • 20 messages

Perhaps a tile with a day/night animation that switches out an ice plane for a water plane. Shouldn't be hard for a tile-maker to put together. Say you have a 3x3 body of water. You could just animate the center water tile with a 3x3 ice plane that raises up slightly above the water plane at night. You'd only need 1 new tile... 



#6
Rolo Kipp

Rolo Kipp
  • Members
  • 2 791 messages

<interested...>

 

@Giantsword: Can you point me at them? I'd love to figure that out, as I was very disappointed how limited my Starry Skyball was...

 

@Sheldomar: That would be best as an animloop, I think. But it's an interesting idea.

 

 

<...inspite of himself>



#7
GIANTSWORD

GIANTSWORD
  • Members
  • 88 messages

I have CEP 2.4a and the appearance "Floor: Oil 2 4x4*", "Floor: Water, Blue 4x4 (DAG)" as well as all the other colors of water alogn with the non-shiny versions do not fade.  I'm sure there are more I just haven't tested them all.  Just tested 4x4 Blood floor and it fades :( haha

 

Goodluck and keep me posted if you find anything else that looks good and doesn't fade!

 

 

EDIT: Floor: Steam 4x4 is a good one, it also doesn't fade.. it almost looks like ice.. will definitely be useful somewhere



#8
Wall3T

Wall3T
  • Members
  • 461 messages

try setting them to static, that will help.



#9
Rolo Kipp

Rolo Kipp
  • Members
  • 2 791 messages

<yells "timber"...>

 

Ok, looked at the dag_bluewater4x4.mdl. It's set static in the 2DA and has the animated planes linked to dag_bluewater4x4a node, just as expected.

 

Compared that to my skyball_sr.mdl... set static in 2da with animated bits linked to skyball_sra node...

 

Same construction, same 2da settings. Skyball fades, water does not. Grrrr....

 

<...because he's stumped>



#10
kalbaern

kalbaern
  • Members
  • 824 messages

The problem generally occurs (even when set to static) when the center of these tiles is out of LOS of the character or beyond perception range. I've had the same issues at times not with just the ice, but the 4x4 floors that are wood, water, cobblestone, etc... . Interior maps can have issues when walls or doors obstruct the LOS to a large placeables center.

 

Changing to 1x1s (sometimes I use a 2x2) generally fixes the issues though. You just end up with more placeables used is all.

 

It can sometimes appear random as when approached from one direction they display fine, but another are blank until closer.

 

Sometimes a tileset lacks an edge feature (or is missing one for a specific edge type) and I place the 4x4 flooring (water, leaves, cobble, etc... ) off that edge -out-of-bounds- to provide a similar effect to the edge features of many tiles.. in these cases, using the 4x4s seems to work well, although I'm generally still using the 1x1 or 2x2 options.

 

While on the subject of CEP flooring placeables, many don't align with floors properly, they often -float- above the floors around -knee high-. A quick rule of thumb is to lower their Z axis by -0.98 form the height of the tile flooring when placed.


  • Rolo Kipp aime ceci

#11
Carcerian

Carcerian
  • Members
  • 1 108 messages

you could also add the vfx iceskin texture to make a plc icy, like barkskin or stoneskin...

 

Tho tilemagic is probably the easiest way to do it without haks:

 

// s_tilemagic.nss


/*
for LocalInt TILE_MAGIC_AREA_GROUND use #'s


    For Ether = 0;
    GROUNDTILE_ICE = 426;
    GROUNDTILE_WATER = 401;
    GROUNDTILE_GRASS = 402;
    GROUNDTILE_LAVA_FOUNTAIN = 349; // ugly
    GROUNDTILE_LAVA = 350;
    GROUNDTILE_CAVEFLOOR = 406;
    GROUNDTILE_SEWER_WATER = 461;




for LocalFloat TILE_MAGIC_AREA_Z use +/- z axis values equal to placable locations
    below ground lake/ocean etc = -0.5
    flooded areas = 0.25
*/


#include "x2_inc_toollib"


void main()
{
    object aHere = GetArea(OBJECT_SELF);
    if (GetLocalInt(aHere,"TILE_MAGIC_AREA_LOADED")) return;
    int nGround = GetLocalInt(aHere, "TILE_MAGIC_AREA_GROUND");
    int nX = GetAreaSize(AREA_WIDTH,aHere);
    int nY = GetAreaSize(AREA_HEIGHT,aHere);
    float fZ = GetLocalFloat(aHere,"TILE_MAGIC_AREA_Z");
    TLChangeAreaGroundTiles(aHere,nGround,nX,nY,fZ);
    SetLocalInt(aHere,"TILE_MAGIC_AREA_LOADED",TRUE);
}

(for area onenter event)


  • Rolo Kipp et GIANTSWORD aiment ceci

#12
Proleric

Proleric
  • Members
  • 2 350 messages
The conventional wisdom is that dynamic placeables and VFX (including tile magic) will fade once the player is distant from the centre, but static placeables and tiles don't fade.

In summary, do any of the results quoted here challenge that? Or is it simply that some placeables are static by default?

If it was essential to cover an area with dynamic 4 x 4 placeables, I wonder whether moving the model origin to a corner would reduce the fading. It would then be possible to lay down four placeables with different rotations, so that their origins are all at the centre of the area.

#13
GIANTSWORD

GIANTSWORD
  • Members
  • 88 messages

SO i tried out Kal's suggestion of 1x1 ice tiles and it worked!  Apparently being able to see the center of the tile works in this instance even though it seems like I should be able to see the center of the 4x4 ice tile from that distance.  Now off to put down 64 waypoints down to spawn these 1x1's in.. It might be kind of cool to stagger them all by .1 to see them cascade across the lake or maybe have it start freezing in the center and work its way out.

 

I am definitely interested in giving the suggestion by Carcerian a try and it sounds really interesting.  Would I need anything else besides that script?  I am still learning so sorry if i'm missing the obvious here.

 

Thanks again for all the suggestions on the issue at hand!


  • Rolo Kipp aime ceci

#14
Proleric

Proleric
  • Members
  • 2 350 messages
I'll post this script again, as it's a lot quicker than painting waypoints! It does tile magic with either VFX or placeables. For the 1 x 1 ice tiles, specify the template in sPlaceable, and set nGroundTileConst to zero. fZOffset probably needs to be -0.98 for those tiles.

Spoiler

  • Rolo Kipp aime ceci

#15
GIANTSWORD

GIANTSWORD
  • Members
  • 88 messages

When i set nGroundTileCost to 0 it doesn't save correctly, am I doing it in the wrong spot?

 

void bhFillTiles(object oArea, int nGroundTileConst = 0, int nStartColumn, int nStartRow, int nColumns, int nRows,
                 float fZOffset = 6.51f, int nColumnOffsetMetres = 0, int nRowOffsetMetres = 0, string sPlaceable = "me_floor015")
 
completely new to anything related to tilemagic so bear with me.
 
I take it i just need to get this script to fire when I want it to freeze?
 
 
EDIT: if you're wondering why the ZOffset is so high, I put some placeables down where they should spawn and that's what reads so I guess the tileset just sits higher up than others.  It's the mountainous forest tileset by zwerkulese.


#16
Proleric

Proleric
  • Members
  • 2 350 messages
What I posted is a function, so to use it you need something like this:
 
void bhFillTiles(object oArea, int nGroundTileConst, int nStartColumn, int nStartRow, int nColumns, int nRows,
                 float fZOffset = -0.4f, int nColumnOffsetMetres = 0, int nRowOffsetMetres = 0, string sPlaceable = "");

void main()
{
  object oArea      = GetArea(GetFirstPC());  // or whatever

  bhFillTiles(oArea, 0, 10, 11, 6, 2, -0.98, 0, 5, "me_floor015");
}
adding the entire function at the end (or in a #include file).

#17
GIANTSWORD

GIANTSWORD
  • Members
  • 88 messages
void bhFillTiles(object oArea, int nGroundTileConst, int nStartColumn, int nStartRow, int nColumns, int nRows,
                 float fZOffset = 6.51f, int nColumnOffsetMetres = 0, int nRowOffsetMetres = 0, string sPlaceable = "me_floor015")
 
 
{
    object oTile;
    vector vPos;
    vPos.x = 5.0 + 10.0 * IntToFloat(nStartColumn - 1) + IntToFloat(nColumnOffsetMetres);
    vPos.z = fZOffset;
 
    location lLoc;
    float fFace = 0.0;
 
    // * fill x axis
    int i, j;
    for (i=0 ; i < nColumns; i++)
    {
        vPos.y = 5.0 + 10.0 * IntToFloat(nStartRow    - 1) + IntToFloat(nRowOffsetMetres);
        // fill y
        for (j=0; j < nRows; j++)
        {
            lLoc = Location(oArea, vPos, fFace);
            oTile = CreateObject(OBJECT_TYPE_PLACEABLE, "plc_invisobj", lLoc,FALSE, "x2_tmp_tile" + GetTag(oArea));
            SetPlotFlag(oTile,TRUE);
            if (sPlaceable != "me_floor015") CreateObject(OBJECT_TYPE_PLACEABLE, sPlaceable, lLoc);
 
            ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(nGroundTileConst), oTile);
            vPos.y = vPos.y + 10.0;
        }
        vPos.x = vPos.x + 10.0;
    }
 
}
 
void main()
{
  object oArea = GetArea(GetFirstPC());  // or whatever
 
  bhFillTiles(oArea, 0, 10, 13, 1, 1, 6.51, 0, 5, "me_floor015");

 

}
 
 
 
 
This compiles and I put it on enter of that area, not getting anything.  My area is 10 rows and 13 columns.  The ice will pretty much cover the whole area and what overlaps will be hidden by raised ground.
 
What am I doing wrong?


#18
Proleric

Proleric
  • Members
  • 2 350 messages
Try

bhFillTiles(oArea, 0, 1, 1, 10, 13, 6.51, 0, 0, "me_floor015");


#19
GIANTSWORD

GIANTSWORD
  • Members
  • 88 messages

ok so.. I got it to work! unfortunately the 1x1 tiles fade just like all the other tiles that were giving me problems..

 

So I went back into the toolset and painted them down by hand as far as I could see out on the lake and when I load up the game they are solid as a rock (plot, static)..

 

keep in mind the 1x1's i'm spawning in are the same exact placeable set to plot/static.  Here is the final script I got to work to spawn them in via Proleric's advice (thank you!)

 

void bhFillTiles(object oArea, int nGroundTileConst, int nStartColumn, int nStartRow, int nColumns, int nRows,
                 float fZOffset = 6.52f, int nColumnOffsetMetres = 0, int nRowOffsetMetres = 0, string sPlaceable = "me_floor015")
 
 
{
    object oTile;
    vector vPos;
    vPos.x = 5.0 + 10.0 * IntToFloat(nStartColumn - 1) + IntToFloat(nColumnOffsetMetres);
    vPos.z = fZOffset;
 
    location lLoc;
    float fFace = 0.0;
 
    // * fill x axis
    int i, j;
    for (i=0 ; i < nColumns; i++)
    {
        vPos.y = 5.0 + 10.0 * IntToFloat(nStartRow    - 1) + IntToFloat(nRowOffsetMetres);
        // fill y
        for (j=0; j < nRows; j++)
        {
            lLoc = Location(oArea, vPos, fFace);
            oTile = CreateObject(OBJECT_TYPE_PLACEABLE, "me_floor015", lLoc,FALSE, "x2_tmp_tile" + GetTag(oArea));
            SetPlotFlag(oTile,TRUE);
            if (sPlaceable != "me_floor015") CreateObject(OBJECT_TYPE_PLACEABLE, sPlaceable, lLoc);
 
            //ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(nGroundTileConst), oTile);
            vPos.y = vPos.y + 10.0;
        }
        vPos.x = vPos.x + 10.0;
    }
 
}
 
void main()
{
  object oArea = GetArea(GetFirstPC());  // or whatever
 
    bhFillTiles(oArea, 0, 1, 1, 10, 13, 6.51, 0, 0, "me_floor015");
}


#20
GIANTSWORD

GIANTSWORD
  • Members
  • 88 messages

*bump*

 

hoping anyone has a suggestion of how I can get the placeables spawned in via Prolerics method to stay put, no idea why they fade when spawned in via that script and do not fade when I place them down manually in the toolset and test in game.



#21
Proleric

Proleric
  • Members
  • 2 350 messages
Like I said, there's a well-known issue that vfx fade, and placeables fade unless they're static. Scripted placeables aren't static, by definition. So if the area needs to change dynamically, fog is your friend - or design the area so that lines of sight are fairly short.

If the appearance doesn't change over time, you could create an array of static placeables with a Moneo script, but you might find it easier to do it manually - Moneo is great, but there is a learning curve.

#22
GIANTSWORD

GIANTSWORD
  • Members
  • 88 messages

Good to know! thanks for the follow up.