![]() |
Script error (Again) - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: SOMA (https://www.frictionalgames.com/forum/forum-55.html) +--- Forum: User created content (https://www.frictionalgames.com/forum/forum-79.html) +---- Forum: Technical Support (https://www.frictionalgames.com/forum/forum-80.html) +---- Thread: Script error (Again) (/thread-50843.html) |
RE: Script error (Again) - Abion47 - 07-08-2016 (07-08-2016, 05:29 PM)Hypercube Wrote: I wasn't saying that Venom should use eMusicPrio_BgAmb but it was an example because that's what I had used for the moment. Interesting though, I didn't realize the compiler automatically converted it into a float. I thought I remember it just not working, is it okay to leave it at one or should you include the decimal point? I remember encountering issues with this before It depends on who you ask, I suppose. Strictly speaking, according to convention you should always use the type of constant that a variable/parameter/whatever is asking for to make it clear as to what you are doing. And sure, there can be cases in which a float is required such that an int wouldn't be able to get converted, but I'm not sure where in SOMA modding script those cases would arise (unless you start getting crazy with delegates, maybe). In practice, this is one of those conventions that people would probably recommend you follow, but not following it doesn't really hurt much in most circumstances. (07-08-2016, 05:33 PM)Venom Fox Wrote: To be sure that the audio file wasn't.. um.. broken, I used an audio track from Soma's soundtrack. In which folder? SOMA's folder? Your mod folder? Are you talking about SOMA's resources file or your mod's resources file? Did you copy the song from SOMA's folder into yours before you tested it? RE: Script error (Again) - Venom Fox - 07-08-2016 (07-08-2016, 05:43 PM)Abion47 Wrote:(07-08-2016, 05:29 PM)Hypercube Wrote: I wasn't saying that Venom should use eMusicPrio_BgAmb but it was an example because that's what I had used for the moment. Interesting though, I didn't realize the compiler automatically converted it into a float. I thought I remember it just not working, is it okay to leave it at one or should you include the decimal point? I remember encountering issues with this before I copied the song from Soma folders in to my mod folder. And I'm talking about my resources.cfg. Also, what a delight; My message module has stopped functioning aswell! *sighs* The heck is wrong with my pc... RE: Script error (Again) - Hypercube - 07-08-2016 Did you put it in your mod's music folder though? RE: Script error (Again) - Venom Fox - 07-08-2016 (07-08-2016, 06:37 PM)Hypercube Wrote: Did you put it in your mod's music folder though? Yeah, I did. RE: Script error (Again) - Abion47 - 07-08-2016 The dev mode doesn't load your mod's resources folder, so it doesn't know to look in your mod's music folder. You need to either add that folder to SOMA's resources file or add the music to SOMA's sound folder. Otherwise, you are telling the game to play a music file that it doesn't even know exists. The same thing goes for the message module - the files in your mod's script folder aren't going to be loaded. Try playing "00_00_apartment.ogg" to make sure that you can hear music at all. RE: Script error (Again) - Venom Fox - 07-08-2016 (07-08-2016, 06:58 PM)Abion47 Wrote: The dev mode doesn't load your mod's resources folder, so it doesn't know to look in your mod's music folder. You need to either add that folder to SOMA's resources file or add the music to SOMA's sound folder. Otherwise, you are telling the game to play a music file that it doesn't even know exists. The same thing goes for the message module - the files in your mod's script folder aren't going to be loaded. Tried playing the 00_00_apartment.ogg. Did not work... :/ Nothing should be wrong with my script files, my fade in function still works on the second map. I also tried to play the music in the second map aswell, but no luck there either. VERY weird... I wish my soma modding "career" won't end like this. RE: Script error (Again) - Daemian - 07-08-2016 wait, don't quit yet. xD There are two resources.cfg in this scenario. the one in soma/ and the other in soma/mods/yourmod/. The game itself and tools like level editor use the one in soma/, that's the main resources.cfg. So if you're editing your mod and you got new files, you gotta tell the game where to find them. This is the line I added to my soma/resources.cfg to let the game know where my files are: PHP Code: <Directory Path="/mods" AddSubDirs="true"/> But if you're using stuff from soma you don't need to add the directory, it's already there. That's why they tell you to try first with existing sounds from soma. That's for level editor and such. For testing -I don't know others- I launch the game with parameters like this: PHP Code: Soma.exe -user Dev -cfg ./mods/Sinneromo/Config/main_init.cfg Sinneromo is my mod I'm working on. If you look inside my main_init.cfg it tells the game which resources.cfg my mod wants to use. PHP Code: Resources = "mods/Sinneromo/resources.cfg" In this resources.cfg I got one extra line: PHP Code: <Directory Path="/mods/Sinneromo" AddSubDirs="true"/> For example, I got in my mod a copy of the script file InputHandler.hps which I modified. And the game always reads my file instead of the original from the game cause my resources.cfg is loading my files first. RE: Script error (Again) - Venom Fox - 07-09-2016 (07-08-2016, 10:58 PM)Daemian Wrote: wait, don't quit yet. xD Yeah, I have the <Directory Path="/mods" AddSubDirs="true"/> in my soma config already, can't remember if I added that myself or if that was already there, though. I think I'll give myself a one last chance, I delete every single Soma file and redownload the game. Maybe. Haven't decided yet... :/ So absurd that the music doesn't work, though. Can't even play music directly from Soma... I might have some goddamn curse on me or something. RE: Script error (Again) - Hypercube - 07-09-2016 Don't give up, just because this issue isn't solved right now doesn't mean you should give one last chance or whatever. I've made a SOMA map with a glitch and abandoned that one but you yourself can't stop modding entirely, if that' what you even meant by what you were saying. I just remember you talking about how this might be the end of your modding career or whatever. Try making a new SOMA map and test if it works there, because it could just simply be a problem with your current mod. RE: Script error (Again) - Venom Fox - 07-09-2016 (07-09-2016, 07:36 PM)Hypercube Wrote: Don't give up, just because this issue isn't solved right now doesn't mean you should give one last chance or whatever. I've made a SOMA map with a glitch and abandoned that one but you yourself can't stop modding entirely, if that' what you even meant by what you were saying. I just remember you talking about how this might be the end of your modding career or whatever. Try making a new SOMA map and test if it works there, because it could just simply be a problem with your current mod. Yeah, I'll try to! Maybe next time it'll be better! Ps. Thanks for the motivation ![]() |