Welcome to the AFK Mods bug tracker. In order to report an issue, you need to have a VALIDATED account to post one. Once you have followed the link the registration email sent you, please select a project from the drop down menu below. Select “Open New Issue” and fill out the form with as many details as possible.

Please also consider sending your bug report to Bethesda if you are reporting on an issue with Skyrim Special Edition, Fallout 4, or Starfield. Doing so will help everyone on all platforms.

Issue Data
Status: Closed
Issue Type: Bug Report
Project: Unofficial Skyrim Legendary Edition Patch
Component: Skyrim LE: Vanilla
Category: Quests
Assigned To: Nobody
Platform: Windows PC
Severity: Low
Votes: 0
Watching: N/A
Opened By Arthmoor on Aug 8, 2012 3:21 am
Last Edited By BlackPete on Aug 29, 2021 5:31 pm
Closed By Arthmoor on Dec 15, 2012 11:09 pm
Resolution: Duplicate

Issue #902: Khajiit caravans lose their tents at some point during the game

 
Since the battle for Whiterun is over, the engine appears to have forgotten how to enable the caravan’s facilities.

Related Issues: 181  

Comments

12 comment(s) [Closed]
Sclerocephalus said:
 
After reinvestigation (it's been quite some time ago), I guess that I messed up the declaration. I remember that I had totally overlooked that the function is set up to return a global variable rather than the value of a global.

Otherwise, this is a duplicate of bug 181.

Arthmoor said:
 
Yep, didn't really notice this was a dup. So many bugs!

Arthmoor said:
 
I’ve noticed this several times, outside of Whiterun in particular. The
tents are there with no Khajiit or the Khajiit are there with no tents. I’m
not sure of the cause/trigger, but the behavior was happening long before
the battle. They eventually settled back down into something resembling
their normal movement patterns, but it took a couple or three in-game
months. I know they lost one member/guard to a dragon attack while on the
road at one point, but their behavior had been buggy before then.

Arthmoor said:
 
i have had this happen multiple times as well. sometimes it’s the other way around, and the tents are there but the khajiits are missing.

Arthmoor said:
 
Probably a dodgy script is all. The caravan system seems needlessly complex.

Arthmoor said:
 
The Khajiit were having their camp outside of Windhelm. I sold stuff. I traveled west. I met them on the way, except they were coming from west heading to Windhelm… Is that ok because of a “dumb” script?

Arthmoor said:
 
There are two caravans that can be met in the area around Windhelm.

Arthmoor said:
 
I’ve seen a number of variations on this, generally the traders outside cities but with no camp set up, but occasionally the tents with no traders. Today, possibly for the first time ever that I’ve noticed, there was a camp outside Solitude – this time with no cats. Using the console I jumped to the location of each of the caravan leaders and all three were already encamped, outside Whiterun, Dawnstar and Windhelm respectively. I’ve not had a chance to investigate the scripting, but this doesn’t seem to make a lot of sense any which way.

Arthmoor said:
 
It appears that I have found the error in the script:

Within the function “GetLocationGlobal(Int WhichCaravan)” (right at the bottom of the script), a value is assigned to a global variable by using a simple <global variable> = <value> command (more precisely, there are three of these commands: “ReturnVar = CaravanLocationA”, “ReturnVar = CaravanLocationB” and “ReturnVar = CaravanLocationC”). This does not work. To be completely sure, I tried to recompile this part of the code, and, as expected, got three type mismatch errors. To assign values to global variables, the setvalue() command has to be applied (i.e. “ReturnVar.SetValue(CaravanLocationA)”, “ReturnVar.SetValue(CaravanLocationB)” and “ReturnVar.SetValue(CaravanLocationC)”, respectively – this will compile without an error).

What this function does is to return a global that reflects the enable/disable state of the tents of the caravan specified by the “WhichCaravan” variable. In other words, if it fails to return a value, enabling/disabling the caravan tents stops working properly. It doesn’t stop to work at all though, since the value expected to be returned by the function is either 0 or 1; therefore, the default value is accidentally the correct one in statistically one out of two cases.

I really wonder how they got this code compiled. Did they provide us with erroneous source codes ? Or, did they use a different early papyrus version ?

Arthmoor said:
 
I’d be more curious to know how you got it to spit out an error. I just tried recompiling it and it came back fine. Though obviously what you found is definitely a syntax bug, nice catch.

Arthmoor said:
 
Created an empty mod with an empty quest, attached an empty script to bring up the CK edit window, then copied the respective function into the script and ran the compiler from the edit window.

Arthmoor said:
 
I tried this:

Scriptname tesdt extends Quest Conditional

GlobalVariable property CaravanLocationA auto
GlobalVariable property CaravanLocationB auto
GlobalVariable property CaravanLocationC auto

GlobalVariable function GetLocationGlobal(int WhichCaravan)

GlobalVariable ReturnVar

if WhichCaravan == 1
ReturnVar = CaravanLocationA

elseif WhichCaravan == 2
ReturnVar = CaravanLocationB

elseif WhichCaravan == 3
ReturnVar = CaravanLocationC

EndIf

; Debug.trace("CaravanScript GetLocationGlobal() is returning " + ReturnVar)
return ReturnVar

EndFunction

But that compiles clean. Can you post what you tried it with?

Showing Comments 1 - 12 of 12