Contributions to the official release and modding community

User avatar
Endoperez
Posts: 5668
Joined: Sun Jan 11, 2009 7:41 am
Location: cold and dark and lovely Finland

Re: Contributions to the official release and modding commun

Post by Endoperez » Wed Jan 09, 2013 8:54 pm

Timbles wrote:But what if you use a third-party program to swap up the .xml's songs each time you launch up Overgrowth?
Why would you want to?It's much easier to just adapt the scripts.

XMLs are editable. Just add new path:

<combat2 path="">

in one XML, and some randomization in another.

User avatar
Constance
Overgrowth Modder Deluxe
Posts: 2394
Joined: Sat Mar 17, 2012 2:05 pm
Contact:

Re: Contributions to the official release and modding commun

Post by Constance » Wed Jan 09, 2013 8:58 pm

Endoperez wrote:
Timbles wrote:and some randomization in another.
'Some randomization'?

wertandrew
Posts: 15
Joined: Tue Jan 08, 2013 11:28 am

Re: Contributions to the official release and modding commun

Post by wertandrew » Wed Jan 09, 2013 11:34 pm

Cool, I will try to experiment and see what comes out

User avatar
Endoperez
Posts: 5668
Joined: Sun Jan 11, 2009 7:41 am
Location: cold and dark and lovely Finland

Re: Contributions to the official release and modding commun

Post by Endoperez » Thu Jan 10, 2013 4:40 am

Timbles wrote:
'Some randomization'?
Hg341 posted an example last page. Get a random number and use it to decide which of the songs to play. I don't know how randomization works in OG, but the random function might e.g. return a random decimal number between 0.00 and 1.00. That's usually multiplied by the target number (e.g. 2 if you have 2 choices, 10 if you have 10), then it's rounded, and stuff.

wertandrew
Posts: 15
Joined: Tue Jan 08, 2013 11:28 am

Re: Contributions to the official release and modding commun

Post by wertandrew » Thu Jan 10, 2013 8:23 am

Can someone make an example so that we can use it with 3 songs? I am not good with .xml editing but I can add the songs if someone is capable of doing this randomization technique. It would be cool to try it in the combat music, ex. the script will have to choose from either combat1.ogg combat2.ogg and combat3.ogg from the /music folder. Can someone make this script so I can use it to add more music in OG? I will start looking at old mods done in this area too so that I can figure it out

User avatar
Macrauchenia
Posts: 281
Joined: Tue Dec 06, 2011 12:11 am
Location: Northern Colorado

Re: Contributions to the official release and modding commun

Post by Macrauchenia » Thu Jan 10, 2013 11:57 am

I'm not sure if it would work for the musictest.xml, but when making my Frog character ribbit, I could adjust the amount of variants in the sound file and it would seemingly pick random .wavs every time.

Code: Select all

<?xml version="1.0" ?>
<soundgroup
	variants="1"
	delay="0"
	volume="1.0"
/>
I originally had 3 variants and it would pick one of the three every time. It might work to just copy and paste that soundgroup code into the musictest.xml with different .ogg files.

wertandrew
Posts: 15
Joined: Tue Jan 08, 2013 11:28 am

Re: Contributions to the official release and modding commun

Post by wertandrew » Thu Jan 10, 2013 2:30 pm

Cool, I ll try it. Thanks

Post Reply