[B18]Range Animal Framework

Started by BrokenValkyrie, January 18, 2018, 05:51:13 AM

Previous topic - Next topic

BrokenValkyrie

#30
Quote from: Harry_Dicks on February 11, 2018, 12:44:16 AM
Mister or Miss BrokenValkyrie, I think it's really strange how a handful of mods that I had been looking at, all happened to be yours or maintained by you! I wanted to ask, would you please consider putting your other mods onto dropbox as well? I am very interested in these mods especially: Dermal Regenerator, both Beast Men patches, Dragons, Disinfectant Stand, and definitely Septic Tank. I actually made a post a long time ago asking about if we could have a septic tank, and dubwise said he didn't want it in the mod anymore.

Anyway, I would hope that you would please consider my request. I also wanted to thank you for all of your mods that you put out, and I definitely appreciate your work. I think other users would appreciate your work posted off of Steam as well! Thanks ;D

Sorry I was on a warframe binge for a while. Currently job hunting so I might not have much time for the forum. I'll consider it, but I can't put dragon mod on drop box, as I only have permission to update it. The mod is not mine and belongs to Wagwansugar on steam.

@ilikegoodfood
Sorry for the absence, I'll have a look at your problem.
The mod doesn't support  defensive ability like smokepop belt. I might look into it, seems feasible but no guarantee.

You already talked a bit about
<success>Always</success> and <success>Normal<success>

My experience with <success>Normal<success> with it is that it stops at the next operation and doesn't continue until it meets another success criteria. This has caused me so many headache wondering why patch operation isn't applying the changes. I only use <success>Normal<success> under certain circumstance. Usually I'll put other form of check to discontinue patch operation, usually with mod check.

ilikegoodfood

#31
Quote from: BrokenValkyrie on February 20, 2018, 06:36:34 PM
Sorry I was on a warframe binge for a while.
I used to play that game all the time, thousands of hours in it. I started playing on the 1st day of open beta and continued playing for the following three years. A bit of a love-hate relationship, mostly to do with initial promises the developers made and still haven't fulfilled, or acknowledged having publicly made at all.
It's also the only game that I have ever found myself displaying addictive tenancies towards, so after three years of frustration I quit and have never allowed myself to go back. I see adds for it every so often, or mentions such as this, and spend days, even weeks, resisting the temptation to re-install it and wasting a few thousand hours more...

Quote from: BrokenValkyrie on February 20, 2018, 06:36:34 PM
My experience with <success>Normal<success> with it is that it stops at the next operation and doesn't continue until it meets another success criteria. This has caused me so many headache wondering why patch operation isn't applying the changes. I only use <success>Normal<success> under certain circumstance. Usually I'll put other form of check to discontinue patch operation, usually with mod check.

I have only been using it in order to try and find which operation in a sequence that is failing is the culprit, as it sometimes reveals error messages relating to the failed operation. This is why I had previously ignored the error, since it didn't seem to effect the patch sequence.

Unfortunately, it does seem to prevent the sequence continuing even when set to <success>Always</success>, which is why I've now isolated the patches in their own sub-sequences as a work-around.

Thank you for considering smoke-pop belts and shields and thank you for your help.

A slight aside, Melee attack verbs can be tied to body parts, thus when the body part is destroyed or damaged the attack is unavailable or weekend. Am I correct in thinking that RimWorld's Ranged verbs have no such equivalent system?

Thanks again.

BrokenValkyrie

#32
You are correct, range verbs has no equivalent system to tied body parts. I'll consider it, but this one is very likely to be beyond my ability. The biggest barrier is tying the body part to the verb in xml. I hadn't quite figured out how xml data are read by the game.

BrokenValkyrie

@ilikegoodfood

Could you elaborate on the patch issue. Is it that you can't patch both sanguine drake and bombardier beetle in one patch sequence? Another experience I have with patching is I find you can't patch definition from different files in a single sequence.

If you look at dragon mod, you would see I have two distinct separate for dealing with this situation. The first sequence looks for a file called Race_Animal_Dragon.xml, the second sequence looks for a file called Races_Animal_Dragon_2.xml.

I notice that beetle and drake are defined in two separate files.

ilikegoodfood

Quote from: BrokenValkyrie on February 21, 2018, 10:21:58 PM
You are correct, range verbs has no equivalent system to tied body parts. I'll consider it, but this one is very likely to be beyond my ability. The biggest barrier is tying the body part to the verb in xml. I hadn't quite figured out how xml data are read by the game.

I didn't meant to ask you to implement it, I was simply after confirmation that it didn't exist.

Quote from: BrokenValkyrie on February 21, 2018, 10:21:58 PM
Could you elaborate on the patch issue. Is it that you can't patch both sanguine drake and bombardier beetle in one patch sequence?
Yes, exactly this.

Quote from: BrokenValkyrie on February 21, 2018, 10:21:58 PM
Another experience I have with patching is I find you can't patch definition from different files in a single sequence.
That I didn't notice. I just went through my other patches and found that my various bug-fixes have resulted in every single sequence working in only a single file.
That is almost certainly the issue then and it means that my solution wasn't a tacky work-around but actually the correct implementation.

That solves that one.
Thank you.

ilikegoodfood

#35
I've been looking into tying a body part group to a ranged attack, for the grand total of an hour, on an impulse, and what I've found is that the Melee Verbs in C# directly utilize the average efficiency of the linked body part group, if there is one, but that the ranged verbs are structured very differently.

To summarize my digging, the ranged verbs create a 2D vector from the pawn firing the projectile to the pawn being hit. The path is modified by certain values that, hidden deep in works somewhere, includes the ShootingAccuracy stat. Once the projectile is fired it is free to ranomly intercept with any pawn, wall or cover in its path, again, controlled in some way I don't fully understand.

Now, what this means is that it's impossible to directly insert a value for bodypartgroup average efficiency, unless you can work out where and how the pawn's accuracy is inserted into the equation and insert it into that step.
It also means that there is no need to modify it in C# at all. It can be done through XML only.

In order to do this you would need to create a new capacity. This capacity, just like my hidden bleed rate capacity that facilitates the sanguine drake's anti-coagulant hediff, doesn't require a capacityDefOf or any other C# identifier. Using a harmony patch, you can add that capacityOffset, by name, to the existing list of capacity offsets in the ShootingAccuracy stat.

In order to make the body parts effect the shooting skill, simply tag them as body parts required for that hidden capacity, and when they become damaged, the capacity will drop and the shooting skill will be diminished.

Seeing as you're busy and I think I know exactly what I need to do, I could create it myself and send you the code, BrokenValkyrie, or, if you would rather implement it yourself, I can wait.

Hope to hear from you soon.


EDIT:
Okay. That didn't work.
Using a hediff to modifiy a capacity or stat directly works just fine, however, since the ShootingBodyPart capacity didn't have a workerClass, it doesn't automatically sub-divide the total capacity between the body parts with the tags and implement changes.

Getting it working would require the creation of a CapacityDefOf in C# and a workerClass for it, in addition to the XML patch that adds that capacity as a factor to the ShootingAccuracy stat, and that is something I spent a fair amount of time trying avoiding when I worked on the bleeding rate modifier.

I know from someone else that it is possible but complicated, and they didn't have the template that they used last time to hand. This situation doesn't lend itself to that particular solution.

If you are interested in implemented that functionality, I could ask them for you, or you could find their post in my thread yourself and ask them, but I don't think I want to get into the whole thing. If I am unable to resist this unwillingly self-set challenge, I may continue to look into it, but I really shouldn't sink time into it.

EDIT 2:
Most of edit 1 is only true if you tried to implement it as a capacity. If you used a harmony patch to adjust the accuracy values, then it would be unnecessary.
On a related note, even if you could tie the shot to the bodypartgroup, how would it know to stop using the shot once the damage became too severe? Otherwise, it'll just keep shooting with a 0% hit chance...

I have found the method that splits the accuracy into it's constituent parts (touch, short,long etc.), but I've been following it through and all of references lead to the hit reporter. I don't know if/how that is then passed to the shot itself.
I should either stop here or go and open a help thread...

SargBjornson

I have updated this to use it on Genetic Rim! If you want the files, tell me!

ilikegoodfood

Quote from: SargBjornson on September 01, 2018, 02:32:27 AM
I have updated this to use it on Genetic Rim! If you want the files, tell me!

Thank you for the update. I've burrowed the updated .dll from the latest GeneticRim for use in my MonsterMash mod.

Do you know if there's a way to check what all the code changes were, aside from digging through everything manually? I've never had to update a mod between versions before...

Thanks.

SargBjornson

As far as I know, there is no detailed changelog :(