[Scripts] Random Trader Camps

All topics related to NPC's, Quests and Dialogue
Post Reply
User avatar
SHotN Jarl of Questing
Posts: 507
Joined: Thu Sep 15, 2016 9:16 pm

[Scripts] Random Trader Camps

Post by Texafornian »

I've attached a set of template scripts that randomly controls whether a spot along a road has one variation of a trader camp, a second variation, or no camp at all. The traders should have unique goods for sale and possibly a Travel service to simulate the player going with the traders to the next settlement. The camp changes to one of the three options, by default, every 3, 4, or 5 days after cellchange.

34% chance of no camp
33% chance of camp 1
33% chance of camp 2

Simply replace XX in each script ID with the appropriate hold. If more than 1 camp is needed per hold, then copy and paste the scripts and change "Trade1" to "Trade2" in all of the IDs.

Sky_xRe_XX_Trade1_Handler_sc - Place this on just one hidden or invisible object near the campsite. Control the random number of days to change the camp status by changing these lines:
;Set a random number of days, 3 4 or 5, for trader camp status
set rando to Random 3
set doMath to ( holdDate + ( 5 - rando ) )
The probability of each camp status is determined by these lines:
if ( rando < 34 ) ;No trade camp
set state to 0
elseif ( rando < 67 ) ;Trader camp 1
set state to 1
else ;Trader camp 2
set state to 2
Sky_xRe_XX_Trade1_C1_Act_sc - Place this on all non-NPC objects/creatures in the first camp variation.
Sky_xRe_XX_Trade1_C1_NPC_sc - Place this on all NPCs in the first camp variation.
Sky_xRe_XX_Trade1_C1_NPCnl_sc - Place this on all Sky_NoLore NPCs in the first camp variation.

Repeat the above for the second camp variation (C2).
190305_Trader Camp Scripts.zip
(3.27 KiB) Downloaded 90 times

Post Reply

Return to “SHotN Character's & Questing”