Larian Banner
Previous Thread
Next Thread
Print Thread
Joined: Nov 2017
E
Erikem Offline OP
journeyman
OP Offline
journeyman
E
Joined: Nov 2017
Hi, Larian team,

I have an issue (looks like a bug to me) in Divinity Engine related to Story Scripting.

I am trying to create a new mod (add-on for Story and GM) which is all about some new skills. It also has a test level I use for trying out my skills.

Problem is that as soon as try to use story scripting - my mod starts to disbehave like mad.

Issue description goes below

Preconditions:
- Add-on story+gm mod that consist of a new test level and some Stats changes (new skills and statuses).
- Story editor has not been even open a single time yet: "game data" folder of a project does not have a "Story" folder yet
- I have my test level open in Engine
- My test level has several neutral NPCs, which react aggressively (start combat and attack me) if I attack them

Here's what I do and what happens:
1. I open Story Editor
2. I generate definitions
3. I close Story Editor
4. I "reload level and story" action from within Engine

Unexpected behavior 1:
When I "play" my level - my characters are added on stage with a "teleported" visual effect
Error log starts spamming like mad following:
Salt miss on ObjectFactory (ecl::Character) @ index 105 :

* handle has salt 1
* factory(real) salt is 2

Category: Code
Count: 1
Timestamp: 28-11-2017 20:38:38:595
Function: ls::ObjectFactory<class ecl::Character,class ls::ObjectFactoryNullLocker>::Get
Location: d:\jenkins\workspace\repo\rs3.0_fw3.0\modnew\stable\lsprojects\framework\code\corelib\ObjectFactory.inl (149)

ecl::CharacterFactory::Get() failed. Could not retrieve Component.

Category: Code
Count: 1
Timestamp: 28-11-2017 20:38:38:595
Function: ecl::CharacterFactory::Get
Location: EoCClient\Client\CharacterFactory.cpp (224)


5. I open Story Editor and do "Rebuild and Reload"
6. I close Story Editor
7. I "reload level and story" action from within Engine

Unexpected behavior 2:
Once level reload is complete I no longer see all my 5 characters (there were 5 by default when I created level) in Editor - instead I see just one of them (main character marked with "crown"). Once I "play the level" the rest 4 characters are added to stage with a "teleported" visual effect

Unexpected behavior 3:
NPCs I have on a level stop reacting to aggression and act like rag dolls - they just stand there under my blows until they die with no reactions or combat initiated.
Error log starts spamming even more and now it says following:
Salt miss on ObjectFactory (ecl::Character) @ index 142 :

* handle has salt 1
* factory(real) salt is 2

Category: Code
Count: 1
Timestamp: 28-11-2017 20:44:18:015
Function: ls::ObjectFactory<class ecl::Character,class ls::ObjectFactoryNullLocker>::Get
Location: d:\jenkins\workspace\repo\rs3.0_fw3.0\modnew\stable\lsprojects\framework\code\corelib\ObjectFactory.inl (149)

ecl::CharacterFactory::GetGameObject() failed. Could not retrieve Component.

Category: Code
Count: 1
Timestamp: 28-11-2017 20:44:18:015
Function: ecl::CharacterFactory::GetGameObject
Location: EoCClient\Client\CharacterFactory.cpp (192)


Solutions tried to fix the issue, which did not help:
- restart engine and/or computer
- check integrity of files
- reinstall game (while deleting all config files) and engine

Solution which helps to revert the issue:
- delete "Story" folder from "game data" folder of a project. This solutions reverts mod behavior back to normal but obviously restricts me from adding any Story Scripts

Technical details:
- Win10
- Steam version (erikem007)
- Game + DLC (Engine data) +Engine installed

Please help me with this issue because it restricts me from using Story Scripting, which I desperately need for my mod.

Last edited by Erikem; 28/11/17 08:59 PM.
Joined: Dec 2017
T
stranger
Offline
stranger
T
Joined: Dec 2017
I have the exact same issue! Have you found a solution?

Joined: Mar 2016
T
addict
Offline
addict
T
Joined: Mar 2016
Targetting both story (adventure) and gm did not work prior to patch 5, because both the osiris code for story/adventure mode and for GM got loaded at the same time, which caused all kinds of conflicts.

Try recreating your mod using patch 5, or load your existing mod and put your story goals under the new top-level story goals we added. If you don't depend on Origins, create a top-level goal for your mod with the same contents as the one from origins to prevent your own story/adventure story code from activating in GM mode.

Joined: Dec 2017
T
stranger
Offline
stranger
T
Joined: Dec 2017
Hi Tinkerer,

Thank you for the fast reply!

[quote=Tinkerer]...
Try recreating your mod using patch 5, or load your existing mod and put your story goals under the new top-level story goals we added. ... [/quote]

By putting story goals under the new top-level story goal you talk about the __Start (Double underscore) goal, right? They are in there.
I just created my Mod a week ago. This was patch 5 already i guess.

Joined: Mar 2016
T
addict
Offline
addict
T
Joined: Mar 2016
No, __Start is a goal in the Shared mod. The Shared mod always gets initialised, as it contains functionality used by all game mods.

The name of the wrapper goal for GM mode is GMModWrapper. The one from DivinityOrigins is called DOS2ModWrapper.

Joined: Dec 2017
T
stranger
Offline
stranger
T
Joined: Dec 2017
Ok. Errors sadly won't disappear after putting my Story Goals into one of those new top level Story Goals.
I feel like i might messed up something else i can't comprehend. Since this is my first level ever i tried a lot of different stuff.

Is there a clean way to recreate my mod without losing anything? The level is quit big already.
Thanks in advance

Joined: Mar 2016
T
addict
Offline
addict
T
Joined: Mar 2016
Which errors do you have exactly, and when do they occur? (in story mode, in GM mode, ...) Also, you should put story-specific scripts under the DOS2ModWrapper, and GM-specific scripts (if you have any, which is very unlikely) under GMModWrapper.

Story only uses the files you added/overrode. You can see those in Mods/YourMoreName/Story/Goals/RawFiles. You can remove any story files that you accidentally override from there and rebuild your story to get back to a clean slate as far as story is concerned.


Moderated by  Larian_Koala, Larian_KVN 

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