Is there a way to force a room to spawn on a given floor? IE: This room must be present on the floor for it to be generated.
Well, I know there's at least one room in the game that's like this. Welcome to Dredmor, anyone? Could be problematic if modders get to do it, though; too many mods that have even one or two required rooms could turn the dungeon from randomly generated into a series of the same rooms every run, with the only difference being the little rooms connecting them. ...well, moreso than now, where I have the long table room somewhere on every single first floor whilst running ID.
Kinda. There's a way to designate seed rooms in the branch DB. In theory, though, you only get one such room active each time. For the one and only level in the game that has more than one seed room, it picks one randomly each time that floor is made. So if you're using a seed on one of the floors that already has one in the main game, your room is not guaranteed to be chosen. Haven't tried it yet (though I've been looking at it). Nicholas said that editing branchDB could get ugly. Not sure if you can add just that one line, or if you have to duplicate the entire branchDB file. One thing that occurs to me is the likelihood that any mod that edits branchDB is probably not going to play well with others that do the same. Then you are not running the current version of ID. That was changed 2 or 3 updates ago. The long-tables are now restricted to just half a dozen non-consecutive floors, and are now part of larger dining-room-and-kitchen complexes, so they don't spawn very often at all.
The dining room does have a kitchen attached, and I've only ever seen it spawn on floor one, but it spawns every single time floor one is generated.
@Banjo: My bad, I missed the word "first". I thought you were saying you had a dining room on every single floor, which was pretty close to what was happening with the older version, back when the dining room was just a rectangle with a long table and could show up anywhere. What you're proposing could indeed be happening with the current version, it just strikes me as really unlikely. If every single run-through has a dining room on the first floor, that's just bizarre RNG luck, I guess. I'm not getting results anything like that locally. If the current kitchen rate is annoying, I could drop a few doors off. That should make it spawn less often. Let me know if you think that's needed. Before trimming the doors, though, I would probably go spawn a dozen first floors to see if I can replicate your experience.
Well, my problem is that I'm working on a mod that requires you to visit a certain room once and then never see it again, unless there's some way to shut off what's going on in the room via script if you already have the permanent buff. It's sort of like the Tome of Fire and Ice room, except it gives a permanent buff. I guess I could seed the second floor with it and set special="1", right? That'd mean it would have to show up on floor 2 and would only do so once.
There's definitely ways to make a script only trigger once. Look at the ambush room on the moonbase floor in RotDG. It tucks away a little rune in an area the player would find very hard to access. When it's looking to trigger, it checks not only for player location, but also to see if the rune still exists. When it does trigger, it casts several spells and destroys the rune. So it can only happen once. You may be able to do something similar. Yes, that would work, assuming there's no exisitng seeds on floor 2. If I recall correctly, the first few floors all currently have seeds in the main game. I know for certain that the moonbase level is the only one in the game that already has 2 seeds. So if you wanted to insure the room spawned, it would need to appear later than that. Assuming I'm remembering correctly, that is. I haven't looked at the file since the day Nicholas mentioned it, because he described modding branchDB as "ugly". How vital is it that the room must spawn every game? If the room is small to medium size and has doors on all four sides, it should spawn fairly often, even without a seed. Banjo says he's getting a kitchen-dining complex in every first floor, and that's a pretty big room.
Yeah, I have that. The problem is what happens if the room spawns multiple times. Absolutely critical, considering it is the focal point of the entire mod. Without it, the rest of the mod doesn't function. My issue is that I need it to spawn once and then never again.
The alternative is to replace the starting room, though that would likely require changing core files. Though haps having it as a seeding room for one of the other eairler floors (not sure how many generic seeders there are) would be the better way to go. Though if it wouldnt break the concept of the room spawing multiple times you can always have the buff remove itself before applying it (if I am recalling right and we have the ability to access buffs by name in the newest versions) for future appearances of the room. It doesnt stop the RNG never showing it the first time however. Typically speaking though its easy enough to have scripts only run once for a room.
I can set a maximum of once per floor, set it to only appear on the first floor, but I can't get it to show a minimum of once per floor without altering the base rooms.xml.