Author Topic: Custom Map crashes on Launch  (Read 6854 times)

Zukamimozu

  • Posts: 4
  • Maggot Crusher.
    • View Profile
Custom Map crashes on Launch
« on: August 17, 2014, 08:16:43 PM »
In the editor whenever I tested my map it worked fine so I used the Levelpacked.exe and finished my map. I put it in the levels/workshop folder. My plan was to play it with my friends, so I tested it first in single player first and when I hit launch the game crashed. It creates and error file that I tried to understand but I wasn't able to. I was wondering if someone could help me get my level working?

The Error it gave me

Code: [Select]
--- UNHANDLED EXCEPTION - 16/08/2014 11:02:43 PM - HMW 1.23 DEBUG ---
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at ARPGGame.LevelList.SetLevel(String id, Int32 startPointId, WorldNode world, MinimapObscurer mapObs) in c:\Projects\ARPGProj\trunk\ARPG\ARPGGame\LevelList.cs:line 120
   at ARPGGame.GameBase.ClearLevel() in c:\Projects\ARPGProj\trunk\ARPG\ARPGGame\GameBase.cs:line 541
   at ARPGGame.GameBase.Update(Int32 ms) in c:\Projects\ARPGProj\trunk\ARPG\ARPGGame\GameBase.cs:line 783
   at ARPGGame.ARPGGame.OnUpdateFrame() in c:\Projects\ARPGProj\trunk\ARPG\ARPGGame\Program.cs:line 958
   at ARPGGame.ARPGGame.Run() in c:\Projects\ARPGProj\trunk\ARPG\ARPGGame\Program.cs:line 557
   at ARPGGame.Program.Main(String[] args) in c:\Projects\ARPGProj\trunk\ARPG\ARPGGame\Program.cs:line 193

CrusaderDeleters

  • Posts: 102
  • The Great Crusader
    • View Profile
Re: Custom Map crashes on Launch
« Reply #1 on: August 17, 2014, 10:04:13 PM »
I'd just put it into the "levels" folder or make a "levels/custom" folder, because the workshop is for Steam maps.
The King of Maernol

Zukamimozu

  • Posts: 4
  • Maggot Crusher.
    • View Profile
Re: Custom Map crashes on Launch
« Reply #2 on: August 17, 2014, 10:08:31 PM »
Did as you said and still the same problem :(

I'd really like to get this working. Do you need more information to solve this?

Myran

  • Developer
  • Posts: 183
    • View Profile
Re: Custom Map crashes on Launch
« Reply #3 on: August 18, 2014, 12:56:07 AM »
Okay, so from just that I can't know exactly what the problem is, but if you upload the .hwm I can take a look. A guess would be an error with the level.xml file though, so in that file you need a line for every level in your campaign, it also says what level the campaign should start with. Since it crashes right away I'd guess it can't find the starting level.

Zukamimozu

  • Posts: 4
  • Maggot Crusher.
    • View Profile
Re: Custom Map crashes on Launch
« Reply #4 on: August 18, 2014, 02:04:26 AM »
I attached the .hwm

I don't exactly know how to work the levels.xml and if you could help me or show me a tutorial it would be appreciated, thanks!

Myran

  • Developer
  • Posts: 183
    • View Profile
Re: Custom Map crashes on Launch
« Reply #5 on: August 18, 2014, 04:25:28 PM »
Okay, so this is your level.xml file:
Code: [Select]
<levels start="25">
<act name="lvl.act1">
<level id="1" res="levels/TheRoyalCrypts.xml" name="lvl.floor?floor=1" />
</act>
</levels>
Line 1 says to start the campaign at the level with id "25", but the only level you define has id "1". So just change it to:
Code: [Select]
<levels start="1">
<act name="lvl.act1">
<level id="1" res="levels/TheRoyalCrypts.xml" name="lvl.floor?floor=1" />
</act>
</levels>

And I think your map should work.

Zukamimozu

  • Posts: 4
  • Maggot Crusher.
    • View Profile
Re: Custom Map crashes on Launch
« Reply #6 on: August 18, 2014, 05:11:44 PM »
Thanks so much!

BTW There was another level start if you went to the top left where the door is then went all the way to the left but it wasn't the right one.