View Single Post
Re: PIA for United Bot?
Old
  (#4)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: PIA for United Bot? - 27-05-2004

In fact I was more interested by the goal planner in XML than the weapon specs, since these specs can eventually be made more readable and easily configurable through an ini file. Users don't need to understand the XML syntax to modify an ini file.

I am currently using a similar scheme in RACC for weapons. I define for them a number of "rails" (primary fire, secondary fire) and a set of properties that make the bots able to determine easily which weapon suits best for whatever job. An example:
Code:
# RACC - Bot weapons configuration file
#
# This file contains information needed by the knowledge system
# about the weapons used in the game. The syntax is explicit.
#
# Any weapon can have up to 2 rails (fire modes). For example,
# a MP5 automatic submachinegun in the primary rail, and a
# grenade launcher in the secondary one.
#
# weapon classes:
#   "primary": primary weapon
#   "secondary": side weapon, firable
#   "grenade": side weapon, tossable
#
# weapon rail properties (combinations are possible):
#   "disabler": disabling effect (e.g, blinds or freezes enemy)
#   "waterproof": can be used underwater
#   "lightdamage": light damage, almost never lethal
#   "mediumdamage": medium damage, may be lethal
#   "heavydamage": heavy damage, almost always lethal
#   "radiuseffect": damage radius effect (e.g, grenade blast)
#   "automatic": automatic firing capability
#   "buckshot": bucket firing capability (several impacts at once)
#   "scoped": scoping capability (medium range lens)
#   "sniper": zooming capability (long range lens)
#   "silenced": silent shot capability
#   "missile": missile (no instant hit)
#   "homing": homing capability (only relevant on missiles)
#   "toss": needs to be tossed at target
#   "place": needs to be placed (proximity bomb)
#
# weapon rail ranges:
#   "melee": melee only (close combat)
#   "close": most efficient at close range (0 - 6 meters)
#   "medium": most efficient at medium range (6 - 60 meters)
#   "far": most efficient at long range (60 meters - infinity)

# MP5 in HL deathmatch
[weapon_9mmar]
model="models/p_9mmar.mdl"
id=4
weight=
class="primary"
price=
buy_command=""
primary.properties="waterproof,mediumdamage,automatic"
primary.range="medium"
primary.type_of_ammo=10
primary.min_ammo=1
primary.max_ammo=120
primary.charge_delay=0.3
primary.sound1="weapons/mp5-1.wav"
primary.sound2="weapons/mp5-1.wav"
primary.min_delay="0.5 0.4 0.3 0.2 0.1"
primary.max_delay="0.6 0.5 0.4 0.3 0.2"
secondary.properties="waterproof,heavydamage,radiuseffect,missile,toss"
secondary.range="far"
secondary.type_of_ammo=5
secondary.min_ammo=1
secondary.max_ammo=10
secondary.charge_delay=0
secondary.sound1="weapons/glauncher.wav"
secondary.sound2="weapons/glauncher2.wav"
secondary.min_delay="0.5 0.4 0.3 0.2 0.1"
secondary.max_delay="0.6 0.5 0.4 0.3 0.2"
I think you see the point.

Having the top level AI in an XML script (or whatever scripting language) is nevertheless a great idea. I'm still wondering, however, if XML has enough flexibility to do that (test conditions, structures, etc.) Perhaps it would be more readable and easier to implement if it was made in another language than XML. Are there simple scripting language schemes that we could use ?



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote