Author Topic: Placeables with tileset walkmeshes (WOK)  (Read 1388 times)

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Placeables with tileset walkmeshes (WOK)
« Reply #15 on: December 13, 2013, 05:32:28 pm »


               

Frith5 wrote...

But this would still work for swimming/flying over walkable terrain. Imagine having an underwater area, and to swim up and exit it you'd have a chat command <swim up> that would spawn the invisible path up to the 'surface'. At the surface you'd have a trigger to jump the pc to the 'top' of the water (another area). Likewise an area where the 'flyer' wants to swoop up from the streets to the top of a tower battlement (both walkable areas). Could this work?


Yes, all of that could work in a single player module. In multiplayer however it would be challenging at best to pull off. Not sure how to do it gracefully.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Placeables with tileset walkmeshes (WOK)
« Reply #16 on: December 13, 2013, 05:39:33 pm »


               

TheOneBlackRider wrote...

Well, regarding the swoop up to battlements, I'd say, that depends on the tilesets you are using. I made a test with the ramp using the rual set with raised terrain. Both tries - from bottom to top or over the top don't work, because the edge of the raised terrain does have a (slim) unwalkable part, which stops the toon. The same is for the city raised terrain. With these sets, you don't get up.
You probably would have to add a special tile variation - completely walkable, block it (with a placeable), when there is no ramp and remove the blocks, when the ramp is spawned.
With having such a special tile, I'd say, something like the earlier mentioned "appearing bridge over a gap" would work, too.


Yes. The way to do this would be to have the tile itself be walkable. Then use tilemagic placeables to create the variable situations.

Example city wall tiles:
  • change the WOK so that city wall tiles are all walkable.
  • Initialize the city areas with placeable tile magic "Wall State A" at those walls. Wall State A placeables include PWKs that disallow crossing the wall.
  • when you need a special aerial ramp, you destroy State A and spawn in "Wall State B". This has an invisible ramp, and no blocking PWK.
  • when the player is done flying up over the wall, destroy State B, respawn State A.
Obviously there are many problems with this. Most of the problems relate to the unpredicatbility of players. With that in mind the safest way to use these special effects would be with a cutscene.

----
About the script method of spawning, you use CreateObject. That function is supplied with a location. The location would be in the middle of a tile. Your X's and Y's need to end in 5.0. So x 45.0 and y 55.0 is dead center of a tile.

Alternatively you can look at spelljammer's tilemagic scripts which handle this for you. You'll need to adjust his functions to spawn placeables instead of VFX, but thats not hard. I've made the changes for myself. If he's cool with others sharing altered versions of his work, I'll be happy to paste my changes for other's use. But I'm not clear on his feelings about that, and I don't feel like completely rewritting a tilemagic system just so I have the rights to post it.
               
               

               


                     Modifié par henesua, 13 décembre 2013 - 05:46 .
                     
                  


            

Legacy_Zwerkules

  • Hero Member
  • *****
  • Posts: 1997
  • Karma: +0/-0
Placeables with tileset walkmeshes (WOK)
« Reply #17 on: December 13, 2013, 05:43:59 pm »


               

TheOneBlackRider wrote...

You probably would have to add a special tile variation - completely walkable, block it (with a placeable), when there is no ramp and remove the blocks, when the ramp is spawned.
With having such a special tile, I'd say, something like the earlier mentioned "appearing bridge over a gap" would work, too.


Doing things like this with tilesets is the better way. If you want walkable parts in the water for ship placeables,
make a tile for it. Using placeables with tile sized walkmeshes only works on specific tiles or for specific
placeables anyway, so why not add a tile for them which already has a walkmesh that fits exactly and you
block off the parts that are only walkable when there's a ship/bridge/whatever with placeables?
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Placeables with tileset walkmeshes (WOK)
« Reply #18 on: December 13, 2013, 06:18:07 pm »


               

Zwerkules wrote...

TheOneBlackRider wrote...

You probably would have to add a special tile variation - completely walkable, block it (with a placeable), when there is no ramp and remove the blocks, when the ramp is spawned.
With having such a special tile, I'd say, something like the earlier mentioned "appearing bridge over a gap" would work, too.


Doing things like this with tilesets is the better way. If you want walkable parts in the water for ship placeables,
make a tile for it. Using placeables with tile sized walkmeshes only works on specific tiles or for specific
placeables anyway, so why not add a tile for them which already has a walkmesh that fits exactly and you
block off the parts that are only walkable when there's a ship/bridge/whatever with placeables?


Perhaps I am misundersanding TheOneBlackRider or you, but that sounds like more or less what i suggest, Zwerkules.
  • Create walkable water tiles for the tileset.
  • Add the ships as "tile" placeables with aabb meshes.
  • when the ships are gone remove the ship placeables.

               
               

               
            

Legacy_Zwerkules

  • Hero Member
  • *****
  • Posts: 1997
  • Karma: +0/-0
Placeables with tileset walkmeshes (WOK)
« Reply #19 on: December 13, 2013, 07:11:10 pm »


               

henesua wrote...
Perhaps I am misundersanding TheOneBlackRider or you, but that sounds like more or less what i suggest, Zwerkules.


Your answer wasn't there when I wrote mine, so yes, what I wrote is more or
less the same and I probably wrote it at more or less the same time, which is
wierd because your reply to Frith wasn't there either when I wrote my reply to
TheOneBlackRider even though you wrote both earlier.
So far I had seen that sometimes (rarely) my own posts only appeared after ten minutes or more.
Seems like I also sometimes get to see the replies of others minutes after they wrote them.
               
               

               


                     Modifié par Zwerkules, 13 décembre 2013 - 07:18 .
                     
                  


            

Legacy_TheOneBlackRider

  • Hero Member
  • *****
  • Posts: 512
  • Karma: +0/-0
Placeables with tileset walkmeshes (WOK)
« Reply #20 on: December 14, 2013, 05:16:51 pm »


               Thanks for all your insights and thoughts!
And thanks henesua for the script directions. That's all I need to know.

Regarding "flight ramps": I stumbled upon another problem. Those ramps would have to be invisible. So I tried to use the trick with the invisible NWN block, which shows a texture when set to "activated" in the toolset (for easier placement) and when deactivated, the texture is turned off, but the PWK still stops movement. For this, the placable must be set to "usable" or at least to NOT "static".
Well, this seems not to to be working with WOK-placeables: It seems, that they need to be set to "static", so the WOK is used. As soon as "static" is unchecked, the WOK is ignored.
I do have an invisible "swoop" ramp, but it's hard to place (since the facing is not shown) and probably also hard to set it with the correct facing via a spawn script.

Does anybody have an idea how to add/show a "hinting" of the facing, so that placing is more easy?
               
               

               


                     Modifié par TheOneBlackRider, 14 décembre 2013 - 05:17 .
                     
                  


            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Placeables with tileset walkmeshes (WOK)
« Reply #21 on: December 14, 2013, 05:38:26 pm »


               <lighting up his pipe...>

Texture the object with a completely transparent texture named "noshow.tga"
While building drop a graph-paper texture (edit: with a bright red arrow on it ;-) named "noshow.tga" in the override ;-)
Smoke and mirrors, me lad =)

<...and preening in the mirror>
               
               

               


                     Modifié par Rolo Kipp, 14 décembre 2013 - 05:40 .
                     
                  


            

Legacy_Frith5

  • Hero Member
  • *****
  • Posts: 595
  • Karma: +0/-0
Placeables with tileset walkmeshes (WOK)
« Reply #22 on: December 15, 2013, 01:46:22 am »


               Since they're placeables, could you have two versions, one with a visible facing texture, the other 'invisible'? Place the visible, and at run time switch them out (copy the positioning from the placed one before destroying it, and apply it to the invisible one). Or, you could set the facing to the facing of the person 'flying' when spawning. Do an If check to make sure they can 'fly' in that direction. If so, get their facing and calculate where to place the invisible ramp. Maybe. heh
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Placeables with tileset walkmeshes (WOK)
« Reply #23 on: December 15, 2013, 02:36:15 am »


               Frith and Rolo, the best way to handle a building condition versus a release version is to take the principle of Rolo's idea, but implement it with HAKs. A couple tilesets do this - Rosenkranz's Immersive Swamps, and Maxams Versatile Dungeon is another.

The method is to have two textures with the same name. The invisible one is in one of your module's main HAKs. The one that renders for the builder is in a special builder's only HAK at the top of the list.

While building your module. The builder's HAK is on top of the custom content list. Then before release you detach the builder's HAK, and save. (if you had blueprints inb your builder's HAK, you need to rebuild the module prior to saving).
               
               

               
            

Legacy_Frith5

  • Hero Member
  • *****
  • Posts: 595
  • Karma: +0/-0
Placeables with tileset walkmeshes (WOK)
« Reply #24 on: December 15, 2013, 04:34:44 am »


               Yeah, I've seen that done. Nice! Actually, though, if these are going to be spawned 'at will' you won't really place them in the Toolset anyway, right? I mean, isn't the point to modify the walkable area at run time? So, you need a way to specify coordinates and facing for spawning in the placeable. Or am I thinking of it wrong for what you're proposing?
               
               

               
            

Legacy_TheOneBlackRider

  • Hero Member
  • *****
  • Posts: 512
  • Karma: +0/-0
Placeables with tileset walkmeshes (WOK)
« Reply #25 on: December 15, 2013, 01:07:32 pm »


               ':wizard:' Transparent texture + buildes texture! How simple! Thanks!

Frith5: "Or am I thinking of it wrong for what you're proposing?"
I didn't plan to make use of them right away. It's just because I got started on this and now want a kind of workable result (for a maybe future use).
And I asked to have a possibility for both: Prebuild and spawning IG.
I'm thinking to add a tiny littly visible dot on one side of the base, which helps with the right orientation, when using it as IG spawn. Have not added it yet.
Will release it, when finished.
               
               

               


                     Modifié par TheOneBlackRider, 15 décembre 2013 - 01:10 .
                     
                  


            

Legacy_KlatchainCoffee

  • Sr. Member
  • ****
  • Posts: 372
  • Karma: +0/-0
Placeables with tileset walkmeshes (WOK)
« Reply #26 on: December 15, 2013, 02:03:39 pm »


               This is all sounding very interesting.

The two immediate uses that occur to me are -  walkable beds and wooden watch towers - speaking as a builder, it might be useful to have greater flexibility with these than a fixed tile feature may provide.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Placeables with tileset walkmeshes (WOK)
« Reply #27 on: December 15, 2013, 03:07:30 pm »


               

Frith5 wrote...

Yeah, I've seen that done. Nice! Actually, though, if these are going to be spawned 'at will' you won't really place them in the Toolset anyway, right? I mean, isn't the point to modify the walkable area at run time? So, you need a way to specify coordinates and facing for spawning in the placeable. Or am I thinking of it wrong for what you're proposing?


You don't get much leeway (almost none actually) on the position of placeable tiles, but nevertheless its always good to be able to test something in the toolset before you turn it into a waypoint.
               
               

               
            

Legacy_TheOneBlackRider

  • Hero Member
  • *****
  • Posts: 512
  • Karma: +0/-0
Placeables with tileset walkmeshes (WOK)
« Reply #28 on: December 24, 2013, 12:34:05 pm »


               Just another examination: If the WOK material is set to grass, grass is rendered no matter what the tile WOK has as material. It looked quiet intresting on the invisible ramps... '<img'>

Another finding: To block movement on a WOK-placeable, the blocking placeable (eg. an invisible wall) has to be placed on ground level of the tile - not in the raise position.

And: I finished an invisible ramp and block. Will upload them after Xmas (working on the sum up of these posts to go with it).
               
               

               


                     Modifié par TheOneBlackRider, 24 décembre 2013 - 12:35 .
                     
                  


            

Legacy_CaveGnome

  • Sr. Member
  • ****
  • Posts: 432
  • Karma: +0/-0
Placeables with tileset walkmeshes (WOK)
« Reply #29 on: December 24, 2013, 07:06:43 pm »


               @TheOneBlackRider:

Great news! Will try to use your invisible ramp to launch some SpellJammer ships to spaaace :-)