The Grand Mapedit Assistance Compendium

Discussion and queries about building worlds in Blood.
Post Reply
User avatar
Daedalus
The Dreaming God
Posts: 307
Joined: Sun Dec 30, 2018 12:27 am
Location: The Hall of the Epiphany
Contact:

Re: The Grand Mapedit Assistance Compendium

Post by Daedalus » Tue Jan 23, 2024 9:46 am

When you mouseover a wall, you should be provided with some information that shows their length (in Mapedit it's towards the centre-bottom of the screen).

Doors made in this way will be a challenge when it comes to your ambitions to have Caleb run along the roof, as they are white walls and so will reach all the way to touch the ceiling. We will have to come up with another solution when the time comes.

As I've said a few times, you've set yourself quite a lofty goal that touches on challenging territory for your first map, so I hope you enjoy a challenge.
Kazashi wrote:Daedalus, I don't care how much you know about Blood, your attitude has to change.
Need a hint? Spill some on the Altar of Stone!

User avatar
RoosterMange
Still Kicking
Posts: 73
Joined: Sat Jan 20, 2024 9:37 am

Re: The Grand Mapedit Assistance Compendium

Post by RoosterMange » Wed Jan 24, 2024 6:53 am

I'm extremely proud of this window design I came up with. I used curtains on the inside so it looks completely natural, and on the outside I found a texture that fits the rest of the train well enough. And in the frame of the window I used a wood texture that matches the rest of it. All the sprites have the blocking flag so it should act as a wall now, and all I need to do is add breakable windows. As for the doors, I reckon I can do a similar method but it might be a little more difficult given the movement of the door. That said, I'm still very optimistic about this train and I've almost conquered the hardest part. I do love a challenge, even more so when the results come out so well. The rest of the cars will be much less complicated going forward.
Attachments
image_2024-01-23_224853440.png
image_2024-01-23_224853440.png (131.81 KiB) Viewed 759 times
"A punk rock song won't ever change the world, but I can tell you about a couple that changed me." -Pat The Bunny

User avatar
Daedalus
The Dreaming God
Posts: 307
Joined: Sun Dec 30, 2018 12:27 am
Location: The Hall of the Epiphany
Contact:

Re: The Grand Mapedit Assistance Compendium

Post by Daedalus » Wed Jan 24, 2024 7:32 am

Good stuff. Looking forward to seeing how it all starts coming together.
Kazashi wrote:Daedalus, I don't care how much you know about Blood, your attitude has to change.
Need a hint? Spill some on the Altar of Stone!

User avatar
RoosterMange
Still Kicking
Posts: 73
Joined: Sat Jan 20, 2024 9:37 am

Re: The Grand Mapedit Assistance Compendium

Post by RoosterMange » Thu Jan 25, 2024 1:50 am

I got the windows and doors looking perfect and I doubt anyone will be able to notice the sprites unless some visual glitch were to occur. The roof, on the other hand, is giving me some visual issues. Will it look like this in game or is it nothing to worry about? I'm also wondering how I could add breakable windows to really complete the car. Assuming I can get this roof finished, I'll be moving on to the next car finally.

All the best
Attachments
image_2024-01-24_175006695.png
image_2024-01-24_175006695.png (399.49 KiB) Viewed 736 times
"A punk rock song won't ever change the world, but I can tell you about a couple that changed me." -Pat The Bunny

User avatar
Daedalus
The Dreaming God
Posts: 307
Joined: Sun Dec 30, 2018 12:27 am
Location: The Hall of the Epiphany
Contact:

Re: The Grand Mapedit Assistance Compendium

Post by Daedalus » Thu Jan 25, 2024 8:08 am

I can't speak to how accurate XMapedit's representation of the game is and how that might match up, but you can generally trust the 3D view's sprite presentation to match up with the game. Sprites generally have a level of 'tolerance' for being placed above sectors without having those sectors (and other sprites) show through them, like we see here. As a general rule, the fewer sectors they cross over, the happier they are. A way to try mitigate this is to either move the sprites ever so slightly or work with smaller ones, though in greater number.

Under normal circumstances you would use what are called masked walls to make windows, but we are working in a specific case here whereby we don't have ceilings in place. To continue this illusion, we will need to use sprites instead.

Place a window sprite (conventionally texture 266, though you can of course use any texture you like), make it double-sided, blocking, hitscan sensitive and transparent. Then mouseover the sprite and change its properties with ALT + F6. This will bring up a dialogue box below which will be familiar to you by now. All you will need to do is set the type to 416 : Gib Object. This marks the sprite as being destructible. Move to the right and modify Data1 to have number 1. This is setting the type of "gibs" that will erupt from your object when it's destroyed. Number 1 is a standard glass shard, so it should be fine for this purpose. Then change Data4 to be 300. This is the sound that is produced when the object is destroyed. 300 is Blood's standard "glass shattering" sound. You will now have a glass panel that can break to use as you please.
Kazashi wrote:Daedalus, I don't care how much you know about Blood, your attitude has to change.
Need a hint? Spill some on the Altar of Stone!

User avatar
RoosterMange
Still Kicking
Posts: 73
Joined: Sat Jan 20, 2024 9:37 am

Re: The Grand Mapedit Assistance Compendium

Post by RoosterMange » Thu Jan 25, 2024 8:58 am

The windows look good and shatter well, so now all that's left is the roof. I've tried using smaller sprites and fiddling with the positioning but it keeps visually clipping and breaking the illusion. Is there anything else I can try to salvage this?

I noticed e6m1 has an interesting layout where you can go inside the building, but also on top of the roof. The roof itself is a red sector, not a sprite. I'm curious how they achieved this effect and if it could be applied to my train. Maybe you can shed some light on this mystery.
"A punk rock song won't ever change the world, but I can tell you about a couple that changed me." -Pat The Bunny

User avatar
Daedalus
The Dreaming God
Posts: 307
Joined: Sun Dec 30, 2018 12:27 am
Location: The Hall of the Epiphany
Contact:

Re: The Grand Mapedit Assistance Compendium

Post by Daedalus » Thu Jan 25, 2024 9:24 am

To make sure we're on the same page, it's very important to mark sprites as 1-sided when you don't want to be able to view them "from behind". To do this, mouseover the sprite and press '1'. The means that wall and floor sprites will only be visible from one side and not both. This is an important thing to do when trying to fake 3D geometry using sprites.

There are generally a few principles you can apply when trying to place sprites to fake 3D shapes as you're doing here. There is unfortunately no silver bullet for this kind of thing. As I said - retail only very rarely does this, so support for it is limited. As a general rule, you want your sprite to cross over as few walls as possible - ideally none, in fact. What this could then mean is that every individual sector you created needs its own dedicated sprite, neatly centred inside of it to serve as both a ceiling and/or 'roof' sprite. There is some degree of tolerance for sprites crossing over walls, as I say, but it is not an exact science and something you would need to tweak endlessly to determine.

It is a pity that it's not very robust, but this is not really an intended use of sprites by Blood, and so you will need to struggle to achieve what you're after. As a general rule, floor sprites are not happy with crossing over red lines into neighbouring sectors. They want to be housed neatly in their parent sector.

I'm happy to go through this with you piece by individual piece, but the task will ask for a lot of patience from you, and this limitation may change some of your planning if it feels too cumbersome.
Kazashi wrote:Daedalus, I don't care how much you know about Blood, your attitude has to change.
Need a hint? Spill some on the Altar of Stone!

User avatar
RoosterMange
Still Kicking
Posts: 73
Joined: Sat Jan 20, 2024 9:37 am

Re: The Grand Mapedit Assistance Compendium

Post by RoosterMange » Thu Jan 25, 2024 9:54 am

I double checked and they're one sided. except the windows of course. I'll keep in mind that it needs to be kept within the red lines so have as minimal clipping as possible. I'm cool with whatever this process will take, I'm very stubborn and determined to finish this project.

On the topic of e6m1, is it sector over sector? The rooftop on that building is very intriguing, and if a similar process can be used to create the roof of my train, that would be a preferable option. If not, I'll keep messing with sprites as much as it'll take. If it must be done piece by piece, so be it.
"A punk rock song won't ever change the world, but I can tell you about a couple that changed me." -Pat The Bunny

User avatar
Daedalus
The Dreaming God
Posts: 307
Joined: Sun Dec 30, 2018 12:27 am
Location: The Hall of the Epiphany
Contact:

Re: The Grand Mapedit Assistance Compendium

Post by Daedalus » Thu Jan 25, 2024 1:20 pm

Not sure if I somehow missed your E6M1 question or if you edited it just as I posted or something. No matter.

The technique in E6M1 that you've observed is a sector stack or sector link effect. It is a powerful tool which can be used to serve as a portal of sorts between two sectors. The technique is generally employed to further the illusion of 3D space in Blood. It is the only method by which a player can physically see two sectors on top of each other at the same time. The first example of this in Blood is the outside of Morningside Funeral Home in Cradle to Grave, whereby you can open the front door, but also see up through the windows of the building.

Now I know you might think excitedly that that sounds like a perfect solution since that's what you're after and wonder why didn't I tell you of this earlier. The reason is that the sector stack effect is extremely stringent in what it wants in its surroundings for the effect to work and will very quickly turn into an ugly hall of mirrors effect if you do not play by its rules precisely.

Here are the constraints of the sector stack effect:
  1. The player can never see two sector stack sectors at the same time. You cannot have two "holes" in a ceiling which use this effect or it will break.
  2. Adding to the above, you cannot as a result have multiple connected sectors share the stack effect. It can only be a single sector. I point out this constraint on the first page of this thread.
  3. You cannot use overly complex shapes for the ceiling or floor of your sector which uses this effect or it will start to produce the hall of mirrors effect.
  4. You cannot have a sector stack effect in which a red sector above or below is in the line of sight of the player's vision, "blocking" the rest of the sector, or you will see the hall of mirrors effect.
The fourth reason above is a little oversimplified, but that is ultimately the death of this strategy for your use case. Your train cars will be complex sectors acting as 'islands' which you can see all sides of from above. This will be too complex for this technique and you will get an ugly hall of mirrors effect.

As a general rule, sector stacking works when the player has a limited angle of vision, when the view is not obstructed by independent red sectors, and tied to that, only as long as there are not multiple sectors with the effect in view. Your use case fails this on every count, so you will not be able to use the effect without ugly visual glitches in your map.
Kazashi wrote:Daedalus, I don't care how much you know about Blood, your attitude has to change.
Need a hint? Spill some on the Altar of Stone!

User avatar
Daedalus
The Dreaming God
Posts: 307
Joined: Sun Dec 30, 2018 12:27 am
Location: The Hall of the Epiphany
Contact:

Re: The Grand Mapedit Assistance Compendium

Post by Daedalus » Thu Jan 25, 2024 1:25 pm

As a random aside, Shadow Warrior uses this effect in ways that Blood doesn't tolerate. Sadly, Shadow Warrior used a newer version of Build which was much more powerful and flexible. With Blood we got stuck with a slightly broken version of sector stacking, which is a pity.
Kazashi wrote:Daedalus, I don't care how much you know about Blood, your attitude has to change.
Need a hint? Spill some on the Altar of Stone!

User avatar
RoosterMange
Still Kicking
Posts: 73
Joined: Sat Jan 20, 2024 9:37 am

Re: The Grand Mapedit Assistance Compendium

Post by RoosterMange » Fri Jan 26, 2024 1:13 am

I guess in that case, I'll have to cover each individual sector with sprites in a very meticulous way. Do you have any ideas for which texture I could use to make a cohesive rooftop? And to clarify, every sector counts including the seats, right? I'll have to match up the sprites perfectly with each red sector below?

Edit: I managed to make a pretty good roof but there's still some minor visual errors. It looks perfect from inside, but on top there's sometimes other sprites showing.
Attachments
image_2024-01-25_185629416.png
image_2024-01-25_185629416.png (172.84 KiB) Viewed 692 times
"A punk rock song won't ever change the world, but I can tell you about a couple that changed me." -Pat The Bunny

User avatar
Daedalus
The Dreaming God
Posts: 307
Joined: Sun Dec 30, 2018 12:27 am
Location: The Hall of the Epiphany
Contact:

Re: The Grand Mapedit Assistance Compendium

Post by Daedalus » Fri Jan 26, 2024 7:54 am

This is looking decent, but you will never be able to properly overcome the issue of sprites displaying through others in that way. Blood adores rendering sprites in front of others when you don't want them to. This is a limitation you will either need to accept or try work around. A solution to consider would be to add some depth to your ceiling area by adding some wall sprites around the top of your train car, like a wooden beam that surrounds it. This would at least distance the ceiling sprites from those others, which could help mask this effect.

The seats will also count towards sprites getting "confused" and not being rendered when looked at from certain angles, yes.
Kazashi wrote:Daedalus, I don't care how much you know about Blood, your attitude has to change.
Need a hint? Spill some on the Altar of Stone!

User avatar
RoosterMange
Still Kicking
Posts: 73
Joined: Sat Jan 20, 2024 9:37 am

Re: The Grand Mapedit Assistance Compendium

Post by RoosterMange » Fri Jan 26, 2024 9:28 am

As much as I dislike the visual clipping, I've come to accept it and I'm keeping it in mind for future cars. I added a flatcar carrying some crates you can use to jump onto the bar car I'm building, since the door is locked (VIP only). I'm basing it on the bar car in which Billy Midnight is found in rdr2. There's gonna be 2 more upper class cars after that you'll have to jump over, then I'll need to make that flatcar with the explosive barrels. I feel like I got the formula down for these next few cars, but I'll definitely need help with the big explosive piece. The whole train level itself is gonna be a loose reference to Priest (which, oddly enough, is based on Blood). Any ideas for other references or cool features to throw in? I'll be working on these next 3 cars and then we can talk about that explosive one.
"A punk rock song won't ever change the world, but I can tell you about a couple that changed me." -Pat The Bunny

User avatar
RoosterMange
Still Kicking
Posts: 73
Joined: Sat Jan 20, 2024 9:37 am

Re: The Grand Mapedit Assistance Compendium

Post by RoosterMange » Fri Jan 26, 2024 9:33 am

Side note, I wanted to put a piano in the bar car like the one in e1m1. How can I make one that Caleb can play?
"A punk rock song won't ever change the world, but I can tell you about a couple that changed me." -Pat The Bunny

User avatar
Daedalus
The Dreaming God
Posts: 307
Joined: Sun Dec 30, 2018 12:27 am
Location: The Hall of the Epiphany
Contact:

Re: The Grand Mapedit Assistance Compendium

Post by Daedalus » Fri Jan 26, 2024 10:52 am

I am between a few things currently, during which my creative side switches off, so I can't suggest anything on that side right this moment. I can however help with the piano. How you'd go about is that you would create two invisible sprites to make the effect. One sprite would be a wall sprite placed strategically near the piano keys. Be sure to make it fairly large to accommodate the fact that players might not be looking exactly at the keys. The best way to approach this is to pretend that keyboard players are trying to use your objects in the map. As a general rule, you want all your interactable objects to assume that the player is looking at a straight level, i.e. no looking up or down required.

On your wall sprite on the piano, hit ALT + F6 and give it a TX ID that is unique for this purpose. Now that we're moving towards having more of these triggers, it's time to inform you that you have a limit on these as well as a rule. Blood reserves everything below ID 100 for internal purposes, so you generally never want to use those numbers unless you know what you're doing. Anything above 100 is fine, up to 1023. Anyway, give it a TX ID and set CMD 1: ON, and check the box Going ON, as well as Push. Similar to like you do with the walls for the doors.

Then, hit ALT + F6 on the second sprite. This one will produce a sound in 3D space, with its location acting as the source. Be sure to place it somewhere close to the piano for it to be sensible. Set the type of this sprite to 708: SFX Gen. This is a sound effect generator. All you need to do is give it an RX ID that matches your earlier sprite you set up, then give it a sound number under the Data2 parameter. 279 is a piano sound that might suit your purposes.

This should set you on your way for having a piano that works.
Kazashi wrote:Daedalus, I don't care how much you know about Blood, your attitude has to change.
Need a hint? Spill some on the Altar of Stone!

Post Reply