• Welcome to Battlezone Universe.
 

News:

Welcome to the BZU Archive dated December 24, 2009. Topics and posts are in read-only mode. Those with accounts will be able to login and browse anything the account had access granted to at the time. No changes to permissions will be made to be given access to particular content. If you have any questions, please reach out to squirrelof09/Rapazzini.

Main Menu

AI Weapons Assignment via DLL

Started by Red Devil, October 09, 2007, 11:53:35 PM

Previous topic - Next topic

How should weapons, Specials, etc.,  be assigned to the AI in FE?

According to race and build requirements.
According to race, no requirements.
By race and according to opponents buildings and weapons on their ships.
No race requirements.
FE weapons (Shock Rocket, Heavy Chain Gun, Chain Mines, etc.)
According to race, requirements, and difficulty settings

Red Devil

I'm in the process of giving weapons the AI via the FE MPI DLL and thought I'd get your input on it.

As you can see, there are a number of options available.

I can assign depending on which buildings the enemy has, which weapons he has, what the AI has, or make it not matter.

I'd really like to hear about counters to weapons too.  i.e., "He has chain, so I should get deflection shields.", etc.

I can limit the handout of weapons if the enemy loses a building too, so it's balanced.
What box???

Red Devil

Heh, just realized I can give the AI Blink and that they can use it.   :evillaugh:
What box???

Red Devil

In order to make the DLL race-independent and scalable, I'll have to ignore race, because every time someone wants to adds a race, the DLL would have to be reworked. 

I'll give the ISDF, Scion, Hadeans, and Cerberi race-specific upgrades and everybody else generic upgrades, with Rave! and other big weapons reserved for the Hard difficulty levels.

Also considering adding these (as options on the AI Extra Options screen):

Snipers
Scrap Bleed
Saboteur
Chemical Weapons Bomber
Infantry (Riflemen, Grenadiers, Anti-Tank, Rocketeers)
What box???

Marksman

As I've experienced FE, it seems a little difficult up front when raiders come into an early base with nasty upgrades. There was a tendency for a big raid early on and then a bit of a lul. (or I might be mixing up with G66, can't remember that well). If we could survive the raid, then we had a strong path to winning. Or we would just get wiped out in that raid.

If you could have the power of the upgrades go along more or less with the enemy tech up it would probably keep the early raids down a bit and make early survival easier. Late game, anything goes.


mrtwosheds

#4
Im not sure that you should be assigning weapons (to other races) via mpi dll.
I am doing my weapon variants simply by having multiple ship variants built by the aip
eg
dvtank01
dvtank02
etc
I would be somewhat put out if the dll then changed them to rave for example, as I am using weapon models and the rave does not have one....
You would be removing control from the modder rather than enhancing it.

See the guns on my dalek avatar <--- they change.

Adding races to FE....
3 races, 7 aip files x5 (-vs-) x4 difficulty= 140 extra.aip
4 races 7 aip files x 12 (-vs-) x4 difficulty= 336 extra.aip !!!!

Red Devil

Marksman, I'm getting the early AI 'Rec Rushers' under control.  That was probably due to 'stranded 3rd race units' not being cleared out.

MTS, for the DLL swapping weapons out, it already did it in the original DLL.  I'm just expanding it and making it more dependent upon what the AI has. 

Before, it was only dependent upon if humans had an Armory and giving the AI ISDF tanks SP-STAB, the Scions shields, and Warriors Arc.  Now I'm making it follow the full tech tree and countering what the humans have, hence the request for good counters.  :-)

Some maps have upgrade crates on them in front of the build points for the Recycler (Chain Mine, Heavy Chain, Icer) and Factory (Shock Rocket (really a cannon), Chain Mine, Cluster Missile), which would give units some upgrades at random, depending upon the respawn times and build times.  (just discovered Icer had CANN instead of GUN which would explain why it wasn't being picked up)

So, the way I'm thinking of doing it is to give the AI some semblance of sentience and have it pick weapons that will counter what the human-controlled ships are using.

As for the expansion of AIPs, yeah, I'm having fun just making the Cerberi vs Race*4/Race*4 vs Cerberi ones.   :roll:  The difficulty I'm talking about are the level of weapons counters, Rampage Units attack frequency, etc. and will be determined by the Difficulty settings set by us in the shell.

Something like that.
What box???

OvermindDL1

To make it race independent for something that is so dependent on race like weapons, you should make descriptor files.  Just have one file per race in a predefined location (probably in the same directory or a sub-directory as the dll or what-not like I have my scriptor work, gull I wish I could use BZ2's file management so I can load things through bz2 from a directory specified in the loaded config file, or pak files, or whatnot, hint hint, any chance of exposing those?).  The files would be loaded by your dll only by the server, make sure to hash the data well, and have the server send the data down to the clients so they can compare it with their's to make sure it is identical to what they have, if not, post a message to the console and kill the game saying it is desynced or what-not.  Would be completely and fully configurable and mod/race independent.

Red Devil

Got an example of a descriptor file?  Won't do much good if we can't access.  Doesn't the server already block the client if the assets differ?
What box???

OvermindDL1

*You* would create/define the descriptor file.  And BZ2 only checks assets it knows about, hence why you should do it yourself.

If you were using my python scriptor then it would be very simple to create (yes you can mix python and C++ code, as long as my scriptor is installed, like by default with 1.3 or something, then you could access its powerful functionality from your C/C++ code). :P

Red Devil

I know, but I don't even know what they would contain or in what format.  Was just asking for an example entry is all.
What box???

OvermindDL1

Well, if it is a python script, then it could have dependencies and checks and all such and so forth, making it very powerful, or it could be something as simple as

IF "ivtank" GIVE "pstab"
Which could be simplified further into:
"ivtank" "pstab"
Whereas a python version would be like:
def unitcreated(unit):
    name = unit.odfname
    if name == "ivtank":
        unit.GiveWeapon("pstab")

A little more verbose at start, but could do checks like if something else exists, if the enemy has something, if the enemy built a certain something then give all ivtank's in the field a certain weapon instantly (evil?), so forth.

Red Devil

#11
 That's what I'm doing in the DLL.  I expanded the building checks to encompass all of the CPU's building types and all the human building types and I check every human-built craft to see which weapons they have and then I give the CPU a counter weapon according to what the humans have. 

If humans get chain and the CPU is Scion and they have a Kiln and an Antenna Mound, the new CPU ships get a deflection shield.  And like that.  It's like the AI has a spy or something...   :-o

Hence my request for effective counters.  :-)

Edit: I can randomize similar weapons/counters. I can hand out the more difficult weapons (Blink, Rave!, etc.) and adjust the health of the CPU ships based on the Difficulty level.
What box???

Red Devil

After looking at the old FE DLL more closely, I saw that Sẽnor Bumppo has assigned some weapons depending on some conditions.  I'll retain those assignments, but the conditions will be expanded.
What box???