Jump to content

Add a new door to the area (with tiles!)


Recommended Posts

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.

Link to comment

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.

Link to comment

 

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 :)

Link to comment

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.

Link to comment

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.

Link to comment

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 :( .

Link to comment

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?

Link to comment

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.

Link to comment

 

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.

Link to comment

 

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 by Jarno Mikkola
Link to comment

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 by Ardanis
Link to comment

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. :devil:

Link to comment

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).

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...