Uh, that's been a while now. Still nothing new from my laptop. It's said to be on its way to me since the 8th, delivered by UPS. The tracking website told me, 4 days after this last message I should receive an email from UPS telling me when it will arrive. Estimated date of arrival would be at or before the 19th. And now I'm heavily confused...
1. Why does it take 4 days for the parcel service to give me an arrival date?
2. When I got the message it's at the parcel service already for delivery, how could it possibly take from the 8th to the 19th (=
11 days!) to deliver a simple package?
What about those "over-night deliveries" and such, "order today before 7 PM and it will arrive the next work day" and all these conventions?
3. After all we're talking about a distance from Frankfurt to my home in north-western end of NRW, round-about 300 kilometers, approx. 3 hours per car (at least that's what it takes us each time to visit some relatives living near Frankfurt)... It is totally beyond me how this could possible take UPS longer than
1 day to deliver my laptop! It's more than a week now already! :blink:
Ah well, guess there's no need to worry until the 19th then at least... we will see...
Anyways, the project seems to die rather quickly without me being able to continue my work... and that's something I'll never let happen!
So, back to the current issue, the race token script is not working at all anymore apparently.
Now, I can't find any really obvious causes for such behavior, but maybe this new script might help shedding some light on this mystery:
scn DrakeDragonRaceTokenScriptref actorRefref actorRaceref actslotContentref oldslotContentref tempItemshort initshort actorFemaleshort switchItemsshort wearsAdaptedshort foundAdaptedshort requirementshort foundRequirementshort currentRequirementshort slotCodeshort index2long frameNumlong slotMasklong tempNumarray_var confArrayarray_var itemArrayarray_var defaultItemArrayarray_var replacerTemplateArrayarray_var slotArrayarray_var repeatArrayarray_var keysArrayarray_var itemarray_var item2string_var indexstring_var tagIdstring_var tagCodestring_var currentlyWearingstring_var shouldBeWearingstring_var slotIdstring_var raceIdfloat healthBufferbegin gameMode if eval(-1 == ar_Size confArray) set init to 0 endif if(init != 1) set actorRef to 0 if(DrakeDragonRaceQuest.init != 1) return endif let confArray := DrakeDragonRaceQuest.confArray let itemArray := DrakeDragonRaceQuest.itemArray let defaultItemArray := DrakeDragonRaceQuest.defaultItemArray let replacerTemplateArray := DrakeDragonRaceQuest.replacerTemplateArray let slotArray := ar_Construct StringMap let repeatArray := ar_Construct StringMap set frameNum to 0 set actorFemale to -1 set init to 1 endif if(actorRef == 0) set actorRef to getContainer return endif if(actorFemale == -1) set actorFemale to actorRef.isFemale endif if(DrakeDragonRaceQuest.debug == 1 && DrakeDragonRaceQuest.debugShowRaceToken == 1) actorRef.playMagicShaderVisuals DrakeDEFriendlyDetectedXR else actorRef.stopMagicShaderVisuals DrakeDEFriendlyDetectedXR endif if(actorRace != actorRef.getRace) set actorRace to actorRef.getRace let confArray := DrakeDragonRaceQuest.confArray let raceId := ar_Find actorRace confArray["races"] if eval (raceId != "") let confArray := confArray[raceId] ;race-specific part of confArray let keysArray := ar_Keys confArray ForEach item <- keysArray let slotId := item["value"] let slotArray[slotId] := DrakeEmptyItem ;initialize empty let repeatArray[slotId] := 0 Loop let slotId := "" if(DrakeDragonRaceQuest.debug == 1 && actorRef.getIsReference player == 1) printToConsole "Player race identified as dragon." endif else ;is not a dragon, remove bodyparts, if present! ForEach item <- defaultItemArray ForEach item2 <- item["value"] let tempItem := item2["value"] set tempNum to actorRef.getItemCount tempItem if(tempItem != DrakeEmptyItem && tempNum > 0) actorRef.removeItemNS tempItem tempNum endif Loop Loop if(DrakeDragonRaceQuest.debug == 1 && actorRef.getIsReference player == 1) printToConsole "Player race identified as NON-dragon!" endif removeMe ;is not a dragon, should not have this! endif return endif if(frameNum < DrakeDragonRaceQuest.framesToSkip) set frameNum to (frameNum + 1) return ;dont run every frame endif if eval (slotId == "" || slotId == ar_Last confArray) let slotId := ar_First confArray set frameNum to 0 return ;finished all slots this run else let slotId := ar_Next confArray slotId endif if(actorRef.getInSameCell player != 1) if(DrakeDragonRaceQuest.debug == 1 && DrakeDragonRaceQuest.debugShowRaceToken == 1) actorRef.stopMagicShaderVisuals DrakeDEFriendlyDetectedXR endif set init to 0 removeMe endif ;provide with bodyparts ForEach item2 <- defaultItemArray[slotId] let tempItem := item2["value"] if(tempItem != DrakeEmptyItem && actorRef.getItemCount tempItem < 1) actorRef.addItemNS tempItem 1 endif Loop let oldslotContent := slotArray[slotId] ;check slot for changes let slotMask := confArray[slotId]["slotmask"] set actslotContent to (actorRef.getEquipmentSlotMask slotMask) if eval (actslotContent != oldslotContent || repeatArray[slotId] == 1) let index := "" let index2 := ar_First confArray[slotId]["combinations"] While eval ((index == "") && (index2 != ar_BadNumericIndex)) let tagId := confArray[slotId]["combinations"][index2]["tag"] let index := ar_Find oldslotContent itemArray[tagId] let index2 := ar_Next confArray[slotId]["combinations"] index2 Loop if eval (index != "") ;needs exchange if(actorRef.getItemCount oldslotContent > 0) let tempItem := itemArray["original"][index] actorRef.removeItemNS oldslotContent 1 actorRef.addItemNS tempItem 1 endif endif let shouldBeWearing := "original" set foundAdapted to 0 set foundRequirement to 0 ForEach item2 <- confArray[slotId]["combinations"] let tagId := item2["value"]["tag"] if eval (item2["key"] == ar_Last confArray[slotId]["combinations"]) let tagCode := "_" + tagId else let tagCode := "_" + tagId + ".nif" endif let requirement := item2["value"]["req"] if(actorFemale == 1 && isBipedModelPathValid 1 actslotContent == 1) set wearsAdapted to compareFemaleBipedPath $tagCode actslotContent else set wearsAdapted to compareMaleBipedPath $tagCode actslotContent endif if(wearsAdapted == 1 && foundAdapted != 1) ;always take the 1st one set foundAdapted to 1 let currentlyWearing := tagId set currentRequirement to requirement endif if(requirement == 1 && foundRequirement != 1) ;always take the 1st one set foundRequirement to 1 let shouldBeWearing := tagId endif Loop set switchItems to 0 if(foundAdapted == 1) ;is wearing an adapted item if(foundRequirement == 1) ;only if slot in question should be controlled according to selected shape if(currentRequirement == 0) ;in case of shape shifting races and worn adapted item not fitting selected shape let index := ar_Find actslotContent itemArray[currentlyWearing] if eval (index != "") ;safety check let tempItem := itemArray[shouldBeWearing][index] set switchItems to 1 endif endif else ;is wearing adapted item or bodypart but should not let index := ar_Find actslotContent itemArray[currentlyWearing] if eval (index != "") ;no bodypart let tempItem := itemArray["original"][index] set switchItems to 1 else ;bodypart set tempItem to 0 set switchItems to 2 endif endif else ;not wearing any adapted item if(foundRequirement == 1) ;only if slot in question should be controlled according to selected shape if(actslotContent != 0) ;normal clothing let index := ar_Find actslotContent itemArray["original"] if eval (index != "") ;already an adapted present if eval (ar_HasKey itemArray[shouldBeWearing] index) let tempItem := itemArray[shouldBeWearing][index] else let tempItem := itemArray[(ar_Last itemArray)][index] endif set switchItems to 1 else ;try to find adapted item set switchItems to 3 endif else ;empty let tempItem := defaultItemArray[slotId][shouldBeWearing] set switchItems to 2 endif endif endif ;handle updates let repeatArray[slotId] := 0 if(switchItems == 1 && tempItem != 0) ;just swap set slotCode to getEquipmentSlot actslotContent set healthBuffer to actorRef.getEquippedCurrentHealth slotCode actorRef.addItemNS tempItem 1 actorRef.equipItemNS tempItem actorRef.removeItemNS actslotContent 1 actorRef.setEquippedCurrentHealth healthBuffer slotCode elseif(switchItems == 2) ;equip bodyparts if(tempItem == 0) actorRef.unequipItemNS actslotContent else actorRef.equipItemNS tempItem endif elseif(switchItems == 3) ;check for presence of alternatives let index := $(ar_Size itemArray["original"]) ;prepare this outside of foreach ForEach item2 <- confArray[slotId]["combinations"] let tagId := item2["value"]["tag"] let tagCode := ".nif|_" + tagId + ".nif" if(isBipedModelPathValid 0 actslotContent == 1) copyMaleBipedPath actslotContent DrakeTempItem else setMaleBipedPath "empty" DrakeTempItem endif modMaleBipedPath $tagCode DrakeTempItem if(isBipedModelPathValid 1 actslotContent == 1) copyFemaleBipedPath actslotContent DrakeTempItem else setFemaleBipedPath "empty" DrakeTempItem endif modFemaleBipedPath $tagCode DrakeTempItem if(isBipedModelPathValid 0 DrakeTempItem == 1 || isBipedModelPathValid 1 DrakeTempItem == 1) ;adapted clothing exists for at least one gender if eval ((ar_HasKey itemArray["original"] index) == 0) let itemArray["original"][index] := actslotContent ;do this only once endif set tempItem to cloneForm actslotContent if(isBipedModelPathValid 0 DrakeTempItem == 1) ; male does exist copyMaleBipedPath DrakeTempItem tempItem endif if(isBipedModelPathValid 1 DrakeTempItem == 1) ; female does exist copyFemaleBipedPath DrakeTempItem tempItem endif let itemArray[tagId][index] := tempItem else ;use replacer templates instead if eval (confArray[slotId]["forced"] == 1) ;forced unequipping for this slot if eval (getBipedSlotMask actslotContent == slotMask || DrakeDragonRaceQuest.forcecombined == 1) ;must not be a combined-slot item or combined-slot items exception must be turned off let tempItem := replacerTemplateArray[slotId][tagId] if(tempItem != DrakeEmptyItem) if(isBipedModelPathValid 0 tempItem == 1) copyMaleBipedPath tempItem DrakeTempItem else setMaleBipedPath "empty" DrakeTempItem endif if(isBipedModelPathValid 1 tempItem == 1) copyFemaleBipedPath tempItem DrakeTempItem else setFemaleBipedPath "empty" DrakeTempItem endif if(isBipedModelPathValid 0 DrakeTempItem == 1 || isBipedModelPathValid 1 DrakeTempItem == 1) ;replacer template exists for at least one gender if eval ((ar_HasKey itemArray["original"] index) == 0) let itemArray["original"][index] := actslotContent ;do this only once endif set tempItem to cloneForm actslotContent if(isBipedModelPathValid 0 DrakeTempItem == 1) ; male does exist copyMaleBipedPath DrakeTempItem tempItem endif if(isBipedModelPathValid 1 DrakeTempItem == 1) ; female does exist copyFemaleBipedPath DrakeTempItem tempItem endif let itemArray[tagId][index] := tempItem endif endif endif endif endif Loop if eval (ar_HasKey itemArray["original"] index) ;at least 1 adapted clothing was found during foreach let repeatArray[slotId] := 1 ;do exchange next frame else ;no adapted clothing found if eval (confArray[slotId]["forced"] == 1) ;forced unequipping for this slot if eval (getBipedSlotMask actslotContent == slotMask || DrakeDragonRaceQuest.forcecombined == 1) ;must not be a combined-slot item or combined-slot items exception must be turned off let tempItem := defaultItemArray[slotId][shouldBeWearing] if(tempItem == 0) actorRef.unequipItemNS actslotContent else actorRef.equipItemNS tempItem endif endif endif endif endif endif set oldslotContent to (actorRef.getEquipmentSlotMask slotMask) let slotArray[slotId] := oldslotContentendbegin menuMode 1002 || 1008 if eval(-1 == ar_Size confArray) set init to 0 endif if(init != 1) set actorRef to 0 if(DrakeDragonRaceQuest.init != 1) return endif let confArray := DrakeDragonRaceQuest.confArray let itemArray := DrakeDragonRaceQuest.itemArray let defaultItemArray := DrakeDragonRaceQuest.defaultItemArray let replacerTemplateArray := DrakeDragonRaceQuest.replacerTemplateArray let slotArray := ar_Construct StringMap let repeatArray := ar_Construct StringMap set frameNum to 0 set actorFemale to -1 set init to 1 endif if(actorRef == 0) set actorRef to getContainer return endif if(actorRef.getIsReference player != 1) return ;NPCs don't need control during MenuMode endif if(actorFemale == -1) set actorFemale to actorRef.isFemale endif if(actorRace != actorRef.getRace) set actorRace to actorRef.getRace let confArray := DrakeDragonRaceQuest.confArray let raceId := ar_Find actorRace confArray["races"] if eval (raceId != "") let confArray := confArray[raceId] ;race-specific part of confArray let keysArray := ar_Keys confArray ForEach item <- keysArray let slotId := item["value"] let slotArray[slotId] := DrakeEmptyItem ;initialize empty let repeatArray[slotId] := 0 Loop let slotId := "" if(DrakeDragonRaceQuest.debug == 1 && actorRef.getIsReference player == 1) printToConsole "Player race identified as dragon." endif else ;is not a dragon, remove bodyparts, if present! ForEach item <- defaultItemArray ForEach item2 <- item["value"] let tempItem := item2["value"] set tempNum to actorRef.getItemCount tempItem if(tempItem != DrakeEmptyItem && tempNum > 0) actorRef.removeItemNS tempItem tempNum endif Loop Loop if(DrakeDragonRaceQuest.debug == 1 && actorRef.getIsReference player == 1) printToConsole "Player race identified as NON-dragon!" endif removeMe ;is not a dragon, should not have this! endif return endif if(frameNum < DrakeDragonRaceQuest.framesToSkip) set frameNum to (frameNum + 1) return ;dont run every frame endif if eval (slotId == "" || slotId == ar_Last confArray) let slotId := ar_First confArray set frameNum to 0 return ;finished all slots this run else let slotId := ar_Next confArray slotId endif if(actorRef.getInSameCell player != 1) if(DrakeDragonRaceQuest.debug == 1 && DrakeDragonRaceQuest.debugShowRaceToken == 1) actorRef.stopMagicShaderVisuals DrakeDEFriendlyDetectedXR endif set init to 0 removeMe endif ;provide with bodyparts ForEach item2 <- defaultItemArray[slotId] let tempItem := item2["value"] if(tempItem != DrakeEmptyItem && actorRef.getItemCount tempItem < 1) actorRef.addItemNS tempItem 1 endif Loop let oldslotContent := slotArray[slotId] ;check slot for changes let slotMask := confArray[slotId]["slotmask"] set actslotContent to (actorRef.getEquipmentSlotMask slotMask) if eval (actslotContent != oldslotContent || repeatArray[slotId] == 1) let index := "" let index2 := ar_First confArray[slotId]["combinations"] While eval ((index == "") && (index2 != ar_BadNumericIndex)) let tagId := confArray[slotId]["combinations"][index2]["tag"] let index := ar_Find oldslotContent itemArray[tagId] let index2 := ar_Next confArray[slotId]["combinations"] index2 Loop if eval (index != "") ;needs exchange if(actorRef.getItemCount oldslotContent > 0) let tempItem := itemArray["original"][index] actorRef.removeItemNS oldslotContent 1 actorRef.addItemNS tempItem 1 endif endif let shouldBeWearing := "original" set foundAdapted to 0 set foundRequirement to 0 ForEach item2 <- confArray[slotId]["combinations"] let tagId := item2["value"]["tag"] if eval (item2["key"] == ar_Last confArray[slotId]["combinations"]) let tagCode := "_" + tagId else let tagCode := "_" + tagId + ".nif" endif let requirement := item2["value"]["req"] if(actorFemale == 1 && isBipedModelPathValid 1 actslotContent == 1) set wearsAdapted to compareFemaleBipedPath $tagCode actslotContent else set wearsAdapted to compareMaleBipedPath $tagCode actslotContent endif if(wearsAdapted == 1 && foundAdapted != 1) ;always take the 1st one set foundAdapted to 1 let currentlyWearing := tagId set currentRequirement to requirement endif if(requirement == 1 && foundRequirement != 1) ;always take the 1st one set foundRequirement to 1 let shouldBeWearing := tagId endif Loop set switchItems to 0 if(foundAdapted == 1) ;is wearing an adapted item if(foundRequirement == 1) ;only if slot in question should be controlled according to selected shape if(currentRequirement == 0) ;in case of shape shifting races and worn adapted item not fitting selected shape let index := ar_Find actslotContent itemArray[currentlyWearing] if eval (index != "") ;safety check let tempItem := itemArray[shouldBeWearing][index] set switchItems to 1 endif endif else ;is wearing adapted item or bodypart but should not let index := ar_Find actslotContent itemArray[currentlyWearing] if eval (index != "") ;no bodypart let tempItem := itemArray["original"][index] set switchItems to 1 else ;bodypart set tempItem to 0 set switchItems to 2 endif endif else ;not wearing any adapted item if(foundRequirement == 1) ;only if slot in question should be controlled according to selected shape if(actslotContent != 0) ;normal clothing let index := ar_Find actslotContent itemArray["original"] if eval (index != "") ;already an adapted present if eval (ar_HasKey itemArray[shouldBeWearing] index) let tempItem := itemArray[shouldBeWearing][index] else let tempItem := itemArray[(ar_Last itemArray)][index] endif set switchItems to 1 else ;try to find adapted item set switchItems to 3 endif else ;empty let tempItem := defaultItemArray[slotId][shouldBeWearing] set switchItems to 2 endif endif endif ;handle updates let repeatArray[slotId] := 0 if(switchItems == 1 && tempItem != 0) ;just swap set slotCode to getEquipmentSlot actslotContent set healthBuffer to actorRef.getEquippedCurrentHealth slotCode actorRef.addItemNS tempItem 1 actorRef.equipItemNS tempItem actorRef.removeItemNS actslotContent 1 actorRef.setEquippedCurrentHealth healthBuffer slotCode elseif(switchItems == 2) ;equip bodyparts if(tempItem == 0) actorRef.unequipItemNS actslotContent else actorRef.equipItemNS tempItem endif elseif(switchItems == 3) ;check for presence of alternatives let index := $(ar_Size itemArray["original"]) ;prepare this outside of foreach ForEach item2 <- confArray[slotId]["combinations"] let tagId := item2["value"]["tag"] let tagCode := ".nif|_" + tagId + ".nif" if(isBipedModelPathValid 0 actslotContent == 1) copyMaleBipedPath actslotContent DrakeTempItem else setMaleBipedPath "empty" DrakeTempItem endif modMaleBipedPath $tagCode DrakeTempItem if(isBipedModelPathValid 1 actslotContent == 1) copyFemaleBipedPath actslotContent DrakeTempItem else setFemaleBipedPath "empty" DrakeTempItem endif modFemaleBipedPath $tagCode DrakeTempItem if(isBipedModelPathValid 0 DrakeTempItem == 1 || isBipedModelPathValid 1 DrakeTempItem == 1) ;adapted clothing exists for at least one gender if eval ((ar_HasKey itemArray["original"] index) == 0) let itemArray["original"][index] := actslotContent ;do this only once endif set tempItem to cloneForm actslotContent if(isBipedModelPathValid 0 DrakeTempItem == 1) ; male does exist copyMaleBipedPath DrakeTempItem tempItem endif if(isBipedModelPathValid 1 DrakeTempItem == 1) ; female does exist copyFemaleBipedPath DrakeTempItem tempItem endif let itemArray[tagId][index] := tempItem else ;use replacer templates instead if eval (confArray[slotId]["forced"] == 1) ;forced unequipping for this slot if eval (getBipedSlotMask actslotContent == slotMask || DrakeDragonRaceQuest.forcecombined == 1) ;must not be a combined-slot item or combined-slot items exception must be turned off let tempItem := replacerTemplateArray[slotId][tagId] if(tempItem != DrakeEmptyItem) if(isBipedModelPathValid 0 tempItem == 1) copyMaleBipedPath tempItem DrakeTempItem else setMaleBipedPath "empty" DrakeTempItem endif if(isBipedModelPathValid 1 tempItem == 1) copyFemaleBipedPath tempItem DrakeTempItem else setFemaleBipedPath "empty" DrakeTempItem endif if(isBipedModelPathValid 0 DrakeTempItem == 1 || isBipedModelPathValid 1 DrakeTempItem == 1) ;replacer template exists for at least one gender if eval ((ar_HasKey itemArray["original"] index) == 0) let itemArray["original"][index] := actslotContent ;do this only once endif set tempItem to cloneForm actslotContent if(isBipedModelPathValid 0 DrakeTempItem == 1) ; male does exist copyMaleBipedPath DrakeTempItem tempItem endif if(isBipedModelPathValid 1 DrakeTempItem == 1) ; female does exist copyFemaleBipedPath DrakeTempItem tempItem endif let itemArray[tagId][index] := tempItem endif endif endif endif endif Loop if eval (ar_HasKey itemArray["original"] index) ;at least 1 adapted clothing was found during foreach let repeatArray[slotId] := 1 ;do exchange next frame else ;no adapted clothing found if eval (confArray[slotId]["forced"] == 1) ;forced unequipping for this slot if eval (getBipedSlotMask actslotContent == slotMask || DrakeDragonRaceQuest.forcecombined == 1) ;must not be a combined-slot item or combined-slot items exception must be turned off let tempItem := defaultItemArray[slotId][shouldBeWearing] if(tempItem == 0) actorRef.unequipItemNS actslotContent else actorRef.equipItemNS tempItem endif endif endif endif endif endif set oldslotContent to (actorRef.getEquipmentSlotMask slotMask) let slotArray[slotId] := oldslotContentend
Now there should be nothing preventing the debug shaders from playing anymore, unless there really is no token in the inventory.
Also I've added some debug outputs to console, only readable when "DrakeDragonRaceQuest.debug" is "1" and the token is on the player (didn't want to cause spam by having all tokens in game putting out these messages all over), which should tell us if the player was recognized as dragon or not, thus if the race check was passed or failed.
Ideally the race won't change during runtime, so this message will only popup once in the console. But if it does change at any point while playing, the debug output will again tell you what race it identified.
I'm searching for a way to get a complete "ShowVariables" output of the token script's variables, but unless I know the actual form id of the token in the player's inventory (if there even is one) or any way to access it from outside, there's no way for me to gather these information.
Feel invited to mess around with the scripts in any way that could shed some light on this issue at hand. I really need to figure this one out, but can't test it myself due to the reasons well known.