Jump to content
Official BF Editor Forums

Engineer bot won't give up on full-health vehicle


mft001

Recommended Posts

Hello wizards (and HNY to you!), am stumped again on something so I seek your counsel.

Continuing with my FH2 SP sub-mod, I'm working on a tank which was not previously in my collection - I recently copied the files from the latest version of FH2 online. All looking grand with the tank in general except that, in some test battles an engineer bot will come over to the tank when it's on full hp and will stand there, spanner in hand, also chasing the tank if it moves. Assuming the bot hasn't become self aware and is waiting for me to make a mistake and get shot, any ideas as to why the bot thinks the tank needs fixing? The two notable changes I had made to this tank were changing the projectile template for the AP round and adding some jerry cans on the sides and underbelly to hide some broken track animations and pretty up the hull. However I've tested the vehicle without these extra templates added and the engineer still hugs the tank.

The second and third screenshots may be linked to the same problem, not sure. The third screenshot shows an abandoned enemy faction tank in the field (not abandoned by choice, the tank is open-top and the driver died from a nade), with an allied bot engineer standing by the tank again as if about to start fixing it. After about 15 seconds he detected an enemy soldier and went off to shoot at him, but once the enemy was dead he got interested in the abandoned tank again and stood by it some more. In the second screenshot, an enemy base has been captured and two ally engineer bots notice two enemy vehicles now unused; they proceed to sit by them, spanners in hand. At least in these latter two cases it's not so big of an issue because, should enemies appear, it looks like the bot will respond to the pressing danger, but in the first scenario in spite of enemies being close by and even shooting right at him, the engineer still wants to hug the allied tank on full health.

Kind regards,

Mark

 

 

 

 

 

dedicated engineers.png

t26_finn.tweak

 

 

GA_EngineerK98Short.inc

v more distractions.png

 

Edited by mft001
Link to comment
Share on other sites

Alas haven't found a solution yet, if you have any ideas I'm all ears : ) I think my mention of adding objects to that new tank is a red herring, because many other vehicles seem to distract the engineer bots in this way and I haven't added objects to them.

Link to comment
Share on other sites

i have been thinking about this since you posted it but unfortunately these days have forgotten more than i remember, and am unable to run the game to test any theories...

are the hitpoints set the same in the armor comp?

e.g.

ObjectTemplate.armor.maxHitPoints 850
ObjectTemplate.armor.hitPoints 850

 

in objects.ai, what is the basicTemp set to? (basic temperature sets how 'attractive' an object is to a bot - but this affects all bots, not just engies)

 

if you don't manage to fix it, perhaps you could post your .tweak and your objects.ai

 

 

 

Link to comment
Share on other sites

Yep am attaching here both of those files and the .con file for the tank where I first noticed this issue. If you can't see the files though let me know and I could try another way to share.

Can confirm that the HitPoints and maxHitPoints were set the same. Looking at the ai template (m5a1_stuart_auto_AI) used for this tank (t26_finn), objects.ai says the temp is 350.

If it helps, the ai templates for the other two vehicles I mentioned, which were on the enemy team (so maybe that's not the same issue) are:

m3_halftrack_auto_AI
m18_hellcat_auto_AI

 

Google Drive links to the files:

https://drive.google.com/file/d/1b8UaQPjgMjspMCiegQdlluumKeKJjMAq/
https://drive.google.com/file/d/1sZajGg-U4aYoGd4LoQtsG7TtpPdxAzFs/
https://drive.google.com/file/d/1NiTkmFhHq0kAHpUFuZM7BMhdO1-D3CuZ/

t26_finn.tweak t26_finn.con Objects.ai

(pdf copy) t26_finn.tweak.pdf (pdf copy) t26_finn.con.pdf (pdf copy) Objects.ai.pdf

Edited by mft004
Link to comment
Share on other sites

  • 3 weeks later...

i've been hanging back from replying to this because i wanted to wait until i had something conclusive to tell you, but i have not yet, and probably never will (i haven't been able to run the game *with mods* for years, so i'm very rusty and with issues like this i really need to be able to run before/after tests)

i noticed a couple of small things but i doubt they would affect engys specifically, but anyway...

temp for the driver is 350, the other vehicles of a similar type i made for AIX had temps of 80 for driver, 50 for passenger.

temps for the vanilla MiA2 were 20 and 7 respectively.

temperature is a relative thing and varies wildly and dynamically from point to point during a round, so if all other objects in the game have similarly high temps, then this might not have much effect on your bug.

turret azimuth for the ai vs. the actual tank doesn't match, i.e. (if i'm reading it correctly)

turret is -15 to +7

ObjectTemplate.setMinRotation 0/-15/0
ObjectTemplate.setMaxRotation 0/7/0

...but the ai thinks it is -20 to +7.5

aiTemplatePlugIn.setCameraRelativeMinRotationDeg -360.0/-20.0/0.0 
aiTemplatePlugIn.setCameraRelativeMaxRotationDeg 360.0/7.5/0.0

...as a result of using shared ai.***

aitemplate is defined in the .con instead of the .tweak, and is defined twice. not sure what difference that makes if any, it just looks odd to me, i'm used to the 'traditional' layout (that goes for combining all the objects ai into one file, too. absolutely hated trying to navigate that. much prefer one object = one file)

it would be interesting to write the tank its own normal ai template and see if the problem follows it, or if it suddenly becomes present in only those other vehicles using that m5a1_stuart_auto_AI  template.

 

*** for what it's worth - tobias karlsson (one of dice's ai guys) once told me that it is always best to give each object its own ai - the extra CPU overhead is negligible, the saved HD space from sharing it is negligible, and it makes debugging easier

 

 

Edited by clivewil
i rit rong stuff
Link to comment
Share on other sites

Thanks for those ideas and I don't blame you for staying away from more mod testing; in terms of time it's a death sentence! I ask myself one question, find some leads, then it leads to another question!

Yep in an effort to move the sub-mod away from strict realism towards a more arcade feel, I had altered the turn speeds / turn limits of most tank guns / mantlets, but just within the individual tweak files - I didn't know that was defined elsewhere for the ai too. I'll go ahead and match those all up and I'll make separate ai templates for each vehicle as you suggest. Then I'll get back with the results be they new or the same. To be fair to the Fh2 team they did seem to prefer separate templates too, but with these much later additions to the vehicle pool there's sometimes been no ai support in place - Fh2's singleplayer wizard Gavrant retired a few years ago.

As to the temp, it looks like all of the armoured vehicle driver positions are in the hundreds. Besides flags and some fixed guns (almost none in my sub-mod anyway) I can't think of anything else the ai would need to be interested in, so as a next attempt I could bring all of those down to maybe max 100.

Edited by mft004
Link to comment
Share on other sites

  • 2 weeks later...

Can now report that having made some separate ai templates and corrected values in line with the vehicle tweak values... it looks to be working!! Engineer repairs any damage on t26 and then walks away quickly as if he has better things to do! In another instance, engineer was repairing the tank when a much bigger ( / hotter) allied tank drove by and engineer ran off after that one, didn't even finish the repair job for me - I forgot that they could be so free-spirited. It's curious how just a slight error in a turret rotation has an impact on an entirely different function, but I'm not complaining : )

Early on I was planning to have two options for soldier kits in this sub-mod, one with wrenches present and one without, the one without so that 1v1 tank duels could be uninterrupted by zealous engys tilting the odds. Then with this latest snag I was thinking of just forgetting wrenches altogether. Now I'm gonna pursue those 2x options; many thanks yet again Sir Clive!

Edited by mft004
Knighted clivewil
Link to comment
Share on other sites

  • 8 months later...
On 1/3/2023 at 6:42 PM, mft001 said:

the engineer still wants to hug the allied tank on full health

ahah, gotta love an overly caring engi! 😝

On 2/2/2023 at 6:39 AM, clivewil said:

I haven't been able to run the game *with mods* for years, so i'm very rusty and with issues like this i really need to be able to run before/after tests

Hello @clivewil, I don't post on these forums often but I have mail digest notifications turned on; if you need help with getting the game client set up, don't hesitate to contact me. I host multiple BF2 modded events throughout the year so making sure players are able to download and play the given mod (eg. Battleracer, Omnicide - which we're playing this week btw - Pirates) is my number one priority!

Since I am aware this isn't an instant messaging platform, let me give you a long notice about a newly released mod which we're going to host a co-op event on, probably at the end of this month: it's Acheron, based on the Aliens movie franchise! If that's something you or @mft004 would enjoy partaking into, please join the Lost-Soldiers.org Discord server in order to stay up to date with all of our event news.

@mft001

Link to comment
Share on other sites

Thanks for invite Shark. Ya I guess my interest in this arena would be human v human battles and weaponry, mostly realistic stuff although I'll make exceptions here and there. I liked Doom 3's alpha stage shotgun for example and would place something like that in my WW2-themed Bf2 submod almost without hesitation. We're a funny bunch eh : )

Edited by mft004
Link to comment
Share on other sites

Oh yeah, you guys are surely full of surprises! Well, stay tuned to the BF2 Discussion Main board I guess, as I will try to post the next modded BF2 events over there! I might make one individual topic that I add new replies to over time, so forum users can follow it and get notifications when I announce a new event!

For instance, next in line is 6-years in the making Acheron mod by @Frosty98B!!! I still need to flesh out the details but, since I really want to be able to play with Catbox once in my life time, we might go for thanksgiving week :P

Thank you and best of luck with your mod man, and always test them on a dedicated internet server every now and then, so you do not incur into last-minute surprises when the mod ships out and server-admins want to install it to play online. 😉

Edited by S_h_a_r_k_93
adding Acheron moddb link
Link to comment
Share on other sites

Thanks. Yep I once tried actual co-op with two computers side by side as part of testing to work out why an improved PC with better processor lagged more with 60 bots than an older PC of mine that handled that fine (never found the real answer). When I did that and played on PC that wasn't hosting, the lag was gone but all sorts of wackiness was evident instead, like for example when throwing a nade, you'd throw it but the animation wouldn't play so you just saw the nade flying by itself a second later. Stuff like that.

Edited by mft004
Link to comment
Share on other sites

  • 2 weeks later...

I see, welp, my procrastination demons so far are winning and I haven't set it up yet, but if you fancy James Cameron's Aliens movie then you might want to get the chance to play Acheron 2 mod in co-op with other fellow human-controlled marines, and repel the xenomorphs invasion!!

Then you can give feedback to the mod creator directly (he will appreciate it), and you can perhaps help me to find ways to beat these mental blocks that live rent free inside my mind... man, sometimes I wish days had 36 hours!

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.

Loading...
×
×
  • Create New...