Hardcore SE-like Server

Any discussion not related to the other forum topics
User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Hardcore SE-like Server

Post by kjLotus » Thu May 08, 2014 1:43 am

masterurat wrote:Ok so I can roll augments on my gear (working and done) but they aren't actually doing anything? :|
yep

masterurat
Posts: 81
Joined: Sat May 03, 2014 7:05 pm

Re: Hardcore SE-like Server

Post by masterurat » Thu May 08, 2014 6:20 am

Well after all that hard work making the system I guess I can of have to add them myself then, wont I? :p

Am I right in that I merely need to add a check for each individual augment in the unfinished setAugmentModifer function in item_armor.cpp here?

Code: Select all

void CItemArmor::SetAugmentMod(uint16 type, uint8 value)
{
    // TODO: если augmenttype совпадает с modtype, то мы може установить значение сразу,
    //       либо придется использовать дополнительную логику

    if (type != 0) 
    {
        setSubType(ITEM_AUGMENTED);       
    }
	


    //addModifier(new CModifier(type,value));
}
Right there?

IE:

If augment = hp+1 then addmodifer(hp+1)? Basically? Will that code literally be all that is necessary to make augments fully functioning?

Cause if so, all I would need is some reference sheet of what the modids are what actual stats, and then I can sit down and start making a function that'll take in an augment+its value and return the relative modif and its value.

IE put in convert(1,6) and it'll output HP+7's equivalent modID.

So, where would I go about finding this modID list?

In other news, all the code for rolling stats on my gear is perfected, since I realized the item class just has an auctionhouse ID, so I can just check against that and be able to tell the difference between a sword, HTH, shield, chest super easy without much effort...

Here's the code at work:

Image

All bought off NPC and automatically rolled themselves. Works on literally all armor and weapons except ammos, level 1-75.

Level 1-19 no rolls
20-39 1 roll
40-59 2 rolls
60-75 3 rolls

All rolls get +1mod every 15 levels, up to +5 to each roll at level 75. Rolls are based on item level, not player level. Also, each slot has about a pool of 20 mods to pull from (give or take) and won't repeat its' rolls either (Except weapons which can roll Dmg multiple times)

As you can see, the game will even roll some WS dmg+ rolls on weapons, matching their type. Daggers will roll dagger ws dmg+, and so on.

Ranged weapons wont, however, as I can't differentiate between marksman, archery, and throwing weapons, so I didn't want you to be able to roll a +dmg to an archery ws on a marksman weapon. Instead they can roll ranged attack related stats though, so it's balanced (ish)

Weapons can also roll skill+, and instruments can roll skill+ too, as well as fast cast and song cast time-.

This all does nothing but that just gives me good reason to do the augment code for you guys :)

Just point me in the direction of a way to figure out what the modIDs are.

A table like this: https://wiki.dspt.info/index.php/Augments is exactly what I would like, though if there's anything in the code that is good too.

User avatar
demolish
Developer
Posts: 262
Joined: Thu Jul 26, 2012 7:12 am

Re: Hardcore SE-like Server

Post by demolish » Thu May 08, 2014 10:43 am

You're gonna have to add the table yourself, something like augments.sql or w/e should be fine.
Create the new table with the augment id, modifier and value of the mod to be applied and query that table to apply the modifier to the item when needed.
The Mod IDs can be found in src/map/modifier.h
<Giblet[NewBrain]> kj with this first step would be fine on my shit
Click here for a guide on scripting missions.

masterurat
Posts: 81
Joined: Sat May 03, 2014 7:05 pm

Re: Hardcore SE-like Server

Post by masterurat » Thu May 08, 2014 1:36 pm

Xx_DeMoLiSH wrote: The Mod IDs can be found in src/map/modifier.h
Perfect thats exactly the enum I was looking for thank you.

Edit: Ok so I got it.. kind of working.

Except the values are waaaaay off what they are supposed to be... like anywhere from double to 10 times the amount they are supposed to add :|

Code: Select all

void CItemArmor::SetAugmentMod(uint16 type, uint8 value)
{
    // TODO: если augmenttype совпадает с modtype, то мы може установить значение сразу,
    //       либо придется использовать дополнительную логику

    if (type != 0) 
    {
        setSubType(ITEM_AUGMENTED);       
    }
	
	switch (type) {
	case 1:	{addModifier(new CModifier(MOD_HP,value));} //HP + 1
	case 2: {addModifier(new CModifier(MOD_HP, value + 33)); }	 //HP + 33
	case 3:	{addModifier(new CModifier(MOD_HP, value + 65)); } //HP + 65
	case 4:	{addModifier(new CModifier(MOD_HP, value + 97)); } //HP + 97
	case 5:	{addModifier(new CModifier(MOD_HP, -1 * value)); } //HP - 1
	case 6:	{addModifier(new CModifier(MOD_HP, (-1 * value) - 33)); } //HP - 33
	case 7:	{addModifier(new CModifier(MOD_HP, (-1 * value) - 65)); } //HP - 65
	case 8:	{addModifier(new CModifier(MOD_HP, (-1 * value) - 97)); } //HP - 97
	case 9:	{addModifier(new CModifier(MOD_MP, value)); } //MP + 1
	case 10: {addModifier(new CModifier(MOD_MP, value +33)); }	 //MP + 33
	case 11: {addModifier(new CModifier(MOD_MP, value +65)); }	 //MP + 65
	case 12: {addModifier(new CModifier(MOD_MP, value + 97)); }	 //MP + 97
	case 13: {addModifier(new CModifier(MOD_MP, -1 * value)); } //MP - 1
	case 14: {addModifier(new CModifier(MOD_MP, (-1 * value)) -33); }	 //MP - 33
	case 15: {addModifier(new CModifier(MOD_MP, (-1 * value)) - 65); }	 //MP - 65
	case 16: {addModifier(new CModifier(MOD_MP, (-1 * value)) - 97); }	 //MP - 97
	case 17: {addModifier(new CModifier(MOD_HP, value)); addModifier(new CModifier(MOD_MP, value)); }	 //HP + 1 MP + 1
	case 18: {addModifier(new CModifier(MOD_HP, value + 33)); addModifier(new CModifier(MOD_MP, value + 33)); }	 //HP + 33 MP + 33
	case 19: {addModifier(new CModifier(MOD_HP, value)); addModifier(new CModifier(MOD_MP, value * -1)); }	 //HP + 1 MP - 1
	case 20: {addModifier(new CModifier(MOD_HP, value + 33)); addModifier(new CModifier(MOD_MP, (value * -1) -33)); }	 //HP + 33 MP - 33
	case 21: {addModifier(new CModifier(MOD_MP, value)); addModifier(new CModifier(MOD_HP, value * -1)); }	 //HP - 1 MP + 1
	case 22: {addModifier(new CModifier(MOD_MP, value +33)); addModifier(new CModifier(MOD_HP, (value * -1) -33)); }	 //HP - 33 MP + 33
	case 23: {addModifier(new CModifier(MOD_ACC, value)); }	 //Accuracy + 1
	case 24: {addModifier(new CModifier(MOD_ACC, value * -1)); }	 //Accuracy - 1
	case 25: {addModifier(new CModifier(MOD_ATT, value)); }		 //Attack + 1
	case 26: {addModifier(new CModifier(MOD_ATT, value * -1)); }	 //Attack - 1
...
...
Im guessing a strict conversion of value of the augment -> value of the modifier wont work then? Even defense isn't working, its about double the expected value. An augment of def+9 is giving like +18 defense instead of... +9...

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Hardcore SE-like Server

Post by kjLotus » Thu May 08, 2014 4:57 pm

print "value" and see what it is, if it doesn't match what the item says in game then its a problem with the packet, otherwise its probably something you did

masterurat
Posts: 81
Joined: Sat May 03, 2014 7:05 pm

Re: Hardcore SE-like Server

Post by masterurat » Fri May 09, 2014 3:50 am

Ok I think I figured out the issue, it seems there are two functions, Loadaugment and SetAugment that are both being called when the character loads up inventory by two different parts of the server.

Both of them run basically the same code, which results in the augment rewriting itself (no problem) but the augment MOD gets written twice, which does not overwrite itself but just doubles itself up.

Since this isn't really the place for this discussion though I will make a thread

Flunklesnarkin
Posts: 238
Joined: Wed Sep 05, 2012 10:48 am

Re: Hardcore SE-like Server

Post by Flunklesnarkin » Mon Sep 01, 2014 7:29 pm

I've basically been waiting for a classic-ish server to reach a decent population threshold before I jump back into this again.

I'm still watching this project though and glad to see it's still being worked on. I may try to log back into the darkstar classic server again at some point here, i wonder if my character even exists still. I know I tossed so much stuff on the AH my delivery box is probably overflowing with gil if it does exist lol.. but I probably don't have time for this until xmas time at least. I've been so busy. It's just a shame to have such a classic server so empty but it's still nice to wander around sometimes.

Silverwolf
Posts: 46
Joined: Thu Jan 10, 2013 9:22 pm

Re: Hardcore SE-like Server

Post by Silverwolf » Tue Oct 07, 2014 11:31 am

I was thinking you guys should join me on creating a classic ffxi server experience. I have been making an attempt at a server with content up to RoZ....

Post Reply