Smaller Fallout projects. Latest Party Orders mod, Fallout: Nevada wiki.
User avatar
Magus
Site Admin
Posts: 265
Joined: Mon Nov 21, 2016 9:13 am
Contact:

Re: Various questions

Post by Magus » Tue Sep 22, 2020 6:24 am

Please do not PM or email me about my mods and projects. Use forums. Also, see our talk channels.

Cyrus
Posts: 40
Joined: Tue Nov 20, 2018 12:34 pm

Re: Various questions

Post by Cyrus » Tue Sep 22, 2020 10:48 am

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: 40
Joined: Tue Nov 20, 2018 12:34 pm

Re: Various questions

Post by Cyrus » Sun Oct 04, 2020 8:57 am

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: 265
Joined: Mon Nov 21, 2016 9:13 am
Contact:

Re: Various questions

Post by Magus » Sun Oct 04, 2020 5:52 pm

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: 40
Joined: Tue Nov 20, 2018 12:34 pm

Re: Various questions

Post by Cyrus » Sat Oct 10, 2020 8:53 am

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: 265
Joined: Mon Nov 21, 2016 9:13 am
Contact:

Re: Various questions

Post by Magus » Sat Oct 10, 2020 11:09 pm

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: 40
Joined: Tue Nov 20, 2018 12:34 pm

Re: Various questions

Post by Cyrus » Sun Oct 11, 2020 8:07 am

Settled. Thanks.

Cyrus
Posts: 40
Joined: Tue Nov 20, 2018 12:34 pm

Re: Various questions

Post by Cyrus » Mon Oct 12, 2020 10:22 am

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.

Post Reply