Scripting - Forum

Logged in as Guest | Group "Guests" | RSS
Thursday, 08/12/2016, 06:08













Home | My profile
[ New messages · Members · Forum rules · Search · RSS ]
Page 1 of 512345»
Forum » What you'd like to see » What you'd like to see » Scripting
Scripting
gentesterDate: Wednesday, 12/09/2012, 19:51 | Message # 1
Sergeant
Group: Administrators
Messages: 37
Reputation: 0
Status: Offline
Hiya Bert

Was wondering if you know any way with scripting to make a custom container respawn 2 custom items every day? I'm doing a farm mod and have made a custom container (a large milk bottle) by using a flora with a custom nif so that it can be harvested and have a couple of bottles of milk every day but can't work out how to script it - of course it would help if I had the faintest idea about papyrus sad

Any ideas would be gratefully appreciated.
 
berticus0001Date: Thursday, 13/09/2012, 01:06 | Message # 2
Lieutenant
Group: Administrators
Messages: 49
Reputation: 0
Status: Offline
Ok, I was going to do the whole picture by picture thing but looking at your farm I figure you probably know enough to just tell you!
Make your milk bottle a static instead of a plant, make a new trigger around the bottle (you should probably make it a sphere in the <Primative> tab when you make it <Player Activate> as the engine has a problem with cube triggers a lot of the time!!) and call it something like "Collect Milk", though you probably want to put the "Collect" in the <Activate Text Override> or whatever it is at the bottom of the triggers base window (way down below where you put the name) and just "Milk" in the name, that way it won't say "Activate", just "Collect"!!
Download THIS and in it you'll find the 2 versions of the script, the .psc goes in the source folder and the .pex goes in the scripts. (You have to restart the CK for it to find the new script!)
In the "Collect Milk" triggers scripts tab, add this script "GTscrpt2PintsADay" and either in the "MilkPot" or "MilkIng" (thats Pot for potions and Ing for ingredients) find your new milky thing and select it (if it exists in both, only pick one and clear the other!!!), then in the sounds one I'd go for ITMGenericPotionUp (or something like that), and that'll provide a nice bit of audio.
When you activate it in-game it'll give you 2 milk and a message telling you what you got and to come back tomorrow for more, then it'll disable itself so you can't activate it again for 24 game hours then re-enable itself, ready to go again!
Let me know how you get on and I'll take another look at the cows tomorrow!
 
gentesterDate: Thursday, 13/09/2012, 13:54 | Message # 3
Sergeant
Group: Administrators
Messages: 37
Reputation: 0
Status: Offline
oooohhh

Off to play biggrin

You're a star hands

OK Used a noble shelf static to put the nif for the milk bottle onto. Set up the trigger around it but it was a wee bit too small so grew it a tadge, and moved it off to one side a bit to make sure it was big enough, then moved it back. Did all the rest of the steps but when I go in game the bottle just sits there with nothing coming up when I look at it - no Milk or Collect Milk or anything. Should I have used some other type of static or should I not have moved the trigger out? Or should i have otherwise linked the trigger? And how/where do I link it to the item itself as I can't see any mention of my actual item anywhere in the trigger or in the script so it dosen't know what to hand out I don't think.
My actual milk is ID 00BridgeFarmMilk Name Milk. Its a Alchemy Type Potion - or that's how I've set it up anyway. VendorItemFood etc. It has all the right sounds attached to it a PickUp and a Putdown.


Message edited by gentester - Thursday, 13/09/2012, 17:12
 
berticus0001Date: Thursday, 13/09/2012, 18:42 | Message # 4
Lieutenant
Group: Administrators
Messages: 49
Reputation: 0
Status: Offline
Hi Gen, I'm afraid I'm off out in a mo' but I'll take a look as soon as I get in later. I did wonder if it would turn up or need to be added to a list fist as soon as I posted (I used a standard wine so it was obviously already in there, I though it was taking from the standard potion or ingredients object lists rather than a formlist, Doh!), so I'll hunt that down and let you know where it needs to be added.
 
gentesterDate: Thursday, 13/09/2012, 21:36 | Message # 5
Sergeant
Group: Administrators
Messages: 37
Reputation: 0
Status: Offline
I'm just grateful for the help

one thing though - you said
""In the "Collect Milk" triggers scripts tab, add this script "GTscrpt2PintsADay" and either in the "MilkPot" or "MilkIng" (thats Pot for potions and Ing for ingredients) find your new milky thing and select it (if it exists in both, only pick one and clear the other!!!), ""

I didn't understand that bit as couldn't see where I select it?

Bit of a dunce here I fear
 
berticus0001Date: Friday, 14/09/2012, 21:49 | Message # 6
Lieutenant
Group: Administrators
Messages: 49
Reputation: 0
Status: Offline
Hi gen, sorry for the delay. man my head hurts!! holiday

Ok, I've used a couple of pics this time, steps 1 & 2 you have done so step 3:
Double-click the trigger to open it's properties and go to the <Scripts> (4) tab at the end, then select the new script you should have added (5) and click <Properties> (6) and that will open a new window, select "MilkPot" (7) and over the other side click <Edit Valu> (not in the pick, it's where you can see <Clear Value>, thats what it changes to) and in the drop-down box select your milk (8).

Now in the "Harvest Sound" options drop-down select "ITMPotionUp" as the sound on the bottle object doesn't get used when doing a direct "AddToPlayer"!

And that should be it, try it out and let me know how you get on! biggrin
 
gentesterDate: Friday, 14/09/2012, 23:57 | Message # 7
Sergeant
Group: Administrators
Messages: 37
Reputation: 0
Status: Offline
Good night out then? biggrin

Botheration.

Still can't see anything in game when I look at my milk bottle sad

Potion is there as its shown in your pics 1 & 2.
My pic 3 is different....... Mine has the Base Object as Milk. Not sure how i managed that as I thought I'd followed your instructions. I'll see what I can come up with, the other steps as in the pics and in your description have been done. But When i look at the big milk bottle in game I see nothing to activate.

YIPPEEE
GOT IT... Um I think the trigger wasn't big enough tongue

That's brilliant thank you so much love

And if you feel like doing cows....... lol tongue respect

I really wish the peeps who wrote the papyrus tutorials would start at the beginning with really simple terminology and proper explanations - I haven't touched any form of coding for nearly 30 years and most of it just goes straight in one eye and out the back of my head without pausing en route........ biggrin


Message edited by gentester - Saturday, 15/09/2012, 00:55
 
berticus0001Date: Saturday, 15/09/2012, 04:34 | Message # 8
Lieutenant
Group: Administrators
Messages: 49
Reputation: 0
Status: Offline
Got the milking animations sorted(ish), though you have to jump to stand up when finished, for some reason I just can't find the right release yet!
Just wondering how often you want the cows milkable? If you've got more than 3 or 4 maybe once every 3 days or so would be better so your players can't OD! biggrin
 
berticus0001Date: Sunday, 16/09/2012, 00:16 | Message # 9
Lieutenant
Group: Administrators
Messages: 49
Reputation: 0
Status: Offline
And now for some milkable cows! biggrin

You can grab the script and a test esp HERE, to test it out install the file as normal (basically copy everything inside the <Data> folder in the zip into your skyrim <Data> folder) load it up and go activate the cow just up the stairs from the market in Whiterun. It doesn't have a thing that says "milk me" or anything though, the only thing I can get it to do is say "Talk" which isn't quite doing it, so just activate the cow!
You can add this script either to each cow that you want milkable or you can add it to the cow base actors and then all cows will be milkable!!!

OK, so just add the script to your cow and set the settings: images below!

I should point out that if you use the static bucket option at the very bottom of these images you don't need a regular one below, which gets kick if the cow moves.
















I've only tested on maisy in whiterun so try it out on your herd and let me know how it goes!
Also, I used ale as I don't have milk! biggrin
 
gentesterDate: Sunday, 16/09/2012, 15:47 | Message # 10
Sergeant
Group: Administrators
Messages: 37
Reputation: 0
Status: Offline
Ohhhh I shall have a play tomorrow. I'm tired tonight so i know I'd bugger something up if I tried it biggrin

For some reason I got both of these messages together just now so sorry I didn't respond quicker smile

The mind boggles at the idea of milking beer from a cow - mind you I know a few who would love that idea! tongue

Added (2012-09-16, 3:47 PM)
---------------------------------------------
Ok script works just fine, got my 1 milk from each of my three cows - crouched etc (much to Seranas complete astonishment biggrin )

Well done. Milkable cows for the first time in Skyrim smile

only problem I have is with the way I'm facing.
My three cows are in a field and their own animations mean they move around.
So if I have this right I have to use something immediately under the cow to make sure I'm facing the right way? I will try with an x marker as they can't knock that over and its not visible - field would look odd with static or otherwise buckets set up under each cow :p... I can see xmarker in the list to click but can't see how to pick which individual one I want to use though. Quick way round it it, make 3 individual small statics and bury them just under the grass - will try that

Worked perfectly holiday


Message edited by gentester - Sunday, 16/09/2012, 18:49
 
berticus0001Date: Sunday, 16/09/2012, 21:41 | Message # 11
Lieutenant
Group: Administrators
Messages: 49
Reputation: 0
Status: Offline
Heh, no, the xmarker and bucket are generated when you activate the cow and then deleted when you stand up, you don't end up with buckets and xmarkers (which are invisible) all over the place!! lol
The thing with the static bucket is just that it wont get kicked over if the cow moves, but it's fine detail (read: me being anal!), if you just follow the images it's fine as it is, no extra markers or anything are needed, the script adds and deletes everything it needs!
I'm still looking at making the cows stand still while you milk them, think I've got something, I'll let you know!
 
gentesterDate: Wednesday, 19/09/2012, 16:20 | Message # 12
Sergeant
Group: Administrators
Messages: 37
Reputation: 0
Status: Offline
ummm shy I can be a clutz sometimes, changed it to xmarker

For using a static bucket I guess I would have to make one but not put it in game. I may leave that for now or I am likely to clear it when cleaning out duplicates and stuff before finalising - but it sounds easy enough to add one just before releasing it.

Added (2012-09-19, 4:20 PM)
---------------------------------------------
Just to let you know...my three cows get milked perfectly, and kicking the bucket over occasionally seems to add to the realism quite nicely biggrin

I am singing your praises to one of the moderators on the SKYRE forum as she was looking for exactly the same script....so long as its after the competition tongue

Ohh by the way I found a nice resource for glass panels and built a greenhouse with a gabled glass roof and wall and then put in window glazing bars as well, was a bit fiddly but it looks really good.. smile I'll send ya a screenie. If you want the resource link just shout. Was thinking of a conservatory for my next mod...a kind of victorian edifice thing - and no I'm not going to build Crystal Palace!
ummm - now there's an idea...should keep me quiet for a bit.

 
berticus0001Date: Thursday, 20/09/2012, 03:43 | Message # 13
Lieutenant
Group: Administrators
Messages: 49
Reputation: 0
Status: Offline
Bugger!!!! A thought just occured to me so I went and checked it out, if you kill a milk cow you still get the milking when you activate the dead body for the meat and hide!! I'll take a look at it and see if I can add a "if actor is dead..." thing to it.
I'll leave trying to get the cow to stand still as well then as you like the realism, it wasn't working properly anyhow, sometimes it would and othertimes it wouldn't so, meh! biggrin
Also, Crystal Palace!! Hmm... I've been playing with ideas for my gaming palace, and that would do nicely! Maybe not the whole thing as It'd need the actual games to be "inside" cells to lighten the cpu load, but a nice open glazed entrance hall would be nice! Plus the fact that I live within throwing distance of the original is kinda apt, don't you think?
 
berticus0001Date: Thursday, 20/09/2012, 07:24 | Message # 14
Lieutenant
Group: Administrators
Messages: 49
Reputation: 0
Status: Offline
Hokayyy, got the "IsDead" thing sorted and left in the "stand still cow" bit. The "stand still" is a bit hit and miss, if you get too close before activating, it'll sometimes start the "I should get out of the way" package before my "stand there and chew the cud" package and totally ignore it!

Cow Milking V.1.1
Same setup as before, so it shouldn't be any bother to change, just let it overwrite the previous version and you shouldn't even need to re-set the settings! biggrin
 
gentesterDate: Saturday, 22/09/2012, 15:44 | Message # 15
Sergeant
Group: Administrators
Messages: 37
Reputation: 0
Status: Offline
Thank hun you're a star respect

Sent you a pm with a file re glass and a couple of screenies

Added (2012-09-22, 3:44 PM)
---------------------------------------------
sent a contact to your skype, been on there for years no idea how I missed you were as well.

Now...as you're on a roll...and I'm nothing if not cheeky (don't ask don't get etc) smile

Is it possible (and if so how?) to adapt the milking script to produce 2 different items. Milk and Cream. Already got the items.

And
in a similar vein. someone suggested I nick a beehive from GoldenGlow estate, no idea how they work as last time I went there I just steamrollered through the place but assuming I get one and they aren't already scripted in vanilla (I'll check) would it be possible to adapt the 2 pints a day script to get say 1 honeycomb every 3 days or something like that. Plonking bees in is easy just put a spawn point underneath it or close by it only has to look as if they live there.

I'm going to have to teach myself a basic level of texturing as well...I dunno why but I seem to be busier since I stopped work than I ever was when I was working full time biggrin


Message edited by gentester - Saturday, 22/09/2012, 15:46
 
Forum » What you'd like to see » What you'd like to see » Scripting
Page 1 of 512345»
Search:

Copyright MyCorp © 2016