View unanswered posts | View active topics It is currently Tue Oct 15, 2019 5:28 am



Reply to topic  [ 9 posts ] 
 I'd like some help. 
Author Message

Joined: Mon May 11, 2015 9:16 pm
Posts: 5
Reply with quote
Post I'd like some help.
Hey there! I got two questions regarding my pet project.

First question which is something I'd like immediate help with. I've got a bunch of sounds for my mod's actors to play for pain, death and chatter. They just won't play and I can't seem to figure out why. Trust me, I tried looking for an answer on this one earlier and did find out that someone else also had this same problem. However, unlike me, they figured out how to fix it but didn't leave any sort of tidbit on how they did it.

Here's how I have it set up:
Sounds.ini

And this is how I've got it in the mook's code:

Yes I have the index.ini reference Sounds.ini. Yes I believe I have proper tabbing. I've double, triple even quadruple checked both files and I just can't pinpoint the problem. Do I have some weirdness in the code that won't go through my thick skull? Am I perhaps using a wrong type of file? Or is it just something completely different?
Here are the soundfiles. Maybe someone could take a look at them and see what's up?

Now my second question isn't in need of immediate help as I'll probably stumble on its answer along the way, but it'd be nice to get a heads up for it.
How would one go on about creating a weapon which fires while spooling up(firing its bullets at a slower pace before reaching maximum fire rate)?


Last edited by FanSea on Wed May 13, 2015 12:32 am, edited 1 time in total.



Tue May 12, 2015 10:49 am
Profile
User avatar

Joined: Mon Oct 11, 2010 1:15 pm
Posts: 594
Location: Finlandia
Reply with quote
Post Re: I'd like some help.
Can't exactly solve your problem since you haven't provided the .wav files that aren't functioning...

On the second question though, increasing a weapon's fire rate when activated is totally doable through lua.


Tue May 12, 2015 1:25 pm
Profile
User avatar

Joined: Sun Jan 28, 2007 10:32 pm
Posts: 1609
Location: UK
Reply with quote
Post Re: I'd like some help.
FanSea wrote:
~SOUNDS~


Chances are the sound files are improperly formatted for CC, either in terms of # of channels, frequency, bitrate, lack of headers, etc. - if you're using files ripped directly from a game, be sure you've processed them properly and that they play properly.

If you can, I recommend converting the files into .ogg format. They're a lot smaller, and this can save a huge amount of space. This might not seem like a big deal, but it adds up very quickly if you have ~3-4 firing sounds per gun and many voiceovers per actor.

I tried a similar thing myself (Corpus + Grineer factions are a thing I want to take a shot at eventually) a while back but I can't get the sounds into a useful format at all. I have a pretty good idea of how to go about the fundamental code at least, but that's no good without a) sounds, and b) sprites.

FanSea wrote:
Now my second question isn't in need of immediate help as I'll probably stumble on its answer along the way, but it'd be nice to get a heads up for it.
How would one go on about creating a weapon which fires while spooling up(firing its bullets at a slower pace before reaching maximum fire rate)?


Gorgon? Gorgon.

The default spinup code is not very good; it's simply a delay before firing at max RPM, and custom spin noises tend to be buggy (or even undesirable).

Luckily for you, Cave whipped up a script for me a while back that'll work perfectly for the Gorgon (and any other climbing RPM weapon, for that matter);

Code:
function Create(self)

   self.reloaded = false;
   self.ammoCounter = 0;
   self.spinDownTimer = Timer();

   self.rofBase = 300;
   self.rofIncreasePerShot = 50;
   self.rofMax = 1050;
   self.rofTimeToReset = 3000;

end

function Update(self)

   if self.Magazine ~= nil then
      if self.reloaded == false then
         self.reloaded = true;
         self.ammoCounter = self.Magazine.RoundCount;
      else
         if self.ammoCounter ~= self.Magazine.RoundCount then
            self.spinDownTimer:Reset();
            self.RateOfFire = math.min(self.RateOfFire + (self.rofIncreasePerShot*(self.ammoCounter-self.Magazine.RoundCount)),self.rofMax);
         end
         self.ammoCounter = self.Magazine.RoundCount;
         if not self:IsActivated() then
            self.RateOfFire = math.max(self.RateOfFire - (self.rofMax-self.rofBase)*(self.spinDownTimer.ElapsedSimTimeMS/self.rofTimeToReset),self.rofBase);
            self.spinDownTimer:Reset();
         end
      end
   else
      self.reloaded = false;
   end

end


The only four values you should edit are;

self.rofBase = 300;
self.rofIncreasePerShot = 50;
self.rofMax = 1050;
self.rofTimeToReset = 3000;

The first is the base rate of fire, what it starts at, and should match the weapon's standard value in the .ini files. The second is how much it gains per shot; higher = faster spin up. You can probably do some fancy math here if you know the time you want it to take, or just eyeball it. Third value is what the rate of fire caps out at (it won't go any higher). Lastly, the fourth value is how long it takes to unspool once you stop firing; it should also drop back down to base if reloaded. A short delay here allows for short bursts at high RPM without having to spin up again every time.


Last edited by Arcalane on Tue May 12, 2015 8:49 pm, edited 1 time in total.



Tue May 12, 2015 2:07 pm
Profile YIM

Joined: Mon May 11, 2015 9:16 pm
Posts: 5
Reply with quote
Post Re: I'd like some help.
Maybe the sounds indeed are improperly formatted then. Though I did use the same settings on them as I did with my weapon sounds but is it just that actor sounds just need different processing and whatnot? And since you need to see the sounds yourself to be able to pinpoint what's up, I'll give a mediafire link to 'em.
Here ya go
There's quite a few, so if turning them into .ogg will help with the size and all that jazz, just let me know what I have to do with them before exporting. I use audacity if that information is any relevance.

And thanks for the code! It'll sure come in handy.


Tue May 12, 2015 8:08 pm
Profile
User avatar

Joined: Sun Jan 28, 2007 10:32 pm
Posts: 1609
Location: UK
Reply with quote
Post Re: I'd like some help.
The PCM format/encoding may be what's throwing them off, I'm not sure. Not much of a pro when it comes to that kinda thing.

That said, exporting to ogg couldn't be much easier. Make sure you have an appropriate ogg encoding plugin for Audacity (it should have one already, since ogg is a free format; if not, it'll tell you - and it won't be hard to find one) then dunk all your files in at once so that if you dare to hit the 'play' button you get a cacophanous mess. Then, from the File menu, go to Export Multiple. Set the export format and location as you desire, then select 'split files based on tracks' and 'name files using track/label name', like so;

Image

I just ran this on all the basic Chatter files and they came out about a tenth of their previous size, with basically no loss in quality.

Incidentally I would love to know how you managed to get those (and any weapon sounds) into a usable format. I can't, for the life of me, find a useful guide or tutorial or anything.


Tue May 12, 2015 8:42 pm
Profile YIM

Joined: Mon May 11, 2015 9:16 pm
Posts: 5
Reply with quote
Post Re: I'd like some help.
I changed them to .ogg files and gave them a go(while making the sound.ini call them out, of course), nothing. Then I played around with their bitrates by referencing other mods and the Base.rte sound files and making them match. And no dice this time either. This is one fine pickle I've run into.

And Arcalane, I can support you with all the sounds assets you might need. I'll tell you more about that in a PM so we won't go offtopic here.


Tue May 12, 2015 9:58 pm
Profile
User avatar

Joined: Sun Jan 28, 2007 10:32 pm
Posts: 1609
Location: UK
Reply with quote
Post Re: I'd like some help.
FanSea wrote:
I changed them to .ogg files and gave them a go(while making the sound.ini call them out, of course), nothing. Then I played around with their bitrates by referencing other mods and the Base.rte sound files and making them match. And no dice this time either. This is one fine pickle I've run into.


That is odd indeed. Perhaps someone else has some ideas. :???:

Quote:
And Arcalane, I can support you with all the sounds assets you might need. I'll tell you more about that in a PM so we won't go offtopic here.


Sure. Toss me whatever you have and I'll look over it when I get the time.


Tue May 12, 2015 10:14 pm
Profile YIM

Joined: Mon May 11, 2015 9:16 pm
Posts: 5
Reply with quote
Post Re: I'd like some help.
Well I managed to fix my sound problem by reorganizing the .ini files. Had to make it read the sounds before reading the actor itself. I feel so stupid for not figuring it out sooner.

Thank you so much for the lua code and the heads up on making the sound .ogg files Arcalane!


Wed May 13, 2015 6:26 pm
Profile
User avatar

Joined: Sun Jan 28, 2007 10:32 pm
Posts: 1609
Location: UK
Reply with quote
Post Re: I'd like some help.
Ah, yes. You have to define and load everything in the proper order. Bullets come before rounds come before magazines come before guns. Gibs come before limbs come before bodies. And so on.

Easy to get a lot of file clutter though.


Wed May 13, 2015 6:38 pm
Profile YIM
Display posts from previous:  Sort by  
Reply to topic   [ 9 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.020s | 13 Queries | GZIP : Off ]