Adding more overmap specials

Using one of the experimentals and a couple of mods I am now getting this interesting error.

DEBUG: There are too many mandatory overmap specials(99>72). Some of them may not be placed.

FUNCTION: void overmap_specials:: check_constistency()
FILE: src/overmap.cpp
LINE: 299

I understand what it means what I am asking is there a way I can increase this maximum?

[quote=“DeWolf, post:1, topic:13242”]Using one of the experimentals and a couple of mods I am now getting this interesting error.

DEBUG: There are too many mandatory overmap specials(99>72). Some of them may not be placed.

FUNCTION: void overmap_specials:: check_constistency()
FILE: src/overmap.cpp
LINE: 299

I understand what it means what I am asking is there a way I can increase this maximum?[/quote]

I mean, maybe? I don’t mess with the files of this particular game, so i wouldn’t know entirely, but if you could find the file where your overmap specials number limit is and just change it to what you want? That might work, but again, I haven’t touched the files of this game period, so i don’t know what !FUN! things that would cause.

The 72 limit is probably not going to change any time soon, but you can keep your fingers crossed.

What you can do is to reduce the minimum occurrences of some mandatory special. For example if you use the mod More_Locations, a lot of buildings have a min occur of 1, this is not really needed. There is not enough spot on the map to accommodate all buildings.

So edit
"occurrences" : [1, 50],
to
"occurrences" : [0, 50],

with notepad++ you can do that in one go

[quote=“Nibelung44, post:3, topic:13242”]The 72 limit is probably not going to change any time soon, but you can keep your fingers crossed.

What you can do is to reduce the minimum occurrences of some mandatory special. For example if you use the mod More_Locations, a lot of buildings have a min occur of 1, this is not really needed. There is not enough spot on the map to accommodate all buildings.

So edit
"occurrences" : [1, 50],
to
"occurrences" : [0, 50],

with notepad++ you can do that in one go[/quote]
While nice to know I am more interested as to where this 72 value is located in the code.

Ok so do mandatory over map specials mean that these location have to spawn or something else?

When a location is mandatory it tells the game to spawn atleast that many on every overmap, but I think they have conditions under which they will/won’t appear so they aren’t guaranteed to appear on all overmaps.

You can reveal an overmap using the Debug menu’s Reveal Map, which is very useful if you want to mess around with the options to see how they work.

[quote=“Weyrling, post:6, topic:13242”]When a location is mandatory it tells the game to spawn atleast that many on every overmap, but I think they have conditions under which they will/won’t appear so they aren’t guaranteed to appear on all overmaps.

You can reveal an overmap using the Debug menu’s Reveal Map, which is very useful if you want to mess around with the options to see how they work.[/quote]
Ok so when the other guy put the occurrence thing from 1 to 0 it makes said special an optional thing right? So does that mean that that particular structure won’t spawn at all or only that it might not at all?

[quote=“DeWolf, post:7, topic:13242”][quote=“Weyrling, post:6, topic:13242”]When a location is mandatory it tells the game to spawn atleast that many on every overmap, but I think they have conditions under which they will/won’t appear so they aren’t guaranteed to appear on all overmaps.

You can reveal an overmap using the Debug menu’s Reveal Map, which is very useful if you want to mess around with the options to see how they work.[/quote]
Ok so when the other guy put the occurrence thing from 1 to 0 it makes said special an optional thing right? So does that mean that that particular structure won’t spawn at all or only that it might not at all?[/quote]
It will most probably spawn somewhere, but due to the randomness of mapgen you may have to travel a significant distance to locate one.

Nice to know but I still want an answer to my other question is what part of the game code says that there can only be 72 mandatory specials.

I spent a few minutes looking into it.

OMSPEC_FREQ is set in omdata.h:

[code]// Overmap specials–these are “special encounters,” dungeons, nests, etc.
// This specifies how often and where they may be placed.

// OMSPEC_FREQ determines the length of the side of the square in which each
// overmap special will be placed. At OMSPEC_FREQ 6, the overmap is divided
// into 900 squares; lots of space for interesting stuff!
#define OMSPEC_FREQ 15[/code]

It’s checked here in overmap.cpp, explaining where the 72 comes from:

[code]void overmap_specials::check_consistency()
{
const size_t max_count = ( OMAPX / OMSPEC_FREQ ) * ( OMAPY / OMSPEC_FREQ ) / 2;
const size_t actual_count = std::accumulate( specials.get_all().begin(), specials.get_all().end(), 0,
( size_t sum, const overmap_special &elem ) {
return sum + ( elem.flags.count( “UNIQUE” ) == 0 ? std::max( elem.occurrences.min, 0 ) : 1 );
} );

if( actual_count > max_count ) {
    debugmsg( "There are too many mandatory overmap specials (%d > %d). Some of them may not be placed.", actual_count, max_count );
}

specials.check();

}[/code]
That’s about all the help I can offer atm, since I’m going to sleep in a bit.