Tacedit - TCL corner
Moderators: Lone Wolf, Snake Man
-
- Commander-In-Chief
- Posts: 9784
- 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
Tacedit - TCL corner
TCL scripting topics for Tacedit!
When you post pieces of TCL code here, you must use the CODE feature of this forum software. Meaning:
(code)
blabla my code rocks!
(/code)
And replace () with [] to make it work, that was just an example. Or you can use the CODE button in the forum software.
So first example tacedit tcl scripts you can find from the latest package. Codec made fine job with the PAK ADDER script and there are also two little less complicated ones too.
If you guys have any specific tasks you always wanted tacedit to do, now would be good idea to post ideas here, some code geeks might write script up for you.
Let the scripting start!
When you post pieces of TCL code here, you must use the CODE feature of this forum software. Meaning:
(code)
blabla my code rocks!
(/code)
And replace () with [] to make it work, that was just an example. Or you can use the CODE button in the forum software.
So first example tacedit tcl scripts you can find from the latest package. Codec made fine job with the PAK ADDER script and there are also two little less complicated ones too.
If you guys have any specific tasks you always wanted tacedit to do, now would be good idea to post ideas here, some code geeks might write script up for you.
Let the scripting start!
Last edited by Snake Man on 2007-03-04 14:26:57, edited 1 time in total.
Important 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."
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."
-
- LeadPursuit
- Posts: 103
- Joined: 2001-03-07 23:01:01
- Location: UK
Re: Tacedit - TCL corner
Some simple stuff...
How to iterate through all objectives currently defined.
How to iterate through all objectives currently defined.
Similar thing for unitscode:Code: Select all
foreach oid [objective list] { # do something with each objective. printout "Objective $oid is at " [objective get $oid x y] }
code:Code: Select all
foreach uid [unit list] { # do something with each unit. printout "Unit $uid is at " [unit get $uid x y] }
F4ut
-
- Lt Colonel
- Posts: 299
- Joined: 2000-08-04 22:01:01
- Location: tarrytown,ny
Re: Tacedit - TCL corner
Hmmm, is there any possible way to change the formations of ground units? 99.9% of the time they move in column formation, .05% in line, .05% in wedge. Is this just wishful thinking, Pi in the virtual sky.
-
- Commander-In-Chief
- Posts: 9784
- 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: Tacedit - TCL corner
This nicely removes all objectives named "NoName".code:Code: Select all
set num 0 set olist [lsort -integer [objective list]] foreach var $olist { set fish [objective name $var] set cat NoName if {[lsearch $fish $cat] !=-1} { objective delete $var incr num 1 } } printout "Deleted $num NoNames"
PMC TFW
Snake Man
Important 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."
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."
-
- Lt. General
- Posts: 1002
- Joined: 2000-10-30 23:01:01
- Gaming Interests: Falcon 4.0
- Editing Interests: Terrains
- Location: The Netherlands
Re: Tacedit - TCL corner
nice
I just finnished deleting
all nonames in Iceland manually...
geezz
Widmak
I just finnished deleting
all nonames in Iceland manually...
geezz

Widmak
Widmak
-
- Commander-In-Chief
- Posts: 9784
- 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: Tacedit - TCL corner
Thats how I listed all airbases from Europe theater, team 2 being allied and team 6 being the east/russians.code:Code: Select all
printout "Europe Theater Airbase list :" foreach var [lsort -integer [objective list [objective type 1]]] { if {[objective get $var control] == 2} {printout "Allied: " [objective name $var]} if {[objective get $var control] == 6} {printout "Russian: " [objective name $var]} }
Pretty useless piece of code, but...
PMC TFW
Snake Man
Important 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."
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."
-
- Commander-In-Chief
- Posts: 9784
- 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: Tacedit - TCL corner
PMC Korea Campaigns
The example fully playable campaigns with the TCL scripts that were used to create them. Available for download in here PMC_PMCKorea_TCL_Theater_v0.2.rar updated 08-06-10
Install instructions included in the readme txt.
PMC TFW
Snake Man
The example fully playable campaigns with the TCL scripts that were used to create them. Available for download in here PMC_PMCKorea_TCL_Theater_v0.2.rar updated 08-06-10
Install instructions included in the readme txt.
PMC TFW
Snake Man
Important 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."
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."
-
- Lt. General
- Posts: 1002
- Joined: 2000-10-30 23:01:01
- Gaming Interests: Falcon 4.0
- Editing Interests: Terrains
- Location: The Netherlands
Re: Tacedit - TCL corner
Very nice
absolutely recomendable..
take your swimsuit with ya..
Widmak
absolutely recomendable..
take your swimsuit with ya..

Widmak
Widmak
-
- LeadPursuit
- Posts: 134
- Joined: 2001-04-19 22:01:01
- Location: Wallingford,Oxon,UK
Re: Tacedit - TCL corner
Hi
Has anyone got a link to the TCL web site - I've decided I need to know more about the language and need a place to start.
Later
Chris
Has anyone got a link to the TCL web site - I've decided I need to know more about the language and need a place to start.
Later
Chris
Chris "Washout" Carter
F4 Balkans Terrain Team
CO: The Vulture Squadron
F4 Balkans Terrain Team
CO: The Vulture Squadron
-
- Commander-In-Chief
- Posts: 9784
- 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: Tacedit - TCL corner
http://resource.tcl.tk/resource/doc/manual/quote:Originally posted by Washout:
Has anyone got a link to the TCL web site
Thats wat I've been using, its not the whole site link but ...
PMC TFW
Snake Man
Important 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."
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."
-
- LeadPursuit
- Posts: 134
- Joined: 2001-04-19 22:01:01
- Location: Wallingford,Oxon,UK
Re: Tacedit - TCL corner
Hi All
Wit Julian providing the bones and most of the meat here's a TCL script which list the numeric values held in the objective's name field:
Chris
Wit Julian providing the bones and most of the meat here's a TCL script which list the numeric values held in the objective's name field:
Latercode:Code: Select all
foreach obj [lsort -integer [objective list]] { set name [objective get $obj name] printout "Objective $obj" numbered "$name" }
Chris
Chris "Washout" Carter
F4 Balkans Terrain Team
CO: The Vulture Squadron
F4 Balkans Terrain Team
CO: The Vulture Squadron
-
- 1st Lt
- Posts: 123
- Joined: 2001-01-09 23:01:01
- Location: La. US
Re: Tacedit - TCL corner
Has anyone doen a script to place ports? I am struggling with this problem.
Thanks
Thanks
-
- Recruit
- Posts: 26
- Joined: 2002-08-07 22:01:01
- Gaming Interests: Falcon 4.0
- Editing Interests: Missions
Re: Tacedit - TCL corner
Hello all,
Does anybody know the code for placing a SAM unit on an Airfield?
Thx
Falcas
Does anybody know the code for placing a SAM unit on an Airfield?
Thx
Falcas
-
- Commander-In-Chief
- Posts: 9784
- 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: Tacedit - TCL corner
There is AAA 2 Airbases and SAM 2 SAM sites scripts in the Tacedit scripts.quote:Originally posted by Falcas:
Does anybody know the code for placing a SAM unit on an Airfield?
PMC TFW
Snake Man
Important 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."
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."
-
- 1st Lt
- Posts: 128
- Joined: 2004-07-28 22:01:01
- Location: Saskatoon, Sk Canada
Re: Tacedit - TCL corner
I'm curious.. Is this just a laziness code?? Or does this perfectly place objects at an airbase so they are not on the runway etc?Snake Man wrote:There is AAA 2 Airbases and SAM 2 SAM sites scripts in the Tacedit scripts.quote:Originally posted by Falcas:
Does anybody know the code for placing a SAM unit on an Airfield?
PMC TFW
Snake Man
I usually manually place them, but sometimes they like to sit on the runway.

-
- Commander-In-Chief
- Posts: 9784
- 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
Its placed on the same coordinates as the objective, F4 campaign engine then moves it where it sees proper fit. I have never seen air defense units on the runways or taxiways this way, never.
Important 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."
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."
-
- 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: Tacedit - TCL corner
I have a couple of tcl questions....
In the creation of named squadrons on airbases, it is of the form:
What is the "num" above (where does it come from?) and is the "ID" the campaign ID or the objective ID from TacEdit?
In the creation of named squadrons on airbases, it is of the form:
Code: Select all
# AIRBASE NAME - num / ID
#
# Seoul - #### / 1056
set abnum 1056
Sherlock
Victurous te Saluto
Victurous te Saluto
-
- Commander-In-Chief
- Posts: 9784
- 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: Tacedit - TCL corner
Hum I believe it was the objective ID minus one hundred or something like that (I cant recall it right now, I'd have to dig up the info somewhere).
Are you using create.Squadron.tcl script to place squadrons? Because that takes the tacedit airbase ID directly without any adjustments.
Are you using create.Squadron.tcl script to place squadrons? Because that takes the tacedit airbase ID directly without any adjustments.
Important 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."
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."
-
- 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: Tacedit - TCL corner
Yes, I am working with create.Squadron.tcl but I want to be able to give a specific name to each squadron (like you did for ODS historic 1991), not just let the tcl script increment the squadron name by 1. Haven't written my own tcl scripts before so starting from scratch.Snake Man wrote:Hum I believe it was the objective ID minus one hundred or something like that (I cant recall it right now, I'd have to dig up the info somewhere).
Are you using create.Squadron.tcl script to place squadrons? Because that takes the tacedit airbase ID directly without any adjustments.
Sherlock
Victurous te Saluto
Victurous te Saluto
-
- 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: Tacedit - TCL corner
My question is as follows:
Is there a way to input the number of hours for reinforcement via the tcl scripts when creating the squadrons, battalions, etc?
For instance here is the line from the ODS tcl scripts that creates a E-8 JSTARS and names it:
Can some additional command be added to this (or another line) to add the reinforcement time in automatically so I don't have to go back into tacedit and do it manually?
Is there a way to input the number of hours for reinforcement via the tcl scripts when creating the squadrons, battalions, etc?
For instance here is the line from the ODS tcl scripts that creates a E-8 JSTARS and names it:
Code: Select all
# jstars e-8
set newid [unit create 398]
unit set $newid bflags 3 control [objective get $abnum control] x [objective get $abnum x] y [objective get $abnum y] name 4411 unitflags 32 destx [expr [objective get $abnum x] +1] desty [expr [objective get $abnum y] +1]
Sherlock
Victurous te Saluto
Victurous te Saluto
-
- 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: Tacedit - TCL corner
I figured this out. This is how you do it:Sherlock wrote:My question is as follows:
Is there a way to input the number of hours for reinforcement via the tcl scripts when creating the squadrons, battalions, etc?
For instance here is the line from the ODS tcl scripts that creates a E-8 JSTARS and names it:
Can some additional command be added to this (or another line) to add the reinforcement time in automatically so I don't have to go back into tacedit and do it manually?Code: Select all
# jstars e-8 set newid [unit create 398] unit set $newid bflags 3 control [objective get $abnum control] x [objective get $abnum x] y [objective get $abnum y] name 4411 unitflags 32 destx [expr [objective get $abnum x] +1] desty [expr [objective get $abnum y] +1]
Code: Select all
# jstars e-8
set newid [unit create 398]
unit set $newid bflags 3 control [objective get $abnum control] x [objective get $abnum x] y [objective get $abnum y] name 4411 reinf 8 unitflags 32 destx [expr [objective get $abnum x] +1] desty [expr [objective get $abnum y] +1]
Sherlock
Victurous te Saluto
Victurous te Saluto
-
- 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: Tacedit - TCL corner
Next question.
I'm wanting to input the units speciality (Air to Air or Air to Ground) via the tcl script as well.
I've tried adding the following to the line:
Specialty 2
as in:
Thinking that Air-to-Ground is "2" while none is "0" and Air-to-Air is "1". The Specialty setting is not on the Unit Properties tab (2nd tab) but is on the 3rd tab (Squadron tab) of the unit for tacedit.
It didn't work. Any ideas on what it takes to do this?
I'm wanting to input the units speciality (Air to Air or Air to Ground) via the tcl script as well.
I've tried adding the following to the line:
Specialty 2
as in:
Code: Select all
set newid [unit create 398]
unit set $newid bflags 3 control [objective get $abnum control] x [objective get $abnum x] y [objective get $abnum y] name 4411 reinf 8 unitflags 32 destx [expr [objective get $abnum x] +1] desty [expr [objective get $abnum y] +1] Specialty 2
It didn't work. Any ideas on what it takes to do this?
Sherlock
Victurous te Saluto
Victurous te Saluto
-
- 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: Tacedit - TCL corner
got it with the help of GinRummy at the 69th vfw....Sherlock wrote:Next question.
I'm wanting to input the units speciality (Air to Air or Air to Ground) via the tcl script as well.
I've tried adding the following to the line:
Specialty 2
as in:
Thinking that Air-to-Ground is "2" while none is "0" and Air-to-Air is "1". The Specialty setting is not on the Unit Properties tab (2nd tab) but is on the 3rd tab (Squadron tab) of the unit for tacedit.Code: Select all
set newid [unit create 398] unit set $newid bflags 3 control [objective get $abnum control] x [objective get $abnum x] y [objective get $abnum y] name 4411 reinf 8 unitflags 32 destx [expr [objective get $abnum x] +1] desty [expr [objective get $abnum y] +1] Specialty 2
It didn't work. Any ideas on what it takes to do this?
The syntax is:
unit squadron set $newid speciality 1 airbaseid 72
Sherlock
Victurous te Saluto
Victurous te Saluto
-
- Commander-In-Chief
- Posts: 9784
- 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: Tacedit - TCL corner
Thanks for posting those tips.
Important 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."
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."
-
- Recruit
- Posts: 18
- Joined: 2009-09-18 09:49:50
- Gaming Interests: Falcon 4.0
- Editing Interests: All, I (try) to edit everything.
Re: Tacedit - TCL corner
Hi guys,
I have a newe question during my campaign work:
Is it possible to change the Team settings at date xx.xx.xx from "neutral" to "at war" with TCL. I searched the PMC Korea campaign but can't find something like that. How can I create such a trigger like Lead Pursuit did in the Korea campy where china enters the war?
Edit:
Found a pice of code within one of Sherlocks posts about the iran campi.
I want a short time for peacetime operations at the begin of my campaign before OPFOR starts the war.
Cheers
Snapper
I have a newe question during my campaign work:
Is it possible to change the Team settings at date xx.xx.xx from "neutral" to "at war" with TCL. I searched the PMC Korea campaign but can't find something like that. How can I create such a trigger like Lead Pursuit did in the Korea campy where china enters the war?
Edit:
Found a pice of code within one of Sherlocks posts about the iran campi.
Code: Select all
// CIS joins the war
//
#IF_EVENT_PLAYED 11
#ELSE
#IF_SUPPLY 6 L 40
#CHANGE_RELATIONS 4 6 1
#PLAY_MOVIE 108
#DO_EVENT 11
#ELSE
#IF_FORCE_RATIO A 6 2 L 2
#CHANGE_RELATIONS 4 6 1
#PLAY_MOVIE 108
#DO_EVENT 11
#ENDIF
Cheers
Snapper
-
- Commander-In-Chief
- Posts: 9784
- 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: Tacedit - TCL corner
This is actually a trigger question, not TCL one. Check the trigger pages from PMC Editing Wiki and there is one start of hostilities trigger setup pretty close to this. Also PMC Afghanistan should have triggers like what you are asking.
Let me know (in some appropriate trigger topic) if you could not find solution from the wiki.
Let me know (in some appropriate trigger topic) if you could not find solution from the wiki.
Important 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."
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."
-
- Commander-In-Chief
- Posts: 9784
- 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: Tacedit - TCL corner
New PMC Korean TCL Campaigns has been released, it includes the latest TCL scripting from me. I'm actually very happy if not even proud of how the division placement script came out. With one function call, you can place whole division of ground units, no more twiddling your thumbs adding battalion by battalion 
Also I have created PMC Editing Wiki: TacEdit TCL page.
More information will be added there when I get around to it, all tips and requests would be very welcome.

Also I have created PMC Editing Wiki: TacEdit TCL page.
More information will be added there when I get around to it, all tips and requests would be very welcome.
Important 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."
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."
-
- 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: Tacedit - TCL corner
Going through all the objectives in the Iran theater and comparing them to the default Korea objectives. I've noticed that Iran objectives pretty much all have fuel = 0 while Korea objectives have fuel = 235. Also, in Korea the bflags = 2 while Iran bflags = 0.
I'd like to use tcl to set these objectives fields. I know I'd use something like codec's input above about:
But I'm not very experienced with tcl. Any help out there from anyone?
Thanks in advance.
I'd like to use tcl to set these objectives fields. I know I'd use something like codec's input above about:
Code: Select all
foreach oid [objective list] {
# do something with each objective.
printout "Objective $oid is at " [objective get $oid x y]
}
Thanks in advance.
Sherlock
Victurous te Saluto
Victurous te Saluto
-
- Commander-In-Chief
- Posts: 9784
- 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: Tacedit - TCL corner
You have really good question, I did search on forum & wiki and didn't find anything which was surprising. This was in my personal notes which should be immediately be dumped into the wiki (I know).
So this would perhaps work as:
Try it out and see if it works?
Code: Select all
# O B J E C T I V E fields
# ----------------
# Type - the CT Id
# Id - the objective ID
# X - X location
# Y - Y location
# Z - elevation
# SpotTime - last time this was spotted
# spotted - spotted flags
# bflags - basic flags
# Control - which teams controls this
# CampId - campaign id
# lastrep - ??
# Flags - flags
# Supply - supply status
# Fuel - fuel status
# Losses - losses
# FCount - feature count
# Priority - priority of the ibjective
# Name - number index into the name table
# Parent - parent id
# Owner - owner of the objective
# Nlinks - how many links it has
# HasRadar - true if it has radar
Code: Select all
foreach oid [objective list] {
objective set $oid fuel 235
objective set $oid bflags 2
printout "Objective $oid fuel is " [objective get $oid fuel]
printout "Objective $oid bflags is " [objective get $oid bflags]
}
Important 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."
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."
-
- 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: Tacedit - TCL corner
I added supply to the commands you provided so now my script looks like:
But I am getting the following error:
Code: Select all
foreach oid [objective list] {
objective set fuel 235
objective set bflags 2
objective set supply 235
printout "Objective $oid fuel is " [objective get $oid fuel]
printout "Objective $oid bflags is " [objective get $oid bflags]
printout "Objective $oid supply is " [objective get $oid supply]
}
But I am getting the following error:
**ERROR**
expected integer but got "fuel"
while executing
"objective set fuel 235"
("foreach" body line 2)
invoked from within
"foreach oid [objective list] {
objective set fuel 235
objective set bflags 2
objective set supply 235
printout "Objective $oid fuel is..."
(file "C:/Program Files/Lead Pursuit/Battlefield Operations/Theaters/Iran/campaign/set_bflags_&_fuel.tcl" line 1)
Sherlock
Victurous te Saluto
Victurous te Saluto
-
- Commander-In-Chief
- Posts: 9784
- 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: Tacedit - TCL corner
I updated my earlier post, if that doesn't work let me know and I'll figure it out tomorrow.
Important 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."
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."
-
- 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: Tacedit - TCL corner
Worked like a champ! Thanks! Here's what I ended up with in total:Snake Man wrote:I updated my earlier post, if that doesn't work let me know and I'll figure it out tomorrow.
Code: Select all
foreach oid [objective list] {
objective set $oid fuel 235
objective set $oid bflags 2
objective set $oid supply 235
printout "Objective $oid fuel is " [objective get $oid fuel]
printout "Objective $oid bflags is " [objective get $oid bflags]
printout "Objective $oid supply is " [objective get $oid supply]
}
Sherlock
Victurous te Saluto
Victurous te Saluto
-
- 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: Tacedit - TCL corner
I have question regarding the PMC Theater buiding TCL scripts. Specifically, the script called "fDivision.tcl". This script basically is divided into two parts, the "bluefor" part and the "opfor" part. This script also makes use of the "fBrigade_Battaltions.tcl" script to create the Division-->Brigade-->Battalion units, populate that structure with units (armor, mech, infantry, etc) and create their relationship within each structured unit.
Within the "fDivision.tcl" script is a series of commands like:
This line appears to feed information to the "fBrigade_Battaltions.tcl" script which has the following process definition in it:
Here is my question: It appears that the "CreateBrigade" process uses the data contained in the "fDivision.tcl". So in the snippet of code above taken from the "fDivision.tcl" script, are the numbers which follow the "createBrigade $objid" the assigned unit "name" and the unit "type"? For example, in the line above the type is "45" which is the Armored XXI-M1A1 unit? And the "113" is the unit "name", i.e., the "113th Division"?
Within the "fDivision.tcl" script is a series of commands like:
Code: Select all
createBrigade $objid 113 45
Code: Select all
# create brigade and 5 battalions
proc createBrigade { objid brgtype battype } {
...
Sherlock
Victurous te Saluto
Victurous te Saluto
-
- Banned user
- Posts: 208
- Joined: 2009-05-06 20:48:30
- Gaming Interests: Falcon 4.0
- Editing Interests: All, I (try) to edit everything.
Re: Tacedit - TCL corner
Not Good to set every objective Fuel\Supply to 235 in Campaign.Not even neccesary in TE!!!!
Don't think they Actually eat the cookie's so to speak.Ummmmmmmm...!!!Let's look at it this way.
If you remove ALL the Weapon's from an AC in F4Browse....is it still flyable for the (player)??Yes,the Code will alway's give the (player) Weapon's.Same go's for GU's I believe.Maybe ED_1 has some insight's on this for AF.....Dunno!
demer
Don't think they Actually eat the cookie's so to speak.Ummmmmmmm...!!!Let's look at it this way.
If you remove ALL the Weapon's from an AC in F4Browse....is it still flyable for the (player)??Yes,the Code will alway's give the (player) Weapon's.Same go's for GU's I believe.Maybe ED_1 has some insight's on this for AF.....Dunno!
demer
-
- Commander-In-Chief
- Posts: 9784
- 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: Tacedit - TCL corner
No, they are brigade type and battalion type.Sherlock wrote:are the numbers which follow the "createBrigade $objid" the assigned unit "name" and the unit "type"? For example, in the line above the type is "45" which is the Armored XXI-M1A1 unit? And the "113" is the unit "name", i.e., the "113th Division"?
So you can quite easily change armored brigade to contain not M1A1 tank but M48 tank battalions.
Important 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."
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."
-
- Banned user
- Posts: 208
- Joined: 2009-05-06 20:48:30
- Gaming Interests: Falcon 4.0
- Editing Interests: All, I (try) to edit everything.
Re: Tacedit - TCL corner
Just a hint for CCC:
# I R A N b a t a l l i o n s
# variables for batallions
# controlling team
set cntrl 2
# batallion name
set bname 1
# orders
set ordr 1[/color](Very important if you want your GU's kind of Scripted at the start i.e. The GTM has someplace to start)
# aobj id
set assign 0
# batallion type
set battype 2523 (M1A1 in this example)
#set roster
set roster 4294934391
(This is prob'ly going to be a hard thing to "Get our Head's Around"!!!! Hustler posted to try and, better explain why this NEED'S to match the Unit you are using from the Database. I'll leave it to him to further that knowledge in the Falcon community.Suffice it to say that the VU2 Engine and, in fact, the "Code" is a huge and complex Calculator that rely's more on numerical data than Name's!!!!)
set xc 370
set yc 951
source "C:\\TCL\\Iran\\create.brig.bat.sub.no.offset.tcl"
and in:
"C:\\TCL\\Iran\\create.brig.bat.sub.no.offset.tcl"
# batallion 1st
set bat1 [unit create $battype]
unit batallion set $bat1 bflags 0 roster $roster control $cntrl x $xc y $yc campid $bat1 name $bname unitflags 0 reinf 0 destx 0 desty 0unit batallion set $bat1 aobj $assign morale 100 orders $ordr
incr bname 1
demer
# I R A N b a t a l l i o n s
# variables for batallions
# controlling team
set cntrl 2
# batallion name
set bname 1
# orders
set ordr 1[/color](Very important if you want your GU's kind of Scripted at the start i.e. The GTM has someplace to start)
# aobj id
set assign 0
# batallion type
set battype 2523 (M1A1 in this example)
#set roster
set roster 4294934391
(This is prob'ly going to be a hard thing to "Get our Head's Around"!!!! Hustler posted to try and, better explain why this NEED'S to match the Unit you are using from the Database. I'll leave it to him to further that knowledge in the Falcon community.Suffice it to say that the VU2 Engine and, in fact, the "Code" is a huge and complex Calculator that rely's more on numerical data than Name's!!!!)
set xc 370
set yc 951
source "C:\\TCL\\Iran\\create.brig.bat.sub.no.offset.tcl"
and in:
"C:\\TCL\\Iran\\create.brig.bat.sub.no.offset.tcl"
# batallion 1st
set bat1 [unit create $battype]
unit batallion set $bat1 bflags 0 roster $roster control $cntrl x $xc y $yc campid $bat1 name $bname unitflags 0 reinf 0 destx 0 desty 0unit batallion set $bat1 aobj $assign morale 100 orders $ordr
incr bname 1

demer
-
- Banned user
- Posts: 208
- Joined: 2009-05-06 20:48:30
- Gaming Interests: Falcon 4.0
- Editing Interests: All, I (try) to edit everything.
Re: Tacedit - TCL corner
Here is a snippet of what I ended up having to do for Iran:Sherlock wrote:Worked like a champ! Thanks! Here's what I ended up with in total:Snake Man wrote:I updated my earlier post, if that doesn't work let me know and I'll figure it out tomorrow.
Code: Select all
#Set Obj Flag's Iran
#Note to myself "types"
#AIRBASE 1
#AIRSTRIP 2
#ARMYBASE 3
#BEACH 4
#BORDER 5
#BRIDGE 6
#CHEMICALPLANT 7
#CITY 8
#COMMANDCONTROL 9
#DEPOT 10
#FACTORY 11
#FORD 12
#FORTIFICATION 13
#HILLTOP 14
#JUNCTION 15
#NUCLEARPLANT 17
#PASS 18
#PORT 19
#POWERPLANT 20
#TOWN 28
#VILLAGE 29
#SAMSITE 31
set olist [lsort -real [objective list [objective type 6]]]
foreach oid $olist {
objective set $oid fuel 10
objective set $oid supply 5
objective set $oid priority 15
objective set $oid flags 688128
objective set $oid bflags 2
}
set olist [lsort -real [objective list [objective type 1]]]
foreach oid $olist {
objective set $oid fuel 235
objective set $oid supply 235
objective set $oid priority 10
objective set $oid flags 4965632
objective set $oid bflags 11
}
printout "Feck you, have a nice day..Hmmpf,Dam Onion's HAHAHA!!!."
Hope this helps,
demer