Hobbes77 Posted October 28, 2013 Share Posted October 28, 2013 Amineri, maybe you can sort this enigma: I made the UFOPaedia page listing the maps based on the DefaultMaps.ini file and there's 1 map, HighwayFallen, that appears listed both as a Terror Site and as a Council Mission (Extract General Van Doorn) but I've never ever played it on the regular game as a Terror Site over 1000 hours of gameplay. But it is playable as a Terror Site on the Developer's Skirmish mode. Could this be a bug? Link to comment Share on other sites More sharing options...
Amineri Posted October 28, 2013 Author Share Posted October 28, 2013 (edited) That's a really good question. Looking through my DefaultMaps.ini, I also see a few more configured terror site maps that I've never seen in rotation:DisplayName="URB_Bar_Terror (Art Placement Complete Urban Bar Terror)",DisplayName="URB_CommercialStreet_Terror (Art Placement Commercial Street Terror)", DisplayName="URB_ConvenienceStore_Terror (Art Placement Convenience Store Terror)", DisplayName="URB_StreetHurricane_Terror (Art Placement Complete Street Terror)", Most of the abduction/terror map display names have notes indicating : Beta/Functionality Complete The Highway Fallen terror map has display name : DisplayName="URB_HighwayFallen (Beta Complete Highway Fallen)", So, I'm guessing that the Highway Fallen terror map was in beta testing at release, and so was not activated (and wasn't ever completed in EU, apparently). The other four possible terror maps only had the art assets placed and hadn't even been beta tested. The odd thing is that the 'bInRotation' flag isn't being used in the config file to disable these maps -- I'm not sure how they are prevented from being selected. I guess if they'd had time to finish testing the Highway Fallen map, and to beta test/finish test the other four maps then there might be five more terror maps in rotation. Although it's also possible that some of the maps were scrapped due to balance reason (a terror mission on Street Hurricane sounds particularly nasty). The upks for all of these maps were released (are in the CookedPCConsole folder). Offhand the only way I can think of enabling the maps would be to completely rewrite the native function 'GetRandomMapDisplayName' in the upk. The tricky part about this is that the map config data is in XComMapManager, which mostly consists of native functions, and the few non-native functions all appear to be needed. Some other possibilities :Perhaps the native code searches for keywords in the displayname (e.g. Beta/Functionality Complete) -- at least for abduction/terrorMost Terror maps have a special terror version appended with _terror, but HighwayFallen doesn't.Perhaps the URB_HighwayFallen MapFamily is hard-coded to be disallowed for abduction/terror missions. Edited October 28, 2013 by Amineri Link to comment Share on other sites More sharing options...
Hobbes77 Posted October 29, 2013 Share Posted October 29, 2013 That's a really good question. Looking through my DefaultMaps.ini, I also see a few more configured terror site maps that I've never seen in rotation:DisplayName="URB_Bar_Terror (Art Placement Complete Urban Bar Terror)",DisplayName="URB_CommercialStreet_Terror (Art Placement Commercial Street Terror)",DisplayName="URB_ConvenienceStore_Terror (Art Placement Convenience Store Terror)",DisplayName="URB_StreetHurricane_Terror (Art Placement Complete Street Terror)", Most of the abduction/terror map display names have notes indicating : Beta/Functionality Complete The Highway Fallen terror map has display name : DisplayName="URB_HighwayFallen (Beta Complete Highway Fallen)", So, I'm guessing that the Highway Fallen terror map was in beta testing at release, and so was not activated (and wasn't ever completed in EU, apparently). The other four possible terror maps only had the art assets placed and hadn't even been beta tested. The odd thing is that the 'bInRotation' flag isn't being used in the config file to disable these maps -- I'm not sure how they are prevented from being selected. I guess if they'd had time to finish testing the Highway Fallen map, and to beta test/finish test the other four maps then there might be five more terror maps in rotation. Although it's also possible that some of the maps were scrapped due to balance reason (a terror mission on Street Hurricane sounds particularly nasty). The upks for all of these maps were released (are in the CookedPCConsole folder). Offhand the only way I can think of enabling the maps would be to completely rewrite the native function 'GetRandomMapDisplayName' in the upk. The tricky part about this is that the map config data is in XComMapManager, which mostly consists of native functions, and the few non-native functions all appear to be needed. Some other possibilities :Perhaps the native code searches for keywords in the displayname (e.g. Beta/Functionality Complete) -- at least for abduction/terrorMost Terror maps have a special terror version appended with _terror, but HighwayFallen doesn't.Perhaps the URB_HighwayFallen MapFamily is hard-coded to be disallowed for abduction/terror missions. The Bar Terror, ConvenienceStore Terror, CommercialAlley Terror and StreetHurricane Terror can appear in the game. They are rare to appear - took me hundreds of hours until I finally played the StreetHurricane, for instance - but they can be played. The thing is that the game seems to memorize maps that already appeared and prioritize maps who haven't been used in a playthrough,. Since those maps have also Abduction versions and the usual 4 Terror maps don't have Abduction versions (Police Station, Highway1, MIlitaryAmmo and CommercialRestaurant), it is more likely that you'll run into the 4 last ones during Terror missions since the first are pretty common during Abductions. I eventually managed to play those 4 maps after hundreds of hours and confirm that they are used for Terror missions but HighwayFallen has never appeared, even if it is present and playable on the Skirmish mode. There must be some other place on the game files where map selection is defined. Also, the DefaultMaps entries also have regional settings that don't seem to be used like: ERegion=eMissionRegion_NorthAmericaERegion=eMissionRegion_AsiaERegion=eMissionRegion_Europe I've tried seeing if those maps where only used in missions on countries on those regions but they don't seem to work. Link to comment Share on other sites More sharing options...
Amineri Posted October 29, 2013 Author Share Posted October 29, 2013 Another option you might try is setting bUseInRotation=false for most of the terror/abduction maps to try and force certain maps into rotation. I've verified that just changing the DefaultMaps.ini in the main XCOM folder will cause the XComMaps.ini merged file in the My Games folder to auto-update when the game is first run, so you should only have to change the settings in the one place. I'm trying to verify this but have run into some other strange crashing bug that I need to resolve first. My first suspicion about why the combined abduction/terror maps don't show up that often is the MapFamily setting in the map config file. For the five maps that have both terror and abduction variants (URB_Bar, URB_CommercialAlley, URB_CommercialStreet, URB_ConvenienceStore, and URB_StreetHurricane), both the abduction and terror variants belong to the same MapFamily. The four 'usual' terror maps have only the terror map in the MapFamily. This is real shame because it cuts down the likely terror mission maps from 9 to only 4. With the addition of the Fallen Highway map there could be 10 terror maps, effectively 2.5x the number people typically see. Will have to wait and see what Firaxis has done with the randomized map selection/rotation in EW. The trick here is that a truly random map selection wouldn't work. Early iPods had a truly random shuffle and people complained because a true random selection will throw up occasional streaks. New randomizers don't use fully independent random samples but instead build more sophisticated conditional probability tables. I wonder if the possible MapFamily values are hard-coded into the native code, or if they are dynamically built based on the values in the map config file. If dynamically built it would be possible to create new MapFamily categories for the terror missions which should make them appear more often. (e.g. would be MapFamily URB_Bar and URB_Bar_Terror) Link to comment Share on other sites More sharing options...
Amineri Posted October 29, 2013 Author Share Posted October 29, 2013 (edited) I tested the bInRotation flag by setting bInRotation=false for every abduction mission except URB_Bar in a vanilla version of the game, but it appeared to have no effect. I rolled up 2 abduction missions, and neither of them was the URB_Bar map. I still find it interesting that the council mission maps all have bInRotation=false. Maybe from a pre-release build? EDIT: Completely removing a line from the DefaultMap.ini file will prevent the map from loading. I removed all abduction map config lines except for the URB_Bar map, and two consecutive abduction mission draws both pulled up the URB_Bar map. Following the same idea, commenting out a line (preceding it with ';') will also prevent the map from being used. Edited October 29, 2013 by Amineri Link to comment Share on other sites More sharing options...
dubiousintent Posted December 17, 2013 Share Posted December 17, 2013 A summary of this thread has been published as wiki article 'Maps - XCOM:EU 2012'. If you have developed further information, please consider contributing to the article. -Dubious- Link to comment Share on other sites More sharing options...
wghost81 Posted January 19, 2014 Share Posted January 19, 2014 (edited) Since I'm knee deep in maps right now, I will be updating related wiki articles and post additional info here. Posted some info on soldiers deployment here: http://wiki.tesnexus.com/index.php/Units_deployment_-_XCOM:EU_2012 I made another utility which is similar to Gildor's package extractor: it can batch-deserialize packages and organize text output in package extractor's manner. I will release this utility after some more testing, as it is very heuristics and sometimes crashes on unknown objects. PS: I don't know how to better organize this info on wiki, as it is now turns into map archetype objects description. May be it needs a different sub-section in Maps? Edited January 19, 2014 by wghost81 Link to comment Share on other sites More sharing options...
dubiousintent Posted January 19, 2014 Share Posted January 19, 2014 (edited) Since I'm knee deep in maps right now, I will be updating related wiki articles and post additional info here. Posted some info on soldiers deployment here: http://wiki.tesnexus.com/index.php/Units_deployment_-_XCOM:EU_2012 I made another utility which is similar to Gildor's package extractor: it can batch-deserialize packages and organize text output in package extractor's manner. I will release this utility after some more testing, as it is very heuristics and sometimes crashes on unknown objects. PS: I don't know how to better organize this info on wiki, as it is now turns into map archetype objects description. May be it needs a different sub-section in Maps?Organization is pretty much however the author thinks best presents the material in a coherent manner. Feel free to create new subsections as needed. That's easier than creating new pages, as we have to be careful with those since only the moderators can delete them by request (and have better things to do). If later on we think it belongs on it's own page, it's easy to split off. -Dubious Edited January 19, 2014 by dubiousintent Link to comment Share on other sites More sharing options...
wghost81 Posted January 20, 2014 Share Posted January 20, 2014 (edited) Wiki system drives me crazy. :sad: I realize how important such information source as wiki is, I used it myself as a starting point, but, God!, it is very different from forum posting. dubiousintent, I'm really-really-really appreciate your work on turning forum posts into wiki articles. It's not an easy task, I understand it now. I'll try to learn more about writing wiki articles, but to save time I will start posting my research data here. Now, more info about XGDeployAI class. XGDeployAIThis class is used to deploy all units on tactical map. Main deployment function is DeployPods:function array<TAlienSpawn> DeployPods(out TAlienSquad kAlienSquad) { m_kSquad = kAlienSquad; SetDeploymentFlags(); GetPlayerStart(); GetPossibleSpawns(); DeployMissionCommander(); DeploySecondaryAliens(); DeploySoldiers(); DeployHunters(); DeployRoaming(); return m_arrDeployments; //return ReturnValue; } It takes kAlienSquad as an input, calculates Deployment Flags, sets Player Start Location, gets Possible Spawn Points from map package and deploys all aliens. Deployment FlagsDeployment order is determined by Deployment Flags:enum EDeploymentFlags { eDeploy_Random, eDeploy_ClosestFirst, eDeploy_FurthestFirst, eDeploy_Custom, eDeploy_MAX }; For Council Missions SetDeploymentFlags function sets eDeploy_FurthestFirst flag, for Abductions is sets eDeploy_ClosestFirst flag if there are 2 or less pods in Alien Squad and eDeploy_Random if there are 3 or more pods. For every other case Deployment Flags are set to eDeploy_Random. Possible Spawn PointsPossible Spawn Points are extracted directly from map packages by GetPossibleSpawns function: it requests WorldInfo for AllActors of XComAlienPod class (question: do subclasses get counted too, as they are of XComAlienPod class too?) and places it into an array. Function then checks if pod is enabled (via bUse property, more info in XComAlienPod format description) and in Group0 and deletes the pod from array of possible pods if not. Function then sorts Possible Spawns by distance from Player Start (more info on Player Start later), so closest Spawn Points are moved to array begin and furthest - to array end. DeployMissionCommanderThis function finds all Commander Pods (pods of type=1) in Alien Squad, requests for Possible Commander Spawns by calling GetPossibleCommanderSpawns function and places a pod randomly on one of the Possible Commander Spawns location by calling BuildSpawn fucntion. GetPossibleCommanderSpawnsThis function iterates through all Possible Spawn Points and returns an array of points marked as Commander Spawn (via bCommanderPod property, more info on it in XComAlienPod class). If no specific Commander Spawns exist, it returns farthest point of the array of Possible Spaws. BuildSpawnPlaces a pod on a specified Possible Spawn point and removes this point from array of Possible Spaws. DeploySecondaryAliens function works the same way, but checks for Secondary pods (Type=2), requests specific Secondary Spaws first and returns a random spawn from array of Possible Spaws if none are found. DeploySoldiers function deploys Soldier Pods (Type=0) in according with Deployment Flags. It calls for GetPossibleSoldierSpawns function and places a pod in first spawn points if eDeploy_ClosestFirst flag is set, on last spawn point if eDeploy_FurthestFirst is set and on random spawn point from the array of Possible Spawns otherwise. GetPossibleSoldierSpawns works similar to GetPossibleCommanderSpawns, but returns a closest spawn point if all the remaining Possible Spaws are of Commander or Secondary type. DeployRoamingThis function does not deploy the aliens, but triggers a global event SeqEvent_RoamingAlienNumberSet instead, which sets iNumAliens variable to iNumDynamicAliens value, defined in Alien Squad. Dynamic aliens are used in Council Missions for handling ThinMan (and other aliens in DLC) drop-downs. EXALT maps use XCOMWaveSystem instead. DeployHuntersThis function does nothing. XGDeployAI SummaryUnits positions on map are defined per map individually inside map packages.Player Start is determined first, then all the other positions are sorted relatively to that one.Maximum number of pods per map are determined via number of XComAlienPod objects, defined in that map.Any pod can be placed on any position, placement priority is determined via XComAlienPod type first and specific functions second.Only Soldier pods use Deployment Flags info.Roaming (i.e. dynamic) aliens are deployed via trigger events (Council Missions) or wave system (EXALT Missions). Edited January 20, 2014 by wghost81 Link to comment Share on other sites More sharing options...
dubiousintent Posted January 20, 2014 Share Posted January 20, 2014 (edited) Wiki system drives me crazy. :sad: I realize how important such information source as wiki is, I used it myself as a starting point, but, God!, it is very different from forum posting. dubiousintent, I'm really-really-really appreciate your work on turning forum posts into wiki articles. It's not an easy task, I understand it now. I'll try to learn more about writing wiki articles, but to save time I will start posting my research data here....That's okay, creating wiki pages is something I CAN do, whereas code-diving C & C++ is outside of my skill set. Better for all if you focus on getting the information out there in any form. Just, please review the wiki articles for accuracy. I do some minor editorial tweaking as I realize English is not your native language (though it's really very, very good). This latest material has been added to the 'Units deployment - XCOM:EU 2012' article as a new section. -Dubious- Edited January 20, 2014 by dubiousintent Link to comment Share on other sites More sharing options...
Recommended Posts