Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Better Vehicle AI
Re: Better Vehicle AI [message #430411 is a reply to message #430375] Wed, 09 June 2010 00:08 Go to previous messageGo to previous message
TNaismith
Messages: 86
Registered: May 2006
Location: Canada
Karma:
Recruit
Hey Burn,

I've had the same problems as you when using M08_Go_Point and M08_Mobile_Vehicle when scripting Coop maps. I've figured that all of the M08_Go_Points MUST have a clear path to one another to work.

http://img707.imageshack.us/img707/3711/26870809.jpg

The M08_Go_Points on the LEFT would work, because they all have a direct line-of-sight to each other, no matter which point the vehicle may choose to go with.

The M08_Go_Points on the RIGHT would not work all the time -- sometimes you'll have the vehicle run straight into the wall trying to reach another point (as far as I've tested), or you might have it choose a very wacky pathfinding to reach a destination far away.

I've adapted to using M08_Go_Points only for short distances, and within a small area. If I want the vehicle to navigate to a far-away location, like to an enemy base, then you want to start using waypaths.

As for CPU_Neo_Vehicle_AI, I've done some research on this myself and it is apparently only a beta/earlier version of the script -- it was included in jonwil's 3.4.4 scripts. However, as you've discovered, many of it's features don't work at all when attached to vehicles. It doesn't work for me either when I try to give it settings to fire at an enemy vehicle, it is bugged/incomplete as far as I can tell.

Here is the the documentation for the script from the 3.4.4 scripts folder (which I can't remember where I downloaded it from, but it's different from the actual scripts. This one includes all the 14 readme files for each set of scripts people have contributed for 3.4.4)

Quote:

; ************************* Scripts by Joshua "NeoSaber" Kraft *************************



================================================================================ ====================

; ************************* [Script Name] Neo_CreateObject_RandomTimer

================================================================================ ====================

[Description]

- This script creates a preset at the position of the object it is attached to, and sets the newly created preset to face the same way as the attached object does. It does so at random intervals, that come between the Min and Max parameters.

[Parameters]

- Preset_Name (The name of the preset to create. Default is 'blank')

- Min (Minimum value that random time could be. Default is 0.0)

- Max (Maximum value that random time could be. Default is 60.0)

- Repeat (Determines if timer starts again when it runs out. 1 = yes, 0 = no. Default is 1)

[NOTES]

- This script should probably be attached to a Daves Arrow that is placed on the map. If set to repeat, when the timer runs out the preset will be created and it will choose a new random number to set the timer to. It will continue to do so indefinitely.

================================================================================ ====================

; ************************* [Script Name] Neo_Vehicle_AI

================================================================================ ====================

[Description]

- Early version of an AI script for vehicles. It can guard allies, hunt down enemies, and does a basic threat assessment on targets. It checks if targets are vehicles or soldiers, players or not players, and distance to determine which targets are a priority to attack.

[Parameters]

- MaxRange (The maximum range, in meters, that the vehicle will attack enemies. Default is 0.0)

- vsSoldier (Ammo to use against Soldiers. Primary = 1, Secondary = 0. Default is 1)

- vsVehicle (Ammo to use against ground Vehicles. Primary = 1, Secondary = 0. Default is 1)

- vsAircraft (Ammo to use against Aircraft. Primary = 1, Secondary = 0. Default is 1)

[NOTES]

- This script should be attached to a vehicle. It doesn't yet account for players getting in and out of a vehicle so transitions should be disabled on any vehicle this is attached to. Restrictions on the vehicle's turret rotation can cause the AI to get confused in combat.

- The script currently responds to damage, sounds, and sighting enemies. When idle, if it is shot by an ally it will attempt to guard that ally. If instead it is shot by or sees an enemy it will hunt that enemy. When its target dies (whether it be an ally to guard or an enemy to kill) it will return to idle. If hunting and it finds a higher priority target, it will attack the new target instead. An example of this would be if it was hunting an AI soldier and it sees a player. Players rank as a greater threat than bots so it would turn its attention towards the player. However, if it was hunting an AI vehicle and saw a player walking around it would continue to attack the vehicle since a player walking around ranks as a lower threat than a vehicle.

- This script can also respond to several customs. The code that checks for customs may not be working right yet, so make use of it at your own risk. Here are 4 of the customs it may respond to:

- 127127: hunt at location of sender
- 781781: hunt a new player (sender)
- 329329: guard location of sender
- 983983: guard a new player (sender)

- This script is still a beta, so future versions of the script may be incompatible with this version.





And in this renegadehelp.net tutorial (Advanced Bots Tutorial), it is mentioned that there is this "is not in the latest release of Jonwil's scripts" but that it will be "added shortly". I've made the assumption that means it could be included in scripts 4.0, which Tiberian Technologies is working on.

Sorry I couldn't offer any actual solutions, I've been in the same boat as you are, and sort of still am. Hope I could shed maybe a little light on the background of it all though.

~ TNaismith
[Mission Coop] Clan Member
Coop Gamer Enthusiast


http://img33.imageshack.us/img33/7928/t2010021mcsig140.gif

[Updated on: Wed, 09 June 2010 00:12]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Is it possible
Next Topic: do me a fav
Goto Forum:
  


Current Time: Wed Dec 18 04:49:57 MST 2024

Total time taken to generate the page: 0.00721 seconds