Author Topic: [Solved] 20 x 20 terror mission tiles  (Read 2138 times)

Offline Panzerschlag

  • Squaddie
  • *
  • Posts: 7
  • Jack of all trades, master of none.
    • View Profile
[Solved] 20 x 20 terror mission tiles
« on: October 25, 2022, 03:49:32 am »
Hey all, working on my little mod that I work on once or twice a year. Decided to sit down to learn how to map as I eventually want to create some tilesets and maps from scratch. I sat down to add in some new map tiles to terror missions, which appear to be one of the oddballs when it comes to map generation. I have been able to create 10x10 map tiles and add them to the map generator without issue. I attempted to add a 20x20 set with mixed results.

When editing mapScripts.rul if I add a 20x20 block after a 10x10 block and increase the block number by one in the fillArea block node the game will immediately crash when trying to load a terror mission. If I increase it by two it loads about half the time. For example...

      blocks: [3, 4, 10, 11, 12, 13, 14, 15, 16, 17]
      freqs: [3, 3, 2, 2, 2, 2, 2, 2, 2, 1]

Causes an immediate crash

      blocks: [3, 4, 10, 11, 12, 13, 14, 15, 16, 18]
      freqs: [3, 3, 2, 2, 2, 2, 2, 2, 2, 1]

Will allow the map to generate about half the time, with the custom 20x20 block being able to spawn.

Log file is as follows

Code: [Select]
[24-10-2022_20-19-20] [INFO] OpenXcom Version: Extended 7.0 (v2021-03-13)
[24-10-2022_20-19-20] [INFO] Platform: Windows 64 bit
[24-10-2022_20-19-20] [INFO] Data folder is:
[24-10-2022_20-19-20] [INFO] Data search is:
[24-10-2022_20-19-20] [INFO] - F:/Documents/OpenXcom/
[24-10-2022_20-19-20] [INFO] - C:/Users/Panzerschlag/Desktop/Open XCOM Extended/
[24-10-2022_20-19-20] [INFO] User folder is: F:/Documents/OpenXcom/
[24-10-2022_20-19-20] [INFO] Config folder is: F:/Documents/OpenXcom/
[24-10-2022_20-19-20] [INFO] Options loaded successfully.
[24-10-2022_20-19-20] [INFO] SDL initialized successfully.
[24-10-2022_20-19-21] [INFO] SDL_mixer initialized successfully.
[24-10-2022_20-19-21] [INFO] Attempted locale:
[24-10-2022_20-19-21] [INFO] Detected locale: C
[24-10-2022_20-19-21] [INFO] Attempting to set display to 1920x1080x32...
[24-10-2022_20-19-21] [INFO] Display set to 1920x1080x32.
[24-10-2022_20-19-21] [INFO] Loading data...
[24-10-2022_20-19-21] [INFO] Scanning standard mods in ''...
[24-10-2022_20-19-21] [ERROR] Invalid standard mod 'UFO New Millennium', skipping.
[24-10-2022_20-19-21] [INFO] Scanning user mods in 'F:/Documents/OpenXcom/'...
[24-10-2022_20-19-21] [INFO] Active mods:
[24-10-2022_20-19-21] [INFO] - xcom1 v1.0
[24-10-2022_20-19-21] [INFO] - UFOextender_Gun_Melee v1.0
[24-10-2022_20-19-21] [INFO] - UFOextender_Psionic_Line_Of_Fire v1.0
[24-10-2022_20-19-21] [INFO] - XcomUtil_High_Explosive_Damage v1.0
[24-10-2022_20-19-21] [INFO] - UFO New Millennium v0.01
[24-10-2022_20-19-21] [INFO] Loading begins...
[24-10-2022_20-19-21] [INFO] Pre-loading rulesets...
[24-10-2022_20-19-21] [INFO] Loading vanilla resources...
[24-10-2022_20-19-21] [INFO] Loading rulesets...
[24-10-2022_20-19-22] [INFO] Loading rulesets done.
[24-10-2022_20-19-22] [INFO] Loading ended.
[24-10-2022_20-19-22] [INFO] Loading fonts... Font.dat
[24-10-2022_20-19-22] [INFO] Lazy loading: 1
[24-10-2022_20-19-22] [INFO] Loading custom palettes from ruleset...
[24-10-2022_20-19-22] [INFO] Making palette backups...
[24-10-2022_20-19-22] [INFO] Data loaded successfully.
[24-10-2022_20-19-22] [INFO] Loading language...
[24-10-2022_20-19-22] [INFO] Language loaded successfully.
[24-10-2022_20-19-22] [INFO] OpenXcom started successfully!
[24-10-2022_20-19-22] [INFO] Playing flx, 320x200, 890 frames
[24-10-2022_20-19-23] [INFO] SDL_mixer initialized successfully.
[24-10-2022_20-21-25] [FATAL] A fatal error has occurred: Map failed to fully generate.
[24-10-2022_20-21-25] [FATAL] 0x5b6d50 OpenXcom::CrossPlatform::stackTrace(void*)
[24-10-2022_20-21-25] [FATAL] 0x5b7bc0 OpenXcom::CrossPlatform::crashDump(void*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
[24-10-2022_20-21-25] [FATAL] 0x41c880 exceptionLogger()
[24-10-2022_20-21-25] [FATAL] 0xba0b80 MPEGaction::MPEGaction()
[24-10-2022_20-21-25] [FATAL] 0xdabe50 void std::iter_swap<__gnu_cxx::__normal_iterator<OpenXcom::ScriptProcData*, std::vector<OpenXcom::ScriptProcData, std::allocator<OpenXcom::ScriptProcData> > >, __gnu_cxx::__normal_iterator<OpenXcom::ScriptProcData*, std::vector<OpenXcom::ScriptProcData, std::allocator<OpenXcom::ScriptProcData> > > >(__gnu_cxx::__normal_iterator<OpenXcom::ScriptProcData*, std::vector<OpenXcom::ScriptProcData, std::allocator<OpenXcom::ScriptProcData> > >, __gnu_cxx::__normal_iterator<OpenXcom::ScriptProcData*, std::vector<OpenXcom::ScriptProcData, std::allocator<OpenXcom::ScriptProcData> > >)
[24-10-2022_20-21-25] [FATAL] 0xdb1b10 std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_expression_term<true, true>(std::pair<bool, char>&, std::__detail::_BracketMatcher<std::__cxx11::regex_traits<char>, true, true>&)::{lambda(char)#1}::operator()(char) const
[24-10-2022_20-21-25] [FATAL] 0x50a060 OpenXcom::BattlescapeGenerator::generateMap(std::vector<OpenXcom::MapScript*, std::allocator<OpenXcom::MapScript*> > const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
[24-10-2022_20-21-25] [FATAL] 0x50e990 OpenXcom::BattlescapeGenerator::run()
[24-10-2022_20-21-25] [FATAL] 0x7347d0 OpenXcom::NewBattleState::btnOkClick(OpenXcom::Action*)
[24-10-2022_20-21-25] [FATAL] 0x5d3850 OpenXcom::InteractiveSurface::handle(OpenXcom::Action*, OpenXcom::State*)
[24-10-2022_20-21-25] [FATAL] 0x68d2e0 OpenXcom::State::handle(OpenXcom::Action*)
[24-10-2022_20-21-25] [FATAL] 0x5cef20 OpenXcom::Game::run()
[24-10-2022_20-21-25] [FATAL] 0x41c950 SDL_main
[24-10-2022_20-21-25] [FATAL] 0x9bbec0 console_main
[24-10-2022_20-21-25] [FATAL] 0x9bbfe0 WinMain
[24-10-2022_20-21-25] [FATAL] ??
[24-10-2022_20-21-25] [FATAL] ??
[24-10-2022_20-21-25] [FATAL] 0x7fffa35f7020 BaseThreadInitThunk
[24-10-2022_20-21-25] [FATAL] 0x7fffa4382680 RtlUserThreadStart
[24-10-2022_20-21-33] [FATAL] OpenXcom has crashed: Map failed to fully generate.
« Last Edit: October 30, 2022, 12:07:07 pm by Meridian »

Offline Nord

  • Commander
  • *****
  • Posts: 1746
  • The Gate is open.
    • View Profile
Re: 20 x 20 terror mission tiles
« Reply #1 on: October 25, 2022, 01:06:24 pm »
I recommend to divide map block placing by two steps: first placing 2x2 blocks, then all other 1x1. For second you can use fillArea command.

Offline Panzerschlag

  • Squaddie
  • *
  • Posts: 7
  • Jack of all trades, master of none.
    • View Profile
Re: 20 x 20 terror mission tiles
« Reply #2 on: October 25, 2022, 10:43:17 pm »
Is there any more documentation on how to set up mapblocks? I've tried changing how it loads up but I'm still getting about 50/50 on crashes to desktop.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9084
    • View Profile
Re: 20 x 20 terror mission tiles
« Reply #3 on: October 25, 2022, 11:09:02 pm »
Why do you want us to just guess?

Upload your mod, give instructions to reproduce and we will answer exactly what is wrong.

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: 20 x 20 terror mission tiles
« Reply #4 on: October 26, 2022, 02:03:08 am »
Is there any more documentation on how to set up mapblocks?
Unfortunately no, though I should write one up.

Simplest answer: always load 2x2 blocks first.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11721
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: 20 x 20 terror mission tiles
« Reply #5 on: October 26, 2022, 01:17:21 pm »
X-Com craft first, UFO second, streets third, large blocks fourth, small blocks fifth.
This can of course be mixed up further, but if you're asking about a general rule, then this should work every time.

Offline Panzerschlag

  • Squaddie
  • *
  • Posts: 7
  • Jack of all trades, master of none.
    • View Profile
Re: 20 x 20 terror mission tiles
« Reply #6 on: October 27, 2022, 06:50:48 am »
I see now, my mistake was thinking I had to specify all of the blocks in the fill command, I kept skipping over the large block code and got everything working by just removing the blocks from the script, and just leaving them in the terrain bank.