hi there
i'm pretty much at the final stage of my CoD1 MP map creation, now trying to finetune it. instead of posting to various and long abandoned topics, i would like to post all my problems into this topic, and i would be really grateful if you guys could help me out.
-------------------------------------------------------------------------------------------------------------
1. origins make the game crash: adding sound
i have experienced this on various occasions.
i was trying to add a sound to a fire (i don't physically have the fire effect on the map yet, i haven't edited any of the stock ones to fit the map). i was following
this tutorial.
i have a brush placed on the map, with classname "script_model" and targetname "firesound".
i have a fire.gsc in \maps\mp with the following content:
Code:
main()
{
thread alert_sound();
}
alert_sound()
{
alerts = getentarray ("firesound", "targetname");
while (1)
{
{
for (i=1;i<alerts.size;i++)
alerts[0] playsound("fire");
alerts[0] playsound("fire");
wait (3);
self thread alert_sound();
return;
}
}
}
i have a mymap.csv in soundaliases with the following content:
Code:
"# If the text in the first column of a row starts with a # character, the row is ignored",,
,,"If the first column for a row is blank, then the row is ignored"
# The first non-comment line of a sound alias file specifies the key name for all values appearing in this column.,,
"# This means it is safe to swap entire columns around, though you should never swap partial columns.",,
"# You can invent new keys, but the game will ignore them if it doesn't know about them.",,
"# You can leave out keys, but the ""name"" and ""file"" keys must always be present.",,
,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,,,,,,,,,,,,,
#Sound Effects
fire,,fire/Fire_Sm_loop01.wav,0.25,,,,,,,,,,looping,,
and i have invited the gsc into the mymap.gsc like this:
Code:
main()
{
maps\mp\_load::main();
maps\mp\fire::main();
when i start the map, it loads almost entirely, then abut half centimeter before the end of the loading bar it stops, the windows cursor gets visible, and with an esc key i can return to the desktop, so no chance to view the errorlog in the console...
-------------------------------------------------------------------------------------------------------------
2. origins make the game crash: adding rotation
here i have followed more tutorials as none of contained the exact effect i wanted to achieve. i wanted to rotate endlessly a vinyl.
i had my brush placed on the map, with classname "script_origin" (or covered with common/origin texture, btw, is there a differenc between these two options?) and targetname "vinyl". i have selected the brush and the origin and set them to a brushmodel.
i had a vinyl.gsc placed into maps\mp, and invited into the mymap.gsc, containing this script:
Code:
main()
{
vinyl = getEnt("vinyl", "targetname");
angle = 90; // 4 times = one full round
seconds = 1;
while (1)
{
for (i=0; i<4; i++)
{
iprintlnbold("rotateYaw " + i); // 0,1,2,3 = 4
vinyl rotateYaw(angle, seconds);
vinyl waittill("rotatedone");
}
}
}
i'm not sure about all lines what it means and how i need it, but looked to be working in the tutorial video. now, i have the same result as in issue 1, before the map could be loaded, it stops, and the game crashes to desktop. if i remove the connection from the mymap.gsc, the problem persists. if i remove the script_origin from the map, then i have a working map again.
-------------------------------------------------------------------------------------------------------------
3. adding custom water?
i currently have pegasusnight_pond on the map as the effect for a river, which could suit better to the map if i could customize it a bit: i would like to add semi-transparency, custom overlay and custom reflection texture to it.
i have located main\shaders\water.shader, copied the pegasusnight_pond section, pasted into the same file at the bottom, renamed only the section as mymap_pond, saved into the respective location, but no new stuff appears in the editor under this name. tried to save just the custom water definition as a new shader, but with same results. what am i missing?
there are shadertype (.stype) files where i can define how a texture with the desired prefix (like
customwater@xyz.dds) should work, but as far as i have experienced, it does not make it appear on the sfx list even with the shader combined.
even overwriting the pegasusnight_pond stuff doesn't change anything in the appearance, and i have no idea what am i missing... : (
-------------------------------------------------------------------------------------------------------------
4. ambient indoor?
as far as i can see, there is a separate background ambient for the exterior, and a different one for the interior. i beleive that exterior ambient is played by default, and interior ambient is played in areas where it is defined as "interior" in radiant. but i could not figure out if it is a common texture, or does it even work this way?
that's all i have in the mp_mymap.gsc, and this pretty much does the trick and plays the exterior ambient everywhere:
ambientPlay("ambient_mp_mymap");
that's the content of the sound/ambient folder:
amb_mymap_ext.mp3
amb_mymap_int.mp3
-------------------------------------------------------------------------------------------------------------
5. portals
i have quite low fps values for the map, although i have a reasonal number of clean and well placed structural brushes, and a hell of a lot detail brushes. quite low is sometimes 150, sometimes 250, which i do believe caused by the larger custom textures i utilize to have acceptable visuals. however, if i decide to portal the map, are the certain rules i have to follow? i have learned the basics from the tutorials, but they don't answer these:
- do i have to portal the entire map?
- is there an ideal quantity of portals on a map?
- is there an ideal size of a single portal?
that's pretty much all for now. i hope you guys can help me a bit figuring out these questions, and thanks in advance