Jump to content

Recommended Posts

Yes, configuration feature should remain. The real matter we concern is performance drop. If it's reasonable enough we'll get a more convenient version of BA.

 

Well I'm not really sure if my pc is proper to test this. Not a bad computer, but stuttering enough even without BA. (25~35 fps from what I experience) damn too many mods are installed already...:[

 

I don't see any noticeable difference anyway. oh, it's somewhat misleading, if I see any difference then it's noticeable. Need some kind of extreme test I guess. Actually, The only memonte when the performance really matters is harsh situation like when there is a truck of women in a cell, etc. (I doubt this will drop just a single fps in typical situation)

Link to comment

Yes' date=' configuration feature should remain. The real matter we concern is performance drop. If it's reasonable enough we'll get a more convenient version of BA.

 

Well I'm not really sure if my pc is proper to test this. Not a bad computer, but stuttering enough even without BA. (25~35 fps from what I experience) damn too many mods are installed already...:[

 

I don't see any noticeable difference anyway. oh, it's somewhat misleading, if I see any difference then it's noticeable. Need some kind of extreme test I guess. Actually, The only memonte when the performance really matters is harsh situation like when there is a truck of women in a cell, etc. (I doubt this will drop just a single fps in typical situation)

[/quote']

 

I should probably mention something fairly important about the back-end design of Breakarmor.

 

1.05 and above were designed from the ground up to have precisely the same performance hit whether there were 1 NPC in a scene or 100. The only difference will be in how many times per second a given NPC will be scanned (a maximum of 1 NPC is scanned per frame).

 

The performance hit due to the 1.09 changes occurs only during the very first frame when a given NPC is scanned the very first time. Other than that, it is exactly the same.

 

So let's say that this new scan method has a huge performance hit (which I don't believe it does..although there is definitely a small hit) and you enter a city with 30 NPC within scanning range. Let's say you normally run at 30 fps but this new scan drops you down to 15 fps during the frame it is active. Ok, it takes between 2 and 5 seconds to run the new scan (1 NPC per frame, 2 frames per armor swap (which are not impacted by the 1.09 changes) so a maximum of 5 frames per NPC assuming that each NPC has BreakArmor upper and lower equipment) and then you're back to 30 fps.

 

Honestly, the more I look at the way I coded this change, the better I feel about it.

Link to comment

I just tried gregathit's packs with an ini. When i equip an armor from a pack another equip sound is played a little later. Is it some fighting between the ini and mesh detection script? Or is it supposed to be like this?

And it keeps doing it later when i run around in BU armor.

 

edit: a bandit just broke his mace trying to break the armor. There should be some kind of a break speed multiplier for player and for NPC's. I believe it was in v2... or somewhere else.

Link to comment

I just tried gregathit's packs with an ini. When i equip an armor from a pack another equip sound is played a little later. Is it some fighting between the ini and mesh detection script? Or is it supposed to be like this?

 

And it keeps doing it later when i run around in BU armor.

 

The sound you are hearing is the equip noise generated by the equipme OBSE function. Unfortunately' date=' that is the only item equip function that accepts temporary inventory formids as a reference.

 

The 1.0 to 1.02 versions of the script used EquipItemSilent. It works...OK...if the target has only a single matching armor item in their inventory, but if they have more than one, a whole lot of stupid happens.

 

And by stupid, I mean things like armor duplication, health values resetting to the object maximum, random crashes, etc.

 

It was ugly.

 

The solution (the stupid, stupid solution) was to completely destroy the equipped object and then create a new one and use the equipme to force the actor to equip it.

 

Do I like it? Nope. I really wanted to use EquipItemSilent. But this approach works, it's fast, it's got a very light system load, and is damn stable. So I can live with it. The sound that you are hearing is just the sound of breakArmor swapping meshes (or resetting the mesh to default if it doesn't know the last state).

 

BreakArmor currently purges NPC data periodically (it was the least computationally expensive way to manage data bloat). So if you're wandering around and suddenly hear the "ItemUp" sound for no apparent reason, your data was just purged and rebuilt. (Note, If you feel that the purge is happening too often, look for the following line in the ini file "set aaBACycle.ArrayPurgeDelay to 500" and set it to some larger number)

 

edit: a bandit just broke his mace trying to break the armor. There should be some kind of a break speed multiplier for player and for NPC's. I believe it was in v2... or somewhere else.

 

The intention of the BreakArmor framework isn't to make your armor break more quickly than it otherwise would, it's to swap meshes out as armor is damaged (or clothing as health is damaged).

 

An additional framework that magnifies damage taken by armor is likely to be computationally expensive (You'd need event handlers firing like mad during combat).

 

The less computationally expensive method would be to directly mod the base object durabilities, possibly using SetObjectHealth. This could...probably...be done. If several folks request this feature, I might be willing to code it in and have folks test it.

 

But my experience with Oblivion scripting so far is that unfamiliar functions never behave the way that you would expect.

Link to comment

As far as the mace vs armor, I agree that you probably need to take a look at the durability of both items and make some changes to your esp. You may have a mod installed that is ramping armor values up or perhaps ramping weapon damage\durability down.

 

While Gerra6 is quite the genius, I am worried that may be a bit of a brick wall to mess with since there are quite a few variables involved. One thing to remember, is that even if he managed to make something like this, the end user would still have to watch out that its scripting wasn't overwritten by a another plugin that also adjusts these things.

Link to comment
The sound you are hearing is the equip noise generated by the equipme OBSE function. Unfortunately, that is the only item equip function that accepts temporary inventory formids as a reference.

But why is it equipping when i run around in a fresh 100% healthy armor?

BTW, maybe it's possible to reduce those equips just for the player? Treat the player separately somehow? I remember those equip sounds from a Cursed Armor mod. Not a good thing to hear constantly.

The intention of the BreakArmor framework isn't to make your armor break more quickly than it otherwise would, it's to swap meshes out as armor is damaged (or clothing as health is damaged).

I realize you've coded a new BU system not because you wanted to break things faster... No, wait, it works faster then v2, so, technically, it breaks things faster xD

That's not a big problem ofcourse, we will just use armor destroying spells.

But my experience with Oblivion scripting so far is that unfamiliar functions never behave the way that you would expect.

Yeah, i tried OnActorEquip in my RHHS overhaul and found that one can't use update3d in a handler's script. :D

The problem was that update3d makes an NPC re-equip all it's items, and this generates other OnEquip events, they call the handler, it does another update3d... fantastic expirience in the result. :@

While Gerra6 is quite the genius' date=' I am worried that may be a bit of a brick wall to mess with since there are quite a few variables involved. One thing to remember, is that even if he managed to make something like this, the end user would still have to watch out that its scripting wasn't overwritten by a another plugin that also adjusts these things.[/quote']

I think it would be possible to script a special weapon enchantment or... script, that will damage target's armor for a percentage of it's health. And only if target is female.

Just for player use, and for having fun with nudeshy.

Link to comment

The intention of the BreakArmor framework isn't to make your armor break more quickly than it otherwise would' date=' it's to swap meshes out as armor is damaged (or clothing as health is damaged).

 

An additional framework that magnifies damage taken by armor is likely to be computationally expensive (You'd need event handlers firing like mad during combat).

 

The less computationally expensive method would be to directly mod the base object durabilities, possibly using SetObjectHealth. This could...probably...be done. If several folks request this feature, I might be willing to code it in and have folks test it.

[/quote']

 

No don't do that, Nudeshy has this feature as optional, and it indeed is expensive. Even I can sense the difference.

 

And as for many of custom BU armors (not vanilla) like BU pack ones, well, they are already fragile enough like the glass cup. if you ask me.

 

BTW, is it possible (or safe?) to swap weapon meshes? Just curious, What would happen if an actor is smashing a mace and suddenly you execute scripted unequip/equip?

Link to comment

But why is it equipping when i run around in a fresh 100% healthy armor?

 

In short? Because BreakArmor supports stock armors.

 

More specifically' date=' it is because BreakArmor supports an unlimited number of NPC's in the same scene wearing the same armor, with each NPC potentially displaying a different break state.

 

So when BreakArmor initializes your armor, it has no way of knowing which mesh is currently displayed (only the last mesh path of the base object). Note: after each BreakArmor event, the script does reset the base Object to the undamaged nif. Unfortunately, it doesn't always appear to work.

 

So I erred on the side of caution with an initialization mesh swap that is applied to all BreakArmor items, regardless of current health status.

 

Now, one thing that I *might* be able to do is add code that uses EquipItemSilent whenever the target ref has only a single armor item and reserve EquipMe for stacks. But I had such a horrible experience trying to get EquipItemSilent to work properly that I have a bit of an aversion to it at this point.

 

I realize you've coded a new BU system not because you wanted to break things faster... No, wait, it works faster then v2, so, technically, it breaks things faster xD

That's not a big problem ofcourse, we will just use armor destroying spells.

 

True enough. I'm pretty damn happy with how fast the mesh swaps are happening.

 

If I get bored I may play around with some code to allow users to add an armor health modifier...No promises. I'm worried it'll be a huge can of worms that I do not want to open.

 

Yeah, i tried OnActorEquip in my RHHS overhaul and found that one can't use update3d in a handler's script. :D

The problem was that update3d makes an NPC to re-equip all it's items, and this generates other OnEquip events, they call the handler, it does another update3d... fantastic expirience in the result. :@

 

Yep. The 1.0 to 1.02 BreakArmor onUnEquip/onEquip event handlers were a similar disaster and the cause of many merry crashes.

Link to comment
BTW' date=' is it possible (or safe?) to swap weapon meshes? Just curious, What would happen if an actor is smashing a mace and suddenly you execute scripted unequip/equip?[/quote']

I believe bad things happen. I crashed my oblivion by additem'ing a mace to an NPC that was in the middle of a strike with his 2-handed sword. I haven't even equipped that mace on him.

Gonna try it again. Just to be sure about this.

Link to comment
BTW' date=' is it possible (or safe?) to swap weapon meshes? Just curious, What would happen if an actor is smashing a mace and suddenly you execute scripted unequip/equip?[/quote']

 

Well, it is certainly possible. All of the code for handling the basic mesh swaps is present, I'd just need to change a couple of lines in the inventory scan for the engine to start checking weapons meshes against the database.

 

The trick, as you imply, will be timing. I think you're probably right... Since the mesh swaps would destroy the weapon for one frame, having this occur in the midst of a swing animation might be very bad. So I'd need to write some sort of special weapon swap queue that checks the actor's current state and only fires weapon swaps if the actor is not engaged in certain animations (I'd probably need a list of the animations to avoid).

 

Of course, the first thing to do would be to find out if the mesh swap causes a problem at all.

 

Hmm...it looks like

 

if currentNPC.AnimPathIncludes "attack" == 1 && currentNPC.AnimPathIncludes "cast" == 0
endif

 

would probably do the trick.

 

I don't forsee any major obstacles. The BreakArmor structure was actually designed with weapon swaps in mind as an eventual possibility, so all of the hard work has already been done. Let me know if you want me to put together a test version.

Link to comment

gerra6 so what naming should i use for mesh detection to work? I failed to find this out from your scripts.

 

I have two answers to that question.

 

1.09 Experimental uses the BreakUndies Vanilla armor naming conventions. To test it, simply remove the vanilla breakundies ini file and see if it works.

 

The next version 1.10 will look for a base mesh "meshname.nif" (The name given to 100% health armor) and append _ba1 to the name and do a check for meshname_ba1.nif (The name given to the first break state). If meshname_ba1.nif is found, it will then iterate the number until it fails to find a match.

 

The relevant code is in the "aaBABuildEqArray" function, which handles the analysis of equipment that has not yet been found in any of the NPC's equipment arrays.

 

It's a fairly complex function but this snippet is the new code that was added for 1.09.

 

It starts out with an infinite loop (while x), which is also used as the iterator variable. The only exits from the loop are the break commands that occur when any of the if statements fail.

 

 

let x := 0
let meGender := currentNPC.GetIsSex female
let CINifPath := GetBipedModelPath meGender BaseObject
if eval !( ar_HasKey aaBACycle.arr_FilePath CINifPath )
let x := 1
while x
	let tempPath := CINifPath
	let stringKey := sv_Find ".nif" tempPath
	if stringKey > 0
		sv_Insert "%g" x tempPath stringKey
		;1.10 code Change:
		;sv_Insert "_ba%g" x tempPath stringKey
		let x += 1			
		let filePath := "Data\Meshes\" + $tempPath
		if eval (FileExists $filePath)
			ar_Append aaBACycle.arr_TempFilePath tempPath
		else
			break
		endif
	else
		break
	endif

loop
endif

 

Link to comment

There's no loop in a source from 1.09 esp:

 

;BreakArmor.esp
;0x00080C
;aaBABuildEqArray
scn aaBABuildEqArray

string_var NPCKey
string_var CINifPath

ref currentNPC
ref InventoryObject
ref BaseObject

short meGender
short itemIndexSize
short itemHealth

short CIKey
short AQKey

;debug
array_var arr_eqRef

Begin function {currentNPC InventoryObject BaseObject}

;Debug
let arr_eqRef := currentNPC.GetInvRefsForItem BaseObject
let NPCKey := GetRawFormIDString currentNPC
let meGender := currentNPC.GetIsSex female
let CINifPath := GetBipedModelPath meGender BaseObject
if eval !( ar_HasKey aaBACycle.arr_FilePath CINifPath )
	ar_Append aaBACycle.NPCStateArray[NPCKey]["NoBAEquip"] BaseObject
	sv_Destruct NPCKey, CINifPath
	return
endif
;printc "Begin First Time Set Up %n " currentNPC + " InventoryObject %i %n " InventoryObject InventoryObject
;print "Array Size " + $(ar_size arr_eqRef)

ar_Append aaBACycle.NPCStateArray[NPCKey]["BAEquip"] BaseObject
let CIKey := ar_size aaBACycle.NPCStateArray[NPCKey]["Equip"]
let aaBACycle.NPCStateArray[NPCKey]["Equip"][CIKey] := ar_Construct StringMap
let aaBACycle.NPCStateArray[NPCKey]["Equip"][CIKey]["Ref"] := BaseObject ; Current Inventory Object

let aaBACycle.NPCStateArray[NPCKey]["Equip"][CIKey]["Paths"] := aaBACycle.arr_FilePath[CINifPath]			
let itemIndexSize := ar_Size aaBACycle.NPCStateArray[NPCKey]["Equip"][CIKey]["Paths"]
let itemHealth := call aaBAGetHealth currentNPC InventoryObject itemIndexSize
let aaBACycle.NPCStateArray[NPCKey]["Equip"][CIKey]["HIdx"] := itemHealth ; Last Known Item Health Key Index
;print "Initial Build InventoryObject.GetCurrentHealth " + $InventoryObject.GetCurrentHealth
if InventoryObject.IsArmor
	let aaBACycle.NPCStateArray[NPCKey]["Equip"][CIKey]["HVal"] := InventoryObject.GetCurrentHealth ; Last Known Item Health
else
	let aaBACycle.NPCStateArray[NPCKey]["Equip"][CIKey]["HVal"]:= 0 ; Clothing, so no item health
endif

let aaBACycle.NPCStateArray[NPCKey]["Equip"][CIKey]["ReEquip"] := 0 ; Toggle BreakArmor Re-Equip State
let aaBACycle.NPCStateArray[NPCKey]["Equip"][CIKey]["Delete"] := 0 ; Toggle Array Delete Status

let AQKey := ar_Size aaBACycle.arr_ActionQueue
let aaBACycle.arr_ActionQueue[AQKey] := ar_Construct StringMap
let aaBACycle.arr_ActionQueue[AQKey]["Object"] := aaBACycle.NPCStateArray[NPCKey]["Equip"][CIKey]["Ref"]
let aaBACycle.arr_ActionQueue[AQKey]["NPC"] := currentNPC
let aaBACycle.arr_ActionQueue[AQKey]["stage"] := 0
let aaBACycle.arr_ActionQueue[AQKey]["CIKey"] := CIKey	
;let aaBACycle.arr_ActionQueue[AQKey]["message"] := 0
let aaBACycle.arr_ActionQueue[AQKey]["message"] := 2

;Debug
;let arr_eqRef := currentNPC.GetInvRefsForItem BaseObject
sv_Destruct NPCKey, CINifPath	
;printc "End First Time Set Up %n " currentNPC + " InventoryObject %i %n " InventoryObject InventoryObject
;print "Array Size " + $(ar_size arr_eqRef)

end

 

Link to comment

I looked over vanilla Dawn/Duskfang script, but it doesn't seem to care about current animation at all.

 

I believe it's possible that it is replaced and auto-equipped when the player is swinging.. or doing whatever, by very slight chance. O.o I don't think beth had never thought about this.. Anyone experienced a bug with this matter? :huh:

Link to comment

OK, so I've been busy coding animation scripts for Blender and haven't touched this for a few days.

 

Here's what I'm thinking for the next version

 

1. Setting in the ini file that enables/disables the iniless file scan. So you'd get slightly better performance with the file scan turned off, a bit more convenience with the file scan turned on.

 

2. BreakWeapon support. Setting in the ini file to enable breakweapons.

 

3. Limited array purging for the Player Character. Remove the periodic unequip/re-eqip events for the player.

 

Thoughts, ideas, suggestions?

Link to comment

On my thinking, automated breakable armor detection gives me a special advantage for me. I can apply any different number of break stages for each armor.. whice was very hard in the previous BU or BA systems.

 

Since I don't see noticeable perfomance drop from ini, I'll remove my ini file in my next update.

 

..my next update? yeah, I've been busy for playing W40k games & Halo =P I work again from now on.

Link to comment

i still got one question:

now that i have breakarmor and BUvanilla' date=' i also want to "add" breakclothes vanilla...

so what do i have to do, except from adding the meshes named correctly into the folders?

[/quote']

 

It depends on the version you're using. For 1.08, you need the appropriate entries in one of the supported ini files. See the first post.

 

If you're using the experimental development test build (check page 9), then you just need to ensure that the files follow the correct naming convention and are dropped in the same folder as the armor that they break.

Link to comment

sure' date=' so i have the armor breaking properly and it works, but what about the clothes? those dont have a damage/durability variable. how can they be broken, what do i need to do, so they can get broken?

[/quote']

 

Oh. Now I understand.

 

The break clothing framework uses health and fatigue as a stand-in for durability.

 

The exact ratio is set in the ini file under the following entries

 

;Enable BreakClothing Support
;(Default 1)
set aaBACycle.BreakClothing to 1
;Enable BreakWeapon Support
;(Default 0)
set aaBACycle.BreakWeapon to 0
;Set Health Value Multiplier (Relative to Fatigue) for Break Clothing
;(Default 3)
set aaBACycle.CBHMult to 3
;Set Fatigue Value Multiplier (Relative to Health) for Break Clothing
;(Default 0.5)
set aaBACycle.CBFMult to 0.5

 

Now, Break Clothing won't actually do anything without clothing meshes that display the proper break states. To my knowledge, no one has yet put a package together.

 

So at the moment, taking advantage of Break Clothing would require you to either create the meshes yourself, or use some of the BreakUndies armor meshes that were based off of clothing meshes.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use