Page 1 of 1

LVT AI

Posted: Mon Apr 09, 2018 11:47 am
by takiwa
So, I've brought the LVT-4 Water Buffalo into my mod, and I'm spawning them in the water for amphibious landings, but no matter what equipment/vehicle type combo I use, I can't seem to get the bots to want to spawn into them. I know it's a tricky vehicle to get to work, because it would use both the boat and tank pathmaps, and I don't remember how they were set up in XPack 3 (maybe I should play it and see, haha)...Does anyone have any suggestions as to how the AI code would be set up?

tia, takiwa

Re: LVT AI

Posted: Mon Apr 09, 2018 2:46 pm
by Swaffy
You can add a soldier spawn directly to the vehicle as you see in the battleships, destroyers, etc. Or you can add a map spawner that has "enterOnSpawn" and you can also set this to only humans or only bots if you want. The map spawner won't move and only spawn soldiers into a vehicle in that spot. As for the landings, I have no clue but I think the SWoWWII used an Amphibious type of AI to get those vehicles to use both Boat and Tank pathmaps. Dig into the Objects.rfa then the AI files for the LVT to see what you can find.

Re: LVT AI

Posted: Tue Apr 10, 2018 1:42 pm
by takiwa
Yeah, I have a soldier spawn attached to the LVT, but the bots won't spawn there. SWoWWII spawned the LVT on land, and the bots wouldn't go in the water with them (at least not while I was playing). I tried attaching them to the carrier instead of the Lcvp, and they used them then, but when they got on land they just went around in circles.

The SWoWWII code calls for them to use the infantry pathmap, but this seems to work on either water or land...not both. So for the time being it looks like this is a multi-player-only vehicle until I can figure out how to get the bots to use it effectively.

thanks for your reply, tho :)

Re: LVT AI

Posted: Tue Apr 10, 2018 3:37 pm
by Swaffy
I just compared the LVT to the Schwimmwagen, and I already can tell they set up the LVT like a normal land vehicle. The Schwimm has some amphibious AI code that the LVT doesn't have.

Schwimmwagen/AI/Objects
aiTemplatePlugIn.create Unit SchwimmUnit
...
...
aiTemplatePlugIn.equipmentType 16
...


This line tells the game to use Amphibious pathmaps. So if you do this for the LVT you might see better results...? Also, after looking at the Hellendoorn map it seems the map has an amphibious pathmap set of files, along with the boat, infantry, and tank files.

Re: LVT AI

Posted: Thu Apr 12, 2018 12:38 pm
by takiwa
thanks for that info :)

I wonder if the debugger will generate amphibios pathmaps if the vehicle is present, or if I have to make them by hand :|

I'm trying to get everything sewn up for my next release atm....after that I will look at this issue and see if I can get the LVT to work.