Jump to content

Detect SoD via Trigger


Skye

Recommended Posts

I'm trying to make my life easier, so I was wondering if anyone knows of a clever trigger that would allow me to determine if SoD is installed while in-game.

 

I know I can do it during mod installation, but I'd prefer to avoid having to override my triggers while I'm compiling the scripts.

Link to comment

Try this:

AreaCheckObject("bd0120","bdporios")

Should return True if both the area "bd0120" and creature in that area "bdporios" exist; they are SoD specific (the starting area). If SoD is not installed neither of them will exist and the trigger should return False (and the script compiler may throw warnings that resources don't exist).

Edited by Endurium
Link to comment

Try this:

AreaCheckObject("bd0120","bdporios")

Should return True if both the area "bd0120" and creature in that area "bdporios" exist; they are SoD specific (the starting area). If SoD is not installed neither of them will exist and the trigger should return False (and the script compiler may throw warnings that resources don't exist).

It didn't work in my tests. From what I've seen in existing scripts, this trigger is only used to check for creatures in the same area.

 

An idea that *might* work (haven't tested yet):

- spawn a SoD-specific creature (preferably one without assigned scripts)

- use ActionOverride to execute a simple script action from the spawned creature (e.g. setting a variable)

- despawn the creature

- check if the variable has been set

 

Link to comment

An idea that *might* work (haven't tested yet):

- spawn a SoD-specific creature (preferably one without assigned scripts)

- use ActionOverride to execute a simple script action from the spawned creature (e.g. setting a variable)

- despawn the creature

- check if the variable has been set

Or you could use simple, if game SoD in weidu, append baldur.bcs via set global x to z, and check for global x is z there after. But, that's like ... Edited by Jarno Mikkola
Link to comment

It's a shame Beamdog didn't add a HasCampaign trigger to go with their HasDLC trigger (which checks DLC companions)

 

I suspected AreaCheckObject might not work but after seeing it in Baldur.bcs I figured maybe... alas.

 

Jarno's idea works best if you're installing with WeiDU anyway. No need to override triggers if you've got a global variable you can check at any time, from any place.

Edited by Endurium
Link to comment

I don't know if this helps.

 

On windows, SetPrivateProfileString('DLC','dlcname','0')

disables a dlc (HasDLC('dlcname') will return false). Sadly this won't work on tablets or linux.

 

You can even use this cmd in the console. (without the leading C: prefix)

Link to comment

Can't hurt for her to try but I don't know if it will help because the game doesn't classify SoD or BP as DLC, but rather Campaigns

 

From BGEE.LUA with SoD installed:

Infinity_AddDLC( 'dorn', 'DLCDN', 31092, 31093, 'BGEE_IOS_DORN', 'baldursgate_android_dorn' )
Infinity_AddDLC( 'neera', 'DLCNE', 31090, 31091, 'BGEE_IOS_NEERA', 'baldursgate_android_neera' )
Infinity_AddDLC( 'manley', 'DLCP1', 31094, 31095, 'BGEE_IOS_PORTRAITPACK1', 'baldursgate_android_portraitpack1' )
Infinity_AddDLC( 'voice', 'DLCV1', 31096, 31097, 'BGEE_IOS_VOICEPACK1', 'baldursgate_android_voicepack1' )

...

	START_CAMPAIGN_BG = 1,
	START_CAMPAIGN_BP = 2,
	START_CAMPAIGN_SOD = 3,

Also when Sarevok dies and SoD is installed, the cutscene executes a MoveToCampaign("SoD") action referring to Campaign.2da which has all the necessary map/resource switches.

 

All uses of HasDLC() in script refer to the BeamDog companions.

Link to comment

Pretty sure HasDLC("SOD") is supposed to do what it says on the tin.

 

Sadly no. HasDLC("nosuchthis") returns true.

You need to have a DLC variable set to 0 to actually get any negative result.

 

And that's what you can do with SetPrivateProfileString('DLC','dlcname','0')

Edited by Avenger
Link to comment
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...