Jump to content

Misc dumb questions [SOLVED]


Luiz

Recommended Posts

1. I have added an enemy combatant .CRE which works mostly fine. Except that during in-game testing he has immunity to critical hits which he just shouldn't have. The .CRE is a half-orc with 10 levels of Kensai. Made as a PC character, then converted through NI editing to an Enemy CRE. He is most definately not wearing a helmet (or anything else in the helmet slot), nor any equipment that would grant this immunity. What am I missing here? Are Kensais natually immune to critical hits?

 

2. Is there a way to REPLACE_TEXTUALLY strings of differing length?

For example, I added a component to my Luizmods package to change the location of the Bag of Holding (BAG04). Rather than try to work with Area/Container/Item offsets and all sorts of shit that makes my head hurt, I used a crude hack to "remove" the BoH from Spellhold: I simply replaced it with a different item (a composite longbow). The code is like this:

 

COPY_EXISTING ~AR1512.ARE~ ~override~

REPLACE_TEXTUALLY "BAG04" "BOW02"

 

It works fine. But using an item name with a string length different to that of the BoH bombed. Assuming I wanted to change the BoH to something with a name that wasn't five characters long (or some other far more interesting game tweak involving string replacement), could that be done with REPLACE_TEXTUALLY?

 

Cheers,

Luiz.

Link to comment
REPLACE_TEXTUALLY CASE_INSENSITIVE ~bow12~ ~mybow01~ (8)

 

Ahhh... specifying a {sizeValue}, huh? That starts to make sense. Thanks, the bigg. But...

 

Why use "(8)" in this example if second string is 7 characters long?

Because max item name length is 8 and it's good practise to pad the full field?

Or is {max actual string length employed}+1 the way to treat these things generally?

 

Is CASE_INSENSITIVE actually necessary for strings of differing lengths? Or just a damn good idea incase item names have been case-altered by something else?

 

Avenger, could the effects of "Luck" cause crit hit immunity? I assume that by increasing rolls by 1 Luck prohibits critical misses, but might it also force crits against a luck-affected cre to fail? (Note that the .CRE doesn't have any Luck effect in place that I can see, but perhaps I did something stupid in NI when converting the .CHR file to a .CRE one.)

 

Cheers,

Luiz.

Link to comment
REPLACE_TEXTUALLY CASE_INSENSITIVE ~bow12~ ~mybow01~ (8)

 

Ahhh... specifying a {sizeValue}, huh? That starts to make sense. Thanks, the bigg. But...

 

Why use "(8)" in this example if second string is 7 characters long?

Because max item name length is 8 and it's good practise to pad the full field?

Or is {max actual string length employed}+1 the way to treat these things generally?

 

Is CASE_INSENSITIVE actually necessary for strings of differing lengths? Or just a damn good idea incase item names have been case-altered by something else?

In both cases it's just good practice, yes. R_T is case-insensitive by default, but IMHO it's a good habit to reinforce it (so that, once you read the code again an year later, you won't bash your head trying to remember whether it is case sensitive or not). As for using 8 rather than 7, it's to protect against items named E.G. 'bow121'.

Link to comment
Avenger, could the effects of "Luck" cause crit hit immunity? I assume that by increasing rolls by 1 Luck prohibits critical misses, but might it also force crits against a luck-affected cre to fail?
No. Additionally, luck doesn't affect the base roll to hit (regardless of whatever after-the-fact bonuses you have, a base roll of 1 always fails).

 

I don't remember that there's any way to nullify critical misses.

Link to comment

Opcode 301 can do that (though with the obvious side effect :cry: ) as well as making it impossible to inflict critical hits by using negative values.

 

What's the message you get when your character rolls a 20 while attacking this kensai kind of person?

Link to comment

Gah! Turns out to be some error on my part.

 

The guy had a sword in his head slot(!). Only discovered it by CTRL+Q-ing the bastard in-game. As the sword doesn't show up in the .CRE in DLTCEP or NI, I think it's probably caused by errors in the crappy combat script I wrote for the .CRE, not the .CRE itself.

 

Sorry to bother y'all -- I'll now go back to my normal level of stupid.

 

Cheers,

Luiz.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...