User talk:Morgan525: Difference between revisions
moving stuff from my main page to the discussion section |
→Table of Battlescape sound calls: - moved to discussion section |
||
| Line 63: | Line 63: | ||
</nowiki> | </nowiki> | ||
==Other Random Sound Information== | |||
<nowiki> | |||
406100-subroutine for melee attacks | |||
406110- set default melee sound event to 1A | |||
(4067C8)data base of melee attacks | |||
value offset sound event # | |||
00 461B2 2F | |||
01 461BC 2E | |||
02 461C6 2D | |||
03 461E7 skip | |||
04 461E7 skip | |||
05 461E7 skip | |||
06 461E7 skip | |||
07 461C6 2D | |||
Reference points for unit movement sound event IDs. [this word referenced] | |||
.data:0046D1A0 00 00 00 00 01 00 01 00 00 00 00 00 [00 00] 00 00 | |||
.data:0046D1B0 [00 00] 00 00 [00 00] 00 00 [01 00] 01 00 [00 00] 00 00 | |||
.data:0046D1C0 [02 00] 01 00 [00 00] 00 00 [00 00] 00 00 [04 00] 01 00 | |||
.data:0046D1D0 [05 00] 01 00 [06 00] 01 00 [00 00] 00 00 [00 00] 00 00 | |||
.data:0046D1E0 [00 00] 00 00 [0A 00] 01 00 [00 00] 00 00 [00 00] 00 00 | |||
.data:0046D1F0 [18 00] 01 00 01 00 00 00 01 00 0B 00 0C 00 01 00 | |||
data set for death scream per unit. | |||
0.data:0046B644 word_46B644 dw 20h ; DATA XREF: sub_40E450+55�r | |||
1.data:0046B646 db 20h | |||
2.data:0046B648 db 20h | |||
3.data:0046B64A db 21h | |||
4.data:0046B64C db 22h | |||
5.data:0046B64E db 23h | |||
6.data:0046B650 db 24h | |||
7.data:0046B652 db 25h | |||
8.data:0046B654 db 26h | |||
9.data:0046B656 db 27h | |||
A.data:0046B658 db 28h | |||
B.data:0046B65A db 29h | |||
C.data:0046B65C db 2Ah | |||
D.data:0046B65E db 2Bh | |||
E.data:0046B660 db 2Ch | |||
F.data:0046B662 db 20h | |||
10.data:0046B664 db 32h | |||
11.data:0046B666 db 20h | |||
SUBROUTINE USED FOR | |||
404650+1AE PSI ATTACK EFX | |||
406100+4F9 TERRORIST MELEE ATTACK EFX | |||
40B420+111 EXPLOSION EFX | |||
40B420+24F EXPLOSION EFX? | |||
40E450+73 DEATH SCREAM EFX | |||
40F2C0+285 PLACE ITEM EFX | |||
4110E0+E0 ITEM USE EFX | |||
4110E0+901 SHOT HIT EFX | |||
419660+1A5 PLACE ITEM (INVENTORY) EFX | |||
419660+346 RELOAD EFX | |||
41DCC0+D1 STUN ROD ATTACK EFX | |||
41EE10+8C PSI ATTACK EFX | |||
41F0F0+8C PSI ATTACK EFX | |||
41FD10+8B MIND PROBE EFX | |||
421140+13 DOORS EFX | |||
4247D0+27A NON-WALK MOVE EFX | |||
4247D0+4D4 WALK MOVE EFX | |||
42A630+B7 GMTATICS.MID | |||
42A6F0+18 GMLOSE.MID | |||
42B6F0+E9 GMWIN.MID | |||
43D8C0+E GEOSCAPE OPEN WINDOW EFX | |||
4407D0+2E ? | |||
4407D0+9C GMGEOx.MID | |||
445B00+BC GMINTER.MID | |||
4467C0+1C1 X-COM CRAFT LEFT WEAPON EFX | |||
4467C0+233 X-COM CRAFT RIGHT WEAPON EFX | |||
446DA0+267 UFO HIT EFX | |||
4470B0+F2 UNKNOWN INTERCEPTION EVENT (CRAFT CRASH EFX?) | |||
447EE0+32 GMSTORY.MID | |||
448390+28F ?? | |||
448390+2DD BASE DEFENSE (EVENT 9) | |||
448390+3DC ?0A (BASE DEFENSE?) | |||
448390+3F1 ?0A | |||
448390+406 ?0A | |||
44A220+15 GMSTORY.MID | |||
44C940+10 GMDEFEND.MID | |||
44CD40+26 GMBASE.MID | |||
44D030+D GMDEFEND.MID | |||
44D3C0+E GMMARS.MID | |||
44D690+10 GMMARS.MID | |||
44DACO+10 GMBASE.MID | |||
450F10+91 BLEEP (1) | |||
45DCA0+17 ?? | |||
</nowiki> | |||
==Functions used in UFOextender's new interception routines== | ==Functions used in UFOextender's new interception routines== | ||
Revision as of 01:33, 14 July 2012
Table of Battlescape sound calls
The following is a list of how most events in TACTICAL generate sounds. This data is scattered throughout the executable in various data arrays. First an event number is passed to the sound subroutine. The program then compares the event with its corresponding entry in another section to determine how to play that sound. 06 is the standard method. 01 plays the sound uninterrupted by other sounds.
Play CAT Evt# Setting reference Description 00 00 -- Normal bipedal movement. Routine refers to tileset and alternates between 1 and 2. 01 01 0E normal tank move 02 01 00 snakeman move 03 02 -- 04 01 0F Flying unit move 05 01 10 Celatid move 06 01 2F Silacoid move 07 02 -- 08 02 -- 09 02 -- 0A 01 28 hovertank/cyberdisk move 0B 06 04 rifle/pistol shoot 0C 06 16 bullet hit 0D 03 14 sliding door opens. Routine randomly plays 1 of the 2 entries in SAMPLE2. 0E 06 03 normal door opens 0F 02 -- 10 06 0C big gun shoots 11 06 0D big gun hits 12 06 0B laser gun shoots 13 06 13 laser shot hits 14 06 12 plasma gun shoots 15 06 13 plasma shot hits 16 06 34 rocket launches 17 06 35 blaster bomb/stun launcher shoots 18 06 0C small explosion (problem: zombie move) 19 06 05 big explosion 1A 02 -- stun rod (*problem*) 1B 06 24 psi attack 1C 06 06 mind probe use* 1D 06 11 reload weapon 1E 06 26 place an item 1F 02 -- 20 04 -- death of a male. Routine randomly plays 1 of the 3 sounds in SAMPLE2. 21 06 17 tank destroyed 22 06 0A sectoid death 23 06 08 snakeman death 24 06 09 etheral death 25 06 06 muton death 26 06 0A floater death 27 06 07 celatid death 28 06 08 silacoid death 29 06 09 chryssalid death 2A 06 0A reaper death 2B 06 17 sectopod death 2C 06 17 cyberdisk death 2D 06 30 zombie & reaper attack 2E 06 31 chryssalid attack 2F 06 32 silacoid attack 30 06 30 celatid attack 31 06 27 throw an item 32 05 -- death of a female. Routine randomly plays 1 of the 3 sounds in SAMPLE2. 33 02 -- 34 02 35 02 36 02 37 02
Other Random Sound Information
406100-subroutine for melee attacks 406110- set default melee sound event to 1A (4067C8)data base of melee attacks value offset sound event # 00 461B2 2F 01 461BC 2E 02 461C6 2D 03 461E7 skip 04 461E7 skip 05 461E7 skip 06 461E7 skip 07 461C6 2D Reference points for unit movement sound event IDs. [this word referenced] .data:0046D1A0 00 00 00 00 01 00 01 00 00 00 00 00 [00 00] 00 00 .data:0046D1B0 [00 00] 00 00 [00 00] 00 00 [01 00] 01 00 [00 00] 00 00 .data:0046D1C0 [02 00] 01 00 [00 00] 00 00 [00 00] 00 00 [04 00] 01 00 .data:0046D1D0 [05 00] 01 00 [06 00] 01 00 [00 00] 00 00 [00 00] 00 00 .data:0046D1E0 [00 00] 00 00 [0A 00] 01 00 [00 00] 00 00 [00 00] 00 00 .data:0046D1F0 [18 00] 01 00 01 00 00 00 01 00 0B 00 0C 00 01 00 data set for death scream per unit. 0.data:0046B644 word_46B644 dw 20h ; DATA XREF: sub_40E450+55�r 1.data:0046B646 db 20h 2.data:0046B648 db 20h 3.data:0046B64A db 21h 4.data:0046B64C db 22h 5.data:0046B64E db 23h 6.data:0046B650 db 24h 7.data:0046B652 db 25h 8.data:0046B654 db 26h 9.data:0046B656 db 27h A.data:0046B658 db 28h B.data:0046B65A db 29h C.data:0046B65C db 2Ah D.data:0046B65E db 2Bh E.data:0046B660 db 2Ch F.data:0046B662 db 20h 10.data:0046B664 db 32h 11.data:0046B666 db 20h SUBROUTINE USED FOR 404650+1AE PSI ATTACK EFX 406100+4F9 TERRORIST MELEE ATTACK EFX 40B420+111 EXPLOSION EFX 40B420+24F EXPLOSION EFX? 40E450+73 DEATH SCREAM EFX 40F2C0+285 PLACE ITEM EFX 4110E0+E0 ITEM USE EFX 4110E0+901 SHOT HIT EFX 419660+1A5 PLACE ITEM (INVENTORY) EFX 419660+346 RELOAD EFX 41DCC0+D1 STUN ROD ATTACK EFX 41EE10+8C PSI ATTACK EFX 41F0F0+8C PSI ATTACK EFX 41FD10+8B MIND PROBE EFX 421140+13 DOORS EFX 4247D0+27A NON-WALK MOVE EFX 4247D0+4D4 WALK MOVE EFX 42A630+B7 GMTATICS.MID 42A6F0+18 GMLOSE.MID 42B6F0+E9 GMWIN.MID 43D8C0+E GEOSCAPE OPEN WINDOW EFX 4407D0+2E ? 4407D0+9C GMGEOx.MID 445B00+BC GMINTER.MID 4467C0+1C1 X-COM CRAFT LEFT WEAPON EFX 4467C0+233 X-COM CRAFT RIGHT WEAPON EFX 446DA0+267 UFO HIT EFX 4470B0+F2 UNKNOWN INTERCEPTION EVENT (CRAFT CRASH EFX?) 447EE0+32 GMSTORY.MID 448390+28F ?? 448390+2DD BASE DEFENSE (EVENT 9) 448390+3DC ?0A (BASE DEFENSE?) 448390+3F1 ?0A 448390+406 ?0A 44A220+15 GMSTORY.MID 44C940+10 GMDEFEND.MID 44CD40+26 GMBASE.MID 44D030+D GMDEFEND.MID 44D3C0+E GMMARS.MID 44D690+10 GMMARS.MID 44DACO+10 GMBASE.MID 450F10+91 BLEEP (1) 45DCA0+17 ??
Functions used in UFOextender's new interception routines
For those that might want to know how accuracy is calculated with the new options for interception turned on:
X-Craft Accuracy
[(1+((3-(.5*(difficulty level-1)))/UFOsize)/2 ] * Weapon Accuracy ....... [beginner=1..superhuman=5]
Diff Ship Size
VS S M L VL
begin 0.8 0.875 1 1.25 2
exp 0.75 0.8125 0.91667 1.125 1.75
vet 0.7 0.75 0.83333 1 1.5
Genius 0.65 0.6875 0.75 0.875 1.25
Super 0.6 0.625 0.66667 0.75 1
UFO Accuracy
60 + ((difficulty level-1)*3) - [Cautious Mode bonus (10)]
Feedback
Any questions or feedback one may have....
Decompiled accuracy algorithm?
Hi Morgan/Tycho
Is the algorithm you describe above, what you have decompiled from the standard game? Or is it a variant for UFOExtender? Great news if you have decompiled what the game actually uses - I will need to check some of my firepower calculations to make sure they are still in line with the algorithm.
cheers, Spike 09:37, 30 June 2012 (EDT)
It is an extender version of the original formula if one chooses to enable it. The original is the one that has been noted already: [1+(3/UFOsize)]/2 * Weapon Accuracy ... UFO sizes going from 5 for very small to 1 for very large. The calculation starts at offset 0x446DCD of the CE version. If one were to set the extender's interception difficulty to beginner, the algorithm's output is the same as the original one. The original UFO accuracy algorithm is a flat 60% chance to hit despite the difficulty level (and no penalty for the Xcraft being in cautious mode.)
Morgan525 19:23, 30 June 2012 (EDT)