Capture Enemy Units

Modders can post their questions on scripting and more.

Moderators: Slitherine Core, BA Moderators

Post Reply
junk2drive
BA Moderator
BA Moderator
Posts: 1478
Joined: Sun May 23, 2010 4:47 pm
Location: Arizona USA -7GMT

Capture Enemy Units

Post by junk2drive »

Slitherine has added captured units for the German campaign in BF. Enemy units are hidden until contact and then are turned into friendly units.

Merr has created scripts for interactive capture of enemy units. The unit must be destroyed. If it surrenders it is lost. The action is done by infantry and costs one man to capture. The unit retains the enemy crew but the icon changes to the friendly side for ID. More details when it is finalized.

Image

Image
You can call me junk - and type that with one hand.
MikeAP
Master Sergeant - U-boat
Master Sergeant - U-boat
Posts: 543
Joined: Fri Sep 03, 2010 3:14 pm

Post by MikeAP »

My only gripe would be...how well do you think a US Soldier would know how to operate a PAK75? Or vice versa. Realistically, not very well. The unit should suffer a serious degraded accuracy, since the new operator doesnt know the weapon system very well.
junk2drive
BA Moderator
BA Moderator
Posts: 1478
Joined: Sun May 23, 2010 4:47 pm
Location: Arizona USA -7GMT

Post by junk2drive »

These kinds of things get debated all the time for other games too. Soldiers don't take turns in real war either but we still play our games.

It's only a game and people can choose to use the mod or not. I doubt that Slitherine would force this into MP battles.

Let's pretend that the crew was captured and cooperated with us.
You can call me junk - and type that with one hand.
Ryben
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 281
Joined: Sun Dec 02, 2007 2:12 pm
Location: Spain

Post by Ryben »

Bf has a light tone and doesn´t pretend to be 100% realistic so it´s fine for me you could capture enemy guns...
Merr
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 903
Joined: Mon Aug 16, 2010 2:00 pm

Post by Merr »

Thanks for posting Junk ... I have some comments.

First .. MikeAP ... I agree with you ... it's bogus. You have some great points! Perhaps I should introduce special "crew" teams that can only capture the other sides gun.
For the most part, it's just for fun really. Besides, I figured folks don't seem to mind capturing stuff in BF ... eh, why not twist reality a bit more.
Funny story ... In the Battle of Singling, some Germans tried to capture an M4 that was abandoned ... it's motor worked ok, the gun was knocked out. I think they got as far as starting the motor when the US realized it wasn't their boys in the tank.

Ok ... some quick notes ...

Not only can you capture a gun, but you can also "re-man" your own destroyed guns.

The player will note that in the screenshot, the US Soldier was "killed" and not removed from play. Unfortunately I don't see a means of removing a soldier "mask" without animating his death.

Next, you will see that the "re-manned" AT gun has a German soldier, not a US Soldier (or shall I say, a soldier in US skins). This is because I'm using code to add the gun back into play, not a unit that is added via the SQUADS.CSV. I'm trying to get away from adding units to the CSV because it has limits and I'm hoping we (as modders) can have the ability of swapping out skins (and voices) without duplicating and subsequently adding it to the CSV.

The "captured" gun (if it was german owned) will retain it's native tongue. Even though it belongs to side(0), that's you, it appears that the game engine is reading the "MadeBy" definition in the CSV :?: . Now, to fix this, I can add specific conditions that will play the correct voice, but at the moment, I'm leaving it alone.

Anyway, just to let players know ... It's not perfect, but it's functional.

Thanks!
Last edited by Merr on Sun Dec 19, 2010 2:20 pm, edited 1 time in total.
Merr
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 903
Joined: Mon Aug 16, 2010 2:00 pm

Post by Merr »

Oh... one thing I forgot to add ...

I was thinking this "feature" could be usefull when spicing up an MP game!

Think of it .... the gun gets knocked out ... :shock:

Should I bulldoze it or re-man it (thinks the poor player that lost the gun) :?

Too late ... the other guy just stole it !! :x

Yeah yeah yeah ... bogus smogus ... but I had a good time playing!
junk2drive
BA Moderator
BA Moderator
Posts: 1478
Joined: Sun May 23, 2010 4:47 pm
Location: Arizona USA -7GMT

Post by junk2drive »

There were lots of captured units used by both sides during the war especially on the East Front. But I agree that some training was involved and repainting and such.

Like Merr said, it's just for fun and a good designer can make it necessary to capture a unit to win the battle.
You can call me junk - and type that with one hand.
adherbal
The Artistocrats
The Artistocrats
Posts: 3900
Joined: Fri Jun 24, 2005 6:42 pm
Location: Belgium

Post by adherbal »

It should be fairly easy to change the units voice with the following function:

SetAttrib(capturedUnitID, "SoundBank", nationID) ;

call it with the correct attributes after creating the captured unit. An example directly from France3:

PlaceUnit(17, 27, 0, 0, 0, "RENAULTFT17") ;
SetAttrib(GetGlobal("gTransport"), "SoundBank", 1) ;

I think you can also change it's effectiveness (combat stats) with this command, altho it might be reset to original stats at the beginning of every turn - not sure.
Merr
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 903
Joined: Mon Aug 16, 2010 2:00 pm

Post by Merr »

junk2drive wrote: But I agree that some training was involved and repainting and such.
The "I's" have it !!

I'll change the attributes ;
1. Lower Accuracy
2. One shot
This includes "re-manned" stuff as well.

Thanks for your feedback everyone .... including you MikeAP :P ... I should have considered this before.

Yeah, yeah ... there goes the neighborhood!
Merr
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 903
Joined: Mon Aug 16, 2010 2:00 pm

Post by Merr »

adherbal wrote:It should be fairly easy to change the units voice with the following function:

SetAttrib(capturedUnitID, "SoundBank", nationID) ;

call it with the correct attributes after creating the captured unit. An example directly from France3:

PlaceUnit(17, 27, 0, 0, 0, "RENAULTFT17") ;
SetAttrib(GetGlobal("gTransport"), "SoundBank", 1) ;

I think you can also change it's effectiveness (combat stats) with this command, altho it might be reset to original stats at the beginning of every turn - not sure.
Excellent ... thank you sir!
Post Reply

Return to “Battle Academy : Modders Corner ”