Consume meat.

Post » Mon Nov 19, 2012 1:27 pm

I want to make the Bosmer do 50% more damage and take 50% less damage when consuming meat. How do I accomplish this?

Also is it possible to give the Bosmer the werewolf feeding animation? If so, how?
User avatar
alicia hillier
 
Posts: 3387
Joined: Tue Feb 06, 2007 2:57 am

Post » Mon Nov 19, 2012 4:35 am

1. When consuming, or having consumed?? I assume the latter, but let me know and I'll help if so.

2. I believe you have to get involved with all manner of behind-the-scenes stuff (copy-pasting animation files and so on). I'm sorry I can't help here ... but have a search on something like "changing animations" ... there are a number of topics on here somewhere that should help you out (though I'm no where near 100% that you can do what you want, whatever you try)
User avatar
Gill Mackin
 
Posts: 3384
Joined: Sat Dec 16, 2006 9:58 pm

Post » Mon Nov 19, 2012 3:57 am

Hi H4vent, I meant having consumed. :smile:

Edit: Also I would like to make it once a day.
User avatar
Laura Tempel
 
Posts: 3484
Joined: Wed Oct 04, 2006 4:53 pm

Post » Mon Nov 19, 2012 3:44 am

NOTE: Someone may have a much better way to do this ... I'm all good with spells, but Perks are not something I have played with much ...


This is complex to write out ... but probably not so complex to actually do ... Post if you are struggling with a particular bit

That said, I think the easiest way is a Magic-Effect or a Perk?

(You could do it with a very long duration spell ... Which is no bad thing, as far as I know? ... I've not played with perks, but from what I read on here they are not as easy to implement as Spells and Magic Effects?)


http://www.creationkit.com/Perk
http://www.creationkit.com/Magic_Effect


But there is a bit I am not certain about ... When Food is consumed, what EVENT is received by the game-engine? OnEat??? http://www.creationkit.com/Procedure_Eat ... Is that even in use? If not, OnActivate?? Hopefully someone knows who has done this before? (For a book, there is OnRead ... )


Once you know what the event is, then you need to add a script to relevant food items ... And you need to think about how you do that:
  • You could just edit the vanilla food-items, giving them an Event (OnEat, if that is correct!!?) in a Script you place on each one
  • OR you could Dynamically Attach Scripts to relevant food items (though I'm not sure that is a good idea for what you want to do?): http://www.creationkit.com/Dynamically_Attaching_Scripts

So ... once you have decided on Magic-Effect versus Perk ... know what the event is ... and how you are going to attach the scripts to the items ... then you need to script the Activation of a the "spell" (or Perk), which is fairly straight-forward

And we need another script ... The script that does the work ... We need to put a script on your Magic-Effect (assuming that is what you chose!) which applies the two bonuses ONLY IF the character doing the eating has a Race of Bosmer (you could use Conditions, on the Magic-Effect/Spell, instead of script, for some of that).



But we're not finished yet!
Now you want the power to only activate once a day ... So you need to have a bit more thinking time ...
  • How long will the effect last? An hour, A day?
  • When you say "once a day", literally once a day, or once every 24-hours?

Whichever - it's up to you - you need to add one or two GlobalVariables to the game (time and day) that traps the TIME (and the DAY) that the Magic-Effect was fired (have a look at this example for the script to get day and time: http://www.creationkit.com/Complete_Example_Scripts#A_helper_script_with_functions_to_get_the_current_moonphase.2C_sync_between_the_two_moons_and_day_of_the_week)

So, back in the script to apply the bonus, you need to check those two variables and calculate whether enough time has passed BEFORE applying the Effect (another IF statement in the script on the Magic-Effect)

And if you are setting the Effect as Active, you need to update the two GlobalVariables with the current TIME & DAY


(Please note: I wrote this real quick, cos I am rushing out ... Have a long think and maybe ask for some more help - from someone - before you undertake a load of work!)
User avatar
Kanaoka
 
Posts: 3416
Joined: Fri Jun 16, 2006 2:24 pm

Post » Mon Nov 19, 2012 9:47 am

Thanks for taking the time to help. I will think on what you posted and try to attempt it. If it proves too difficult, then I won't implement the power.

Once again thank you for your assistance.
User avatar
James Rhead
 
Posts: 3474
Joined: Sat Jul 14, 2007 7:32 am

Post » Mon Nov 19, 2012 1:42 am

If you use a ReferenceAlias populated by the player, you can use the OnObjectEquipped event to detect when food and potions are consumed. Just conditionalize if the base object equipped was the food you care about and if so, continue along in your code. You could have that code apply a spell with a duration of 24 hours that would apply the bonuses mentioned above.
User avatar
Erich Lendermon
 
Posts: 3322
Joined: Sat Nov 03, 2007 4:20 pm

Post » Sun Nov 18, 2012 11:01 pm

If you use a ReferenceAlias populated by the player, you can use the OnObjectEquipped event to detect when food and potions are consumed. Just conditionalize if the base object equipped was the food you care about and if so, continue along in your code. You could have that code apply a spell with a duration of 24 hours that would apply the bonuses mentioned above.
For my own sanity:

OnObjectEquipped
^^^^^^^^ Works when eating food?

OnEat
^^^^^^^^^ Does not work or is not used?



Can someone confirm?
User avatar
Facebook me
 
Posts: 3442
Joined: Wed Nov 08, 2006 8:05 am

Post » Mon Nov 19, 2012 12:08 am

OnEat
^^^^^^^^^ Does not work or is not used?

According to the ck wiki's papyrus http://www.creationkit.com/Category:Papyrus page, onEat() doesn't exist

- Hypno
User avatar
Danny Warner
 
Posts: 3400
Joined: Fri Jun 01, 2007 3:26 am

Post » Mon Nov 19, 2012 10:10 am

According to the ck wiki's papyrus http://www.creationkit.com/Category:Papyrus page, onEat() doesn't exist

- Hypno
I'm right with ya ... but ...

... http://www.creationkit.com/Procedure_Eat


(I keep meaning to test it ... indeed, I may go do just that, right now :wink:)


Ignore me ... It's a package that almost certainly doesn't work ... I'll still test it though ... ;)
User avatar
Amy Cooper
 
Posts: 3400
Joined: Thu Feb 01, 2007 2:38 am

Post » Mon Nov 19, 2012 4:13 am

Eat is an AI Package, not a Papyrus Event.
User avatar
REVLUTIN
 
Posts: 3498
Joined: Tue Dec 26, 2006 8:44 pm

Post » Mon Nov 19, 2012 11:04 am

What you may want to do is look at Namira's Ring, and give bosmer something similar for free.
User avatar
Janeth Valenzuela Castelo
 
Posts: 3411
Joined: Wed Jun 21, 2006 3:03 am


Return to V - Skyrim