PDA

View Full Version : Ambush mod



cf_nz
8th Apr 07, 4:11 AM
This is a small mod that grants the camouflage and hold fire ability to infantry units (except pioneers and engineers - due to ui space limitations), mortars and MGs, while they are in green cover. This is for both Allies and Axis. Snipers and Stormtroopers retain their usual camouflage ability.

There was an issue with being able to move a camouflaged unit out of cover and remain camouflaged , you could not un-camouflage the unit unless you returned to green cover. To get around this I've given every other cover type modifiers that remove camouflage . What this means in game is that if one of your squad members is standing out of green cover, you will not have access to the hold fire ability. I've tweaked the formations for mortars and MG to try to help with this issue.

To allow you squads to fire at will it is better to disable the camouflage rather than click the hold fire/fire at will button. It looks a little silly to have your MG firing but all 3 squad members still camouflaged. I also had issues with some squad members not firing until un-camouflaged.

Camouflaged units have the same speed penalty as for snipers, they also are unable to cap point (again as for snipers).

-------------------

The idea for this came from here: May ambushing be a tactic? (http://forums.relicnews.com/showthread.php?t=143349&page=2&pp=15)

Any problems, questions, ideas for improvements please post them here.

You are free to modify this, include it in mods, do what ever. If you do use it, credit would be nice.

-------------------

A brief list of what I have done:

- Created a new camouflage ability with a cover requirement (green).
- All soldiers (ebps) and weapons (mortars, MGs - props) have the camouflage_ext.
- All cover types (except green) have modifiers that remove the ones given by the camouflage ability.
- (There may be more that I can't think of at the moment).

Quad
9th Apr 07, 2:19 AM
AI uses it too? :( :( :(
Anyway very cool MM

Genghis_Kan
9th Apr 07, 4:25 PM
this is cool man. since im a noob modder (havent play coh 4 months due to broke down PC) i wanna ask can u add camo layer to vegetation, eg a tree. this would be much better. btw maybe u should merge this with another mod. anyway great job

EyesThatBlaize
11th Apr 07, 4:53 AM
Heh, once I asked a similiar question.

I actually implemented it into my own mod shortly after asking, but I'm still trying to work on a way to have building based ambushes work...

As in soldiers in buildings remain undetected until the enemy is close, and you give the order to fire.

Still, I can't put my finger on how to do it, and in honesty I've become tied up in other matters.

Ciao,
-Blaize

Ramfanatic
11th Apr 07, 11:57 AM
This is a very nice little mod. Good how the camo characteristic is unique to the units (not same as sniper or stormtroopers - can't be toggled and must meet certain conditions).

Which file is it you used to set which conditions are acceptable for turning camo? i.e. now it is "green"

Also, I noticed once the unit turnes camo, and moves to another position, they remain camo, it can't be switched off til they reach another green area. Is that intentional?

Thanks for a very nice mod, ambushes are another tactic in the mix now!

cf_nz
11th Apr 07, 2:59 PM
@ Quad
Does the AI use this??? I must admit I got distracted and my testing was limited to does it work. I know very little about how the AI works.

@ Genghis_Kan
Camo a tree, why??? I guess it's possible.

@ EyesThatBlaize
Yeah hold fire in building would be the next step. No idea how to do it though. You would need to get the unit UI to display when selected, over-riding the building UI.

@ Ramfanatic
The camo ability file has the requirement for green cover. I had issues with units keeping camo if they move (as mentioned in the 1st post), it is not intentional. I've fixed that for most situations by adding opposite modifiers to every other cover type. In theory once all squad members are out of green cover and into another cover type camo should (as does by my limited testing) turn off.

Genghis_Kan
12th Apr 07, 5:21 AM
Well maybe not a tree but something like hedges or bush if u know wt i mean. So ambush dont come with green cover and people have to choose either to place a unit in green cover with no surprise or nothing (without shield) but with suprise

banereaver
1st Jun 07, 3:43 AM
could you please explain how you managed to make it so that when the camoflauged units moved away from cover there camo turns off, because i cant seem to get it to work

cf_nz
1st Jun 07, 4:20 AM
Umm, something to do with this, I forget the specifics now:


- All cover types (except green) have modifiers that remove the ones given by the camouflage ability.
Have a look through the cover tables in the infantry files, for everything but heavy cover.

I think I added the same camo modifiers to all other cover types but reversed the enable/addition number.

eg. for camo on -> enable = 1, camo off -> enable = -1.

djukel
19th Jul 07, 2:01 PM
Can somebody tell me how Camouflage ability and Hold fire are connected? I mean i did not find Hold fire ability (in ability folder) but using Camouflage enable it somehow. I am confused. I would like to make a squad that have Camouflage ability (without Hold fire!) and have separate Hold fire ability which can be activated whenever I like. Is this possible?

cf_nz
19th Jul 07, 2:18 PM
In data\game\taskbar.lua (line 1112) is this piece of code:


{ bind = "command_toggle_camouflage", ui = command_buttons[6], hk = "hold_fire_toggle", tt = tt_help_box },

That's as much as I've figured out about a link between camo and holdfire. If you removed that line of code it may disable the link.

djukel
19th Jul 07, 2:38 PM
It was FAST! Thanks it is working now.:)

djukel
20th Jul 07, 12:18 PM
Unfortunately most of the heavy covers are small to hide bigger squads (like 6 or more man) or hard to find the right place around object to everybody go cover.:(
---------------------------------------------------
Ok! I found the cure. Do not need to modify infantry cover_ext just enough to change the ability. Make action\ability_action\requirement_action.lua and put heavy cover for requirements and will work.:)