Welcome Guest ( Log In | Register )

6 Pages V « < 4 5 6  
Reply to this topicStart new topic
> Renee's Modding Thread
Renee
post Sep 25 2023, 12:19 AM
Post #101


Councilor
Group Icon
Joined: 19-March 13
From: Ellicott City, Maryland



Skooma Dealer, Game: TES IV: Oblivion

I recently returned to Oblivion, decided to return to my very first PC character, Snaat Rayag the Skooma Dealer, originally rolled in 2014. All he does is buy skooma at a discounted rate, and then tries to sell it. You'd think that such a game might become stale rather quickly, but being a skooma dealer is often a bit risky. It's not just buy/sell, there are other factors. Sometimes customers curse at Snaaty, sometimes they even try to pick fights, or call the guards (if they're of higher morals), etc.

I originally had Skooma Deals - Buying, Selling--Have others do it for you, by PrettyMurky. Installed it way back in 2014, but recently the mod has stopped working. There's no dialog for skooma selling, even after a fresh uninstall/reinstall the mod stopped working. Began getting frustrated, and so on. mad.gif

Truth is, I've never been 100% satisfied with Skooma Deals. So now here's my version.



1). Start the Construction Set, bla bla bla. I'm assuming a quest needs to be written from scratch.

2a). Press the Q button on the main toolbar, and right-click > New into the Editor window. Give your quest an ID. I'm calling it aaaSkoomaDealer.

2b). Here's a quick summary of the Quest Data page.

Quest Name: Skooma Dealer
Priority: 30

Toggle Start Game Enabled and Allow Repeated Conversation Topics on.

Quest Conditions: GetIsPlayableRace == 1.00 AND
GetPlayerInSEWorld == 0.00


Note: GetPlayerinSEWorld is only needed if Shivering Isles is active (toggled on) along with this .esp I'm about to work on.

2c). Start a new script as so...

Scriptname aaaSkoomaDealerMainScript

short DoOnce
float Timer

Begin GameMode

End


2d). Change the Script Type scroll-bar from Object to Quest and save. Close the Script Edit panel, Click OK (closing the Quest panel), reopen the quest, and find the script in the scroll-bar. Click OK. Reopen.

2e). The rest of the script is as follows...

Scriptname aaaSkoomaDealerMainScript

short DoOnce
float Timer

Begin GameMode


If (DoOnce == 1) && (Timer < 30)
Set Timer to Timer + GetSecondsPassed

EndIf

If (DoOnce == 1) && (Timer >= 30)
Set DoOnce to 0
Set Timer to 0


Message "I should try another sale...", 10

EndIf
End



Explanation: What this script will do: every time a sale gets made we can't just spam another sale to the same NPC (this was one of the gripes I had with Skooma Deals). I've got it set so that it'll take 30 seconds for another sale to be attempted, which is the best idea I can come up with for now. Someone more talented might figure a way so that when a sale is made to a particular NPC they won't want another one for X amount of time. Couldn't figure any better than what I've got, though.

So, I'm gaming, my character makes a sale, and since he can't go through the same dialog until 30 seconds have passed, the urge is there to move on to some other NPC.

Some NPCs, as we'll see, are hooked on this junk! They're always eager for more. Others (as they say their dialog) are more cautious. Others are downright angry at my 'toon for trying to sell skooma, and as stated, the worst ones will either call the guards, or try to pick a fight with my dealer.

2f). Click OK (closing the Quest panel) and save.


Now to make a couple quick changes. The Skooma Deals quest I originally had starts by speaking with Roxanne Brigette, an older lady who lives in Bravil's Skooma Den. I don't remember why, and maybe we have a choice to speak to someone else to start things in the Skooma Deals mod. But I do remember that she's one of the NPCs we can buy skooma from.

So in my mod, I've got it so Roxanne is still important because she sells skooma at a lowered price. To make these lowered prices happen, continue to step 3a. For those who are happy with buying at vanilla prices, continue to 4a. To me, the vanilla prices are too high, which means it's harder to make a profit. rolleyes.gif


Object Window > Magic > Potion
3a). . Find PotionSkooma and change its Potion Value (lower right corner). I lowered this to 10. Click OK.

Reason being: real-life dealers often buy drugs at a discounted rate so they can make a profit, and return a portion of this profit to their lord (or lady). With the usual upscale in value caused by NPCs' Dispositions and their Mercantile skill, the price will automatically increase. My dealer buys from Roxy at 23 gp, and mostly sells between 40 to 70 gold.

But it makes no sense to me, the extremely high prices for skooma we see in the game, for such a short-lasting effect. By default, skooma's main effects only last 20 seconds.

3b). Actors > NPC > Breton. Find RoxanneBrigette, or whoever is going to be the main dealer.

3c). Toggle Auto Calc Stats OFF.

3d). Find Mercantile in her Skills window. Click on the Value, press F2, and lower this. I lowered Value from whatever it was all the way down to 5. Not that she's a horrible merchant; I wanted Roxanne to have the cheapest skooma in all the land.

There are several others in my game who sell skooma: Shady Sam, a dealer I added into The Foaming Flask, perhaps a few others I don't know about. There's also a wood elf who stands in shadow behind Bravil's Silverhome On The Water. None of these folks can beat Roxanne's price though, causing the player (me) to have a reason to return to Bravil.

3e). Assuming the seller has AI (and Roxanne does) open whichever packages are pertinent, and toggle Offers Services on. Make sure Potions is selected in their AI panel, whether this AI is a Wander package, an Eat package, etc.

I'm noticing that one of Roxy's AI packages is BravilSkoomaAddictSeek8x12, which is a Bethesda-created package. What this does: if she runs out of skooma she'll leave the den, then go walking around Bravil looking to find more! Since I'm going to add a bunch of skooma to a chest she's in charge of, this means she'll possibly use some of the skooma in this chest. Good gosh.

4a). Reopen the quest and select Quest Stages. Three stages are needed.
Stage 0: Right-click > New into the top Log Entry window and do nothing else.

Stage 5: Right-click > New. In the Result Script box type Player.AddItem PotionSkooma 1. Roxanne gives us a 'sample' during this stage, ya see. cool.gif

Stage 10: Again, right-click > New into the top window. In the lower Log Entry box I've got "I have now been designated as an official member of a very unofficial group. Uh... maybe I should just leave it at that."

4b). Click OK, closing the Quest panel, and save.


5a). Reopen the quest and select its Topics tab. I've currently got a total of six GREETINGs.


GREETING 1: First GREETING is when we initially speak to Roxanne.

Info: So you're the new guy, eh? Want to sell ya some skooma?
.............. Well, you've come to the right place. Thing is, if ya wanna do this on yer own ya can, but I gots the best prices!
'ere, 'ave yourself a sample.

GetIsID NPC: RoxanneBrigette == 1.00 AND
GetStage aaaSkoomaDealer < 10.00


Result Script: SetStage aaaSkoomaDealer 5

Add Topics window: add an initial skooma topic during which buying arrangements are discussed. I've got aaaBuySkooma here. Right-click > Add Topic into the Editor ID (vertical) window and add the initial skooma topic into this window as well. Dialog for this topic will be added later; for now I want to focus on the GREETINGs.

A second topic, a "NO" topic, can be added as well, which can effectively end the entire quest, if desired. "Seems I've wandered into the wrong hovel, no I ain't interested." Add a fourth stage to the Quest Stages page, toggle Complete Quest on, and type StopQuest aaaSkoomaDealer into the Result Script box. This is for those who don't want to become a skooma dealer at all! ... Which might be a silly option to have. Assuming someone follows the instructions to create their own version of this idea, or downloads the skooma dealer mod you've made, why would they install this mod in the first place?

OTOH, options are always nice. The "No" topic can also be used for somebody who simply wants to back out of conversation early, so write the quest this way if desired.


---------------------------------------------------------

GREETING 2: During this GREETING the player returns to Roxanne.

Info: Back for more, eh?

GetIsID NPC: RoxanneBrigette == 1.00 AND
GetStage aaaSkoomaDealer == 10.00


Choices: aaaBuySkooma and a "No" topic can go here. Basically there's choice of inquiring about skooma or backing out of conversation altogether.

Right-click > Add Topic into the Editor ID window and add the No topic.


---------------------------------------------------------

GREETING 3: This GREETING is said by skooma users and outlaws. I decided to split the world into criminals and citizens, basically. Real-life criminals always adhere to "the code", which means they NEVER rat out a dealer. B1tch, don't snitch.


Info: You... ya ... ya got what I need?

Conditions:

GetQuestVariable Quest: 'aaaSkoomaDealer', DoOnce == 0.00 AND
GetInFaction Faction: 'BravilSkoomaDen' == 1.00 OR
GetInFaction Faction: 'BanditFaction' == 1.00 AND
GetIsID NPC: RoxanneBrigette != 1.00 AND
GetStage Quest: 'aaaSkoomaDealer' == 10.00


Copy All those Conditions, so they can be pasted later.


Notice the OR designator between the BravilSkoomaDen faction and BanditFaction. Without OR (if it says AND instead) the game will only allow this GREETING if somebody is in both factions, which is impossible.

Add Topics: Right-click > Add aaaSkoomaDealsTopic1 into this window. Add it into the Editor ID window as well. Dialog for this topic will be written in a few.

Flags: Toggle Random on. This is optional. What this does is makes it so sometimes NPCs will greet us with the sketchy "Ya got what I need?" greeting. Other times they'll say typical generic stuff like "How does the day greet you, friend?" ... Without this toggled on these folks will always use the sketchy greeting, which gets old.


Note: As we can see, I've got it so those addicts in the Skooma Den faction and bandits use this GREETING. My skooma dealer is aligned with bandits, which means he can freely roam their territory; they know who he is. He is also aligned with Conjurers. But, (being smarter and not so overt with their addictions), Conjurers are going to have their own GREETING. Those who follow this guide can come up with their own faction-alliances, of course.

Marauders, I figure, are more interested in mead and wine and beer. They generally abhor skooma and we never see the drug in their lairs, if I recall correct.

Necromancers also are not generally interested in skooma, although there may be some exceptions; they seem a lot more 'religious' than Conjurers, and therefore don't use drugs which cloud their minds. They also will try to kill my dealer on sight! ph34r.gif He's not aligned with them.

-------------------------------------------------------------

GREETING 4: This GREETING is said by middle-class and upper-class citizens of the Empire; those who dwell within law-abiding areas, and it's assumed they sometimes have money. Basically, the NPCs who use this GREETING seem to know who my character is. They might be interested in his product, maybe. The world of the skooma dealer is a tricky one though, as we'll see.


Info: You're a shady-looking sort.

Conditions: Paste the conditions copied for the previous greeting, but make sure to change the OR signifiers to ANDs.

GetQuestVariable Quest: 'aaaSkoomaDealer', DoOnce == 0.00 AND
GetInFaction Faction: 'BravilSkoomaDen' != 1.00 AND
GetInFaction Faction: 'BanditFaction' != 1.00 AND
GetInFaction Faction: 'ConjurerFaction' != 1.00 AND
GetStage Quest: 'aaaSkoomaDealer' == 10.00 AND
GetClothingValue NONE > 20.00



Add Topics: Right-click > Add aaaSkoomaDealsTopic2 into this window. Add it again into the Editor ID window.

Flags: Toggle Random on.


Note: GetClothingValue is a way to distinguish those who theoretically have money from those who don't. I experimented with a value of 10 at first, but beggars (and other lower-class citizens) continued to use this GREETING. 20 weeds these people out. smile.gif

Note 2: It is possible to add another condition, one which tries to determine whether the NPC actually HAS gold in their pockets via GetItemCount. If they do, the quest continues. If they don't, there is no opening dialog. Problem is, most NPCs don't walk around with money. Or if they do, it isn't very much. Adding coin to them on the spot is possible with scripts, but that gets complicated. OBSE scripts might be required for that.

-------------------------------------------------------------

GREETING 5: This GREETING is said by citizens of the Empire; those who dwell within law-abiding areas, but are of a lower class (or pretend they're of a lower class). Not just beggars, but poorer NPCs such as Ursanne Loche.

The NPCs who use this GREETING seem to know who my character is; they might be interested in his product.


Info: Hey. Whatcha got goin' on today?

Conditions: Paste the same conditions, but change the Clothing Value's comparison to reflect poorer clothing choices.

GetQuestVariable Quest: 'aaaSkoomaDealer', DoOnce == 0.00 AND
GetInFaction Faction: 'BravilSkoomaDen' != 1.00 AND
GetInFaction Faction: 'BanditFaction' != 1.00 AND
GetInFaction Faction: 'ConjurerFaction' != 1.00 AND
GetStage Quest: 'aaaSkoomaDealer' == 10.00 AND
GetClothingValue NONE <= 20.00


Add Topics: Right-click > Add aaaSkoomaDealsTopic2 into this window.

Flags: Toggle Random on.


-------------------------------------------------------------------------------

GREETING 6: This GREETING is said by Conjurers in my gameworld. As magicians who pride themselves on how clever they are, they aren't going to appear as openly desperate for drugs with their dialog.


Info: Hmm. I smell something sweet...

Conditions: The conditions from GREETING 3 can be copy-all > pasted, just make sure to get rid of the conditions for BanditFaction and SkoomaDenFaction. The condition for Roxanne is also not needed, since we've eliminated the skooma faction.

GetQuestVariable Quest: 'aaaSkoomaDealer', DoOnce == 0.00 AND
GetInFaction Faction: 'ConjurerFaction' == 1.00 AND
GetStage Quest: 'aaaSkoomaDealer' == 10.00 AND


Add Topics: Right-click > Add aaaSkoomaDealsTopic1 into this window.

Flags: Toggle Random on, and if this is the final GREETING in the list, toggle Random End on as well.


5b). Click OK, closing the Quest panel, and save.


Now, to add a couple things into the gameworld.

OBJECT Window > WorldObjects > Container
6a). Right-click > edit a chest. ChestVendorSam is a great one to start with, since it's got a sample of skooma, lockpicks, poisons, all items valued highly by the underworld.

I named it aaaSkoomaChest and saved as a New Form.

6b). Make sure Respawns stays toggled on. Left-click onto the Count next to skooma and press F2. I changed the number from 1 to 50. I also got rid of all the other potions in Sam's chest because I felt that a lowlife like Roxanne wouldn't dare keep all those items (she'd sell 'em for more skooma). Instead, I dragged a bunch of Leveled Lists into the chest: VendorAlcoholCommon, VendorAlcoholWine, VendorIngredientsFlora, and so on. This way, all the stuff she's got for sale is random, except the skooma! ๐Ÿท

6c). Click OK, saving as a New Form.

CELL window > Bravil Skooma Den
7a). Drag the chest under whatever cell it's going in, so that it's floating in the void. It should be relatively near to Roxanne (or whomever) though, under her feet.

7b). Give the chest a Reference ID. I've got aaaRoxannaChestRef. --- Copy this name and paste it on a Notepad or Wordpad page. Most of all: Make sure Persistent Reference is toggled on!

7c). Click the Ownership tab and change NPC slot from None to whomever. Click OK and save.

Make sure the chest and whoever the merchant is stay in the Render Window, so that both can be accessed.

7d). Now click on the drug lord, or drug lady, while he or she is in the Render Window. So I'm double left-clicking on Roxanne. Select the Merchant Container tab and press the Select Reference in Render Window bar. Now it should be easy to double-click on the chest, and the chest is now referenced when we buy/sell.


Main toolbar > Character > Packages...
8a). Right-click > New into the AI Packages window. Create an ID. I've got aaaDrinkSkoomaPackage. Copy this ID and paste it onto a Notepad page.

8b). Package Type should be Use Item At.

8c). Flags: "Continue if PC is near" and "Skip Fallout Behavior" can both be toggled on. "Must Complete" is optional. The problem with Must Complete is sometimes NPCs can get stuck on this behavior.

Schedule tab: Change Duration from 0 to 1.

Target tab: Select Any Object and find PotionSkooma in the Object ID scroll-bar. Note that this scroll can take a while to pull up.

8d). Count slot should be 1 or 3 or whatever. I assume this is the number of times the NPC uses the item, so if 3 is added, he or she will quaff their bottle three times. ๐Ÿพ



QUEST Window > Topics tab
9a). In the Editor ID window, choose aaaBuySkooma.

Topic Text: Let me see what ya got.

Info: Right, then. You can buy your skooma elsewhere and pay a fortune, but Roxanne's got the best prices in all Cyrodiil...

Conditions:
GetIsID NPC: 'RoxanneBrigette' == 1.00 AND
GetStage Quest: 'aaaSkoomaDealer' == 5.00


Choices: aaaBuySkooma
...................... aaaNo

Result Script: SetStage aaaSkoomaDealer 10


9b). For those who did not finish the "No" topic, here we go.

Topic Text: No, I changed my mind.

Info: Argh, don'cha waste any more of my time!

Conditions:
GetIsID NPC: 'RoxanneBrigette' == 1.00 AND
GetStage Quest: 'aaaSkoomaDealer' <= 10.00


Toggle Goodbye on.

Click OK and save.

9c). Reopen and select the aaaBuySkooma topic again. This topic comes after we've gotten all the initial dialog done, and have established a rapport with the seller.

Topic Text: Let me see what you got.

Info: Great ta see ya again. 'ave yerself a look!

Conditions:
GetIsID NPC: 'RoxanneBrigette' == 1.00 AND
GetStage Quest: 'aaaSkoomaDealer' == 10.00


Result Script (SEE NOTES BELOW): aaaRoxanneChestRef.Activate player, 1

*This 'activate' script will automatically open the skooma chest so we can buy and sell. This is similar to the ShowBarterMenu function used by the GECK. Interestingly, the NPC will stay onscreen while we're shopping, and time does not freeze, which means people continue to walk around in the background. How cool. Why didn't Beth ever use this script for shopping?

Edit: I have gotten this to work with Roxanne, but have had probs with money not being taken/the player getting threatened after "stealing" from the chest, after trying to add the same script to a custom-made NPC I added. So, experiment with this, knowing things could go wrong.


Alright, now the fun really begins. There's going to be dialog, as much dialog as our fingers can type. That Skooma Deals mod I originally had almost always had the same dialog. Those who were inquiring about skooma would say "Hmm, how much?" and then they'd either say "That works for me" if they bought, or "Nah, I'm good" if they didn't buy. The second and third versions of Skooma Deals focused more heavily on how much we sold our product for, and included a heads-up display which added an actual number onscreen, which designated how much of a persuasion chance we had with whichever NPC the PC is looking at. It also completely destroyed how the Persuasion wheel and Barter system worked. Some gamers might think this sounds great, however I'm one of those people who actually like the vanilla systems. Skooma Deals Version 2 and 3 also seemed to conflict with Enhanced Economy. It also wasn't as 'fun' as the dialog and possibilities we can come up with.

It sounds like I'm bashing Skooma Deals, but there are a few features it has which I probably won't be able to replicate, one of these is Addiction. The more we sell to a particular NPC, the more addicted he or she becomes. This causes their behavior and AI to change. The player-character can designate NPCs to sell product, as well, earning even more coin. All of this requires OBSE, as well as some really complicated scripts.

10a). Go back to the 'criminal', sketchy GREETING, which for me is "You... ya.. ya got what I need?" Right-click its Conditions window and select Copy All Conditions.

Now select the aaaSkoomaDealsTopic1. This has already been linked by the "criminal" GREETING created earlier. The idea is there will be roughly a dozen responses which segue from this greeting, okay? Some responses will be favorable, and others not so favorable... In this first example, we've got an enthusiastic YES from a potential user.


10b). Right-click > New into the Info window...

Topic Text: Get your skooma, right here!

Info: Aye sure, gimme a phial.

Conditions: Paste the conditions from the sketchy GREETING into this window, and note that a couple new conditions are being added into the stack.

GetQuestVariable Quest: 'aaaSkoomaDealer', DoOnce == 0.00 AND
GetItemCount Potion: 'PotionSkooma' >= 1.00 AND
GetInFaction Faction: 'BravilSkoomaDen' == 1.00 OR
GetInFaction Faction: 'ConjurerFaction' == 1.00 OR
GetInFaction Faction: 'BanditFaction' == 1.00 AND
GetIsID NPC: RoxanneBrigette != 1.00 AND
GetStage Quest: 'aaaSkoomaDealer' == 10.00


- Select GetItemCount and toggle Run on Target on. This way, the Player-Character is being referenced. If the PC hasn't got any skooma at all, this topic (and most of the other topics) will not show up.

- As can be seen, a GetInFaction has been included for Conjurers, so they can say "Aye sure, gimme a phial" as well.

Result Script:

Set aaaSkoomaDealer.DoOnce to 1
Player.RemoveItem PotionSkooma 1
Player.AddItem Gold001 50
AddScriptPackage aaaDrinkSkoomaPackage


Flags: toggle Goodbye and Random on.


NOTE the DrinkSkooma package. This will cause the NPC who just bought the skooma to immediately start quaffing their bottle! ๐Ÿพ Only criminal types and addicts will do this in my game. Citizens of the Empire are more discreet; I figure they buy their dose and then go home before they suck it.

NOTE 2: The 'Set aaaSkoomaDealer.DoOnce to 1', again, causes the quest's timer script to run, which means after a sale is made it'll take 30 seconds to have a chance for another sale.


10c). Right-click > Copy All Conditions (all six of them).


10d). Next response is going to be a "no". Note that it shares the same "Get your skooma, right here" Topic Text as the response above.

Info: Nah, I think I'm good.

Conditions: Paste the conditions which were Copy All'd up above in Step 10c.

Result Script: Set aaaSkoomaDealer.DoOnce to 1

Flags: toggle Goodbye and Random on.


10e). This response is another positive sale, identical to the first response, except the Response text is "Ah. Sweet moon sugar..." .... Everything else, the conditions, the toggles, the scripts, all of that is the same. This second response is therefore only so the NPC says something different from "Aye sure, gimme a phial."


10f). The fourth response is going to be another "no", but the NPC goes out of his or her mind, angrily accusing my dealer.

Info: NO! GET AWAY WITH THAT GARBAGE, SNAKE!

.... Everything else, the conditions, the toggles, the Set aaaSkoomaDealer.DoOnce script, all of that is the same. So we've got a yes, a no, a yes and a no, all four responses randomly and possibly said by the same criminal elements of society. So now it's time to mix things up a bit.

Actually, add a Result Script like so: ModDisposition Player - 10 to that last "no" response, so the NPC now likes our character a little less. dry.gif

10g). Next response is going to be another "no", however the outlaw NPC doesn't just want to make a fair purchase. Again, this shares the same "Get your skooma right here" Topic Text.


Info: How about you give me one of them fer free?
....... Or... give me some coin, mate, gimme ALL yer coin! indifferent.gif

Flags: toggle Goodbye and Random on.

Conditions: Copy All these after they've been arranged.

GetQuestVariable Quest: 'aaaSkoomaDealer', DoOnce == 0.00 AND
GetIsSex Male == 1.00 AND
GetInFaction Faction: 'ConjurerFaction' == 1.00 OR
GetInFaction Faction: 'BanditFaction' == 1.00 AND
GetStage Quest: 'aaaSkoomaDealer' == 10.00



- Note that GetItemCount PotionSkooma is not needed for this to show up. There's a reason, as we'll see.

- The conditions up above also don't include the Skooma Den faction (I figure they're too docile and spaced out), nor is Roxanne needed to be canceled, since only males will attack my dealer. huh.gif Yeah, that's right, it's possible my skooma dealer can be attacked, as we'll see in a moment.

Choices: Right-click > Add Topic. I've got aaaGiveSkoomaTopic and aaaNo for choices.


10h). Add aaaGiveSkoomaTopic into the Editor ID window. The idea is: my dealer gives a free phial to the guy threatening him.

Topic Text: I'll give you a free sample, don't hurt me!

Info: Ah, that's the way I like it!

Result Script: Player.RemoveItem PotionSkooma 1
................... Set aaaSkoomaDealer.DoOnce to 1


Flags: toggle Random and Goodbye.

Conditions: Paste the conditions just copy-all'd.

GetQuestVariable Quest: 'aaaSkoomaDealer', DoOnce == 0.00 AND
GetItemCount Potion: 'PotionSkooma' >= 1.00 AND
GetInFaction Faction: 'ConjurerFaction' == 1.00 OR
GetInFaction Faction: 'BanditFaction' == 1.00 AND
GetStage Quest: 'aaaSkoomaDealer' == 10.00




Also, make a second response under this same 'free sample' topic.

Info: A-ha-ha-ha!! Fool'd ya! How about I STILL take all your stash, and your coin!

Result Script: Player.RemoveItem PotionSkooma 1
.......................... AddItem PotionSkooma 1
..........................SetAV Aggression 50
........................ StartCombat Player


Flags: toggle Goodbye, Random, and Random End.

Conditions: Paste the same conditions copy-all'd earlier.

The usual Result Script which delays chance of another sale is not needed, as we'll hopefully be too busy trying not to get our ass kicked!


Note: The AddItem PotionSkooma adds a bottle to whomever the PC is talking to. This way, we can get our skooma back after we've pwned our attacker!


10i). The steps above assumes the dealer has a bottle of skooma to give. What happens if he doesn't?

Right-click > New into the same Info window...so the "I'll give you a sample" topic is shared with this new response.

Info: Huh, what is this? You ain't got no skooma!
....Don't you dare filch on me! You gonna git what's comin' to ya now!

Result Script: SetAV Aggression 50
........................ StartCombat Player


Flags: toggle Goodbye.

Conditions: Paste the same ones, making a change to GetItemCount's comparison value.

GetQuestVariable Quest: 'aaaSkoomaDealer', DoOnce == 0.00 AND
GetItemCount Potion: 'PotionSkooma' < 1.00 AND
GetInFaction Faction: 'ConjurerFaction' == 1.00 OR
GetInFaction Faction: 'BanditFaction' == 1.00 AND
GetStage Quest: 'aaaSkoomaDealer' == 10.00



10j). Select aaaNo in the Editor ID window. The scenario here is similar to if we haven't got any skooma. Basically, we say "NO" to the guy taunting us, which causes him to attack.

Info: NO?!? We'll just see about that, skooma dealer!

Result Script: SetAV Aggression 50
........................ StartCombat Player


Flags: toggle Goodbye.

Conditions:

GetQuestVariable Quest: 'aaaSkoomaDealer', DoOnce == 0.00 AND
GetInFaction Faction: 'ConjurerFaction' == 1.00 OR
GetInFaction Faction: 'BanditFaction' == 1.00 AND
GetStage Quest: 'aaaSkoomaDealer' == 10.00



10k).Click OK, closing the Quest panel, and save.

I made 6 more responses: three of them "yeses" and three extra "nos". One of the yes responses is only said by females: after she makes her purchase she starts flirting with my dealer and even follows him around for a bit (AddScriptPackage aaaFollowPlayerPackage). wub.gif I added some choices to make her follow around or not. If we don't allow her to follow there's a ModDisposition Player -40 script.

Another Yes makes NPCs lose Fatigue and fall to the ground after they suck their purchase (ModAV Fatigue -50). One of the Nos makes an NPC lecture my character, even though the NPC is an outlaw. ๐Ÿค  I also made Yes responses specifically for the beasts: one for Khajiit and one for the lizards.

None of the no responses are as dramatic as the fight scenario above, because I want this scenario to happen more rarely than the others. HOWEVER, note that some Khajiit bandit NPCs will still randomly try to attack my dealer. Some of them pick up the "This is a hold-up, and it over, or DIE!" threat, even if they're not Khajiit Highwaymen. Which adds to the unpredictable nature of playing a skooma dealer, of course.


11a). Open the quest, go to its Topics tab, and select aaaSkoomaDealsTopic2. This is the topic used by citizens, and others who dwell within lawfully-abiding areas. Most of these are "no" responses, since most citizens are not users of skooma. So my dealer's only going to sell to these folks in a more cautious, sometimes experimental, manner. Because there are more consequences if trying to go this route. Disposition also becomes a factor at times, as some citizens are unsure if they'd like to cross that line into illegal behavior.

However, more money can be made per sale. 60 to 70 gold instead of 50 or less, gained from outlaws, especially amongst those whose Clothing Value is over 20. Note that the GREETING which leads to this set of responses tends to weed out a good number of customers who haven't got the money.

Right-click > New into the Info window.

Topic Text: You look weary. Have a look at this.

Info: Hmm, I like what I see!

Result Script: Set aaaSkoomaDealer.DoOnce to 1
Player.RemoveItem PotionSkooma 1
.................. Player.AddItem Gold 60


Flags: toggle Goodbye and Random on.

Conditions:

GetQuestVariable Quest: 'aaaSkoomaDealer', DoOnce == 0.00 AND
GetItemCount Potion: 'PotionSkooma' >= 1.00 AND
GetDisposition Reference: [TARGET] > 40.00 AND
GetInFaction Faction: 'BravilSkoomaDen' != 1.00 AND
GetInFaction Faction: 'ConjurerFaction' != 1.00 AND
GetInFaction Faction: 'BanditFaction' != 1.00 AND
GetStage Quest: 'aaaSkoomaDealer' == 10.00 AND
GetClothingValue NONE > 20


- Make sure to toggle Run on Target on for the GetItemCount.
- Note Disposition is involved. This response only shows up if the citizen is comfortable around my dealer.


11b). Copy All Conditions so they can be pasted for the next response.


11c). The next response is a "no". Right-click > New into the Info window.

Info: NO! Get AWAY from me, FILCHER!!!

Result Script: ModDisposition Player -40
.................. Set aaaSkoomaDealer.DoOnce to 1


Flags: toggle Goodbye and Random on.

Conditions:

GetQuestVariable Quest: 'aaaSkoomaDealer', DoOnce == 0.00 AND
GetItemCount Potion: 'PotionSkooma' >= 1.00 AND
GetInFaction Faction: 'BravilSkoomaDen' != 1.00 AND
GetInFaction Faction: 'ConjurerFaction' != 1.00 AND
GetInFaction Faction: 'BanditFaction' != 1.00 AND
GetStage Quest: 'aaaSkoomaDealer' == 10.00 AND
GetClothingValue NONE > 20


Note: Disposition is no longer a factor; it doesn't matter if they like our character, all that matters is they HATE skooma.

GetClothingValue is still present. Only higher-brow sorts are going to make a scene.


11d). Here we have another "Yes", however there's a catch, as now we're talking to someone who hasn't got as much money.

Info: Ah, that looks good. Afraid I can't afford your price, though.

Result Script:

Flags: toggle Random on.

Conditions: Copy All the conditions below after they've been set up.

GetQuestVariable Quest: 'aaaSkoomaDealer', DoOnce == 0.00 AND
GetItemCount Potion: 'PotionSkooma' >= 1.00 AND
GetInFaction Faction: 'BravilSkoomaDen' != 1.00 AND
GetInFaction Faction: 'ConjurerFaction' != 1.00 AND
GetInFaction Faction: 'BanditFaction' != 1.00 AND
GetStage Quest: 'aaaSkoomaDealer' == 10.00 AND
GetClothingValue NONE <= 20


Choices: Right-click > Add Topic. Two choices can be added here: aaaReducedSaleTopic and aaaSaleRefusalTopic


11e). Right-click > New into the Editor ID window, and add those two topics.

11f). Let's start with the Reduced Sale topic. Two Infos are needed here. In the first one, the NPC agrees to a lowered price. In the second, he or she declines the sale.

Topic Text: How about half price? 30 gold?

Info: Ah, that'll be just the thing.

Result Script: Set aaaSkoomaDealer.DoOnce to 1
Player.RemoveItem PotionSkooma 1
.................. Player.AddItem Gold 30


Flags: toggle Goodbye and Random on.

Conditions: paste the conditions from 11d, although the GetItemCount is no longer needed.

GetQuestVariable Quest: 'aaaSkoomaDealer', DoOnce == 0.00 AND
GetInFaction Faction: 'BravilSkoomaDen' != 1.00 AND
GetInFaction Faction: 'ConjurerFaction' != 1.00 AND
GetInFaction Faction: 'BanditFaction' != 1.00 AND
GetStage Quest: 'aaaSkoomaDealer' == 10.00 AND
GetClothingValue NONE <= 20


Obviously, too many reduced sales are not a good thing. In my gameworld Roxanne charges 23 gp for each bottle of skooma, meaning my dealer only makes 7 gp for this sale.

I also made a second "poor person" topic, this time they agree to spend 40.


11g). If the NPC declines purchase...

Topic Text: (this is shared with the dialog in 11f above).

Info: Nah, think I'll pass. Gotta come up with some coin for me children!

Result Script: Set aaaSkoomaDealer.DoOnce to 1

Flags: toggle Goodbye, Random on, and Random End on.

Conditions: The same conditions are used from the response above.


11h). Select the 'sale refusal' topic, aaaSaleRefusal. This is the choice the PC makes if they decide not to sell to this poorer soul.

Topic Text: Can't do that, sorry. Maybe next time.

Info: I'll be off, then.

Result Script:

Flags: toggle Goodbye.

Conditions: Same as above in 11d, 11e, and 11f

GetQuestVariable Quest: 'aaaSkoomaDealer', DoOnce == 0.00 AND
GetInFaction Faction: 'BravilSkoomaDen' != 1.00 AND
GetInFaction Faction: 'ConjurerFaction' != 1.00 AND
GetInFaction Faction: 'BanditFaction' != 1.00 AND
GetStage Quest: 'aaaSkoomaDealer' == 10.00 AND
GetClothingValue NONE <= 20


Click OK and save. Reopen the quest's Topics tab, and


11i). Select aaaSkoomaDealsTopic2. Right-click > New into the Info window. Okay, this next response is THE one any skooma dealer dreads.

Info: NO, and I'm calling the guards at you, you menace.
GUARDS!!!! COME QUICK COME QUICK, WE'VE GOT A SKOOMA MERCHANT ON THE PREMISES!!!

Result Script: Set aaaSkoomaDealer.DoOnce to 1
................... Player.ModCrimeGold 40
................... ModDisposition Player -40


Flags: toggle Goodbye and Random on.

Conditions: paste the same conditions copy-all'd from Step 11b, but remove the GetDisposition.

GetQuestVariable Quest: 'aaaSkoomaDealer', DoOnce == 0.00 AND
GetItemCount Potion: 'PotionSkooma' >= 1.00 AND
GetInFaction Faction: 'BravilSkoomaDen' != 1.00 AND
GetInFaction Faction: 'ConjurerFaction' != 1.00 AND
GetInFaction Faction: 'BanditFaction' != 1.00 AND
GetStage Quest: 'aaaSkoomaDealer' == 10.00 AND
GetClothingValue NONE > 20


- Only the higher-brow types are going to call the guards. In my real-life experience, those with less money would rather not cause such a fuss because they sometimes fear retaliation from gangs.

Note: ModCrimeGold is only adjusted upward by 40, which might not seem enough. Guards are not going to try to arrest the PC if their CrimeGold is only 40, not unless we speak to them directly. So make this higher, if desired. Thing is, my dealer has already racked up quite a few of these charges. As I type this, he's already edging near to 500, which is the mark when guards WILL come after us, "STOP RIGHT THERE CRIMINAL SCUM!"



11j). Disposition makes a factor for this next one. Again, all of these responses stem from the "You look weary..." Topic Text.

Info: Not interested. And I don't like your kind!

Result Script: Set aaaSkoomaDealer.DoOnce to 1

Flags: toggle Goodbye and Random on.

Conditions:

GetQuestVariable Quest: 'aaaSkoomaDealer', DoOnce == 0.00 AND
GetItemCount Potion: 'PotionSkooma' >= 1.00 AND
GetDisposition Reference: [TARGET] <= 40.00 AND
GetInFaction Faction: 'BravilSkoomaDen' != 1.00 AND
GetInFaction Faction: 'ConjurerFaction' != 1.00 AND
GetInFaction Faction: 'BanditFaction' != 1.00 AND
GetStage Quest: 'aaaSkoomaDealer' == 10.00


- Make sure to toggle Run on Target is on for the GetItemCount.


11k). I've also got a couple of "No" responses which haven't got anything to do with Disposition or Clothing Value. They're just negative responses from folks who generally aren't interested, without any morality factoring in.


11l). This next response is from potential buyers who are "on the fence". Note that the Persuasion mini-game is going to be needed for these folks.

Info: Hmm, I am interested. Tell me a little more. (Disposition is below 40).

Result Script:

Flags: toggle Random on.

Conditions:

GetQuestVariable Quest: 'aaaSkoomaDealer', DoOnce == 0.00 AND
GetItemCount Potion: 'PotionSkooma' >= 1.00 AND
GetDisposition Reference: [TARGET] < 40.00 AND
GetInFaction Faction: 'BravilSkoomaDen' != 1.00 AND
GetInFaction Faction: 'ConjurerFaction' != 1.00 AND
GetInFaction Faction: 'BanditFaction' != 1.00 AND
GetStage Quest: 'aaaSkoomaDealer' == 10.00


GetClothingValue is not on in my game, but this can be added if desired.


11m). Right-click > Add Topic into the Add Topics window (NOT the Choices window). Make a new topic. I am calling this one aaaExplainSkoomaTopic. Add the aaaNo topic into this window as well.

Choices forces us to make a choice during this section, whereas Topics do not. Therefore, it's possible to play the Persuasion mini-game at this point in an attempt to boost the potential customer's confidence. Another option is, of course, to choose "No" or back out of conversation altogether.

11n). Right-click > New into the Editor ID window and add the "explain" topic. During this step the dealer tries to convince the potential customer to buy a bottle, and for this first portion, is successful. This step assumes the player has played the Persuasion game, and Disposition is 40 or above.

Topic Text: Let me talk about my, uh, 'product'.

Info: Aye, I'll take one, then. Just... be quick about this.

Result Script: Set aaaSkoomaDealer.DoOnce to 1
...................Player.RemoveItem PotionSkooma 1
.................. Player.AddItem Gold 60


Flags: toggle Goodbye and Random on.

Conditions:

GetQuestVariable Quest: 'aaaSkoomaDealer', DoOnce == 0.00 AND
GetItemCount Potion: 'PotionSkooma' >= 1.00 AND
GetDisposition Reference: [TARGET] > 39.00 AND
GetInFaction Faction: 'BravilSkoomaDen' != 1.00 AND
GetInFaction Faction: 'ConjurerFaction' != 1.00 AND
GetInFaction Faction: 'BanditFaction' != 1.00 AND
GetStage Quest: 'aaaSkoomaDealer' == 10.00


11o). Right-click > New into the same Info window shared by "Let me tell you about my product." This dialog is used if the NPC's disposition has not been boosted highly enough.

Topic Text: Let me talk about my, uh, 'product'.

Info: Hmm, I'm not convinced. I'll be off, then.

Result Script: Set aaaSkoomaDealer.DoOnce to 1

Flags: toggle Goodbye on.

Conditions:

GetQuestVariable Quest: 'aaaSkoomaDealer', DoOnce == 0.00 AND
GetItemCount Potion: 'PotionSkooma' >= 1.00 AND
GetDisposition Reference: [TARGET] < 40.00 AND
GetInFaction Faction: 'BravilSkoomaDen' != 1.00 AND
GetInFaction Faction: 'ConjurerFaction' != 1.00 AND
GetInFaction Faction: 'BanditFaction' != 1.00 AND
GetStage Quest: 'aaaSkoomaDealer' == 10.00



11p). Finally, we need dialog for when the NPC's Disposition has been boosted high enough, yet they've decided they're not interested.

Info: No, I don't think I want any. Sorry to have wasted your time.

Result Script: Set aaaSkoomaDealer.DoOnce to 1

Flags: toggle Goodbye, Random, and Random End on.

Conditions:

GetQuestVariable Quest: 'aaaSkoomaDealer', DoOnce == 0.00 AND
GetItemCount Potion: 'PotionSkooma' >= 1.00 AND
GetDisposition Reference: [TARGET] > 39.00 AND
GetInFaction Faction: 'BravilSkoomaDen' != 1.00 AND
GetInFaction Faction: 'ConjurerFaction' != 1.00 AND
GetInFaction Faction: 'BanditFaction' != 1.00 AND
GetStage Quest: 'aaaSkoomaDealer' == 10.00



11q). Click OK and save. For now, here is the final response, and this one's going to potentially be used by shopkeepers, innkeepers, or any NPC who owns the cell my dealer is in. This response goes under the "You look weary..." topic. Again we've got an angry response, aimed at making a large fuss, and causing a scene.

Info: Listen, I don't like the likes of you, coming into our establishments, our homes, our places of business.
I can't change the law, but I can banish you from here! ...DO NOT return with your foul peddlings, dealer!

Result Script: Player.ModCrimeGold 40
................... SendTrespassAlarm PlayerRef


Flags: toggle Goodbye, Random, and Random End on, assuming this is the last random response of the list.

Conditions:

GetQuestVariable Quest: 'aaaSkoomaDealer', DoOnce == 0.00 AND
IsInMyOwnedCell NONE == 1.00 AND
GetItemCount Potion: 'PotionSkooma' >= 1.00
GetStage Quest: 'aaaSkoomaDealer' == 10.00


Now we've got a problem! During Step 11i the NPC called for the guards, but this was mostly a bunch of hot air. Unless the dealer's CrimeGold was about to tip over 500, such a threat is harmless. In THIS scenario however, the site's owner is able to actually charge the dealer with a viable crime. For those who've never trespassed in this game, be aware that we've only got a few seconds to vacate the premises, otherwise a guard will show up. "STOP RIGHT THERE..." bla bla bla. ๐Ÿ‘ฎ๐Ÿฟโ€โ™€๏ธ

Because of responses like this, my dealer is really aware of whom he tries to peddle his wares to. Consequences! It only takes one time hearing a warning like this, and the temptation to try selling to another cell-owner falls to just about nil.

Hmm, one more. This one will require another AI package, but this time the NPC's not gonna be sucking skooma.

Main toolbar > Character > Packages
11r). Right-click > New into the Ai Packages window.

ID: aaaNineDivineMagicPackage (copy this and paste it somewhere).

Package Type: Cast Magic

Flags: Continue if PC is Near, Must Complete, Skip Fallout Behavior

Schedule tab
Duration: 1

Location tab: Toggle Location on, select Near Reference
Ref: 'Player' 'PlayerRef'

Target tab: Click Target. Toggle 'Any Object' on.
Object ID: StandardRestoreHealthTarget2Apprentice

Count: 3

-- StandardRestoreHealthTarget2Apprentice is basically Convalescence. In effect, the chapel dweller is now trying to HEAL our toon. โœ

The Object ID scroll-bar is notoriously aggravating to narrow our toward intended object, as there are a zillion objects in this bar. Be patient!


11s). So one final Response Text, last one, I promise. This one's gonna be said by Holier-than-Thou types, literally. Again, it falls under the "You look weary..." i.e., aaaSkoomaDealsTopic2.

Info: Sir, no, and I advise you to change thy wicked ways. For it is folks like ye who threaten to befoul the grand splendor that is Cyrodiil.


Result Script: Set aaaSkoomaDealer.DoOnce to 1
................... AddScriptPackage aaaNineDivineMagicPackage


Flags: toggle Goodbye on.

Conditions:

GetQuestVariable Quest: 'aaaSkoomaDealer', DoOnce == 0.00 AND
GetItemCount Potion: 'PotionSkooma' >= 1.00 AND
GetInFaction Faction: 'NineDivines' == 1.00
GetStage Quest: 'aaaSkoomaDealer' == 10.00


The NPC will begin throwing magic at our dealer, problem is, he or she might not stop until some other scheduled AI package kicks in. To make this behavior only work for a few seconds, go to the main script (Quest Data page) and add the following line into the upper portion of the script

short aaaDoOnce5 ;makes sure Nine Divines NPCs won't keep casting spells at us.

Save close. Reopen. Add this set of code below the timer code already in the script.

If (DoOnce5 == 1) && (Timer < 30)
Set Timer to Timer + GetSecondsPassed

EndIf

If (aaaDoOnce5 == 1) && (Timer >= 15)
Set DoOnce5 to 0

Set Timer to 0
EndIf


All of that goes into the same GameMode block as the original DoOnce timer.

... Now, return to the 'Nine Divines' dialog from before, in the Topics tab. In the Result Script box, add the following code around the existing AddScriptPackage line....

If (aaaSkoomaDeals5.DoOnce == 0)
AddScriptPackage aaaNineDivineMagicPackage
EndIf



11t). And that about wraps it up for today's lesson on how to create a skooma dealer. There are other things we can try to implement while rolling with this idea, but that's plenty for now. Ciao!

------------------------------------------------------------------------

Let me give a shoutout to some other skooma mods

1). Jadrax Illegal Skooma: Puts a 'stolen' tag on most examples of skooma in the game. If a guard sees us picking up a bottle, it's a crime. Skooma also gets confiscated when arrests occur.

The skooma mod idea in this post should go beneath Jadrax Illegal Skooma. Otherwise, JIS will try to enforce its own pricing; skooma will probably not be as cheap to buy, etc.


2). Skooma Smokeable Pipe: Adds a smoking pipe which automatically goes into the PC's inventory, very professionally done. My dealer can be seen smoking the pipe in this picture.

There are a number of other skooma mods at THE Nexus: some of them add addiction, others add skooma dens and the ability to craft our own drugs. I haven't tried any of them, but some do look worth looking into.


3). Crowded Roads Revisited -- Adds random travellers to the roads of Cyrodiil. Is customizable through an .ini file, so we can make some roads less full of people than others. There are dozens of mods like this one. I like Crowded Roads because it adds plenty of random NPCs to sell to.

This post has been edited by Renee: May 21 2024, 10:57 PM


--------------------
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Renee
post Dec 25 2023, 12:24 AM
Post #102


Councilor
Group Icon
Joined: 19-March 13
From: Ellicott City, Maryland



Fixing the ;CODE NOT LOADED error. Game: TES V: Skyrim, Legendary Edition

When trying to view scripts in the CK sometimes we'll see ;CODE NOT LOADED in the boxes and windows where scripts and fragments should be. This can happen with mods, but it also occurs with Bethesda's official DLC: Hearthfires, Dawnguard, and Dragonborn. Because of this, we cannot just view or alter the scripts associated with these add-ons.

The reason: the CK is trying to peer into the Data > Scripts folder, and also the Data > Scripts > Source folder, looking for script files associated with whatever particular mod or DLC being worked on, but guess what? The script files aren't there. ๐Ÿ’ก Codes aren't getting loaded where they should be. These 'script files' include .pex files in the Data > Scripts folder, and/or .psc files in Data > Scripts > Source.

There are are a couple ways to attempt fixing ;CODE NOT LOADED. First question: does the mod or DLC have a .bsa file?

-If not, there is no BSA and the .pex and .psc files definitely are not packed into a BSA (instead they are loose), you can try following this foul-mouth lady's tutorial. Her 'fix' is the more-popular one I found as I spent hours searching; there are other sites which teach the same lessons as her vid. It involves backing up (copy>pasting) the entire Scripts folder (including the Source folder inside of the Scripts folder) into a safe place, and then deleting these folders from the Data folder. blink.gif Yeah. Scary. Once that is done however, next step is to right-click Scripts.rar (which is an archive in the Data folder, hopefully it's there) and then Extract Here all the content from this .rar file, so that all its content gets extracted into Data. Once this is done, the scripts folder which was backed-up can be copy-pasted back in.

However, this didn't work for me. rolleyes.gif So I had to continue searching for a fix. Good thing is, I'm putting the results of my searching into this post. Hopefully saving somebody out there from going mad. panic.gif

-If yes, there is a BSA associated with the mod (this includes all three of Skyrim's official DLCs!), chances are all the scripts are locked inside of it.


The reason BSAs are used is to keep things tidy. There's usually a lot of files packed into BSAs. If all of these files were loose, the Data folder, and many of its sub-folders would be hella cluttered.

However, we're going to need to make at least some of these files loose. And for this, a BSA unpacking program is required. So continue to step 1a if the BSAs need to be unpacked, for anyone who doesn't know how to do this, yet. If the files are already loose, go to step 2a.

If you don't already have a BSA program, BSA Unpacker can be tried. It is not the one I am describing how to use below; I have no idea where I found the BSA program I've been using. However, these sort of programs can generally be placed anywhere, they don't typically need to be in any of the Skyrim folders, unless you want it there.

I am going to describe working with a mod, but this lesson applies to DLC too. I am also going to describe working with the BSA unpacker I've got, which may be different from other programs out there.


1a). Double left-click on the BSA unpacker, opening the program.

1b). Click Open, and follow the folder path to where the .bsa file is. So for this example I am going into Skyrim > Data and highlighting Helgen Reborn.bsa and clicking Open.

1c). Click Extract all. This opens the Browse For Folder panel.

1d).. It is possible to place this content straight into the Data folder, but a better idea might be to put it into a folder which is completely separate from the Skyrim megatroplis of folders, just to test and make sure everything {all the folder paths contained in the BSA} structure where they should. On my computer I've got C:\Users\Renee\Desktop\Unzipping Folder.

1e). Click OK. As stated, I just dumped everything outside of Skyrim > Data, just to see what happens. Having a look, I can see the BSA program unpacked all sorts of stuff, including additional folders such as Meshes and Textures. But I'm not interested in those, I'm only trying to mess with Scripts. So I kept the Scripts folder, and deleted all the others.

Anyway, if everything looks good, now you can either return to 1c and put everything directly into Data, OR you can merely copy/paste only the content which is needed from the 'safe' folder, into Data. ๐Ÿ˜Ž Either way, don't delete the script files which were just copied into the Data folder. Not just yet. Keep them where they are (which should be the Scripts folder they've been extracted from).


NOW... try opening the Creation kit to the mod or DLC being worked on, and get into one of its quests. Is it still saying ;CODE NOT LOADED? If not, if there are now actual scripts and script fragments, great!

But... mad.gif If ;CODE NOT LOADED is still the norm, chances are there are still some files missing. kvright.gif Which is what happened to me. There were plenty of .pex files (which are the scripts the actual game looks at) but without any corresponding .psc files (which are what are what we view and manipulate in the Creation Kit).

Continue to Step 2a. This does get complicated, just so ya know.


2a). Two or three additional programs are needed, all of which can be found at THE Nexus.
> First needed program is Papyrus Assembler GUI. Follow the instructions included on its DESCRIPTION page. If done correctly, there should be a new folder in the Data folder called "Processors". There should also be two folders inside of Processors: Creation Kit and Champollion, and maybe a half-dozen or so files inside these folders.

>> Second needed program is Champollion a PEX to Papyrus decompiler. Again, follow its instructions. There are 32 bit and 64 bit versions available. I've got the 32 bit version, which I assume works best with Legendary Edition (LE) Skyrim.

For anyone who is familiar and confident with using the command prompt window, these folks probably won't need the rest of this tutorial. But I am not so familiar, or confident! So...

>>> Champollion Graphical User Interface is an executable which opens an easy-to-use set of panels and windows, just like any typical PC computer program. ๐Ÿ–ฅ Champollion GUI should go into the same folder as the other Champollion files (Data > Processors > Champollion).


That final program is incredibly user-friendly (Endorsed) and the mod author even made a YouTube just in case of further confusion. However, I am going a step further, and including my OWN instructions below. Because there were still a couple things I was confused about. For instance, the video-maker did not use his actual Skyrim directory. *sigh* Which left a few questions, for me at least.


3a). Go into the Skyrim > Data > Processors > Champollion folder and open the ChampollionGUI. Champollion Interface panel should leap forth.

Tip: Clicking the Help button opens up the program's readme, for anyone who wants to get the mod-author's official instructions.

3b). Again, it's a good idea to firstly experiment with a folder which is outside the Skyrim folder path. Plus it's just tidier to work this way while testing. Again I'm using C:\Users\Renee\Desktop\Unzipping Folder. The Scripts folder from step 1e is still there, with all those .pex files inside of it.

However, now I'm realizing that there is no Source folder inside of the Scripts folder! huh.gif Which means there are no .psc files. And this is because (get this) sometimes mod authors do not include .psc files. And why not? From what I've gathered, they don't include .pscs because they don't want their work to be as accessible. Or maybe they're paranoid. Who know?

3c). Since I am trying to mess with scripts, I went into my Unzipping Folder > Scripts and right-click > New'd a Source folder.

3d). Return to Champollion GUI. Click on the Scripts Folder (.pex): button, which is on the far right of the panel. Go to whatever temporary folder path you're using. For me, this is (again) C:\Users\Renee\Desktop\Unzipping Folder\Scripts.

3e). Click the "Output Source in Different Location" toggle on. This allows the Source Destination to get used.

3f). Use the Source Destination button to put the reassembled .pex files into a different location. I've got C:\Users\Renee\Desktop\Unzipping Room\Scripts\Source. Click OK.

3g). Toggle "Generate Assembly" on. Toggle "Output Assembly in Different Location" as well. Both of these need to be toggled. Select the same path as found in step 3f, which (again) for me is C:\Users\Renee\Desktop\Unzipping Room\Scripts\Source.

3h). Toggle Generate Comments on. This adds comments from the Champollion program directly into various locations of the scripts, which is rather nifty. OTOH, some scripters might not want extra comments, they tend to clutter up the scripts.

3i). Press the Run... button. Select Yes. Watch your monitor screen go nuts... ๐Ÿ“บ

If there a lot of files to process it'll take a few seconds, perhaps more than a minute. The program is automatically opening Command Prompt windows over and over. .pex files get converted into .pscs, but I've also noticed the program introduces a third type of script files: .pas files.

3j). If there are no errors, the pop-up window only gives one option: Click OK.

Check that the .pex files (in the Scripts folder) have been converted to .psc files (in the Scripts > Source folder). If so, copy-paste all of this into the Data folder. Yes To All, if you're overwriting scripts which were placed in an earlier step.


4). Start the Creation Kit. Open the mod or DLC. Open one of its quests. Hopefully ;CODE NOT LOADED is no longer showing up. ๐Ÿท

This post has been edited by Renee: Apr 10 2024, 05:31 PM


--------------------
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Renee
post Dec 27 2023, 02:25 AM
Post #103


Councilor
Group Icon
Joined: 19-March 13
From: Ellicott City, Maryland



Zoinks! You've taken a wrong turn!

Ugh. I'm guessing that many of us who've used Imgur have seen this annoying message. All we want to do is access our precious screenshots, yet *Zoinks!*, things now slow to a stop.

This tutorial assumes you're already logged into the Imgur website and it's not a 100% fix which works every time. But try it if you're desperate.


1). Type https://imgur.com/user/X with "X" being your username, into the URL slot. So I'm typing https://imgur.com/user/xenaclone. The Zoinks! message only seems to show up if I'm trying to look at my screenies.

2). Press the "button" on the top-right of the page. This button is actually your profile pic, or if you haven't chosen a profile pic, a single initial will be there. Since my username is Xenaclone there will be a large X in the top right. Left-click this. If your computer has Windows 10 or newer, continue to step 3. If it's OS is older (Windows 8 or older) go to Step 5.

3). At the top left of the page is the imgur icon with a down arrow next to it. Click the down arrow > need help?

4). Press the Known Issues button. There should be a "How do I switch to the old design?" choice. Sometimes the solution it says is not even necessary, we can simply press the imgur toolbar icon and it'll immediately change to the original design.

-------------------------------------------------------------------------

5). Older operating systems (Windows 8 or older): there should be a link on the LOWER RIGHT side of the page which says Use Old Design. Left-click on this and fill out their silly little survey. I just selected "The New Design is too buggy." rolleyes.gif

After all of this the site logged me off. But after logging back in I was able to access my pictures. ๐Ÿ–ผ You're welcome.

---------------------

4/7/2024: To anyone out there following the above tutorial keep in mind my opinion, and the opinion of plenty others: IMGUR F'ING SUCKS!!! I've gone back to Photobucket because I hate the way Imgur's supposedly direct links pull up the entire Imgur website when clicking on picture links, instead of pulling just the actual image, even if we paste the entire Direct Link ("i.imgur") URL. It's a waste of 7 to 10 seconds of time, which is annoying and unnecessary. There are other issues people have with Imgur (<--- some profanity, you've been warned), but the picture-link issue is my pet peeve.

I realize Photobucket also sucks in its own way, especially for those who don't play PB's fee. An alternative is Postimages.org

This post has been edited by Renee: Apr 10 2024, 06:20 PM


--------------------
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Renee
post Dec 31 2023, 09:35 PM
Post #104


Councilor
Group Icon
Joined: 19-March 13
From: Ellicott City, Maryland



Timers. Game: TES V: Skyrim

Happy New Year! And it's a very happy one for me. Because I finally figured how to make a working timer script for this game, after struggling without a tutorial, and only half-baked answers at Nexus and in Reddit threads.

Timer scripts are used to measure hours or days in the game. Just like in earlier games, once a timer gets triggered it'll count time silently. Once the timer's count concludes X happens. X being a quest stage advancing, a variable being moved toward a certain value, an object enabling. Whatever is desired. โŒ›

There are multiple ways to set these up, I am merely posting the simple method which worked for me. No quest stages, no dialog, only the basic quest, and its script. I am going to pretend to set a quest stage though. This sort of timer script can either be attached directly to a typical quest (which handles dialog, for instance), or it can work remotely as a standalone, influencing a seperate quest, a "host" quest if you will.


Object Window > Character > Quest
1). Right-click > New, starting a new quest.

ID: aaaTimerQuest
Priority: 0

Timers don't need priority if working remotely, because they'll be getting triggered by some other quest which does have a higher rating. If this script is being added to a normal quest though (locally) a higher Priority can be chosen.


Start Game Enabled: On
Run Once: Optional

It is possible to just use only THE information above on the Quest Data page, which is as basic as timers get.

2). Click OK, closing the quest window, and reopen it. This is so all those extra tabs show up.

3). Select the Scripts tab. Right-click > Add Script into the window.

4). Double left-click on [New Script] and give the script a name. I am calling it aaaTimerScript. The script appears in the window as a blue + icon.

5). Right-click onto the script's name > Edit Properties (or simply highlight the script name and press the Properties button).

6). Press Add Property. First property added is like so...
Type: Float
Name: Hours


Click OK, closing the Add Script Property panel.

7). Highlight the property and select Edit Value button. If the timer is standalone, if it is being used to influence a host quest, then 0 can be used as the Value. This means zero hours. Presumably the host will have a higher Value. Want just one hour to pass before something occurs in the host's quest? Put 1 in Float Value slot. Want 8 hours to pass? Type 8.

8). Press Add Property again. Second property is...
Type: Quest
Name: myQuest


Click OK, closing the Add Script Property panel.

9). Highlight the myQuest property and select Edit Value button. Find the quest's name, whether it is the actual quest being worked on now, or something remote. I am selecting aaaTimerQuest, since I'm working locally.

10). Press Add Property a third time. In this case, I am going to describe a timer which sets a stage.
Type: Int
Name: Stage


Click OK, closing the Add Script Property panel.

11). Highlight the property just created, which I'm calling Stage. Edit Value can be whatever stage we want the quest to set to. I am typing 5.

12). Click OK and click OK again, closing the Quest panel. Save. And reopen to the Scripts tab.

13). Right-click > Edit Source on the script. Right now here is what I'm seeing.

Scriptname aaaTimerScript extends Quest

Float Property Hours Auto
Quest Property myQuest Auto
Int Property Stage Auto


These next parts, we'll need to type in manually. ๐Ÿ“

Scriptname aaaTimerScript extends Quest

Float Property Hours Auto
Quest Property myQuest Auto
Int Property Stage Auto

function OnInIt()

EndFunction

Function OnUpdateGameTime()

EndFunction


OnInIt is used when the script has been created and all its properties have been initialized.

OnUpdateGameTime is used frequently with timers (such as when we rent a room for a day), magic effects, or many other events when time needs to be measured.


14). File > Save (or Ctrl + Save). If the script compiles, continue with the rest.

Scriptname aaaTimerScript extends Quest

Float Property Hours Auto
Quest Property myQuest Auto
Int Property Stage Auto

function OnInIt()

If Self.IsRunning()
self.RegisterForSingleUpdateGameTime(Hours)

EndIf

EndFunction

Function OnUpdateGameTime()
MyQuest.SetCurrentStageID(Stage)


EndFunction





-----------------------------------------------------------------------------

--The timer script above will be ready to run right away, as soon as a quest begins, IF the script is attached to the actual quest which handles dialog or whatever. This is good for a one-time event. When the quest completes its last stage the timer (along with any other scripts) will shut off for good.

--If the timer script is standalone it'll usually need to be 'registered' before it'll trigger. Let's say a line of dialog occurs, and after this line is spoken we want the timer to begin. Go to the Topic/Info page where this line occurs and use the Script Begin or Script End boxes to make two properties: one for the standalone Timer quest (which I'll conveniently call TimerQuest), and a Float which counts a certain amount of hours. The script fragment TimerQuest.RegisterForSingleUpdateGameTime(Hours) gets typed into either Script box. This is what'll get the quest registered, get it running, basically.

--Now if we want a timer which we have more control over, let's say we want it to trigger only when a certain stage has passed, everything is the same, except some changes in the second If/EndIf block.

---------------------------------------------------------------------

Scriptname aaaTimerScript extends Quest

Float Property Hours Auto
Quest Property myQuest Auto
Int Property Stage Auto

function OnInIt()

If Self.IsRunning()
self.RegisterForSingleUpdateGameTime(Hours)

EndIf

EndFunction

Function OnUpdateGameTime()
If myQuest.GetStage() == 1
myQuest.SetStage(5)

UnregisterForUpdateGameTime() ;This line gets added only if the quest itself runs forever, like a room rental quest.
;in such a case, the timer will need to be 'unregistered' before it can be used again.

EndFunction


;--------------------------

So the timer above was began when the quest was Stage 1, perhaps after speaking to an NPC, who said his Goodbye. Try speaking to him just afterwards, and he'll say "Hmm?" "Need something?" ... But after waiting X hours or more, now he's got something new to say. "You're back!"

Happy New Year!!! ๐Ÿท ๐Ÿพ

This post has been edited by Renee: Jan 21 2024, 04:10 AM


--------------------
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Renee
post Jan 25 2024, 08:02 PM
Post #105


Councilor
Group Icon
Joined: 19-March 13
From: Ellicott City, Maryland



Making a Bookshelf, Game: TES V: Skyrim

Skyrim is full of little tricks and improvements, things most folks hardly seemed to mention in bulletin boards online. One of the things I liked are bookshelves. ๐Ÿ“š No longer do we have to use the Grab function to awkwardly place books on shelves (half-open, which means getting them to land properly on a shelf takes mad dexterity) only to have them all fall or fly across the room if the wrong object touches another. Instead we can merely activate the bookshelf, choose which books or notes we'd like to place on there, and everything gets placed into the shelf efficiently.

Surprise, though. We can't just take a piece of furniture from the Object window, throw it into a cell, and everything works. No, we have to arrange for this to happen in the CK. EDIT: Actually, ghastley's post below says we can do this. But I'm writing up this tutorial anyway.

Here is the video I learned this from. Darkfox is very good at making these videos, but there were a few things I was confused about, hence this writeup.

Object Window > WorldObjects > Static
1). Find UpperShelf01. Find the cell where the shelf is going to get placed and drag the shelf into the Render Window.

Tip: it helps to have Snap To Grid toggled on the main tool bar, so the shelf can be rotated in 45 degree angles.

Save.

2a). Still in the Object window, left-click Container. It helps to type Book into the Filter slot to narrow things down.

2b). Drag PlayerBookShelfContainer into the Render window. This is a marker, odd that it's placed into the Container section. Anyway, once it is in the window, carefully place the marker behind the shelf. In fact it's okay to drag the marker into the void.


3a). Still in the Object window, go to the Items section > Book. Type Default into the Filter. Click & drag DefaultBookShelfMarker into the Render window.

3b). Type the letter W and use the gyroscopic pattern thingie (Darkfox calls it a gizmo) to rotate the book marker so that its spine is showing outward, and the marker is placed with its hardbound covers holding it upwards. Just like a real book.

Again, it helps to have the video running for a visible example.

3c). Left-click on the marker and Ctrl + D so it gets duplicated. Keep doing this until the shelf is full. SAVE.

Another option is to make add just one bookmarker for now, and continue the steps below. This is for anyone who wants to check and make sure the shelf works, before moving on and finishing the rest of the job.

-- Though this seems really tedious to set up all these bookmarkers side by side, consider how much more tedious it is trying to use the Grab in the game. Placing books flat on their side instead of upright! Spending X amount of time getting everything arranged, only to find them all falling off as you reenter the cell in-game! dry.gif

3d). Select (left-click) the book case and click the Trigger button on the main toolbar. This is the button with the upper-case T.

3e). Type book into the Filter, and select PlayerBookShelfClickTrigger, which should be the very top of the list. Click OK. This causes another 'gizmo' to show.

3f). Left-click and hold the vertical arrow. Drag it downwards so that the entire marker collapses. Each of the three directional bars can be used to shape and reshape the marker. Basically, we only need it to be as large as the shelf itself. So that (in the game) clicking on THIS shelf will only activate the invisible book markers on the shelf. ๐Ÿ“™๐Ÿ“•๐Ÿ“—

To move the gizmo (without stretching it) single left-click on the marker (but not the arrows). Hold Ctrl + Z to move the maker up and down, without stretching it all over the place. This takes practice! The marker should be arranged so that it's visibly covering the bottom portion of the shelf. This is what we'll be clicking on in the game.

3g). Select the entire shelf in the Render window. Click on the Toggle button again from the main toolbar. Type Book into the Filter, and single-left-click PlayerBookShelfTrigger (Not the "click trigger" version). Click OK. That is a 2-step process by the way: Don't try to simply double-left click on PlayerBookShelfTrigger.

A red marker shows up covering the entire bookshelf. As the video shows, move the entire marker so that it collapses around the area where all the book markers have been placed.

3h). Save, goshdarnit.

3i). Return to the PlayerBookShelfContainer marker. This was placed into the void, or somewhere behind the bookshelf, during step 2b. Single left-click on it and press the number 2 on the keyboard, so the gizmo goes away. Now double-left on it.

3j). Select the Linked Ref tab. Rotate the window so that the PlayerBookShelfTrigger can be accessed. This is the marker which covers all the book markers (confusing, I know) not the marker which triggers the shelf itself.

3k). Single-left click on the PlayerBookShelfTrigger and press the number 1 twice on your keyboard. This causes the marker to temporarily disappear.

3l). Return to the Reference panel which is pulled from the Container marker. Right-click > New into its window. Now press the Select Reference in Render Window button, and double-left click on the book marker on the very left. I'm gonna work left to right.

3m). Click on the Keyword scroll-bar and type "book". Now select BookShelf01 (which should be the very top of the stack) and click OK. BookShelf01 should now be in the Keyword window, along with the first Bookmarker.

Repeat steps 3j thru 3m for EVERY book marker, left to right (or right to left, for Arabic-readers).

Otherwise, make sure these books are being referenced in order: BookShelfBook01, BookShelfBook02, and so on. Yes this is tedious. Consider again how much more tedious it is to set up a bookshelf with the Grab function though! laugh.gif

It helps to use the View Reference button occasionally, before clicking OK to close the Choose Reference panel. This is so we are 100% sure each marker is getting referenced properly. By the time I'd gotten this done I realized I only had 14 books on the top shelf, rather than the max of 18. Meh.

3n). Once the entire process is done, left-click somewhere in the render window. Press Alt + 1 to make the hidden PlayerBookShelfTrigger reappear.

3o). Double left-click on the PlayerBookShelfTrigger so its Reference panel shows up. Rotate the window (if needed) so that the Container marker is showing in the void.

3p). With the Linked Ref tab selected, right-click > New and use the Select Reference in Render Window button to link the container to the trigger.

3q). Use the Keyword scroll-bar to find Book Shelf Container. Click OK.

3r). Still with the Reference panel onscreen, select the Primitive tab. Toggle Player Activation on.

3s). Select the 3D tab. Change each Rotation number (X, Y, and Z) from 0.000 to 0.001. This has to be done manually; clicking the little arrows up or down introduces too much rotation.

All three Position numbers should be slightly off, rather than exactly 0.000. This is to avoid a glitch in the game, or something. Click OK.

3t). Select the PlayerBookShelfTrigger (the marker which surrounds all the books. Double-left click on it. Select Linked Ref. Right-click > New into the window and link the trigger to the container out in the void. Click OK.

3u). With the Reference panel still up, select the Primitive tab. Change Collision Layer from L_ACTORZONE to L_TRIGGER. Click OK.

3v). Double-click on the container out in the void. Select Linked Ref tab and right-click > New into the winodw. Use the Select Reference button to link the container to the PlayerBookShelfTrigger (again, this is the marker which covers all the books).

Use the Keyword scroll-bar to find BookShelfTrigger01. Click OK, closing the reference panel for the container.

Final step, coming right up. We need to make a Collision marker. Its purpose is to make sure books which get placed on the shelf won't just fall off at some point, and also to make sure that the player cannot just remove books from the shelf individually, which can screw things up. We want to make sure the player is only able to click on the shelf itself, which then automatically arranges the menu to pop up so books can be removed or added.

3w). Click on the entire book shelf. From the main toolbar click the Collision button. This is a C, located five buttons from the right. The shelf should be covered in a yellow marker. This can be resized again, using the arrows.

MAKE SURE the yellow Collision marker is placed slightly behind the PlayerBookShelfClickTrigger, otherwise we won't be able to activate the shelf.

TROUBLESHOOTING: If nothing happens when trying to activate the shelf (yet an option to Activate can be seen), try turning PlayerBookShelfClickTrigger (invisible marker we click on in-game) around 180 degrees.

This post has been edited by Renee: Feb 21 2024, 05:05 PM


--------------------
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
ghastley
post Jan 25 2024, 09:25 PM
Post #106


Councilor
Group Icon
Joined: 13-December 10



Or you could just go the warehouse, and cut and paste a ready made one. Still, you do need the Ikea method when your bookshelf isnโ€™t the same model as the prefab. And it usually isnโ€™t.

That PlayerBookShelfContainer really is a container, like an invisible chest. The player is a container, too. Anything that can invisibly hold other items is a container. So the really bizarre thing is that the books you see on the shelf are copies linked to the ones in the container. Weapon racks work the same way, as does the mask display at Labyrinthian.


--------------------
Mods for The Elder Scrolls single-player games, and I play ESO.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Renee
post Jan 25 2024, 09:43 PM
Post #107


Councilor
Group Icon
Joined: 19-March 13
From: Ellicott City, Maryland



Right, and any thing in the Creation Kit (including quests) are Objects. Anyway, dang.

Funny thing is, I went into the CK looking for just that: a ready-made bookshelf without all the work. Ah well.

... Edit: and then after all that the dang bookshelf doesn't work! I missed something apparently. Although I did get a workable light switch into Laprima's room. Turns the invisible light markers on and off.

This post has been edited by Renee: Jan 25 2024, 11:11 PM


--------------------
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Renee
post Jan 26 2024, 05:52 PM
Post #108


Councilor
Group Icon
Joined: 19-March 13
From: Ellicott City, Maryland



Next

This post has been edited by Renee: Jan 26 2024, 07:17 PM


--------------------
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
ghastley
post Jan 26 2024, 06:49 PM
Post #109


Councilor
Group Icon
Joined: 13-December 10



When bookshelves donโ€™t work for me, it is usually the orientation of the ClickTrigger. That can easily end up facing backwards or even sideways, so you canโ€™t operate it from in front. Itโ€™s built that way so you have to use the shelf from the front, but the orientation of the widget is not too clear in the CK.


--------------------
Mods for The Elder Scrolls single-player games, and I play ESO.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Renee
post Jan 26 2024, 07:17 PM
Post #110


Councilor
Group Icon
Joined: 19-March 13
From: Ellicott City, Maryland



How to make Generic NPCs, Game: TES V: Skyrim

Renee's Modding Thread is a bit of a mess during that last post, it's because I'm experimenting, but hit a dead-end. But I have discovered how to make generics in the game of Skyrim. Since the process is rather involved (and I doubt I'd be able to remember it without reminders) here the next tutorial.

Three items are needed to make this happen: a LeveledCharacter list, a NPC template, and an actual NPC.

Now... Bethesda themselves often go way beyond these three basic things. As I was trying to figure this out, I was studying bandits. And found a Leveled list which draws from a leveled list which draws from another leveled list which FINALLY dice-rolls some NPC(s) which have been drawn from their own templates, which have multiple LeveledList items for Inventory, and so on. It gets to be crazy, and it took me over an hour to figure out how all these objects and lists correlate to one another and show up properly in the game.

Ahem. But for the basic idea to work, all that are needed are three factors.


Object window > Actors > LeveledCharacter
1a). Right-click > New. Make an ID. aaaLeveledCharacterList or whatever.

1b). Toggles are described below in Bethesda's own words, from the Creation Kit website. I've put my own comments (in parenthesis) as well.

Calculate from all levels <= PC's level: If checked, the level list will use any item at or below the player's level in the list. If not checked, it uses the closest item or items to the player's level, but not exceeding it.

Calculate for each item in count: If this list is in another leveled list with a count greater than zero, this check box determines if each item in the count is the same, or is recalculated. (Bethesda often has both of the Calculate toggles on.)

Use All: Mutually exclusive with the previous two selections, Use All causes the list to always return all of its contents. (In most cases, this is off).

Special Loot: Whether to select items from this list using the Special Loot formula.

Chance None: The chance that the leveled list will not produce an item at all. This chance can be supplied either as a fixed percentage or as a value in a Global. (0 is chosen if we want to make SURE the NPC always has this item type.)


Click OK. It helps to copy the ID of the list sometimes, and paste it to a Notepad or some other text-based page, especially for those who don't put "aaa" at the start, or don't remember what name they chose.

1c). Staying in the Object window, click on the Actors > Actor section. Right-click > New. I'm going to make a template, which will make it easier to make NPCs from this template in the future.

ID: aaaNPCTemplate

Name: NPC Template.

ActorBase: find the LeveledCharacter list made during step 1a in this scroll-bar, which for my example above is aaaLeveledCharacterList.


1d.) Toggle Respawn on, do NOT toggle Unique. Click OK and reopen.

1e.) Here is how I've got the rest of the tabs set up... and these can be played with, depending if a wimp is desired, or an Uberboss.

Stats tab
Auto calc stats should be toggled on. Level stays at 1 because the Leveled List will handle overall level.

Use the Class scroll-bar to find whichever class is desired: EncBanditMelee1handed or whichever. This all depends what sort of weapon-type will be wielded by enemies, of course. If the generic NPC is not an enemy, Drunk or Monk or whatever can be chosen, although in most cases, this entire process is used for enemies. emot-ninja1.gif

Factions tab
Use whatever faction is necessary. If the generic(s) is or are supposed to be placed with the bandits for instance, obviously Add the BanditFaction. Otherwise, go into Object window > Character > Faction and make a new faction if for some reason a new one is needed.

AI Data tab
For most enemies...
Aggression: Very Aggressive
Confidence: Foolhardy
Assistance: Helps Allies or Helps Friends and Allies

AI Packages tab
DefaultSanboxEditorLocation1024 is a good one to choose. In some cases, AI is not added to generic-type NPCs; I think the game will make them mildly sandbox even if they don't have any specific AI.


As per the Inventory tab described in the post above, Inventory can be rather more complex, so that'll be discussed next. OH, and if the NPC is supposed to use spells, don't forget the SpellList tab. bluewizardsmile.gif

1f). So click OK, closing the Actor panel.


Object window > Items > LeveledItem
It is possible to simply find LeveledItem lists which have already been made, and these can simply be added to the NPC template. Skip to step 3a if this is desired. But to start something new... especially for randomized enemy gear....

2a). Right-click > New so that the LeveledItem panel pops up. Here's what I got:

ID: aaaArmorList

Chance None: 0
Calculate from all levels <= PC's level: OFF
Calculate for each item in Count: OFF

With these settings, several armor cuirass/greaves sets or outfits can be added to the list, but the game will choose only ONE of these for the NPC to wear. If "Calculate for each item in Count" is toggled ON (along with Chance None at say, 50), the game will make a dice roll for each item on the list, with a 50% outcome that item will or won't show up. Actually,
.
2b). Now click on Items > Armor in the left side of the Object window, and drag whatever is desired into the LeveledItem's main window. I dragged ArmorIronCuirass, ArmorLeatherCuirass, and ArmorBandedIronCuirass A mishmash of armor types, basically.

We can also right-click > New into the window to find armor or clothes that way.

2c). Steps 2a through 2b can be followed to also add Helmet and Boots into separate LeveledItem lists. For Boots I set Chance None at 0 (so the NPC will always have a chance of wearing several boot types) but I made the aaaHelmetList with a 50% of Chance None. Just for variety.

2d). Click OK.

2e). Follow the same process for weapons: 2a through 2d. Here's what I came up with.

ID: aaaWeaponList

Chance None: 10

Calculate for each item in Count: OFF

I dragged a bunch of iron into the main window: IronGreatsword, IronMace, and so on. There's a chance the NPC won't have a weapon at all when he's met since I made a 10% chance of this, so change this to 0 if a weapon is always supposed to be in the person's inventory.


Object window > Items > Outfit
3a). Right-click > New into the right window. ID = aaaNPCOutfit is an example.

The Outfit section determines what the NPC shall wind up wearing out in the world. We cannot just add clothing or armor items into their main Inventory; they'll wind up not wearing anything if it's done this way, especially if they're generic.

3b). Drag or right-click > New the Leveled List items into the Outfit window. So I've got the lists I just made: aaaArmorList, aaaBootsList, and aaaHelmetList.

3c). Click OK.

3d). Reopen the NPC template (Actor) panel. The Inventory tab should be open, or opened. Use the Default Outfit scroll-bar to find the Outfit just made. So, aaaNPCOutfit is my example.

3e). Right-click > New into the Inventory window, and find the weapons list made earlier. Click OK, closing the Actor panel. The NPC can also have gauntlets added directly here, including a LeveledList version of gauntlet choices.


4a) Still in the Actor section, right-click into the Object window and select New. I am making aaaBandit01 for the ID, and Name is simply staying as Bandit.

4b). Change the ActorBase scroll-bar (middle-lower-left side of the Actor panel) from NONE to whatever the name of the template is. So in my game, it'll be aaaNPCTemplate.

4c). Now toggle the following on: Use Traits, Use Stats, Use Factions, Use AI Data, Use AI Packages, Use Def Pack List, Use Attack Data, Use Inventory, and Use Base Data. Click OK. In most cases, Scripts are not needed with generics.

Note that as we toggle stuff on, we'll no longer be able to manipulate the actual NPC's data choices, those windows, boxes, and toggles will be grayed-out. The template is now handling these choices. wink.gif

4d). Go back to the LeveledCharacter list made before (aaaNPCList for my example). Right-click > New into its main window and find the NPC (NOT the Template). I've got aaaBandit01 so far. From this moment on, if more NPCs are desired into this list, steps 4a through 4c can be followed. The Level slots can be used to make sure enemies only show up at certain times, all with different names in the game. Think of the difference between a Bandit who shows up at low levels, to a Bandit Skirmisher or Bandit Plunderer.


Cell and Render Windows
5a). Go back to the NPC in the Actors section. Find whichever cell is desired and drag the NPC into the Render window. He or she's going to appear as a green-colored M icon, which means we're on the right track if we're wanting randomized, generic NPCs showing up, not someone specific.

5b). Double left-click on the green icon in the Render window, and select the Leveled Actor tab. By default this is on Easy. We can change this around, making the guy tougher if desired.

5c). Click the Persist Location tab and find whichever cell or worldspace the NPC will dwell in. I've got EmbershardLocation. Maybe it's a good idea to put the NPC into an area which is not populated by other people. This way, if we want to see that the NPC actually shows up, we can easily do so.

Click OK.

Save. Now start the game, get your character into whichever cell or worldspace was used to drop the NPC into. Make sure the NPC's wearing clothes or armor, and has a weapon (if a weapon was added into inventory with a chance of 0).

This post has been edited by Renee: Jan 29 2024, 07:35 PM


--------------------
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Renee
post Feb 20 2024, 02:23 AM
Post #111


Councilor
Group Icon
Joined: 19-March 13
From: Ellicott City, Maryland



Light Switches and Triggers, Games: TES IV: Oblivion, Fallout 3, TES V: Skyrim

This mod idea is so simple, it's probably already been done before. Gotta be. Because it's such a brilliant concept (pun intended). ๐Ÿ’ก๐Ÿ’ก๐Ÿ’ก๐Ÿ’ก๐Ÿ’ก๐Ÿ’ก๐Ÿ’ก This idea is the ability to turn a light switch on, or turn it off. It's probably been done, somewhere. Yet I've never seen any mod that features it.

Normally if we walk into any room, in any of these games, the lights are already on. I'm not talking about candles, not talking about torches or sconces. I am talking about the invisible light markers which can be seen in any of these three games' editors. They illuminate indoor areas, even caves which should be pitch black. ph34r.gif

So... my idea breaks lore (for Elder Scrolls), because nobody in Tamriel ever turns lights on and off. In my mind however, doing so can be explained in-game by magic, and a bit of make-believe. redwizardsmile.gif Doesn't anybody ever walk into their bedroom, and want to make it darker before they go to sleep? Not by turning lights off but by blowing out the candles, snuffing the sconces? ๐Ÿ•ฏ

Well... I'm not that talented of a modder, I can't animate my character blowing out candles and such, but I can 'pretend' my character does all of this, through scripting.

--- And in Fallout 3, which is supposed to be based on Earth, light switches could certainly be possible. I'm assuming in Pre-War days, people were able to turn lights on and off. ๐Ÿ’ก๐Ÿ’ก๐Ÿ’ก๐Ÿ’ก๐Ÿ’ก๐Ÿ’ก๐Ÿ’ก๐Ÿ’ก๐Ÿ’ก๐Ÿ’ก๐Ÿ’ก No lore broken. tongue.gif

The process below works for both these games, since they both share the same scripting system, though each of these two games do things a bit differently. And Skyrim has its own process which is completely different, of course. Big surprise, right?

------------------------------

OBLIVION or FALLOUT 3: Modding these two with working light activators is SUPER-easy. Really a good n00b-friendly way to learn scripting.

CELL window + RENDER window
1a). Find a place in which you'd like to turn lights on & off in-game. Best areas, of course, are our characters' bedrooms. Pretty much any cell in any game has light markers, except maybe some testing areas.

To anyone who is a complete n00b, light markers float in the Render window, in whatever Cell is being looked into. They literally look like floating lightbulbs. ๐Ÿ’ก <--- Like this.

1b). Double left-click on a light marker, opening its Reference panel, and select Edit Base. Firstly, the ID name for light markers won't need to be changed in most cases. The main thing most folks might want to mess with is color. And if color of a base marker is changed then it's best to change its ID as well.

Click the Select Color button; and voila. First color I changed in FO3 was the Pip Boy light. My character wanted hers to be pink. rolleyes.gif

1c). Click OK, bla bla. Now when we get back to the Reference panel, give the marker a Reference ID. I am going for aaaLightMarkerRef. COPY the name onto a Notepad or Wordpad.

Oblivion: Toggle Persistent Reference on. Click OK.
Fallout 3: Pretty sure it's already on. If not, toggle it on.

In both games, toggle Initially Disabled on. This means the room will be dark (or darker) first time it's walked into.

Now... for Fallout 3 it's possible to make it that the lights are on (not disabled) when the room is first entered, but the scripting will be different. I'm gonna describe it so that they are OFF, though.


OBJECT window > WorldObjects > Activator
2a). Again, we're in the Activator section. Each game (OB and FO3) has different artwork of course, so there are different activators to look for.

Oblivion: Find HourglassSkingradSpecialHourglass
Fallout 3: Find ControlPanelVault01


OBLIVION

I am going to describe this two ways: first way includes an "on" switch and an "off" switch. Second method describes just one switch.

2b). For Oblivion, edit HourglassSkingradSpecialHourglass twice. First time, call it something like aaaOnSwitch. Change the Script scroll-bar to NONE. Click OK. Save as a New Form. Repeat the process over, except this time call it aaaOffSwitch. We're gonna need two activators.

I have experimented with a bunch of activators in this game. I like the Old Hourglass because all we have to do is click on it. Push blocks, levers, and other activators also work, but they need more complicated scripts. Feel free to experiment with these too if you like. But they are more complicated. Hint: most of the original script for these other activators must stay intact, because these script-fragments ensure that the lever, push block, pull rope (etc.) moves in real-time when we push or pull them.

2c). Reopen the ON activator, click on the Script button (which looks like [...]) and type something like...

Scriptname aaaLightsOnScript

Begin OnActivate

End


2d). Save and close the script. Click OK, saving as New Form. Reopen the ON activator, find the script in the scroll-bar, click OK.

Repeat all of that for the OFF switch.

2e). Reopen the ON activator. Here is the rest of the super-easy script.

Scriptname aaaLightsONScript

Begin OnActivate
aaaLightMarkerRef.Enable

End


2f). Reopen the OFF activator.

Scriptname aaaLightsOFFScript

Begin OnActivate
aaaLightMarkerRef.Disable

End



2g). Place both Hourglass activators side by side in the same cell as the light marker, or however. Voila. One turns the lights on, the other turns 'em off.


3). And now, to describe how it can work with just one activator. Again, I am using the hourglass thingie from above, but this time I only need one Old Hourglass. โŒ› Edit it with a new ID name. This time the script looks like this.

Scriptname aaaLightScript

Begin OnActivate

If IsActionRef Player ==0
Return

EndIf

If aaaLightMarkerRef.GetDisabled
aaaLightMarkerRef.Enable

else
aaaLightMarkerRef.Disable

EndIf

End



IsActionRef is specifically designed to work with OnActivate scripts in the CS. For some reason this is needed for Oblivion activators, but Fallout does this differently.

-----------------------------------------------------


FALLOUT 3
4a). For Fallout 3, again, I am messing with the ControlPanelVault01 activator. Change ID, set script-bar to NONE, Click OK, saving as New Form. Fallout's activators work more conventionally, with integers and such.

4b). Reopen the activator, click on the [...] button, which is the script button just like in OB's editor, and start a script like so....

scriptname aaaLightActivatorScript

Short DoOnce

Begin OnActivate

End


4c).... Save that, close it, click OK, closing the activator panel, and reopen it. Find the script in the scroll-bar, click OK. Reopen.

Here is the script in total...

scriptname aaaLightActivatorScript

Short DoOnce

Begin OnActivate

If (DoOnce == 0)
aaaLightMarkerRef.Enable
Set DoOnce to 1

EndIf

If (DoOnce == 1)
aaaLightMarkerRef.Disable
Set DoOnce to 0

EndIf

End



4d). Drag the activator into the same cell as the light marker. Toggle Persistent Reference on (if it's not already on).

And there we go. It is possible to enable and disable as many light markers or candles and other light sources as we wish, illuminating an entire room with one touch, in either game. ๐Ÿ•ฏ

---------------------------

TRIGGERED LIGHTS

And this idea also can work well in OB or FO3. In this case, lights enable and disable as our character walks near them, or away from them. cool.gif Again, in Oblivion this can be explained by magic, and in Fallout it can be explained by some sort of unseen motion detectors, like we'd see in a sci-fi movie. Or in our own backyard. unsure.gif

No activator is needed this time. And in this case I'm giving an example for two light markers, placed on each end of a short hallway.


1). Find a light marker in the Object window > WorldObjects > Light section. ๐Ÿ’ก Or find one in the Cell + Render windows.

2a). Open the marker, change color if desired, give it a new ID name, click OK, save as New Form.

2b). Drag the edited marker into the Render window (if it's not already there).

2c). Give the marker a Reference ID. aaaHallwayLight1Ref is what I got. Copy/paste that ID somewhere.

Persistent Reference ON.
Initially Disabled ON.

In this case, I am left-clicking on the marker I just edited, pressing Ctrl + D, and dragging a second marker a few meters away. Give the new marker a Ref ID as well (aaaHallwayLight2Ref for me). Push the script button of either marker. Both are going to share the same script.


3). This time the script looks like this.....


scriptname aaaTriggeredLightScript

Short DoOnce

Begin GameMode

If (Player.GetDistance aaaHallwayLight1Ref < 128)
If (DoOnce == 0)
aaaHallwayLight1Ref.Enable
aaaHallwayLight2Ref.Enable
Set DoOnce to 1

endIf
EndIf

If (Player.GetDistance aaaHallwayLight1Ref > 128)
If (DoOnce == 1)
aaaHallwayLight1Ref.Disable
aaaHallwayLight2Ref.Disable
Set DoOnce to 0

endIf
EndIf

End



The script makes sure that BOTH markers illuminate if we get close enough to one of them, and both of them turn off when far enough away.

SKYRIM:

๐Ÿท

This post has been edited by Renee: May 6 2024, 09:26 PM


--------------------
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Renee
post Feb 29 2024, 04:21 AM
Post #112


Councilor
Group Icon
Joined: 19-March 13
From: Ellicott City, Maryland



Adding an AI Package to an NPC, Game: TES V: Skyrim

The idea for this lesson: I am trying to get an NPC to do X, whether it's follow me, or wait, or whatever. To get this to work, conventionally the NPC normally might have an AI Package attached directly to him or her, right? This package might have some conditions added to it (GlobalVariable or GetStage or whatever) so the package only works at certain times. Overall this is a rather passive method of making an NPC do stuff.

But what if I want a more direct approach? What if I don't want to keep adding AI Packages to the NPC? This is why it's important to delve into the world of Quest Aliases.

In Oblivion or Fallout, we can change an NPC's AI packages on-the-fly, by using AddScriptPackage, which works better sometimes than adding AI directly to that NPC. I made some goggles in FO3's GECK, for instance. If my character puts them on this causes his team of followers to find him, anywhere in the game. He takes them off, and now they wait around. aaaFollower01.AddScriptPackage aaaFollowPackage or aaaFollower01.AddScriptPackage aaaWaitPackage.

Skyrim no longer has AddScriptPackage (except as a console command) and it's because the CK uses Aliases instead. In fact, Aliases are a much more efficient and broad-minded approach, because not only can we add packages to the alias (which, in turn, can then be added to the NPC in real-time) but scripts can be added and removed, Essential status, and dozens of other features, all with one click. One alias can also affect multiple NPCs, which means less properties, less scripting, less work. Finally, an alias can effect is a similar manner as AddScriptPackage in the old editors; which means aliases work in a more direct manner.

Another advantage of aliases: sometimes AI Packages need to be backed up with EvaluatePackage() just to get them to work. Aliases won't need this command.

Here is the official Quest Alias Tab page

Let's say I already have a quest with some dialog written. "Would you like to join my party?" I click in the game, and the NPC agrees, causing the alias to fill.


1). If the NPC hasn't got a Reference ID, give the NPC a Reference ID in the Render window. Copy this name so it can be pasted.ย Ref ID's aren't 100% needed to get this idea to work, but they are what I'm gonna describe.

2). Make an alias on a quest. As stated, I've got a quest with some dialog which goes "Want to join my party?" and when the person agrees, that's when the alias fills. Anyway, right-click > New Reference Alias into the Alias window.

3). Click Specific Reference as the Fill Type, and find the NPC's Cell and Reference in the scroll-bars. Conversely, Unique Actor can also be used, as long as the NPC is a (you guessed it) Unique Actor.

Conversely, we can also click Specific Reference but leave the Reference button blank, so the long rectangular button says says "Force Reference". Done this way, the alias can be used to affect multiple NPCs, meaning we can tell an entire party to follow us. Each NPC will need his/her own Ref ID in this case, but we won't need multiple aliases written up as script fragments.

The alias can have the AI package attached directly to it, along with scripts, and all sorts of other good geekiness. And see: the advantage is, this frees up space in the NPC's AI Packages window. smile.gif From what I understand, adding packages this way works more flawlessly than adding packages directly to an AI stack. Although I've never had any problems doing so.

4). Right-click into the bottom-right window so an AI package can get added.

5). Toggle Optional on, and this is the only flag which needs to be toggled. Sometimes if Optional is not toggled on this can cause a quest to not start.

--These are the minimal features to add an alias (and therefore an AI Package) to an NPC. So click OK, or click into the Alias Name slot and press ENTER or RETURN. Click OK again, closing the quest panel, and save. Reopen, and head to Dialogue Views or Player Dialogue.

6). At the moment (when speaking to the NPC) when I've got "Yes you can follow me" for a clickable topic, two properties are needed: 1. a ReferenceAlias (can be the same name as the alias just made) and 2). an Actor property. Paste the Ref ID copied in step 1, this way the property auto-fills.

7). Final script is: ReferenceAlias.ForceRefTo(ActorProperty)ย ย 


Aliases clear automatically when the quest stops. However if the quest is to continue running while the alias ends, the fragment is ReferenceAlias.Clear()

This post has been edited by Renee: Mar 23 2024, 04:52 PM


--------------------
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Renee
post Mar 14 2024, 05:20 PM
Post #113


Councilor
Group Icon
Joined: 19-March 13
From: Ellicott City, Maryland



https://tesalliance.org/forums/index.php?/t...s-2-properties/ -- Study Array, as a way to add multiple objects to an alias.



This post has been edited by Renee: Mar 23 2024, 05:16 PM


--------------------
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Renee
post Apr 1 2024, 03:00 AM
Post #114


Councilor
Group Icon
Joined: 19-March 13
From: Ellicott City, Maryland



Scriptname aaaFollowPlayerRingScript extends ObjectReference

;Follow Ring Script

GlobalVariable Property aaaFollowGlobal Auto
Message Property aaaFollowRingEquipMessage Auto

Event ONEquipped(Actor akActor)

If akActor == Game.GetPlayer()
If aaaFollowGlobal.GetValue != 1
aaaFollowRingEquipMessage.Show()
aaaFollowGlobal.SetValue(1)

EndIf
EndIf

EndEvent

Event ONUnEquipped(Actor akActor)

If akActor == Game.GetPlayer()
If aaaFollowGlobal.GetValue == 1
aaaFollowRingUnEquipMessage.Show()
aaaFollowGlobal.SetValue(0)

EndIf
EndIf

EndEvent

This post has been edited by Renee: Apr 4 2024, 09:49 PM


--------------------
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Renee
post May 6 2024, 06:43 PM
Post #115


Councilor
Group Icon
Joined: 19-March 13
From: Ellicott City, Maryland



CTD while saving after Startup Fix, Game: Fallout 3

The glitch is this: sometimes a character save will become affected in a way which causes the FIRST attempt at saving (after startup) to automatically CTD the game. mad.gif It's an aggravating problem of course, one which has a popular "fix" as found in this video. Basically, if we use the console to Kill our character after startup, this will cause the game to reload. Once the game is reloaded, all the sudden we can save as normal.

Not all game saves are affected. My Lone Wanderer's game for instance, will not CTD while saving after startup. But my Lone Wanderer has a different list of mods than the game which began having probs, which gave me an idea. ๐Ÿ’ก

Disabled the entire modlist of one of my affected games, disabling all the way down to Fallout.esm and the DLC & patches, that is. After doing so, now there was no problem. Saving the game just after startup did not cause a CTD, once all those .esms and .esps were toggled off. Continuing research, I began adding mod after mod until I found the culprit. In fact, there are at least a couple .esps which were causing this particular problem.

"Well just get rid of those mods, then" might be one solution. Except I don't want to get rid of either of them.

So, haven't been able to find a fix at Nexus (or anywhere), other than using the console to kill my precious character after starting her game. Which is extremely disturbing, right? So here is my "fix", which I admit is not really much better than using the console. But it's not quite as bothersome, in my experience.


Object window > Items >
1). Edit an object which can be placed into character inventory. So, I just edited Jet, the chem found in Items > . Changed its ID to aaaKillChem.

2). Make a script which ultimately looks like this...

scriptname aaaKillChemScript

Begin OnDrop Player
PlayerRef.kill

End


--------------------------

There are plenty of different block-types which'll probably work: GameMode, OnAdd, and so on. I prefer OnDrop, because once the item has been placed into character inventory, it'll always stay there, making this process more convenient.

3). Place the item into a Cell or Worldspace, preferably somewhere near where your character currently is. Save.

4). Boot up the game! Use the console to Kill your character. indifferent.gif Don't worry, this'll be the last time. After the game autoloads, pick up the Kill item and save again.

Voila. The item is now permanently in character inventory. So in my game, I can simply drop the item after first starting up the game, which'll (unfortunately) sequence the Kill animation, allowing me to save once the game reloads. Again, this isn't a great solution, but it's better than physically opening the console, and then physically clicking on my character, typing KILL and then pressing Enter. rolleyes.gif

This post has been edited by Renee: May 16 2024, 04:49 PM


--------------------
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

6 Pages V « < 4 5 6
Reply to this topicStart new topic
11 User(s) are reading this topic (11 Guests and 0 Anonymous Users)
0 Members:

 

- Lo-Fi Version Time is now: 25th May 2024 - 06:38 AM