Jump to content


Photo

Lockpicking in stats.ids


  • Please log in to reply
6 replies to this topic

#1 temnix

temnix
  • Member
  • 983 posts

Posted 17 November 2016 - 10:24 AM

There is Lockpicking itself in that file, number 26, and then there is Lockpickingmtpbonus, 176, which I presume is the bonus from magic and potions. Does this second value equal the bonus itself or the basic stat + the bonus? Which of the two should I use if I want the total current level of the skill, with bonuses if any?



#2 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 17 November 2016 - 12:37 PM

Use 26. The other stat iirc is not used outside of Detectable Spells system, so you can safely ignore it.


Retired from modding.


#3 temnix

temnix
  • Member
  • 983 posts

Posted 17 November 2016 - 02:08 PM

What are detectable spells?



#4 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5150 posts

Posted 17 November 2016 - 02:51 PM

What are detectable spells?

It's a AI mod toolbag maintained by GeN1e/aka Ardanis in G3... see here. It's what all the other mod makers use to first of all not break each others .cre stat markers, and then build their AIs from the common ground(RR, SCS, BP...).


Edited by The Imp, 18 November 2016 - 04:27 AM.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#5 temnix

temnix
  • Member
  • 983 posts

Posted 18 November 2016 - 04:50 AM

Does it have anything to do with creatures' stats, overriding them and such? I'm thinking of making a mod - eventually - that will keep creatures as they are in default BG:EE but change their Wisdom, Intelligence and Charisma scores. To be used for future spells that might adjust saving throws based on that. A carrion crawler with Int 9 is not my thing. I don't know how I would go about that, maybe there is a better way than an archive full of cre files. An edit with Weidu?



#6 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5150 posts

Posted 18 November 2016 - 06:05 AM

Does it have anything to do with creatures' stats, overriding them and such? I'm thinking of making a mod - eventually - that will keep creatures as they are in default BG:EE but change their Wisdom, Intelligence and Charisma scores. To be used for future spells that might adjust saving throws based on that. A carrion crawler with Int 9 is not my thing. I don't know how I would go about that, maybe there is a better way than an archive full of cre files. An edit with Weidu?

Well, it doesn't change the .cre files... it just makes the mage spells detectable by casters. So for example, to give you a non existing reference, a caster would like to cast a spell like "Protection From Magic Weapons", but the problem comes that he doesn't have a way to check if he already has the spell casted on... so the Detectable Spells/stats&etc (DS from here on out), makes the spell also set a marker to the current creature via an .eff, that can be checked, for example if the spell sets the extraproficiency18 to be one, then the caster can check if they have the spell casted on them and cast it again if they like having the spell on (and they are hostile, and have the spell memorized, and whatever else).
It doesn't touch the .cre files at all, as the spells can cast .eff files via opcode #177 that the dispel spells then will remove when they remove the spells primary effects, to not screw up the AI.

The .cre's can be easily edited, just get yourself the file format information sheet here or in there somewhere. And then edit the file with easy weidu .tp2 command...
For example a vanilla currently stored carrion crawlers in BG2, and yeah, you need to edit each of the .cre files in a routine or individually... let's set one of them's Int(offset 0x023a) to be say 3 instead of what ever it's currently at:
 
COPY_EXISTING ~carrion.cre~ ~override~
WRITE_BYTE 0x023a ~3~

Done. Easy as pie. WRITE_BYTE is used for the 1 length variable, WRITE_SHORT is used for the 2-length variable, and WRITE_LONG for 4... and there are others... and you'll also need to some times take into consideration on what the variable values are set at etc... for example when you set the first two arrey in the file, aka byte 0x0000 up to 0x0007, you should set them using the
WRITE_ASCII ~0x0000~ ~CRE ~ #4 ... but you don't usually need to do any of that stuff or you are far further in the pool than at the start you seem to be for now. As BGT-weidu & Tutu do this... as they need to convert the files from one games format to another, but that's a special case.

You can also read the current files info at an offset to your_own_defined variable, and then use that variable to set the value to another, or like in this case, I just multiply it by 3 for reasons, the .cre files fire resistance.
COPY_EXISTING ~dragblac.cre~ ~override~
READ_BYTE ~0x0059~ ~firres~
WRITE_BYTE ~0x0059~ ~firres*3~

Done, easy as pie...

Well of course you need to note that the resistances for example top at ~125, and then set the jerks resistance to the particular element to -50 and proceed from there on up. So were the value not 20 but say 50, it would actually lower the resistance significantly. As in, set it to a negative value, making any fire based damage very likely to kill the .cre. As it's fire resistance would be -95%... so 1 fire damage equals 20 normal damage... throw a fireball(say ~39 points fire damage), and it's dead (if it doesn't have 780+ hit points).


Edited by The Imp, 18 November 2016 - 06:28 AM.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#7 temnix

temnix
  • Member
  • 983 posts

Posted 18 November 2016 - 08:40 AM

Thanks. If I ever get to that mod idea, I'll look back in this thread.