Jump to content

Is there a function like ModAV for items?


devinpatterson

Recommended Posts

Would anyone know if there is a function similar to modav or forceAV for items instead of actors? I'd like to be able to upgrade an an armors DT, health, etc.

 

Apocalyptic Girl and I are working on a armor mod with a mulitude of upgrades, making recipes impractical with all the possible combinations. There will probably only be 3 upgrades allowed, but the choice of upgrades from the pool may range upwards of 20. Most of these upgrades are rather simple (mostly bonuses to dt, armor health, +% to sneak, melee etc), but some will have base effects like chameleon, or imagespace like cat-eye (low light and if possible infra-red).

 

Is there a way to add an enchantment to an item (the armor) via a one time script (ie the upgrade item)? If not I was thinking of using tokens and hoping the tokens could be linked to the armor (so they would be removed when the armor was unequipped).

 

Originally I was thinking of having all three of the upgrades installed at once via a recipe at the workbench. But if there were, say a total of just 10 upgrade choices, that would be 10x9x8=270 possible recipes :down: I could do like 10 basic suit type (a stealth suit, a melee suit, a heavy weapons suit) recipes, but I'd still rather not clutter up the recipe list. Is there a way to remove recipes from a list after an item is fashioned (the armor will be a one time craft item)?

 

So I'm hoping someone will have some insight to the best way of doing this.

Edited by devinpatterson
Link to comment
Share on other sites

Would anyone know if there is a function similar to modav or forceAV for items instead of actors? I'd like to be able to upgrade an an armors DT, health, etc.

NVSE has; GetArmorAR, GetArmorDT, SetArmorAR, SetArmorDT, GetHealth, SetHealth

Is there a way to add an enchantment to an item (the armor) via a one time script (ie the upgrade item)? If not I was thinking of using tokens and hoping the tokens could be linked to the armor (so they would be removed when the armor was unequipped).

I don't think there's a way to change the armour effects. Shame as it's nice to see the effects listed with the armour in the pipboy.

Tokens would work. Another way could be to add a perk that only gives the effect when the armor is equipped.

Link to comment
Share on other sites

NVSE has; GetArmorAR, GetArmorDT, SetArmorAR, SetArmorDT, GetHealth, SetHealth

 

That's cool, I could have an upgrade (lets call it nano carbon fiber) that has an attached script. I want it to add say +3 to dt. I could use GetArmorDT, to get the current value (call it X), and use SetArmorDT to X+3. Good deal :thumbsup:

 

Is there a way to add an enchantment to an item (the armor) via a one time script (ie the upgrade item)? If not I was thinking of using tokens and hoping the tokens could be linked to the armor (so they would be removed when the armor was unequipped).

I don't think there's a way to change the armour effects. Shame as it's nice to see the effects listed with the armour in the pipboy.

Tokens would work. Another way could be to add a perk that only gives the effect when the armor is equipped.

 

Tunaisafish would you have a suggestion for a tutorial on tokens? How would you recommend removing the tokens effects when the armor was unequipped? I think they would work well since they would be in the opponents inventory. I probably wouldn't even need any special world model, maybe just sensor or fuse or something. The downside would be a little extra clutter in the player's inventory?

 

The perks sound interesting, but I'v never made one before. Perks can pretty much do anything from simple stat bonuses to special effects like cateye/lowlight vision right? Aren't there also unlisted perks that don't show up in the player's perk list? That sounds like it would be the least intrusive (nothing hanging around in inventory like tokens, especially if they don't show up in teh perk list).

 

It seems like it *could* be pretty simple. Have an item (the upgrade) with a attached script that has a check counter if <= 2, player.addperk (the upgrade effect), a player.removeitem (get rid of the upgrade) and adds 1 to the counter (so they can't add more than 3 upgrades, msgbox if they already have 3 upgrades). In the mod the upgrades can't be uninstalled once utilized, so that works well with the script. All the perks would have, as one of the conditions, the armor equipped. It sounds like a very good solution. Am I missing any obvious downsides (other than making a lot of perks)?

 

Thank you very much Tunaisafish, I honestly don't think I would have stumbled on the perks solution. I really appreciate the help :thumbsup:

Link to comment
Share on other sites

Here's a good explanation of tokens.

Another use for tokens is for menu's. The first time I read about tokens for fallout was on Cipscis' tutorial for menu's. It was later that I learned that token just generally means unplayable armour. So no they won't be seen in the inventory, and you don't need to specify a model at all when you create the armour baseform.

 

Tokens can be used to run scripts, or just used as a property of an actor by its' presence in the inventory.

I'm not actually sure if tokens can be equipped via script as they don't normally have any biped nodes checked. If they could be then adding some of your object effects to the token would be straightforward. player.equipItem nighteyetoken

 

Using hidden perks would be easy as you could just add the perk to the player and forget about it. To get them not to show use

[ ] Playable

[x] Hidden

... and yep create a GetEquipped condition on the armour as you say.

The downside is that you can only use perks with the player (and companions with some extra fiddling). You're also limited to what perk effects are already available. I don't think there's one for nighteye but may be wrong.

 

For bonus's that cannot be done via perks, then the scripting could be in the armour itself.

Use an OnEquip block to apply the effects, and remove the effects in both the OnUnEquip and OnDrop blocks.

You could use a non-running quest script that just declared the state variables to keep track of upgrades. ie. int upgradesActive, int Upgrade1On, etc.

 

I think this is one of those projects that have umpteen ways in how it could be coded :)

 

This reminds me in a way of Imps Powered Power Armor mod. I've not looked at what techniques he used in that but had lots of fun playing it.

Link to comment
Share on other sites

Tokens

 

Thank you, I have a feeling info on tokens will come in handy in a lot of future work

 

You're also limited to what perk effects are already available. I don't think there's one for nighteye but may be wrong.

 

Damn, I do need a lot of new perks. Why are we limited to what available instead of creating new perks

 

I think this is one of those projects that have umpteen ways in how it could be coded :)

This reminds me in a way of Imps Powered Power Armor mod. I've not looked at what techniques he used in that but had lots of fun playing it.

 

Good deal, I'll check out an Imps as an example.

 

Thanks for hte help once again Tunaisafish, if you have any info on why I can't use new perks (created for this mod) or a way around it I'd greatly appreciate it

Link to comment
Share on other sites

Thanks for hte help once again Tunaisafish, if you have any info on why I can't use new perks (created for this mod) or a way around it I'd greatly appreciate it

 

YVW devin :)

 

You can create a new Perk, but it's the perk abilities and entry point effects available that are hardcoded functions. There are a lot in the list to choose from that would be good for an armour mod though, and you can combine effects and adjust the magnitude of many through the function data. The wiki explains some of the functions. For others you might need to check how they are used in-game.

Link to comment
Share on other sites

Thanks for hte help once again Tunaisafish, if you have any info on why I can't use new perks (created for this mod) or a way around it I'd greatly appreciate it

 

YVW devin :)

 

You can create a new Perk, but it's the perk abilities and entry point effects available that are hardcoded functions. There are a lot in the list to choose from that would be good for an armour mod though, and you can combine effects and adjust the magnitude of many through the function data. The wiki explains some of the functions. For others you might need to check how they are used in-game.

 

Ahh I see. Too bad one of the entry points couldn't be a script or object effect. I checked bethesdas geck page on entry points but there must be a lot they are leaving out. Only about 40 or so and some of those are unimplemented. And as you mention I don't see any in re: to visual effects like cateye. I don't see anything on that page that would relate to a lot of the perks I use like quickdraw, handloader etc. Maybe the geck itself will have more. Thanks again Tunaisafish, it looks like tokens may be the way to go, but I'm certainly glad for the info on perks as well.

 

EDIT: but then again there are ability perks and cateye is a base effect, so maybe I could go that route?

Edited by devinpatterson
Link to comment
Share on other sites

  • 2 weeks later...

You could have an object effect on the armor that has conditions for something like getglobalvalue and you set global values when the armor is upgraded in-game?

 

Just an idea of a way to do it easily without NVSE or anything

 

Hi Dandy's, thanks for the reply. I'm new to scripting and I was wondering what advantage a global var would have over a quest var? Thanks for helping me out

Link to comment
Share on other sites

You could have an object effect on the armor that has conditions for something like getglobalvalue and you set global values when the armor is upgraded in-game?

 

Just an idea of a way to do it easily without NVSE or anything

 

Hi Dandy's, thanks for the reply. I'm new to scripting and I was wondering what advantage a global var would have over a quest var? Thanks for helping me out

 

For something like this sure you could use a quest variable as well. I tend to prefer global variables as they're actually separate forms whereas quest variables are just part of the scripts or something, so if you ever change the quest variable or get rid of it all of the references to it will be messed up whereas with global variables that won't happen.

 

Either way check it out it might work.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...