Jump to content


Photo

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


31 replies to this topic

#1 Constantine

Constantine
  • Members
  • 134 posts
  • Gender:Male

Posted 25 June 2017 - 03:06 AM

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.



#2 lynx

lynx
  • Modders
  • 2990 posts
  • Gender:Male
  • Location:Ljubljana, Slovenija

Posted 25 June 2017 - 05:42 AM

There's an old polygon/door tutorial somewhere for DLTCEP. Patching the mos is possible, but the code won't look pretty (binary file).


GemRB - IE anywhere.
Mages needed! Looking for Planescape: Torment testers
Market android version IS NOT SUPPORTED ANYMORE: reported bugs will be ignored! Still looking for builders ...

#3 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6204 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 25 June 2017 - 06:41 AM

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.


Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#4 Constantine

Constantine
  • Members
  • 134 posts
  • Gender:Male

Posted 25 June 2017 - 08:01 AM

 

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



#5 lynx

lynx
  • Modders
  • 2990 posts
  • Gender:Male
  • Location:Ljubljana, Slovenija

Posted 25 June 2017 - 01:24 PM

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.


GemRB - IE anywhere.
Mages needed! Looking for Planescape: Torment testers
Market android version IS NOT SUPPORTED ANYMORE: reported bugs will be ignored! Still looking for builders ...

#6 Sam.

Sam.
  • Modders
  • 114 posts
  • Gender:Male
  • Location:USA

Posted 29 June 2017 - 08:58 AM

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.


"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

-- to Portalbendarwinden

--------------------

Posted Image
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#7 Sam.

Sam.
  • Modders
  • 114 posts
  • Gender:Male
  • Location:USA

Posted 29 June 2017 - 06:21 PM

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


"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

-- to Portalbendarwinden

--------------------

Posted Image
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#8 Roxanne

Roxanne
  • Modders
  • 1576 posts
  • Gender:Not Telling

Posted 29 June 2017 - 10:09 PM

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?


The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*


#9 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6204 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 30 June 2017 - 03:56 AM

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.
Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#10 Sam.

Sam.
  • Modders
  • 114 posts
  • Gender:Male
  • Location:USA

Posted 30 June 2017 - 06:38 AM

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.


"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

-- to Portalbendarwinden

--------------------

Posted Image
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#11 Constantine

Constantine
  • Members
  • 134 posts
  • Gender:Male

Posted 30 June 2017 - 09:45 AM

 

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.



#12 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6204 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 30 June 2017 - 11:09 AM

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, 30 June 2017 - 11:13 AM.

Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#13 Ardanis

Ardanis

    A very GAR character

  • Modders
  • 2551 posts
  • Gender:Male
  • Location:Saint-Petersburg, Russia

Posted 30 June 2017 - 11:38 AM

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, 30 June 2017 - 11:44 AM.

"Uguu~ Boku Ayu."

Before you start breaking wall tiles with your bare fists, ask yourself first - do you truly need it?

#14 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6204 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 30 June 2017 - 02:45 PM

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:
Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#15 Constantine

Constantine
  • Members
  • 134 posts
  • Gender:Male

Posted 30 June 2017 - 10:19 PM

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





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users