Larian Banner
Previous Thread
Next Thread
Print Thread
Level templates and Story Scripts #635045
01/11/17 06:00 PM
01/11/17 06:00 PM
Joined: Sep 2017
Posts: 499
Norway
The Composer Offline OP
addict
The Composer  Offline OP
addict

Joined: Sep 2017
Posts: 499
Norway
So the level template system is in theory pretty ingenious and practical, but...

It doesn't seem to go hand-in-hand with story goals, as if you add a level template to a level, as in my test, I added a small testlevel to another level. Any story goals written for the small testlevel will no longer work, example;

An event trigger that makes a displaytext trigger, works in small testlevel but not in its level template in the other level its added into. Any item added in the level template gets a completely new GUID.

I post here in troubleshooting because somehow I feel that can't be the intended design? Or is the workflow make the entire map down to each brick > add to main level > add characters, items, loot, secret digspots +++ while in the main level > write story goals ?

Last edited by The Composer; 01/11/17 06:08 PM.
Re: Level templates and Story Scripts [Re: The Composer] #635049
01/11/17 06:12 PM
01/11/17 06:12 PM
Joined: Sep 2017
Posts: 159
M
monzua Offline
member
monzua  Offline
member
M

Joined: Sep 2017
Posts: 159
So for me i have the following setup: One main level (with one big script) with alot of DBs defined in a INIT (like quests, dialogs etc) if i teleport the player to a different level yes all items get new GUDIs. IF i want to access items from diferent levels i need to put them global for project. But i also noticed that if I move the character to the next level that some DB's which I defined (and were loaded during the first level) arent available anymore in the 2nd level. So to make sure I didnt miss anything i just created another script specifically for that level that gets started when the 2nd level loads.

your issue is also strange -> maybe its all the same reason?

Re: Level templates and Story Scripts [Re: The Composer] #635051
01/11/17 06:23 PM
01/11/17 06:23 PM
Joined: Sep 2017
Posts: 499
Norway
The Composer Offline OP
addict
The Composer  Offline OP
addict

Joined: Sep 2017
Posts: 499
Norway
I'm not sure I understand exactly what you're trying to say, or how it applies to the question I raised. You need what ever character/item you want to respond to scripts cross-level to be global yes. Next levels would naturally have other GUIDs as it's another level. But I'd have hoped level templates kept its content identical because added level templates should update on the fly if you edit its original source, implying they're interconnected as one constant level. Say you add Level Template A to Fort Joy. You load Level Template A and add a tree. That tree should then show in Fort Joy too. But you can't target that tree in Fort Joy unless you explode Level Template A, which is fine as that's what you do once you're done.

My issue with that is, if you want to make scripted events, such as an execution, destructible objects, secrets or what-not, that work won't be lasting if done while working on Level Template A. You'd either have to go through every item, character, etc and do a find and replace for each corresponding GUID, or do only the terraforming and decoration in Level Template A, and then make anything relying on Story Goals in the main map, which means anyone putting level templates to use, statistically are prone to have a pretty huge map eventually, and doing tons of adding new items and experimenting back and forth in a Fort Joy / Reaper's Coast sized map puts a strain even on my system.

Writing all this makes me realize, that's probably just how it is. But oh-what a missed feature and development convenience that's been overlooked.

Re: Level templates and Story Scripts [Re: The Composer] #635057
01/11/17 06:49 PM
01/11/17 06:49 PM
Joined: Dec 2013
Posts: 872
Windemere Offline

old hand
Windemere  Offline

old hand

Joined: Dec 2013
Posts: 872
Did you make your level template persistent?

I am pretty sure that event triggers placed in a level template level were still working correctly for me in the 'parent' level that used it as a template. I will do some testing again with that to verify though.

I am however debugging what I think is a related problem with Camera Spectator Triggers. If I try to switch the player's camera view to a spectator camera that is located in a level template, it only works when the player is physically located in that level but not in levels that make use of it as a template.

It may be that they intended level templates to primarily be used for editing and shaping non-interactive terrain though, which as you said would be a bit of a bummer.


DOS2 Mods: Happily Emmie After and The Noisy Crypt

Steam Workshop
Nexus Mods
Re: Level templates and Story Scripts [Re: The Composer] #635079
01/11/17 08:19 PM
01/11/17 08:19 PM
Joined: Sep 2017
Posts: 499
Norway
The Composer Offline OP
addict
The Composer  Offline OP
addict

Joined: Sep 2017
Posts: 499
Norway
That is a very good idea / suggestion! I haven't learned / experiemented with that yet, but had sort of naturally ruled it out as I've only seen ActivatePersistentLevelTemplate been used in the campaign like... Perhaps five-or-so times? And almost none of their level templates that I recognize from the campaign are set as persistent so I drew the conclusion that it can't be the case. But, now as you mention it, I do recall having read something about a travel agency and transporting characters/items cross level.

I'll experiment a bit and return with what ever my results may be.

Re: Level templates and Story Scripts [Re: The Composer] #635081
01/11/17 08:35 PM
01/11/17 08:35 PM
Joined: Sep 2017
Posts: 499
Norway
The Composer Offline OP
addict
The Composer  Offline OP
addict

Joined: Sep 2017
Posts: 499
Norway
Doing a ActivatePersistentLevelTemplate(a34ed151-af71-4f09-9d28-f1f00e914506); on the "main level" seems to make the story goals respond to the intended objects, so it indeed seems to be the way to go! I'm still a bit vary but with this, I'll proceed with working as I've done so far, and should it not work out in the end for what ever reason, it's just a massive chore of combing through everything with a find & replace job, which in worst case is a good dual-monitor Netflix bingewatch excuse to combine with.

Thanks for your feedback Windemere, it seems like it's what I need to do.

Re: Level templates and Story Scripts [Re: The Composer] #635084
01/11/17 08:41 PM
01/11/17 08:41 PM
Joined: Dec 2013
Posts: 872
Windemere Offline

old hand
Windemere  Offline

old hand

Joined: Dec 2013
Posts: 872
Sure thing, glad it helped. I have the same trepidation going forward especially in light of those cameras not working for me right now.


DOS2 Mods: Happily Emmie After and The Noisy Crypt

Steam Workshop
Nexus Mods
Re: Level templates and Story Scripts [Re: The Composer] #635389
03/11/17 12:56 PM
03/11/17 12:56 PM
Joined: Mar 2016
Posts: 504
Belgium
T
Tinkerer Offline

addict
Tinkerer  Offline

addict
T

Joined: Mar 2016
Posts: 504
Belgium
An alternative to persistent level templates, is to make the items/triggers/characters that you want to have the same UUID everywhere as global.

A major purpose of non-persistent regular level templates is to be able to insert the same level multiple times in different places, with every instance being completely independent of every other instance. Hence, the fact that UUIDs for items inside the level templates are regenerated in indeed inherent to that. There's no easy way to get those UUIDs, unfortunately (the "easiest" way I know of is interacting with the items and then checking osirislog.log).

Re: Level templates and Story Scripts [Re: The Composer] #635402
03/11/17 01:14 PM
03/11/17 01:14 PM
Joined: Sep 2017
Posts: 499
Norway
The Composer Offline OP
addict
The Composer  Offline OP
addict

Joined: Sep 2017
Posts: 499
Norway
Thank you, Tinkerer. I will experiment some with that as well.

Re: Level templates and Story Scripts [Re: The Composer] #635484
03/11/17 07:17 PM
03/11/17 07:17 PM
Joined: Dec 2013
Posts: 872
Windemere Offline

old hand
Windemere  Offline

old hand

Joined: Dec 2013
Posts: 872
Thanks Tinkerer.

Do you know whether it is a bug or working as intended that spectactor camera triggers do not appear to work when they are placed in the level serving as the template and then referenced by a level using that template?

For instance, I have event triggers and spectator camera triggers in Level A.

Level B uses Level A as a template.

If a player is in Level B and enters one of the event triggers originally placed in Level A, it is supposed to activate a camera spectator trigger associated with that trigger (also placed in Level A). The event triggers do fire as expected and call the procedure CameraActivate(), but I get an error in the editor as follows:

Code:
Could not find camera SoM_OM_SpecCamB3 when activating from osiris

Category: Design
Count: 1
Timestamp: 03-11-2017 19:04:32:560
Function: ecl::GameProtocol::ProcessMsg
Location: EoCClient\Client\GameProtocol.cpp (623)


If I run the same test from within the template Level A itself, it works fine. It just doesn't work when used as a level template in another level.

It's notable that the CameraActivate() procedure uses the trigger name rather than a GUID for the spectator camera. I wonder if whatever tricks were used to be able to access the original GUIDs doesn't work for the names?


DOS2 Mods: Happily Emmie After and The Noisy Crypt

Steam Workshop
Nexus Mods
Re: Level templates and Story Scripts [Re: The Composer] #635731
05/11/17 04:41 PM
05/11/17 04:41 PM
Joined: Mar 2016
Posts: 504
Belgium
T
Tinkerer Offline

addict
Tinkerer  Offline

addict
T

Joined: Mar 2016
Posts: 504
Belgium
Have you tried making that spectator camera global? I have no personal experience with spectator cameras, and I don't think we have any in our own level templates, so it's quite possible they don't work together very well.

Re: Level templates and Story Scripts [Re: The Composer] #635734
05/11/17 04:50 PM
05/11/17 04:50 PM
Joined: Sep 2017
Posts: 499
Norway
The Composer Offline OP
addict
The Composer  Offline OP
addict

Joined: Sep 2017
Posts: 499
Norway
Speaking of level templates, any reason why instance paintings don't transfer along with level templates? Or is that a persistent thing too?

Re: Level templates and Story Scripts [Re: The Composer] #635737
05/11/17 05:00 PM
05/11/17 05:00 PM
Joined: Mar 2016
Posts: 504
Belgium
T
Tinkerer Offline

addict
Tinkerer  Offline

addict
T

Joined: Mar 2016
Posts: 504
Belgium
Originally Posted By: The Composer
Speaking of level templates, any reason why instance paintings don't transfer along with level templates? Or is that a persistent thing too?

That sounds like a bug. I noticed that a bug regarding instances and inherited levels was recently fixed (not yet in any released patch), maybe that will also solve this issue.

Re: Level templates and Story Scripts [Re: The Composer] #635738
05/11/17 05:02 PM
05/11/17 05:02 PM
Joined: Sep 2017
Posts: 499
Norway
The Composer Offline OP
addict
The Composer  Offline OP
addict

Joined: Sep 2017
Posts: 499
Norway
I will await any workarounds until a patch or two then, no need to divert extra time into something that may be unecessary. Thanks!

Re: Level templates and Story Scripts [Re: Tinkerer] #635742
05/11/17 05:34 PM
05/11/17 05:34 PM
Joined: Dec 2013
Posts: 872
Windemere Offline

old hand
Windemere  Offline

old hand

Joined: Dec 2013
Posts: 872
Originally Posted By: Tinkerer
Have you tried making that spectator camera global? I have no personal experience with spectator cameras, and I don't think we have any in our own level templates, so it's quite possible they don't work together very well.


Yeah, I had tried that and it didn't make a difference. Thanks for the reply, probably just something to work around.


DOS2 Mods: Happily Emmie After and The Noisy Crypt

Steam Workshop
Nexus Mods

Powered by UBB.threads™ PHP Forum Software 7.6.2