[SOF1] Ed. Entities. How to add music to the map. Need HELP

Models + Mapping, Computer & SOF Problems.
Reactions: 15
Posts: 718
Joined: 23 Nov 2011, 16:42
Location: Canada

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by Acadie »

Your result will be in mono from what I see but that's not important for the moment.

Fixed test4.dms

Code: Select all

00000000  0B 01 00 00 78 32 C8 A0 FF 73 6F 75 6E 64 2F 6D  ♂☺..x2╚á sound/m
00000010  75 73 69 63 2F 74 65 73 74 34 2E 77 61 76 00 73  usic/test4.wav.s
00000020  6F 75 6E 64 2F 6D 75 73 69 63 2F 74 65 73 74 34  ound/music/test4
00000030  2E 77 61 76 00 00 01 01 3C 00 00 00 00 00 00 00  .wav..☺☺<.......
00000040  00                                               .
Location:
  • ./SOF PLATINUM/user-server/sound/music/test4.wav
  • ./SOF PLATINUM/user-server/sound/music/test4.dms
I'm glad that your .wav file is not too big. The download speed in Soldier of Fortune is limited at best at around ~20KB/s. It gets worse for someone else if his ping is higher.
Reactions: 0
Posts: 55
Joined: 09 Nov 2021, 20:50

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by GStuff002 »

omg... ( (

Now the error has appeared, I can no longer fight (

Image:
https://ibb.co/9qXs7Lv" onclick="window.open(this.href);return false;

I'll try everything from the beginning.

Test5..
Reactions: 0
Posts: 55
Joined: 09 Nov 2021, 20:50

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by GStuff002 »

https://ibb.co/8BV89yG" onclick="window.open(this.href);return false;
test5, not work..(


I'll upload all the my sources

Link:
https://easyupload.io/t946f8" onclick="window.open(this.href);return false;
Reactions: 15
Posts: 718
Joined: 23 Nov 2011, 16:42
Location: Canada

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by Acadie »

Found 1 issue
Spoiler:
The playback was functional for me after that.
Reactions: 0
Posts: 55
Joined: 09 Nov 2021, 20:50

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by GStuff002 »

I thought of it and copied it to another folder
I got a sound if I use this folder: C:\SOF PLATINUM\user\sound\music

Sound with great distortion, wheezing, it is not even clear what is playing, as if one sound is superimposed on another through a meat grinder
Reactions: 0
Posts: 55
Joined: 09 Nov 2021, 20:50

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by GStuff002 »

I have uploaded 3 (worked) attempts with different frequency and distortion everywhere

Link:
https://easyupload.io/z04uiv" onclick="window.open(this.href);return false;
Reactions: 0
Posts: 55
Joined: 09 Nov 2021, 20:50

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by GStuff002 »

I will be glad if the music is played in mono but without distortion. 22050Hz will be enough for me
Reactions: 0
Posts: 55
Joined: 09 Nov 2021, 20:50

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by GStuff002 »

I think if nothing can be done with the distortion of the sound, it can be find another simple way ? ! In some other games it worked.
I will explain in more detail

Without SofPlus, if I use the "play test.wav" command in the console, the music plays in mono fine, this circumstance pleases
But the "Play" command does not work with SofPlus

I read the manual, tried the examples that are written in it, but nothing worked. SofPlus Dev. team complicated the code, probably only they can understand it

Is there another command to replace "Play" ?

I thought, if this new "play" command could be added to the 'auto'run maprotation.lst or entities.txt or somewhere else.

Example of maprotation2.lst:

// List with all maps

//
// DM maps
//
dm/fragfest2k-f; exec test.cfg; play test.wav
dm/intheairtonight
dm/prison


....The exec test.cfg contains the same - "play test.wav"

This does not work in SofPlus. How can this be done correctly? if there is such an opportunity and functions to add something to the launch of one map and then another. The idea is simple, but the implementation with the SofPlus mod made it difficult for me

Excerpts from the manual: https://ibb.co/Zf9fYS8" onclick="window.open(this.href);return false;

full server manual:
https://easyupload.io/vs3u9o" onclick="window.open(this.href);return false;
Reactions: 0
Posts: 55
Joined: 09 Nov 2021, 20:50

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by GStuff002 »

While waiting to figure it out, I'm trying to understand how a script with a timer works, I see he doesn't save me

{
"target" "amb"
"wait" "60.25" -----------------------------This is the duration of playing. But also the duration of waiting before the start of playback
"spawnflags" "1" To start playing immediately, then it need to set no more than on 20 sec
"origin" "0 0 0"
"classname" "func_timer"
}

If anyone is interested, I cut part of sound from the soundtrack from the movie (1985 - Commando)
Suitable for SOF1 for careful and discreet play

Link:
https://easyupload.io/jsv8i2" onclick="window.open(this.href);return false;

But not suitable for a script with a timer, since the playing time is 1:25, if it cut off less, then the meaning of the music is lost
Last edited by GStuff002 on 19 Nov 2021, 11:44, edited 1 time in total.
Reactions: 0
Posts: 55
Joined: 09 Nov 2021, 20:50

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by GStuff002 »

If you are interested an example of a map with music + script with a timer.
https://easyupload.io/789utq" onclick="window.open(this.href);return false;


I think it turned out great, but the limitations of this script are depressing. I unsubscribed about
this map in more detail in another topic: https://www.sof1.org/viewtopic.php?f=2& ... ead#unread" onclick="window.open(this.href);return false;
Reactions: 0
Posts: 55
Joined: 09 Nov 2021, 20:50

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by GStuff002 »

I found a custom map called "[rdam] _the_tube", the music starts automatically, I looked at entities, there is no script with a timer. I did not understand which way they used to call wav

Wav location is:
C:\SOF PLATINUM\user\sound\[r'dam]\[r'dam]_paris_drumloop1.wav

Link to entities:
https://easyupload.io/o4xjxa" onclick="window.open(this.href);return false;
Reactions: 0
Posts: 55
Joined: 09 Nov 2021, 20:50

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by GStuff002 »

I am still trying to find workarounds to solve this problem.

I found one way, but it needs to be edited more correctly. Perhaps by joint efforts we will find a way out of the situation.
I will describe everything so as not to miss anything, maybe something will work

Without SofPlus mod, I added cvar to default.cfg is "play sound test.wav"
So at the run of each map, I see in the console that the map calls this default.cfg file
And in this case, when any map was launched, the test.wav music is played in the begining
But this is not a way out of the problem, since default.cfg is used by all maps and the music in this case will be the same

Also, when I start any map, I see in the console that a file with bots is being called
This file has a different name for different maps. for example: [rdam] _the_tube.wrs
I removed the bot script and added "" play sound test.wav "but it didn't work and there was no error
So it doesn't fit. The function of this file does not include the execution of other commands.

Now the idea is clear

I do not know how and where to add a call function for each map to call my cfg (with a different cfg name for each maps), which is directed to the wav call. I think it must be somewhere in the script engine of the game itself.

With the SofPlus mod, this task is a little easier, but it need to find the name of the function that was changed by Sof+ team instead of "play sound"
and exec function too.

I understood a little the order of calling functions in Sof+, but I can't understand further, I need help. Provided that this might be the right approach

I found in sofplus-cvars.cfg. Alert call sound function and added my own:

set _sp_sv_sound_test "sp/test.wav" // "" ----------------- (sp - is the folder here)

But i cannot take this function through the console like: _sp_sv_sound_test

I created a test.cfg and added to it: _sp_sv_sound_test

But i cannot call test.cfg through the console like: exec test.cfg

Either the exec command is not suitable for Sof+ or it is called by a different method

I can’t understand, this idea should work, but I’m making mistakes somewhere

Perhaps this method solves all the problems. This method is for mono wav's, but even that will be cool, since the music will run automatically on each map and different, and most importantly, completely without cutting
Post Reply

Who is online

Users browsing this forum: No registered users and 29 guests