Main Menu

ECL characters and epic feats

Started by Nymera, Mar 25, 2015, 09:41 AM

Previous topic - Next topic

NorthWolf: Doge Edition

I should preface this by mentioning that I'm completely neutral about the issue of if something like this should get done, I just wanted to point out that it's viable and there's an easy way to do it.

suddenperihelion Avatar
The hardcoded part is the AB/save part. In some sense, nothing is "hardcoded" - if you are working with enough NWNX and custom server or client modifications, anything can be changed; in this case, you could put in a custom scripted "level up" function that replaces the default level-up benefits with the corrected levelup benefits using NWNX. But that seems like a lot of work for something that would produce very small benefits (we're really talking about a fairly small change that only lasts a couple levelups).

I'm saying that this (meaning the idea of them receiving epic feats earlier) is entirely viable with absolutely no scripting provided you're willing to LETO ECL characters once when they ascend. The NWNX component is a convenience to eliminate the need for LETO. It would be a single line looking something like this:

if(iECLAdjustedLevel > 20) NWNXFuncs_AddFeat(oPC, FEAT_EPIC_CHARACTER, iTrueLevel);
The 2da adjustments would also be annoying, but not actually too intensive. The roadmap for completion largely depends on what the PreReqEpic column in feat.2da actually does. I don't know if the engine checks for actual epic levels (21+) or if it checks for the epic character feat (1001) when it's flagged. If it's the latter, this is super easy because you just need to add the feat to the character. If it's the former, you're stuck with a roadmap that looks like this:

1. Parse feat.2da for all entries with PreReqEpic flagged 1.
2. Examine all entries in that list -- check which fields you can use to flag an epic character. PREREQFEAT1 and PREREQFEAT2 might be 100% viable simply because even in cases where there are two feats specified, several times it's not necessary (feat A will require feat B, ergo feat B does not need to be specified). This would be the mildly annoying part.
3. Use the field you have selected to create the flag. Assuming PREREQFEAT1/2, you add FEAT_EPIC_CHARACTER (1001) to the necessary field.
4. Set all of the PreReqEpic flags to 0.

Obviously that's pretty general but since 2da files are trivial to parse you could write something in any language you're comfortable with to do everything except figure out which field you should use.

suddenperihelion Avatar
As for the proposed system of creating a new system for pre-epic selection of epic feats, that's certainly an option. But it's not so clear to me that scripting up an automated system (and making sure it played nice with all the cls_feat_*.2da files) would be all that much less labor-intensive than the LETO route.

I'm not sure what the issue with the cls_feat_*.2da files would be? I suppose you could select a feat that you would've been granted later on in some cases, but that's already possible in vanilla NWN IIRC.

That said, in terms of economy of time, the real time waster would be testing the changes. Actually implementing what I talked about above would probably take an hour or two if you're familiar with basic Regex, file parsing, and have a basic knowledge of the .2da format (they're just a plain text tab delimited 2 dimensional array with a fairly simple header).

Then again NWN is a harsh mistress and inclined to piss on everything you try to do, but that's why I mentioned that testing would be the actual painful part.

Vincent07

I'm inclined to leave the system as it stands.  Many more mechanical issues I'd like to look at before this sort of thing tbh.
"You think any of it matters? The things we did? The lives we destroyed. That's all that's ever gonna count. So, yeah, surprise. You're going to hell. We both are." -Angel

suddenperihelion

NorthWolf: Doge Edition Avatar
I should preface this by mentioning that I'm completely neutral about the issue of if something like this should get done, I just wanted to point out that it's viable and there's an easy way to do it.

suddenperihelion Avatar
The hardcoded part is the AB/save part. In some sense, nothing is "hardcoded" - if you are working with enough NWNX and custom server or client modifications, anything can be changed; in this case, you could put in a custom scripted "level up" function that replaces the default level-up benefits with the corrected levelup benefits using NWNX. But that seems like a lot of work for something that would produce very small benefits (we're really talking about a fairly small change that only lasts a couple levelups).
I'm saying that this (meaning the idea of them receiving epic feats earlier) is entirely viable with absolutely no scripting provided you're willing to LETO ECL characters once when they ascend. The NWNX component is a convenience to eliminate the need for LETO. It would be a single line looking something like this:

if(iECLAdjustedLevel > 20) NWNXFuncs_AddFeat(oPC, FEAT_EPIC_CHARACTER, iTrueLevel);
The 2da adjustments would also be annoying, but not actually too intensive. The roadmap for completion largely depends on what the PreReqEpic column in feat.2da actually does. I don't know if the engine checks for actual epic levels (21+) or if it checks for the epic character feat (1001) when it's flagged. If it's the latter, this is super easy because you just need to add the feat to the character. If it's the former, you're stuck with a roadmap that looks like this:

1. Parse feat.2da for all entries with PreReqEpic flagged 1.
2. Examine all entries in that list -- check which fields you can use to flag an epic character. PREREQFEAT1 and PREREQFEAT2 might be 100% viable simply because even in cases where there are two feats specified, several times it's not necessary (feat A will require feat B, ergo feat B does not need to be specified). This would be the mildly annoying part.
3. Use the field you have selected to create the flag. Assuming PREREQFEAT1/2, you add FEAT_EPIC_CHARACTER (1001) to the necessary field.
4. Set all of the PreReqEpic flags to 0.

Obviously that's pretty general but since 2da files are trivial to parse you could write something in any language you're comfortable with to do everything except figure out which field you should use.

suddenperihelion Avatar
As for the proposed system of creating a new system for pre-epic selection of epic feats, that's certainly an option. But it's not so clear to me that scripting up an automated system (and making sure it played nice with all the cls_feat_*.2da files) would be all that much less labor-intensive than the LETO route.
I'm not sure what the issue with the cls_feat_*.2da files would be? I suppose you could select a feat that you would've been granted later on in some cases, but that's already possible in vanilla NWN IIRC.

That said, in terms of economy of time, the real time waster would be testing the changes. Actually implementing what I talked about above would probably take an hour or two if you're familiar with basic Regex, file parsing, and have a basic knowledge of the .2da format (they're just a plain text tab delimited 2 dimensional array with a fairly simple header).

Then again NWN is a harsh mistress and inclined to piss on everything you try to do, but that's why I mentioned that testing would be the actual painful part.

That won't work as you've written it. But it's an interesting idea, and I think a few minor tweaks could make it work, at least in the overwhelming majority of cases.

I guess it's no longer of general interest to the CD community now that Vincent has said no, but feel free to PM me if you are interested in discussing the technical details more!

NorthWolf: Doge Edition

suddenperihelion Avatar
That won't work as you've written it. But it's an interesting idea, and I think a few minor tweaks could make it work, at least in the overwhelming majority of cases.

I guess it's no longer of general interest to the CD community now that Vincent has said no, but feel free to PM me if you are interested in discussing the technical details more!

I can understand why Vincent doesn't want to implement it, though it's still interesting to talk about.

That said, it's a very general road map, so I'm confused as to what wouldn't work. Can you specify why it won't work as I've written it? If it requires minor tweaks, can you specify what they are? You also stated that there would be a need to make an automated system "play nice" with the cls_feat_*.2da files, but I still don't understand what that means. The cls_feat_*.2da files don't relate to base feat requisites. Can you explain?

I am genuinely curious since you seem to be indicating there's a technical issue and there's no point in not specifying it.