Jape Posted August 26 Share Posted August 26 I like to make big quests. However, I have noticed an issue when I reach certain numbers of entities/monsters in a quest and I want to see if I can identify what causes this limit to be reached or this issue to occur as it seems to differ with each occurrence. In more detail: The issue is that when a certain number of entities(NPC's, Monsters, Objects, etc) are placed in a quest then saved, the quest becomes "corrupted" and the entities fail to load on the floor that reaches this limit, and that is true for all waves on that floor. However, this limit seems to vary based on the entities placed and it seems that some entities 'cost' more towards this limit than others, and some less. Examples: My original quest where I hit this limit I found that I was able to place around a total of 1,780 monsters. Though there were many more entities in this quest than that number, I just haven't counted all the doors, boxes and triggers, and this count spanned multiple floors(Pioneer 2, Forest 2, Caves 3, Mines 3, Ruins 3, and the bosses associated). If I ever exceeded this count the waves on the floor that exceeded this count would never spawn. In a testing quest where I have removed all entities from all floors, before placing nothing but rappies in Forest 1 to test, I fount that for some reason I was only able to place 1,448 rappies. This is significantly lower than the total entity count of my first quest and I am not sure why or what values contribute to this 'limit', as the above quest contains a variety of entities where this testing quest is nothing but rappies... Why I am posting here is in hopes of answering the question of, "What is the entity limit for a quest? And what are to contributing factors for hitting this limit?", so that others, myself included, can reference this limit. So any input would really be great in helping identify this "entity limit" and what is causing the monsters to fail to spawn in when the only changes made to a quest is the number of entities, and not their event triggers. Technical Details: Running a TethVer12513 client for all tests. Editing quests using Phantasmal World, self hosted.(No differences found in entity limits when compiling in PW vs QEdit) Using server software Newserv, same device that runs the client. My current, mostly uneducated theories: Most likely hitting some kind of 32-bit limit of sorts, this is more of an overarching theory for the rest as I am pretty sure this is the case... Limit caused by entity models, this one is unlikely I think as when hitting what I would call the "On-screen entity limit" I found the Teth client crashes to desktop instead of no waves spawning. Limit caused by entity code, or some sort of code that the game uses to keep track of counts for the floor maybe? Though I am unsure on this point, even though I have seen issues where the game can have its memory values overflow into weird spaces(I have found that too many monests can cause random values to be flowed into Monster status effects and HP) Possible server side limit, maybe the servers I have access to, Tethealla and Newserv, are unable to serve the stream of data to the client in a complete packet? This is however at the edge of my current knowledge of server-client technical knowledge though as I have only done work on non-game servers for most of my learning. Quote Link to comment Share on other sites More sharing options...
Ender Posted August 30 Share Posted August 30 Maximum number of initialization enemies in a quest is 0x5a8 = 1448. The way this works is a bit odd. If a single floor will go beyond the limit, the game will ignore all enemies for that floor and go on to the next floor. This is the number of 'initialization monsters' which matches the list you see in Qedit, meaning that a "Canune" costs only 1 even though it will create multiple entities at runtime. Maximum number of objects in a quest is 0xba0 = 2976. Similar oddity as the max number of enemies. Map events are harder to put a limit on. The game allocates a 32KB chunk of memory and uses it for map events and their clear events. The map event table for the floor is copied in directly, including the header. There are also tables 4 and 5 which are used in ep1 challenge only on a vanilla client but leaving them out of this post. Those are limits just for loading the .dat into memory. There are also runtime limits. There's a limit of 652 entities active at any time, where entities includes basically any object with with collision or interaction. This limit is probably supposed to be a little lower--652 is just the number of elements that can fit in the data area before it overwrites the next symbol and guarantees a crash. This limit includes enemies, players, items on the ground, and even some objects in the map's geometry like the little plants in Subterranean Desert 2. If you run War of Limits 4 and every enemy drops an item, and if the host is on Pioneer 2 so that they don't perform the 50 item limit cleanup, then you'll 100% crash a few rooms before the end. The game 'remembers' information about 0xb50 = 2896 enemies/npcs and 0xba0 = 2976 objects. This information includes clones for enemies, so a quest near the 1448 limit could hit this with the clones from bosses and other enemies factored in. There are also other issues with quests that have this many monsters per floor. Photon Blasts can crash with too many targets in a chain (never investigated the details). The game will remember only 192 item boxes on a floor which can lead to disconnects if other players drop & pickup items when your client's 'stored item list' for that floor is already full. Certain techniques will hit their max number of entities, which isn't really a huge problem but it allows things like Gifoie to hit enemies on every single frame and instantly kill most things. 3 Quote Link to comment Share on other sites More sharing options...
Jape Posted August 30 Author Share Posted August 30 Thanks a bunch for this detailed explanation! Though I think I might be encountering some contradictions? But this might just be me not fully understanding the definitions for some of the details. As I took the test quest with many rappies in Forest 1, I removed 9 of them from Forest 1 so that the total for the floor would be 1440, then I placed 9 rappies on the floor for Forest 2 and the rappies in Forest 1 now load in, but the 9 rappies in Forest 2 fail. I may however be misunderstanding 'initialization monsters', would this be any monsters not loaded by the event handler, or monsters in wave 0?(as I may be causing myself more problems by using wave 0 in my testing, probably >.<) Another thing that comes to mind is I may have an incorrect definition on what a 'floor' is. I have come to the understanding that a floor is one map, like Forest 1, but is my definition incorrect and a floor is actually defined as an 'area' of sorts?(ex. a floor is actually Forest 1, 2 and the dragon's den?) Since this might explain why placing 1440 monsters in Forest 1, then 9 monsters in Forest 2 is causing the monsters in Forest 2 to not load. Let me know what I am missing here, in the meantime I will of course be testing the above further to see if I can't answer my questions before you can, hehe. And thanks again for the in-depth explanation as this has given me more avenues of testing, and my next move is to take all of the monsters in my testing quest and put them into actual waves to see if I get the same results or not. Quote Link to comment Share on other sites More sharing options...
Ender Posted August 30 Share Posted August 30 1 hour ago, Jape said: Though I think I might be encountering some contradictions? But this might just be me not fully understanding the definitions for some of the details. As I took the test quest with many rappies in Forest 1, I removed 9 of them from Forest 1 so that the total for the floor would be 1440, then I placed 9 rappies on the floor for Forest 2 and the rappies in Forest 1 now load in, but the 9 rappies in Forest 2 fail. No, that's expected. The client has a list that has room for 1448 total for the quest. It tracks the total amount used when adding monsters. Monsters are added on a floor by floor basis. The .dat file in a quest is actually concatenated tables, where each table specifies which floor it's for. If the monsters for a floor won't fit, they won't be added in client memory, but the game will still continue parsing the .dat and try to load them (might be mistaken about it continuing to load things after, but honestly this is such unexpected behavior and your server needs to know about these limits or else monster IDs will be out of sync between client and server). If you have 3 NPCs on Pioneer 2 and then 1446 NPCs/Monsters in Forest 1, Pioneer 2 will load its NPCs but Forest 1 will not. 1 hour ago, Jape said: I may however be misunderstanding 'initialization monsters', would this be any monsters not loaded by the event handler, or monsters in wave 0?(as I may be causing myself more problems by using wave 0 in my testing, probably >.<) "Initialization monsters" => the things you see in the NPC/Monsters list in Qedit. NPCs and monsters are the same in quest files. Nothing to do with waves. 1 hour ago, Jape said: Another thing that comes to mind is I may have an incorrect definition on what a 'floor' is. I have come to the understanding that a floor is one map, like Forest 1, but is my definition incorrect and a floor is actually defined as an 'area' of sorts?(ex. a floor is actually Forest 1, 2 and the dragon's den?) Since this might explain why placing 1440 monsters in Forest 1, then 9 monsters in Forest 2 is causing the monsters in Forest 2 to not load. Let me know what I am missing here, in the meantime I will of course be testing the above further to see if I can't answer my questions before you can, hehe. And thanks again for the in-depth explanation as this has given me more avenues of testing, and my next move is to take all of the monsters in my testing quest and put them into actual waves to see if I get the same results or not. A floor is just a single map. Mop-up Operation #1 uses floors 0 and 1, designated as Pioneer 2 and Forest 1 respectively. Towards the Future uses floors 0, 2, 5, 7, 10, 11, 12, 13, 14 (and also 8 for the Striker of Chao conversion). These are designated as their standard maps. Areas/maps are imo interchangeable but I know some players say things like "Forest area" to mean "Forest 1 and Forest 2." A quest can have multiple floors using the same or different areas. Challenge Stage 9 in Episode 1 uses floors 1 to 5, each designated as Ruins 3 area, with different map variations, and also uses floor 14 for Falz. 1 Quote Link to comment Share on other sites More sharing options...
Jape Posted August 31 Author Share Posted August 31 Oh! I see where I got confused, so the limit of 1448 should be "per quest", but for the example of my first quest I was just "getting lucky" and somehow the game is still loading the monsters past the limit of 1448. Darn,but good to know! Also, sorry for the confusion. I have not been using QEdit for years and have been editing quests using Phantasmal World, so I was not able to recall the name of the list. Thanks for the help, I'll be planning to stick to the 1448 limit for any future quests! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.