midi2cfg improvements

This commit is contained in:
Rudolf Polzer 2011-09-17 22:08:29 +02:00
parent 04ec3161da
commit 6bf10fe484
2 changed files with 360 additions and 329 deletions

View File

@ -344,134 +344,7 @@ bot tuba_blue
cmd cc "color 221"
super
bot rocket
channels 10
init
cmd aimtarget "tPercussion 1"
cmd barrier
cmd selectweapon 10
cmd wait 0.5
percussion 25
time 0
buttons attack2
time 0.05
buttons
time 0.1
busy 1.0
bot uzi
channels 10
init
cmd aimtarget "tPercussion 1"
cmd barrier
cmd selectweapon 3
cmd wait 0.5
percussion 27
time 0
buttons attack2
time 0.05
buttons
time 0.1
busy 0.2
percussion 33
percussion 27
percussion 54
percussion 27
bot crylink
channels 10
init
cmd aimtarget "tPercussion 1"
cmd barrier
cmd selectweapon 7
cmd wait 0.5
percussion 31
time 0
buttons attack2
time 0.05
buttons
time 0.1
busy 0.5
percussion 34
percussion 31
percussion 42
time 0
buttons attack1
time 0.05
buttons
time 0.1
busy 0.4
percussion 44
percussion 42
percussion 46
percussion 42
bot jetpack
init
cmd resetaim
cmd barrier
cmd console "g_jetpack_attenuation 0.5"
percussion 42
time 0
buttons hook
time 0.05
buttons
time 0.1
percussion 44
percussion 42
percussion 46
percussion 42
percussion 37
percussion 42
percussion 51
percussion 42
percussion 59
percussion 42
bot jump
init
cmd resetaim
cmd barrier
percussion 42
time -0.5
buttons jump
time -0.45
buttons
time 0
percussion 44
percussion 42
percussion 46
percussion 42
bot hagar
channels 10
init
cmd aimtarget "tPercussion 1"
cmd barrier
cmd selectweapon 9
cmd wait 0.5
percussion 35
time 0
buttons attack1
time 0.05
buttons
time 0.1
busy 0.15
percussion 36
percussion 35
percussion 38
percussion 35
percussion 40
percussion 35
percussion 60
percussion 35
percussion 61
percussion 35
percussion 65
percussion 35
percussion 66
percussion 35
# laser = lasershot NONE
bot laser
channels 10
init
@ -479,14 +352,64 @@ bot laser
cmd barrier
cmd selectweapon 1
cmd wait 0.5
percussion 39
percussion 38 # 038_Snare_1-0.wav
time 0
buttons attack1
time 0.05
buttons
time 0.1
busy 0.7
percussion 40 # 040_Snare_2-0.wav
percussion 38
# shotgun = RELOADSOUND slap
bot shotgun
channels 10
init
cmd aimtarget "tPercussion 1"
cmd barrier
cmd selectweapon 2
cmd wait 0.5
percussion 74 # 074_Guiro_2_Long-0.wav
time -0.4
buttons attack2
time -0.35
buttons
time 0
busy 0.7
# uzi = bullet BAD
bot uzi
channels 10
init
cmd aimtarget "tPercussion 1"
cmd barrier
cmd selectweapon 3
cmd wait 0.5
raw set g_balance_uzi_reload_ammo 0
percussion 27 # 027_High_Q-0.wav
time 0
buttons attack1
time 0.05
buttons
time 0.1
busy 0.2
percussion 31 # 031_Sticks-0.wav
percussion 27
percussion 37 # 037_Stick_Rim-0.wav
percussion 27
percussion 33 # 033_Metronome_Click-0.wav
percussion 27
percussion 39 # 039_Clap_Hand-0.wav
percussion 27
percussion 53 # 053_Cymbal_Ride_Bell-0.wav
percussion 27
percussion 54 # 054_Tombourine-0.wav
percussion 27
# grenadelauncher = RELOADSOUND RELOADSOUND
# electro = beam BAD
bot electro
channels 10
init
@ -495,14 +418,122 @@ bot electro
cmd barrier
cmd selectweapon 6
cmd wait 0.5
percussion 49
percussion 49 # 049_Cymbal_Crash_1-0.wav
time 0
buttons attack1
time 0.05
buttons
time 0.1
busy 0.6
percussion 57 # 057_Cymbal_Crash_2-0.wav
percussion 49
# crylink = big small
bot crylink
channels 10
init
cmd aimtarget "tPercussion 1"
cmd barrier
cmd selectweapon 7
cmd wait 0.5
percussion 34 # 034_Metronome_Bell-0.wav
time 0
buttons attack1
time 0.05
buttons
time 0.1
busy 0.7
percussion 45 # 045_Tom_Mid_2-0.wav
time 0
buttons attack2
time 0.05
buttons
time 0.1
busy 0.2
percussion 47 # 047_Tom_Mid_1-0.wav
percussion 45
percussion 48 # 048_Tom_High_2-0.wav
percussion 34
percussion 50 # 048_Tom_High_2-0.wav
percussion 34
percussion 56 # 056_Cow_Bell-0.wav
percussion 34
# nex is nex NONE
bot nex
channels 10
init
cmd aimtarget "tPercussion 1"
cmd barrier
cmd selectweapon 8
cmd wait 0.5
percussion 52 # 052_Cymbal_Chinese-0.wav
time 0
buttons attack1
time 0.05
buttons
time 0.1
busy 1.25
# minstanex is nex CLONE_OF_LASER
bot minstanex
channels 10
init
cmd aimtarget "tPercussion 1"
cmd barrier
cmd selectweapon 12
cmd wait 0.5
percussion 55 # 055_Cymbal_Splash-0.wav
time 0
buttons attack1
time 0.05
buttons
time 0.1
busy 1
# hagar is rocket BAD
bot hagar
channels 10
init
cmd aimtarget "tPercussion 1"
cmd barrier
cmd selectweapon 9
cmd wait 0.5
percussion 35 # 035_Kick_1-0.wav
time 0
buttons attack1
time 0.05
buttons
time 0.1
busy 0.15
percussion 60 # 060_Bongo_High-0.wav
percussion 35
percussion 61 # 061_Bongo_Low-0.wav
percussion 35
percussion 65 # 065_Timbale_High-0.wav
percussion 35
percussion 66 # 066_Timbale_Low-0.wav
percussion 35
# TODO hookbomb would be useful for #60
# RL is rocket NONE
bot rocket
channels 10
init
cmd aimtarget "tPercussion 1"
cmd barrier
cmd selectweapon 10
cmd wait 0.5
percussion 25 # 025_Snare_Roll-0.wav
time 0
buttons attack2
time 0.05
buttons
time 0.1
busy 1.1
# hook is hook bomb
bot hook
channels 10
init
@ -511,204 +542,156 @@ bot hook
cmd barrier
cmd selectweapon 13
cmd wait 0.5
percussion 58
percussion 62 # 062_Conga_High_1_Mute-0.wav
time 0
buttons attack1
time 0.05
buttons
time 0.1
busy 0
busy 0.1
percussion 63 # 063_Conga_High_2_Open-0.wav
percussion 62
# seeker is rocket tag
bot seeker
channels 10
init
time -2
cmd aimtarget "tPercussion 1"
cmd barrier
cmd selectweapon 18
cmd wait 0.5
percussion 51 # 051_Cymbal_Ride_1-0.wav
time 0
buttons attack1
time 0.05
buttons
time 0.1
busy 0.25
percussion 41 # 041_Tom_Low_2-0.wav
time 0
buttons attack2
time 0.05
buttons
time 0.1
busy 0.75
percussion 43 # 043_Tom_Low_1-0.wav
percussion 41
percussion 59 # 059_Cymbal_Ride_2-0.wav
percussion 51
# rifle is hard soft
bot rifle
channels 10
init
time -2
cmd aimtarget "tPercussion 1"
cmd barrier
cmd selectweapon 16
cmd wait 0.5
# percussion FIXME
# time 0
# buttons attack1
# time 0.05
# buttons
# time 0.1
# busy 1.2
percussion 58 # 058_Vibra-Slap-0.wav
time 0
buttons attack2
time 0.05
buttons
time 0.1
busy 0.9
bot jetpack
init
cmd resetaim
cmd barrier
cmd console "g_jetpack_attenuation 0.5"
percussion 42 # 042_Hi-Hat_Closed-0.wav
time 0
buttons hook
time 0.067
buttons
time 0.1
percussion 32 # 032_Square_Click-0.wav
percussion 42
percussion 36 # 036_Kick_2-0.wav
percussion 42
percussion 44 # 044_Hi-Hat_Pedal-0.wav
percussion 42
percussion 46 # 046_Hi-Hat_Open-0.wav
time 0
buttons hook
time 0.134
buttons
time 0.2
percussion 64 # 064_Conga_Low-0.wav
percussion 42
bot common
done
cmd resetaim
cmd aim "270 0"
cmd wait 1
barrier
buttons crouch
cmd wait 3
buttons
cmd wait 1
barrier
buttons use
cmd cc "kill"
cmd wait 900
# instantiate our bots!
bot instance_tuba_red
include tuba_red
include common
count 32
init
cmd movetotarget @places_tuba
cmd barrier
super
done
cmd resetaim
cmd aim "270 0"
cmd wait 1
barrier
buttons crouch
cmd wait 3
buttons
cmd wait 1
barrier
buttons use
cmd cc "kill"
cmd wait 900
bot instance_tuba_blue
include tuba_blue
include common
count 32
init
cmd movetotarget @places_tuba
cmd barrier
super
done
cmd resetaim
cmd aim "270 0"
cmd wait 1
barrier
buttons crouch
cmd wait 3
buttons
cmd wait 1
barrier
buttons use
cmd cc "kill"
cmd wait 900
bot instance_rocket
include rocket
count 1
init
cmd movetotarget @places_percussion
cmd barrier
super
done
cmd resetaim
cmd aim "270 0"
cmd wait 1
barrier
buttons crouch
cmd wait 3
buttons
cmd wait 1
barrier
buttons use
cmd cc "kill"
cmd wait 900
bot instance_uzi
include uzi
count 2
init
cmd movetotarget @places_percussion
cmd barrier
super
done
cmd resetaim
cmd aim "270 0"
cmd wait 1
barrier
buttons crouch
cmd wait 3
buttons
cmd wait 1
barrier
buttons use
cmd cc "kill"
cmd wait 900
bot instance_crylink
include crylink
count 2
init
cmd movetotarget @places_percussion
cmd barrier
super
done
cmd resetaim
cmd aim "270 0"
cmd wait 1
barrier
buttons crouch
cmd wait 3
buttons
cmd wait 1
barrier
buttons use
cmd cc "kill"
cmd wait 900
bot instance_jetpack
include jetpack
count 2
init
cmd movetotarget @places_percussion
cmd barrier
super
done
cmd resetaim
cmd aim "270 0"
cmd wait 1
barrier
buttons crouch
cmd wait 3
buttons
cmd wait 1
barrier
buttons use
cmd cc "kill"
cmd wait 900
bot instance_jump
include jump
count 2
init
cmd movetotarget @places_percussion
cmd barrier
super
done
cmd resetaim
cmd aim "270 0"
cmd wait 1
barrier
buttons crouch
cmd wait 3
buttons
cmd wait 1
barrier
buttons use
cmd cc "kill"
cmd wait 900
bot instance_hagar
include hagar
count 6
init
cmd movetotarget @places_percussion
cmd barrier
super
done
cmd resetaim
cmd aim "270 0"
cmd wait 1
barrier
buttons crouch
cmd wait 3
buttons
cmd wait 1
barrier
buttons use
cmd cc "kill"
cmd wait 900
bot instance_laser
include laser
include common
count 12
init
cmd movetotarget @places_percussion
cmd barrier
super
bot instance_shotgun
include shotgun
include common
count 2
init
cmd movetotarget @places_percussion
cmd barrier
super
bot instance_uzi
include uzi
include common
count 4
init
cmd movetotarget @places_percussion
cmd barrier
super
done
cmd resetaim
cmd aim "270 0"
cmd wait 1
barrier
buttons crouch
cmd wait 3
buttons
cmd wait 1
barrier
buttons use
cmd cc "kill"
cmd wait 900
bot instance_electro
include electro
@ -717,37 +700,84 @@ bot instance_electro
cmd movetotarget @places_percussion
cmd barrier
super
done
cmd resetaim
cmd aim "270 0"
cmd wait 1
barrier
buttons crouch
cmd wait 3
buttons
cmd wait 1
barrier
buttons use
cmd cc "kill"
cmd wait 900
bot instance_hook
include hook
bot instance_crylink
include crylink
include common
count 4
init
cmd movetotarget @places_percussion
cmd barrier
super
bot instance_nex
include rocket
include common
count 2
init
cmd movetotarget @places_percussion
cmd barrier
super
done
cmd resetaim
cmd aim "270 0"
cmd wait 1
barrier
buttons crouch
cmd wait 3
buttons
cmd wait 1
barrier
buttons use
cmd cc "kill"
cmd wait 900
bot instance_minstanex
include rocket
include common
count 2
init
cmd movetotarget @places_percussion
cmd barrier
super
bot instance_hagar
include hagar
include common
count 8
init
cmd movetotarget @places_percussion
cmd barrier
super
bot instance_rocket
include rocket
include common
count 4
init
cmd movetotarget @places_percussion
cmd barrier
super
bot instance_hook
include hook
count 4
init
cmd movetotarget @places_percussion
cmd barrier
super
bot instance_seeker
include seeker
count 4
init
cmd movetotarget @places_percussion
cmd barrier
super
bot instance_rifle
include rifle
include common
count 2
init
cmd movetotarget @places_percussion
cmd barrier
super
bot instance_jetpack
include jetpack
include common
count 2
init
cmd movetotarget @places_percussion
cmd barrier
super
# TODO jumping?

View File

@ -107,6 +107,7 @@ sub botconfig_read($)
}
elsif(/^transpose (\d+)/)
{
$currentbot->{transpose} ||= 0;
$currentbot->{transpose} += $1;
}
elsif(/^channels (.*)/)
@ -150,7 +151,7 @@ sub botconfig_read($)
}
elsif(/^bot (.*)/)
{
$currentbot = ($bots{$1} ||= {count => 0, transpose => 0});
$currentbot = ($bots{$1} ||= {count => 0});
}
elsif(/^raw (.*)/)
{
@ -270,7 +271,7 @@ sub busybot_note_off_bot($$$$)
#print STDERR "note off $bot:$time:$channel:$note\n";
return 1
if $channel == 10;
my $cmds = $bot->{notes_off}->{$note - $bot->{transpose} - $transpose};
my $cmds = $bot->{notes_off}->{$note - ($bot->{transpose} || 0) - $transpose};
return 1
if not defined $cmds; # note off cannot fail
$bot->{busy} = 0;
@ -294,8 +295,8 @@ sub busybot_note_on_bot($$$$$)
}
else
{
$cmds = $bot->{notes_on}->{$note - $bot->{transpose} - $transpose};
$cmds_off = $bot->{notes_off}->{$note - $bot->{transpose} - $transpose};
$cmds = $bot->{notes_on}->{$note - ($bot->{transpose} || 0) - $transpose};
$cmds_off = $bot->{notes_off}->{$note - ($bot->{transpose} || 0) - $transpose};
}
return -1 # I won't play this note
if not defined $cmds;