TCL Script - Walkthru
Moderators: Lone Wolf, Snake Man
-
- Banned user
- Posts: 389
- Joined: 2004-07-27 22:01:01
- Gaming Interests: Falcon 4.0
- Editing Interests: All, I (try) to edit everything.
- Location: Beautiful Virginia
TCL Script - Walkthru
Snakeman and others proficient with TCL.
Is it possible to post some TCL scripts lines with some commented lines before/after each script line to explain as thoroughly as possible to a TCL retard (ME) what the script line is doing? Maybe I am just not looking at them long enough.
For example - lets look at the Create a new Squadron TCL - -
===============================================
# utility proc to create a new squadron with the first global entry:
proc createSquadron { type sqname abnum } {
set newid [unit create $type ]
unit set $newid bflags 3 control [objective get $abnum control] x [objective get $abnum x] y [objective get $abnum y] name $sqname unitflags 32 destx [expr [objective get $abnum x] +1] desty [expr [objective get $abnum y] +1]
return $newid
}
proc MakeSquads { airlist } {
global squadname Squad
set name [lindex $airlist 0]
set airbaseid [lindex $airlist 1]
set squadtypes [lindex $airlist 2]
set result "$name Airbase:"
foreach {count squad} $squadtypes {
set sname [lindex $Squad($squad) 0]
set sid [lindex $Squad($squad) 1]
for { set i 0} {$i < $count} {incr i 1} {
createSquadron $sid $squadname $airbaseid
incr squadname 1
}
append result " $count" "x " $sname
}
printout $result
}
# some global data
set Squad(AIRCAV_CH53) [list "Air Cavalry CH-53" 425]
===============================================
working backwords -
is the Squad(AIRCAV_CH53) the unit name from F4Browser?
is the Air Cavlary CH-53 just a convenient name or pulled form something?
is 425 the FalconID number I.e. CT-100?
Now what about a detaile explanation of the lines further up? Perhaps walking thru what is being done - and what numbers must be input would help me understand the process. At the moment it sort of looks like magic
Is it possible to post some TCL scripts lines with some commented lines before/after each script line to explain as thoroughly as possible to a TCL retard (ME) what the script line is doing? Maybe I am just not looking at them long enough.
For example - lets look at the Create a new Squadron TCL - -
===============================================
# utility proc to create a new squadron with the first global entry:
proc createSquadron { type sqname abnum } {
set newid [unit create $type ]
unit set $newid bflags 3 control [objective get $abnum control] x [objective get $abnum x] y [objective get $abnum y] name $sqname unitflags 32 destx [expr [objective get $abnum x] +1] desty [expr [objective get $abnum y] +1]
return $newid
}
proc MakeSquads { airlist } {
global squadname Squad
set name [lindex $airlist 0]
set airbaseid [lindex $airlist 1]
set squadtypes [lindex $airlist 2]
set result "$name Airbase:"
foreach {count squad} $squadtypes {
set sname [lindex $Squad($squad) 0]
set sid [lindex $Squad($squad) 1]
for { set i 0} {$i < $count} {incr i 1} {
createSquadron $sid $squadname $airbaseid
incr squadname 1
}
append result " $count" "x " $sname
}
printout $result
}
# some global data
set Squad(AIRCAV_CH53) [list "Air Cavalry CH-53" 425]
===============================================
working backwords -
is the Squad(AIRCAV_CH53) the unit name from F4Browser?
is the Air Cavlary CH-53 just a convenient name or pulled form something?
is 425 the FalconID number I.e. CT-100?
Now what about a detaile explanation of the lines further up? Perhaps walking thru what is being done - and what numbers must be input would help me understand the process. At the moment it sort of looks like magic
-
- Banned user
- Posts: 389
- Joined: 2004-07-27 22:01:01
- Gaming Interests: Falcon 4.0
- Editing Interests: All, I (try) to edit everything.
- Location: Beautiful Virginia
TCL Script Documentation -
the original document that the link was posted to doesn't work anymore. Snakeman - do you still have the documentation for TCL and could you post that somewhere as a download?
-
- Banned user
- Posts: 389
- Joined: 2004-07-27 22:01:01
- Gaming Interests: Falcon 4.0
- Editing Interests: All, I (try) to edit everything.
- Location: Beautiful Virginia
TCL Scripts Number Codes
There are references in the scripts to various numbers for
brgtype (brigade type) 86, 88 etc
battype (battalion type) 45, 727 etc
Are these randomly chosen numbers or do these correspond to a definite set of numbers that identify a specific type of unit
i.e. batttype 54 = m2a2 mechanize bradley unit? If so, is there a consolidated listing of the types for briade, battalion etc.?
brgtype (brigade type) 86, 88 etc
battype (battalion type) 45, 727 etc
Are these randomly chosen numbers or do these correspond to a definite set of numbers that identify a specific type of unit
i.e. batttype 54 = m2a2 mechanize bradley unit? If so, is there a consolidated listing of the types for briade, battalion etc.?
-
- Banned user
- Posts: 389
- Joined: 2004-07-27 22:01:01
- Gaming Interests: Falcon 4.0
- Editing Interests: All, I (try) to edit everything.
- Location: Beautiful Virginia
TCL Scripts Related?
In looking thru the PMC Korea script set it looks like the scripts are related to each other somehow . . . does running one script run the rest, or does one have to run the scripts in a particular sequence or order?
-
- 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
You should first check Tacedit - TCL corner topic, there is some basic stuff.Is it possible to post some TCL scripts lines with some commented lines
You looked the wrong file, thats the high tech source Codec wrote, even I dont understand it.For example - lets look at the Create a new Squadron TCL
No, its the variable name we call from the "other script".is the Squad(AIRCAV_CH53) the unit name from F4Browser?
Convenient name for display/printing/output purposes.is the Air Cavlary CH-53 just a convenient name or pulled form something?
I get these confused, but yes; it is the Tacedit CT minus hundred, yeah.is 425 the FalconID number I.e. CT-100?
As I said, forget about them, you were looking at the wrong script. At least if you want to write a squadron placement script, you have no business nosing the high tech script, but instead you should look/write the easy/short script which tells teh high tech one what units to create.Now what about a detaile explanation of the lines further up?
What is this link?the original document that the link was posted to
These are the CT or what ever F4Browse unit/batallion/bridage numbers. Also I cant remember if they too were -100 counted.battype (battalion type) 45, 727 etc
i.e. batttype 54 = m2a2 mechanize bradley unit? If so, is there a consolidated listing of the types for briade, battalion etc.?
Yes. TCL line ofPMC Korea script set it looks like the scripts are related to each other somehow . . . does running one script run the rest
Code: Select all
source "D:\\F4Terrain\\tacedit\\create.PMC.Airdefenses.tcl"
Btw I moved the topic to Tools area.
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: 389
- Joined: 2004-07-27 22:01:01
- Gaming Interests: Falcon 4.0
- Editing Interests: All, I (try) to edit everything.
- Location: Beautiful Virginia
TCL Script Documentation -
Thanks - - let me study some more . . . just doing some preliminary work try to get a better understanding . . .
regarding the link for documentation - this is the link you posted in the TCL Corner -
http://resource.tcl.tk/resource/doc/manual/
"temporarily unavailable" been like that for a little while now... I was hoping maybe you have a copy stored.
regarding the link for documentation - this is the link you posted in the TCL Corner -
http://resource.tcl.tk/resource/doc/manual/
"temporarily unavailable" been like that for a little while now... I was hoping maybe you have a copy stored.
-
- 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
Oh that, I have nothing on that one. We just have to google some other TCL site.
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: 389
- Joined: 2004-07-27 22:01:01
- Gaming Interests: Falcon 4.0
- Editing Interests: All, I (try) to edit everything.
- Location: Beautiful Virginia
TCL Script Documentation -
OKay, I will google, not sure what to look for - the problem is I don't understand quite what the script is doing in the first place. What I could use is a translation of the script into English and how it relates to Falcon; what a script does to specific campaign building elements . . . etc.
-
- 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
TCL is the known scripting language, its like Basic or C++ etc, programming language thingy. It has nothing to do with Falcon 4. In Tacedit there is commands you can run from a TCL script.
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."
-
- Captain
- Posts: 154
- Joined: 2007-01-07 00:13:42
I don't know if it's the same content that the link above, but I have found these pages useful:
http://www.tcl.tk/man/tcl8.5/tutorial/tcltutorial.html
I am trying to learn enough to understand the already written scripts, perhaps coment them, and try to write one or two... who knows...
http://www.tcl.tk/man/tcl8.5/tutorial/tcltutorial.html
I am trying to learn enough to understand the already written scripts, perhaps coment them, and try to write one or two... who knows...
Who is online
Users browsing this forum: ClaudeBot [Bot] and 1 guest