wghost81 Posted February 5, 2014 Share Posted February 5, 2014 I have completed preliminary work on dynamic pods placement and have some results I can share with others to test: https://drive.google.com/file/d/0B5MAcyqYBx4dQ3ZaMzdWM0F0M3M/edit?usp=sharing What I've done so far: 1. Added 5x5 uniform grid of new dynamic pods. 2. Sorted all the pods by distance from player start. 3. Removed pods which are in sight radius of player squad at start location. 4. Divided all available pods set to iNumPods subsets, picked a random pod from each subset and removed the rest. 5. Kept Commander/Secondary location info by assigning corresponding flag to all pods within a set, which contains Commander/Secondary pod. It works fine, but commanders sometimes end up outside a UFO: http://i.imgur.com/PNTt9r3.jpg EXALT missions now can actually have more than 2 pods: http://i.imgur.com/xaegxcM.jpg Known problems: 1. Need to check for Covert Operative location for EXALT missions and spawn EXALT pods not only outside main squad sight radius, but also outside Covert Operative sight radius. 2. By default dynamic pods won't play activation animation. Someone may see this as a good thing, though. :smile: 3. Dividing sorted set of pods by subsets based on distance may spawn all the pods in one direction towards player start. I.e. pods are not distributed uniformly around the map. They shouldn't spawn on top of each other, that's what all that subsets thing is for, but they still may spawn close enough. 4. Commanders may end up outside UFO. 5. UFO patrols won't work, as patrol routes are defined for each "placeholder" pod specifically. I haven't checked scripted missions, like DLC and alien base assault. They may cause trouble, but I can exclude those specifically from new dynamic pods code. Now about pods distribution. I can make a grid and spawn a pod at random point inside that grid element. I can even try to get rid of pre-defined pods completely and check for terror pods and UFO "building" using mission info and layout data to set commander/terror pods dynamically. Question is: what's better? If player knows all pods are distributed uniformly around the map, it will be a huge clue to determine a pod location. But possibly having all pods in one map sector can lead to a group activation, which will be deadly. And about patrol routes. Abduction pods don't have any, but they still wander randomly around the map and react to sound clues. I want to implement this mechanics for all the pods: abduction, UFO, terror and special (council and exalt). Say, each will have 50% chance to go to patrol state. It will make tactical situation even more unpredictable, thus increase replayability. Opinions? Suggestions? Link to comment Share on other sites More sharing options...
Hobbes77 Posted February 5, 2014 Share Posted February 5, 2014 I need to think a little bit about everything posted here but this sure sounds interesting. I think having all pods distributed uniformly over the map isn't the best solution for the reasons you mention. I don't really mind an occasional mass activation since it can already happen in a couple of UFO maps, if you start in certain DZs. Something popped into my mind though: what about additional Deployment Zones for XCOM? Would it be possible? Link to comment Share on other sites More sharing options...
wghost81 Posted February 5, 2014 Author Share Posted February 5, 2014 Something popped into my mind though: what about additional Deployment Zones for XCOM? Would it be possible?Yes, I was thinking about it too. :smile: It is theoretically possible and I intend to look into this after I complete my work on dynamic alien pods. Link to comment Share on other sites More sharing options...
wghost81 Posted February 5, 2014 Author Share Posted February 5, 2014 I've implemented Covert Operative sight range check and now I know why there are only 2 pods on EXALT maps. :smile: All the pods end up packed close together in the narrow space between main squad and operative. http://i.imgur.com/n8mROIn.jpg I've increased grid size to 10x10 and made two versions: with sorting by distance and completely random. Sorting: https://drive.google.com/file/d/0B5MAcyqYBx4dODNPQUU3UElwS2c/edit?usp=sharing Random: https://drive.google.com/file/d/0B5MAcyqYBx4dMkhhTzJFR19va3c/edit?usp=sharing In both cases pods still may end up close, but with sorting it is less possible to have all the pods clustered together. Sorting method obviously needs some improvement. I can pick only central N pods from each subset to make clustering less possible. Or I can try and sort pods not by distance, but by angle, so each pod will end up in separate sector, but at the random distance. Pods can still end up pretty close but with sectors they will be distributed more uniformly around the map. And, of course, random patrols will make this picture even more random, as all the pods will wander in different directions most of the time. Link to comment Share on other sites More sharing options...
wghost81 Posted February 6, 2014 Author Share Posted February 6, 2014 I did some test and found that patrols are in fact working as the game is able to add them dynamically. I've played with some settings and came to the version I decided to upload to nexus for testing: http://www.nexusmods.com/xcom/mods/470 Technical info: - This version creates 6x6 grid of 36 dynamic pods in addition to pre-placed pods, uses range-based sorting, aliens spawn out of squad and covert operative LOS. - Abduction, UFO and EXALT pods should patrol randomly, Council missions pods will be stationary. - Commanders may spawn outside UFO, but near it anyway. - Some special missions, like Chryssalid Hive or DLC missions, may end up having "unexpected" types of aliens. - EXALT missions will actually have 3-4 pods on maps. - Does not affect alien waves or drop-downs. Known issues: - Aliens may end up in weird places on some complex terrain (like Battleship), but they will be warped to nearby valid location in their turn anyway. My next step is to figure out how to enable dynamic patrolling for Council missions. Link to comment Share on other sites More sharing options...
wghost81 Posted February 7, 2014 Author Share Posted February 7, 2014 I've suddenly realized, that with random pods almost all the maps can be reused for abductions/terror. Uploaded a modified DefaultMaps.ini to the nexus mod files section. Link to comment Share on other sites More sharing options...
wghost81 Posted February 10, 2014 Author Share Posted February 10, 2014 I've been playing a campaign with beta4 for a while and everything seems good. Abductions and UFO are perfect, as random placement + patrols create a totally unpredictable situation. Sneaking around map edge is a bad strategy now. :smile: And having outsiders out of their usual place makes capturing them real fun. Council missions are less successful. I haven't been able to force random patrols for those. :sad: Vandorn mission was terrible and now it's even worse: http://i.imgur.com/2ErtgZ4.jpg Pods tend to spawn down there and activate simultaneously. And general ends up right in the middle. :smile: I was able to win the mission (used rockets and grenades, poisoned VanDorn, but cured him :smile:, but it was a real pain. Reused maps are fun to play too. :smile: Link to comment Share on other sites More sharing options...
tsanford01 Posted March 8, 2014 Share Posted March 8, 2014 Has anyone got this working with the latest update 401776? Link to comment Share on other sites More sharing options...
wghost81 Posted March 9, 2014 Author Share Posted March 9, 2014 (edited) Everyone :smile: http://www.nexusmods.com/xcom/mods/470 Edited March 9, 2014 by wghost81 Link to comment Share on other sites More sharing options...
wghost81 Posted March 12, 2014 Author Share Posted March 12, 2014 Some progress notes. :smile: I've completely redone pods placement algorithm. It works much better now. :smile: I was also able to rearrange function calls, so layout is calculated before pod placement. This means, now I can get UFO coordinates and place Commanders randomly inside UFO (working on it). I will also put an explicit check for Alien Base Assault and Overseer UFO missions. These two will use original spawn points for Commanders, as randomization breaks map design here. VanDorn map still gives me a headache. To reliably avoid spawns inside player's starting LOS range, I had to deny any spawns at all inside insane 32 tiles radius around the starting point. And VanDorn map has 19x67 size in tiles. So it is not surprising that all spawns are grouping at the farthest end near poor VanDorn. Things look much better on other maps. But still, it would be even much better if patrols were allowed for Council missions. I wasn't able to find it and, frankly, I've given up on this. I definitely need help here. Link to comment Share on other sites More sharing options...
Recommended Posts