New Potions and Effects

Post » Sat Nov 17, 2012 7:14 am

Hi there! I'm TehMuffin. I've lurked these forums for a long time, but now I have a question I'd like to ask directly.

I've recently started learning how to mod Skyrim, and my first big project is an expansion of the alchemy system. There are overhauls of the system out there already, but what I want is not to mess with vanilla values and effects, but to create new potions entirely.

For the first step of this, I wanted to add perfumes to the game. In my vision these would be potions with high value, primarily for use in trading. I also wanted them to be able to be used by the player to give a temporary boost to relationships with NPCs (not terribly useful, more of a flavor effect if anything). If possible, I also wanted to be able to include a sort of saturation level, where wearing too much perfume would actually lower relationships with NPCs. The problem?

I have no idea what I'm doing.

I just don't yet have the knowledge to understand what's possible and what isn't, as well as what's required to make this and my other ideas work. Is there scripting involved? How do I create the exact effects I'm looking for? What should I be looking at learning how to do to make this a reality? I have basic knowledge of the CK, and have done some small scripting tutorials, but I just don't know what to pull from or look more into for this project.

I guess what I'm looking for is for someone with more knowledge of the CK to tell me if my idea is possible, and if so, what they think would go into making it a reality. If anyone could just give me some advice with this, I'd be very grateful.
User avatar
Horse gal smithe
 
Posts: 3302
Joined: Wed Jul 05, 2006 9:23 pm

Post » Fri Nov 16, 2012 10:46 pm

Interesting idea.

Yes you could do what you want.
Yes some scripting would be involved

This is reasonably complex, especially if you aren't an experienced modder.

You want to make a temporary increase (and decrease) to the SPEECH SKILL. But you don't want to actually make changes to the skill, only apply an enhancement to the skill

There is a RING in game which already enhances speech (sort of). But the implementation of it is a bit weird (it does not actually effect the Speech-skill, but calculations using the speech-skill also take into account whether or not the ring is being worn (for the life of me, I can't remember the name of the ring!).

It's going to be quite difficult to set out on these boards exactly what you need to do. We would end up having to write your mod. You should look at potions and magic effects, to see if you can figure out what to do (or at least some of what you need to do):

http://www.creationkit.com/Potion - wiki on potions (see Effects List at the bottom) and so http://www.creationkit.com/Effect_Item
http://www.creationkit.com/Magic_Effect - Magic Effects ... Can you figure out how to do an effect that increases or decreases the SPEECH skill? (You will need some scripting, as well)

That should at least get you started ...




(now I've written that, Justin or someone will come in here and offer you a one-line code solution ... you just watch ;))
User avatar
Olga Xx
 
Posts: 3437
Joined: Tue Jul 11, 2006 8:31 pm

Post » Sat Nov 17, 2012 10:17 am

Thank you for the help! I certainly don't want someone to write the mod for me, I just wanted to know if I was reaching too high. I'm happy to know that this is possible, and to have a point in the right direction! :biggrin:
User avatar
Danny Warner
 
Posts: 3400
Joined: Fri Jun 01, 2007 3:26 am

Post » Sat Nov 17, 2012 9:42 am

When the Player is wearing too much perfume as described, you could place an L_NavCut collision sphere around them which will make other actors back away until out of the collision sphere's radius. In addition to the speech penalty as h4vent suggested, the backing away would help approximate the repulsed reaction you're after.
User avatar
maya papps
 
Posts: 3468
Joined: Mon Aug 07, 2006 3:44 pm

Post » Sat Nov 17, 2012 9:56 am

That is a cool idea. I'll put it down in my list of things to try, thank you!
User avatar
Jaki Birch
 
Posts: 3379
Joined: Fri Jan 26, 2007 3:16 am

Post » Fri Nov 16, 2012 9:54 pm

Slight thread necro, but I thought this would be better than starting an entirely new topic.

I've been having a lot of trouble with the perfumes, so I thought I'd go back and work on basic scripting, getting a solid foundation so to speak. I put together a little basic script that uses some stuff from the tutorials on the wiki. I can't get it to compile, though. I hit this error:

pt01.psc(13,17): no viable alternative at input '\\r\\n'

the line it's pointing to is this:

 Event OnActivate(ObjectReference akActionRef) 

I can't figure out what I'mm doing wrong! I've managed to clear the other errors out of my script, but this one remains. May I please ask how to fix this one thing?
User avatar
Sabrina garzotto
 
Posts: 3384
Joined: Fri Dec 29, 2006 4:58 pm

Post » Fri Nov 16, 2012 11:43 pm

That line is fine. What comes either side of it?
User avatar
brenden casey
 
Posts: 3400
Joined: Mon Sep 17, 2007 9:58 pm

Post » Sat Nov 17, 2012 4:59 am

Ahhh, it looks like just above that line I made a typo. Thank you!

...of course now it's spitting more errors at me, but I don't want you all to have to write the script for me, so I'll figure it out myself.
User avatar
Glu Glu
 
Posts: 3352
Joined: Sun Apr 01, 2007 5:39 am

Post » Sat Nov 17, 2012 9:58 am

All right, yet another update for this thread.

I've managed to get a couple basic scripts working, so I thought I'd give the perfumes another try. I created a script that starts a quest that checks if an actor is not the player. Then I created another script that is meant to check if the quest script is true, and if so, to raise the player's relationship rank with that actor.

That's the part that I can't get to work.

Here's the script:

Scriptname JFEAPerfume extends activemagiceffect {Modifies player relationship with NPCS.}Quest Property PerfumeQuest  Auto int rank = 0Event OnEffectStart (Actor akTarget, Actor akCaster){raises relationship rank with all unique NPCS }rank = rank + 1    startQuest(PerfumeQuest) ;this checks if the actor is not the player    if PQuest== true ;if actor is not the player        int initrank = Actor.GetRelationshipRank ; trying to get the relationship rank for the actor        setRelationshipRank(game.getPlayer(), initrank +  rank) ;increase relationship rank    endifendEvent

I'm really sorry to ask for help again, but I'm so tired of bashing my head against the wall on this. What am I doing wrong? If you feel that I'm asking for too much help, please let me know. I want to figure this out; by all rights it should be a very simple script. I just can't seem to parse it.
User avatar
Richard
 
Posts: 3371
Joined: Sat Oct 13, 2007 2:50 pm

Post » Sat Nov 17, 2012 1:44 am

Questions is why we're all here mate ... you made a good start :smile:

Event OnEffectStart (Actor akTarget, Actor akCaster)
akTarget = The Object the spell was cast on
akCaster = The "Object" (Player or NPC) that ... casted

These variables get passed to your script by the game.


So you don't need much at all, to do this bit of what you want

Event OnEffectStart (Actor akTarget, Actor akCaster)int ranknow = 0int ranktobe = 0if akCaster == Game.GetPlayer();then the player is wearing the perfume;so get the current rankranknow = akTarget.GetRelationshipRank(Game.GetPlayer())	   if ranknow <4		 ;it can't be higher than 4		 ranktobe = ranknow + 1		 Game.GetPlayer().SetRelationshipRank(akTarget, ranktobe)	   end ifelse;player did not cast the spell - so do nothing?endIf

You should be able to figure out how to make your OnEffectFinish turn it back off ...?



(sorry ... btw, I'm definately not the best coder here, so someone ... else ... will be along shortly with a more elegant solution ;))
User avatar
kitten maciver
 
Posts: 3472
Joined: Fri Jun 30, 2006 2:36 pm

Post » Sat Nov 17, 2012 3:39 am

It works! Thank you very much! I was also able to finish the script to turn it off without problems. :)
User avatar
Jessica White
 
Posts: 3419
Joined: Sun Aug 20, 2006 5:03 am


Return to V - Skyrim