Csv fájlok használata tutorial
Sziasztok. Ebben a tutorialban leírom nektek, hogyan használjátok a csv fájlokat cod1 illetve UO-ban.
Tartalom.
1. Bevezető a csv fájlokba. 2. Call of Duty 1-hez tartozó csv fájlok. 3. Call of Duty United Offensive-hez tartozó csv fájlok. 4. A pályanév.pk3-on belül hova pakoljuk az egyes csv fájlokat. Kép!
1) Bevezetés a csv fájlokba.
A csv fájlban tároljuk a hangok elérési útvonalát és tulajdonságait (hangerejét, lejátszási sebességét, milyenségét--> (local, looping, steamed, stb). Ezt a fájl típust úgy tudjuk létrehozni, hogy létrehozunk egy exel fájlt, bele másoljuk amire szükségünk van, majd mentés másként--> pályanév.csv-re elmented.
2) Call of Duty 1 csv fájlok.
A cod1-hez mindössze 1db csv fájlra van szükségünk, melyet a soundaliases mappába rakunk bele pályanév.csv néven.
Alap csv fájl soundaliases mappához:
,name,name of the alias that is used to play this sound (required) ,sequence,"used to uniquely identify alias entries when more than one sound goes to an alias, used only to catch unwanted duplicates (default = 0)" ,file,the name of the file that contains the sound data (required) ,vol_min,"0 is silent, 1 is full volume (default = 1)" ,vol_max,"0 is silent, 1 is full volume (default = same as vol_min)" ,pitch_min,"1 is normal playback, 2 is twice as fast, 0.5 is half as fast (default = 1)" ,pitch_max,"1 is normal playback, 2 is twice as fast, 0.5 is half as fast (default = same as pitch_min)" ,dist_min,"within this distance in inches, the sound is always full volume (default = 120)" ,dist_max,"outside this distance in inches, the sound is not started. If left blank or set to 0, the sound will play from any distance. This does not affect sound volume falloff." ,channel,"auto, menu, weapon, voice, item, body, local, music, announcer (default = auto)" ,type,streamed / loaded (default = loaded) ,probability,weight to use for the weighted probability of playing this sound instead of another sound (default = 1) ,loop,"whether this sound is ""looping"" or ""nonlooping"" (default = ""nonlooping"")" ,masterslave,"if ""master"", this is a master sound. If a number, then this sound won't exceed this volume whenever any master sound is playing. If blank, then neither master nor slave." ,loadspec,"space-separated list of which maps should use this alias; eg, ""burnville dawnville"". If blank, the alias is used on all maps."
name,sequence,file,vol_min,vol_max,pitch_min,pitch_max,dist_min,dist_max,channel,type,probability,loop,masterslave,loadspec,subtitle
null,1,null.wav,,,,,,,,,,,,,
A null,1,null.wav,,,,,,,,,,,,, sor után üssünk 2db entert és írkáljuk, másoljuk be a saját hangfájlainkat:
pl:
hatterzene,,ambient/hatterzene.wav,1,1,1,1,,,local,streamed,,looping,,, t34motor,,misc/tank_idle.wav,,0.8,0.8,,,1500,item,,streamed,,looping,,
Ami a gyakorlatban így néz ki:
,name,name of the alias that is used to play this sound (required) ,sequence,"used to uniquely identify alias entries when more than one sound goes to an alias, used only to catch unwanted duplicates (default = 0)" ,file,the name of the file that contains the sound data (required) ,vol_min,"0 is silent, 1 is full volume (default = 1)" ,vol_max,"0 is silent, 1 is full volume (default = same as vol_min)" ,pitch_min,"1 is normal playback, 2 is twice as fast, 0.5 is half as fast (default = 1)" ,pitch_max,"1 is normal playback, 2 is twice as fast, 0.5 is half as fast (default = same as pitch_min)" ,dist_min,"within this distance in inches, the sound is always full volume (default = 120)" ,dist_max,"outside this distance in inches, the sound is not started. If left blank or set to 0, the sound will play from any distance. This does not affect sound volume falloff." ,channel,"auto, menu, weapon, voice, item, body, local, music, announcer (default = auto)" ,type,streamed / loaded (default = loaded) ,probability,weight to use for the weighted probability of playing this sound instead of another sound (default = 1) ,loop,"whether this sound is ""looping"" or ""nonlooping"" (default = ""nonlooping"")" ,masterslave,"if ""master"", this is a master sound. If a number, then this sound won't exceed this volume whenever any master sound is playing. If blank, then neither master nor slave." ,loadspec,"space-separated list of which maps should use this alias; eg, ""burnville dawnville"". If blank, the alias is used on all maps."
name,sequence,file,vol_min,vol_max,pitch_min,pitch_max,dist_min,dist_max,channel,type,probability,loop,masterslave,loadspec,subtitle
null,1,null.wav,,,,,,,,,,,,,
hatterzene,,ambient/hatterzene.wav,1,1,1,1,,,local,streamed,,looping,,, t34motor,,misc/tank_idle.wav,,0.8,0.8,,,1500,item,,streamed,,looping,,
Ezt mentsük el pályanév.csv néven a soundaliases mappába.
A sound mappába készítsünk egy misc és egy ambient mappát majd rakjuk bele a háttérzene.wav fájlunkat a sound/ambient mappába majd a tank_idele.wav fájlunkat a sound/misc mappába. És készen is vagyunk. Ha elindítjuk a pályánkat szólni fognak rajta a hangok.
3) Call of Duty United Offensive csv fájlok.
A coduo-hoz már 2db csv fájlra van szükségünk.
--Az egyik a soundaliases mappába kerül melyben tároljuk egyedi hangjaink tulajdonságati
--A második a soundloadspecs sp vagy mp mappájába kerül, ezekben csak meghívjuk a soundaliasesben lévő pályanév.csv és egyéb csv fájlokat.
Az első a már említett pályanév.csv fájl a soundaliases mappában. Ezt készítsük el az 1. pontban leírtak alapján.
A második szintén egy pályanév.csv fájl lesz de már a soundloadspecs mappába fogjuk rakni azon belül pedig sp illetve mp mappába tetszés szerint.
Ha single player pályához kell akkor értelem szerüen a soundloadspecs/sp mappába rakjuk a pályanév.csv fájlunkat Ha multi player pályához kell akkor pedig a soundloadspecs/mp mappába tegyük a pályanév.csv fájlunkat.
Ennek a fájlnak az elkészítése a következő.
Alap csv fájl MultiPlayer-hez
Hozzunk létre egy exel fájlt majd másoljuk bele ezt:
# This file defines the default soundalias files to load if no map specific loadspec file is found # If you want to include sounds into your map file which are not included here you should make a seperate "# load spec file int the form of ""<map name>.csv"" using this file as a base. You should only load the" # soundalias files which are absolutely necessary to keep the sound memory footprint as small as possible #*********************************************************************************************************
Most még nincs meghívva semilyen más csv fájl ezért hívjunk egy párat, köztük a sajátunkat is a soundaliases mappából.
Írjuk vagy másoljuk be ezeket:
pályanév.csv gmi_mp_weap_uk.csv gmi_sound.csv gmi_music.csv default.csv wep_gmi_sound.csv iw_sound.csv iw_sound2.csv iw_music.csv pi_sound.csv surface_gmi_sound.csv pi_sound.csv generic_mp_sound.csv gmi_credits.csv dialog_generic.csv dialog_mp.csv gmi_dialog_generic.csv gmi_dialog_mp.csv gmi_intros.csv gmi_mp_aircraft.csv gmi_mp_artillery.csv gmi_mp_vehicles_ge.csv gmi_mp_vehicles_ru.csv gmi_mp_vehicles_us.csv gmi_mp_weap_all_allied.csv gmi_mp_weap_uk.csv gmi_mp_weap_ru.csv gmi_mp_weap_us.csv credits.csv default.csv gmi_ru_intro.csv gmi_uk_intro.csv gmi_uk_mid.csv
Gyakorlatban így fog kinézni:
# This file defines the default soundalias files to load if no map specific loadspec file is found # If you want to include sounds into your map file which are not included here you should make a seperate "# load spec file int the form of ""<map name>.csv"" using this file as a base. You should only load the" # soundalias files which are absolutely necessary to keep the sound memory footprint as small as possible #*********************************************************************************************************
pályanév.csv gmi_mp_weap_uk.csv gmi_sound.csv gmi_music.csv default.csv wep_gmi_sound.csv iw_sound.csv iw_sound2.csv iw_music.csv pi_sound.csv surface_gmi_sound.csv pi_sound.csv generic_mp_sound.csv gmi_credits.csv dialog_generic.csv dialog_mp.csv gmi_dialog_generic.csv gmi_dialog_mp.csv gmi_intros.csv gmi_mp_aircraft.csv gmi_mp_artillery.csv gmi_mp_vehicles_ge.csv gmi_mp_vehicles_ru.csv gmi_mp_vehicles_us.csv gmi_mp_weap_all_allied.csv gmi_mp_weap_uk.csv gmi_mp_weap_ru.csv gmi_mp_weap_us.csv credits.csv default.csv gmi_ru_intro.csv gmi_uk_intro.csv gmi_uk_mid.csv
A most kapott fájlunkba meghívtuk az összes jármű, fegyver, stb hangját. Lényeges minden muliplayer pályához ezt az alapot használni mert így biztosan lesz minden fegyvernek, járműnek hangja. Ha törölsz, kihagysz belőle, akkor előfordulhat, hogy valaminek nem lesz hangja valaminek.
A most kapott fájlunkat tegyük szépen bele a soundloadspecs/mp mappába pályanév.csv néven.
Ezzel kész is a multiplayer részünk.
Jöhet a single player.
Alap csv fájl Singleplayer pályához
A soundaliases mappához tartozó csv fájlnak tulajdonképpen ugyan azokat a sorokat kell tartalmaznia mint a multis-nak, de a biztonság kedvéért bemásolom ide az alapot.
Alap csv fájl:
,name,name of the alias that is used to play this sound (required) ,sequence,"used to uniquely identify alias entries when more than one sound goes to an alias, used only to catch unwanted duplicates (default = 0)" ,file,the name of the file that contains the sound data (required) ,vol_min,"0 is silent, 1 is full volume (default = 1)" ,vol_max,"0 is silent, 1 is full volume (default = same as vol_min)" ,pitch_min,"1 is normal playback, 2 is twice as fast, 0.5 is half as fast (default = 1)" ,pitch_max,"1 is normal playback, 2 is twice as fast, 0.5 is half as fast (default = same as pitch_min)" ,dist_min,"within this distance in inches, the sound is always full volume (default = 120)" ,dist_max,"outside this distance in inches, the sound is not started. If left blank or set to 0, the sound will play from any distance. This does not affect sound volume falloff." ,channel,"auto, menu, weapon, voice, item, body, local, music, announcer (default = auto)",,,,,,,,,,,,, ,type,streamed / loaded (default = loaded),,,,,,,,,,,,, ,probability,weight to use for the weighted probability of playing this sound instead of another sound (default = 1),,,,,,,,,,,,, ,loop,"whether this sound is ""looping"" or ""nonlooping"" (default = ""nonlooping"")",,,,,,,,,,,,, ,masterslave,"if ""master"", this is a master sound. If a number, then this sound won't exceed this volume whenever any master sound is playing. If blank, then neither master nor slave.",,,,,,,,,,,,, ,loadspec,"space-separated list of which maps should use this alias; eg, ""burnville dawnville"". If blank, the alias is used on all maps.",,,,,,,,,,,,,
name,sequence,file,vol_min,vol_max,pitch_min,pitch_max,dist_min,dist_max,channel,type,probability,loop,masterslave,loadspec,subtitle
null,,null.wav,,,,,,,,,,,,,
Ezután szintén bemásoljuk a hangfájlok elérési útját, pl: egy lift hangját.
#Lift hangja,,,,,,,,,,,,,,, elevator1,,misc/elevator_med.wav,0.75,,1,,750,2500,,,,looping,,pályanév
Gyakorlatban így néz ki:
,name,name of the alias that is used to play this sound (required) ,sequence,"used to uniquely identify alias entries when more than one sound goes to an alias, used only to catch unwanted duplicates (default = 0)" ,file,the name of the file that contains the sound data (required) ,vol_min,"0 is silent, 1 is full volume (default = 1)" ,vol_max,"0 is silent, 1 is full volume (default = same as vol_min)" ,pitch_min,"1 is normal playback, 2 is twice as fast, 0.5 is half as fast (default = 1)" ,pitch_max,"1 is normal playback, 2 is twice as fast, 0.5 is half as fast (default = same as pitch_min)" ,dist_min,"within this distance in inches, the sound is always full volume (default = 120)" ,dist_max,"outside this distance in inches, the sound is not started. If left blank or set to 0, the sound will play from any distance. This does not affect sound volume falloff." ,channel,"auto, menu, weapon, voice, item, body, local, music, announcer (default = auto)",,,,,,,,,,,,, ,type,streamed / loaded (default = loaded),,,,,,,,,,,,, ,probability,weight to use for the weighted probability of playing this sound instead of another sound (default = 1),,,,,,,,,,,,, ,loop,"whether this sound is ""looping"" or ""nonlooping"" (default = ""nonlooping"")",,,,,,,,,,,,, ,masterslave,"if ""master"", this is a master sound. If a number, then this sound won't exceed this volume whenever any master sound is playing. If blank, then neither master nor slave.",,,,,,,,,,,,, ,loadspec,"space-separated list of which maps should use this alias; eg, ""burnville dawnville"". If blank, the alias is used on all maps.",,,,,,,,,,,,,
name,sequence,file,vol_min,vol_max,pitch_min,pitch_max,dist_min,dist_max,channel,type,probability,loop,masterslave,loadspec,subtitle
null,,null.wav,,,,,,,,,,,,,
#Lift hangja,,,,,,,,,,,,,,, elevator1,,misc/elevator_med.wav,0.75,,1,,750,2500,,,,looping,,pályanév
Ha ez megvan akkor mentsük el a soundaliases mappába, pályanév.csv néven.
Most jöhet a második csv fájl amit a soundloadspecs/sp mappába fogunk rakni pályanév.csv néven.
Belemásoljuk az alapot:
# This file defines the default soundalias files to load if no map specific loadspec file is found # If you want to include sounds into your map file which are not included here you should make a seperate "# load spec file int the form of ""<map name>.csv"" using this file as a base. You should only load the" # soundalias files which are absolutely necessary to keep the sound memory footprint as small as possible #*********************************************************************************************************
Majd meghívjuk a többi csv fájlt is köztük a sajátunkat.
pályanév.csv gmi_mp_weap_uk.csv gmi_sound.csv gmi_music.csv default.csv wep_gmi_sound.csv iw_sound.csv iw_sound2.csv iw_music.csv pi_sound.csv surface_gmi_sound.csv pi_sound.csv generic_mp_sound.csv gmi_credits.csv dialog_generic.csv dialog_mp.csv gmi_dialog_generic.csv gmi_dialog_mp.csv gmi_intros.csv gmi_mp_aircraft.csv gmi_mp_artillery.csv gmi_mp_vehicles_ge.csv gmi_mp_vehicles_ru.csv gmi_mp_vehicles_us.csv gmi_mp_weap_all_allied.csv gmi_mp_weap_uk.csv gmi_mp_weap_ru.csv gmi_mp_weap_us.csv credits.csv default.csv gmi_ru_intro.csv gmi_uk_intro.csv gmi_uk_mid.csv
Gyakorlatban így fog kinézni:
# This file defines the default soundalias files to load if no map specific loadspec file is found # If you want to include sounds into your map file which are not included here you should make a seperate "# load spec file int the form of "".csv"" using this file as a base. You should only load the" # soundalias files which are absolutely necessary to keep the sound memory footprint as small as possible #*********************************************************************************************************
pályanév.csv gmi_mp_weap_uk.csv gmi_sound.csv gmi_music.csv default.csv wep_gmi_sound.csv iw_sound.csv iw_sound2.csv iw_music.csv pi_sound.csv surface_gmi_sound.csv pi_sound.csv generic_mp_sound.csv gmi_credits.csv dialog_generic.csv dialog_mp.csv gmi_dialog_generic.csv gmi_dialog_mp.csv gmi_intros.csv gmi_mp_aircraft.csv gmi_mp_artillery.csv gmi_mp_vehicles_ge.csv gmi_mp_vehicles_ru.csv gmi_mp_vehicles_us.csv gmi_mp_weap_all_allied.csv gmi_mp_weap_uk.csv gmi_mp_weap_ru.csv gmi_mp_weap_us.csv credits.csv default.csv gmi_ru_intro.csv gmi_uk_intro.csv gmi_uk_mid.csv
Nos ezzel készen is vagyunk. Mentsük el.
Egy kis magyarázat a hangfájlok tárolását illetően:
pl:
elevator1,,misc/elevator_med.wav,0.75,,1,,750,2500,,,,looping,,pályanév
Elemezzük ki a sorunkat:
elevator1 = a gsc fájlodban ez a név van megadva a lejátszandó hangodhoz. misc/elevator_med.wav = Az elérési útvanoal (sound mappa / misc mappa / elevator_med.wav hangfájl) 0.75,,1,,750,2500,,,, = hangerő,lejátszási sebesség, hang hallható távolsága looping = ez a parancs addig játsza a hangot amig valami meg nem állítja. pályanév = minden sor végére ird oda a pályád nevét
Amivel még találkozhatsz:
auto = alapértelmezett csatorna steamed = ezt nem tudom, hogy mi weapon = fegyver hang local = helyi hang, ha eltávolodsz tőle elhalkul voice = emberi hang master = sajna ezt se tudom
looping = ismétlődő hang nonlooping = nem ismétlődik
4) Végezetül készítettem egy rajzot a pályanév.pk3 fájlodon belüli csv fájlok elhelyezkedéséről, hogy vizuálisan is lásd mit hova pakolj.

Krisz - Totalconversion.hu T 2010.05.27
|