Jump to content

Photo

Couple questions on scripting

scripting newbie question

  • Please log in to reply
5 replies to this topic

#1
InsanitysMuse

InsanitysMuse

    Newbie

  • Premium Member
  • 11 posts

Hi all, I just really started poking around making mods for New Vegas a couple weeks ago (talk about late to the party), and saw that it looked fairly easy to make a mod centered on Perks. Haha, jokes on me right? :tongue:

 

So, after going through a bunch of tutorials, searching around, digging through a lot of the existing scripts/perks/effects of NV and the DLC, I've managed to make some progress. I'm trying to make a melee-combat oriented mod that JUST uses perks, to be as unambitious and unobtrusive as possible. Different styles with different perk lines etc. 

 

Anyway, there's a few combat-related scripting questions I haven't been able to find answers to so far. Partly because I can't find a reasonable list of scripting functions + attributes + whatever else. I have plenty of coding experience but without knowing the right terms it's pretty useless. There's the list of functions on the GECK wiki but it seems like there's a lot of other related information still missing.

 

One script/effect I'm trying to make is this: If the player (or whomever) has a certain perk, they have a chance to dodge or evade an attack, reducing most of the damage (very high DR for the triggering attack). I haven't been able to figure out how to piece this together on my own and it's a pretty major hang up for moving forward. I am also unsure of the specific way to do "single hit" boosts like this properly.

 

The second effect I'm trying to make is giving the perk owner a high DR vs creatures in a specific list. I've made the list but am having trouble figuring out how to get the identity of the attacker to test against it.

 

I've been working on these two problems for the better part of this week, I feel like the answers are there I'm just not putting them together. Any help would be much appreciated :smile:

 

Note: While nothing near a AAA+ mod (I'm reusing Perk Icon Art >.>) and primarily designed for my own use, I do plan on releasing the mod once it's up to snuff, for anyone who is missing a more varied melee combat option in New Vegas.



#2
Ladez

Ladez

    Useful Idiot

  • Supporter
  • PipPipPipPip
  • 1,856 posts

The GECK wiki can be a bit lacking in some areas, but I believe all the vanilla functions are documented there at least. I usually refer to this page, which holds links to a few useful subcategories. Gribbleshnibit has put together a comprehensive list of NVSE functions (including various plugins) here. That page is a godsend, before finding that, documentation on NVSE was hard to come by.
 

One script/effect I'm trying to make is this: If the player (or whomever) has a certain perk, they have a chance to dodge or evade an attack, reducing most of the damage (very high DR for the triggering attack). I haven't been able to figure out how to piece this together on my own and it's a pretty major hang up for moving forward. I am also unsure of the specific way to do "single hit" boosts like this properly.


Not entirely sure whether this will be possible. I would use an entry point to increase damage resistance and put a condition on it that calls GetRandomPercent. That should work in theory. Problem is, there's no entry point to modify DR. There's one for DT, but I don't think that is a good fit for this. You could create an ability to increase DR and use that instead, but then you'd be unable to put a condition on it, so that won't work either. To make this work, I believe you'd have to script the whole thing from bottom up and then you'd have to ask yourself if it is worth it to go through that much trouble.
 

The second effect I'm trying to make is giving the perk owner a high DR vs creatures in a specific list. I've made the list but am having trouble figuring out how to get the identity of the attacker to test against it.

This is easy, although you'd have to use DT instead of DR (read previous answer.) Set up an entry point with modified DT, then go to the Attacker tab and add a condition that calls IsInList and then choose your form list as a parameter.
 

Lastly, I think I should tell you that perks don't work properly on NPCs. They are only meant to be used on the player and, in a few isolated cases, companions. As far as I know, you can add, remove and check for the presence of a perk on all actors, but functionality wise, they will only work on the player. If you wish to add special abilities to actors and creatures, you'll have to achieve that through other means.



#3
InsanitysMuse

InsanitysMuse

    Newbie

  • Premium Member
  • 11 posts

Thanks for your reply. I haven't seen that NVSE list before so I'll go over it. I am interested in getting the dodge to work and was assuming I'd need to script it - I know there's a couple more comprehensive mods that add something like dodge and evasion (I think they completely nullify the damage so maybe there's a key difference), I may contact the authors and ask if I can look at their code. DT is an alternative but I'd just have to "max out" the DT to be safe which I think is 80% reduction in the end? Pretty high but maybe doable. 

 

Same thing with the list DR - shame there's no entry point for DR, which is why I was looking at scripting for that in the first place :P So many little things would make everything so much easier if they existed, haha. 



#4
Ladez

Ladez

    Useful Idiot

  • Supporter
  • PipPipPipPip
  • 1,856 posts

Yes, I really wish it was possible to add our own entry points. Custom actor values would be great too, while we're at it. All these workarounds get tiresome after a while. :)



#5
Hemingway308

Hemingway308

    Regular

  • Members
  • PipPip
  • 87 posts

Custom actor values would be great too, while we're at it. All these workarounds get tiresome after a while. :smile:

 

Custom actor values are great: http://geck.bethsoft...ex.php?title=NX :)



#6
Ladez

Ladez

    Useful Idiot

  • Supporter
  • PipPipPipPip
  • 1,856 posts

I wasn't aware of that possibility, it sounds great if all you want to do is associate some data with an actor that can be accessed elsewhere.

 

But what I really meant was that I'd like custom actor values, as in created through the actor value editor in the GECK. The main advantage of 'real' actor values as opposed to script variables, is that they can be used directly by base effects and have their effects shown - with the abbreviated name - in the Pip-Boy interface when hovering over an ingestible item. This would be the icing on the cake for me.

 

Actor values also have a full set of vanilla functions available for their modification, so you wouldn't need a third-party plugin (which is totally not a problem for me, personally, I love the functionality added by these things. But if I were to release something I would think twice about adding an additional requirement.)







Also tagged with one or more of these keywords: scripting, newbie, question

Page loaded in: 1.003 seconds