FORUM ARCHIVED

Possible hole in the wall bug reason

Discussion in 'Bugs' started by LionsDen, May 10, 2012.

  1. LionsDen

    LionsDen Member

    I am attempting to make my first room and noticed a hole in the wall when I tried it out. This could be why other holes appear in the walls. Anyway, here is my code below and a picture of the resulting hole in the wall.

    Code:
    <room width="7" height="10" name="Hidey Hole">
      <row text="  ###  "/>
      <row text="  #1#  "/>
      <row text="  #!#  "/>
      <row text="###!###"/>
      <row text="#.2.3.#"/>
      <row text="#.....#"/>
      <row text="d..6..d"/>
      <row text="#.....#"/>
      <row text="#4...5#"/>
      <row text="###D###"/>
      <flags special="1" noblockers="1" minLevel="0" maxLevel="0"/>
     
      <!-- decor -->
      <customblocker name="Fiery Brazier" at="2" pngSprite="dungeon/brazierA/brazierA" pngFirst="0" pngNum="4" pngRate="100" passable="0" pngAnimate="1" percent="50" />
      <customblocker name="Fiery Brazier" at="3" pngSprite="dungeon/brazierA/brazierA" pngFirst="0" pngNum="4" pngRate="100" passable="0" pngAnimate="1" percent="50" />
      <customblocker name="Candelabra" at="4" pngSprite="dungeon/candelabra/candelabra" pngFirst="0" pngNum="4" pngRate="100" passable="0" pngAnimate="1" />
      <customblocker name="Candelabra" at="5" pngSprite="dungeon/candelabra/candelabra" pngFirst="0" pngNum="4" pngRate="100" passable="0" pngAnimate="1" />
     
    <!--
      <element at="1" type="foodvending" />
      <element at="2" type="drinkvending" />
    -->
     
      <loot type="ring" at="6" percent="10" />
      <loot type="neck" at="6" percent="10" />
      <loot type="wand" at="6" percent="10" />
      <loot type="component" at="6" percent="10" />
      <loot type="mushroom" at="6" percent="10" />
      <loot type="reagent" at="6" percent="10" />
      <loot type="gem" at="6" percent="10" />
      <loot type="hands" at="6" percent="10" />
      <loot type="food" at="6" percent="50" />
      <loot type="thrown" at="6" percent="20" />
      <loot type="bolts" at="6" percent="20" />
      <loot type="helmet" at="6" percent="10" />
      <loot type="armor" at="6" percent="10" />
      <loot type="weapon" at="6" percent="10" />
      <loot type="potion" at="6" percent="10" />
      <loot type="artifact" at="6" percent="2" />
     
    </room> 
    Hole in the Wall.jpg

    I was just testing the room, it's not done yet. At position 1, I will be placing one thing but it will be one of a number different possiblities (still looking how to do this) but I didn't assign anything to it yet. The space for it doesn't show in the room, instead a hole in the wall appears where it is supposed to go. I wonder if something like this may be causing the other holes in the walls I occasionally uncover.

    Also, for some reason, my braziers aren't showing up. I currently had my expansion folder renamed to also test out some crashing issues for Nick but since the files are in my base games dungeon directory it shouldn't have been a problem. The vending lines commented out are just for future reference for me.
     
  2. r_b_bergstrom

    r_b_bergstrom Will Mod for Digglebucks

    About the bug report:
    You have commented out your section with the vending machines. So your "1" position is undefined. When the game hits an undefined marker like that, it subs in a black space. Remove the comment arrows and the black space will go away.

    It's not the cause of the other thing where you find what you call "holes in the wall". I've seen that as well, and can confirm it's not a result of numbers on the room map being undefined. I've extensively searched the rooms.xml and know that I've seen it happen in places that are not numbered (they have # instead, or are between rooms). Most commonly it happens when walls that shouldn't be destructible get blown up by things that shouldn't be blowing them up. It's a larger bug that's somewhere in the code of the game, not the xml. While I can't force the bug to happen, when it does happen I'm always able to blow up nearly all walls as if every area-effect were a dig effect or nearly every wall were a ! instead of a #, and it leaves these black spots behind. It's a totally different thing, despite having similar visual symptoms.


    About the Braziers:
    As for your Braziers not showing up, you do have them set with percent="50". How many times did the room spawn? Unless it was dozens and _none_ of them had the Braziers, it's pretty much to be expected. Two braziers set at percent="50" means that the odds of both of them not spawning is 1 in 4.


    Other xml errors and oddities:
    As to your item spawns, most of your type codes are non-functional. I don't think type="hands", type="helmet", type="neck", etc do anything. I've never seen those before, and a quick search of rooms.xml in 1.0.10 and RotDG didn't find them ever used. Items for those body areas are all called by type="armour". If you can definitively say that you got things like type="hands" to generate something, please let me know, because that would be awesome.

    Also, if those codes do work, then there's technically nothing to stop the game from generating all 16 pieces of loot from spawning at once. The RNG is somewhat streaky when generating multiple things at once. Even if it wasn't, the odds of generating 2 or more things on that space are actually pretty darned good. Even if all you had were the 10% lines, there'd still be a better than 70% chance of _something_ spawning on the space. From time to time you should get 5 or more items on the spot. Not that there's anything wrong with that if it's what you wanted, but I figure you might not realize how it works. It's not like skill and spell triggers where it just does one item and then stops.
     
  3. LionsDen

    LionsDen Member

    Thanks for the info about the holes. I have noticed that the holes appear when I can suddenly destroy walls that normally I haven't been able to.

    As far as the braziers go, I never noticed the percent. I copied the lines from another room and I think it was a room that seemed to always have them. Don't remember for sure though. That's an easy fix though so thanks. :)

    As for the item percentage, I kind of figured that was how it worked. I kind of figured if I kept the percentages low that probably onle a few items would show up. I have only seen the room once and I got something weird on that space so I need to do a little experimenting to see what happens with what. If hands, neck, helmet or any of the others do spawn something I will let you know. Probably will set the percentage to 100 to test and see what works and what doesn't.

    Thanks for your answers. This is my first room and I'm still learning. :) In the number 1 spot I want it to spawn a random vending machine or shrine or even nothing. I need to look over the code for other rooms and see if I can puzzle out any way to do that. I do know that I only want 1 thing to spawn there. I'll probably use a rug or something for when nothing spawns as nothing seems to create what I call the hole effect.
     
  4. r_b_bergstrom

    r_b_bergstrom Will Mod for Digglebucks

    The rug won't be necessary. It should only generate the hole if the number is undefined. If it's defined, but has a percent= chance of not spawning, it won't make the hole. The main game does this all over the place.

    As for the vending, shrines, etc, you can actually just pile them all up on top of each other and it mostly won't matter, I think. The one furthest down the file would spawn last, and cover up the others. Shrines would look a little weird poking out from behind one another with their odd shapes, but vending on top of vending would be largely unnoticed. Only the top one should be active, kinda like how an eyeball shrine on top of something else makes only the eyeball shrine work. In theory, a player with a dig effect and a cheap knockback effect could eventually dislodge them from the space, but it would take a lot of effort to do so, and for not a lot of benefit. I haven't tested this pile-up myself, but it follows from other things I've observed in both play and modding.

    Might be possible to room-script something that creates an random vending machine, but just piling them up should more than one generate would be easier. Alternately, you could just create different versions of the room, each with one element spawning 100%, and then set each version for a different floor. Unless someone looked in your files, they'd never know which floor had which version, so it would appear random until they'd played the mod a lot.
     
  5. LionsDen

    LionsDen Member

    I was thinking about the different rooms if I couldn't think of a way to do it by generating one by random. It might even be good to have 2 or 3 rooms identical except for the hidden area. You are a fount of information. :) Love the new rooms in the new DLC.
     
  6. r_b_bergstrom

    r_b_bergstrom Will Mod for Digglebucks

    Thank you! If you like those, there's several more in Interior Dredmorating (there's a link in my sig), including several that Gaslamp folks liked, but didn't have time to redo the art officially. The DLC went way over the budgeted staff hours.

    Speaking of which, I should get back to work on ID 2.0.
     
  7. LionsDen

    LionsDen Member

    To let you know, I did some testing and found these item tags to work in loot.

    Code:
      <loot type="component" at="6" percent="30" />
      <loot type="reagent" at="6" percent="30" />
      <loot type="gem" at="6" percent="10" />
      <loot type="bolts" at="6" amount="4" percent="25" />
      <loot type="armour" at="6" percent="10" />
      <loot type="weapon" at="6" percent="10" />
      <loot type="potion" at="6" percent="10" />
      <loot type="artifact" at="6" percent="2" />
    
    I figured this would be good percentages. May adjust as my testing goes. With my first test, nothing showed up at all. :)
     
  8. r_b_bergstrom

    r_b_bergstrom Will Mod for Digglebucks

    Yes, I knew about all of those except type="gem", as they all appear in the main game, and I've used almost all of them in ID.

    I realize now that my post where I was pointing out the ones that don't work could be read two ways:

    The way I intended was "the specific ones I'm mentioning don't work", referring to: hands, helmet, and neck.


    I left in an "etc" from an earlier draft of the sentence that made it kinda read like I was saying "no type tags work at all", which is definitely not what I meant.

    Anyhow, thanks for sharing what you learned. I'd totally missed the type="gem" and should probably use it sometime.

    IIRC, I think type="zorkmids" also works.
     
  9. LionsDen

    LionsDen Member

    Yeah, I kind of figured that was what you meant. I'm pretty sure that gem works as I did have a gem show up. It could have been reagent or component working but I think I tested for that.
     
  10. r_b_bergstrom

    r_b_bergstrom Will Mod for Digglebucks

    Oh, and I think you can do type="lockpicks".

    correction: <loot type="misc" subtype="lockpick" amount="8" x="8" y="4" /> works.
     
  11. LionsDen

    LionsDen Member

    I wonder, will <loot type="misc" x="8" y="4" /> drop something beside lockpicks at that location. I feel a test coming on. :)

    EDIT: Just tried it twice and nothing show up. :( Oh well. On a semi-related note. I tend to find 2 items waiting in the room for me when I open the door. Rarely more.