Archived copy of war3source.com, the War3Source forum (2009–2020), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2014-08-06 (original capture). Forum · All archived topics · Wiki · Bug tracker · Blog
Chat

War3:Source
August 06, 2014, 04:25:02 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Download: http://ownageclan.com/jenkins/job/War3Source-Default1/
WIKI page: http://ownageclan.com/wiki/index.php/Main_Page
War3Source GIT repo: https://github.com/War3Source/War3Source
War3Source servers: http://www.game-monitor.com/search.php?vars=a_war3_version=
War3Source Function Reference: http://ownageclan.com/war3source/functionreference/?search=player
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Undead custom  (Read 134 times)
techwarfare
Newbie
*
Posts: 15


View Profile
« on: July 15, 2014, 05:28:32 AM »

Hey i'm trying to make a custom undead class i have played SSG and i want a knife race so i took the variables from yoshi that has long jump and tried to implement the two skills in and i have had some errors in converting the file.
Code:
new Float:SuicideBomberRadius[5] = {0.0, 250.0, 290.0, 310.0, 333.0};
new Float:SuicideBomberDamage[5] = {0.0, 166.0, 200.0, 233.0, 266.0};
new Float:SuicideBomberDamageTF[5] = {0.0, 133.0, 175.0, 250.0, 300.0};

new Float:ElectricGravity[5] = { 1.0, 0.92, 0.84, 0.76, 0.68 }
new Float:JumpMultiplier[5] = { 1.0, 3.1, 3.2, 3.3, 3.4 }
new Float:UnholySpeed[5] = {1.0, 1.05, 1.10, 1.15, 1.20};
new Float:LevitationGravity[5] = {1.0, 0.85, 0.7, 0.6, 0.5};
new Float:VampirePercent[5] = {0.0, 0.05, 0.10, 0.15, 0.20};

new SKILL_LEECH, SKILL_SPEED, SKILL_LOWGRAV, SKILL_SUICIDE, SKILL_LONGJUMP, SKILL_ELECTRICGRAVITY;

public OnPluginStart()
{
    LoadTranslations("w3s.race.undead.phrases");
}

public OnWar3LoadRaceOrItemOrdered(num)
{
    if(num == 10)
    {
        thisRaceID = War3_CreateNewRaceT("undead custom");
SKILL_ELECTRICGRAVITY = War3_AddRaceSkillT(thisRaceID, "Electric Gravity", false, 4);
SKILL_LONGJUMP = War3_AddRaceSkillT(thisRaceID, "Long Jump", false, 4);
        SKILL_LEECH = War3_AddRaceSkillT(thisRaceID, "VampiricAura", false, 4, "20%");
        SKILL_SPEED = War3_AddRaceSkillT(thisRaceID, "UnholyAura", false, 4, "20%");
        SKILL_LOWGRAV = War3_AddRaceSkillT(thisRaceID, "Levitation", false, 4, "0.5");
        SKILL_SUICIDE = War3_AddRaceSkillT(thisRaceID, "SuicideBomber", true, 4);
       
        War3_CreateRaceEnd(thisRaceID);
       
War3_AddSkillBuff(thisRaceID, SKILL_LONGJUMP, fJumpMultiplier, JumpMultiplier);
War3_AddSkillBuff(thisRaceID, SKILL_ELECTRICGRAVITY, fElectricGravity, ElectricGravity);
        War3_AddSkillBuff(thisRaceID, SKILL_LEECH, fVampirePercent, VampirePercent);
        War3_AddSkillBuff(thisRaceID, SKILL_SPEED, fMaxSpeed, UnholySpeed);
        War3_AddSkillBuff(thisRaceID, SKILL_LOWGRAV, fLowGravitySkill, LevitationGravity);
    }
}

?
Now this is the first time i have ever done anything like this so could i get some help when i try it says that fElectricGravity is undefined and same with the Jump Multiplier any tips?
Logged
-El Diablo
Hero Member
*****
Posts: 509


View Profile
« Reply #1 on: July 15, 2014, 06:51:47 AM »

You will find all the defines in W3Buff in file https://github.com/War3Source/War3Source

You can not add a skill buff that does not exist.  You must program it yourself.  The only thing you can use War3_AddSkillBuff is on buffs that already exist in the file mentioned above.

How about you read and look over all the other races and look how each is built.  Try to figure out what the differences are.

As far as I know, War3Source stock version does not have fElectricGravity nor fJumpMultiplier.

You will need to create them yourself.  Just remove the War3_AddSkillBuff of those two and create those skills yourself.

Since I'm pretty sure that the translation files don't have those two in them, you might want to either create the translations yourself or do something about the War3_AddRaceSkillT of those two.

I would explain further, but I'm short on time.

Maybe learn to program sourcemod first before taking on such a large project head on?
« Last Edit: July 15, 2014, 07:02:10 AM by -El Diablo » Logged
Ownz
Developer
Administrator
Hero Member
*****
Posts: 2368


chmod -R 777 *


View Profile WWW
« Reply #2 on: July 15, 2014, 03:50:06 PM »

https://github.com/War3Source/War3Source/blob/master/addons/sourcemod/scripting/W3SIncs/War3Source_Constants.inc
Logged

-El Diablo
Hero Member
*****
Posts: 509


View Profile
« Reply #3 on: July 15, 2014, 05:26:31 PM »

^^ yeah here.. some reason on my phone it looked like it copy pasted right, but now that i really see it.. it was wrong.
Logged
Remy Lebeau
Sr. Member
****
Posts: 409



View Profile WWW
« Reply #4 on: July 15, 2014, 08:05:04 PM »

Hi tech,

Do you have the sourceode for yoshimitsu, or did you just grab the variable numbers from our wiki?  It looks like you did the second and tried to simply mash it into what the functions for undead look like.

Unfortunately, that's not how it works!  Most of yoshimitsu is NOT built out of default buffs, but custom functions, so you can't just copy how undead works...

To be honest, that looks to me like you don't really understand how the race files work, so I'd echo the suggestion to go and look through all of the other stock races as well, and then try to create your own simpler race first.

Do you have a w3s server to run this race on?  How are you going to test / use this race?
Logged

techwarfare
Newbie
*
Posts: 15


View Profile
« Reply #5 on: July 15, 2014, 11:30:38 PM »

I do have a server to test this on, I was just gonna give my self level banks and test if the jump multiplier works
Logged
-El Diablo
Hero Member
*****
Posts: 509


View Profile
« Reply #6 on: July 16, 2014, 06:49:02 AM »

Read This:

https://wiki.alliedmods.net/Introduction_to_sourcepawn
« Last Edit: July 16, 2014, 06:51:53 AM by -El Diablo » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!