]> de.git.xonotic.org Git - xonotic/xonotic.wiki.git/blob - Xonotic-Bot-Orchestra.md
Update Home
[xonotic/xonotic.wiki.git] / Xonotic-Bot-Orchestra.md
1 Xonotic Bot Orchestra
2 =====================
3
4 This page explains how to create your very own Bot Orchestra performance.
5
6 In case you want to watch existing Bot Orchestra performances, visit http://www.youtube.com/user/XonoticBotOrchestra
7
8 Note: stuff in *italics* is up to you and may/will need changing from my examples here.
9
10 Mapping a Bot Orchestra Stage
11 -----------------------------
12
13 To do a bot orchestra performance, a “stage” map for the orchestra is required. It needs the following entities, if you use the default midi2cfg-ng.conf:
14
15 -   a target\_position called tVocals for the vocalist
16 -   a target\_position called tPercussion which is where the bots will aim. It’s a good idea to have a noimpact surface behind it so shots don’t make a noise on their impact.
17 -   32 target\_position entities called tUba1 to tUba32 for where bots with tubas/accordeons should walk to start their performance
18 -   32 target position entities called tChr1 to tChr32 for where percussion bots should walk to start their performance. They will then aim at tPercussion. These targets must not be on a nosteps or metalsteps surface!
19 -   3 target\_position entities called tMetalSteps1 to tMetalSteps3 for bots to jump on for metal step sounds
20 -   4 target\_position entities called tNoSteps1 to tNoSteps4 for jetpack bots so they don’t make an unwanted landing sound
21 -   info\_player\_deathmatch spawnpoints with “restriction” “1” for where bots are to spawn
22 -   info\_player\_deathmatch spawnpoints with “restriction” “2” for where humans are to spawn
23 -   you probably want to make it so the tUba bots can’t leave their area using various means; see the opera map for a quite safe approach involving a “shootable” trigger, but you could also make a pit you can fall into but not get out, or a teleport, or similar tricks to keep them enclosed.
24 -   also you may want to look at opera’s mapinfo settings: it sets \_independent\_players 1 and bot\_navigation\_ignoreplayers 1 to help bot navigation. If you can get it to work without these hacks, it’d be better though.
25
26 In the following example, we will use the map *opera* by Morphed for the orchestra. You can find it in the branch *divVerent/opera-by-morphed*.
27
28 Creating a bot script
29 ---------------------
30
31 To create a bot script, first you need to prepare a MIDI file, for which you need to take care of:
32
33 -   percussion must be on track 10 only; percussion was mapped manually by me in midi2cfg-ng.conf by “similar sound”; you may want to read that file for reference so you can assign percussion instruments the way you want
34 -   program change event for Accordeon, Harmonica and Tango Accordeon uses the @!#%'n Accordeons
35 -   anything else uses the @!\#%'n Tuba
36
37 Then, you run in misc/tools/ of Xonotic:
38
39     perl midi2cfg-ng.pl midi2cfg-ng.conf MIDIFILE.mid transpose > ~/.xonotic/data/x.cfg
40
41 (you also can use any other .cfg name here, but it must be in the same directory as config.cfg and I prefer x.cfg because the unmodified tuba-play.cfg uses it)
42 In case not all notes could be played, information is printed to help you choose the *transpose* parameter. You should try 0 at first.
43
44 Vocals
45 ------
46
47 In order to play vocals, you need to put an additional file *MIDIFILE.mid.vocals* next to your MIDI file. An example vocals file:
48
49     scale 0.5
50     18240 sound/ikamusume-op/01-shinryaku.ogg
51     65142 sound/ikamusume-op/02-kirakira.ogg
52     72868 sound/ikamusume-op/03-kagayaku.ogg
53     80594 sound/ikamusume-op/04-minna-de.ogg
54     87629 sound/ikamusume-op/05-hajimemashou.ogg
55     91392 sound/ikamusume-op/05-hajimemashou.ogg
56     95831 sound/ikamusume-op/06-horahora.ogg
57     103465 sound/ikamusume-op/07-wagamama.ogg
58     111191 sound/ikamusume-op/08-ochitari.ogg
59     118426 sound/ikamusume-op/09-ikan-deshou.ogg
60     122312 sound/ikamusume-op/09-ikan-deshou.ogg
61     126505 sound/ikamusume-op/10-honto.ogg
62     134216 sound/ikamusume-op/11-yasashii.ogg
63     142034 sound/ikamusume-op/12-motteru.ogg
64     149253 sound/ikamusume-op/13-anata.ogg
65     157440 sound/ikamusume-op/14-hitoribocchi.ogg
66     164936 sound/ikamusume-op/15-umi-no.ogg
67     172800 sound/ikamusume-op/16-ichigen.ogg
68     176548 sound/ikamusume-op/17-kigen-mo.ogg
69     180311 sound/ikamusume-op/18-shiawase.ogg
70     184228 sound/ikamusume-op/19-mamorimasu.ogg
71     191770 sound/ikamusume-op/20.ogg
72     195840 sound/ikamusume-op/21-iikanji.ogg
73     203520 sound/ikamusume-op/22-iikanji.ogg
74     211200 sound/ikamusume-op/23-higashi.ogg
75     218880 sound/ikamusume-op/24-otakara.ogg
76     226560 sound/ikamusume-op/25-iikanji.ogg
77     234240 sound/ikamusume-op/26-iikanji.ogg
78     241920 sound/ikamusume-op/27-tanjouseki.ogg
79     249600 sound/ikamusume-op/28-konomama.ogg
80     257111 sound/ikamusume-op/29-shinryaku.ogg
81     264791 sound/ikamusume-op/30-keikaku.ogg
82     272548 sound/ikamusume-op/31-shinryaku.ogg
83
84 The numbers are measured in MIDI ticks, but are multiplied by the scale. I made this file by first using audio files inside Rosegarden and positioning them right, and then getting the numbers out of the compressed XML Rosegarden writes as its own file format. Another idea to get these numbers may be the event list editor in your MIDI app.
85
86 Performing
87 ----------
88
89 To perform, copy the files `tuba-play.cfg`, `tuba-record.cfg` and `tuba-settings.cfg` to your Xonotic config directory (~/.xonotic/data/ on Linux) and edit them to your taste. Then:
90
91     ./all run +exec tuba-play.cfg +map opera
92
93 The performance will soon begin, and your task is to move the camera appropriately for a good recording!
94
95 Recording
96 ---------
97
98 To make a video, you first run a performance as above, and then find out the file name of the .dem file in your Xonotic demo directory (~/.xonotic/data/demos/ on Linux). Then you do:
99
100     ./all run +exec input-demoseeking.cfg +exec tuba-record.cfg -demo demos/demofilename.dem
101
102 You can use the keys `m` `,` `.` for seeking, where `,` and `.` go backwards and forwards by a small step, and `m` and `-` seek by a large step. Press `x` to start/stop video capture.
103
104 Enjoy!