Page 7 of 8
Re: Adding new functionality to engineers...?
Posted: Wed Mar 20, 2013 7:47 am
by GottaLove88s
Haha, that's fair. I just experiment to understand more. I promise to cease and desist, lol...
I suspect I may have misexplained. For all functions, it must be the engineers first move. And all moves consume 8 AP (so they're not easy mortar targets).
Merci encore Amaris!

Re: Adding new functionality to engineers...?
Posted: Wed Mar 20, 2013 10:22 am
by Amaris
GottaLove88s wrote:Haha, that's fair. I just experiment to understand more. I promise to cease and desist, lol...
I suspect I may have misexplained. For all functions, it must be the engineers first move. And all moves consume 8 AP (so they're not easy mortar targets).
Merci encore Amaris!

You are right. This is the best way to learn.
But I don't help! No comments on code, weird stuff with ';'

Re: Adding new functionality to engineers...?
Posted: Wed Mar 20, 2013 4:14 pm
by pk867
Hi Amaris,
Wonderful work !
I think you are correct about using a satchel charge was removing walls and tank traps. The thing with bridges you may have to require a truck adjacent to the spot you build the bridge. I do not think the engineers carried all that stuff on their backs!

Re: Adding new functionality to engineers...?
Posted: Wed Mar 20, 2013 4:41 pm
by Amaris
pk867 wrote:Hi Amaris,
Wonderful work !
I think you are correct about using a satchel charge was removing walls and tank traps. The thing with bridges you may have to require a truck adjacent to the spot you build the bridge. I do not think the engineers carried all that stuff on their backs!

Thanks!
For the satchel charge I'm not decided yet.
Blow up a bridge:
Construc a pontoon(*):
(*) just a pontoon, not a bridge. So no need to truck (feint of lazy coder.)

Re: Adding new functionality to engineers...?
Posted: Wed Mar 20, 2013 4:52 pm
by Amaris
Version 5 available! Same address:
http://amaris-games.com/ba-amaris/improved-engineer/
New special action:
- Add tank trap.
- Remove tank trap.
- Terraform: forest/tree -> mud -> open grass
- Cutting hedge with wall removal.
- Burn High Corn, Tall Corn and Dune Gras.
- Blow up a bridge.
- Construct a pontoon.
All action consume 8 AP. And these actions must be done before move.
Enjoy!
I need to feedbacks to finish this mod.

So don't be shy
Particularly for or against the use of a satchel charge for remove tank trap, cut hedge and blow up a bridge. Thanks.

Re: Adding new functionality to engineers...?
Posted: Wed Mar 20, 2013 5:09 pm
by Amaris
MINI-FAQ:
How to use it in my own campaign?
First this mod is do with the vanilla version of BA. Particularly for the units.
If you have your own squad.csv you must check if the unit of engineer ( "us_engineer", "afrika_korps_engineer", "british_engineer" and "german_engineer") are still here.
If not you must add them or edit all the scripts.
Then just copy the DATA folder of improved engineer mod in your own campaign's folder.
Open the TEXT1.TXT file of improved engineer and copy the marked part into your own TEXT1.TXT.
Finish!
Re: Adding new functionality to engineers...?
Posted: Wed Mar 20, 2013 11:02 pm
by GottaLove88s
Great work, mon ami!
I was doing some final testing with your latest version, prior to dropping it into our GJS'44 Normandy Ninjas Tourney...
There's one little glitch that's new.
I notice that when I execute one of the new functions, for example Demolish Wall or Cut Trees, the engineer carrying out the action is made visible to the MP opponent, even when the opponent has no units nearby... This would make that engineer highly vulnerable to mortar fire... and it didn't happen in the previous version...
Could this be a factor of making the engineer vulnerable to response fire? I believe that was added between versions?
Btw you've even added Bridge charges and Pontoons??!! WOW!!
Re: Adding new functionality to engineers...?
Posted: Thu Mar 21, 2013 6:29 am
by Amaris
No time to make the correction myself today.
But I think it'll ok if you remove the following line:
in all scripts.
Re: Adding new functionality to engineers...?
Posted: Thu Mar 21, 2013 6:39 am
by GottaLove88s
Thanks Amaris, That makes sense.
It's great to have enemy able to respond if they can see the engineer. They'll hear the explosion so they're bound to be curious.
But they shouldn't be able to see the attacker, if they have no units nearby.
I'll remove the
SetForceVisible(me, 1) lines from the new mods.
Great work, monsieur, et merci encore...

Re: Adding new functionality to engineers...?
Posted: Thu Mar 21, 2013 4:46 pm
by Amaris
I has add the SetForceVisible(me, 1); because I think it was necessary for opportunity shoot. But this is not the case I guess. Sometimes I want to do too much.
I'll take a little break on this mod. Time to decide whether to use or not satchel charges.
I think of other possible actions, but I think it has everything you need.
MINI-FAQ2:
Very nice mod but I don't want this or that feature in my campaign?
Simple! After making the copy described in the 1st FAQ, localized the
$DEFAULT.BSF file in your
\DATA\BATTLE\Scripts\ campaign's folder.
Edit it (for PC: use notepad / for Mac/Ipad: [mode troll]There Are (may be) Apps (to bought) For That[/mode troll]

).
The part that interests us as follows:
Code: Select all
// IMPROVED ENGINEER:
include "TERRAFORM1.BSF"
include "TERRAFORM2.BSF"
include "TANKTRAP.BSF"
include "ADDTRAP.BSF"
include "CUTHEDGEDROW.BSF"
include "BURN.BSF"
include "DESTROY_BRIDGE.BSF"
include "ADDBRIDGE.BSF"
// END OF IMPROVED ENGINEER
To disable a feature, simply delete the corresponding line (or put it on comment by placing // at the beginning of the line.)
For example, if you don't want the construction of pontoon, you must have:
Code: Select all
// IMPROVED ENGINEER:
include "TERRAFORM1.BSF"
include "TERRAFORM2.BSF"
include "TANKTRAP.BSF"
include "ADDTRAP.BSF"
include "CUTHEDGEDROW.BSF"
include "BURN.BSF"
include "DESTROY_BRIDGE.BSF"
//include "ADDBRIDGE.BSF"
// END OF IMPROVED ENGINEER
or
Code: Select all
// IMPROVED ENGINEER:
include "TERRAFORM1.BSF"
include "TERRAFORM2.BSF"
include "TANKTRAP.BSF"
include "ADDTRAP.BSF"
include "CUTHEDGEDROW.BSF"
include "BURN.BSF"
include "DESTROY_BRIDGE.BSF"
// END OF IMPROVED ENGINEER
'Et voilĂ !'

Re: Adding new functionality to engineers...?
Posted: Sat Mar 23, 2013 5:01 pm
by Amaris
Amaris wrote: Time to decide whether to use or not satchel charges.
Answer found!
Version 6 is available at the same address:
http://amaris-games.com/ba-amaris/improved-engineer/
But there are two different versions.
One without using a satchel charge (vanilla) and the other where the demolition action (remove tank trap, blow up a bridge, cut hedgedrow and terraform1) require a satchel charge.
Re: Adding new functionality to engineers...?
Posted: Sun Mar 24, 2013 9:51 am
by GottaLove88s
Merci Amaris!
Great idea for 'real engineers' to consume their satchel charges to execute demolition actions... I will update with the next version of the Tourney...
I wonder, perhaps stretching the idea that the satchel charge icon represents materials used, please would you consider:
(i) Add Tank Trap also consumes 1 unit of materials (ie. 1 satchel charge)
(ii) Perform a check to prevent the placement of Tank Traps INSIDE FOREST (see below, lol)
GottaLove88s wrote:Painting by Tank Traps...
As a cocktail of Murphy's Law and the Law of Unintended Consequences, it has come to the attention of Strategic Allied Command that certain Enemy Commanders have begun to "Paint by Tank Traps"... Below our Mosquito recon has caught just such an intrepid German engineer brigade in action... where it has laid no less than TWELVE Tank Traps, in about four hours (turns) of battle... drawing a solid line of tank traps from Carpiquet's Main Gate flag and then
three squares into the Forest itself...
Tank Traps are considered an asset of war, and may be employed in any natural circumstances, including blockading one's own roads, if Commanders so wish... However, I will have a chat with Amaris about perhaps preventing their placement within Forest... This would seem to be a pixelated fantasy of a historical inaccuracy...
But, NICE TRY BUSTER... The Canucks are still coming for you, eh!!

Re: Adding new functionality to engineers...?
Posted: Sun Mar 24, 2013 9:54 am
by GottaLove88s
Please explain how to adapt your code so that larger scale actions consume THREE charges, rather than only one...
I would like to enhance the "Blow Bridge" and "Build Pontoon" actions so that they perform a check that the engineer has at least 3 charges, and then deducts 3 units of material (charges) for the action. Blowing or building a bridge seems to be a major order of magnitude bigger than knocking a hole through a hedgerow wall...
What do you reckon?
Re: Adding new functionality to engineers...?
Posted: Sun Mar 24, 2013 9:56 am
by Amaris
Damned players! As terrible as my 'users'.
Look your mail.

Re: Adding new functionality to engineers...?
Posted: Sun Mar 24, 2013 10:01 am
by Amaris
GottaLove88s wrote:Please explain how to adapt your code so that larger scale actions consume THREE charges, rather than only one...
I would like to enhance the "Blow Bridge" and "Build Pontoon" actions so that they perform a check that the engineer has at least 3 charges, and then deducts 3 units of material (charges) for the action. Blowing or building a bridge seems to be a major order of magnitude bigger than knocking a hole through a hedgerow wall...
What do you reckon?
It's pretty easy
Find following lines in the .bsf files corresponding to the action you want:
Code: Select all
if (GetAttrib(me, "APCharges") < 1)
and :
And change the lines by:
Code: Select all
if (GetAttrib(me, "APCharges") < X)
and :
And change
X by the desired values (ie 1, 2, 3, ...)
Re: Adding new functionality to engineers...?
Posted: Sun Mar 24, 2013 10:34 am
by GottaLove88s
Thanks A!
Does this code already exist (in the 1 charge form) for Add Tank Trap and Build Pontoon Bridge?
Or should I just copy it over from the demolish code, into approximately the same location?
Re: Adding new functionality to engineers...?
Posted: Sun Mar 24, 2013 10:37 am
by GottaLove88s
Amaris wrote:Damned players! As terrible as my 'users'.
Haha, oui, c'est vrai! Some of my opponents are phenomenally sneaky, mon ami...
Do you know why it's impossible to make anything for humans foolproof? Because fools are truly ingenious!!

Re: Adding new functionality to engineers...?
Posted: Sun Mar 24, 2013 10:39 am
by GottaLove88s
Amaris wrote:Look your mail.

Just got it! I understand. Good luck mon ami.
As usual, I love and agree with most of your ideas.
Have an interview tomorrow (so should stop messing with BA for the next 48 hours).
But will write a full reply Tuesday... We can do this...!!

Re: Adding new functionality to engineers...?
Posted: Sun Mar 24, 2013 11:15 am
by Amaris
Allright's.
I'm working now on an another 'improved' project.

Re: Adding new functionality to engineers...?
Posted: Wed Mar 27, 2013 7:08 am
by GottaLove88s
Hi Amaris,
Please could you show us how to add the check step, to verify that the terrain the engineer is standing in, is NOT forest, before it is permitted to construct a Tank Trap? Knowing you, you've probably already done this somewhere. Sorry if I've missed it...
