Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f0b4b7bd21 | ||
|
|
218491bc4b | ||
|
|
0c65598156 | ||
|
|
3846afaf10 |
@@ -0,0 +1,24 @@
|
||||
This is free and unencumbered software released into the public domain.
|
||||
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
distribute this software, either in source code form or as a compiled
|
||||
binary, for any purpose, commercial or non-commercial, and by any
|
||||
means.
|
||||
|
||||
In jurisdictions that recognize copyright laws, the author or authors
|
||||
of this software dedicate any and all copyright interest in the
|
||||
software to the public domain. We make this dedication for the benefit
|
||||
of the public at large and to the detriment of our heirs and
|
||||
successors. We intend this dedication to be an overt act of
|
||||
relinquishment in perpetuity of all present and future rights to this
|
||||
software under copyright law.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
For more information, please refer to <http://unlicense.org/>
|
||||
+54
-52
@@ -7,7 +7,7 @@
|
||||
|
||||
package require Tk
|
||||
|
||||
set appversion 0.5
|
||||
set appversion 0.7
|
||||
set scriptpath [file normalize [info script]]
|
||||
set appdir [file dirname $scriptpath]
|
||||
# check if we're running from a starpack
|
||||
@@ -54,11 +54,11 @@ set wa_opts {
|
||||
{offset 0x1E name {Blood} val {bool}}
|
||||
{offset 0x23 name {Upgraded Grenade} val {bool}}
|
||||
{offset 0x24 name {Upgraded Shotgun} val {bool}}
|
||||
{offset 0x25 name {Upgraded Clusters} val {bool}}
|
||||
{offset 0x26 name {Upgraded Longbow} val {bool}}
|
||||
{offset 0x0F name {Sudden Death Event} val {0 {Round ends} 1 {Nuclear strike} 2 {HP drops to 1} 3 {Nothing happens}}}
|
||||
{offset 0x0D name {Stockpiling Mode} val {0 Replenish 1 Accumulate 2 Reduce}}
|
||||
{offset 0x0E name {Worm Selection} val {0 Sequential 1 Manual 2 Random}}
|
||||
{offset 0x25 name {Upgraded Clusters} val {bool}}
|
||||
{offset 0x26 name {Upgraded Longbow} val {bool}}
|
||||
}
|
||||
|
||||
# names of weapon properties
|
||||
@@ -202,18 +202,16 @@ set wa_ext_opts {
|
||||
{offset 0x150 size 1 name {Undetermined Crates} def 128 val {0 Off 1 On 128 Default}}
|
||||
{offset 0x151 size 1 name {Undetermined Fuses} def 128 val {0 Off 1 On 128 Default}}
|
||||
{offset 0x14A size 1 name {Rope-Roll Drops} def 0 val {0 {Disabled} 1 {As from rope only} 2 {As from rope or jump}}}
|
||||
{offset 0x14B size 1 name {Horizontal Impact Loss of Control} def 0 val {0 {Lose control} 255 {No loss of control}}}
|
||||
{offset 0x143 size 1 name {Phased Worms (Enemy)} def 0 val {
|
||||
0 {Off}
|
||||
1 {Worms move through each other}
|
||||
2 {+ Move through enemy weapon objects}
|
||||
3 {+ Don't take damage from enemy explosions}
|
||||
}}
|
||||
{offset 0x14D size 1 name {Keep Control After Skimming} def 0 val {0 {Lose control} 1 {Keep control} 2 {Keep control and rope}}}
|
||||
{offset 0x183 size 1 name {RubberWorm Gravity Type} def 0 val {0 {Unmodified} 1 {Standard} 2 {Black hole (constant)} 3 {Black hole (linear)}}}
|
||||
{offset 0x191 size 1 name {Health Crates Cure Poison} def 1 val {255 {Off} 0 {Cure the collector} 1 {Cure the collector's team} 2 {Cure all allied teams}}}
|
||||
{offset 0x156 size 1 name {Pneumatic Drill Imparts Velocity} def 128 val {0 Off 1 On 128 Default}}
|
||||
{offset 0x16D size 1 name {Indian Rope Glitch} def 128 val {0 Off 1 On 128 Default}}
|
||||
{offset 0x16E size 1 name {Herd-Doubling Glitch} def 128 val {0 Off 1 On 128 Default}}
|
||||
{offset 0x172 size 1 name {Skipwalking} def 0 val {255 Disabled 0 Possible 1 Facilitated}}
|
||||
{offset 0x193 size 1 name {Sheep Heaven's Gate} def 7 val {
|
||||
1 {1. Sheep explode out of all crates}
|
||||
2 {2. Sheep weapon extended fuse time}
|
||||
@@ -223,18 +221,20 @@ set wa_ext_opts {
|
||||
6 {6. Option 2 + Option 4}
|
||||
7 {7. All of the above}
|
||||
}}
|
||||
{offset 0x192 size 1 name {Kaos Mod Preset} def 0 val {
|
||||
0 {20, 10, 15, 5, 10, 15, 10, 15, 5}
|
||||
1 {20, 10, 10, 5, 10, 15, 10, 12, 5}
|
||||
2 {20, 15, 10, 5, 10, 15, 10, 10, 0}
|
||||
3 {25, 15, 5, 0, 20, 20, 10, 5, 0}
|
||||
4 {25, 25, 0, 5, 20, 10, 10, 5, 0}
|
||||
5 {25, 15, 5, 5, 25, 10, 10, 5, 0}
|
||||
}}
|
||||
{offset 0x16E size 1 name {Herd-Doubling Glitch} def 128 val {0 Off 1 On 128 Default}}
|
||||
{offset 0x172 size 1 name {Skipwalking} def 0 val {255 Disabled 0 Possible 1 Facilitated}}
|
||||
{offset 0x173 size 1 name {Roofing} def 0 val {0 {Allowed} 1 {Block above} 2 {Block everywhere}}}
|
||||
{offset 0x18E size 1 name {Terrain Overlap Phasing Glitch} def 128 val {0 Off 1 On 128 Default}}
|
||||
{offset 0x183 size 1 name {RubberWorm Gravity Type} def 0 val {0 {Unmodified} 1 {Standard} 2 {Black hole (constant)} 3 {Black hole (linear)}}}
|
||||
{offset 0x191 size 1 name {Health Crates Cure Poison} def 1 val {255 {Off} 0 {Cure the collector} 2 {Cure the collector's team} 3 {Cure all allied teams}}}
|
||||
{offset 0x192 size 1 name {Kaos Mod Preset} def 0 val {
|
||||
0 {Preset 0}
|
||||
1 {Preset 1}
|
||||
2 {Preset 2}
|
||||
3 {Preset 3}
|
||||
4 {Preset 4}
|
||||
5 {Preset 5}
|
||||
}}
|
||||
{offset 0x14B size 1 name {Horizontal Impact Loss of Control} def 0 val {0 {Lose control} 255 {No loss of control}}}
|
||||
{offset 0x14D size 1 name {Keep Control After Skimming} def 0 val {0 {Lose control} 1 {Keep control} 2 {Keep control and rope}}}
|
||||
}
|
||||
|
||||
# special setting processor section
|
||||
@@ -571,7 +571,7 @@ grid .infoframe -row 1 -column 0 -sticky we
|
||||
ttk::frame .tabbar.nopts
|
||||
.tabbar add .tabbar.nopts -text "Options"
|
||||
ttk::labelframe .tabbar.nopts.opts -text "General options"
|
||||
grid .tabbar.nopts.opts -column 0 -row 0 -sticky nw -padx 5 -pady 5 -columnspan 6
|
||||
grid .tabbar.nopts.opts -column 0 -row 0 -sticky nw -padx 5 -pady 5 -columnspan 4
|
||||
|
||||
set row 0
|
||||
set col 0
|
||||
@@ -591,7 +591,7 @@ foreach opt $wa_opts {
|
||||
ttk::entry $txtid -width 8 -textvariable $boundvar
|
||||
pack $lblid -side left -fill x -padx 5
|
||||
pack $txtid -side right
|
||||
grid $elpref -column $col -row $row -sticky nwe
|
||||
grid $elpref -column $col -row $row -sticky nwe -pady 5
|
||||
} elseif {([lindex $valopt 0] eq "bool")} { # create a checkbox entry
|
||||
set chkid ".tabbar.nopts.opts.chk$offs"
|
||||
ttk::checkbutton $chkid -text $name -variable $boundvar -onvalue 1 -offvalue 0
|
||||
@@ -609,7 +609,7 @@ foreach opt $wa_opts {
|
||||
grid $comboid -column $col -row $row -sticky news
|
||||
}
|
||||
incr col
|
||||
if {$col > 4} {
|
||||
if {$col > 3} {
|
||||
set col 0
|
||||
incr row
|
||||
}
|
||||
@@ -634,25 +634,25 @@ foreach weap $wa_weapons {
|
||||
set boundvar_prob "wsc_data($proboffs)"
|
||||
set groupid ".tabbar.weap.$offs"
|
||||
ttk::labelframe $groupid -text $wname -labelanchor nw
|
||||
ttk::label "$groupid.ammolbl" -text "Ammo"
|
||||
ttk::label "$groupid.ammolbl" -text "A"
|
||||
ttk::entry "$groupid.ammotxt" -textvariable $boundvar_ammo -width 4
|
||||
grid "$groupid.ammolbl" -column 0 -row 0 -sticky nsw
|
||||
grid "$groupid.ammotxt" -column 1 -row 0 -sticky nw
|
||||
ttk::label "$groupid.powerlbl" -text "Power"
|
||||
ttk::label "$groupid.powerlbl" -text "P"
|
||||
ttk::entry "$groupid.powertxt" -textvariable $boundvar_power -width 4
|
||||
grid "$groupid.powerlbl" -column 0 -row 1 -sticky nsw
|
||||
grid "$groupid.powertxt" -column 1 -row 1 -sticky nw
|
||||
ttk::label "$groupid.delaylbl" -text "Delay"
|
||||
grid "$groupid.powerlbl" -column 2 -row 0 -sticky nsw
|
||||
grid "$groupid.powertxt" -column 3 -row 0 -sticky nw
|
||||
ttk::label "$groupid.delaylbl" -text "D"
|
||||
ttk::entry "$groupid.delaytxt" -textvariable $boundvar_delay -width 4
|
||||
grid "$groupid.delaylbl" -column 0 -row 2 -sticky nsw
|
||||
grid "$groupid.delaytxt" -column 1 -row 2 -sticky nw
|
||||
ttk::label "$groupid.problbl" -text "Probability"
|
||||
grid "$groupid.delaylbl" -column 4 -row 0 -sticky nsw
|
||||
grid "$groupid.delaytxt" -column 5 -row 0 -sticky nw
|
||||
ttk::label "$groupid.problbl" -text "Pr"
|
||||
ttk::entry "$groupid.probtxt" -textvariable $boundvar_prob -width 4
|
||||
grid "$groupid.problbl" -column 0 -row 3 -sticky nsw
|
||||
grid "$groupid.probtxt" -column 1 -row 3 -sticky nw
|
||||
grid "$groupid.problbl" -column 6 -row 0 -sticky nsw
|
||||
grid "$groupid.probtxt" -column 7 -row 0 -sticky nw
|
||||
grid $groupid -column $col -row $row -sticky news -padx 5 -pady 3
|
||||
incr col
|
||||
if {$col > 10} {
|
||||
if {$col > 4} {
|
||||
set col 0
|
||||
incr row
|
||||
}
|
||||
@@ -662,15 +662,14 @@ foreach weap $wa_weapons {
|
||||
ttk::frame .tabbar.extopts
|
||||
.tabbar add .tabbar.extopts -text "Extended options (v3)"
|
||||
|
||||
# Extended option checkboxes in the first tab
|
||||
set eflpref ".tabbar.nopts.eflags"
|
||||
ttk::labelframe $eflpref -text "Extended option flags (v3)"
|
||||
grid $eflpref -row 1 -column 0 -sticky nw -padx 5 -pady 5 -columnspan 8
|
||||
# Second extended options tabframe
|
||||
ttk::frame .tabbar.extflags
|
||||
.tabbar add .tabbar.extflags -text "Extended option flags (v3)"
|
||||
|
||||
# Extended option textboxes in the first tab
|
||||
set etpref ".tabbar.nopts.etxts"
|
||||
ttk::labelframe $etpref -text "Extended option parameters (v3)"
|
||||
grid $etpref -row 2 -column 0 -sticky nw -padx 5 -pady 5 -columnspan 8
|
||||
grid $etpref -row 2 -column 0 -sticky nw -padx 5 -pady 5 -columnspan 5
|
||||
|
||||
set row 0
|
||||
set col 0
|
||||
@@ -694,18 +693,18 @@ foreach opt $wa_ext_opts {
|
||||
ttk::entry $txtid -width 8 -textvariable $boundvar
|
||||
pack $lblid -side left -fill x -padx 5
|
||||
pack $txtid -side right
|
||||
grid $elpref -column $txtcol -row $txtrow -sticky nwe
|
||||
grid $elpref -column $txtcol -row $txtrow -sticky nwe -pady 5
|
||||
incr txtcol
|
||||
if {$txtcol > 5} {
|
||||
if {$txtcol > 4} {
|
||||
set txtcol 0
|
||||
incr txtrow
|
||||
}
|
||||
} elseif {([lindex $valopt 0] eq "bool")} { # create a checkbox entry
|
||||
set chkid ".tabbar.nopts.eflags.chk$offs"
|
||||
set chkid ".tabbar.extflags.chk$offs"
|
||||
ttk::checkbutton $chkid -text $name -variable $boundvar -onvalue 1 -offvalue 0
|
||||
grid $chkid -column $chkcol -row $chkrow -sticky nw
|
||||
incr chkcol
|
||||
if {$chkcol > 4} {
|
||||
if {$chkcol > 3} {
|
||||
set chkcol 0
|
||||
incr chkrow
|
||||
}
|
||||
@@ -721,7 +720,7 @@ foreach opt $wa_ext_opts {
|
||||
}
|
||||
grid $comboid -column $col -row $row -sticky news -padx 5 -pady 3
|
||||
incr col
|
||||
if {$col > 5} {
|
||||
if {$col > 4} {
|
||||
set col 0
|
||||
incr row
|
||||
}
|
||||
@@ -730,7 +729,7 @@ foreach opt $wa_ext_opts {
|
||||
|
||||
# right container of the first tab
|
||||
ttk::frame .tabbar.nopts.right
|
||||
grid .tabbar.nopts.right -column 6 -row 0 -sticky ne
|
||||
grid .tabbar.nopts.right -column 4 -row 0 -sticky nwe
|
||||
|
||||
# Mines and barrels calc
|
||||
set hcalc_mines 0
|
||||
@@ -741,11 +740,11 @@ ttk::labelframe $calcpref -text "Mines & Barrels Calculator"
|
||||
grid $calcpref -column 0 -row 0 -sticky nw -padx 5 -pady 5
|
||||
ttk::label "$calcpref.minelbl" -text Mines
|
||||
ttk::entry "$calcpref.minetxt" -width 3 -textvariable hcalc_mines
|
||||
grid $calcpref.minelbl -column 0 -row 0 -sticky nw -padx 5 -pady 5
|
||||
grid $calcpref.minelbl -column 0 -row 0 -sticky nsw -padx 5 -pady 5
|
||||
grid $calcpref.minetxt -column 1 -row 0 -sticky nw -padx 5 -pady 5
|
||||
ttk::label "$calcpref.barrlbl" -text Barrels
|
||||
ttk::entry "$calcpref.barrtxt" -width 3 -textvariable hcalc_barrels
|
||||
grid $calcpref.barrlbl -column 0 -row 1 -sticky nw -padx 5 -pady 5
|
||||
grid $calcpref.barrlbl -column 0 -row 1 -sticky nsw -padx 5 -pady 5
|
||||
grid $calcpref.barrtxt -column 1 -row 1 -sticky nw -padx 5 -pady 5
|
||||
ttk::button "$calcpref.reset" -text Reset -command {
|
||||
set hcalc_mines 0
|
||||
@@ -841,16 +840,19 @@ ttk::button "$calcpref.docalc" -text Calculate -command {
|
||||
}
|
||||
grid $calcpref.docalc -column 2 -row 2 -sticky nw -padx 5 -pady 5
|
||||
ttk::label "$calcpref.resultlbl" -text "Result:"
|
||||
grid $calcpref.resultlbl -column 0 -row 2 -sticky nw -padx 5 -pady 5
|
||||
grid $calcpref.resultlbl -column 0 -row 2 -sticky nsw -padx 5 -pady 5
|
||||
ttk::label "$calcpref.result" -textvariable hcalc_result
|
||||
grid $calcpref.result -column 1 -row 2 -sticky nw -padx 5 -pady 5
|
||||
grid $calcpref.result -column 1 -row 2 -sticky nsw -padx 5 -pady 5
|
||||
|
||||
# Version overrider
|
||||
set verpref ".tabbar.nopts.right.vers"
|
||||
ttk::labelframe $verpref -text "Version converter"
|
||||
ttk::label "$verpref.verlbl" -text "Format version"
|
||||
ttk::entry "$verpref.vertxt" -width 1 -textvariable wsc_data(version)
|
||||
grid $verpref.verlbl -column 0 -row 1 -sticky nws -padx 5 -pady 5
|
||||
grid $verpref.vertxt -column 1 -row 1 -sticky nw -padx 5 -pady 5
|
||||
grid $verpref -column 0 -row 1 -sticky nw -padx 5 -pady 5
|
||||
|
||||
set irow 0
|
||||
set vnames {{} {Version 1 (45 weapons)} {Version 2 (64 weapons)} {Version 3 (extended)}}
|
||||
foreach v {1 2 3} {
|
||||
set rbid [string cat $verpref ".opt" $v]
|
||||
ttk::radiobutton $rbid -variable wsc_data(version) -text [lindex $vnames $v] -value $v
|
||||
grid $rbid -column 0 -row $irow -sticky nsw
|
||||
incr irow
|
||||
}
|
||||
grid $verpref -row 1 -column 0 -sticky nswe -padx 5
|
||||
|
||||
Reference in New Issue
Block a user