Zveroboy1 Posted February 12, 2019 Share Posted February 12, 2019 (edited) I am trying to create a scenario for SF2 where anti personal mines are placed randomly on the map each time you play. But I am having an issue where they seem to all get clustered in a strange way and don't seem to take into account the areas I have painted on the map. I assign them to an AI group (not group 1), make sure they are inside a valid set up zone in the editor and deployed in an area I have painted on the map. In order to test this further, I created a map divided into squares each with a different terrain type. I play the battle, wait a turn or two then hit cease fire and examine the map. They refuse to go in marsh, mud, light forest. Marsh and mud I can maybe understand but light forest? When I do this, they all migrate to the dirt square at the bottom left. But what's even stranger is when I add a green grass square in the centre of the map. They all stop being placed on the dirt square entirely and all go in the grass square instead. AI plan : set up in the editor : the result after I cease fire : Okay there is one in light forest.... but I ran this test half a dozen times and it doesn't really get much different than this. So is there something I am doing wrong here? And is there a way to trick the game into having a more random placement? I wish the game would simply count the number of painted squares, assign a number to each one of them and use rng to deploy the mines in each action square it rolls. I am probably wrong but it feels like there is some sort of code at work designed for infantry and that prioritizes the most favourable cover and a tight grouping. But that theory doesn't really work regarding light forest tiles. aaa minetest.btt Edited February 12, 2019 by Zveroboy1 0 Quote Link to comment Share on other sites More sharing options...
MarkEzra Posted February 12, 2019 Share Posted February 12, 2019 Try using a distinctive setup color for mines only... That would include the original setup area. This will force the mines to a more specific. Vary the mines by using multiple plans. 0 Quote Link to comment Share on other sites More sharing options...
Zveroboy1 Posted February 12, 2019 Author Share Posted February 12, 2019 Thanks for the suggestions. In the actual scenario mines have their own set up colour not shared by anyone else though and the painted areas are not in one big block like in the test map. They are sprinkled all over the map. but in the example below 90% of them would get on the road. 0 Quote Link to comment Share on other sites More sharing options...
MOS:96B2P Posted February 12, 2019 Share Posted February 12, 2019 4 hours ago, Zveroboy1 said: I am trying to create a scenario for SF2 where anti personal mines are placed randomly on the map each time you play. But I am having an issue where they seem to all get clustered in a strange way and don't seem to take into account the areas I have painted on the map. I assign them to an AI group (not group 1), make sure they are inside a valid set up zone in the editor and deployed in an area I have painted on the map. In testing I have done something similar with barbwire and it worked. It should also work with minefields. I think @Sgt.Squarehead has some knowledge of this (with IEDs) so I tagged him to get his attention. I'm trying to remember how I did it with the wire and then apply it to the minefields. The first step is correct: Assign the mines to any AI group except AI group #1. There are two different types of setup zones and this may be where the problem is. There is the three different colored setup zones and there are AI setup zones (located in the AI orders). I just used AI orders set up zones with multiple AI plans. So, if I remember correctly it worked like this: 10 minefields assigned to [A14] with 10 one action spot sized AI setup zones under AI plan #1. 10 minefields assigned to [A14] with 10 different one action spot sized AI setup zones under AI plan #2. And etc. Of course some of the AI setup zones can be the same between plans if you want. You could also use different mine types to mix it up even more. 6 AP minefields 3 AT minefields and 1 mixed minefield. That would keep things lively! Hope I remembered correctly. Let us know if it works. Sgt.Squarehead should be along to give additional information. 0 Quote Link to comment Share on other sites More sharing options...
Sgt.Squarehead Posted February 12, 2019 Share Posted February 12, 2019 (edited) Never tried it with mines, but with IEDs (in CM:SF1) it's more or less as you describe: Assign Triggerman and required IEDs to AI Group. Dump in corner of map. Definitely DO NOT put them in a painted 'AI Setup' area, they seem to get stuck there. I don't believe that map 'Setup Zones' have any effect on this behaviour. Now here's the odd bit.....I found you need at lest two AI plans to trigger the jump to the required location (inside a building in my experiments). I used different locations for each plan, but it might be possible to use the same locations for multiple plans (I never checked). When you run the scenario in test mode, you will see the IEDs jump to one of the locations when you click Big Red, but you will need to start a fresh game each time to see the randomisation.....@IanL discovered that the AI Plan is already selected at game start, prior to Big Red being clicked, even though the AI has not acted upon it at that point. My experiments were very much focussed on getting IEDs inside buildings, I've not looked at the wider applications of the 'dual-plan, random setup effect' on fortifications or mines.....But I probably will now. HTH (& makes sense) Edited February 12, 2019 by Sgt.Squarehead 0 Quote Link to comment Share on other sites More sharing options...
A Canadian Cat Posted February 12, 2019 Share Posted February 12, 2019 53 minutes ago, Sgt.Squarehead said: Never tried it with mines, but with IEDs (in CM:SF1) it's more or less as you describe: Assign Triggerman and required IEDs to AI Group. Dump in corner of map. Definitely DO NOT put them in a painted 'AI Setup' area, they seem to get stuck there. I don't believe that map 'Setup Zones' have any effect on this behaviour. Now here's the odd bit.....I found you need at lest two AI plans to trigger the jump to the required location (inside a building in my experiments). There is a handful of interesting tidbits there. Some playing around needs to be done I would say: Does the technique work with mines? Does it work the same in SF2 The need for two plans: that is surprising and probably not intended. If you find answers let us know. I honestly don't know when I'll get to these questions given the size of my list... 0 Quote Link to comment Share on other sites More sharing options...
Zveroboy1 Posted February 12, 2019 Author Share Posted February 12, 2019 Okay I just ran a series of quick tests and I can't get it to work the way you guys describe. I tried deleting the whole coloured set up zone in the map mode of the editor that covered all the possible minefield action spots : 1/ When I deploy the mines in the editor in painted yellow AI plan action spots, they just stay in the exact spot where I put them. 2/ When I deploy them in a corner outside of any painted yellow AI plan action spot, they stay in that corner. I have four AI plans. But what I did was first do the sprinkling for the mines then copy the plan several times. And this is not a saved game I am using. I re-launch the battle each time. 0 Quote Link to comment Share on other sites More sharing options...
Zveroboy1 Posted February 12, 2019 Author Share Posted February 12, 2019 Okay after more testing, I think you need to have a coloured painted map area otherwise it won't work. The whole map is painted with one set up colour. The mines are deployed in the editor inside the reeds square at the bottom right. plan 1 plan 2 From left to right : Top half : marsh - mud - streams Lower half : dirt - grass - light forest - reeds It can work this way, they alternatively deploy according to plan 1 or plant 2 but only in the lower half of the map. They absolutely refuse to deploy in : marsh, mud and streams. And the remaining mines, (there aren't enough action spots for all the mines in the bottom half) just stay in the reeds. I wonder if this is intentional. I mean yeah okay I am not even sure you can set up mines in mud or marshes in real life. Definitely not IEDs because they use electronic components, that's why they wrap them up in plastic bags. Mines I don't know. Streams though that's more debatable because it is an 8 X 8 m square and the stream doesn't occupy all of it obviously. But really, you can set up mines manually in these types of terrain if you want, so it is a bit weird how the game code refuses to set up mines there. I wanted to simulate some vietnam style booby traps with a grenade and a wire set up across a stream for instance, but it doesn't appear to be possible. 0 Quote Link to comment Share on other sites More sharing options...
Zveroboy1 Posted February 12, 2019 Author Share Posted February 12, 2019 Last batch of tests for the day. The method above achieves a good spread but this only works when there are as many painted action spots as there are mines. If you paint more action squares on the map in the AI plan set up screen than there are mines, we're back to square one. Out of 16 mines, I have never seen more than a couple outside of the central square in a dozen tests. And that's another thing : I thought they favoured certain types of terrain over another (well they do because they still refuse to set up in marshes, mud and streams) but I swapped the grass tile in the central square with light forest and 80% of them still deploy in the central area. So they just like being in the centre of the map I suppose. I hesitate to call this a bug, but it is a very strange behaviour. 0 Quote Link to comment Share on other sites More sharing options...
MOS:96B2P Posted February 12, 2019 Share Posted February 12, 2019 @Zveroboy1 I just did it with a quick test. I had four AP minefields in [A2]. I placed them on the map in four - one action spot AI setup zones under plan one. I then made a plan #2 with four different one spot AI setup zones. I turned AI plan #1 to: NOT USED to force plan #2 to load. I saved. Closed the editor. Loaded the scenario and played under scenario author test as RedFor. The minefields are BluFor. I observed the mines located where I had placed them for plan #1. I hit the red button and they jumped to the plan #2 locations. 1 Quote Link to comment Share on other sites More sharing options...
Zveroboy1 Posted February 12, 2019 Author Share Posted February 12, 2019 Yes you're right it can be done. But only with an equal number of mines and AI set up zones. Try to add say 20 yellow AI setup squares and see how a high proportion of them get clustered toward the centre of the map. And it is quirky the way it then refuses to set up in some terrain tiles. But this is a good workaround your method. Did you paint a map coloured setup zone though? blue/dark blue/teal And where did you deploy the mines in the editor? 0 Quote Link to comment Share on other sites More sharing options...
MOS:96B2P Posted February 12, 2019 Share Posted February 12, 2019 8 minutes ago, Zveroboy1 said: Did you paint a map coloured setup zone though? blue/dark blue/teal And where did you deploy the mines in the editor? No colored setup zones. I placed the mines on the AI plan #1 setup spots. I think you can also place them in a corner and they will jump to plan #2 from the corner just like from plan #1 0 Quote Link to comment Share on other sites More sharing options...
Zveroboy1 Posted February 12, 2019 Author Share Posted February 12, 2019 Okay thanks. I like your idea of using a mix of infantry and AT mines. This is a good idea. Even though the scenario I am working on is infantry only, this will add some more randomness to it. 0 Quote Link to comment Share on other sites More sharing options...
MOS:96B2P Posted February 12, 2019 Share Posted February 12, 2019 3 minutes ago, Zveroboy1 said: Okay thanks. I like your idea of using a mix of infantry and AT mines. This is a good idea. Even though the scenario I am working on is infantry only, this will add some more randomness to it. Good luck with your scenario my friend! 0 Quote Link to comment Share on other sites More sharing options...
Zveroboy1 Posted February 13, 2019 Author Share Posted February 13, 2019 Update : unfortunately even with this method, they refuse to get positioned in tiles with a stream. They now go in mud and even marsh action squares but not streams. So there must be something in the code that prevents it. 0 Quote Link to comment Share on other sites More sharing options...
Bulletpoint Posted February 13, 2019 Share Posted February 13, 2019 (edited) I've found similar problems when trying to make small infantry teams deploy randomly. For example, painting a random setup zone on a field along a hedgerow, the infantry will always choose to set up in the hedgerow. If there is a tree in the hedge, they will go there. I assume they get drawn towards cover, but it's a bit annoying when trying to do a variable setup that they will tend to always turn up in the same square. So, in your case with the mines, I assume there is some similar logic at play behind the scenes. The only way I found to make the deployment truly random was to make sure all the potential squares are the exact same type. Basically giving the game no choice. So if you paint 10 squares along streams, the game should be able to choose a random placement among those, but if you include a square number 11 that the game "likes" more for some reason, it will always put the mines there instead. Edited February 13, 2019 by Bulletpoint 0 Quote Link to comment Share on other sites More sharing options...
Zveroboy1 Posted February 13, 2019 Author Share Posted February 13, 2019 Yes that's exactly what is going on. I am pretty sure there is some code at work in the engine that assigns a priority to each square. For infantry it is annoying if you are trying to randomize the setup but at least it semi makes sense, better cover or concealment. For mines though... What you describes is the way it works in most cases but not for mines and streams for some reason. Assuming all the painted squares are streams : - If you deploy the mines in painted streams squares, they get stuck there and don't move to another set of stream squares when you switch to a different AI plan. - And if you deploy them outside of any painted squares, same result, they just remain there and refuse to deploy in a yellow stream square. I tested this yesterday, to be honest just thinking about it makes my head spin a little. 0 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.