Constantine Posted June 25, 2017 Share Posted June 25, 2017 Hi averyone, I wonder if someone got an idea of how to add a new door to the area - complete with new open/closed tiles from bmp or bam files? I know I've asked this question some years ago, but frankly, no one had a working solution back then. I think this matter is important because now if you want to add a door to the game, you should provide the whole new tis file with your mod, and this is obviously a very bad way to go. Quote Link to comment
lynx Posted June 25, 2017 Share Posted June 25, 2017 There's an old polygon/door tutorial somewhere for DLTCEP. Patching the mos is possible, but the code won't look pretty (binary file). Quote Link to comment
Jarno Mikkola Posted June 25, 2017 Share Posted June 25, 2017 There's an old polygon/door tutorial somewhere for DLTCEP. Patching the mos is possible, but the code won't look pretty (binary file). Well, the tutorial is here ... there's ugly weidu code in various mods that add areas one could go and take a look at. And you do really nothing with a door... as it's just a graphical binary element on the map. You need an entrance(&exit) point that transfers you from one map to another. The DLTCEP tutorial is there for that as well. Quote Link to comment
Constantine Posted June 25, 2017 Author Share Posted June 25, 2017 There's an old polygon/door tutorial somewhere for DLTCEP. Patching the mos is possible, but the code won't look pretty (binary file). Well, the tutorial is here ... there's ugly weidu code in various mods that add areas one could go and take a look at. And you do really nothing with a door... as it's just a graphical binary element on the map. You need an entrance(&exit) point that transfers you from one map to another. The DLTCEP tutorial is there for that as well. I'm aware of this old tutorials, but they can't patch in the door bitmaps. All other stuff like polygons, entry points etc. are pretty easy to add via weidu. You can modify vertexes, regions and other relevant stuff, but you can't patch in a stupid door to the area, because there can be no door without a bitmap Quote Link to comment
lynx Posted June 25, 2017 Share Posted June 25, 2017 Sure you can, it's just lots of pixels and tedium, like I mentioned. The other stuff is point or polygon based, so much less data. Calculate the region you have to change and then alter each byte one by one to the target ones. Maybe someone already wrote a function or generator for that, but I'm not someone who would know. Quote Link to comment
Sam. Posted June 29, 2017 Share Posted June 29, 2017 There's an old polygon/door tutorial somewhere for DLTCEP. Patching the mos is possible, but the code won't look pretty (binary file). Well, the tutorial is here ... there's ugly weidu code in various mods that add areas one could go and take a look at. And you do really nothing with a door... as it's just a graphical binary element on the map. You need an entrance(&exit) point that transfers you from one map to another. The DLTCEP tutorial is there for that as well. I'm aware of this old tutorials, but they can't patch in the door bitmaps. All other stuff like polygons, entry points etc. are pretty easy to add via weidu. You can modify vertexes, regions and other relevant stuff, but you can't patch in a stupid door to the area, because there can be no door without a bitmap Sure you can, it's just lots of pixels and tedium, like I mentioned. The other stuff is point or polygon based, so much less data. Calculate the region you have to change and then alter each byte one by one to the target ones. Maybe someone already wrote a function or generator for that, but I'm not someone who would know. If you already have a BMP of the tile you want to patch into the TIS, the code to do so is not that difficult. In fact much of the needed code has already been written, one would just need to write a wrapper function/macro around it. If this actually hasn't been done before (which surprises me), I'd probably be willing to take a crack at it. Quote Link to comment
Sam. Posted June 30, 2017 Share Posted June 30, 2017 Well I just blundered into why no one has bothered to do this before: WeiDU's filesize limitations with COPY. This makes the whole concept useless for any decent size area, such as the ones you'd usually bother adding open/closed door tiles to. WeiDU really does suck... I'm basically half way through anyway so I may continue creating the necessary functions as an academic exercise, but they probably won't be that useful in the long run . Quote Link to comment
Roxanne Posted June 30, 2017 Share Posted June 30, 2017 Well I just blundered into why no one has bothered to do this before: WeiDU's filesize limitations with COPY. This makes the whole concept useless for any decent size area, such as the ones you'd usually bother adding open/closed door tiles to. WeiDU really does suck... I'm basically half way through anyway so I may continue creating the necessary functions as an academic exercise, but they probably won't be that useful in the long run . Did you try COPY_LARGE? Quote Link to comment
Jarno Mikkola Posted June 30, 2017 Share Posted June 30, 2017 Did you try COPY_LARGE?Probably not because he needs to edit the file. You know, the only restriction the said command has is that you can't do that. Quote Link to comment
Sam. Posted June 30, 2017 Share Posted June 30, 2017 Well I just blundered into why no one has bothered to do this before: WeiDU's filesize limitations with COPY. This makes the whole concept useless for any decent size area, such as the ones you'd usually bother adding open/closed door tiles to. WeiDU really does suck... I'm basically half way through anyway so I may continue creating the necessary functions as an academic exercise, but they probably won't be that useful in the long run .Did you try COPY_LARGE? Did you try COPY_LARGE?Probably not because he needs to edit the file. You know, the only restriction the said command has is that you can't do that. From the documentation: Behaves like COPY except that the fromFiles can be of arbitrary size (the limit should be over a Gigabyte), but on the other side of the coin you can’t apply patches to the copying. Quote Link to comment
Constantine Posted June 30, 2017 Author Share Posted June 30, 2017 There's an old polygon/door tutorial somewhere for DLTCEP. Patching the mos is possible, but the code won't look pretty (binary file). Well, the tutorial is here ... there's ugly weidu code in various mods that add areas one could go and take a look at. And you do really nothing with a door... as it's just a graphical binary element on the map. You need an entrance(&exit) point that transfers you from one map to another. The DLTCEP tutorial is there for that as well. I'm aware of this old tutorials, but they can't patch in the door bitmaps. All other stuff like polygons, entry points etc. are pretty easy to add via weidu. You can modify vertexes, regions and other relevant stuff, but you can't patch in a stupid door to the area, because there can be no door without a bitmap Sure you can, it's just lots of pixels and tedium, like I mentioned. The other stuff is point or polygon based, so much less data. Calculate the region you have to change and then alter each byte one by one to the target ones. Maybe someone already wrote a function or generator for that, but I'm not someone who would know. If you already have a BMP of the tile you want to patch into the TIS, the code to do so is not that difficult. In fact much of the needed code has already been written, one would just need to write a wrapper function/macro around it. If this actually hasn't been done before (which surprises me), I'd probably be willing to take a crack at it. Well I just blundered into why no one has bothered to do this before: WeiDU's filesize limitations with COPY. This makes the whole concept useless for any decent size area, such as the ones you'd usually bother adding open/closed door tiles to. WeiDU really does suck... I'm basically half way through anyway so I may continue creating the necessary functions as an academic exercise, but they probably won't be that useful in the long run . Bad luck Anyways, I much uppreciate your effort! Better to have the code if this weidu function will ever be fixed. Quote Link to comment
Jarno Mikkola Posted June 30, 2017 Share Posted June 30, 2017 (edited) Well I just blundered into why no one has bothered to do this before: WeiDU's filesize limitations with COPY. This makes the whole concept useless for any decent size area, such as the ones you'd usually bother adding open/closed door tiles to. WeiDU really does suck... I'm basically half way through anyway so I may continue creating the necessary functions as an academic exercise, but they probably won't be that useful in the long run .Bad luck Anyways, I much uppreciate your effort! Better to have the code if this weidu function will ever be fixed. Erhm, the fix for that is to change the coding language of weidu... and that's a hard thing to do. Aka making the whole thing from scratch. As the property comes from OCaml's inability to do this sort of thing ... and the function is there to copy large files, as in, itself is a fix, it never has had a property of editing the files. Edited June 30, 2017 by Jarno Mikkola Quote Link to comment
Ardanis Posted June 30, 2017 Share Posted June 30, 2017 (edited) If you need it for a mod, just ship the updated tileset. I don't even think there was at least one that added new tiles to existing area? That, and since doors themselves are among the most complex structures for random people to bother, you aren't gonna run into compatibility issues. PS You can also kind of fake the door with a bam overlay, without touching the tileset itself, but it doesn't work too well for day/night areas (namely during dawn/dusk transitions) and would need scripting activate/deactivate, so you can't really use it as a "normal" door that player can interact with. Edited June 30, 2017 by Ardanis Quote Link to comment
Jarno Mikkola Posted June 30, 2017 Share Posted June 30, 2017 I don't even think there was at least one that added new tiles to existing area?Erhm ? There's also this neat trick you could use... and you don't need a door for it. Hide the "door" behind a wall... and as most players won't see it there, you can put an NPC to lure the PC there, have the NPC enter the area via 277 EscapeAreaObjectMove(S:ResRef*,O:Object*,I:X*,I:Y*,I:Face*) to show where the door is, nad start the fight right away & try to kill them. Quote Link to comment
Constantine Posted July 1, 2017 Author Share Posted July 1, 2017 If you need it for a mod, just ship the updated tileset. I don't even think there was at least one that added new tiles to existing area? That, and since doors themselves are among the most complex structures for random people to bother, you aren't gonna run into compatibility issues. PS You can also kind of fake the door with a bam overlay, without touching the tileset itself, but it doesn't work too well for day/night areas (namely during dawn/dusk transitions) and would need scripting activate/deactivate, so you can't really use it as a "normal" door that player can interact with. Yeah, turned out it's the only way. Could you please elaborate a little bit, how I can fake a door via a bam? (I don't need a real door really, I just thinking about using "doors" to add interactive content, like the bridge under temple district). Quote Link to comment
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.