Various questions

Smaller Fallout projects. Latest Party Orders mod, Fallout: Nevada wiki. Modding questions also go here.
User avatar
Magus
Site Admin
Posts: 474
Joined: Mon Nov 21, 2016 9:13 am
Contact:

Re: Various questions

Post by Magus »

Please do not PM or email me about my mods and projects. Use forums. Also, see our talk channels.
Cyrus
Posts: 59
Joined: Tue Nov 20, 2018 12:34 pm

Re: Various questions

Post by Cyrus »

Ok, thanks for that. Between all the pages and documents I have read lately I get lost about where I've seen something before.

The page says the offset is 1B and that's what I found hex editing as well.  However the memory offsets are not the same as the file as I mentioned. So its not applicable.

Anyway after a lot of testing I finally found the value. the offset is 24 ( in decimal). This is in regards to the function get_proto_data. However the resulting value is not a regular value, as explained in that page. Its a bitfield. and sometimes it returns the neighboring byte as well, which complicates things. So its a bit hard to decipher. Anyway I figured out how to decipher it and get the correct numbers out.

I'm just sharing this FYI.

Thanks again.
Cyrus
Posts: 59
Joined: Tue Nov 20, 2018 12:34 pm

Re: Various questions

Post by Cyrus »

Hey Burn, How is it going man?

First off, I have written almost half of the complete damage formula already and its going well.

Hey I ran into a few things which I wanted to run by you.

In your damage formula, you do not recalculate criticals for the first bullet. you use the provided args supplied by hook. But imagine if we re-rolled our own critical hit to replace the one provided by hook, we can replace CM and flags. However, the impression I'm getting is that the damage message that is sent to the HUD has already been decided and cannot be altered. For example if the hit was not a critical hit, but I upgrade it to critical hit, the message that the player would see would not be updated. I haven't tested this, but would you think this is correct?

And secondly, do you know of anyway to update the message? Cause really can't think of one.

third, when using the hook provided critical parameters, the crit "level" is not clear. I kinda need it. Do you know of anyway to get it? this is without re-rolling the critical hit.

I know I could "reverse engineer" the level based on provided CM and bodypart and critter arg to some degree, but this is quite arduous and result cannot always be calculated exact. wondering if you know of any solution.

I'm guessing you ran into all the same issues when you did this. which is why you kept it simpler.
User avatar
Magus
Site Admin
Posts: 474
Joined: Mon Nov 21, 2016 9:13 am
Contact:

Re: Various questions

Post by Magus »

1. Probably not.
2. No.
3. There likely isn't a way.
Please do not PM or email me about my mods and projects. Use forums. Also, see our talk channels.
Cyrus
Posts: 59
Joined: Tue Nov 20, 2018 12:34 pm

Re: Various questions

Post by Cyrus »

Thanks again.

Another question here,

In your Damage mod, you have the:

Code: Select all

#define is_critical_hit(flags)  ((flags bwand DAM_CRITICAL) != 0)
But you don't actually use it in the script.

I'm just wondering does the "flags" argument that is supplied by sfall always contain the DAM_CRITICAL bit if the hit is critical? Is it a reliable way of checking if a hit was critical?

I need to check if a hit was critical just like your "is_critical_hit(flags)" and I'm just wondering if checking that flag is actually a reliable way of doing it.

Alternate solution is to check for CM above 2, but this method has its limitation. (someone might change CM values, as well as the fact that the Centaur groin has CM of 2).
User avatar
Magus
Site Admin
Posts: 474
Joined: Mon Nov 21, 2016 9:13 am
Contact:

Re: Various questions

Post by Magus »

I only know what sfall docs say (and they are generally correct). See the define. It could be a miss, so you also need to check that. Other than that, I think it's reliable. And if not, it should be reported as a bug.
Please do not PM or email me about my mods and projects. Use forums. Also, see our talk channels.
Cyrus
Posts: 59
Joined: Tue Nov 20, 2018 12:34 pm

Re: Various questions

Post by Cyrus »

Settled. Thanks.
Cyrus
Posts: 59
Joined: Tue Nov 20, 2018 12:34 pm

Re: Various questions

Post by Cyrus »

Burn I tested the DAM_CRITICAL flag for target flags. does not work. The target NEVER contains the DAM_CRITICAL flag even when critically hit (Don't know about fails though, but why would target have critical fail flag?). tested in combat damage hook using target_flags supplied by get_sfall_arg. the flag never contains the DAM_CRITICAL bit, tested many times.

So I decided to test in attack flag. It turns out, the DAM_CRITICAL is set for the attacker and not for the target, and anytime there is a critical hit, attacker flags will contain DAM_CRITICAL flag. interestingly setting the flag to on will influence the combat message and always say "the hit was critical" even when it wasn't.
Cyrus
Posts: 59
Joined: Tue Nov 20, 2018 12:34 pm

Re: Various questions

Post by Cyrus »

Burn Do you know how does the game know when to apply area damage?

For example when it comes to grenades and rockets.
 
User avatar
Magus
Site Admin
Posts: 474
Joined: Mon Nov 21, 2016 9:13 am
Contact:

Re: Various questions

Post by Magus »

What do you mean, "when"? What are you trying to do?
For example, there's CombatDamage:
Runs when:
  1. Game calculates how much damage each target will get. This includes primary target as well as all extras (explosions and bursts). This happens BEFORE the actual attack animation.
  2. AI decides whether it is safe to use area attack (burst, grenades), if he might hit friendlies.
Please do not PM or email me about my mods and projects. Use forums. Also, see our talk channels.
Post Reply