Author Topic: Hacking "dissolve drow equipment" to make more items disappear  (Read 287 times)

Offline steve_mcdee

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 1951
Does anyone know if it is possible to hack FRUA so that the "dissolve drow equipment" option in the transfer module event causes the party to lose many kinds of items (selected by the designer)?

I have in mind that perhaps it is posssible to flag items somehow to mark them as "from" items, or to change a pointer so that somehow it identifies many items instead of just the three which default FRUA considers to be the drow items.

The reason is that I have a heavily hacked item vocabulary and items list, so that if a character is imported into my design from elsewhere, they are likely to find that they have some weird items. Also, an option to remove non-standard items at the end of the game would allow characters to be transferred to a different design without their magical items all changing significantly.

Offline Ray

  • Sr. Member
  • ****
  • Posts: 311
Re: Hacking "dissolve drow equipment" to make more items disappear
« Reply #1 on: April 13, 2017, 10:28:47 AM »

Hi, Steve,

I have a feeling this is going to be of limited help, but I hope it provides some measure of help.

When I was working on Game08 for The Realm, I asked a similar question.  There were some awesome folks who stepped in and helped--I can't remember who after all these years (and it shames me), but it may be some of the folks who are still with us.  I know Nol has always been extremely gracious with his knowledge ad art as I've completed my projects over the years.  It's also very likely that you might find some of the information in an old UANL from December 1998 or January 1999, since that is when that module appears to have been worked-on and originally published.

My recollection is that:
The DIFF.TBL file in that design (Game08.dsn) has been updated to remove a magical two-handed sword from the party's inventory.
The text when that happens was changed to "You relinquish the blade."
It was indeed done by changing pointers.

I don't believe, however, that there was anything in this hack that would be useful in expanding how many pointers can be removed by the Transfer Module, but--as I'm sure you can tell--my programming understanding for FRUA is pretty limited.

I hope this helps in some way!

Offline ProphetSword

  • Mod Designer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2901
  • FRUA Lives!
    • Lands of Adventure
Re: Hacking "dissolve drow equipment" to make more items disappear
« Reply #2 on: April 13, 2017, 11:09:07 AM »
A search on the forums revealed a thread and post from 2010 that had this information.  Don't know how useful it is:

There may be a way to edit more Drow items in.

Quote from: CKITForm.txt
Drow Items:
-----------
  The following fields control the items that are destroyed as "Drow" items.

Drow Item #1      195119 (0x2fa2f)   1 byte      0 thru 255
Drow Item Relation   195120 (0x2fa30)   1 byte      0 thru 255
Drow Item #2      195126 (0x2fa36)   1 byte      0 thru 255
Drow Item Relation   195127 (0x2fa37)   1 byte      0 thru 255

Nol Drek once changed the Item Relation bytes from = to > and < in order to destroy all a party's items. It might be possible to assign one to a higher item class (above the Vorpal), and use the > relation. I've never played with it though, and I'm not sure the Drow slots can actually be changed without editing the global strings as well as CKIT.

Thanks. I guess I should have read those docs that come with the UAshell first.  :)


Also, I think you made an error here:

I have in mind that perhaps it is posssible to flag items somehow to mark them as "from" items, or to change a pointer so that somehow it identifies many items instead of just the three which default FRUA considers to be the drow items.

Pretty sure you meant "Drow" items and not "from" items.  Though, I could be wrong...
« Last Edit: April 13, 2017, 11:11:59 AM by ProphetSword »
LANDS OF ADVENTURE: An Old-School Style CRPG

More Information Here: http://landsadventure.blogspot.com/

Offline Nol Drek

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2178
    • Nol Drek's Web Site
Re: Hacking "dissolve drow equipment" to make more items disappear
« Reply #3 on: April 13, 2017, 01:16:32 PM »
Quote from: CKITForm.txt
Drow Items:
-----------
  The following fields control the items that are destroyed as "Drow" items.

Drow Item #1      195119 (0x2fa2f)   1 byte      0 thru 255
Drow Item Relation   195120 (0x2fa30)   1 byte      0 thru 255
Drow Item #2      195126 (0x2fa36)   1 byte      0 thru 255
Drow Item Relation   195127 (0x2fa37)   1 byte      0 thru 255

By default, the item classes which get removed are 62 (Drow Chain) and 63 (Drow Long Sword). If you change the two relations from = and = to > and <, then you can remove any range of items from the characters during a Drow "sunlight" transfer event.

195119 Change 62 to 0
195120 Change 116 to 118 (greater than, keep the even sense)
195126 Change 63 to 106
195127 Change 117 to 115 (less than, keep the odd sense)

This will remove all items belonging to every item class from Item Class 1 (Battle Axe) through Item Class 105 (Vorpal Long Sword).

I did something similar for my Expedition to the Barrier Peaks design, where I removed all items from Item Class 22 (Composite Long Bow)  through Item Class 51 (Wand) at the start, so that players who imported characters from another design would not start the game with Laser Pistols and other Sci-Fi weapons.

These are the 4 lines from the DIFF.TBL for "Expedition to the Barrier Peaks":
Code: [Select]
2FA2F 3E 15
2FA30 74 76
2FA36 3F 34
2FA37 75 73
"Into the Drachensgrab Mountains!"

http://www.noldrek.com

Offline steve_mcdee

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 1951
Re: Hacking "dissolve drow equipment" to make more items disappear
« Reply #4 on: April 13, 2017, 02:57:38 PM »
Ray: Yes, Nol is incredibly generous, and knowledgable, with his FRUA hacking.

Ben: Yep, I meant "drow" rather than "from" items -- iPhone thought it knew better. I corrected it most times but missed one spot.

Nol: Thank you Nol! Hopefully I can work out something that works usefully for my purposes from this very helpful information.

Hmmm ... I see: it removes items by items.dat "item class" rather than removing particular item.dat "items". I may need to reorganise my items so that the hacked ones all use different item classes than the default ones ... Edit: Actually, that looks way too hard -- probably impossible.
« Last Edit: April 13, 2017, 03:37:53 PM by steve_mcdee »

Offline Simeon Pilgrim

  • Full Member
  • ***
  • Posts: 167
    • simeonpilgrim.com
Re: Hacking "dissolve drow equipment" to make more items disappear
« Reply #5 on: June 13, 2017, 09:33:24 PM »
In Curse the "drow" items are destroyed, by a location code/command, based on the item (in the item and command) I assume it is quite similar in FRUA.

Code: [Select]
        internal static void CMD_DestroyItems() // sub_292F9
        {
            ovr008.vm_LoadCmdSets(1);
            ItemType item_type = (ItemType)ovr008.vm_GetCmdValue(1);

            VmLog.WriteLine("CMD_DestroyItems: type: {0}", item_type);

            foreach (Player player in gbl.TeamList)
            {
                player.items.RemoveAll(item => item.type == item_type);

                ovr025.reclac_player_values(player);
            }
        }


 

anything