Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Joined: Jul 2016
A
Arden Offline OP
stranger
OP Offline
stranger
A
Joined: Jul 2016
Or add sounds?

I figured out how to add environmental effects like fog, rain, etc, but when I go to

Atmosphere<Varia<Sound

there are options for Ambient Sound and Music, but instead of the Resources button there is an X so I can't pull any resources. Any idea what I'm doing wrong?

I also tried to create local sounds using a PointSoundTrigger, but it won't let me add sound to the trigger or adjust volume/range etc.

Any ideas?
Thanks!

Joined: Jun 2013
old hand
Offline
old hand
Joined: Jun 2013
Ignore all sound options on the atmosphere panel. Use SoundVolumeTriggers. They dictate both ambient sounds and music.

For the resource manager, press the icon that looks like a little red pin. It's an inane system but it's what you have to do.

Also one more tip, for *almost* all of the playlists for music, if it doesn't say "new" in the name it doesn't work. There are a few exceptions though.

If you want some longer explanations I wrote about it a few times:
http://larian.com/forums/ubbthreads...p;Words=sound&Search=true#Post562162

http://larian.com/forums/ubbthreads...p;Words=sound&Search=true#Post564432

Point sound triggers are more for specific items that make noise like machinery or a fire or something. For that you use the sound resources with the word "spot" in them.

Last edited by SniperHF; 21/07/16 06:14 AM.
Joined: Jul 2016
A
Arden Offline OP
stranger
OP Offline
stranger
A
Joined: Jul 2016
Those links with instructions were helpful, thanks.

I made a rainforest area and managed to get the ambient swamp sound to start on teleport in (I assume- it starts when I play the character from the starting area).

The music is proving difficult. I want NO music on tele in and then when the player finds a ruined cathedral near the center of the map, I want music to start.

It appears that music plays when you log into the game no matter what. I guess it's default module music but I can't find a way to turn it off. There is no trigger, it just starts playing as soon as I do. It seems to override any music I put down. Really annoying.

Joined: Jun 2013
old hand
Offline
old hand
Joined: Jun 2013
Originally Posted by Arden

It appears that music plays when you log into the game no matter what. I guess it's default module music but I can't find a way to turn it off. There is no trigger, it just starts playing as soon as I do. It seems to override any music I put down. Really annoying.


I assume the one you are talking about is the D:OS main menu theme? You can hear it if you load up main.

If that's the case, yes this is a rather unfortunate bug with the enhanced edition (classic didn't do it). There is a fix though.

If you want NO music, there is a playlist called something "Transition". It's just silence. I don't remember what it is called off the top of my head and I can't get to my editor at the moment.

So to do what you describe, have the surrounding rainforest have the ambient sounds, you have those working so just find that transition playlist and add it as the music for that area.

Then have another trigger inside the bigger rainforest trigger just for the cathedral. Put the right playlist on that one.

Poly shape triggers are excellent for buildings since you can make them just the right size.

Last edited by SniperHF; 22/07/16 05:58 AM.
Joined: Jul 2016
A
Arden Offline OP
stranger
OP Offline
stranger
A
Joined: Jul 2016
I think it's Playlist_Transition_Mute or something. I actually discovered it and used it. It works sometimes and doesn't work other times. It depends on if I'm reloading the level, restarting the editor, or if I wait until the intro music is done playing ouch

Ultimately, I think the editor just buggy and doesn't represent what another player would actually experience, but I *think* I have it doing what I want, so NBD.

Thanks again, my module actually looking pretty decent now with your help.

One more question-- actually two. Did you ever do a write up for how to connect zones? I guess like transition triggers or something? In other words, how do I transition the player from outside the Cathedral to inside the cathedral when they click on a door (or other object in this case)? I didn't see any info on this in the video tutorials.

Second question is more complicated. I was considering trying to make a PW using this engine (I did one with NWN years ago). In NWN I was able to set creature spawn points to spawn on PC entering zone. The spawn points spawned different creatures based on percentage chance and I could manipulate the loot drop of those creatures also based on percentage chance. Is that something that is even possible with this engine and, if so, has anyone tried that you know of? I used someone else's scripts in NWN since I can't code even a little bit frown

Last edited by Arden; 22/07/16 05:31 PM.
Joined: Jun 2013
old hand
Offline
old hand
Joined: Jun 2013
You have it right, all sound testing in the editor should be taken with a grain of salt. Load it up in the game proper.

Originally Posted by Arden


Thanks again, my module actually looking pretty decent now with your help.


You should make a thread about it :P If you need any testing help or whatever let me know.


Quote

One more question-- actually two. Did you ever do a write up for how to connect zones? I guess like transition triggers or something? In other words, how do I transition the player from outside the Cathedral to inside the cathedral when they click on a door (or other object in this case)? I didn't see any info on this in the video tutorials.


Burgee did one awhile back, I'll see if I can find it.
EDIT: Here it is:
https://www.youtube.com/watch?v=cyHXC7FgAyE&feature=youtu.be

Been awhile since I've watched it.

The short version is, open an item up on the side bar and set an "OnUseAction" to teleport. Then you can teleport to things when you use the item.

It's the same principle for both transitioning to an entirely new map and for "instanced" areas like upstairs/downstairs that you see in the houses in D:OS.

For your cathedral, is there any reason you aren't just making it an area you can walk into normally?

Quote

Second question is more complicated. I was considering trying to make a PW using this engine (I did one with NWN years ago).


Silly question, what's a PW?

Last edited by SniperHF; 22/07/16 08:45 PM.
Joined: Jul 2016
A
Arden Offline OP
stranger
OP Offline
stranger
A
Joined: Jul 2016
Still got a ton of work to do, but will definitely put something up when playable.

It's actually a partially sunken, ruined cathedral. The doors are partially buried and inaccessible, but the cathedral can be accessed via a nearby well. The players basically use the well to go into an underground cistern that eventually leads to one of the lower floors of the cathedral. The cathedral is massive and has multiple floors the characters can work through (boss mob etc). Anyway, need the transition from the well to the underground passage and then from floor to floor. Plus, the rainforest zone will be connected with other zones and so forth so need to connect the maps.

PW= persistent world. Basically something I set up on a server and just keep up.

Joined: Jun 2013
old hand
Offline
old hand
Joined: Jun 2013
Originally Posted by Arden

PW= persistent world. Basically something I set up on a server and just keep up.


All the scripting like spawning enemies and loot and such can be done. But there's no server setup for D:OS so actually keeping it up for different players to join and such would be impossible.

Joined: Jul 2016
A
Arden Offline OP
stranger
OP Offline
stranger
A
Joined: Jul 2016
No server set up? Players can still log into may game and play right? For example, I have a group of friends that I would want to be able to log in and play my module at the same time. I assumed that was possible.

Joined: Jun 2013
old hand
Offline
old hand
Joined: Jun 2013
Yeah, I mean there's no way to leave a server running where people can play their own characters and such drop in and drop out IE a persistent world.

You can definitely play your module in multi player.

Joined: Jul 2016
A
Arden Offline OP
stranger
OP Offline
stranger
A
Joined: Jul 2016
I see- that would be totally fine for my purposes. So it is possible to make a trigger that spawns npcs etc?

Joined: Jun 2013
old hand
Offline
old hand
Joined: Jun 2013
Yep, quite easily.

If you just want to use the base root templates:
Code
INIT:
TriggerRegisterForPlayers(TRIGGER_SpawnTrig);

KB:
IF
CharacterEnteredTrigger(_Player,TRIGGER_SpawnTrig)
AND
_Player.DB_IsPlayer()  //Don't need this most likely but I usually include it as a habit.
THEN
TriggerUnregisterForPlayers(TRIGGER_SpawnTrig); 
CharacterCreateAtTrigger(TRIGGER_Spawn1, "ROOT TEMPLATE GUID HERE",1);



You could also pre-create the characters so you can set scripts and equip them properly and just use:
CharacterAppearAtTrigger(CHARACTER Character, TRIGGER Target, INT PlaySpawn)

Though if you did that there would be an upper limit of characters based on how many you pre-created. But like I said it would open up the ability to add equipment, set their level, give them special arrows and such. That's what I would do for a normal mod but if you just made one where you wanted to smash some enemies for fun it's less necessary.


Also you could get really fancy by randomizing it using databases. Same thing for waves.

If you want to see a concept of a spawning enemies mod check out Spuds Crud-tacular arena on the workshop. It's mostly a proof of concept thing and the author abandoned it, but it kinda shows what you can do.

Actually come to think of it, there's a really nice example in my mod A Necromancer's Crusade. The last boss fight has 3 waves of enemies that spawn. You should check it out :P

I could post the script of it for you if you want as an example.

Last edited by SniperHF; 22/07/16 10:26 PM.
Joined: Sep 2015
A
addict
Offline
addict
A
Joined: Sep 2015
You can also change treasure tables for your characters on the fly via character script since EE.


My mods for DOS 1 EE: FasterAnimations - QuietDay - Samaritan
Joined: Jul 2016
A
Arden Offline OP
stranger
OP Offline
stranger
A
Joined: Jul 2016
I apologize, I’m late to the game learning how to use the engine and my knowledge of coding is terrible so I'm going to ask stupid questions and I need to take things one step at a time.

1. How do I create character and alter loot, name, etc? I can see where to find them all in resources. When I place one and go into the sidebar I see some options but I don't know how to access/change things like stats, loot, and hitpoints.

2. I looked at all the triggers and did not see a CharacterAppearAtTrigger. Do I need to put down some other type of trigger and alter it? Where do I put "CHARACTER Character, TRIGGER Target, INT PlaySpawn"? Or is it that I put the whole thing "CharacterAppearAtTrigger(CHARACTER Character, TRIGGER Target, INT PlaySpawn)" somewhere?

3. I will definitely want that example, thanks, but I need to get the basics (above) figured out first.

4. Abraxas, what do you mean change treasure tables on the fly? And how?

Again, I know these are basic questions, sorry.

Joined: Jun 2013
old hand
Offline
old hand
Joined: Jun 2013
I'd suggest making a new thread for stuff not related to sound so it doesn't get too confusing :P

Anyway, the short version is I think you need to learn a bit about script statements and such.

I'd suggest watching (and making yourself!) the Larian Tutorial videos as a base line. It goes over a few things like scripting combat encounters and dialogs.

Part 1:
https://www.youtube.com/watch?v=6CNcQz7j5KY

Part 2:
https://www.youtube.com/watch?v=R_CvF4cCOm0

Combat Scripting (Part 3):
https://www.youtube.com/watch?v=Oq6lUvrvrwU

You can use the minimal mod template to follow along with the above videos:
http://steamcommunity.com/sharedfiles/filedetails/?id=664042663

You could probably follow along with your existing mod, but I don't know what kind of state it's in.

The videos are a little old but I don't think there is anything wrong in there. Though if you run into a problem feel free to post it up.

Originally Posted by Arden

1. How do I create character and alter loot, name, etc? I can see where to find them all in resources. When I place one and go into the sidebar I see some options but I don't know how to access/change things like stats, loot, and hitpoints.


I'd focus on improving some of your script-fu before messing with those kinda details.

Assigning stats is pretty easy though, you just open the sidebar and scroll down to where it says stats, then there's a drop down menu. You can also quick and dirty set their level by putting a number on the "leveloverride" field.

Unfortunately the stats names aren't very descriptive but that's a whole other topic.

Quote

2. I looked at all the triggers and did not see a CharacterAppearAtTrigger. Do I need to put down some other type of trigger and alter it? Where do I put "CHARACTER Character, TRIGGER Target, INT PlaySpawn"? Or is it that I put the whole thing "CharacterAppearAtTrigger(CHARACTER Character, TRIGGER Target, INT PlaySpawn)" somewhere?


CharacterAppearAtTrigger is what's known as a "Call". Calls tell the engine to do stuff. So if you have a statement that says something like:

IF
CharacterEnteredTrigger(_Player,TRIGGER_TheTrigger)
THEN
CharacterAppearAtTrigger(CHARACTER_Skeleton,Trigger_SpawnPoint,1);

That means the character Skeleton, will appear at the trigger called SpawnPoint, and the 1 means it will play the spawn animation (usually they come up through the ground). If it was set to 0, the character would just appear there and wouldn't look natural.

The type of trigger the character appears at is determined by what you place. So it's just a normal Point, box, or poly trigger.

I believe the third video covers some of this.


Last edited by SniperHF; 24/07/16 06:04 AM.
Joined: Sep 2015
A
addict
Offline
addict
A
Joined: Sep 2015
Quote
4. Abraxas, what do you mean change treasure tables on the fly? And how?

You can fill in loot tables/trader tables in the sidebar of characters ('Treasure'). The names (and the table content) can be found in TreasureTable.txt (Divinity Original Sin Enhanced Edition\Data\Editor\Templates\Stats\Shared\Generated). Much information can only be found (and changed) outside the editor.
Character and item scripts allow to add and remove such treasure tables:

CharacterClearTreasureTables(CHARACTER:character) -->clears all treasure tables of the character
CharacterAddTreasureTable(CHARACTER:character, FIXEDSTRING:treasureTable) --> adds a certain treasure table to the character: the fixedstring contains the table name from TreasureTable.txt
CharacterRemoveTreasureTable(CHARACTER:character, FIXEDSTRING:treasureTable) --> removes a certain treasure table from the character

But it would be good to start a new thread for questions and to learn the systems step by step by watching/reading the tutorials first, as Sniper suggested.

The only introduction in character scripting I know of is from Zoltan:

http://larian.com/forums/ubbthreads.php?ubb=showflat&Number=563932

Sniper wrote a specific guide how to use the state manager (but that's for later):

http://larian.com/forums/ubbthreads.php?ubb=showflat&Number=567495

They were written for Classic Version but they should be still valid.



My mods for DOS 1 EE: FasterAnimations - QuietDay - Samaritan
Joined: Mar 2016
Location: Belgium
T
addict
Offline
addict
T
Joined: Mar 2016
Location: Belgium
Originally Posted by Abraxas*

The only introduction in character scripting I know of is from Zoltan:

http://larian.com/forums/ubbthreads.php?ubb=showflat&Number=563932

You may also want to have a look at the notes I took while learning the character/itemScripts: http://larian.com/forums/ubbthreads.php?ubb=showflat&Main=69206&Number=581485#Post581485

It's a companion to the aforementioned tutorial, not a substitute.


Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5