Jump to content

Can you make the climate and music of a worldspace change at a certain


samv96UK

Recommended Posts

In Rochebere I am attempting to have the city change at the end of the questline, depending on the player's decisions.

 

I originally just had a new worldspace which all the original doors would become linked to with an enable marker if the player made a certain choice. However, this caused some bad problems with the game, such as houses disappearing from cities and trees going missing.

 

I think this may have been cause by an overload of worldspaces (since Rochebere adds 4 new worldspaces already, and that was the fifth) not to mention the region had a lot of objects in it.

 

Anyway, I thought the best way to instead deal with this is to just have all the items I want to change with an enable state so that they appear if you choose one of the paths. The only problem is, in the second worldspace I originally had a different climate and music to the first worldspace.

 

I can't work out a way to make the weather and music enable with the other references which are actually in the world (Houses, Trees etc.)

 

It would be great if someone knew the solution!

 

Cheers!

Link to comment
Share on other sites

You can add conditions to weather and music using global variables. Where a region has two sets of weather and music that depend on a global.

 

Weather A and Music A are active if the global is 0 and Weather B and Music B are active if the global is 1. I don't think it updates immediately, so you may have to flip the global while the pc is not in the region affected by the condition. You can set the global for the weather in the region when adding climates (it gives you the option after picking a climate). The music would probably need to be duplicated in order to add the global condition to the individual tracks.

 

In a script, change the global when it's time for the switch: SomeGlobalVariable.SetValueInt(1)

And weather B and music B will take over.

 

Edit: Probably the same music object but with double the tracks.

Edited by Ez0n3
Link to comment
Share on other sites

You can add conditions to weather and music using global variables. Where a region has two sets of weather and music that depend on a global.

 

Weather A and Music A are active if the global is 0 and Weather B and Music B are active if the global is 1. I don't think it updates immediately, so you may have to flip the global while the pc is not in the region affected by the condition. You can set the global for the weather in the region when adding climates (it gives you the option after picking a climate). The music would probably need to be duplicated in order to add the global condition to the individual tracks.

 

In a script, change the global when it's time for the switch: SomeGlobalVariable.SetValueInt(1)

And weather B and music B will take over.

 

Edit: Probably the same music object but with double the tracks.

 

Okay, that doesn't sound too complicated. I'll try to give that a go sometime this weekend then.

 

Thanks!

Link to comment
Share on other sites

You can add conditions to weather and music using global variables. Where a region has two sets of weather and music that depend on a global.

 

Weather A and Music A are active if the global is 0 and Weather B and Music B are active if the global is 1. I don't think it updates immediately, so you may have to flip the global while the pc is not in the region affected by the condition. You can set the global for the weather in the region when adding climates (it gives you the option after picking a climate). The music would probably need to be duplicated in order to add the global condition to the individual tracks.

 

In a script, change the global when it's time for the switch: SomeGlobalVariable.SetValueInt(1)

And weather B and music B will take over.

 

Edit: Probably the same music object but with double the tracks.

I'm having some trouble doing this, since I've never used the global function or the regions menu before. It would be great if you could explain how to do some of the steps you have spoken about it a bit more detail.

 

Cheers!

Link to comment
Share on other sites

Oh, I thought you had the regions set up already. Oh and I think you may need 2 globals for this since since the weather global doesn't have conditions (if global == x).

 

So under Miscellaneous->Global make 2 vars like: WeatherMusicPreGlobal and WeatherMusicPostGlobal. leave everything default except set WeatherMusicPreGlobal to 1, since it's the one that starts first.

WeatherMusicPreGlobal = 1

WeatherMusicPostGlobal = 0

 

In World->Regions... select your world from the dropdown and right click the list to make a new region. Rename the new region and draw at least 3 points on the preview window below where the weather/music should apply (black=outside your world and white=inside your world). Right-click->Done will join all of the lines but the points can still be moved around.

 

Go up to the Weather tab and check "Enable this type of data". From the weather dropdown, select a weather and click Add. Right then a dialog will pop up with a list of globals. So when you add the "pre" weather, select the WeatherMusicPreGlobal global and vice-verse. Then the weather will be added to the region where you can set the Chance of that weather happening. Maybe something like:

 

Weather Type | Chance | Global

------------------------------------------------------------------

WeatherPreClear | 50 | WeatherMusicPreGlobal

WeatherPreCloudy | 50 | WeatherMusicPreGlobal

WeatherPostClear | 50 | WeatherMusicPostGlobal

WeatherPostCloudy | 50 | WeatherMusicPostGlobal

 

While WeatherMusicPreGlobal == 1, there's a 50/50 chance of pre clear or pre cloudy and while WeatherMusicPostGlobal == 1, there's a 50/50 chance of post clear or post cloudy. If both globals are set to 1, the chance gets screwy and all 4 would be enabled at once. So you start with WeatherMusicPreGlobal=1 and WeatherMusicPostGlobal=0. Then flip that to enable the post weather: WeatherMusicPreGlobal=0 and WeatherMusicPostGlobal=1.

 

You can set the music in that region (Sound tab, Enable this type of data->Music Type), or in a separate region, or just assign it to the world. I think the tracks would have to share the same Music Type so there's only one that needs to be set.

In Audio->Music Type, make a new music type and use the values from your existing music (excluding the tracks). Something like "MusicShared" which is what you'll pick for the region or world.

 

In Audio->Music Track, duplicate or add the tracks you want, both "pre" and "post" tracks. For each track, check "Has Conditions", open the Conditions tab and right-click->New.

 

Function Condition | Parameters | Comparison | Value

------------------------------------------------------------------

GetGlobalValue | WeatherMusicPreGlobal | == | 1 (for "pre" tracks)

GetGlobalValue | WeatherMusicPostGlobal | == | 1 (for "post" tracks)

 

One per track, don't put both. If it's a pre track, you're checking that WeatherMusicPreGlobal==1 and a post track that WeatherMusicPostGlobal==1

 

Add all of the pre and post tracks to the new Music Type. eg: MusicShared

 

By setting WeatherMusicPreGlobal to 1 by default in the CK, weather and music tracks that depend on WeatherMusicPreGlobal==1 will start by default. When it comes time to make the switch, using a script, you change the values of the globals. It can be a trigger or in a quest or whatever. Somewhere in some script there needs to be:

 

WeatherMusicPreGlobal.SetValueInt(0)
WeatherMusicPostGlobal.SetValueInt(1)

To switch the weather and music type over to the post versions.

Edited by Ez0n3
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...