Issues adding sockets to arrows and bolts.

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
hellfreezer
Posts: 17
Joined: Thu Jan 31, 2019 6:57 am

Issues adding sockets to arrows and bolts.

Post by hellfreezer » Mon Feb 18, 2019 10:46 pm

Hey everyone, I tried applying sockets to arrows and bolts and when I check Charsi's misc page none of them ever have sockets. I applied sockets to gloves, boots and belts already so I am familiar with how to do it and from other threads I have read it seems to be possible. However, there are 2 things that concern me. 1 is that I also wanted to implement magic and rare quivers but I have the rare, magic and normal columns all set to 1 which upon reading the file guide I believe only rare should be set to 1 while normal and magic are not, not sure if this would cause a problem with sockets although I wouldn't think so. The 2nd and main concern I have is that I applied the code edit for arrows and bolts not depleting when used and I'm not sure if this causes issues with the sockets either. I have not yet tested a cube recipe to try to produce socketed arrows and bolts, but I was wondering also, if I am able to force them through a cube recipe does that guarantee that they can drop or be sold by vendors as well? Any help or advice would be appreciated!

EDIT: I swear I've been searching for this for hours with no luck but as soon as I decide to break down and post a question I find a similar thread, and it says the person had to disable arrows and bolts in misc.txt, add them to weapons.txt and add an automagic to it to enable the sockets, is this necessary, and wouldn't it be possible given the nature of those 2 files to add the columns to misc.txt or is that more trouble than its worth?

User avatar
HarvestWombs
Senior Moderator
Angel
Posts: 951
Joined: Wed May 25, 2011 11:50 pm
United States of America

Re: Issues adding sockets to arrows and bolts.

Post by HarvestWombs » Tue Feb 19, 2019 2:20 am

You can add 'auto prefix' column directly to misc to eliminate the "add them to weapons" idiocy.

As long as you've filled out itemtypes and misc columns correctly (which you've done other items too, you should be good) then all you need to do is add a new automagic for them.
The only thing I found wrong with adding sockets to arrows was that they don't show "Sockets (2)" and also don't display quantity. Shouldn't be a problem in your case if they're infinite though.
Official Phrozen Keep Discord
Common Modding tools: link
My Resource Packs: link

hellfreezer
Posts: 17
Joined: Thu Jan 31, 2019 6:57 am

Re: Issues adding sockets to arrows and bolts.

Post by hellfreezer » Tue Feb 19, 2019 4:03 am

Awesome, thanks so much! I also applied a code edit from the same thread to remove the quantity display altogether so that's actually fine, I think I may search around to see if anyone has found how to apply the "Sockets" to them.

User avatar
HarvestWombs
Senior Moderator
Angel
Posts: 951
Joined: Wed May 25, 2011 11:50 pm
United States of America

Re: Issues adding sockets to arrows and bolts.

Post by HarvestWombs » Tue Feb 19, 2019 4:37 am

Just create a dummy stat
Official Phrozen Keep Discord
Common Modding tools: link
My Resource Packs: link

hellfreezer
Posts: 17
Joined: Thu Jan 31, 2019 6:57 am

Re: Issues adding sockets to arrows and bolts.

Post by hellfreezer » Tue Feb 19, 2019 7:29 am

Hmmm... I've never done anything like that but I believe I know what you're referring to if that's how people have made counters for things, so I'm guessing it basically counts the sockets and displays it that way? Could you point me towards a tutorial perhaps if so? I really appreciate your time.

User avatar
HarvestWombs
Senior Moderator
Angel
Posts: 951
Joined: Wed May 25, 2011 11:50 pm
United States of America

Re: Issues adding sockets to arrows and bolts.

Post by HarvestWombs » Tue Feb 19, 2019 7:45 am

Create a new tbl entry
  • name -> dummysock
    string -> Socketed (%d)
ItemStatCost.txt:
Clone item_numsockets line
  • change name -> item_dummysock
    descpriority -> 256
    descfunc -> 19
    descvalue -> 1
    descstringpos -> dummysock (new tbl entry)
Properties.txt:
  • code -> dummysock
    func1 -> 1
    stat1 -> item_dummysock (same as ISC)
Then for your automagic, separate each amount of sockets into a new line
For example:
  • mod1code -> sock, min -> 1, max -> 1
    mod2code -> dummysock, min -> 1, max -> 1

    mod1code -> sock, min -> 2, max -> 2
    mod2code -> dummysock, min -> 2, max -> 2
Official Phrozen Keep Discord
Common Modding tools: link
My Resource Packs: link

hellfreezer
Posts: 17
Joined: Thu Jan 31, 2019 6:57 am

Re: Issues adding sockets to arrows and bolts.

Post by hellfreezer » Tue Feb 19, 2019 8:26 am

Wow that was really above and beyond, thank you so much!

hellfreezer
Posts: 17
Joined: Thu Jan 31, 2019 6:57 am

Re: Issues adding sockets to arrows and bolts.

Post by hellfreezer » Wed Feb 20, 2019 8:14 am

Ok, I had a little trouble but I finally got it working so I thought I would share in case anyone else wants to do this. I did exactly as stated above, but in properties.txt I had to set the *func1* column to 1, and the *stat1* column to item_dummysock. Also as a side note, I had arrows spawn with 2 sockets but they said Socketed (3). To avoid this make sure in ItemTypes.txt the *MaxSock1* *MaxSock25* and *MaxSock40* columns match the level you set for your automagic. Basically what happened is I had all of the levels set to 1 and relied on ItemTypes.txt to limit the number of sockets for me, which it did, but when I got the 3 socket automagic on a level 1 item, the dummysock still said three while itemtypes.txt limited it to 2. I hope this can help someone the way you helped me!

Post Reply

Return to “General Mod Making”