Forgotten Hope Public Forum

Forgotten Hope 2 => Singleplayer and Coop => Topic started by: Drawde on 25-05-2010, 12:05:21

Title: 2.26 compatible (beta version) AI minimod
Post by: Drawde on 25-05-2010, 12:05:21
DOWNLOAD LINK (http://www.users.globalnet.co.uk/~pinniger/games/FH2AITweaks1.3beta.zip)

This is a BETA 2.26-compatible version of my FH2 AI minimod, compatible with the 2.26 patch version.

It includes most of the major fixes and improvements in the previous version 1.2, but is missing some of the smaller changes (such as raised viewpoints for howitzers; mortars are OK though), and has also not been fully playtested so may have some bugs and CTD issues on some maps. I've tested it on quite a few NA and Normandy maps (including Remick04's additions) and haven't had any CTDs or other major issues, but I haven't tried all the maps yet.

I will be away from home for a week tomorrow, hence the final 1.3 minimod will not be ready for at least 2 weeks - so I thought it would be a good idea to get a more or less complete and playable 2.26-compatible version sooner rather than later.

Reports on CTDs, bugs, AI issues etc. are still welcome (though I probably won't be able to read them till next week); some of them may just be things I haven't got round to fixing yet, but they could also be new issues introduced by 2.26 or (like the Jeep CTD in the last version) as a result of my own errors/typos.
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Raziel on 25-05-2010, 13:05:42
Goodjob mate! Thanks!
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: djinn on 25-05-2010, 17:05:10
Mortars in the stock 2.26 don't have raise perspective so they still suffer from the issues of yours in 1.1, only firing at point blank targets, except on El Alamein, where it has god's eye perspective

thanks for the patch. Really grateful, man

cF, you might want to update the download list with this newest version....

EDIT: Noted that the mg gunners are still able to stand and fire :-(
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: cannonfodder on 26-05-2010, 12:05:37
Thanks Drawde. Sticky's been updated.
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Frysian on 29-05-2010, 08:05:17
Thanks! i'll give it a try
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Shears on 31-05-2010, 11:05:04
Thanks for sharing your work,
Im intersted to see the improvments and will
DL and install your mod.

Shears
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Drawde on 07-06-2010, 21:06:55
Now back to working on the minimod, might take another couple of weeks to complete the final version but I'll definitely get it done eventually.

I've managed to create separate artillery/mortar objects (with raised perspective) for the SP maps, they work fine but every single SP map (at least ones with artillery) needs its gameplayobjects.con editing. I'll include the edited map files with the minimod, but users will have to manually install them into the map archives.

The finished version will definitely have a fix for the standing MG bots (this is caused by a Python script which disables the "only fire when prone" for AT guns and LMGs in SP mode)
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: djinn on 08-06-2010, 12:06:50
Wait - howitzers now work? *gettin ready to click heels*
A few suggestions:
Howitzers should fire only HE irrespective of target.

You might want to make armor cars like the 222 or marmon Herrington use the same code as the flakpanzer ie firing @ infantry, armor and aircrafts without prejudice

I think tanks, HE-equipped AT and especially the 88 could fire at infantry at a slightry increased range.

Also, bots in vanilla and fh2.0 could flee if they saw a live grenade close by. They don't now. Bots around a tank actually used to flee from sticky bombs, friend and foe's - if they saw it.

It might use the same logic, but could infantry be made to somehow recognize artillary splash and dash if it came close? Not flee, but proceed in a dash to make them less of a target. This way, if arty can finally see infantry as higher priority, they won't all be slaughtered

I also noted that tanks fire smoke irrespective of target, even for armored cars :-/

Could they use it only against heavier tanks or bigger guns.
And i suggest aircrafts NOT fire @ tanks. They barely notice infantry on cobra

Do tanks use special AP against heavier tanks? I still see the valentine and matilda pwning on sidi rezegh until i show up...
Finally, could all stationary weapons, as well as deployables like the .30cal get as high priority as mortar? I got 128 bots on El Alamein and saw little or no change in the number of guns on kidney ridge occupied
Sorry for my lack of courtesy, Drawde. without LAN, Im limited to texting-typing with fon so i'm trying to be as brief as possible
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Drawde on 08-06-2010, 20:06:15
I haven't tested howitzers enough to see if they work better or not, but the new SP-only objects have identical raised perspective to the ones in the 2.25 minimod - they're just new objects/entities that only appear in SP and co-op maps.
I have, however, already coded howitzers to fire HE only, in the hope this might make them more effective. One reason they don't work properly may be that bots treat them as direct-fire weapons (as their primary shell type is AP, direct fire); disabling the AP shells might fix this.

The problem, though, may be less to do with any hard-coded difference between howitzers and mortars, than the fact that howitzers are usually placed a long way from the front line (and often behind visual obstructions like treelines and buildings) so rarely get the chance to see enemy targets, even with the raised view perspective.
Nebelwerfers seem to be usually placed closer to areas where combat takes place, so get more of a chance to fire at things. They're the only non-mortar artillery I've regularly seen firing at anything, though the 25pdr on Supercharge will occasionally fire AP at German vehicles that get too near the British main base.

I'm planning to try setting 20mm-equipped armoured cars to IsAntiAircraft=1 (currently it's set to 2, for opportunity shots only), if it doesn't distract them from ground targets too much I'll keep this change in.

HE shells (for all weapons) have the same maximum range as AP - 500m - and I've noticed tanks are much more effective with HE since my last update (with the new armour classification system) though they're still not perfect.

No idea about the fleeing/evasion code, I might look at this later though, I suspect it's in the AI behaviour file, possibly increasing the "take cover" priority will help. I think it's also affected by the "explosion radius" setting for weapons - I deliberately disabled this for AT charges, as their throw range is less than their blast radius so bots never used them - I thought kamikaze bots would be preferable to ones that never used explosives at all  ;D

Haven't seen tanks fire smoke rounds yet, infantry will still (sometimes) throw smoke grenades at vehicles and guns, but won't drop them randomly anymore (this was caused by the same C4 code that caused the satchel TKing)

Tanks should, theoretically, use special AP rounds against heavy armour, but don't always do, maybe there isn't enough difference between the AP and special AP target priorities.

The AI's reluctance to use the guns on Kidney Ridge may be partly because a lot of them are miles from the CP's spawn point; even the Pak38s are rarely occupied. The mortar and flak gun inside the base itself almost invariably get used.
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: cannonfodder on 09-06-2010, 12:06:58
Sorry it's off-topic, but I thought this might be of interest: http://www.battlefieldsingleplayer.com/forum/index.php?showtopic=15109
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: djinn on 10-06-2010, 20:06:54
Ya, tanks priority fire in some cases (check out villers) is smoke. They literally fire volleys of it at armor and emplaced guns
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: djinn on 12-06-2010, 01:06:06
I also think fighter planes should not strafe tanks. Drop bombs ifthey have em, mgs on infantry unless they have only cannons, and cannons for light armor

I would suggest HE use if infantry is concealed, and bombs for the stuka in that same instance.

Currenty planes keep pointlessly strafing tanks and ignoring infantry.
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Devilman on 12-06-2010, 01:06:49
I also think fighter planes should not strafe tanks. Drop bombs ifthey have em, mgs on infantry unless they have only cannons, and cannons for light armor

I would suggest HE use if infantry is concealed, and bombs for the stuka in that same instance.

Currenty planes keep pointlessly strafing tanks and ignoring infantry.

Everything a bot in a vehicle,shoots at,is controlled by their vehicles,weapon AI template
which is very easy to adjust

Quote
rem *** Weaponory ***

rem * Guns *
weaponTemplate.create SpitfireMKV_WingMGAI
weaponTemplate.indirect 0
weaponTemplate.minRange 500.0
weaponTemplate.maxRange 700.0
weaponTemplate.setStrength Infantry    0.0
weaponTemplate.setStrength LightArmour 8.0
weaponTemplate.setStrength HeavyArmour 0.0
weaponTemplate.setStrength NavalArmour 0.0
weaponTemplate.setStrength Helicopter  0.0
weaponTemplate.setStrength Airplane    6.0
weaponTemplate.allowedDeviation 15.0

rem * Guns *
weaponTemplate.create SpitfireMKV_NoseMGAI
weaponTemplate.indirect 0
weaponTemplate.minRange 50.0
weaponTemplate.maxRange 500.0
weaponTemplate.setStrength Infantry    0.0
weaponTemplate.setStrength LightArmour 5.0
weaponTemplate.setStrength HeavyArmour 0.0
weaponTemplate.setStrength NavalArmour 0.0
weaponTemplate.setStrength Helicopter  0.0
weaponTemplate.setStrength Airplane    9.0
weaponTemplate.allowedDeviation 15.0
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: djinn on 14-06-2010, 15:06:21
A few new issues:
Clearly an issue with ratios where increasing bot count above 32 dumps the remainder on allies. You can rebalance it by moving the ratio in the axis favor to rebalance, but its not ideal. Using a functional FH toolbox, you can go as far as 96 bots with the ratio slider @ 98% to get a 50:50 ratio, but higher and it will be impossible to fix the bias. 128 bots, and you can't even be in a squad along with 32 other bots.

Bots in halftrucks or APcs will never fire on open spots on enemy APCs eg. 2 hanomags or a hanomag and bren carrier.
Bots don't fire at hanomags any longer or at tank top mgs

Many vehicles with the mg34 used by bots have continued mg firing sound in between bursts i.e when the gun is not firing
 
German binocs dont spot in SP/COOP, no matter the kit its with. You can fire a spot at a target, but no remote cam is created. Allied binocs work though.
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: djinn on 18-06-2010, 09:06:28
Does anyone else have an inexplicable CTD in purple heart lane approaching the 88?
Olympus also ctds but that might be map-based.
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Drawde on 18-06-2010, 21:06:23
The non-beta version of the 2.26 minimod is now reasonably close to being finished, though I'm still trying to fix a problem with German bots being unable to use the Geballte Ladung (they run up to tanks, then run away without dropping the charge; this didn't occur with 2.25). Anyone else getting this issue? And does it occur with any other AT charge/grenade weapons?

Also regarding the smoke shell issue, I didn't notice it earlier as I did most of my playtesting on North Africa maps -  tried playing Cobra as Allied and lost mainly due to Shermans firing smoke at enemy tanks + guns (the Germans don't have smoke rounds) rather than something actually capable of doing damage! I've now completely disabled smoke shell use for tanks and AT guns (infantry will still throw smoke nades, mainly at tanks and gun positions)

Similarly I've now stopped aircraft (except the Hurricane IID with its 40mm guns) from strafing medium + heavy armour, They'll still strafe unarmoured vehicles and light armour (halftracks, armoured cars, some light tanks)

I don't think there's any way of specifying a particular weapon (e.g bombs) to use against concealed targets... bots sometimes seem to know that a target's concealed, but this is presumably part of the hard-coded BF2 AI.

A few new issues:
Clearly an issue with ratios where increasing bot count above 32 dumps the remainder on allies. You can rebalance it by moving the ratio in the axis favor to rebalance, but its not ideal. Using a functional FH toolbox, you can go as far as 96 bots with the ratio slider @ 98% to get a 50:50 ratio, but higher and it will be impossible to fix the bias. 128 bots, and you can't even be in a squad along with 32 other bots.

Bots in halftrucks or APcs will never fire on open spots on enemy APCs eg. 2 hanomags or a hanomag and bren carrier.
Bots don't fire at hanomags any longer or at tank top mgs

Many vehicles with the mg34 used by bots have continued mg firing sound in between bursts i.e when the gun is not firing
 
German binocs dont spot in SP/COOP, no matter the kit its with. You can fire a spot at a target, but no remote cam is created. Allied binocs work though.

Not sure what's causing the bot count issue, it shouldn't be anything to do with the minimod as I haven't edited (or even included in the release) any files relating to this area.
Similarly I don't know what's causing the binocular issue as the minimod shouldn't contain any files (edited or otherwise) for binoculars.

I'll definitely look into to the issue with bots not firing at open positions, I suspect this is because bots no longer MGs/small arms at vehicles in the "LightArmour" category (as unarmoured vehicles now have their own category) and somehow aren't recognising the MG crew positions as exposed. I've tried giving the gunner crew positions a different armour category, but this just causes a CTD  >:(

The MG34 sound loop bug was also present in 2.25, I managed to fix the 2pdr + 88 sound loops but haven't yet managed to track down the source of the MG34 one.

Sorry it's off-topic, but I thought this might be of interest: http://www.battlefieldsingleplayer.com/forum/index.php?showtopic=15109

Thanks for the link - I'll definitely have a look at this, some of it at least might be usable in FH2 map AI.
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: aserafimov on 19-06-2010, 22:06:48
Sorry it's off-topic, but I thought this might be of interest: http://www.battlefieldsingleplayer.com/forum/index.php?showtopic=15109

I think that it works, I have tested on Villers_Bocage and Lebisey...
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: djinn on 23-06-2010, 15:06:29
The 2 biggest things that will totally conceal any other bots limitations are these:
/Working howitzers with greater range than mortars. I'm thinking if they either see from higher up, but alternatively and easier to do, if they saw from the current elevation but more foward i.e not directly above the gun. The idea is, the higher the perspective, the less likely it is to see units right next to you, the same for an inverted 'L' POV

/If rocket-planes could fire rockets.

Other aspect I would love us to tackle include, constant dashing when not engaged (like humans), repairable destroyable guns i.e as in multiplayer, bots that can follow orders, a fix to commander assets, stuka divehorn, spotting etc... But for me, I'm convinced that howitzers firing and rocket planes is top, top priority.

Also, I think the nebelwerfer fires short. It clearly sees targets, but always fires short, even in volleys.
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: cannonfodder on 24-06-2010, 10:06:13
...constant dashing when not engaged (like humans)...
Err...I dunno about, the battle would play out alot quicker, but it'd look really weird.

It might be ok if there's a way to get them to run when they're more than a certain distance from a flag, and walk when they're within that radius... :-\


Quote
...bots that can follow orders...
This is my main gripe...even though Drawde got them to jump in and outta vehicles of their own free will, they still don't listen... :(
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: djinn on 24-06-2010, 11:06:34
There's no bot code with the new commo-rose. They did listen in 2.0
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: cannonfodder on 24-06-2010, 12:06:14
Yeah, my point is it needs to be fixed... ;)

Did 2.0 use the same commo-log thing that we have atm?
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: djinn on 24-06-2010, 13:06:57
No. It used vanilla's with vanilla's voices
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Drawde on 24-06-2010, 18:06:59
Howitzers/Nebel are now finally working, sort of at least! (See my new thread on the subject). Not much progress with plane rockets, though I've been working on this over the last few days. It ought to be fixable somehow, rockets are just direct-fire weapons so bots should be able to use them with no problem.

This is my main gripe...even though Drawde got them to jump in and outta vehicles of their own free will, they still don't listen... :(

I'm definitely going to look at this issue in future... in fact I've been intending to for ages, but haven't got round to it due to other bugs needing fixing (map CTDs in particular). In theory it shouldn't be too hard, all of the code needed should be in the vBF2 commo rose files, and just needs integrating into the FH2 code.
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: djinn on 24-06-2010, 20:06:23
Remote chance of getting just the howitzer code for now? :-D

I think bots being able to at least shell the frontlines should work for attackers, and for strong defender counterattacks.

Noted the purple heart lane ctd also? Approaching the 88.
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Drawde on 25-06-2010, 21:06:17
Remote chance of getting just the howitzer code for now? :-D

I think bots being able to at least shell the frontlines should work for attackers, and for strong defender counterattacks.

Noted the purple heart lane ctd also? Approaching the 88.

Working on a temporary "patch" with the howitzers and Nebelwerfer (and slightly updated mortars) which should be ready in a few days.

I haven't played PHL much, not one of my favourite maps as I get sick of being repeatedly picked off by bots hidden in the hedges (bots can see through foliage much better than humans, also very noticeable with the 88s on Totalize ;D ). I haven't had much time lately to actually play FH2, as opposed to just testing out mod tweaks, and when I do I usually play on maps that have vehicles/weapons I want to test!
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: General_Henry on 29-06-2010, 13:06:18
I would like to say WOW to this mod, I haven't downloaded it myself, but a server is running it, and I joined due to the lack of players in the regular servers.

I must say this mod makes the single player much more challenging than original FH2, in original FH2, bots are like idiots that you massacre them with ease (especially the bots don't fire HE at you). On totalize my firefly got shot by a bot tank! Pity is that the bot planes are still easy to shoot down with my tank cannon. (they fly too slow when strafing, which makes them sitting ducks)

Carry on with your good work and I hope you'll be joining the FH2 mod team for SP developments. You know how to make bots act right!


note: that 88 in totalize is pretty much lame for a human player that can't see through the vegetations. Could bots not be doing "wall hacks?", as a human you could hardly see through vegetations so I think that won't nerf the bots much.


Coop, though entirely different from the regular multiplayer, is actually not a bad place to learn about teamwork and coordination. Especially in your mod, without teamwork humans are not likely to be going anywhere.
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Drawde on 29-06-2010, 22:06:38
note: that 88 in totalize is pretty much lame for a human player that can't see through the vegetations. Could bots not be doing "wall hacks?", as a human you could hardly see through vegetations so I think that won't nerf the bots much.
Thanks for the kind comments!
I agree regarding the 88s on Totalise (you wait till you see the Nebelwerfer firing too...) but there doesn't seem to be much that can be done about this - lowering the AI view range for this map would also stop bots firing when they have a clear view of the target. The only positive side is that bot-driven Allied tanks can see through the vegetation just as well as the Germans can!
PHL is similar, only with infantry... bots can see you through hedges so you're always getting sniped by enemies you can't see.

A couple of small improvements I've made recently (not specifically AI-related in this case) - the Ford GPA can now drive in water (it does have amphibious code in the .tweak file, but it doesn't work - I just replaced it with the Schwimmwagen code), and howitzers have HE shells as the default selection. This is intended to help the AI as they should be using HE most of the time anyway, but is also helpful for human players.
 
If I don't manage to crack the plane rocket bug after another week, I'll release the current version of the mod as it is, and leave fixing the plane rockets for the next version. Still don't know what the cause is, it's definitely not the missile lock code, nor is it the "deviation" settings in the weapons.ai.
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Devilman on 30-06-2010, 07:06:07

I agree regarding the 88s on Totalise (you wait till you see the Nebelwerfer firing too...) but there doesn't seem to be much that can be done about this   

Clone the problem vehicles/weapons and give their AI template a lower
weaponTemplate.maxRange .......
add the cloned objects to the problem maps GPO file
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: djinn on 30-06-2010, 07:06:51
Personally, I think the range is fine
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: djinn on 30-06-2010, 08:06:14
I think its time we took the rocket issue to battlefield singleplayer forum. Be sure to just slip in the wonderful breakthroughs first, gets everyone taking you serious.

Devilman. Any thoughts on how to make the rockets work?

@ drawde,
Any word on solutions to any of these:
/Repeating mg34
/Bots never using deployed .30cal
/Ctd in purple heart lane, approaching the 88
/German bot binocs not spotting
/Nebelwerfer firing short
/Bots being able to fire at open positions, esp. At The halftrucks
/Planes focus on infantry and emplaced guns in strafing... Could planes with rockets be made to see them in like capacity as bullets?
/heavy Mgs not firing standing
/Can we make at rifles also fire only when prone. I think it will work, and give the pzii and halftruck a fighting chance. Also, makes the rifle less effective than a zook, as it should be
/I also think mobile AT guns work better when bots cant move them as before, or like someone suggested, moved very slowly.
 /Armored cars and arty focused more on infantry

I really hope winterhilf would share some of his wisdom with us. I know there are some things we are stuck on which functioned in 2.2. even bizness if he's lurking somewhere. And I'd really just die if bots used the stuka divehorn...
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: djinn on 30-06-2010, 08:06:10
Oh, and i think the beretta modullo 30 should also fire only when prone. It makes the italians too deadly to defeat esp. In hyacinth and giarabub. And i think that mg isnt so in multiplayer.
/Are you adding fixes to commander AI, drawde?
/I wonder if its possible for bots to fire rifles slower. I can swear they did in 2.2.

Anyone know if Leagion is reachable. If we could get that guy to give us some help, I'm sure we could perfect tanks firing both mobile and stationary... And maybe, get other useful solutions

Great joa Drawde. I'm just dying to see howitzers in action. You really hold this group together.
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Devilman on 30-06-2010, 08:06:03

Devilman. Any thoughts on how to make the rockets work?


Everything a bot shoots at,(and how much) is controlled by the vehicles/weapons AI file
The main problem with bots not attacking as one would like,"can" be that the targets/distances in the AI file overlap too much,which can tend to confuse bots,and too many types of targets are selected

Can you tell me the exact name of which vehicles arent using which weapons,on which kind of targets ?
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: djinn on 30-06-2010, 09:06:06
Thunderbolt and hurricane. Both using rockets against ground targets: armored tanks, static guns and other ground vehicles
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Devilman on 30-06-2010, 09:06:22
'exact name"
i dont see any Thunderbolt in the vehicle folder,and the 2 hurricanes i do see,neither of them have rockets
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: djinn on 30-06-2010, 09:06:49
Oops, not the hurricane.

Ok, its 'Typhoon_mk1b_late'

and,

'p47_d', that's the thunderbolt. There are 2 of them, one with rockets and one without. But i cant see the distinction in the files.
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Devilman on 30-06-2010, 10:06:58
Hmmm,the Typhoon tweak file shows 120 rpm,the AI file shows 1800,not sure if that makes a difference

First off,i would remove the MG,so the only weapon left is the rockets,to assure any issues
in the tweak,change this
ObjectTemplate.addTemplate typhoon_mk1b_late_Cannons1
to this
rem ObjectTemplate.addTemplate typhoon_mk1b_late_Cannons1

let me know the outcome


The P-47D also has the same problem with different fire rates

Both vehicle has the MG coded to be used from
weaponTemplate.minRange 5.0
weaponTemplate.maxRange 500.0

and the rockets are
weaponTemplate.minRange 500.0
weaponTemplate.maxRange 1000.0

Note..both vehicles have their rocket velocity at
ObjectTemplate.velocity 175
which is very low,also with no set time to live
it would use an unknown setting for time
which i would say is much less the minimun required time of at least 3 seconds
so the bot may calculate the set minimum shooting distance combined with the low velocity,and not fire at all
i would suggest lowering both engaging distances and increasing rocket velocity


i think the chance of hitting something with the MG at 500 meters is very slim,also,but not sure if there is a default setting for damage lost over distance

but first remove the MG,as explained above
set the rocket AI to this,and change rocket velocity to about 600


rem * Rockets*
weaponTemplate.create Typhoon_Rockets
weaponTemplate.indirect 0
weaponTemplate.minRange 30.0
weaponTemplate.maxRange 500.0
weaponTemplate.setStrength Infantry    0.0
weaponTemplate.setStrength LightArmour 20.0
weaponTemplate.setStrength HeavyArmour 30.0
weaponTemplate.setStrength NavalArmour 10.0
weaponTemplate.setStrength Helicopter  0.0
weaponTemplate.setStrength Airplane    0.0
weaponTemplate.fireRate 120
weaponTemplate.allowedDeviation 5.0
weaponTemplate.deviationCorrectionTime 0.5
weaponTemplate.deviation 1.0
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: djinn on 30-06-2010, 10:06:39
Drawde, something to try out :-)
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: cannonfodder on 30-06-2010, 13:06:45
...let me know the outcome...
Tried disabling the MG's...no luck.

Then I changed the AI and velocity...still no luck.

The Typhoon on Totalize just flies around diving at ground targets, but doing nothing but spotting... :-\
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Devilman on 30-06-2010, 13:06:27
Do the rockets fire for humans ?
Did you set both fire rates to the same number (tweak & AI) ?
Is there another plane that has working rockets ?
Do the bots fire the MG's on the planes, that bots dont fire rockets in ?
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: cannonfodder on 30-06-2010, 15:06:20
Do the rockets fire for humans ?...
Yes.

Quote
...Did you set both fire rates to the same number (tweak & AI) ?...
No, but now that I look at the tweak, I'm not sure which line to change... :-\

Rounds per minute is 120 (same as the fire rate in the AI file). I notice the MG's AI fire rate is 600, whereas the rounds per minute in the tweak is 900.

Wouldn't the fire rate of 1 mean that the weapon can only fire a single round at a time, even though it fires the projectiles from multiple points?
Quote
ObjectTemplate.create GenericFireArm typhoon_mk1b_late_WingRockets
ObjectTemplate.modifiedByUser "Phil"
ObjectTemplate.createdInEditor 1
rem ---BeginComp:WeaponHud ---
ObjectTemplate.createComponent WeaponHud
ObjectTemplate.weaponHud.weaponIcon Ingame\Weapons\Icons\Hud\bomb.tga
ObjectTemplate.weaponHud.hasFireRate 0
ObjectTemplate.weaponHud.addShowOnCamMode 2
ObjectTemplate.weaponHud.guiIndex -1
ObjectTemplate.weaponHud.altGuiIndex 1006
rem ---EndComp ---
rem ---BeginComp:MultiFireComp ---
ObjectTemplate.createComponent MultiFireComp
ObjectTemplate.fire.roundsPerMinute 120
ObjectTemplate.fire.fireInput PIAltFire
ObjectTemplate.fire.addFireRate 1
ObjectTemplate.fire.burstSize 2
ObjectTemplate.fire.useDummyProjectiles 1
ObjectTemplate.fire.addBarrelName rp3_rocket_dummy
rem ---EndComp ---


Quote
...Is there another plane that has working rockets ?...
Not that I know of.

Quote
...Do the bots fire the MG's on the planes, that bots dont fire rockets in ?...
Umm...not sure. I'll have to check that.
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Devilman on 30-06-2010, 15:06:13
Look in the vehicles/AI/weapons file,should match the rounds per minute,in the tweak file as you posted
try a few different numbers upto 900

rem * Rockets*
weaponTemplate.create Typhoon_Rockets
weaponTemplate.indirect 0
weaponTemplate.minRange 30.0
weaponTemplate.maxRange 500.0
weaponTemplate.setStrength Infantry    0.0
weaponTemplate.setStrength LightArmour 20.0
weaponTemplate.setStrength HeavyArmour 30.0
weaponTemplate.setStrength NavalArmour 10.0
weaponTemplate.setStrength Helicopter  0.0
weaponTemplate.setStrength Airplane    0.0
weaponTemplate.fireRate 120<<<<<<<<<<<<<<<<<<<<<<<<<<
weaponTemplate.allowedDeviation 5.0
weaponTemplate.deviationCorrectionTime 0.5
weaponTemplate.deviation 1.0

i just noticed the rockets fire rate is 1
that means 1 mouse click,3 rockets,very unusual
most use fire rate 2,try changing it to
ObjectTemplate.fire.addFireRate 1
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: djinn on 30-06-2010, 16:06:17
Bots do fire cannons (typhoon) and mgs (thunderbolt) from those planes, at least at other planes
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Drawde on 30-06-2010, 22:06:39
Don't have time to post more now (will do tomorrow hopefully) but will definitely have a look at the suggested fixes for plane rockets. Removing the MGs/cannons is a good idea, probably not necessary to remove the weapon itself, just its AI template so the bots ignore it.
All the rocket-armed planes seem to fire their guns OK, just not rockets. Also, my current AI target priority settings have a  very clear distinction between rockets and guns (the latter only used vs. infantry/unarmoured vehicles, rockets have a high priority vs. heavy armour) same as with bombs, which the AI has no problems using.

Regarding the 88 range on Totalise, the problem is really more the bots being able to see through vegetation/scenery rather than the range of the gun.  Reducing this would only be a partial fix and would prevent bots from firing at long range at targets that aren't obscured... I think this is one aspect of the AI that we'll just have to put up with.
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Devilman on 01-07-2010, 04:07:08
How about Clivewils baby,the AIX_P51D
That must use its rockets ?
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: djinn on 01-07-2010, 11:07:16
Also, can destroyed vehicles be made to last as long as in multiplayer, if not a tad longer. Not essential, but it definitely adds something for a destroyed plane to crash rather than blow up in middair.
And destroyed vehicles are useful cover and add scope to battles.

I actually wish that after this release, we'd try to figure out how to make static guns like multiplayer, fixable and not respawns so that the battles are more tactical. Bot-made versions of everything lose health and blow up once abondoned. Multiplayer versions do not, in most cases.

And please don't forget to make the breda modello 30 only-prone fired. It absolutely makes the italians commandos and too strong. I'd say, do this for AT rifles also. At least those 2 for the next release

Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Raziel on 01-07-2010, 12:07:21
Let's leave Drawde and co. to focus on one problem at a time Djinn!
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Drawde on 01-07-2010, 13:07:48
Here's some replies to some of the issues/suggestions mentioned - LONG post, you have been warned:


Repeating MG34 sound - Still haven't fixed this yet... tried a while ago but the fix I used on the 88/2pdr also disabled the MG's automatic fire.

Bots not using deployed 30cal: - Never seen this, will look at it (probably a missing AITemplate). What maps does this weapon occur in?

PHL CTD - Again haven't had time to play this map so haven't noticed this CTD myself,

German bot binocs not spotting - I didn't think bots could spot with binoculars anyway? I know I tried to get them to a while ago, with no success.

Nebelwerfer firing short - Fixed, this was caused by the same indirect fire setting that stopped the howitzers firing.

Planes focusing on infantry: Fixed, more or less, planes will not strafe medium/heavy armour targets (other than the Hurricane IID)

MGs not firing standing: Fixed (including the Beretta, I think), this issue is caused by a Python script (aifixup.py) which disables the prone-only setting for some guns in SP mode.

Armoured cars + artillery focusing on infantry: This seems almost unfixable, regardless of what you set the target priorities to. I'm wondering if vehicles are hard-coded to be more "visible" to bots than infantry? Howitzers do seem to focus on static guns as targets, though.

Bots firing rifles slower: I added a "cap" to the AI firing rate for pistols and semi-auto rifles in the last, 2.25-compatible minimod version - the same fix should be in the current version.

Destroyed vehicles lasting longer: Like the radio/comm rose commands, this is something I've been planning to look at for ages, but have kept putting it off due to more serious bugs/issues needing attention. It shouldn't be too hard to do, though.

Longer respawn times for static guns are definitely something worth trying (don't think removing respawning completely is a good idea, purely IMO), it will make up for the AI's laser accuracy for these weapons which currently tends to give the defender the advantage. I noticed that the guns on Totalise seem to take a very long time to respawn compared to other maps, which gives the Allies more of a fighting chance.

Commander AI fixes: Partly fixed at least - the next version of my minimod will include updates for all SP-playable maps (necessary due to the new SP-only artillery objects) and I've included commander fixes, AI improvements, and vehicle spawn tweaks in many of them. I hope to eventually have all SP maps with fully fixed + tweaked map-specific AI files but this will take a while to do. I think I've got rid of most of the commander bugs (caused by uncappable CPs being incorrectly linked), though.

Now, for the two issues which are really getting on my nerves:

1 - Bots not firing at exposed crew positions on halftracks/tanks: This is the major issue which is bothering me at the minute (plane rockets can wait for the next version, as they've never worked - whilst this is a new issue). Basically it's caused by the new armour system, there's a separate category for unarmoured vehicles which bots will fire small arms and MGs at, halftracks are "light armour" and ignored by small arms. I've tried giving the gunner positions the "unarmoured" class but this just causes a CTD; BF2 doesn't seem to like multiple AI armour classes on one vehicle.
Making light armour a valid target for small arms would result in light tanks, armoured cars etc. getting spammed with rifle/MG fire, whilst classing halftracks as "unarmoured" would make bots less likely to use AT weapons against them.

Also, I'm fairly certain that bots, even in earlier versions, never fired at exposed crew on tanks (Panther top MG etc.) as these have the HeavyArmour class... they might have fired at the Sherman top MG as this is actually a separate object (with its own armour class) attached to the tank.

The odd thing is that FH2 bots don't seem to be able to recognise the "HasExposedSoldier=1" setting which should - in theory - let bots fire at exposed crew regardless of their vehicle's armour class. Do bots do this in vBF2? (it's a while since I've played it) - I know they did in BF1942. If we can get HasExposedSoldier to actually work, it will solve the whole problem.

2 - Bots and AT rifles: I've mentioned this one before and can't work out what the %£!$ is going on. Firstly, I've disabled non-prone firing for ATRs - same as with MGs - but this just means bots don't use them at all; unlike MGs, bots don't seem to understand that they need to go prone to fire the gun (despite the "weaponTemplate.setFiringPose Lying" setting) and since making this change, I've never once seen a bot fire an ATR.
Secondly - and this is the really weird thing - on my copy of FH2, bots have never been able to hit anything when firing ATRs standing. They fire them, but the shot doesn't appear to go anywhere - though I've noticed the occasional teamkill message. I've experimented with firing an AT rifle standing inside a small building (the aifixup.py script also allows humans to fire standing) and found that the bullet hole usually appeared somewhere -behind- where I was standing. I even managed to blow up a civilian truck by standing in front of it and firing an AT rifle...

But Djinn and other players have reported that bots can hit targets when standing without any problem. Since everyone's using the same weapon data files and AI behaviour files, I have no idea what is going on here. Could it be anything to do with difficulty settings? I usually play with the AI difficulty on maximum, which as far as I know ignores the weapon deviation (inaccuracy) settings in the AI files.

How about Clivewils baby,the AIX_P51D
That must use its rockets ?

Unfortunately, no... this one is on Op. Cobra and I've never seen it fire rockets, though it will strafe targets, dogfight with Fw190s and drop bombs OK.
The rocket bug may have something to do with the fire rate or automatic fire settings as I'm sure I heard a plane rocket firing sound on Totalize once (definitely wasn't a bazooka/faust or Nebelwerfer) - but only one.
Also, I have the minimum range for rockets set to 50, not 500 as in the default AI files. Not sure increasing velocity is a good idea as it will also affect rockets fired by human players.

Anyway, I'll have another look at the plane rockets later today or tomorrow and will also try playing with different difficulty settings to see if bot AT rifles behave any different.
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: cannonfodder on 01-07-2010, 14:07:43
...i just noticed the rockets fire rate is 1
that means 1 mouse click,3 rockets,very unusual
most use fire rate 2,try changing it to
ObjectTemplate.fire.addFireRate 1
You mean: ObjectTemplate.fire.addFireRate 2?


Quote
How about Clivewils baby,the AIX_P51D
That must use its rockets ?
Not that I've seen, and it's rockets have the same values (rpm, velocity, range, etc.) as the Typhoon's, so I'd say no.

I doubt Clivewil supplied any code with the P51 when he gave it to the devs, if he did the bots wouldn't have any problems using it... ;)

I'm gonna try using the values from the AIX version of it to see if that get them firing...



...Commander AI fixes...
DIE COMMANDER SPAM, DIE!!

Quote
...The odd thing is that FH2 bots don't seem to be able to recognise the "HasExposedSoldier=1" setting which should - in theory - let bots fire at exposed crew regardless of their vehicle's armour class. Do bots do this in vBF2?...
If the MG'er position on the turret counts, I'm almost 100% sure they do in AIX, I'll double-check it later.

Quote
...Secondly - and this is the really weird thing - on my copy of FH2, bots have never been able to hit anything when firing ATRs standing. They fire them, but the shot doesn't appear to go anywhere - though I've noticed the occasional teamkill message. I've experimented with firing an AT rifle standing inside a small building (the aifixup.py script also allows humans to fire standing) and found that the bullet hole usually appeared somewhere -behind- where I was standing. I even managed to blow up a civilian truck by standing in front of it and firing an AT rifle...
You're not the only one...I've seen them repeatedly shooting at Opels from short distances and not doing any damage. I always have my bots set to 'maximum angry', so maybe it does have something to do with the difficulty, although I can't understand why less deviation would equate to teleporting bullets... ???
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Devilman on 01-07-2010, 14:07:17
You mean: ObjectTemplate.fire.addFireRate 2?
Correct


I doubt Clive would release a vehicle which wasnt working properly (i helped him with the SU 22,and its bots problems)

You can try the FH2 planes in BF2/AIX,and Clives original files in FH2SP
There may by chance besomething in the FH2 python causing issues
by doing the above ,you should find the problem..mod or vehicle

Title: Re: 2.26 compatible (beta version) AI minimod
Post by: djinn on 01-07-2010, 15:07:58
The german binocs issue is not about bots spotting, but the fact that players using german binocs in singleplayer can fire them, but they dont leave spot areas. The brit one does and i'm sure the US one does also.

The fixed guns i.e AT, AA, howitzer, mortar, not sure about mg, do not respawn in multiplayer. They get destroyed and remain there like unusable statics until fixed. This was translated for singleplayer by bizness in 2.0 and it caused a ctd, as did bots with wrenches (later fixed). Bot guns thus simply blow up and respawn. My hope, after this patch is for us to get the multiplayer versions of these guns and see if they can be used, which would make bots have to repair damaged guns for reuse rather than simply wait for them to spawn.

Even in Totalize,
if i rocket all 88s, by the time i reload and return, they will be back.

The AT Rifles are definitely deadlier than zooks because of their range. Moreso @ 100% difficulty, where they snipe infantry with them. Just drive a pzii or hanomag in enemy area eg. Tobruk or a short barrel PzIV or crusader on sidi rezegh. It too is shot up with ease. The more the tank presence, the more the at guys. I figured prone-use would make it only as deadly as a zook, given Pz2s a chance.

Clivewills p51rocket was removed in cobra for his bomber and the p47rocket. Unearthen that p51rocket or looking @ it in aix may help.

Bots did firewat halftrucks with rifles just like they did at at guns. Not sure it was your earlier version or if it was leagions independent bot-mod for 2.2. You can check it out at the battlefield singleplayer website, forgotten hope. He gave us a download link there.

 Armored cars were infantry only once, and this changed. Maybe something can be picked from mgs especially .50cals.

The .30 cal is at the start of phl and a number can be found. Also on pdh with the shotgun.
Great job on commander AI, drawde. That will really certainly give 2.0 maps a 2nd lease on life.
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Drawde on 01-07-2010, 19:07:30
No luck so far with the aircraft rockets... ObjectTemplate.fire.addFireRate 2 hasn't had any effect.
If I remove the guns on the Typhoon and leave the rockets, it will make "strafing runs" on ground targets but not fire anything. The rockets fire OK when I fly the Typhoon myself.
I've tried looking at every single line in the aircraft rocket data and comparing it to other weapons (including vBF2 helicopter rockets) and have altered/disabled various settings but still can't get them to fire.  ???  I've also looked in the projectile data but there doesn't seem to be much there that would affect the AI.
The P-51 rockets look to have identical weapon data and AI to the Typhoon and P-47.

Where are the AIX files available from, if they're still around?

The german binocs issue is not about bots spotting, but the fact that players using german binocs in singleplayer can fire them, but they dont leave spot areas. The brit one does and i'm sure the US one does also.

Another weird thing... the AI minimod (any version) doesn't include any binocular-related files. I'll try them myself and see if I get the same issue. Currently there's a bug with my custom artillery objects where the "spotted target" view just shows a third-person (not overhead) view of the gun, but I should be able to fix this soon.

The fixed guns i.e AT, AA, howitzer, mortar, not sure about mg, do not respawn in multiplayer. They get destroyed and remain there like unusable statics until fixed. This was translated for singleplayer by bizness in 2.0 and it caused a ctd, as did bots with wrenches (later fixed). Bot guns thus simply blow up and respawn. My hope, after this patch is for us to get the multiplayer versions of these guns and see if they can be used, which would make bots have to repair damaged guns for reuse rather than simply wait for them to spawn.

Interesting... the code for this appears to also be in aifixups.py:
Quote
        # armor.canBeRepairedWhenWreck = 1 and armor.canBeDestroyed = 0 causes crash
        for pco in bf2.objectManager.getObjectsOfType('dice.hfe.world.ObjectTemplate.PlayerControlObject'):
            u.active(pco.templateName)
            if u.templateProperty('armor.canBeDestroyed') == '0':
                r('ObjectTemplate.armor.canBeDestroyed 1')
            if u.templateProperty('armor.canBeRepairedWhenWreck') == '1':
                r('ObjectTemplate.armor.canBeRepairedWhenWreck 0')

It might be possible to get the MP fixed gun system simply by disabling these lines. Not sure if bot engineers will realise how important it is to keep the guns repaired, though - I don't often see them repairing damaged vehicles.

(edit: last part of post was missing)
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Raziel on 01-07-2010, 19:07:38
@Drawde:
By any chance, could the rocket projectile have the same problem the bombs had back in 2.25 (rotated backwards)?
I have noticed that whereas in 2.25 the bombs fell in an arc downwards (see pic) with the arrival of 2.26, bombs tend to rotate while falling (similar to this)
http://www.youtube.com/watch?v=y3cVc42wg9Q#t=0m31s (http://www.youtube.com/watch?v=y3cVc42wg9Q#t=0m31s)
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: djinn on 01-07-2010, 20:07:50
I recall drawde saying he checked that out.
I have AIX, but i don't know where the p51 if its in my version @ all. Drawde, you may need to find the version that has it otherwise you'll have to find clivewill himself @bfsp forum.
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Drawde on 01-07-2010, 21:07:27
The rockets definitely don't have the same rotation problem bombs did pre-2.26; the rocket "launcher" dummy projectiles are rotated slightly to get the projectiles to converge rather than flying in parallel, but aircraft gun barrels are set up in the same way and the AI doesn't have any problem with firing them.

Also, the bomb bug messed up the plane AI so badly that bombers nosedived into the ground as soon as they saw a target - whilst rocket planes can still fly normally and make strafing attacks on targets; they do everything except actually fire the rockets  ???
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: djinn on 01-07-2010, 22:07:39
I noted a hanomag mg fire @ me even though i was in one myself. I got out, heared a german smg crack, jumped back in, only to have an approaching hanomag shoot me to ribbons.

Also, noted a brit put a charge on a pziv, run, kneel and remaint knelt until well after the charge exploded... The tank moved and took no damage. This isn't the first time i saw at charge infantry do that, but it wasn't the case in earlier versions. It seems, the lack of damage from a miss means the bots wait for the tank to be killed irrespective.

Also, while other fighters have really low LOS for mg and cannon, making their strafing ineffective, the fw190 doesnt have this issue. I think whatever it has can be translated to give other planes an advantage also.
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Devilman on 02-07-2010, 02:07:54
I recall drawde saying he checked that out.
I have AIX, but i don't know where the p51 if its in my version @ all. 

http://www.battlefieldsingleplayer.com/forum/index.php?showtopic=14151
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Drawde on 02-07-2010, 20:07:34
Still no progress with rockets (I'll check the AIX files out later) but I've managed to increase the duration of vehicle wrecks (increased from 60 to 500 for tanks, slightly less for trucks etc.). I'll be interested to see how this affects pathfinding on maps like Goodwood and Mersa Matruh with tanks in urban areas!

I tried disabling the aifixups script to stop static gun respawning, but got a CTD immediately I entered a destroyed gun that I'd repaired (2pdr on Siege of Tobruk). So it looks like this is still no good for SP. I suspect it wouldn't really have worked properly anyway as it's impossible to make bots "understand" that repairing the guns is vital. You'd probably get the occasional bot engineer repair a gun, but not as often as needed, so it would switch the imbalance over to the attacking side (tanks respawn, guns don't, so sooner or later the defenders will run out)

I'll definitely try increasing the spawn times for static weapons, which should be a partial fix for the issue.
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: djinn on 02-07-2010, 20:07:53
Perhaps, an alternative would be to get the repairers seeing that as top priority whenever... Bots in vanilla would chase tanks to repair them


I sent a message on BFSP to Clivewil, but as yet... just a few hours, haven't got a reply. The P51 was just be in the files though, cuz its not in his test map. An interesting thing I did note about his Stuka though, was that rather than use a divehorn you can activate, it comes on at a certain speed which is only achievable in a steep dive... even bots can do it :-)... Might be something the FH2 devs might want to add for their Stuka. Would do us good, I think
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Drawde on 02-07-2010, 20:07:24
Is the speed-activated divehorn in the AIX Stuka files? If so, it should definitely be possible to add it to the FH2 Stuka.
Bots don't usually seem to "dive-bomb" properly with the Stuka or any other plane, though (just shallow dives)
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: djinn on 02-07-2010, 20:07:59
Well, I did mention that to Clivewil since he seems to have an intricate understanding about changing so many aspects of planes... Wanted to know if he could help let Stukas fly alot higher, that way they'd make steeper dives. They'd also be less vulnerable that way

The current dive they DO do now does still give them speeds higher than cruise speed at any distance cuz they dive from far off and maintain it until they drop their bombs or are done strafing
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Drawde on 04-07-2010, 20:07:30
No luck with the rockets so far - tried changing the Typhoon rocket data in the .tweak file to match that in the AIX P-51, including the MultiFireArmTargetComp bit, but they still don't actually fire the rockets. However, they don't seem to use guns on ground targets anymore despite the guns not being disabled - which suggests that they're trying to fire rockets but for some reason can't.
Saw your post in the other thread re. contacting Clivewil - hope he can help out with this! I think I've given up on this problem for the time being.

I have had more luck with the Stuka siren, I've managed to integrate the AIX code into the FH2 Stuka, but currently the siren only activates when in a very steep dive. I'll see if I can lower the activation speed.

Anyway, I'll be releasing another beta version some time this week. It's not really polished enough for a non-beta release, but I haven't had that much time lately to work on or playtest it so I'd rather get a playable version out now than wait weeks more to get everything working correctly.
I've made numerous improvements + fixes since the last beta, but there are still some annoying bugs like bots not firing at gunner positions, and the CTD on Purple Heart Lane.
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: DirArtillerySupport on 04-07-2010, 21:07:08
Anyway, I'll be releasing another beta version some time this week. It's not really polished enough for a non-beta release, but I haven't had that much time lately to work on or playtest it so I'd rather get a playable version out now than wait weeks more to get everything working correctly.
I've made numerous improvements + fixes since the last beta, but there are still some annoying bugs like bots not firing at gunner positions, and the CTD on Purple Heart Lane.

Dude...use us.  Since there is little to no help in the single player community turn to your fans....we're real good at bitching. ;)
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: cannonfodder on 06-07-2010, 12:07:38
...The P51 was just be in the files though, cuz its not in his test map...
You have to take the Chinese main/airfield, then they'll spawn... ;)


...I have had more luck with the Stuka siren, I've managed to integrate the AIX code into the FH2 Stuka, but currently the siren only activates when in a very steep dive. I'll see if I can lower the activation speed...
IIRC, Clive had to raise(?) the air density on his Daqing Airwar map to get the sirens working properly...

And I'm pretty sure I remember reading on BFSP that BF2 bots won't do steep dives...



EDIT: You should always read the README boys, especially Clive's, they're always good for a laugh... ;)

Quote
On the Daqing AirWar map, the P-51D is not missing - the US must capture the enemy airbase and two P-51's will spawn there.

Quote
The Stuka sirens (properly named 'the Trombones of Jericho') are fully automatic and triggered by over-speeding; to function properly in a map, the map must have a raised air-density ceiling which is done by pasting 'physics.airDensityZeroAtHeight 5000' without the quotes, at the bottom of the map's init.con

Quote
I reserve the right to update these planes as i see fit. I reserve the right to never update them again. I reserve the right to dip them in cheese and nail them to a tree if i so desire.
- Warbirds II Readme
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Drawde on 06-07-2010, 21:07:29
I'll release the next beta version soon when I've sorted out the Stuka dive siren settings. There are several values which have to be adjusted to change the siren activation/deactivation speed thresholds, and there's a very fine balance between too low (siren tends to stay on almost constantly once the plane has built up speed after a dive, unrealistic and gets annoying quickly) and too high  (siren rarely activates when bots are flying the plane).

Currently I've got it nearly right but it still needs a bit more tweaking. With the AIX dive sound (similar to the FH1 one IIRC) being under Stuka attack is quite scary now  :o, especially on maps like Crete where you're under almost constant attack. It does give you "advance warning" of your tank/vehicle being dive-bombed, though (and possibly time to bail out + take cover) - previously, the whistle of an incoming bomb was usually the first (and last) thing you heard...
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: djinn on 06-07-2010, 22:07:15
Swe-eet! can't wait for the release. Arty blasting away, more focused strafing runs, agressive tank engagement and the Stuka divehorn?, man!

If you are going to change it anyway, have you DLed my link to the FH1 divehorn sound? You might find it befitting
http://www.filefront.com/user/mydjinny
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: General_Henry on 07-07-2010, 04:07:19
Just tried a round of totalize (as Germans), even with our epic German bias we barely won the game... (2 humans on our side, 24 bots, and 40 bots on their side)

when we're defending the windmill, we're simply pinned by MG fire and we can't see anything due to smoke barrages from allied tanks. Fortunately, I was rather accurate with the pzfaust in that round and my teammate did good job shooting enemy tanks.

If their infantry assault is slightly better we'll lose windmill for sure. It is tough to deal with bots who spam shells (HE) at your position. The bots could be better with their airforce too. (i.e. they don't rocket/bomb/strafe us for the whole round)
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: djinn on 07-07-2010, 09:07:42
Yes, the rockets are still an issue.

I kinda will miss that about smoke-firing tanks. But until they learn not to fire only that, that would be gone in the next release.

Totalize is my favorite map, a bit of a walk-over for gerry but quite the challenge for the canucks.

I do think Remick would tweak the navmesh a bit to get a more forceful push across the river at all points. Also the total frag count, even at 999% is too low for such an epic map (499 bots a side) Another note for remick
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Devilman on 07-07-2010, 09:07:18
Yes, the rockets are still an issue.

Just for a bit of fun,try this
open a planes tweak file,that doesnt shoot rockets,but has rockets (and one that uses the MG's)
change this,(code from aix_p51d_rockets)

ObjectTemplate.projectileTemplate Cal50_Airplane_Projectile

to this

ObjectTemplate.projectileTemplate P51D_FFAR

Now when they shoot their MG's,out will/should come rockets 
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: cannonfodder on 07-07-2010, 11:07:48
 ;D


The only problem with that is they mainly use the MG's against other aircraft, not ground targets.
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Remick04 on 08-07-2010, 07:07:09
I do think Remick would tweak the navmesh a bit to get a more forceful push across the river at all points. Also the total frag count, even at 999% is too low for such an epic map (499 bots a side) Another note for remick

Didn't I tell you to edit the Init.con file in the server.zip to fix the ticket ratio? :P If you're playing co-op it's useing the ticket ratio for the 16 player size... but since there is no 16 player size for Totalize the default is 50 per team. Which is far to low for this map. change the 'gameLogic.setDefaultNumberOfTicketsEx 16' lines to whatever you wantever you want... line '1' is germany and '2' is canada, I believe. This is an issue on a couple maps that don't have 16 player sizes... and something I certainly hope to fix.
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: djinn on 08-07-2010, 08:07:42
Thanks Remick.... I now recall that fix, sorry.

I hope I'm not off on this, but are there any more maps from either tweaked older maps or formerly un-navmeshed maps that you have now done that we can get our hands on?
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Devilman on 08-07-2010, 09:07:07
;D


The only problem with that is they mainly use the MG's against other aircraft, not ground targets.

So then open the weapons AI file and change this

Quote
rem * Machine gun *
weaponTemplate.create AIX_P51D_Cannons
weaponTemplate.indirect 0
weaponTemplate.minRange 5.0
weaponTemplate.maxRange 500.0
weaponTemplate.setStrength Infantry    0.0
weaponTemplate.setStrength LightArmour 5.0
weaponTemplate.setStrength HeavyArmour 3.0
weaponTemplate.setStrength NavalArmour 0.0
weaponTemplate.setStrength Helicopter  0.0
weaponTemplate.setStrength Airplane    9.0
weaponTemplate.fireRate 600
weaponTemplate.allowedDeviation 15.0
weaponTemplate.deviationCorrectionTime 0.5
weaponTemplate.deviation 1.0

To this

Quote
rem * Machine gun *
weaponTemplate.create AIX_P51D_Cannons
weaponTemplate.indirect 0
weaponTemplate.minRange 5.0
weaponTemplate.maxRange 500.0
weaponTemplate.setStrength Infantry    0.0
weaponTemplate.setStrength LightArmour 5.0
weaponTemplate.setStrength HeavyArmour 1 000 000.0
weaponTemplate.setStrength NavalArmour 0.0
weaponTemplate.setStrength Helicopter  0.0
weaponTemplate.setStrength Airplane    5.0
weaponTemplate.fireRate 600
weaponTemplate.allowedDeviation 15.0
weaponTemplate.deviationCorrectionTime 0.5
weaponTemplate.deviation 1.0

Example might be slightly exxagerated  ;)

If that works,then i will tell you phase 2  :)
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: cannonfodder on 08-07-2010, 10:07:02
Ok, gimme ten minutes...
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Devilman on 08-07-2010, 10:07:02
set this
weaponTemplate.setStrength HeavyArmour 1 000 000.0

to this
weaponTemplate.setStrength HeavyArmour 50.0
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: cannonfodder on 08-07-2010, 11:07:17
That's pretty funny... ;D

...but the bots aren't using the MG's now. Although when I posted this:
...The only problem with that is they mainly use the MG's against other aircraft, not ground targets.
...I hadn't actually tried it, so I'm not 100% sure if the Typhoon's (on Totalize) were using their MG's beforehand. Djinn will know.
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: djinn on 08-07-2010, 11:07:26
The used them against other aircrafts if I recall correctly, but they didn't attack ground targets... at least not those in vehicles... I do vaguely recall them strafing infantry before Drawde made armor higher priority for planes... Can't recall them strafing at all after that

For me, I'm counting on Clivewil checking out the planes and coming up with a 'fire-solution'. Also hinted for him to see if stukas can be made to fly higher and hence dive at greater speeds, but that's a latter issue and he would likely note it as low priority for now

Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Devilman on 08-07-2010, 11:07:34
Also hinted for him to see if stukas can be made to fly higher and hence dive at greater speeds, but that's a latter issue and he would likely note it as low priority for now


The aerial heightmap file,tells the bots the minimum distance from the ground to fly at
found in the AI/AIPathFinding folder
dont know how to read that file though
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: djinn on 08-07-2010, 11:07:51
Bots in AIX fly super high compared to FH2. Hopeing we can somehow make use of that since it will make the scout planes and Stuka less vulnerable to AA while allowing a steeper, deadlier dive on targets and a more realistic tweak for the divehorn AKA the trumpet of Jerricho
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Devilman on 08-07-2010, 12:07:01
Bots in AIX fly super high compared to FH2.

Ah,actually,they lowered the heightmap on certain maps,to make them fly lower
But either way,thats what controls their minimum flight height

So possibly some FH2 maps,have had their aerial heightmap lowered
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: djinn on 08-07-2010, 12:07:40
I do think Remick would tweak the navmesh a bit to get a more forceful push across the river at all points. Also the total frag count, even at 999% is too low for such an epic map (499 bots a side) Another note for remick

Didn't I tell you to edit the Init.con file in the server.zip to fix the ticket ratio? :P If you're playing co-op it's useing the ticket ratio for the 16 player size... but since there is no 16 player size for Totalize the default is 50 per team. Which is far to low for this map. change the 'gameLogic.setDefaultNumberOfTicketsEx 16' lines to whatever you wantever you want... line '1' is germany and '2' is canada, I believe. This is an issue on a couple maps that don't have 16 player sizes... and something I certainly hope to fix.

Why does it use the 16 sized map when its clearly a 64 sized map.... ? Doesn't the game recognize the skip in 16 and 32?

EDIT:
The bots are still only 499 :-( I changed the 16 size ticket to 400 and still got low tickets. Any other recommendations?
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Remick04 on 08-07-2010, 19:07:42
hmmm... that’s strange, that’s how I fixed the issue. Make sure you actually replace the Init.con file in the server.zip. The game is going to read all files from the client.zip and server.zip, except for the ones that aren't in there.

My best guess for why Co-op uses the 16 player ticket ratio is that vBF2 only had the 16player sizes for singleplayer. So when DICE added co-op mode with an adjustable bar for ticket ratio, they coded it to use the 16player sizes as the base ticket ratio. Playing in singleplayer should give you the proper ticket ratio per map size.
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: djinn on 08-07-2010, 22:07:02
Ok, figured the issue. When I saved it else where to work on it, textpad saved it as a .con.txt so it didn't replace the original when I dropped it back into server.con

Got it working now. I do wonder if this will be a fix or it would just have to remain this low througout because it shares count with Conquest Version 16-size?

Surprisingly, other maps don't have this issue... Many of which, I think have only 64 sized maps... like Cobra - Maybe, whatever solution those have would work in this case too?
Title: Re: 2.26 compatible (beta version) AI minimod
Post by: Remick04 on 08-07-2010, 23:07:44
Even Cobra is inaccurate to the 64 player ratio. It has 300 for each team for the 16player ratio, but the 64 one gives team 2 (US) 350.  It’s a particular issue on maps like Mount Olympus where the 16 player size has one team assaulting and thus needing more tickets, but the 64 player size has both teams assaulting and needs the ticket ratio to be even. I don't want to alter anything that will affect multiplayer but I do want to get the ratios to be more enjoyable in co-op. So maps without 16 player sizes I'll try and adjust to be more like the 64 size.

On an unrelated note Drawde have you tried setting the 'weaponTemplate.setFiresThroughTransparent' to 0 for weapons like the 88's to try and stop them from seeing through bushes and trees? I'm still a novice when it comes to ai... but I am trying to expand my knowledge on the subject if I'm going to be the 'official singleplayer dev'.

And the issue on PHL might have something to do with the new flag layout in 2.26, I'll try and look into it. Certainly something changed with 2.26 and this map because it was working fine before.