Author Topic: Item Patching - WeiDU handholding requested :-)  (Read 1827 times)

Offline Sir Kalthorine

  • Planewalker
  • *****
  • Posts: 14
Item Patching - WeiDU handholding requested :-)
« on: March 20, 2005, 05:25:41 AM »
'Ello 'ello!

I am still brushing off my modding cobwebs after a long break, so apologies if what I am asking here sounds silly - and please frame any responses assuming I am a complete doofus, as you won't be far wrong!

Basically, in the "Ashes of Embers" mod, in the "Universal Weapons" component weapon item files are patched to make them universally useable.  I have explored the .tp2 file and have to admit that I haven't a clue how it is done.  Not surprising, since I have 2 years of catching up to do with WeiDU developments and I had only reached the "dabbling" phase even back then.

What I would like to do is similar(-ish).  Is it possible to use WeiDU to look for all items that are useable by a vanilla "Druid" and patch them to make them also useable by the "Assassin" thief kit?  And if so, what would the code look like?  I want to do this by "patching" rather than overwriting item files as I have compatibility in mind.

If I am asking this in the wrong place, plese feel free to tell me to bugger off provided you can also point me towards where I should have asked in the first place  ;D

Equally, if I am asking something really daft and/or impossible, just slap me with a wet halibut and send me off to bed without any supper...  :-Zzz
« Last Edit: March 20, 2005, 05:28:19 AM by Sir Kalthorine »

Offline Sir Kalthorine

  • Planewalker
  • *****
  • Posts: 14
Re: Item Patching - WeiDU handholding requested :-)
« Reply #1 on: March 20, 2005, 06:31:07 AM »
OK, having located a possible tutorial to help, would this work:

Code: [Select]
COPY_EXISTING_REGEXP GLOB ~.*\.itm~ ~override~ //copies all item files
  READ_BYTE  "0x2B" "assassin" //reads the byte containing thief assassin kit usability flag 
  READ_BYTE  "0x21" "druid" //reads the byte containing druid usability flag
  WRITE_BYTE  "0x2B" ("%assassin%" BAND "0b11111011") // makes usable by assassins
  IF_EVAL (("%druid%" BAND "0b01000000") = "0b00000000") //if it is usable by druids

If I have missed something here - or indeed if I have completely lost the plot and got it all wrong - then please let me know  ;D

Fesh

  • Guest
Re: Item Patching - WeiDU handholding requested :-)
« Reply #2 on: March 20, 2005, 10:32:15 AM »
looks right, though I am not very familiar with BAND and in a rush to get to work~

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Item Patching - WeiDU handholding requested :-)
« Reply #3 on: March 20, 2005, 11:04:23 AM »
If the offsets are right, the code is OK (I wrote the AoE thing  :) ), but...
the assassin's and Bounty Hunter's flags will make you get the reduced thief ability points, so it's preferable to use the swashbuckler's slot. Also, you might want to update also the main class's usability bit.
Finally, using the redundant usability thing is screaming out loud for problems IMHO. Finally, new kits are bound to have problems with refinements (we add something like 30 kits and change a bit of usability flags for scripting purposes). In particular, if the kit is either a Fighter / Thief / Cleric, you need to give him the Undead Hunter's flag (for compatibility with Use Scrolls engine).
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline Littiz

  • Planewalker
  • *****
  • Posts: 23
Re: Item Patching - WeiDU handholding requested :-)
« Reply #4 on: March 20, 2005, 01:11:07 PM »
Quote
the assassin's and Bounty Hunter's flags will make you get the reduced thief ability points, so it's preferable to use the swashbuckler's slot.
As I understand, he doesn't intend to create a new Kit for his NPC, right, Sir K?
So, Chrysta is *meant* to be an assassin.
But, as I replied elsewhere, this kind of patching would require to remove even the basic "thief" flag from the unusable value of many items, and I doubt this would be an acceptable solution.

I fear you'd need something quite trickier here. If you give me time, I'd try to invent something as I did in the past for the Use Scrolls ability and our Sword Angel kit :)

Offline Sir Kalthorine

  • Planewalker
  • *****
  • Posts: 14
Re: Item Patching - WeiDU handholding requested :-)
« Reply #5 on: March 20, 2005, 02:03:35 PM »
Quote
the assassin's and Bounty Hunter's flags will make you get the reduced thief ability points, so it's preferable to use the swashbuckler's slot.
As I understand, he doesn't intend to create a new Kit for his NPC, right, Sir K?
So, Chrysta is *meant* to be an assassin.
But, as I replied elsewhere, this kind of patching would require to remove even the basic "thief" flag from the unusable value of many items, and I doubt this would be an acceptable solution.

I fear you'd need something quite trickier here. If you give me time, I'd try to invent something as I did in the past for the Use Scrolls ability and our Sword Angel kit :)
Actually I was intending to create a new kit, but based on the assassin's usability since as I understand it that would give me the restricted 15 points of thieving ability per level (which I want).  If that sounds odd then please forgive my naive n00bness on the WeiDU front  :-\

There is certainly no rush on this - so if you can be any help in finding a workround that won't unduly affect compatibility with other common mods, Littiz, then I would be most grateful, and by all means take as long as you need  ;D

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: