View Full Version : I changed Bind Wound but...
revloc02c
12-09-2010, 10:49 PM
I just need some guidance on what you got to copy over to your server folder after you change some C++ code and recompile it.
Here's what I did:
In Visual C++ 2008 Express opened the Zone project and edited the client.cpp file to look like so
if (GetSkill(BIND_WOUND) > 200) {
bindhps += GetSkill(BIND_WOUND)*4/10;
} else if (GetSkill(BIND_WOUND) >= 10) {
bindhps += GetSkill(BIND_WOUND)/4;
}
// I am increasing the amount Bind Wound heals by mulitplying it by 10
bindhps = bindhps * 10;
I only added the last line (the rest is just for reference), just making Bind Wound 10 times as powerful right.
Then I go to the menu item Build > Project Only > Rebuild Only Zone
Everything compiles great.
I go into the C:\EQEmuSource\trunk\EQEmuServer\Build folder and copy Zone.exe over to my EQEmu folder where I run my server from. And guess what, Bind Wound remains exactly the same. So what gives, am I just daft. Is there more to copy over that just Zone.exe?
So I tried it again, and did a Build > Clean Solution, and then Build Solution to get a fresh build with my precious <sarcastic> new line of code, and nuthin. I can only figure I am not copying over everything I need to or there is a lot more to Bind Wound that I don't know about.
Can anyone help, point me in the right direction, offer a clue, throw me a bone?
Thanks
Secrets
12-09-2010, 11:01 PM
I just need some guidance on what you got to copy over to your server folder after you change some C++ code and recompile it.
Here's what I did:
In Visual C++ 2008 Express opened the Zone project and edited the client.cpp file to look like so
if (GetSkill(BIND_WOUND) > 200) {
bindhps += GetSkill(BIND_WOUND)*4/10;
} else if (GetSkill(BIND_WOUND) >= 10) {
bindhps += GetSkill(BIND_WOUND)/4;
}
// I am increasing the amount Bind Wound heals by mulitplying it by 10
bindhps = bindhps * 10;
I only added the last line (the rest is just for reference), just making Bind Wound 10 times as powerful right.
Then I go to the menu item Build > Project Only > Rebuild Only Zone
Everything compiles great.
I go into the C:\EQEmuSource\trunk\EQEmuServer\Build folder and copy Zone.exe over to my EQEmu folder where I run my server from. And guess what, Bind Wound remains exactly the same. So what gives, am I just daft. Is there more to copy over that just Zone.exe?
So I tried it again, and did a Build > Clean Solution, and then Build Solution to get a fresh build with my precious <sarcastic> new line of code, and nuthin. I can only figure I am not copying over everything I need to or there is a lot more to Bind Wound that I don't know about.
Can anyone help, point me in the right direction, offer a clue, throw me a bone?
Thanks
Try and build it as a debug build and put a breakpoint (f9) on Bind Wound's code after the point where you modified the code and before it as well. Attach the debugger to zone and bind wound. (debugging -> attach.. in VS2008) It'll stop at the breakpoint where you are bind wounding.
You can see the variable change there. Once you get bind wound working from that point, I would suggest maybe trying to do it based on your max hp versus the skill (something like a percentage based on your skill healed every tick, best way to do that since you may be dealing with smaller numbers would be casting it as a float temporarily ie; bindhp = (float)bindhp / (float)100;)
revloc02c
12-13-2010, 06:30 AM
Thanks Secrets I appreciate the info. I am still working on it (I got a lot of things demanding my attention right now so it's slow going), hopefully I can get it figured out.
revloc02c
07-31-2011, 01:18 AM
I know this is an old post but I finally got around to getting this to work, and I thought I should write the conclusion of it.
There were three changes I made to bind wound in the client.cpp file (about line 2600 in my code) in two places. They are in close proximity in the code, but not consecutive so I post two code blocks:
//int max_percent = 50 + 10 * GetAA(aaFirstAid);
//if(GetClass() == MONK && GetSkill(BIND_WOUND) > 200) {
// max_percent = 70 + 10 * GetAA(aaFirstAid);
//}
//Changing max_percent so that any class that can get over 200 can bind to 70, not just monks (but can go up to 100% with the right AAs)
//revloc02-30Jul2011
int max_percent = (GetSkill(BIND_WOUND) > 200 ? 70 : 50) + 10 * GetAA(aaFirstAid);
Old code is commented out ( with // ). New code I got from this thread (http://www.eqemulator.org/forums/showthread.php?t=18379). And then a couple lines later...
int bindhps = 10; //changed base from 3 to 10, revloc02-30Jul2011
Message(15, "Base:Binding wounds = %d%", bindhps);
//if (GetSkill(BIND_WOUND) > 200) {
// bindhps += GetSkill(BIND_WOUND)*4/10;
//} else if (GetSkill(BIND_WOUND) >= 10) {
// bindhps += GetSkill(BIND_WOUND)/4;
//}
//Changed skill formula, 1 for 1 now, revloc02-30Jul2011
bindhps += GetSkill(BIND_WOUND);
Message(15, "With Skill:Binding wounds = %d%", bindhps);
The changes I made to bind wound are not really relevant to the original problem that I posted. I was trying to figure out how to make changes to cpp files and then see them working in the game. I have reread my original post and can't see that I did anything wrong as far as compiling and moving the files. I'll say this though, after making a change and compiling I went to the folder here: C:\EQEmu\EQEmuSource\trunk\EQEmuServer\Build
and I could see which files were updated by the timestamp. That told me which files I needed to move to my EQEmu server folder. This seems so elementary now, but six months ago I was flummoxed.
Furthermore I put debug messages in so that I could track the changes I made, that is what the "Message" lines do in the code I posted. They should be taken out for normal game play. Again, this seems so obvious now (to use debug messages), I've learned a lot since then. Hope this helps someone sometime.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.