Problems with MagicPrefix.txt and MagicSufix.txt

Post here about all aspects of D2 mod making whether it's information, problems or whatever. Please specify whether your post is relating to Classic D2 or the Expansion.

Moderator: Nizari

Post Reply
Undeceiver
Posts: 5
Joined: Wed Mar 04, 2020 5:05 pm

Problems with MagicPrefix.txt and MagicSufix.txt

Post by Undeceiver » Wed Mar 04, 2020 5:20 pm

Hi,

This is my first post but I have read posts of this forum here and there over the years. A summary context is that I use an old version of PlugY (1.11 version of D2) with my own little modifications here and there to make my game more enjoyable for myself. Updating to the newest versions seem like a monumental task that I'm not really interested in doing because of all the little changes I've been doing here and there. Just changing PlugY to the new version would already be quite hard, I believe, and a lot more with all the little changes I've done myself. I hope the version should not be a problem since, as I understand it, not much has changed in terms of modding since 1.10.

The last couple of days I've been trying to play around with MagicPrefix and MagicSufix for the first time (amongst many other things which seem to work). But I can't get this to work, and I've gotten to a point of ridiculousness.

Instead of going through all the things I've tried let me present to you a minimal example which does not work and hopefully you guys can help me understand why it does not. In this minimal example, all that I do is to duplicate one line from MagicPrefix.txt. In particular, the Rugged level 21 req entry for small charms (+9-16 stamina). I only copy the line, paste it underneath, without modifying any of its columns.

Before you say it, I have checked that the whitespace is correct. I copy it with the D2Excel tool, but I've checked the file with a text editor and the spacing is exactly the same as the previous line, with the right tabs, right spaces, and end of line character.

Now, my way to test it is that I have a cube recipe that generates rare small charms. With the original MagicPrefix.txt and MagicSufix.txt it works perfectly. After the above modification, however, the generation will never select preffixes (so it will only have 3 suffixes). I've played around, if I also modify MagicSufix.txt it will crash. Basically it seems like it is trying to do a query on MagicPrefix.txt and it fails horribly. When there are suffixes, it sticks with those. But if there aren't suffixes either, then the game just gives up and crashes. This likely does not even have to do with the particular preffix, since I've tried duplicating a preffix that does not affect charms and the problem still happens when generating charms.

It all sounds to me like it is a problem with either the number of rows in the MagicPrefix.txt file (which is not over the maximum, obviously), or some sort of duplicate or inexistent identifier that I'm not able to locate. I've searched the web and this forum high and low for information on some sort of hidden identifier, or an identifier on another file that I need to produce or something, and found nothing. Every guide, every post, seems to say that this really simple little example should work.

I'd attach the MagicPrefix.txt file, but it's not allowed in the forum, apparently. I can try to upload it somewhere else if someone really wants to take a look.

Maybe it's not recommended to add lines to this file? Is it better to just modify existing ones? Why, though?

Thanks in advance.

Undeceiver
Posts: 5
Joined: Wed Mar 04, 2020 5:05 pm

Re: Problems with MagicPrefix.txt and MagicSufix.txt

Post by Undeceiver » Wed Mar 04, 2020 7:36 pm

I'd still be happy to receive a reply, but I think I figured what it has to do with. The program I was using to edit it was reordering the file entries when I sorted it to allow easier modification, and the game seems to really not like that for some reason (I guess some affixes are hardcoded somewhere).

I'll try to do the modifications I wanted with another editor and see if that works.

User avatar
Necrolis
Site Admin
Throne
Posts: 9049
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

Re: Problems with MagicPrefix.txt and MagicSufix.txt

Post by Necrolis » Wed Mar 04, 2020 9:48 pm

Undeceiver wrote:
Wed Mar 04, 2020 7:36 pm
I'd still be happy to receive a reply, but I think I figured what it has to do with. The program I was using to edit it was reordering the file entries when I sorted it to allow easier modification, and the game seems to really not like that for some reason (I guess some affixes are hardcoded somewhere).
Reordering almost any of the D2 files will "break" them (depending on the file it may only break existing chars; other files like skills.txt have numerous line based hardcodes). All linking against these files is done via the row index (even in files with an id, the id must match the row, this is because the id column is used to create a linkage). Some files can be reordered, but then all other txt files must be recompiled with the new ordering, and any existing save files will break if they saved anything dependent on the old ordering.

With all that being said, please avoid double posting, its not going to get you an answer any faster. Also our board isn't as busy as it used to be, allow for a day or two for answers not an hour or two.
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death | D2GFEx
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

Undeceiver
Posts: 5
Joined: Wed Mar 04, 2020 5:05 pm

Re: Problems with MagicPrefix.txt and MagicSufix.txt

Post by Undeceiver » Wed Mar 04, 2020 10:27 pm

Necrolis wrote:
Wed Mar 04, 2020 9:48 pm
With all that being said, please avoid double posting, its not going to get you an answer any faster. Also our board isn't as busy as it used to be, allow for a day or two for answers not an hour or two.
I get that. I just wanted to update since I had discovered the reordering that I had not noticed before. I guess I should've edited the previous post.

I've still not managed to make it work, but I think sticking to the original file structure and rows as much as possible is the way to go. Thanks.

Post Reply

Return to “General Mod Making”