Posted: Sat Sep 07, 2024 2:08 am Post subject:
Another crash in WAE
Subject description: Message: The given key '502' was not present in the dictionary.
Code:
07.09. 10:00:46.381 World-Altering Editor (WorldAlteringEditor, Version=1.0.9014.24753, Culture=neutral, PublicKeyToken=null)
07.09. 10:00:46.381 Release version: 1.1.7
07.09. 10:00:46.381 Unhandled exception! @ 10:00:46
07.09. 10:00:46.381 Message: The given key '502' was not present in the dictionary.
07.09. 10:00:46.389 Stack trace: at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at TSMapEditor.Models.Trigger.ParseConditions(String data, EditorConfig editorConfig) in D:\a\WorldAlteringEditor\WorldAlteringEditor\src\TSMapEditor\Models\Trigger.cs:line 210
at TSMapEditor.Initialization.MapLoader.ReadTriggers(IMap map, IniFile mapIni) in D:\a\WorldAlteringEditor\WorldAlteringEditor\src\TSMapEditor\Initialization\MapLoader.cs:line 805
at TSMapEditor.Models.Map.LoadExisting(GameConfigINIFiles gameConfigINIFiles, IniFile mapIni) in D:\a\WorldAlteringEditor\WorldAlteringEditor\src\TSMapEditor\Models\Map.cs:line 257
at TSMapEditor.UI.Windows.MainMenuWindows.MapSetup.InitializeMap(String gameDirectory, Boolean createNew, String existingMapPath, CreateNewMapEventArgs newMapParameters, WindowManager windowManager) in D:\a\WorldAlteringEditor\WorldAlteringEditor\src\TSMapEditor\UI\Windows\MainMenuWindows\MapSetup.cs:line 63
at TSMapEditor.UI.UIManager.LoadMap() in D:\a\WorldAlteringEditor\WorldAlteringEditor\src\TSMapEditor\UI\UIManager.cs:line 437
at TSMapEditor.UI.UIManager.Update(GameTime gameTime) in D:\a\WorldAlteringEditor\WorldAlteringEditor\src\TSMapEditor\UI\UIManager.cs:line 708
at Rampastring.XNAUI.WindowManager.Update(GameTime gameTime)
at Microsoft.Xna.Framework.Game.SortingFilteringCollection`1.ForEachFilteredItem[TUserData](Action`2 action, TUserData userData)
at Microsoft.Xna.Framework.Game.DoUpdate(GameTime gameTime)
at Microsoft.Xna.Framework.Game.Tick()
at System.Windows.Forms.Application.ThreadContext.Microsoft.Office.IMsoComponent.FDoIdle(msoidlef grfidlef)
at System.Windows.Forms.Application.ComponentManager.Microsoft.Office.IMsoComponentManager.FPushMessageLoop(UIntPtr dwComponentID, msoloop uReason, Void* pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(msoloop reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(msoloop reason, ApplicationContext context)
at MonoGame.Framework.WinFormsGameWindow.RunLoop()
at MonoGame.Framework.WinFormsGamePlatform.RunLoop()
at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior)
at Microsoft.Xna.Framework.Game.Run()
at TSMapEditor.Program.Main(String[] args) in D:\a\WorldAlteringEditor\WorldAlteringEditor\src\TSMapEditor\Program.cs:line 26
I've tried from different maps I've created and the ones that get the error are 'keys' 82, 502, and 503.
Where is the dictionary the error is referring to? QUICK_EDIT
WAE currently doesn't come with Phobos support. So any higher numbers used in maps for triggers/scripts and not defined in the WAE config could result in this. QUICK_EDIT
Can I add the new Phobos scripts and triggers or would that still cause an error? Because you said Phobos wasn't supported,
I don't know if you meant that there are no Phobos script/triggers added or the actual Phobos files like the ones downloaded from the Phobos site are not read by WAE.
I wouldn't mind adding them, and also how do I distinguish between script or trigger when an error occur? QUICK_EDIT
WAE doesn't read Phobos files. WAE config files have to be updated. It currently supports arbitrary high numbers in triggers but not in scripts. So, in config of Actions.ini or Events.ini, you should be able to use Index=500 etc. as part of the Ares/Phobos section definitions. Also you may not have support for new parameter types so have to use existing ones like Numbers/Text. Without Index= support you can't add like Index=10000 in ScriptActions.ini.
To differentiate, the crash log says Trigger.cs, so thats the clue.
I have seen Phobos stuff added to a WAE version that comes Project Phantom mod that was released yesterday, probably you could refer it. QUICK_EDIT
Right, it is read by the game and the editor is for adding stuff to call in the game. But I don't understand why WAE is different from FA2sp. In FA2sp you could add your own parameters and it wouldn't crash the editor but in WAE it does.
Event "77 Super Weapon Activated Near Waypoint" crashes WAE because of the "SuperWeaponID" parameter, because WAE doesn't have it and can't be added in unlike FA2sp.
If WAE doesn't read Phobos files, then shouldn't it be allowed to have as many parameters added like FA2sp? If your wondering what happens when I add new parameters FA2sp.
It doesn't crash the map editor but the game does crash because the parameters I added doesn't make sense in the game and it was one of the parameters from the Events Phobos added that I changed
Looking at the Project Phantom files for WAE they don't have the local variables stuff for the Event in Trigger which was what was causing the crash for my maps.
I want to still use the local variable events Phobos added so I might just wait for WAE to be updated for Phobos support.
Thanks for the help a lot! I would've a TON of time adding everything then at the end not having my problem fixed anyways.
The parameter stuff you said was good to know since it's probably the same reason why Project Phantom also doesn't have it in their editor. QUICK_EDIT
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum