Jump to content
The Dark Mod Forums

Rats! ... rats causing a segfault with dmap


PranQster

Recommended Posts

This is likely related to my previous segfault question which I had posted in the Editors forum.Hmm... new issue. What could cause this?

If I add a rat anywhere in my map, I get the following:

[Write AAS]

writing maps/j8/j8d.aas32

done. 2 seconds to create AAS

======================================================= no entities in map that use aas100

======================================================= [Brush Load] 569 brushes

[Brush Merge] 569 original brushes

17 brushes merged

1069 brush sides clipped

[Brush BSP] 552 brushes

437 grid cells

100 % 4909 splits

[Portalize BSP] 9819 nodes

9819 nodes portalized

[Remove Outside] 2475 solid leaf nodes

89 outside leaf nodes

2346 inside leaf nodes

[Gravitational Subdivision] 494 subdivisions

[Merge Portals] 400 portals merged

[Melt Portals] 7366 points inserted

[Ledge Subdivision] 445 ledges

863 subdivisions

[Merge Leaf Nodes] 1649 leaf nodes merged

[Merge Portals] 4674 portals merged

[Melt Portals] 8394 points inserted

[Store AAS]

signal caught: Segmentation fault

si_code 1 Trying to exit gracefully.. --------- Game Map Shutdown ---------- ModelGenerator memory: No LOD entries. --------------------------------------

idRenderSystem::Shutdown() ------------ Game Shutdown ----------- --------- Game Map Shutdown ---------- ModelGenerator memory: No LOD entries. -------------------------------------- ModelGenerator memory: No LOD entries. Shutdown event system

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

shutdown terminal support

If I add a horse instead, no problems... just a problem with the rat.

Edited by PranQster

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

Rats occupy a very small area on the floor, which means if you have a large area, the engine might divide it into many many small areas and at the end, run out of area parts.

 

The solution is to add more visportals and divide your large areas where rats can run into smaller areas. Also, adding monsterclip can help.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Rats occupy a very small area on the floor, which means if you have a large area, the engine might divide it into many many small areas and at the end, run out of area parts.

 

The solution is to add more visportals and divide your large areas where rats can run into smaller areas. Also, adding monsterclip can help.

 

Ok. Thanks. I think what happened is that the areas where I tried placing the rat(s) were both connected without (yet) a visportal between them. One of them is a tiny, non-explorable section of sewer which is nothing more than a tiny player start room. The other area is a large outdoor space. I'll tinker with it and see what happens.

Edited by PranQster

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

I separated the area where I was wanting to put the rat, visportaled it, etc. Still the rat caused dmap to crash.

But I think I may have found a solution...

I put a small spider into the same place with no troubles. Then I added a rat and changed 'inherit' from 'atdm:ai_base' to 'atdm:ai_spider'. dmap ran with no problems. Of course the rat wants to attack me, so I'll have to set it's team value. But I can now add rats in the few places where I want them. :)

BTW, is there such a thing as 'atdm:ai_rat'?

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

Not sure how that'll work.

 

The rats have a random patrol routine, Spiders need patrols. You can set rats on patrol too I guess but they won't cycle anims. Also not sure if it'll cause other issues.

Would be good to know anyway if you feel like experimenting.

 

You might be able to have some stairs or ledge dividing the area. That way the rat won't be able to get up into the large area, so it might not be divided up as much.

 

You can also mask that or larger ai to still use it. Make the ground a patch ramp (so it doesn't effect pathfinding) and it doesn't look like a ledge. But underneath the patch have a caulk ledge that's too big for a rat to pathfind (maybe 34-48 units high). At some point the rats will see this ledge as too big to go over, even with the ramp patch, but larger ai can navigate it (but they will just walk the patch ramp, not hop up a ledge).

 

 

How large is your map, I have a pretty big city area (just streets mainly), but have several rats in the streets and never saw a problem. (maybe 5 minutes for player to walk one end to other + some loops involved and a couple of enterable buildings.

 

(I've actually got patch ramp/caulk ledges like that in my city streets and never even thought it might be blocking the rats as they are in areas with flatter surfaces. So I might've been doing something good without even knowing it, lol)

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

The reason replacing the rat with a spider "works" is because the spiders use aa96 (the queen), aas32 (the child) and aas_rat (the tiny spider).

 

So unless you used a tiny spider, you have simply changed the AAS grid that the AI used, to a bigger one.

 

E.g. you could have had the same effect simply adding "use_aas" "aas32" to your rat.

 

However, this is not a real solution because your rat is now much bigger and cannot go to the places it could go before.

 

You need to reread what I posted above and make sure that NO area the rat can go to is too big.

 

E.g. if you have a small and a huge area, simple sep. them by visportal is not enough, because the rat can go to the huge area, so the AAS for the rat needs to be compiled there, too. Sep. the huge are into smaller areas with visportals and it should work. Adding more monsterclip might also help, as it reduces the floor size.

 

Adding some steps somewhere might (or might not) work, as this mght cause the AAS compile into two different sets of ares connected by a step, and this might make it think it has to smaller areas instead of one huge.

 

In any event, this problem can only be fixed on the engine side when D3 goes open source.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Thanks guys. I'll take a screenshot to demonstrate the small area the rat is in. Basically it is in a small sewer pipe area, very short and sealed in by brush work.

By the way, the rat behavior is just fine... running back and forth, hopping around and standing on hind legs in a very rat-like manner.

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

Attached is my small rat area. Just a bit of sewer pipe. I had put a tiny spider in the pipe to test, saw it's 'atdm:ai_spider' property and put that for the 'inherit' value for the rats. It seemed to work fine and they behave like I hoped they would.

The rat(s) are sealed in with nodraw_solid brushes at the close end of the pipe and back where the pipe bends (a second rat is back there in the screenshot, though it's hard to see it). The pipe ends just around that bend. The rats cannot leave the pipe and are confined to the center dirty area by monster_clip along the sides of the pipe.

From the player's viewpoint, there is a continuation of the sewer pipe just behind the player's back (also blocked with nodraw_solid) and then there is an access pipe with ladder above the players head. That is capped with a manhole cover and leads into a small shed. The sewer area is sealed from the shed, and the shed is sealed from the outside area. The shed is sealed for sure because ambient_audio music changes work when exiting the shed to the outside world.

By the way, the wall (and water) textures are temporary, so I haven't bothered texture alignment yet.

post-3285-130541250133_thumb.jpg

Edited by PranQster

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

It might help to use monster clip instead of nodraw.

 

I don't know if nodraw acts the same, but monster clip will definitely tell them they can't go beyond (as far as pathfinding goes, not rat ai). So that would put an actual wall in between the areas.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

It might help to use monster clip instead of nodraw.

 

I don't know if nodraw acts the same, but monster clip will definitely tell them they can't go beyond (as far as pathfinding goes, not rat ai). So that would put an actual wall in between the areas.

 

Ok, cool. I had originally set nodraw there instead of monster clip because I was unsure if the player could squeeze in there or not and wanted to make sure it couldn't happen.

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

Ok, cool. I had originally set nodraw there instead of monster clip because I was unsure if the player could squeeze in there or not and wanted to make sure it couldn't happen.

 

There is a player_clip texture, too. So either use "monster_clip" and a "player_clip" wall.

 

I believe, there is even a "clip" texture which is solid to everything (but then it might break objects the player throws in, like arrows or lit candles).

 

Hopefully the engine is smart enough recognizing that the other area is unreachable by the rat.

 

Edit: "nodraw" isn't solid to the player, anyway. You would need to use "nodraw_solid" for that :)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

There is a player_clip texture, too. So either use "monster_clip" and a "player_clip" wall.

 

I believe, there is even a "clip" texture which is solid to everything (but then it might break objects the player throws in, like arrows or lit candles).

 

Hopefully the engine is smart enough recognizing that the other area is unreachable by the rat.

Ok I'll try that

Edit: "nodraw" isn't solid to the player, anyway. You would need to use "nodraw_solid" for that :)

Actually I was saving keystrokes in my post above, and had meant to type 'nodraw_solid', which is what I used.

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.

  • Recent Status Updates

    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 3 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
×
×
  • Create New...