Soft coded merc equip guide

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

User avatar
PureRage
Forum Regular
Angel
Posts: 570
Joined: Fri Jan 08, 2010 9:02 am
Location: Newcastle, England
Great Britain

Soft coded merc equip guide

Post by PureRage » Thu Jul 22, 2010 8:51 pm

Has anyone done this? I've just started modding 1.13 and started by making the merc fully equippable. I've seen dll plugins for it but no softcoded ones.

If not i`ll post it as a kinda plugin
Last edited by PureRage on Fri Jul 23, 2010 3:55 am, edited 1 time in total.
In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as "A bad move".
Douglas Adams

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

Hand-picked

Re: Soft coded merc equip plugin?

Post by Necrolis » Thu Jul 22, 2010 9:31 pm

You can't softcoded this, as there are a lot of check that need to be bypassed and some extra handling code that needs to be added
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

User avatar
PureRage
Forum Regular
Angel
Posts: 570
Joined: Fri Jan 08, 2010 9:02 am
Location: Newcastle, England
Great Britain

Re: Soft coded merc equip plugin?

Post by PureRage » Fri Jul 23, 2010 12:05 am

Edit: solved, its actually a really simple solution. You can only equip 1 ring for some reason but its better than nothing :)


Credits:
Baron Josh for his hardcoded plugin that this is based on.
The Phrozen Keep staff for the help they have given to myself and many others.
Last edited by PureRage on Fri Jul 23, 2010 3:56 am, edited 2 times in total.
In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as "A bad move".
Douglas Adams

User avatar
nightshade00123
Forum Regular
Angel
Posts: 709
Joined: Tue Apr 27, 2010 2:32 am

Re: Soft coded merc equip plugin?

Post by nightshade00123 » Fri Jul 23, 2010 12:20 am

Hey if you don't mind, I wouldn't mind hearing what you've done, I've always thought at least rings or some form of jewelry would be great on the merc and always thought full equipment was to over powering without alot of changes to gear or monsters in general.

So if you want I'm sure others would like to hear as well. :lol:

User avatar
PureRage
Forum Regular
Angel
Posts: 570
Joined: Fri Jan 08, 2010 9:02 am
Location: Newcastle, England
Great Britain

Re: Soft coded merc equip plugin?

Post by PureRage » Fri Jul 23, 2010 12:49 am

Just remove the res per level from mercs to balance it out :).

Edit: removed and reposted below with better instructions
Last edited by PureRage on Fri Jul 23, 2010 3:19 am, edited 1 time in total.
In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as "A bad move".
Douglas Adams

User avatar
nightshade00123
Forum Regular
Angel
Posts: 709
Joined: Tue Apr 27, 2010 2:32 am

Re: Soft coded merc equip plugin?

Post by nightshade00123 » Fri Jul 23, 2010 1:00 am

Jeez never would have thought to change to helm, you're pretty creative, I'm going try it right now! :D

"EDIT" well I copied the dc6 to the panel, added the lines to the inventory.text, in game it displayed the positions and all that correctly just wanted to check. Then I go back and change the itemtypes.text equiv2 ring/amulet to helm and I get a bad inventory data even upon creating a new game. I tried. :(
Last edited by nightshade00123 on Fri Jul 23, 2010 1:25 am, edited 1 time in total.

User avatar
PureRage
Forum Regular
Angel
Posts: 570
Joined: Fri Jan 08, 2010 9:02 am
Location: Newcastle, England
Great Britain

Re: Soft coded merc equip plugin?

Post by PureRage » Fri Jul 23, 2010 1:17 am

remember you will need the edited inventory.txt entried for hireling and hireling2 (attatched above and in the download) and the edited npcinv.dc6 (again attatched above and in the download).
In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as "A bad move".
Douglas Adams

User avatar
nightshade00123
Forum Regular
Angel
Posts: 709
Joined: Tue Apr 27, 2010 2:32 am

Re: Soft coded merc equip plugin?

Post by nightshade00123 » Fri Jul 23, 2010 1:36 am

Hmmm very strange, I put helm in equiv2 for rings and amy's and it corrupts my files but I put helm in equiv 2 for boots and voila my merc is wearing boots.
Last edited by nightshade00123 on Fri Jul 23, 2010 1:48 am, edited 2 times in total.

User avatar
PureRage
Forum Regular
Angel
Posts: 570
Joined: Fri Jan 08, 2010 9:02 am
Location: Newcastle, England
Great Britain

Re: Soft coded merc equip plugin?

Post by PureRage » Fri Jul 23, 2010 1:39 am

hmm, thats odd. do you hve rings in the inventory or on the char already? try removing all jewelery from your char and inventory, then start the game again and gamble a ring and amulet. It may be because they were spawned before the changes.
In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as "A bad move".
Douglas Adams

User avatar
nightshade00123
Forum Regular
Angel
Posts: 709
Joined: Tue Apr 27, 2010 2:32 am

Re: Soft coded merc equip plugin?

Post by nightshade00123 » Fri Jul 23, 2010 1:47 am

Gosh I'm such a !@$% tard. Yeah I forgot about my pluggy stash, I pretty much screwed it up but it works now. In case I didn't edit my post in time for you to read above, great find on this dude. Unbelievable that all these years have past and this slipped by.

But on a side note does this have any adverse effects that you know of on say runes, gems, or cube recipes. I'm going to try several helm only recipes and see if all the new equips get the mods or not. Time to test. :D

Wonder what the code gurus have to say about this, like if something won't be right about it, as far as I'm concerned and from what I've seen this is probably one of the best soft coded workarounds for something everyone generally wants, well done.
Last edited by nightshade00123 on Fri Jul 23, 2010 1:54 am, edited 1 time in total.

User avatar
PureRage
Forum Regular
Angel
Posts: 570
Joined: Fri Jan 08, 2010 9:02 am
Location: Newcastle, England
Great Britain

Re: Soft coded merc equip plugin?

Post by PureRage » Fri Jul 23, 2010 4:34 am

not sure, i got it finished then had to start on some paper work.

If there are any morblems there is another method that works too, it just requires a little more editing. Let me know and i`ll post it up if needed :).

Edit:
ok that way will cause prolems with helm only cube recipes and runewords for example. Sooooo, heres the other way from start to finish, this works perfectly and i've tested with helm only recipes etc.:

Soft coding mercs to be fully equipable

You can use this to add just a few items to the merc (though all equip slots would be shown until you edit the npcinv.dc6 and remove the slots from inventory.txt)

First, download Baron Josh's hireling plugin from
http://phrozenkeep.18v.biz/dload.php?ac ... le_id=1072
Create a folder and extract it (not to your mod folder)
Follow the instructions but DONT move the dll's over.

You need to Open ItemTypes.txt and look for the ring, amulet, boots, gloves and belt rows.
In the Equiv2 column, add hlm1 for each of them.
Any items you don't want to be equipable out of those, you just don't add hlm1 to the column

Now find the Helm row and copy it to a new row and rename it New Helm. Add hlm1 to the Equiv2 column
Go back up to the original helm row and change the code column to hlm1. Remove the armo from the equiv2 column (if you don't, any cube recipes will work on rings and amulets) Scroll along to the store page column and delete the entry
Save and close the file.

columns
entries
Note: you need to remove all rings and amulets from your existing chars you will use this for, including the stash or it wont work.

Credits:
Baron Josh for his hard coded plugin that this was based on.
The Phrozen Keep for all the great guides that helped me get started

Please feel free to use this and post on your own forum/site, just remember to give credit whare it is due
Happy Modding :)

Edit: Updated the attatched plugin to fix a minor issue.
Attachments
PureRage's merc plugin.rar
Pre Edited files ready to be used
(44.37 KiB) Downloaded 1049 times
Last edited by PureRage on Sat Mar 19, 2011 3:27 am, edited 3 times in total.
In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as "A bad move".
Douglas Adams

User avatar
nightshade00123
Forum Regular
Angel
Posts: 709
Joined: Tue Apr 27, 2010 2:32 am

Re: Soft coded merc equip guide

Post by nightshade00123 » Fri Jul 23, 2010 7:06 am

Just wanted to say I have been playing for a while with the merc equip edits on and I can see no problems, helm runewords work the way they should, and not applying helm runewords to belts and gloves and boots, as do helm specific cube recipes like you said, freaking amazing. I just tried a few set items too and they worked, full bonuses and everything.

Very glad you posted this will continue playing and will let it be known if I find any problems. :D

User avatar
PureRage
Forum Regular
Angel
Posts: 570
Joined: Fri Jan 08, 2010 9:02 am
Location: Newcastle, England
Great Britain

Re: Soft coded merc equip guide

Post by PureRage » Fri Jul 23, 2010 7:07 am

much appreciated, glad it's of use :)
In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as "A bad move".
Douglas Adams

User avatar
BigMcLargeHuge
Posts: 28
Joined: Thu Jun 02, 2005 3:26 am
United States of America

Re: Soft coded merc equip guide

Post by BigMcLargeHuge » Wed Mar 02, 2011 3:31 pm

Interesting, somebody necro'ed this thread last week but they've deleted their post.

I'm glad it got necro'ed though! I tried out the technique and so far it works great, I am running LOD 1.13c and my merc can equip gloves, boots, belt, an amulet and one ring, in addition to their normal equipment. The only side effect is that Hero Editor 1.04 is unable to edit magic/rare rings and amulets, but that's not a biggie to me.

PureRage's description of the columns to edit is slightly off, between his last post and the readme in the download. Just look at his ItemTypes.txt in the download for the right values. And the .dc6 file in his download is the same one that's in Baron Josh's.

User avatar
bojoweb
Posts: 60
Joined: Fri Dec 31, 2010 11:33 am
Location: Plovdiv

Re: Soft coded merc equip guide

Post by bojoweb » Wed Mar 02, 2011 5:38 pm

Is there any zip like this on Josh , but for 1.13c ? thanks in advance !

User avatar
BigMcLargeHuge
Posts: 28
Joined: Thu Jun 02, 2005 3:26 am
United States of America

Re: Soft coded merc equip guide

Post by BigMcLargeHuge » Wed Mar 16, 2011 8:58 pm

The .rar is embedded in one of PureRage's posts above.

Edit: I should be more specific: It's the attachment named "PureRage's soft coded merc plugin.rar". Note: I didn't test his Inventory.txt file, I used the one from 1.11b when I was using Baron Josh's plugin. Seems to work fine.

Edit #2: One more new "feature" of using this mod that I've discovered: Rings and amulets are now able to get some magic prefixes and suffixes which previously were only available to the "armo" item type. I looked through the MagicPrefix/Suffix txt files, and this is limited to the "ac%" prefixes such as Sturdy and Holy, and the "Faster Hit Recovery" and "Self-Repair" suffixes. The "ac%" modifier has been very nice to get on rings/amulets as it really does increase your total defense. It likes to show up a lot on rares. Obviously the "Self-Repair" suffix is useless on jewelry :)

I suspect that these changes to item types will prevent you from loading items saved using the Hero Editor in a game without this mod, and vice versa.

User avatar
PureRage
Forum Regular
Angel
Posts: 570
Joined: Fri Jan 08, 2010 9:02 am
Location: Newcastle, England
Great Britain

Re: Soft coded merc equip guide

Post by PureRage » Fri Mar 18, 2011 8:35 am

you need to delete the "armo" from the old helm's line to prevent that
In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as "A bad move".
Douglas Adams

User avatar
BigMcLargeHuge
Posts: 28
Joined: Thu Jun 02, 2005 3:26 am
United States of America

Re: Soft coded merc equip guide

Post by BigMcLargeHuge » Fri Mar 18, 2011 5:37 pm

OK, I'm looking at the ItemTypes.txt file in your download. Line 39's first 3 colums are this:
ItemType     Code       Equiv1
Helm         hlm1       armo
You're saying I need to delete the 'armo' value from the Equiv1 column to prevent the behavior I noted with rings and amulets?

Thanks for clearing this up! And thanks for figuring out this txt-file solution in the first place!! Do you take Paypal donations by chance? :) I am just so happy to be able to use 1.13c with full gear for my merc!

Edit: Do you (or anyone else) have any theories as to why the merc can only equip one ring? Baron Josh's code editing solution to this in 1.10 had the same restriction. (Summary for those without the mod: If you take a ring and hover over the merc's left (your right) ring slot, the background shows green, but when you place the ring in the slot, it actually moves to the merc's right slot (your left), swapping positions with a ring that was already in that slot if necessary.) I tried using the alternate hireling inventory dc6 from Baron Josh's plugin, it shows the same behavior. I guess it must be hardcoded in the hireling's routine, maybe they supported a fuller inventory at one time before D2's release?

User avatar
PureRage
Forum Regular
Angel
Posts: 570
Joined: Fri Jan 08, 2010 9:02 am
Location: Newcastle, England
Great Britain

Re: Soft coded merc equip guide

Post by PureRage » Sat Mar 19, 2011 3:25 am

yeh i posted the files before i actully fixed that issue sorry about that. I'll just update them now.

I don't take donations im afraid, I just do this for fun and even if i did, there are far more deserving folks around here than me.
I'm not sure if The Keep has a donations page but if it has and you really wish to donate then that would be whare to send it. :)

I have a theory on the rings but no idea if its correct. I spent many hours trying to get a second ring working but it's simply not possible.

On a side note, if you want to keep some of the bonuses rings had before like AC%, just open up magprefix/suffix and add rings and amulets (or whatever) to the lines with ac% property.

Anyway, i'm glad you like it and thanks very much for the feedback!
In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as "A bad move".
Douglas Adams

User avatar
kingpin
Retired Admin
Cherub
Posts: 10954
Joined: Sat Jan 11, 2003 12:51 pm
Contact:
Sweden

Hand-picked

Re: Soft coded merc equip guide

Post by kingpin » Tue Mar 29, 2011 4:04 pm

I have a theory on the rings but no idea if its correct. I spent many hours trying to get a second ring working but it's simply not possible.
The left/right itemslots is coded in a way where it need tell if it's placed in the left or right image holder slot. In code it just return 0/1 to tell where to put it in. In fact all slots on hireling is treated as left/right in the code. But, where slots like head only have one slot to put it in is always placed in "left" image slot.

This is way more simplified compare to how the player code is handled. This is a reason why with even ce it's trickly to handle the left/right slots in a good way.

supratec5
Posts: 36
Joined: Sun Feb 20, 2011 11:33 am

Re: Soft coded merc equip guide

Post by supratec5 » Tue Mar 29, 2011 4:09 pm

Last edited by supratec5 on Tue Mar 29, 2011 4:17 pm, edited 1 time in total.

User avatar
Lurix
Dark Alliance Beta Test
Champion of the Light
Posts: 496
Joined: Tue Aug 31, 2010 9:30 am
Location: Birmingham, UK
Bulgaria

Re: Soft coded merc equip guide

Post by Lurix » Tue Mar 29, 2011 4:10 pm

And why do you post this link?Since it's based on PureRage's?
Can't really understand what people sometimes wanna say..

User avatar
BigMcLargeHuge
Posts: 28
Joined: Thu Jun 02, 2005 3:26 am
United States of America

Re: Soft coded merc equip guide

Post by BigMcLargeHuge » Tue Mar 29, 2011 4:13 pm

How will this "help" us, your mod is basically a copy of what PureRage did, except you removed the rings entirely.

supratec5
Posts: 36
Joined: Sun Feb 20, 2011 11:33 am

Re: Soft coded merc equip guide

Post by supratec5 » Tue Mar 29, 2011 4:25 pm

this is not mine i just found this -_- i haven't checked yet.. , he wanted help i didn't know it is copy of his plugin ..

User avatar
kidpaddle94
Forum Legend
Principality
Posts: 2057
Joined: Thu Aug 13, 2009 2:54 pm
Location: localhost
Canada

Re: Soft coded merc equip guide

Post by kidpaddle94 » Wed Mar 30, 2011 12:38 am

lol, this plugin posted on my site is based on the one posted here.
I just removed the rings, and credits are given at end.

Post Reply

Return to “General Mod Making”