Skill Creation (not effects implimentation)
Submitted by The Cricket on Mon, 2006-06-26 23:04 | ||
I have managed to create a new skill. Took me a fair amount of work, so i figured it would include this little help as a template. I added the increment,decrement, and rollover functions, and the button, 2 text_level, and 2 window entries in I added the skill entry in ---------------------------------- art\bitmaps\gui\in_game\b_gui_ig_skill_m-critical_damage.gas and art\bitmaps\gui\in_game\main\icons\b_gui_ig_skill_m-critical_damage.gas [t:tsd,n:b_gui_ig_skill_m-critical_damage] { b dither = true; b hasalpha = true; layer1texture1 = b_gui_ig_skill_m-critical_damage; i texturedetail = 0; } --------------------------------------------------------- ui\interfaces\backend\skills_melee_tab\skills_melee_tab.gas IncrementCriticalDamage$ { OnSkillIncrement$( "critical_damage" ); } DecrementCriticalDamage$ { OnSkillDecrement$( "critical_damage" ); } CriticalDamageRollover$ { UISkillManager.ResetDescriptionTimer( "critical_damage" ); } ------------- [t:button,n:button_critdamage] { disable_color = 0x555F5F5F; b disable_down_on_rollover = true; i draw_order = 518; layer = melee; b partial_disable = true; rect = 286,406,318,438; f rotate_point_x = 0.500000; f rotate_point_y = 0.500000; texture = b_gui_ig_skill_m-critical_damage; [messages] { onlbuttondown = call(IncrementCriticalDamage$); onrbuttondown = call(DecrementCriticalDamage$); onrolloff = call(OnSkillRolloff$()); onrollover = call(CriticalDamageRollover$); } } ------------ [t:text,n:text_level_critdamage] { i draw_order = 631; font_type = b_gui_fnt_22p_ringbearer-gold; justify = center; rect = 309,430,330,448; text = "99"; } [t:text,n:text_level_critdamage_2] { i draw_order = 631; font_type = b_gui_fnt_16p_ringbearer-gold; justify = center; rect = 309,410,330,428; text = "+2"; b visible = false; } ------------ [t:window,n:window_critdamage] { i draw_order = 519; rect = 286,406,318,438; texture = b_gui_ig_m_spec_skill-green; b visible = false; [messages] { onhide = setalpha(0.0); } } [t:window,n:window_critdamage_bg] { i draw_order = 504; layer = melee; rect = 285,405,320,440; f rotate_point_x = 0.500000; f rotate_point_y = 0.500000; texture = b_gui_ig_m2_skillbits; uvcoords = 0.000000,0.453125,0.273438,1.000000; b visible = false; } ---------------- [t:window,n:window_rollover_critdamage] { i draw_order = 613; layer = melee; rect = 282,402,322,442; f rotate_point_x = 0.500000; f rotate_point_y = 0.500000; texture = b_gui_ig_m2_skillbits; uvcoords = 0.296875,0.359375,0.609375,1.000000; b visible = false; } --------------------------------------------------------------------------------- world\global\skills\passive_skills.gas [critdamage] { type = melee; summary = "Some Elven masters, Learned to observe their opponents biology and motion, with years of study they gain a very keen understanding of the body, to the point where they could deal lethal critical strikes doing far more damage."; description = "Critical Hit Damage: Critical Hits Deals ~melee_critical_damage~% Damage"; icon = b_gui_ig_skill_m-critical_damage; max_level = 20; screen_name = "Critical Damage"; [skill_values] { [melee_critical_damage] { level_1 = 215; level_2 = 230; level_3 = 245; level_4 = 260; level_5 = 270; level_6 = 280; level_7 = 290; level_8 = 300; level_9 = 310; level_10 = 320; level_11 = 328; level_12 = 336; level_13 = 344; level_14 = 352; level_15 = 360; level_16 = 368; level_17 = 376; level_18 = 384; level_19 = 392; level_20 = 400; } } [requirements] { [skill_requirements_0] { melee = 5; critical_strike = 5; } [skill_requirements_1] { melee = 5; critical_strike = 5; } [skill_requirements_2] { melee = 5; critical_strike = 6; } [skill_requirements_3] { melee = 5; critical_strike = 6; } [skill_requirements_4] { melee = 5; critical_strike = 7; } [skill_requirements_5] { melee = 5; critical_strike = 7; } [skill_requirements_6] { melee = 5; critical_strike = 8; } [skill_requirements_7] { melee = 5; critical_strike = 8; } [skill_requirements_8] { melee = 5; critical_strike = 8; } [skill_requirements_9] { melee = 5; critical_strike = 9; } [skill_requirements_10] { melee = 5; critical_strike = 9; } [skill_requirements_11] { melee = 5; critical_strike = 9; } [skill_requirements_12] { melee = 5; critical_strike = 9; } [skill_requirements_13] { melee = 5; critical_strike = 10; } [skill_requirements_14] { melee = 5; critical_strike = 10; } [skill_requirements_15] { melee = 5; critical_strike = 10; } [skill_requirements_16] { melee = 5; critical_strike = 10; } [skill_requirements_17] { melee = 5; critical_strike = 10; } [skill_requirements_18] { melee = 5; critical_strike = 12; } [skill_requirements_19] { melee = 5; critical_strike = 12; } } } ------------------------------------------------------------------------ The rect commands are rectangles, the first two numbers being the x and y for the lower left point, the second set for the upper right corner. The button is for the button picture itself. Thought the text was for the description text, but not actually sure about that. The window bg is the background, for the gold border around the skill when you can use it. The draw orders can be tricky, the window needs one higher then then the button, but the window bg needs one lower then the button. I also had trouble if I made use of numbers that were already and use(makes sense), so make sure you use only unused ones. Also I originally named my skill [critical_damage] in the passive skills file and the others, but it gave me bugs with the critical strikes skill. It kept the new skill the same lvl as the critical strikes skill, upping the new one to 5(same as my critical strike) and giving me -5 skill points. Anyways I changed it and it works fine now. Hope this helps. forums: |
||
» |
Very nice!
Thx! worked a lot on it and thought it might help someone; save a little time.
oops didn't log in for that
Cool, thanks for sharing... and welcome to SiegetheDay The Cricket.
Great work! Everyone thought this was hardcoded way back! I had my doubts, thx for proving and sharing it ! Welcome to STD btw..
Welcome to SiegeTheDay, cricket! You'll make a fine addition to the group here.