Jump to content
Sign in to follow this  
sanctuary

WW4 Modpack 1

Recommended Posts

Nice work,

I checked the other replacing troops models to see if i made the same lodnoshadow=1 mistake in a wrong lod for them too, but the shadow was good for them.

Hopefully this was the only one.

Share this post


Link to post
Share on other sites

You can add addons to WW4, the mod is not incompatible at all with addons.

The only incompatibility is with mods that feature their own config.bin or config.cpp, but that's something that is a problem with every mods anyways.

Now the problem with addons helicopter in the case of modified values is that addons feature their own settings.

And for an infantry to be able to shoot at a helicopter, as i pointed to the old thread, you must have the helicopter featuring a

accuracy=1000;

or the infantry will not shoot at them with their rifles and machineguns.

If an addon helicopter feature an accuracy value that is using the BIS accuracy=... ones, that do not allow infantry shoothing on helicopter, the AI infantry will not shoot at it unfortunately.

You would need to edit manually the addon config file yourself to give it the correct

value, if you want AI infantry to be able to defend itself against it.

accuracy=1000;

Now concerning the helicopters being more eager to engage infantry, again the addon own settings may not be good enough to allow that.

Especially if the addon has its own "sensitivy=...." value for the helicopter (that tells how much sensible the "eyes" of the helicopter are), that is needed as the helicopter are often blind to infantry.

The threat=.... line must allow the AI to understand an infantry is a threat (if the value corresponding to infantry is 0 , the helicopter will never bother attacking infantry).

And important to are the ammo definition, that define what is considered by the AI as short, medium or long range for eahc of its weapons, how much chance it has to attack at such distance, and the abstract "cost" value of such ammo (too high value and the AI will not use the weapon against "lesser targets")

Additionally, the helicopter AI attack stance is rather insane, they charge at their target instead of using a more realistic popup and hide behind obstacle , and so the gunner do not always have enough time to actually open fire.

And you have the model weight repartition itself that make the AI flying model sometime a joke (having a Mi-17 attacking ground infantry is hilarious, as the weight repartition is made so that the pilot will always try to be straight, it will extremely rarely point its nose to the target, and so will not allow the AI gunner to fire).

So yes helicopter addons are compatible with the WW4 mod, but i highly doubt that their AI helicopter will be able to behave like the WW4 AI ones will do unfortunately.

Additionally, some addons may try to stick with real helicopter specs for their turrets, but that is sadly often a very bad idea for the AI.

By example, give the AH1 turret in the config.cpp the ability to move on 360 degree. You will notice that it will often open fire on the infantry once it has already passed them with the insane "helo charging" behaviour.

With more realistic turret angles, the AI very very less often will fire at infantry because the gunner AI is unfortunately too slow to press its "open fire" button.

Edited by Sanctuary

Share this post


Link to post
Share on other sites

OK, I understand and thanks for the class.

From time to time, players like me, dream with a complete collection of good addons in order to have a total warfare available to make missions.

By now, I´m waiting for the next version of WW4.

Share this post


Link to post
Share on other sites

@Sanctuary: So what exactly should I do to make helicopter in my mod to kill infantry?

Can I just add 'accuracy=1000' value in 'my-mod' main config to all air vehicles definition?

And what about that "threat" values? I don't understand that...

Share this post


Link to post
Share on other sites

Here is an example for the BIS Mi-24

Open the main config from the bin folder for those explanations i will use the default BIS config, no mod, but adapting to a mod own config like WW4 should be piece of cake.

Look for

class Mi24:Helicopter

Scroll down a bit and find the line

accuracy=0.5;

This line prevent the AI infantry to attack the Mi-24 , change it to

accuracy=1000;

or much less, as with my test it even worked with

accuracy=5;

I guess i will not work when it is less than 1 (and as default value is 0.5 that why none fire on the Mi24)

While it enable the AI infantry to engage the Mi24 now, it makes it so that it will recognize it later than before, but at least unlike recognizing it early, it allows the AI infantry to shoot at it.

But the rule in the OFP engine is supposedly (because strangely sometime this rule does not work) that weapon damage multiplied by 10 must be superior to the

armor=...

of a vehicle, or the AI using such weapon will not want to fire at all on such vehicle.

In the case of the Mi-24 you can see that

armor=100;

It means a rifle must do more than 10 damages. But a possible workaround, like in the case of the M60 or the PK that can actually fire on such armor value despite their damage is 8 (8*10 = 80 so it is inferior to 100 and so the AI should never use a PK or a M60 on a Mi24) is to have the bullet defintion (class CfgAmmo) to have

airLock=1;

without that line (or if the class inherit from a parent class that has airLock=0;) the weapon will not open fire at a flying vehicle.

Now those parts are to do ONLY if you want the infantry to engage the Mi24, as nothing of these is actually helping the Mi24 to kill infantry.

Back to the Mi24, now we will make it more eager to kill infantry.

First the threat line :

threat[]={0.6,1,0.8};

Those number are between 0 (not interested at all) and 1 (priority target)

This means that that the Mi24 has an interest

-about attacking infantry : 0.6

-about attacking armor vehicle : 1

-about attacking air vehicle : 0.8

0.6 should good enough, the Mi24 is already interested in killing infantry, it just does not do it often because of some other problems we will try to circumvent there. But will be up this value to 0.8

First, the obvious possible reason : it does not detect the infantry or do so only after too much time.

Usually such AI detection is influenced by the lines

sensitivity=...;
sensitivityEar=...;

The Mi24 does not have those lines, but it inherit from parent classes :

sensitivity=1;
sensitivityEar=0.0075;

Basically it means it is blind to infantry, we want to boost those values a lot, let's add this inside of the Class Mi24

sensitivity=20;
sensitivityEar=20;

That should already be a very big difference.

Now a problem is that we have no idea who win between the pilot or the vehicle, if it is the vehicle, with those values it's good, but if it is the pilot, the Mi24 will continue to use the default sensitivity of the AI pilot that use the sensitivity of its parent class :

sensitivity=1;
sensitivityEar=0.13;

So let's boost those value for the Mi24 pilot (the pilot is used as the Mi24 gunner too)

Look for

class SoldierEPilot:SoldierEB

And add

sensitivity=20;
sensitivityEar=20;

Now well you don't want to fight a pilot with those values in an infantry combat, he would see and hear you from so far it would not be very fun, but to get a really lethal Mi24 we need this.

Now something else we can do to help the helpless "Charge !!! " insane AI behaviour when it fly a helicopter instead of using the real world tactic of "hide & popup" , is to allow the Mi24 to actually open fire from a longer distance.

To do so, in the class Mi24 let's see what weapon and magazine it is using :

weapons[]={"MachineGun30E","HellfireLauncherHind","Rocket57x64"};
	magazines[]={"MachineGun30E","HellfireLauncherHind","Rocket57x64"};

Two of those are important because these are the ones the AI can use on Infantry : Machinegun30E and Rocket57x64

So its main canon is called Class MachineGun30E , looking for it we see that the ammo is called class Bullet30E

Bullet30E inherit from class Bullet30 :

class Bullet30:ExplosiveBullet
	{
	hit=100;
	indirectHit=20;
	indirectHitRange=2;
	minRange=20;
	minRangeProbab=0.2;
	midRange=100;
	midRangeProbab=0.5;
	maxRange=1000;
	maxRangeProbab=0.05;
	cost=10;
	};

For the rockets we see : class Rocket57x64:ZuniLauncher38 is using

ammo="Rocket57";

So class Rocket57 in the CfgAmmo inherit value from

	class Zuni:Hellfire
	{
	hit=700;
	indirectHit=300;
	indirectHitRange=3;
	minRange=50;
	minRangeProbab=0.2;
	midRange=250;
	midRangeProbab=0.2;
	maxRange=1000;
	maxRangeProbab=0.05;
	maxSpeed=1000;
	simulation="shotRocket";
	simulationStep=0.05;
	cost=1000;
	soundHit[]={"Explosions\expl1",100.0000076,1};
	model="ZUNI";
	irLock=0;
	laserLock=0;
	maneuvrability=0.0;
	maxControlRange=0;
	initTime=0.05;
	thrustTime=3.5;
	thrust=500;
	};

Now pay attention, the important values in there are :

for the bullets :

		
minRange=20;
minRangeProbab=0.2;
midRange=100;
midRangeProbab=0.5;
maxRange=1000;
maxRangeProbab=0.05;
cost=10;

and for the rocket :

minRangeProbab=0.2;
midRange=250;
midRangeProbab=0.2;
maxRange=1000;
maxRangeProbab=0.05;
cost=1000;

The higher the cost, the less often an AI will want to use it against a target that it judges not important enough.

So there we see the AI is more eager to use bullets than rockets.

We want basically the helo to use the rockets at long range and switch to bullet at +/- middle range.

And we want to allow the AI to fire from longer range too, as he too often begin to fire when it is too near.

So we will consider the new ranges

long range : 2000

So we copy paste in the class Bullet30E:Bullet30 the following :

maxRange=2000;

maxRangeProbab=0.05;

cost=500;

[/code]

and in the class Rocket57:Zuni

maxRange=2000;
maxRangeProbab=0.05;

And always in the class Rocket57:Zuni we add

cost=500;

So it will use a bit more often the devastating rockets.

It is important to see that the more time is moving on, the more the target seems to become more costly, this means that it will rarely use the rocket at first, then will want to use them more after flying over and over .

But remember that the OFP AI pilot is insane when it pilot the helicopter, and often fail to aim the nose of the helo to the target, making rocket firing difficult and sometime not possible.

So it is always better to ensure the AI will use more its machinegun instead of the rocket, and leave them for later (cost = 500; )

Finally, we will give another edge to the Mi24 : the possibility to rotate its gun to 360 degree.

Why do that ? because in OFP the gunner AI is extremely slow to press the "fire" button if you look at the gun movements with binoculars.

When that artificial idiot is decided to press fire, due to the insane "Charge !!!" behaviour of the OFP helicopter, the helo is already moved over the infantry target.

With such modification it will then be able to engage infantry it has already moved over.

The Mi24 turret inherit from the Class Helicopter:Air turret,

		class TurretBase
		{
		gunAxis="OsaHlavne";
		turretAxis="OsaVeze";
		gunBeg="usti hlavne";
		gunEnd="konec hlavne";
		soundServo[]={};
		minElev=-20;
		maxElev=20;
		minTurn=-360;
		maxTurn=360;
		body="OtocVez";
		gun="OtocHlaven";
		};

	class Turret:TurretBase
		{
		};

What we want to change are the minEleve/MaxElev and MinTurn/MaxTurn

so inside the Class Mi24 we copy paste :

		class TurretBase
		{
		gunAxis="OsaHlavne";
		turretAxis="OsaVeze";
		gunBeg="usti hlavne";
		gunEnd="konec hlavne";
		soundServo[]={};
		minElev=-35;
		maxElev=20;
		minTurn=-360;
		maxTurn=360;
		body="OtocVez";
		gun="OtocHlaven";
		};

	class Turret:TurretBase
		{
		};

Finally, one of the big problem as i said is that the AI gunner is slow, even at max skill. So the Mi24 being able to reach a high speed may give even less firing opportunity to that slow gunner, so you may want to toy are the maxspeed of the chopper.

By example, in the Class Mi24 , change

maxSpeed=294;

into

maxSpeed=260;

Now you should learn to really fear a Mi24 , it will not just fly over your squad doing nothing but firing once each 5 minutes anymore.

Though don't expect a complete miracle, but an Ai Mi24 is now a lot more dangerous to infantry.

Share this post


Link to post
Share on other sites

Nice. looking forward to trying them out.

STGN

Share this post


Link to post
Share on other sites

I didn't thought i could find the willpower to make them, but there will finally be new pistol animations to fit with the current WW4 troops and anims in the upcoming official upgrade.

And some surprises along that ;)

Share this post


Link to post
Share on other sites

i made a small video of the gameplay i am trying to achieve for the pistols in WW4

Read the informations to see more of my goal.

Share this post


Link to post
Share on other sites

Looks great!

Although I would prefere if the left arm was more straight, so it would look more like what is used now a days.

STGN

Share this post


Link to post
Share on other sites

I have too much progressed into the pistol animation replacements to change the arms position anymore, it would need too much RTM to rework now.

Share this post


Link to post
Share on other sites

Okay, thort so much.

STGN

Share this post


Link to post
Share on other sites

Huge thanks to Solus, i found in his SLX config the way to get rid of the old problem of units that have only a handgun (like the BIS civilians police units) going to the "patrol" stance (with the hand catching ridiculously thin air as there isn't any rifle) when moving their handgun back to their holsters.

I will have to test a bit more if the solution is definitively bug free, as animations classes modifications have the annoying trend in creating new problems in other animations that worked perfectly so far.

Share this post


Link to post
Share on other sites
I hope a bit before the end of this month.

Excellent!!:bounce3:

You'll keep the class names of the first version of the mod?

Excuse me for the stupid question, but I´m working on some missions and I want to know if they will serve with the next version of the mod.

PD: I´m making one mission using WW4 and revive respawn 1.57 and works excellent even playing only with AI teammates.

Share this post


Link to post
Share on other sites

Do not worry, touching class names from the established ones from 1.0 is out of question, i am making my own missions and scripts and i know how much very annoying changing classes names is.

Hopefully you will have more toys to include in your missions in the upcoming upgrade.

Share this post


Link to post
Share on other sites

Sounds good, Sanctuary. And the new animations look great!

Since you're into tweaking the choppers' configs right now, I was wondering if there'll ever be new helicopters in the mod? Especially the East side lacks of lightly armed transport choppers in vanilla OFP... :confused:

Share this post


Link to post
Share on other sites

Are you going to add any more weapons? If you are, could you add an AN94. I emailed Hoyt earlier today from the ofpr.info forums in connection to my own little project and he emailed back pretty sharpish. He was fine with my modifications of it (admittedly purely config based, but he told me to do whatever I wanted.). It would be nice to have a reskinned version of it, because the model is ok, but the skin is a bit lacking. I would do it myself, but every attempt to do anything of this level has resulted in miserable failure so far.

Share this post


Link to post
Share on other sites

Helicopters will come for the 3 sides, but not for the WW4 upgrade, they will be for the expansion.

It would be nice to have a reskinned version of it, because the model is ok, but the skin is a bit lacking. I would do it myself, but every attempt to do anything of this level has resulted in miserable failure so far.

At some points i wanted to use a AN94 for some upcoming troop, but i am in the same state as you : i just am unable to make a decent textures for it.

Share this post


Link to post
Share on other sites

Mmmm, a little off topic, but because of my work making missions with WW4 I want to know if there are some tool like ArmaEdit for editing missions in OFP.

Share this post


Link to post
Share on other sites

A question regarding the pistol anims. Where will the primary weapon go? Will it just go on the units back, like in the standard safe anim? I just ask, cause I think it would be pretty cool if it went to a horizontal position across the bottom of the units back, as if theyd just dropped it behind them and it was hanging on the sling.

Share this post


Link to post
Share on other sites

They are going on the back , it is way too late now to change this as the whole pistol anims are nearly complete, too much anims would need to be re-edited now.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×