Jump to content

AI and the walls dilemma


Sapphro
 Share

Recommended Posts

I just remembered that there is a pretty critical AI problem with soldiers on walls.  Namely, melee soldiers who are aggroed by them will continuously walk toward them, unable to reach them, and die.  Melee units ought to never attempt to attack units mounted on walls.  Probably best for them to ignore wall-mounted units if they have either an order or other targets are available, or flee if there are no alternate targets and no orders given.

  • Haha 1
Link to comment
Share on other sites

7 minutes ago, nifa said:

@real_tabasco_sauce Would it be possible to randomize the position of each soldier on the wall and maybe even play the idle animation? Otherwise it looks kind of unrealistic that they are kind of like in a formation and not moving at all

They do play idle animations, it's just some animations are harder than others to notice. Positioning in the walls is fixed as the turret positions are pre-defined. It's likely that randomizing their positions would result in soldiers inside of soldiers, soldiers inside of walls, and other more unrealistic things XD.

If you are looking for a more disorganized appearance, they do take up positions on the wall in a random-appearing order. It looks pretty "random" when there are 10 out of 16 soldiers on the wall.

I personally don't mind the neat rows as it looks like they are ready to launch some volleys.

Link to comment
Share on other sites

5 hours ago, real_tabasco_sauce said:

They do play idle animations, it's just some animations are harder than others to notice. Positioning in the walls is fixed as the turret positions are pre-defined. It's likely that randomizing their positions would result in soldiers inside of soldiers, soldiers inside of walls, and other more unrealistic things XD.

that's true with the animations, sorry I missed that XD. I mean randomize within a range. I tried it by randomly changing the x or the z coordinates by adding or substracting up to 0.3. It would be nice if the game would automatically do that, but I don't know how randomization in xml works. E.g. if x is 1.5 it would be changed to something between 1.2 and 1.8

I added the file for the roman long wall with a little randomization, so you could try out how that looks:)

Also I would prefer if the second row would not be right behind the first row, but with a little offset. I guess that would only allow 15 soldiers though.

wall_long.xml

  • Like 1
Link to comment
Share on other sites

image.thumb.png.3306ac32ad73358d77ff8ecd469b1f01.png

Yeah that was my main concern. There is an amount of flexibility needed on both sides of the wall for different wall lengths to accommodate the wall turrets. This is what I meant by soldiers "in" walls. If there is a truly random assignment, then it's likely you would also see some soldiers "in" other soldiers. A random assignment couldn't (if not, it definitely shouldn't) be done in xml. A separate script or function would be needed.

Honestly, I think the neat rows allow an easier guess as to how many soldiers are up there and the random positioning looks kind of chaotic. I would also add that its not that unrealistic that the columns are perfect. Lastly, it would be strange to do this for walls and not formations, which would then open another can of worms.

  • Like 1
Link to comment
Share on other sites

21 minutes ago, real_tabasco_sauce said:

Yeah that was my main concern. There is an amount of flexibility needed on both sides of the wall for different wall lengths to accommodate the wall turrets. This is what I meant by soldiers "in" walls.

Yeah I know, I think that guy is in the wall not because of the randomization, but because of the offset I added. After the randomization x± (≤0.3) I added 1.5 to x for the last row of soldiers, so that they would not stand behind each other. That's what I meant that there can only be 15 soldiers then. I just forgot to delete the one which is too far off then.

Anyway, if it doesn't look pleasent and is too difficult to implement, the randomization is not too important. But what would you think about the offset? So only 15 soldiers, 8 in the front row, 7 in the back row, but between? That would give more space for each soldier and also I think it's more realistic, since they don't each have one soldier in front of them, which is blocking their view (and no friendly fire :D). The distance between each turret point is 3, so adding 1.5 to x for the turret points nine to fifteen and deleting sixteen should do it (Hope I can explain good enough what I mean :D)

35 minutes ago, real_tabasco_sauce said:

@nifa don't get me wrong, its a nice idea, but I think effort here would be better if put towards improving idle animations.

thanks, no problem:)

Link to comment
Share on other sites

7 hours ago, nifa said:

The distance between each turret point is 3, so adding 1.5 to x for the turret points nine to fifteen and deleting sixteen should do it (Hope I can explain good enough what I mean :D)

Oh I see, this would stratify the rows. As it is already committed, I'd say we can bookmark that option for later in case the issue comes up again.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...