Jump to content

Trying to remove damage penalty from guns in low condition


trashgarbage666

Recommended Posts

Hey guys! Me again. I've been working on a combat overhaul mod for a while now, and one of the things I set out to do with this mod was to -- like the title of this thread suggests -- remove the damage penalty from guns in low condition. I have a rough idea of how it can be done, but I'm a little unsure of how to actually implement it!

 

But, before anyone suggests it, there are two game settings that appear to control the weapon condition penalty. However, altering them has no in-game effect. They are:

 

fDamageGunWeapCondBase - 0.66

fDamageGunWeapCondMult - 0.34

 

So that route is a dead end.

 

My idea was to give the player a damage buff equal to the amount of their current weapon's damage condition penalty, thus cancelling it out. I'm using JIP NVSE, which gives me access to a function called "GetEquippedCurrentHealth". It checks the equip slot you point it at, and returns the condition value of whatever item is equipped there.

 

http://geck.bethsoft.com/index.php?title=GetEquippedCurrentHealth

 

So obviously that command is going to come in handy. The only question is how to use it. My first instinct was to have the damage buff come from an unlisted / invisible perk, but I don't think perks can use JIP NVSE functions. At least I don't think they can. I would love to be wrong about that, though.

Edited by punchbattle
Link to comment
Share on other sites

I'm about to test a long script I've been writing, so I'll get into this in a bit, but for now:

 

First, let's try to use the new wiki:

https://geckwiki.com/index.php/GetEquippedCurrentHealth

I know that Google always gives the old one, but the new one is more up to date and the old one is missing a lot of information in some cases (not many, but enough).

 

And second, a lot of the added functions actually work fine in the drop-down menus for conditions on perks and effects and that. I would try it. If not, you can certainly use the JIP stuff in a script that gets attached to your perk.

Link to comment
Share on other sites

I'm about to test a long script I've been writing, so I'll get into this in a bit

 

There's no rush. Whenever's good for you is good for me!

 

First, let's try to use the new wiki

 

*shrug* In this case, both articles are identical. But I understand the sentiment.

 

And second, a lot of the added functions actually work fine in the drop-down menus for conditions on perks and effects and that. I would try it. If not, you can certainly use the JIP stuff in a script that gets attached to your perk.

 

Actually, I did try that. But the only thing appearing in the Condition Function field was the standard "GetEquipped" function. I didn't know you could affect perks remotely through a script, though! That sounds like a good place to start. I've never done it before, but maybe something will turn up on google!

Link to comment
Share on other sites

All right, I'm here.

 

So, yes, the new wiki is often identical to the old one, but that needs to change over time, and it is. Some articles on the new wiki are almost twice as long, though, and others just have more updated links. The real meat of the change for us as modders is currently the documentation of the new JIP functions, but you still don't want to land on one of the articles with less information or misinformation on the old wiki.

 

I'm looking into fDamageGunWeapCondBase, as it's mentioned in literally every discussion of the condition formula that I can find. How did you test this?

 

To script a perk is more or less the same as scripting an actor effect. In fact, if we do need to go that route, there's a tick box for those that makes the player start with it if it's set, so we may as well just use that instead of the perk form.

Link to comment
Share on other sites

I'm continuing to do research but you'll be pleased to have some confirmation that these settings worked in Fallout 3 and are actually broken in NV, so don't bother with them.

 

I'm going to pursue this line of googling:

fDamageGunWeapCondBase and fDamageGunWeapCondMult were still remains from FO3. In FONV they have no effect anymore.
The condition penalty instead is hardcoded now. PN can change it anyway because it patches the value with a NVSE plugin.
First the memory address pointing to the original condition mult is replaced so it points to a custom value we define instead. Then we add a new command that allows to change this value (PN_Get/SetConditionDamagePenalty).

 

From schlangster, quoted here:

https://forums.nexusmods.com/index.php?/topic/785576-modding-the-weapon-damage-formula/page-2

Link to comment
Share on other sites

I'm continuing to do research but you'll be pleased to have some confirmation that these settings worked in Fallout 3 and are actually broken in NV, so don't bother with them.

 

Haha, you beat me to it! Right after I finished typing out my whole testing method, no less.

 

I'm going to pursue this line of googling:

fDamageGunWeapCondBase and fDamageGunWeapCondMult were still remains from FO3. In FONV they have no effect anymore.

The condition penalty instead is hardcoded now. PN can change it anyway because it patches the value with a NVSE plugin.

First the memory address pointing to the original condition mult is replaced so it points to a custom value we define instead. Then we add a new command that allows to change this value (PN_Get/SetConditionDamagePenalty).

 

From schlangster, quoted here:

https://forums.nexusmods.com/index.php?/topic/785576-modding-the-weapon-damage-formula/page-2

 

Heyyy, that looks important! I'm acutally just heading off to bed, so I'll have to check it out tomorrow. But thank you for finding this! :D

Link to comment
Share on other sites

It seems we're going to have to download PN and look at this .dll file. It's likely going to be a little beyond my current knowledge, but I've been wanting to learn how to edit them anyway, so we'll see what happens after a little more research. Won't be able to do it for a bit, though, so if you want to start, go for it. Otherwise you can wait for me. Whatever suits you is grand.

Link to comment
Share on other sites

  • 3 weeks later...

Any news on this? Its rather annoying. A bullet doesnt give a flying F if weapon is in low condition or not, if it manages to fire it out without it blowing up, its gonna kill whatever it hits. -.- I also am working on some minor tweaks for FNV and removing penalty to it is one of them. Id rather just make some form of chance of gun blowing up increase as your condition drops, after which its gonna be scrap metal xD

Link to comment
Share on other sites

  • 2 weeks later...

Well, back in the FO3 era pretty much all NPC weapons were set to 10% condition or something. The way to nerf the NPCs so that the game doesn't actually ever end up hurting the player. You know, Big Boss Theory & the Hero Complex. Leveled lists control the inventory of the NPCs & inside those have the weapons with low condition. One side of the fence just raised the damage on all weapons until it was ridiculous. The other side edited the poor condition out of the lists that were in the NPC inventory which caused the problem. That's only vanilla weapons though. Replacing all the weapons has to be the third side of a two sided fence, and I have to be honest "I'm beginning to wonder". If it helps I typically believe that it's best to set a 1:1 ratio of player damage vs NPC damage. Then adjust DPS by the numbers of the combatants. 1.0 vs 1.0 when it's 1 vs 3 is 3x damage. Also more recently we began looking at the accuracy of shots fired either by bow or gun when it's the NPC doing the shooting. I know there were times it was a very high & very quick accuracy, which on the 1:1 or 1 vs 3 means instant player death, the primary problem when competing against the computer, because it's quicker at that sort of thing. Also I tend to favor a set of weapons for the player only, and then a completely different set of hidden weapons the NPC uses, which allows a much tighter balance to be set, then drop the deathitem as the same weapon only for the player/companion/misc, a duplicate that gets dropped & maybe some actor picks it up instead of the lame hidden weapon. Idk. I'll have to read more.

 

 

Also, fairly cool. Is the weapon distance settings which tells the combat Ai at what distance an actor can or can not use a particular weapon. If the actor had 3 different weapons which had set this limitation so that as the actor moved up to the player to attack then the actor would switch thru weapons just the same way that the player does in long/med/short/melee/unarmed ranges. Thus bolstering the fight or flight parts of the Ai because of search/attack/charge/flee/flank/ect parts of the Ai & the general desire to make the Ai behave erratically at times to provide a different type of difficultly. It's fairly comprehensive work to do these types of things. Same reason none of the actors use ammo, because it's less work to just make them arcade, but the computer can do math quite fast. Hundreds of counts of ammo per frame I would guess, cause it's small potatoes. It's built into the .exe to do that. It's just a guess, but yeah. Fairly bolstered toward having young people play the game as an arcade simulation, instead of the lean toward simulation we tend to enjoy more. I couldn't think of anything else to say, sorry.

Edited by ZeroAndOne
Link to comment
Share on other sites

Well, back in the FO3 era ... Also I tend to favor a set of weapons for the player only, and then a completely different set of hidden weapons the NPC uses, which allows a much tighter balance to be set,

 

 

Hmmm interesting to set up different weapons for NPC's and Player.

 

But I have a question quite a bit off topic , because you seem rather knowledgeable to what the engine is capable of. Which is about how much processing can go on between NPC interaction outside the 5x5 cell grid that is loaded around the players location (cell depth) And to be clear ... this is for the Fo3 version of the engine.

 

What I am trying to be able to achieve is some level of combat calculations happening between actors that are not within the cell depth of the player. Exterior cells only of a small world map with player also in that small world map ... Where a few npc's that are hostile to each other running a guard , patrol , follow or travel packages ... happen to come within combat distance of each other.

 

And it looks like they all need be flagged as a quest item , so they are always loaded ?

So say maybe up to 30ish actors at one time ... flagged as a quest item running AI packages all at the same time. Do you think that would even be possible ?

Link to comment
Share on other sites

  • Recently Browsing   0 members

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