Ground unit placement by TacEdit TCL scripts

Falcon 4 general discussion (please no editing discussion)

Moderators: Lone Wolf, Snake Man

User avatar
Sherlock
Lt. General
Posts: 1167
Joined: 2006-05-24 22:01:01
Gaming Interests: Falcon 4.0
Editing Interests: All, I (try) to edit everything.
Location: Arizona, USA

Ground unit placement by TacEdit TCL scripts

Post by Sherlock » 2007-03-20 18:22:50

Ok, I've noticed over time that although the TCL scripts place the new ground units in a campaign in nice, little rows, most of the units themselves are NOT usually sitting on an objective. This causes no end of grief in Allied Force (I don't know about the other versions).

What this means is that the unit CANNOT move. For a unit to move in AF it MUST be situatated on an objective to begin with.

I did a little test last weekend to verify this. I tried getting all units in one of the Iranian campaigns to move even the slightest bit. Those that were sitting on objectives had no problem moving. Those not sitting on objectives never moved.

Then I went into TacEdit and moved several handfulls of units to ensure placement on an existing objective. Then I retested them. All units on objectives were easy to move (as long as they were in a region with good links). Those still not sitting on objectives were unmovable.

Although I have not tested this in other versions, I would think the same thing applies...?

Lesson learned. :)

Can the TCL scripts be redone to ensure they place ground units on existing objectives? Otherwise, we are back to manual placement (which I don't mind doing; but I know SM likes the automated process best).
Sherlock
Victurous te Saluto

phoenix
Recruit
Posts: 68
Joined: 2006-04-21 22:01:01
Location: ireland

Post by phoenix » 2007-03-20 18:38:18

Good find...

This was definitely a problem in SP4 ODS but i dunno if it exists or was fixed in RV\OF.

A bigger problem is that units assigned objectives cant reach their goals and ends up with CTD in middle of campaign or else clock just stops.

Snake Man
Commander-In-Chief
Posts: 9354
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Re: Ground unit placement by TacEdit TCL scripts

Post by Snake Man » 2007-03-21 04:03:00

Sherlock wrote:For a unit to move in AF it MUST be situatated on an objective to begin with.
Actually unit dont need to be on objective, road will do just fine OR somehow area which is accessible but dont ask me what is accessible, heh I dont know.
Although I have not tested this in other versions, I would think the same thing applies...?
I have no experience about the different ground unit movement between falcon versions.
Can the TCL scripts be redone to ensure they place ground units on existing objectives?
Yes.

I was actually thinking of making complete "division" scripts which would just need ONE x,y coordinate and then it would infest the area in somesort of formation (so they can be picked up separately in tacedit and they would not be on top of each other) of whole division or what ever that military name for the large organization was. But thats sort of besides the point. Also on fictional (completely fictional) campaigns I was thinking of adding infantry/tanks into priority cities, altough like this they would be hundred of miles away from FLOT, but there would be much more interesting deep behind enemy lines action going on then. Anyways.

In a nutshell, the formation which you see now can and should be tightened up a bit, I believe now the scripts place them in 100 x,y grid spaces apart (if I recall correctly). This could be made to 50 or even 25 so they are in much more nicer group/formation.
Otherwise, we are back to manual placement (which I don't mind doing; but I know SM likes the automated process best).
There is no point of making the task manually which can be done automatically, however in the final-FINAL 1.0 version we should move the ground units so they dont appear in the theater so clinically X-Y oriented formation.

The whole damned purpose of this post; yes we can tweak th ground units to move better / completely by tweaking the scripts. To chance the initial x,y and tightening the group/formation.
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

Snake Man
Commander-In-Chief
Posts: 9354
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Post by Snake Man » 2007-04-14 06:22:11

I did some tweaking for the battalion placement TCL script (create.brig.bat.sub.tcl file).

Code: Select all

#
# brigade adding with batallions
#

incr yc 2

# add brigade
set brigid [unit create $brgtype]
unit brigade set $brigid bflags 2 control $cntrl x $xc y $yc campid $brigid name $brigname unitflags 32 destx [expr $xc +1] desty [expr $yc +1]
unit brigade set $brigid aobj $assign division $divsn orders $ordr nunits 5

set xc [expr [unit brigade get $brigid x] -10]
set yc [expr [unit brigade get $brigid y] -3]
incr brigname 1

# batallion 1st
set bat1 [unit create $battype]
unit batallion set $bat1 bflags 2 control $cntrl x $xc y $yc campid $bat1 name $bname unitflags 32 destx [expr $xc +1] desty [expr $yc +1]
unit batallion set $bat1 aobj $assign division $divsn parent $brigid morale 100 orders $ordr
unit brigade set $brigid unit1 $bat1

set xc [expr [unit brigade get $brigid x] -5]
set yc [expr [unit brigade get $brigid y] -3]
incr bname 1

# batallion 2nd
set bat1 [unit create $battype]
unit batallion set $bat1 bflags 2 control $cntrl x $xc y $yc campid $bat1 name $bname unitflags 32 destx [expr $xc +1] desty [expr $yc +1]
unit batallion set $bat1 aobj $assign division $divsn parent $brigid morale 100 orders $ordr
unit brigade set $brigid unit2 $bat1

set xc [unit brigade get $brigid x]
set yc [expr [unit brigade get $brigid y] -3]
incr bname 1

# batallion 3rd
set bat1 [unit create $battype]
unit batallion set $bat1 bflags 2 control $cntrl x $xc y $yc campid $bat1 name $bname unitflags 32 destx [expr $xc +1] desty [expr $yc +1]
unit batallion set $bat1 aobj $assign division $divsn parent $brigid morale 100 orders $ordr
unit brigade set $brigid unit3 $bat1

set xc [expr [unit brigade get $brigid x] +5]
set yc [expr [unit brigade get $brigid y] -3]
incr bname 1

# batallion 4th
set bat1 [unit create $battype]
unit batallion set $bat1 bflags 2 control $cntrl x $xc y $yc campid $bat1 name $bname unitflags 32 destx [expr $xc +1] desty [expr $yc +1]
unit batallion set $bat1 aobj $assign division $divsn parent $brigid morale 100 orders $ordr
unit brigade set $brigid unit4 $bat1

set xc [expr [unit brigade get $brigid x] +10]
set yc [expr [unit brigade get $brigid y] -3]
incr bname 1

# batallion 5th
set bat1 [unit create $battype]
unit batallion set $bat1 bflags 2 control $cntrl x $xc y $yc campid $bat1 name $bname unitflags 32 destx [expr $xc +1] desty [expr $yc +1]
unit batallion set $bat1 aobj $assign division $divsn parent $brigid morale 100 orders $ordr
unit brigade set $brigid unit5 $bat1
incr bname 1
The coordinates where they are positioned are the set xc and set yc parts, like in the end +10 and -3 coords. Thats about half of the previous amounts which is quite okay for me. Also in the top of the script you see incr yc 2 which means when you take mouse over tacedit and get the x,y coords, the actual brigade "heading" unit and the lined up batallions will be in center of this position, ie the brigade is two y coords higher than what you type in. Hmm if that makes any sense.
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

Snake Man
Commander-In-Chief
Posts: 9354
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Re: Ground unit placement by TacEdit TCL scripts

Post by Snake Man » 2008-10-30 16:01:08

I would like to make few extra variables in the create.brig.bat.sub.tcl function as right now it increments the xc and yc variables, making the troop concentrations shift down and right each time you call the function/tcl without setting the new coordinates.

I came across this as in my latest campaign work I just give xc, yc coordinates and then call the brig.bat.sub tcl for like five or ten times, which results in long string of units positioned closer and closer to SE direction each time.

As I said earlier, we definitely need some advanced script that placed like divisions or at least large troop organizations, its no point of picking the spot for each battalion by yourself. Just pick a spot and then let script create you tanks, infantry, support and arty as well as possible spec ops and other special units.
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

Biker
Recruit
Posts: 13
Joined: 2008-10-30 16:53:21

Re: Ground unit placement by TacEdit TCL scripts

Post by Biker » 2008-10-30 17:04:42

Hi Snake Man,

just had a look at your scripts today...

Maybe you want to try this.
First is to make the number of battalions assigned to brigade not always five.

Code: Select all

set num [expr {int(rand()*20)/10+3}]
unit brigade set $brigid aobj $assign division $divsn orders $ordr nunits $num 
Next does create the battalions around brigade in randomly.

Code: Select all

set rand_x [expr {int(rand()*20-10)}]
set rand_y [expr {int(rand()*20-10)}]
set xc [expr [unit brigade get $brigid x] +$rand_x]
set yc [expr [unit brigade get $brigid y] +$rand_y]
incr brigname 1

# batallion 1st
set bat1 [unit create $battype]
unit batallion set $bat1 bflags 2 control $cntrl x $xc y $yc campid $bat1 name $bname unitflags 32 destx [expr $xc +1] desty [expr $yc +1]
unit batallion set $bat1 aobj $assign division $divsn parent $brigid morale 100 orders $ordr
unit brigade set $brigid unit1 $bat1
For the fourth and fifth battalion did add the check if those should be added.

Code: Select all

if {$num > 3} {
	set rand_x [expr {int(rand()*20-10)}]
	set rand_y [expr {int(rand()*20-10)}]
	set xc [expr [unit brigade get $brigid x] +$rand_x]
	set yc [expr [unit brigade get $brigid y] +$rand_y]
	incr bname 1

	# batallion 4th
	set bat1 [unit create $battype]
	unit batallion set $bat1 bflags 2 control $cntrl x $xc y $yc campid $bat1 name $bname unitflags 32 destx [expr $xc +1] desty [expr $yc +1]
	unit batallion set $bat1 aobj $assign division $divsn parent $brigid morale 100 orders $ordr
	unit brigade set $brigid unit4 $bat1
}
What's missing is to make the battalion types also random from a given assortment.
E.g. for DPRK a armored brigade can consist T-55, T-62, BMP-2 and others...

Hope this does help a little. ;-)

Cheers
Biker

Snake Man
Commander-In-Chief
Posts: 9354
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Re: Ground unit placement by TacEdit TCL scripts

Post by Snake Man » 2008-10-30 17:57:29

Wow that's very nice, it will nicely break up the line formations that we have now. Thanks for the TCL tip's Biker :)
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

User avatar
Sherlock
Lt. General
Posts: 1167
Joined: 2006-05-24 22:01:01
Gaming Interests: Falcon 4.0
Editing Interests: All, I (try) to edit everything.
Location: Arizona, USA

Re: Ground unit placement by TacEdit TCL scripts

Post by Sherlock » 2008-10-30 19:59:24

Eggselent!
Sherlock
Victurous te Saluto

Return to “Falcon 4 General”

Who is online

Users browsing this forum: ClaudeBot [Bot] and 0 guests