Forum > Serverside Modding

[C++] [WotLk] Real Stealth...

<< < (3/3)

Kaev:
Thanks for sharing your code and ideas! Imo the entire idea is still pretty awesome. Even better that you really could create something like you imagined!

If possible somehow you can upload your video on a file uploading site or send it via skype or whatever you can and i'll upload it for you.

Ascathos:

Scytheria23:
Well thank you, Ascathos (I think).

I feel the need to explain how this code can be tweaked to fit projects other than my own.

(1) Attributes

You'll need to decide a 'cap' for both intellect and agility.  Players can have attributes over this cap, but doing so will not improve either perception or stealth.  In my project, both are capped at 200, but in a normal WotLK game this will need to be a lot higher (maybe 2000?) - I forget how high attributes get.

You'll also need to decide what constitutes a base score for both - e.g. what a normal max-level NPC should have.  In my project, this is 100.  In a WotLK game, this must be higher - typically half of the cap.

Change the code as follows:


--- Code: --- float v_intellect = YOUR INT BASE AS A FLOAT;
float o_agility = YOUR AGI BASE AS A FLOAT;
--- End code ---

and


--- Code: --- if (v_intellect < 1.0f) v_intellect = 1.0f;
if (o_agility < 1.0f) o_agility = 1.0f;
if (v_intellect > YOUR INT CAP AS A FLOAT) v_intellect = YOUR INT CAP AS A FLOAT;
if (o_agility > YOUR AGI CAP AS A FLOAT) o_agility = YOUR AGI CAP AS A FLOAT;
--- End code ---

(2) Stealth/Perception Bonuses

If you have not done anything to the WotLK spells, use this:


--- Code: --- int32 sneakbonus = 350;

--- End code ---
and


--- Code: --- if (sneakbonus > 350) sneakbonus = 350;
--- End code ---

(3) Ranges


You can tinker with the ranges of the view arcs with these:


--- Code: --- radiusinner = combatReach;
radiusmiddle = radiusinner + XXX - (YYY * sneakscale);
radiusouter = radiusmiddle * ZZZ;
--- End code ---

XXX = base radius in which all are detected irrespective of stealth
YYY = amount that XXX can be reduced by stealth (I suggest about 1/3 of XXX)
ZZZ = multiplier of base radius in which unstealthed are detected when in front (must be more than 1, I suggest 2+)

(4) Player and NPC levels

Since this system is based around attribute scores and since attribute scores typically increase with level, there's no real need to incorporate these.  Having said that, all NPCs will have the same base perception.  I'm happy with this - you don't really get better eyesight the more experienced a warlock you are.

Navigation

[0] Message Index

[*] Previous page

Go to full version