-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsandstorm_deltas_macros.qci
121 lines (111 loc) · 3.65 KB
/
sandstorm_deltas_macros.qci
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
//
// adding special sandstorm sequences with explanation
//
// after spending some time on this subject, here are some sandstorm delta sequence types:
//
// Type 1: regular delta sequence
// just a regular delta sequence, nothing interesting
// for example bolt, trigger, safety, slide, foregrip etc sequences
//
// $sequence "delta_seq_name" delta {
// "file.smd"
// }
//
//
// Type 2: regular predelta sequence
// a predelta sequence, pretty much same as delta
// for example draw, holster, down sequences
//
// $sequence "delta_seq_name" predelta {
// "file.smd"
// }
//
//
// Type 3: linear predelta animation sequence:
// this was discovered by messing around with different stuff, it is similiar to the second type
// first thing required is an animation with the lineardelta option
// then add the animation into a type 2 predelta sequence
// for example fire, pump/cycle, inspect sequences
//
// I made a macro for this type, the first 2 types should be written by hand and are straightforward anyway
// the command is: $linearpredelta "seqname" "file.smd"
//
// $animation "anim_name" "file.smd" lineardelta
// $sequence "delta_seq_name" predelta anim_name
//
//
// you can also use weightlists and other stuff to control the sequences:
// as for the hands, some sequences should have disabled the clavical bones movement, whereas others should not
// some should have just one of them enabled, its a matter of experimenting
// most often the clavicals are disabled, from upperarms until hands are enabled, and fingers are disabled
//
// as for the weapon, the weapon bone itself is enabled and other parts - trigger, bolt, etc are disabled
// some sequences require weightlists, others work just fine without using them
//
// keep in mind that these are still just deltas, not actual sequences
// however it is easy to make usable sequences by adding them onto a blank/idle sequence or by other means
//
$definemacro linearpredelta seqname smdfile \\
$animation anim_linearpredelta_$seqname$ $smdfile$ { \\
lineardelta \\
} \\
$sequence $seqname$ predelta { \\
anim_linearpredelta_$seqname$ \\
// hidden \\
}
// test macro for adding a complete (sort of) type 3 sequences
// this makes a type 3 delta sequence, then animation with the same sequence but with no movement, rotates it via a weightlist, and adds the delta sequence to the empty anim
// this will also need some more weightlists for more control, but it's still a wip
$weightlist "weights_rotate_90" {
"b_root" 1
"b_ch_middle" 0
"b_wpn" 0
}
$definemacro deltasequence seqname smdfile \\
$animation anim_delta_$seqname$ $smdfile$ { \\
lineardelta \\
} \\
$sequence seq_delta_$seqname$ predelta { \\
anim_delta_$seqname$ \\
hidden \\
} \\
$animation anim_blank_$seqname$ $smdfile$ { \\
weightlist "weights_rotate_90" \\
} \\
$sequence $seqname$ { \\
anim_blank_$seqname$ \\
addlayer seq_delta_$seqname$ \\
}
$definemacro deltasequenceframes seqname smdfile end \\
$animation anim_delta_$seqname$ $smdfile$ { \\
lineardelta \\
frames 0 $end$ \\
} \\
$sequence seq_delta_$seqname$ predelta { \\
anim_delta_$seqname$ \\
hidden \\
} \\
$animation anim_blank_$seqname$ $smdfile$ { \\
weightlist "weights_rotate_90" \\
frames 0 $end$ \\
} \\
$sequence $seqname$ { \\
anim_blank_$seqname$ \\
addlayer seq_delta_$seqname$ \\
}
$definemacro deltasequenceweightlist seqname smdfile wlist \\
$animation anim_delta_$seqname$ $smdfile$ { \\
lineardelta \\
} \\
$sequence seq_delta_$seqname$ predelta { \\
anim_delta_$seqname$ \\
hidden \\
weightlist $wlist$\\
} \\
$animation anim_blank_$seqname$ $smdfile$ { \\
weightlist "weights_rotate_90" \\
} \\
$sequence $seqname$ { \\
anim_blank_$seqname$ \\
addlayer seq_delta_$seqname$ \\
}