HelpSearchMembersCalendarShoutbox
Search this forum only?
More Search Options
[X]My Assistant
Loading. Please Wait...
Site Message (Message will auto close in 2 seconds)
Logged in as: micckkk ( Log Out )
My Controls · View New Posts · My Assistant · My Friends · 0 New Messages
Ascent Forums > Ascent Emulator > Full User Code Submission
[PATCH] Spell Coefficient System + Bonus on shields, wowwiki-like Options Track this topic
Email this topic
Print this topic
Download this topic
Subscribe to this forum
Display Modes
Switch to: Outline
Standard
Switch to: Linear+
Nocturno
View Member Profile
Add as Friend
Send Message
Find Member's Topics
Find Member's Posts Feb 4 2008, 10:30 PM Post #1
Advanced Member
Group: Members
Posts: 142
Joined: 27-July 07
Member No.: 109
Hi all,
Last time i posted this work was closed so this is the last time i try to share this new, tested and better then actual spell coefficient system.
First of all.
Why this patch is useful? Actual Spell Coefficient calculation do not consider all the rules for bonus calculations, this make bonus for spells very unaccurate.
Actual System:
- Do not consider AoE effect spells penalty which is 50%
- Do not consider extra effect penalty which is 5% (varies in some spells but use 5% globally is fine for now)
- Do not make any difference between Channeled, Direct Effect, Over Time Effect or combination of them.
- Triggered Spells do not receive coefficient from parent spell. (Mostly channeled spells)
- Periodic Leech do not make tick calculation.
- The sequence of calculation is wrong. This means bonus from equip, talents that affect bonus, talents that affect percent value of spell are not in the correct sequence.
The system i created solves all those problems and additionally add the effect of bonus over absorbschool value, and gives the chance to load special cases from DB, we will always find those damn overule cases, and world.cpp do not make easy the updates.
The patch is created from trunk in a clean updated copy of ascent (rev3757).
<a href="http://diff.pastebin.com/f4af0365d" target="_blank">
http://diff.pastebin.com/f4af0365d</a>
08.02.2008 Updated to rev 3757
The aditional world table and filled with special cases...
Spell Coefficients
http://diff.pastebin.com/f2c634e6
09.02.2008
Do not hesitate to ask or make any comment about the code.
Greetings,
Updated
- Added check for triggered spells. Coefficient to spells like Arcane Missiles should be set at startup, setting the bonus per tick to the triggered spell.
- Updated to 3757
- Updated Override table with some exceptions (Holy Fire) and added some spells that do not receive bonus (Blessed Recovery, Seal of light, etc)
--------------------
Cody900
View Member Profile
Add as Friend
Send Message
Find Member's Topics
Find Member's Posts Feb 5 2008, 12:50 AM Post #2
Advanced Member
Group: Members
Posts: 82
Joined: 25-January 08
Member No.: 29,814
Why was your work closed before?
Jeffie
View Member Profile
Add as Friend
Send Message
Find Member's Topics
Find Member's Posts Feb 5 2008, 01:38 AM Post #3
Advanced Member
Group: Members
Posts: 294
Joined: 31-August 07
From: Netherlands
Member No.: 7,063
QUOTE (Cody900 @ Feb 5 2008, 01:50 AM)
Why was your work closed before?
When the directory structure in trunk changed all patch submission threads got locked to make it easier to see what's updated and not.
Awesome work, hope this gets into trunk.
Cody900
View Member Profile
Add as Friend
Send Message
Find Member's Topics
Find Member's Posts Feb 5 2008, 02:46 AM Post #4
Advanced Member
Group: Members
Posts: 82
Joined: 25-January 08
Member No.: 29,814
QUOTE (Jeffie @ Feb 5 2008, 01:38 AM)
When the directory structure in trunk changed all patch submission threads got locked to make it easier to see what's updated and not.
Awesome work, hope this gets into trunk.
Ah, ok, thanks. Didn't want to go changing stuff that the Ascent team didn't like. Will install it now. Thanks Nocturno.
EDIT: Getting this error in ascent-world.exe:
Sql query failed due to [table 'world.spell_coef' doesn't exist], Query: [DELETE FROM spell_coef;]
Found it in the patch.... in World.cpp it adds this line:
QUOTE
+ WorldDatabase.Execute("DELETE FROM spell_coef;");
It should be:
QUOTE
+ WorldDatabase.Execute("DELETE FROM spell_coef_override");
Nocturno
View Member Profile
Add as Friend
Send Message
Find Member's Topics
Find Member's Posts Feb 5 2008, 09:00 PM Post #5
Advanced Member
Group: Members
Posts: 142
Joined: 27-July 07
Member No.: 109
oops--- just delete that line.. i will update the patch right away
--------------------
Cody900
View Member Profile
Add as Friend
Send Message
Find Member's Topics
Find Member's Posts Feb 6 2008, 08:08 AM Post #6
Advanced Member
Group: Members
Posts: 82
Joined: 25-January 08
Member No.: 29,814
Requesting this to be put in the SVN, it's becoming really annoying to have to manually apply this after every Ascent update. It adds too much code to be merged.
Iceman
View Member Profile
Add as Friend
Send Message
Find Member's Topics
Find Member's Posts Feb 6 2008, 02:58 PM Post #7
Advanced Member
Group: Members
Posts: 610
Joined: 28-July 07
Member No.: 322
this thing is perfect ,but why would ascent care about perfect things?
shinok
View Member Profile
Add as Friend
Send Message
Find Member's Topics
Find Member's Posts Feb 6 2008, 03:33 PM Post #8
Member
Group: Members
Posts: 14
Joined: 1-September 07
Member No.: 7,348
Tested on Ascent Rev 3680
This is missing?
SpellAuras.cpp
CODE
// -4552,8 +4579,24 @@
if(apply)
{
SetPositive();
+ int32 val = mod->m_amount;
+ Player * plr = static_cast< Player* >( GetUnitCaster() );
+ if( plr )
+ {
+ //This will fix talents that affects damage absorved.
+ int flat = 0;
+ SM_FIValue( plr->SM_FSPELL_VALUE, &flat, GetSpellProto()->SpellGroupType );
+ val += float2int32( float( val * flat ) / 100.0f );
+
+ //For spells Affected by Bonus Healing we use Dspell_coef_override.
+ if( GetSpellProto()->Dspell_coef_override >= 0 )
+ val += float2int32( float( plr->HealDoneMod[GetSpellProto()->School] ) * GetSpellProto()->Dspell_coef_override );
+ //For spells Affected by Bonus Damage we use OTspell_coef_override.
+ else if( GetSpellProto()->OTspell_coef_override >= 0 )
+ val += float2int32( float( plr->GetDamageDoneMod( GetSpellProto()->School ) ) * GetSpellProto()->OTspell_coef_override );
+ }
ab = new Absorb;
- ab->amt = mod->m_amount;
+ ab->amt = val;
ab->spellid = GetSpellId();
ab->caster = m_casterGuid;
for(uint32 x=0;x<7;x++)
//Edit - i have tested rev 3680 without this patch
The bug for meele attack and same special attack (Backstab, Sinister Strike...) is not caused by this Spell system
sorry my bad, screens moved into Bug forum.
----------------------------------------------------------------------------------------
"Arcane Missiles Rank 11" - cause 719 dmg/tick
spell power = 1024
719 * 5 = 3595 (Total dmg from "Arcane Missiles Rank 11")
(1 tick do 280 dmg while spell power = 0)
3595 - 280*5 = 2195
2195 / 1024 = 2,14355 => they receive 214,35% from spell power ... wrong
they should receive
5 / 3,5 = 1,42857 => 142,85%
if you insert into "spell_coef_override" for Arcane Missiles coefficient 1,42857 each tick do about 1,7 k dmg... wrong
correct coefficient is:
1,42857 / 5 = 0,285714
spell_coef_override.sql
CODE
CREATE TABLE `spell_coef_override` (
`id` bigint(20) unsigned NOT NULL,
`name` varchar(100) character set utf8 collate utf8_bin default NULL,
`Dspell_coef_override` float NOT NULL default '0',
`OTspell_coef_override` float NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8
CODE
insert into `spell_coef_override` (`id`, `name`, `Dspell_coef_override`, `OTspell_coef_override`) values
('5143','Arcane Missiles Rank 1','0.2857','0'),
('5144','Arcane Missiles Rank 2','0.2857','0'),
('5145','Arcane Missiles Rank 3','0.2857','0'),
('8416','Arcane Missiles Rank 4','0.2857','0'),
('8417','Arcane Missiles Rank 5','0.2857','0'),
('10211','Arcane Missiles Rank 6','0.2857','0'),
('10212','Arcane Missiles Rank 7','0.2857','0'),
('25345','Arcane Missiles Rank 8','0.2857','0'),
('27075','Arcane Missiles Rank 9','0.2857','0'),
('38699','Arcane Missiles Rank 10','0.2857','0'),
('38704','Arcane Missiles Rank 11','0.2857','0');
Cody900
View Member Profile
Add as Friend
Send Message
Find Member's Topics
Find Member's Posts Feb 6 2008, 04:33 PM Post #9
Advanced Member
Group: Members
Posts: 82
Joined: 25-January 08
Member No.: 29,814
Don't auto-patch.
It breaks it if you do, because not all the locations are right. Patch it manually.
Nocturno
View Member Profile
Add as Friend
Send Message
Find Member's Topics
Find Member's Posts Feb 6 2008, 07:29 PM Post #10
Advanced Member
Group: Members
Posts: 142
Joined: 27-July 07
Member No.: 109
QUOTE (shinok @ Feb 6 2008, 12:33 PM)
Tested on Ascent Rev 3680
There are some fatal bugs for meele damages...
Worn dagger 1 - 2 dmg
Attack Power 1216
Backstab hit for ehm ... 1,8k ?
Sinister Strike 700 dmg
normal hit for 420
----------------------------------------------------------------------------------------
"Arcane Missiles Rank 11" - now cause 719 dmg/tick
spell power = 1024
719 * 5 = 3595 (Total dmg from "Arcane Missiles Rank 11")
(1 tick do 280 dmg while spell power = 0)
3595 - 280*5 = 2195
2195 / 1024 = 2,14355 => they receive 214,35% from spell power ... wrong
they should receive
5 / 3,5 = 1,42857 => 142,85%
if you insert into "spell_coef_override" for Arcane Missiles coefficient 1,42857 each tick do about 1,7 k dmg... wrong
correct coefficient is:
1,42857 / 5 = 0,285714
[/code]
1rst... backstab bug? wth that have to do with spell coefficient! Backstab should be handled as strike, not as magic spell. mmm weird...
2nd... You sure arcane missiles is bugued? the system calculates 5000/3500 perfectly. Tick is calculated after getting bonus.
edit: Updated to rev3713 and added absorb part
edit2: added the fix to spells like arcane missiles.
--------------------
shinok
View Member Profile
Add as Friend
Send Message
Find Member's Topics
Find Member's Posts Feb 6 2008, 11:59 PM Post #11
Member
Group: Members
Posts: 14
Joined: 1-September 07
Member No.: 7,348
Idea for improvement:
- add similar options for meele abilities. Some of them should receive bonus from attack power.
debug
View Member Profile
Add as Friend
Send Message
Find Member's Topics
Find Member's Posts Feb 8 2008, 04:14 PM Post #12
Advanced Member
Group: Developer
Posts: 338
Joined: 10-December 07
Member No.: 22,295
the patch doesn't want to apply can you make it again clean against head revision and double check apply works locally on a fresh copy
Jeffie
View Member Profile
Add as Friend
Send Message
Find Member's Topics
Find Member's Posts Feb 8 2008, 05:35 PM Post #13
Advanced Member
Group: Members
Posts: 294
Joined: 31-August 07
From: Netherlands
Member No.: 7,063
QUOTE (debug @ Feb 8 2008, 05:14 PM)
the patch doesn't want to apply can you make it again clean against head revision and double check apply works locally on a fresh copy
Applies fine for me against a fresh 3757. Just make sure you download from pastebin, if you copy/paste you'll get spaces instead of tabs and you'll have missing headers too.
Lavos
View Member Profile
Add as Friend
Send Message
Find Member's Topics
Find Member's Posts Feb 8 2008, 06:13 PM Post #14
Advanced Member
Group: Members
Posts: 35
Joined: 7-February 08
Member No.: 31,705
Patch it manually. Patching it automatically always seems to give errors.
Just open it with Notepad, go to the line specified and look for the code you're replacing.
Nocturno
View Member Profile
Add as Friend
Send Message
Find Member's Topics
Find Member's Posts Feb 8 2008, 06:36 PM Post #15
Advanced Member
Group: Members
Posts: 142
Joined: 27-July 07
Member No.: 109
QUOTE (debug @ Feb 8 2008, 01:14 PM)
the patch doesn't want to apply can you make it again clean against head revision and double check apply works locally on a fresh copy
done..
extracted from a clean 3757 copy of svn and applied to another clean 3757 without problems.
--------------------
Aldaus
View Member Profile
Add as Friend
Send Message
Find Member's Topics
Find Member's Posts Feb 8 2008, 09:23 PM Post #16
Advanced Member
Group: Members
Posts: 312
Joined: 19-October 07
From: Wisconsin
Member No.: 14,777
What exactly does this do?
--------------------
Signature by Hasbro
Recent Works: Portable Teleporter, Portable Morpher, Ai Agents Creator
Help us destroy $hadow, post this in your signature.
<a href="http://img172.imageshack.us/img172/4078/ownedys3.png" target="_blank">
http://img172.imageshack.us/img172/4078/ownedys3.png</a>
Nocturno
View Member Profile
Add as Friend
Send Message
Find Member's Topics
Find Member's Posts Feb 8 2008, 10:47 PM Post #17
Advanced Member
Group: Members
Posts: 142
Joined: 27-July 07
Member No.: 109
QUOTE (Aldaus @ Feb 8 2008, 06:23 PM)
What exactly does this do?
i think it's explained at the begining of the topic.
--------------------
RaZor1812
View Member Profile
Add as Friend
Send Message
Find Member's Topics
Find Member's Posts Feb 9 2008, 07:55 AM Post #18
Advanced Member
Group: Members
Posts: 122
Joined: 28-July 07
From: localhost
Member No.: 418
does this work on healing too?
shinok
View Member Profile
Add as Friend
Send Message
Find Member's Topics
Find Member's Posts Feb 9 2008, 07:57 AM Post #19
Member
Group: Members
Posts: 14
Joined: 1-September 07
Member No.: 7,348
QUOTE (RaZor1812 @ Feb 9 2008, 08:55 AM)
does this work on healing too?
Yes it does.
Nocturno
View Member Profile
Add as Friend
Send Message
Find Member's Topics
Find Member's Posts Feb 9 2008, 05:45 PM Post #20
Advanced Member
Group: Members
Posts: 142
Joined: 27-July 07
Member No.: 109
updated data to override table.
--------------------
? Next Oldest · Full User Code Submission · Next Newest ?
1 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
1 Members: micckkk
Fast Reply
Enable email notification of replies | Enable Smilies | Enable Signature
Forum Home Search Help Community |-- Announcements |-- Introductions |-- General Discussion |-- Fun and Entertainment Ascent Emulator |-- Subversion Commits |-- Release/Milestone Announcements |-- Crash Reporting |-- Bug Reporting |-- Code Discussion |---- Patch Submission |------ Added Patches |-- Full User Code Submission Help and Support |-- Server Configuration & Administration Community Developments |-- Database |---- Releases |-- LUA Scripting |---- Releases |-- Module Authoring (c++) |---- Releases |-- Tools/Scripts/Packages QA Team |-- Bug Reporting |-- Improvements/Suggestions
Display Mode: Standard · Switch to: Linear+ · Switch to: Outline
Track this topic · Email this topic · Print this topic · Subscribe to this forum
IPB Classic Blue Ascent Pro English Lo-Fi Version 0.0297 sec -- 11 queries GZIP Enabled
Time is now: 18th February 2008 - 05:27 AM
Powered By IP.Board 2.3.2 ? 2008 IPS, Inc.