Author Topic: Tilemagic to change indv. tiles?  (Read 313 times)

Legacy_Claiming Light

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
Tilemagic to change indv. tiles?
« on: October 10, 2015, 09:17:53 pm »


               

The main question:


Can I use tilemagic somehow to identify and change a specific tile within an area? Further, can I do this with a simple, reusable script (like, would it work between tilesets)?


 


The application:


I'm working on a procedural dungeon generator that expands as agents enter new doorways.


 


Each new room saves its coordinates to a waypoint variable. Further, each player has a coordinate variable and each doorway has a test script to say


 


-What is player coordinate?


-What X,Y Change would entering this door result in?


-Does that room exist already? If Yes, transition to there, if no, grab new room.


 


Which works great. The problem is, I'd like to get a lot of work from a relatively small number of Areas. If I could, for instance, have a single Sewer Area with 4 doors leading from it (N,S,E,W) and have a randomizer remove some of those doorways when choosing the room, I could pull far more mileage off of it. The unfortunate alternative is 8 iterations of the same Area with various door combinations.


 


I wouldn't want to imposition someone too much, but if you happen to know of a inc script or even a website where this concept is mentioned, it'd help a lot!



               
               

               
            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
Tilemagic to change indv. tiles?
« Reply #1 on: October 10, 2015, 10:03:54 pm »


               

Have you tried experimenting with Sunjammer's TileMagic System?


 


<edit>


The above was in response to the question implied in the title of this thread. I'll let more knowledgeable folk answer the query in the body of your post.


 


TR



               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
Tilemagic to change indv. tiles?
« Reply #2 on: October 10, 2015, 11:18:31 pm »


               Unfortunately, tile magic doesn't change the tiles themselves. It only places a visual effect on selected tiles.


There's no way to change tiles in game.


Scripts can remove a door, of course, but not the doorway.


One solution would be to make a placeable with walkmesh that plugs the doorway, to make it look like a blank wall. The script could be completely general, with the "plug" resref as a local variable on the area.


An easier, but less elegant, solution would be to keep the doorways, but replace the doors with placeable slabs or debris.
               
               

               
            

Legacy_Claiming Light

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
Tilemagic to change indv. tiles?
« Reply #3 on: October 11, 2015, 01:05:45 am »


               

Another idea I'm playing with is removing the door frames entirely and spawning 'Secret Door' placeables where/when needed. 


 


Though now that you mention it Proleric, perhaps I could remove the doors from the frames as a function of entering the room for the first time, then spawn some kind of indestructible object in front of the frame. Lot of wp work there, but it wouldn't look as bad as those secret doors do.


 


 


Thanks!


 


And I'd still love further creatives ideas!



               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
Tilemagic to change indv. tiles?
« Reply #4 on: October 11, 2015, 10:22:47 am »


               

In addition to the official secret doors, there are fan-made placeable doors (available in CEP and elsewhere), which arguably look better.


 


There are scripts to make them work, or you might prefer the approach used in other games such as Dragon Age, whereby transition doors never open, but transfer the player on click.


 


On another tack entirely, the toolset can place doors in a blank wall, if you don't mind that there's no doorframe. The trick is to have a doorway tile elsewhere in the area, paint a door in it, then right-click on that door in the area contents palette on the left to AdjustLocation to a spot in the blank wall. One doorway can be used to generate multiple doors, then the doorway tile can be deleted if you like.


 


You could build an area with four doors like that in the toolset. In game, you could apply the cutscene invisibility effect to the doors you don't want the player to see or use.



               
               

               
            

Legacy_Claiming Light

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
Tilemagic to change indv. tiles?
« Reply #5 on: October 12, 2015, 10:16:50 pm »


               

The workaround for door placement is a neat trick-- though I'm probably going to stick with the CEP door route.