Trying to understand DamageObject and related functions

Post » Tue Sep 22, 2015 2:29 pm

I'm trying to understand how DamageObject affects ObjectReferences, but after looking at the Creation Kit Wiki, examples, etc, I still can't understand quite what the Integer value does. I set it to anything below 1.0 and nothing happens. This makes sense. However, I set it to 1.0 or above (5.0, for example, below) and GetCurrentDestructionStage() always returns 1.0. Why?

Here is the script I'm using:

ScriptName ACGSpellBrisingr extends ObjectReferenceObjectReference refBurningOilEvent OnInit()		refBurningOil = SELF.PlaceAtMe(Game.GetForm(0x000862CC)) ; xMarker position, 0x000862CC = oil		RegisterForSingleUpdate(0.5) ; 0.5s delayEndEventEvent OnUpdate()		refBurningOil.Enable()		refBurningOil.DamageObject(5.0) ; Makes oil start to burn		Debug.Notification("Damage Stage: " + refBurningOil.GetCurrentDestructionStage())		SELF.Delete() ; Destruct xMarkerEndEvent

I created an Explosion object which I attached it to. The Explosion was attached to a Magic Effect, which in turn was attached to a spell.

I've seen a few examples of DamageObject's usage in many of the game's script files, but the values don't seem to make any sense.

Also, while I'm here, can someone explain how Destruction stages work exactly?

Sorry if this has already been discussed. I couldn't find any sort of search bar...

Edit: I found the search bar...up the top. :P

Thanks in advance. :smile:

User avatar
xxLindsAffec
 
Posts: 3604
Joined: Sun Jan 14, 2007 10:39 pm

Post » Tue Sep 22, 2015 6:44 am

for all i know, destruction is not used in skyrim, except for player enhanced weapon and armor, which gives item conditions > 100

User avatar
marina
 
Posts: 3401
Joined: Tue Mar 13, 2007 10:02 pm

Post » Tue Sep 22, 2015 6:07 am

Destruction Data is used in Skyrim. See the FXspiderWebKitActorDestructible or StockadeBarricade01Activator activator.

  • To make an 'object' destructible, it must be an Activator.
  • Click on "Edit Destruction Data". In the Destructible Object Data window you can now define the amount of starting 'health' points this 'object' will have (under Health) and don't forget to Enable it.
  • Now right-click on the list and choose 'New'
  • In the Destructible Object Stage define your new destruction stage.
    • Health Percentage: on what amount of remaining health percentage this Destruction Stage will be set.
    • Model Damage Stage: The Damage Stage. 0 (zero) is the one with 100% health, 1 the next stage with a health% lesser than that in stage 0, 2 the next stage with a health% lesser then in stage 1, ....
    • this Damage Stage could be retrieved by http://www.creationkit.com/GetCurrentDestructionStage_-_ObjectReference, it is a simple 'index'
    • Explosion: an explosion that can be placed to show the ongoing damage of the 'object'
    • in Replacement Model you can specify a model which replaces the current model with this, if this Stage is reached.
    • and play around with the other properties :D

To damage the 'object', you can hit it by weapons. The amount of damage (the amount of health points that are subracted from the starting health) depends on the weapon type or if a power attack was made. To damage an 'object' by script use the http://www.creationkit.com/DamageObject_-_ObjectReference function.

Hopefully this helps you to understand the Destructible Data a little bit. :thumbsup:

-docblacky

User avatar
Your Mum
 
Posts: 3434
Joined: Sun Jun 25, 2006 6:23 pm

Post » Tue Sep 22, 2015 7:31 am

guess i got that confused with "isn't used for weapons", sry 4 bs :-)

User avatar
Jennifer Munroe
 
Posts: 3411
Joined: Sun Aug 26, 2007 12:57 am

Post » Tue Sep 22, 2015 8:17 pm

You can't add a Destruction Stage Object to weapons. But as far as I know, the 'improvements' (Fine, Superior, and so on) for weapons and armour (applied at the Grindstone and Workbench) are ruled by Destruction Stages. Correct me if I'm wrong.

User avatar
tannis
 
Posts: 3446
Joined: Sat Dec 09, 2006 11:21 pm

Post » Tue Sep 22, 2015 12:31 pm

oh boy... ok what i meant was "item condition", like "this gun 50% good" in fo...

going to bang my head against a wall now, pls correct me if it's not a wall i'm banging... :-)=)

User avatar
Laura Cartwright
 
Posts: 3483
Joined: Mon Sep 25, 2006 6:12 pm

Post » Tue Sep 22, 2015 8:03 pm

Umm, I think you'll find that's the floor your using. Move in one direction until you reach a corner then up a bit and you'll have found a wall. :wallbash:

User avatar
e.Double
 
Posts: 3318
Joined: Tue Jul 24, 2007 11:17 pm

Post » Tue Sep 22, 2015 7:20 pm

*bouncing up staircase* :-)

User avatar
Jonathan Windmon
 
Posts: 3410
Joined: Wed Oct 10, 2007 12:23 pm

Post » Tue Sep 22, 2015 5:55 am

Thanks for the replies, guys! I now understand this topic better. ;)
User avatar
Allison C
 
Posts: 3369
Joined: Mon Dec 18, 2006 11:02 am

Post » Tue Sep 22, 2015 6:03 pm

My pleasure! :cool:

User avatar
Laura Simmonds
 
Posts: 3435
Joined: Wed Aug 16, 2006 10:27 pm

Post » Tue Sep 22, 2015 4:21 pm

...and sorry for flooding your thread with dubious semi-information... ;-)

User avatar
Nicholas C
 
Posts: 3489
Joined: Tue Aug 07, 2007 8:20 am


Return to V - Skyrim