Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

[WIPz] - Alchemist for Hire


Cydonian_Knight
 Share

Recommended Posts

Overview

Hey everyone, I wanted to run this idea by you all and see if it’s possible because I’m really not sure about this one. I was playing my Blade character today, who is almost a pure fighter, and I realized how much harder the game is without the ability to make your own potions, since homemade potions are typically more powerful than store-bought ones. I’m roleplaying him so I’m not touching alchemy at all. And because of this, I got the idea for my second mod - a hirable alchemist. Here’s the outline of what I want to do.

Details

I want to have an alchemist that you can hire for a certain amount of gold. Once you hire him, he’ll start off as a level 1 alchemist. Now here’s the part that I’m not sure about. I’d like to be able to buy “player-made†potions from him. So after hiring him, I would bring him ingredients, and have him turn them into potions that would be the same as if I had made them myself. The strength of the potions would be dependent upon the Alchemist’s level, which you can level up by paying a certain level-dependent amount of gold, the same way that you can train skills in the vanilla game, and also the alchemy equipment that the Alchemist has, which you will provide. So maybe there would be a dialogue option for making a potion, and clicking it would allow you to access the alchemy menu, and you could then make your own custom potion the same way you would do it in vanilla. However, the potion wouldn’t be added to your inventory, it would be added to the Alchemist’s inventory and you could then buy the potion from him from the barter menu. But creating a potion this way would NOT increase the players Alchemy skill at all, that’s important. I feel that this would be balanced for a warrior character because 1) You will need to pay a large start up fee, 2) The potions will be weak until you level the Alchemist up, which costs lots of gold, 3) You still need to provide the ingredients and equipment for him, 4) There will be a level cap on the Alchemist, probably around 50. So even when you level this Alchemist up to his max level, he will only be able to create the potions that the player would be able to make when the player’s alchemy skill is at 50.

So is this a feasible idea? I know this will probably take a lot of scripting and stuff, but I would really love to be able to create this and have it in my game. So what do you all think?

(I need an actual name too for the mod lol, I couldn't think of anything special so I just threw "Hirable Alchemist" out there :D)

CK

Link to comment
Share on other sites

Yes this is feasible, because I've seen something like it done. Companion Share and Recruit has an order you can give companions with Alchemy as a class skill telling them to make potions. You supply the ingredients and equipment.

lol oddly enough I've never actually tried it though, so I'm not sure what sort of potions it produces. And I don't know how it works, again I haven't actually looked, but most of that mod is well above my script comprehension level. :P

"Alchemist for Hire" flows a bit better. :)

Link to comment
Share on other sites

Yes this is feasible, because I've seen something like it done. Companion Share and Recruit has an order you can give companions with Alchemy as a class skill telling them to make potions. You supply the ingredients and equipment.

lol oddly enough I've never actually tried it though, so I'm not sure what sort of potions it produces. And I don't know how it works, again I haven't actually looked, but most of that mod is well above my script comprehension level. :D

"Alchemist for Hire" flows a bit better. :yes:

Yeah, I've seen that feature in CSR, but I've never been able to get it to work XD

And Alchemist for Hire does sound much better lol :D. I can't think of an actually creative name though XD

Link to comment
Share on other sites

Ok question time.

1. How do I adjust the rate at which Alchemy levels for the player? I'm able to get it so that making potions won't increase your skill at all, but it still adds XP to the player so that when you make a potion when my scripts aren't running, you'll gain several levels. How does a mod like Progress do it so that if yous set the Alchemy rate to 0, your Alchemy skill will be completely unaffected by making potions? Right now I'm using the two scripts below.

This first one is placed on a book. It makes it so that

scn aaAHRecipeScript


short endalchemy


begin OnActivate


set aaAHAlchemyRate to (getskilluseincrement alchemy 1)

SetSkillUseIncrement 0 Alchemy 1

player.additem mortarpestle 1

player.additem calcinator 1

player.additem alembic 1

player.additem retort 1

player.equipitem mortarpestle

set aaAHControlQuest.endalchemy to 1


End
This second one is used in a control quest. I'm using OBSE btw.
scn aaAHControlScript


short endalchemy


begin GameMode


if (endalchemy == 1)

	player.removeitem mortarpestle 1

	player.removeitem calcinator 1

	player.removeitem alembic 1

	player.removeitem retort 1

	SetSkillUseIncrement aaAhAlchemyrate Alchemy 1

	set endalchemy to 0

endif


End

2. Is there a way to detect the potion that a player just created? When I create a potion using my method, I would like it to be added to the NPC's inventory, not the players. Is there a way to do this?

Any scripting gurus want to give me a hand? Thanks!

Link to comment
Share on other sites

  • 3 weeks later...

Hmmm...Unique landscapes doesn't touch that area. Kvatch Rebuilt might? :D

I took a look at it in the CS and didn't see that it put anything there, so I think I'm good :P

Another question for you all....what's the best way to script a simple timer? I thought I knew how to do this and I've tried a couple things now but none of them are working XD. After the player pays the NPC 30,000 gold, I want the new shop to be enabled in 3 days. I tried 2 different ways of going about this, but neither of them resulted in the building being enabled. So how should I do it?

Link to comment
Share on other sites

For what you want there you will need to use GameDaysPassed, I'll explain.

What you do is have an active quest script, in the dialogue script result box for the gold payment put something aaISBuildingQuest.StartBuilding to 1, though you can change the quest ID :D

Now for the quest script:

Scriptname aaISBuildingScript

Short StartBuilding
Short DaysPassed

Begin GameMode
If StartBuilding == 1
Set DaysPassed to (GameDaysPassed + 3)
EndIf
If DaysPassed >= GameDaysPassed
Message"Debug: Your building has been erected!", 3
;YourBuildingRef.Enable
Endif
End[/code]

Something like that should work how you want it too, just replace [b]YourBuildingRef[/b] with your buildings proper persistent reference and you should be good to go.

[b]Edit:[/b] Added a small debug message to let you know if the building has been enabled. You can comment that out later.

Link to comment
Share on other sites

For what you want there you will need to use GameDaysPassed, I'll explain.

What you do is have an active quest script, in the dialogue script result box for the gold payment put something aaISBuildingQuest.StartBuilding to 1, though you can change the quest ID :D

Now for the quest script:

Scriptname aaISBuildingScript


Short StartBuilding

Short DaysPassed


Begin GameMode

	If StartBuilding == 1

		Set DaysPassed to (GameDaysPassed + 3)

	EndIf

	If DaysPassed >= GameDaysPassed

                Message"Debug: Your building has been erected!", 3

		;YourBuildingRef.Enable

        Endif

End

Something like that should work how you want it too, just replace YourBuildingRef with your buildings proper persistent reference and you should be good to go.

Edit: Added a small debug message to let you know if the building has been enabled. You can comment that out later.

Yeah, that's exactly the type of script I had before. Just to be sure, I erased mine and started over with yours as a base, but still nothing happened. The building is set to be persistent, initially disabled, and I'm using a Reference Editor ID to enable it, not the Base one. So is all of that correct? I don't understand why it's not enabling. I've made it the parent ref of several other statics that I want enabled as well, could that be causing an issue?

Link to comment
Share on other sites

Yup you are doing it all correctly, is the debug message coming up?, Parenting should not cause any issues if you are enabling it first. I'll do some testing and see if I can figure why it won't work.

No, the debug message isn't coming up either. I'll try to systematically go through it as well and see where the script is failing.

Link to comment
Share on other sites

Make sure the script is attached to a quest and you have the start game enabled checkbox checked. Otherwise it won't run. I altered the script slightly and it all works for me :unsure:

Scriptname aaISBuildingScript

Short StartBuilding
Short DaysPassed
Short Messages

Begin GameMode
If StartBuilding == 1
If Messages == 0
Message"Debug: Construction has been started!", 3
Set Messages to 1
Endif
Set DaysPassed to (GameDaysPassed + 3)
EndIf
If DaysPassed == GameDaysPassed
If Messages == 1
Message"Debug: Your building has been erected!", 3
Set Messages to 2
Endif
Set StartBuilding to 2
;YourBuildingRef.Enable
Endif
End[/code]

Link to comment
Share on other sites

Make sure the script is attached to a quest and you have the start game enabled checkbox checked. Otherwise it won't run. I altered the script slightly and it all works for me :unsure:

Scriptname aaISBuildingScript


Short StartBuilding

Short DaysPassed

Short Messages


Begin GameMode

        If StartBuilding == 1

			If Messages == 0

			  		Message"Debug: Construction has been started!", 3

					Set Messages to 1

			Endif

               Set DaysPassed to (GameDaysPassed + 3)

        EndIf

        If DaysPassed == GameDaysPassed

			If Messages == 1

                		Message"Debug: Your building has been erected!", 3

					Set Messages to 2

			Endif

			Set StartBuilding to 2

			;YourBuildingRef.Enable

        Endif

End
Ok, in order to test this, I created a new quest, just to have a clean slate. I copy and pasted your script and adjusted the variables where necessary. The quest is set to Start Game Enabled and I have the correct dialogue topic setting the StartBuilding variable to 1. So when I tested it out, I get the first debug message, about construction starting. However, I never get the second one and nothing is enabled. So that's where it's screwing up. What could I be doing wrong? Here's the script I have running.
scn aaAHShopEnableScript


Short StartBuilding

Short DaysPassed

Short Messages


Begin gamemode


If StartBuilding == 1

		If Messages == 0

			Message"Debug: Construction has been started!", 3

			Set Messages to 1

		Endif

	Set DaysPassed to (GameDaysPassed + 2)

EndIf

If (DaysPassed == GameDaysPassed)

	aaAHShopRef.Enable

	aaAHTentRef.disable

		If Messages == 1

			Message"Debug: Your building has been erected!", 3

			Set Messages to 2

		Endif

	Set StartBuilding to 2

Endif


End

Link to comment
Share on other sites

Edit: Try the adjustments I made in this script:

Scriptname aaISBuildingScript

Short StartBuilding
Short DaysPassed
Short Messages

Begin GameMode
If StartBuilding == 1
If Messages == 0
Message"Debug: Construction has been started!", 3
Set Messages to 1
Endif
Set DaysPassed to GameDaysPassed
EndIf
If DaysPassed == 3
If Messages == 1
Message"Debug: Your building has been erected!", 3
Set Messages to 2
Endif
Set StartBuilding to 2
;YourBuildingRef.Enable
Endif
End[/code]

Link to comment
Share on other sites

It works!!!! I rather stupidly put the enable code outside the if statement, causing it to fire immediately lol. But I fixed that and rearranged some things, placing them inside different if blocks, and now it works perfectly!! Here's the final code.

scn aaAHShopEnableScript


Short StartBuilding

Short DaysPassed

Short Messages


Begin gamemode


If StartBuilding == 1

		If Messages == 0

			Message"Debug: Construction has been started!", 3

			Set DaysPassed to (GameDaysPassed + 2)

			Set Messages to 1

		Endif

EndIf


If Messages == 1

	If (DaysPassed <= GameDaysPassed)

		Message"Debug: Your building has been erected!", 3

		aaAHShopRef.Enable

		aaAHTentRef.disable

		Set Messages to 2

	Endif

	Set StartBuilding to 2

Endif


End

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...