Jump to content


Photo

Two requests


  • Please log in to reply
2 replies to this topic

#1 Acheron

Acheron
  • Member
  • 33 posts

Posted 01 June 2008 - 03:05 PM

I've been working on a Magistrati of Azuth cleric kit which allows the player to use scrolls as a cleric kit, I can adapt the methods you guys used in Refinements to work here (it should work pretty smooth except for trouble with Human clerics dualing to thief when Refinements and/or Rogue rebalancing is installed (I hope to resolve this issue on my side, but first I want to get it working in general before worrying about this specific case). Is it ok with you if I borrow some code from refinements (particularly the code for modifying scroll type item restrictions, which is with only minor changes perfect)?

Secondly I noticed that the code for changing scroll usability uses WRITE_LONG to write the whole 4 bytes for class restrictions (starting at 0x1e) with an explicitly defined value. Could this be updated to use WRITE_BYTE instead? I think the changes would be this:

WRITE_LONG 0x1e 0x60305c80

to this:

READ_BYTE ~0x1f~ ~byte1~
WRITE_BYTE ~0x1f~ (~%byte1%~ BAND ~0b11111101~)
READ_BYTE ~0x20~ ~byte2~
WRITE_BYTE ~0x20~ (~%byte2%~ BAND ~0b10111101~)

This would make it so refinements doesn't overwrite class restrictions assigned by mods installed before it. I don't think it will really matter in my case since my mod will have to be installed after refinements anyway in order to patch up any incompatibility with use scrolls and clerics (and particularly Cleric-->Thief dual class). Note that the above code assumed you wanted to remove the Thief, Cleric/Thief, and Fighter/Thief flags, which I think are the three you need to set.

EDIT: Looking over the newest version of Refinements, I can see that it does some great stuff to generalize the use scroll code and make it compatible with pretty much everything. Could I use and modify this code for my mod? I would put a check in for Refinements and if it's present I actually won't have to do very much to make my mod play nice (basically refinements would already do everything I need except maybe the true class cleric), while if refinements isn't present I could install the pertinent parts of the code (basically the parts that address clerics dualing to mage). BTW the above code change request actually still applies in the latest version of Refinements.

Thanks,
-Starcrunch (or Acheron here at SHS)

Edited by Acheron, 02 June 2008 - 09:27 AM.


#2 the bigg

the bigg

    2083 is a prime number.

  • Modder
  • 3331 posts

Posted 02 June 2008 - 12:42 PM

I've been working on a Magistrati of Azuth cleric kit which allows the player to use scrolls as a cleric kit, I can adapt the methods you guys used in Refinements to work here (it should work pretty smooth except for trouble with Human clerics dualing to thief when Refinements and/or Rogue rebalancing is installed (I hope to resolve this issue on my side, but first I want to get it working in general before worrying about this specific case). Is it ok with you if I borrow some code from refinements (particularly the code for modifying scroll type item restrictions, which is with only minor changes perfect)?

Go for it, I just request you that in turn you'll allow people to take code from you freely (Refinements isn't under any specific license, but I like to advertise the Free/Open Source way of releasing stuff).

Secondly I noticed that the code for changing scroll usability uses WRITE_LONG to write the whole 4 bytes for class restrictions (starting at 0x1e) with an explicitly defined value. Could this be updated to use WRITE_BYTE instead? I think the changes would be this:<...>

Sure, some portions of the code are sloppy and could use improvements - unfortunately, I have an even sloppier way of releasing stuff, so it could take a while for it to be available.

EDIT: Looking over the newest version of Refinements, I can see that it does some great stuff to generalize the use scroll code and make it compatible with pretty much everything. Could I use and modify this code for my mod? I would put a check in for Refinements and if it's present I actually won't have to do very much to make my mod play nice (basically refinements would already do everything I need except maybe the true class cleric), while if refinements isn't present I could install the pertinent parts of the code (basically the parts that address clerics dualing to mage). BTW the above code change request actually still applies in the latest version of Refinements.

See above :)

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.


#3 Acheron

Acheron
  • Member
  • 33 posts

Posted 02 June 2008 - 02:27 PM

Thank you!

-Starcrunch (or Acheron here at SHS)