Jump to content


Photo

Oddity with Tome of Cheats


  • Please log in to reply
9 replies to this topic

#1 Qwinn

Qwinn
  • Modder
  • 3092 posts

Posted 30 January 2009 - 10:53 AM

For some reason, using the Attribute Cheat to raise/lower your attribute by 1 doesn't work. You get the "Constitution (or whatever) Permanently Raised" floating text, but you don't get the green +1 that you should be getting, and you do get if you raise/lower by any other value.

I'm not sure why this is. But for now, the solution would be to raise (or lower) it by 3, then do the opposite by 2.

Here's the technical description of the problem, maybe some IE modder can lend me a hand on this one?

The PermaStatChange command in my dialogue file for the Tome to raise it is the same as the others, excepting only the value. When I look at the dialogue in Near Infinity, though, the "1" that I tell it to raise or lower the attribute by is replaced by "1D10PLUS5", which seems to be an entry in BONES.IDS. I don't know why it's using that, though, because in ACTION.IDS, that parameter of PermanentStatChange is I:Modifier, not I:Bones or anything like that.

If I use NearInfinity to search for all instances of PermanentStatChange in all dialogue files, the actions with that 1D10PLUS5 don't even show up.

Any help out there on how I can resolve this? Is it a WeiDU issue?

I was initially panicked that making changes to existing dialogues that raise/lower attributes by 1 might've been corrupted, but not that I can tell. The main difference between this dialogue and the rest of my mods is that my DCHEATS.D is a standard .d file built up from scratch, which I use the COMPILE command to compile. Recompiling an existing dialogue where the PermaStatChange command to raise or lower by 1 exists don't seem to be affected.

Qwinn

Edited by Qwinn, 30 January 2009 - 10:54 AM.


#2 Qwinn

Qwinn
  • Modder
  • 3092 posts

Posted 30 January 2009 - 11:10 AM

Well, it definitely is coming from BONES.IDS. Previously, my PermanentStatChange in my .D file was this:

PermanentStatChange(Protagonist,INT,RAISE,1)

But Near Infinity was translating that as:

PermanentStatChange(Protagonist,INT,RAISE,1D10PLUS5)

I modified BONES.IDS to this:

11
0x1640 1
0x1320 1
0x1140 1
0x10C0 1
0x10A0 1
0x10A5 1
0X1080 1
0X1060 1
0X1061 1
0X1040 1
0X1020 1

And now my PermanentStatChange command changes to:

PermanentStatChange(Protagonist,INT,RAISE,)

Still doesn't work, though. Again, not sure what the heck to do about this.

Qwinn

Edited by Qwinn, 30 January 2009 - 11:11 AM.


#3 the bigg

the bigg

    2083 is a prime number.

  • Modder
  • 3331 posts

Posted 30 January 2009 - 03:32 PM

Argh. WeiDU compiles this to D10PLUS5, so I can't blame NI (I can't think of a clear reason why is this happening though*).

The solution that requires less work for me is to add a second PermanentStatChange line in action.ids that doesn't reference bones.ids and then use that in dcheat.d:

APPEND ~action.ids~ ~PermanentStatChangeNoBones(O:Object*,I:StadID*Stats,I:Delta*Delta,I:Modifier*Dummy)~

/* ... */

IF ~~ THEN REPLY @39 /* ~Raise it by 1.~ */ DO ~PermanentStatChangeNoBones(Protagonist,STR,RAISE,1)~ GOTO 1

*: when handling BAF-type resources in D -> DLG, WeiDU looks for the numerical value relative to the IDS string for each element, stores the numerical value in memory, and translates back in the IDS string; what I don't understand is why '1' ~= '1D10PLUS5'.

Italian users: help test the Stivan NPC!

Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - TB#Characters - Traify Tool - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Code dumps: Detect custom secondary types - Stutter Investigator

If possible, send diffs, translations and other contributions using Git.


#4 Qwinn

Qwinn
  • Modder
  • 3092 posts

Posted 30 January 2009 - 08:57 PM

what I don't understand is why '1' ~= '1D10PLUS5'.


Yeah, me either. Particularly because as far as I can tell, the -original- PermanentStatChange doesn't list Bones as part of that parameter either. ??? So I'm not sure a second entry without it help?

Incidentally, I've had nothing but trouble with that Bones modifier in other commands, and I actually strip it out of ACTION.IDS and INSTANT.IDS. I forget which one it was originally in and causing me issues (I may have done it for ACTION.IDS now, come to think of it), but here's what I do in my Setup-PST-Fix.tp2:

COPY_EXISTING ACTION.IDS ~override~
REPLACE_TEXTUALLY ~*r*Bones)~ ~*)~
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING INSTANT.IDS ~override~
REPLACE_TEXTUALLY ~*r*Bones)~ ~*)~
BUT_ONLY_IF_IT_CHANGES


Why I had to put that *r before the *Bones to make it get rid of it, I have no idea. Don't even ask me how I figured out that that would work, but it wouldn't work until I did that.

Maybe the issue is, that is in fact the Bones entry I was trying to get rid of, and that fix I did there didn't actually work (although it seems to when you look at the ACTION.IDS in Near Infinity).

Qwinn

#5 Qwinn

Qwinn
  • Modder
  • 3092 posts

Posted 30 January 2009 - 09:04 PM

Yep, that's what it was. That REPLACE_TEXTUALLY bit I was doing to strip out *Bones only makes it -look- like I successfully stripped *Bones out of that parameter, but it didn't really work. I commented it out, reinstalled, and that put it back to the original:

PermanentStatChange(O:Object*,I:StadID*Stats,I:Delta*Delta,I:Modifier*Bones)

Rather than creating a second entry, I don't really see any benefit to having that *Bones translation going on at all and would prefer to just change the existing one. Problem is, I'm not sure how to do it. Any advice on what REPLACE_TEXTUALLY I can use to actually get rid of it properly?

As always, thanks for the help thebigg!

Qwinn

#6 the bigg

the bigg

    2083 is a prime number.

  • Modder
  • 3331 posts

Posted 31 January 2009 - 05:52 AM

REPLACE_TEXTUALLY EXACT_MATCH ~*Bones~ ~*~

Italian users: help test the Stivan NPC!

Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - TB#Characters - Traify Tool - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Code dumps: Detect custom secondary types - Stutter Investigator

If possible, send diffs, translations and other contributions using Git.


#7 Qwinn

Qwinn
  • Modder
  • 3092 posts

Posted 31 January 2009 - 06:28 AM

Okay, that had an... interesting effect.

As far as Near Infinity is concerned, it looks the same as with my *r*Bones replacement. It just shows:

217 PermanentStatChange(O:Object*,I:StadID*Stats,I:Delta*Delta,I:Modifier*)


And that's good! The replace is nice and cleaner than my version, and achieves the same effect, so good.

AND! No longer getting the 1D10PLUS5 in the action in the tome of cheats. Also good.

But. Getting this instead:

PermanentStatChange(Protagonist,STR,RAISE,)

Qwinn

#8 the bigg

the bigg

    2083 is a prime number.

  • Modder
  • 3331 posts

Posted 31 January 2009 - 06:40 AM

Create a NUMBERS.IDS file (or similarly named if numbers.ids already exists), populate it like this:

0 ZERO
1 ONE
2 TWO
<snip>

and then REPLACE_TEXTUALLY EXACT_MATCH ~*Bones~ ~*Numbers~

Italian users: help test the Stivan NPC!

Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - TB#Characters - Traify Tool - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Code dumps: Detect custom secondary types - Stutter Investigator

If possible, send diffs, translations and other contributions using Git.


#9 Qwinn

Qwinn
  • Modder
  • 3092 posts

Posted 31 January 2009 - 06:58 AM

Um.

*hides*

Um.

There was never anything wrong. My original *r*Bones replace works just fine (though your command is cleaner and I will use that anyway).

But, um.

In all my billion and one testing installations, I wound up having my Tweak Pack in the install order -before- the Fixpack.

So the replace in the IDS wasn't happening till after the Tome of Cheats got compiled.

So.

Um. I actually fixed this problem ages ago.

[Emily Litella] Never mind. [/Emily Litella]

*hides*

Seriously, sorry to bug you, thebigg.

Qwinn

Edited by Qwinn, 31 January 2009 - 07:01 AM.


#10 Qwinn

Qwinn
  • Modder
  • 3092 posts

Posted 31 January 2009 - 07:05 AM

Although, actually, other than the part about bugging -you-, I'm glad it happened. I think I will add the IDS replace to the Tome of Cheats install in the other two mods as well. The less reasons there are to have to say "Fixpack -must- be installed before Tweak Pack", the better.

Qwinn