|
-El Diablo
|
 |
« on: April 18, 2012, 08:35:23 AM » |
|
Is there anyways to allow unlimited skills?
I'm working to create a complex Race system that will have between 40-80 levels of play.
Would changing the number in constants.inc "#define MAXSKILLCOUNT 8" and make it 80, would that allow for 80 skills?
I know this is unheard of, but I've just wanted "for testing purposes" to create a ton of skills that are smaller increases in different parts of the buff system along with requirements for other skills.
Would like to "hide" or "shadow" skills that you can not put points into unless you have a certain skill leveled up. Pre-requirements for certain skills.
I just would like to increase these numbers without doing any heavy moding of war3source.
|
|
|
|
|
Logged
|
|
|
|
|
Necavi
|
 |
« Reply #1 on: April 18, 2012, 09:01:24 AM » |
|
I think that War3Source is designed in such a way that if you defined a higher MAXSKILLCOUNT and recompiled it should work fine (Note: it would be best to recompile EVERYTHING after that change, just to be safe)
|
|
|
|
|
Logged
|
|
|
|
|
Revan
|
 |
« Reply #2 on: April 18, 2012, 12:55:58 PM » |
|
Would like to "hide" or "shadow" skills that you can not put points into unless you have a certain skill leveled up. Pre-requirements for certain skills.
do you mean skill dependencys? for example skill Advanced Sprinting needs Sprinting on level x/maxlevel to be leveled If yes, I know someone who can probably help you in this - he already coded such dependency engine just by editing the addskill native and modding the spendskill menu to interface with thoose 'new' natives(not actually new, he just added optional paramters to keep compatiblity with older w3s races/stuff)... but it was never tested because we (as it was finished) didn't had a server anymore and now we don't need such dependency engine anymore because we implemented some sort of race dependencys(ex: max undead to unlock naix) into w3s
|
|
|
|
|
Logged
|
|
|
|
|
-El Diablo
|
 |
« Reply #3 on: April 18, 2012, 04:04:14 PM » |
|
Revan,
I would love the source to be able to do exactly what your talking about. I personally do not like race dependancies.
I'm experiementing this on my personal war3source server and has nothing to do with CGA.
My personal war3source server is private only, that I use it to learn programming sourcemods, and this. I'm pretty new to programming sourcemod, war3source, etc. Although I've been programming all my life using basic /pascal / delphi. Sourcepawn is my first experience programming something related to C other than php.
Revan, overall it would be a great help to obtain the code. If you are unable to still get that code or help, just with your information I maybe able to do that myself... it will just take much longer.
I'll promise to upload my version of war3source to this website once I'm able to get it running the way I like it, because if it wasn't for war3source being open source, I'd not even be able to do this.
|
|
|
|
|
Logged
|
|
|
|
|
Vulpone
|
 |
« Reply #4 on: April 22, 2012, 06:56:58 AM » |
|
eh. it's my code
I've never tested it out and I passed the depending skill by string, not by ID since I was lazy and was on a train. I have it coded into one of my races as well, so i'll have to try it out soon
i'm on vacation right now so i cant do much but i'll see what i can do when i get back (next week) i also hadn't implemented translated races since I wanted to know if what I did worked, but it's not that difficult.
i just added 3 more parameters to the AddRaceSkill function (bool, string, int (requiresotherskill, otherskillname and uh otherskilllvl i think)) nothing too complex, it's a while back. i could probably do a more dynamic way but if it works, it works so i'll let other people worry about it
a little more patience :p
|
|
|
|
|
Logged
|
Sapere aude!
|
|
|
|
-El Diablo
|
 |
« Reply #5 on: April 22, 2012, 10:39:05 AM » |
|
I have time.
Is your code that you plan to test setup to where a player sees all skills, or do they hide the skills until a certain skill is leveled?
I personally prefer to have those other skills either "hidden" or "greyed out".
I'll try to look around more at the code I currently have.
|
|
|
|
|
Logged
|
|
|
|
|
Vulpone
|
 |
« Reply #6 on: April 24, 2012, 12:51:45 PM » |
|
I currently set it to check (on levelup) if the required level == the level that he currently has. If it is, you can select the skill and it's normal. if it's not, however, it is "white" (not selectable in the menu) and gets a suffix to it. For instance: 4 skills: -love -friendship -magic -brony let's say brony req. friendship level 4. until friendship is level 4, brony says "brony [Requires Friendship Level 4]" and is white. if(War3_IsSkillPartOfTree(race_num, x)) //the skill depends on something { //tell me if you know a more efficient way as this is not efficient! new String:strReturn[2000]; // the skill depends on this(name) War3_GetSkillTreeDependencyName( race_num, i, sizeof(strReturn)); Format(sbuf, sizeof(sbuf), "%d", x); Format(buf, sizeof(buf),"%T","{skillname} (Skill Level {amount})",client, skillname, curskilllevel+1); new minlevel = 1; new skilllevelinternal = 0; for(new i= 1; i<=SkillCount; i++) //I have to loop again because of the other one. { decl String:name[64]; W3GetRaceSkillName(race_num,i,name,sizeof(name)); minlevel = War3_SkillTreeDependencyLevel(race_num, i); if(StrEqual(name, strReturn), false) { //comparing the name of the skill (i) with the name of the skill on which wt depended skilllevelinternal = War3_GetSkillLevelINTERNAL(client,race_num,i); if( skilllevelinternal >= minlevel) //HAS he leveled the skill needed higher than/equal to the required parameter? { Format(buf, sizeof(buf),"%s %T",buf,"[Requires {skillname} Level {amount}]",client, name, minlevel); //finally, apply all necessary changes to the menu } } } AddMenuItem(sMenu, sbuf, buf, (skilllevelinternal >= minlevel)?ITEMDRAW_DEFAULT:ITEMDRAW_DISABLED); //HERPDERP }[/code
as you can see, I was forced to create my own natives.. reason I dont wanna commit this to svn is because I'd have to look at what I changed at interface, raceclass and MenuSpendSkills.. we have our own modified version of war3source, so idk :s
|
|
|
|
« Last Edit: April 25, 2012, 03:51:39 AM by Vulpone »
|
Logged
|
Sapere aude!
|
|
|
|
Vulpone
|
 |
« Reply #7 on: April 26, 2012, 07:29:33 AM » |
|
so...
I was on the train for 6h again today. I've recoded the damn thing to use the ID (SKILL_ONEHIT) of the skill, instead of its name "One Hit Everything". Kinda feel like this is more dynamic. All that's left to do is test it now.
I'll keep you updated :p Still on vacation though
|
|
|
|
|
Logged
|
Sapere aude!
|
|
|
|
Revan
|
 |
« Reply #8 on: May 03, 2012, 06:55:48 AM » |
|
that method vulpone describes works fine, but there's 1 big problem: all races need a recompile since the AddSkill native changed(it is the same syntax[added new params with default values] but all previous compiled races doesn't know about the new parameters therefore errors WILL occur) .. so we need a better method to add dependencys, I've implemented the easiest and best way to do this(I hope lol^^). at first I've added a new native which will add/remove dependencys at runtime. basicly like this: thisRaceID = War3_CreateNewRace( "Priest", "priest" ); S_HEAL=War3_AddRaceSkill( thisRaceID, "Rejuvenation", "Mastering the human anatomy has granted you the ability to aid your comrades.\nYou cast a spell that heals 10-35 HP to you and units around you.", false, 6 ); S_HEALADVANCED=War3_AddRaceSkill(thisRaceID, "Healing Circle", "Cast a spell that heals all friendly units within the radius.", false, 4); //depends on Rejuvenation on lvl 4 .... .... .... War3_CreateRaceEnd( thisRaceID ); War3_SetDependency( thisRaceID, S_HEALADVANCED, S_HEAL, 4);
then a small modifications to the raceclass to set the "default" value which tells the spendskill menu to not check dependencys if they aren't any.. and ofc the dependency engine which stores the information. grab that stuff from the SVN while it's hot
|
|
|
|
« Last Edit: May 03, 2012, 06:58:02 AM by Revan »
|
Logged
|
|
|
|
|
-El Diablo
|
 |
« Reply #9 on: May 07, 2012, 07:00:57 AM » |
|
Okay, grabbed SVN.
I'll look the code over, and plan to use it. I'll recompile the whole thing.
I haven't yet posted a branch of my code yet, but when I get things working on my end I will. I'm still trying to config 2 separate war3source compiles.. one for server #1, and another compile for server #2.
BTW, Is there a way to add new parameters to the race sql database? So that I can retrieve and set new information into the database easy? or do I have to set that up thru other means? As i've not done any of the SQL stuff before, is that in sourcemod or war3source?
|
|
|
|
|
Logged
|
|
|
|
|
-El Diablo
|
 |
« Reply #10 on: May 27, 2012, 02:24:25 AM » |
|
thisRaceID=War3_CreateNewRace("Human Alliance","human"); SKILL_INVIS=War3_AddRaceSkill(thisRaceID,"Invisibility", "Makes you partially invisible\nReduces visibility to 60% (CS), 40% (TF).",false,4); SKILL_HEALTH=War3_AddRaceSkill(thisRaceID,"Devotion Aura", "Gives you additional 15/25/35/45 health.",false,4); SKILL_ARMOR=War3_AddRaceSkill(thisRaceID,"Devotion Armor", "1-3 magical and physical armor.",false,4); SKILL_ADVANCED_ARMOR=War3_AddRaceSkill(thisRaceID,"Advanced Devotion Armor", "Triples your Devotion Armor. 6-9",false,4); ULT_TELEPORT=War3_AddRaceSkill(thisRaceID,"Teleport", "Teleport toward where you aim.\n600/800/1000/1200 range. Ultimate Immunity has 350 blocking radius.",true,4); W3SkillCooldownOnSpawn(thisRaceID,ULT_TELEPORT,10.0,_); War3_CreateRaceEnd(thisRaceID); War3_SetDependency(thisRaceID, SKILL_ADVANCED_ARMOR, SKILL_ARMOR, 4);
I'm adding a dependency skill.. but it tells me I need to level Invisibility to level 4 instead of saying I need to level Devotion Armor to level 4... I've been looking the code up and down and can't figure out anything wrong with it.. Can you check it out please? I've checked both MenuSpendSkills.sp and Dependency.sp .. and HumanAlliance.sp.. for the last 4 hours.. i can't figure anything is wrong, but it wants to tell me I need to level Invisibility instead of Devotion Armor! I've been looking at the code for the past 7 hours straight, and I can't figure out why dependencyID wants to stay 1 no matter what! I've changed the code multiple times just out of fustration. It says "4. Advanced Devotion Armor [Requires 4 lvl on Invisibility]" And it actually works that way.. but I want it to require #3 Devotion Armor and not Invisibility! 
|
|
|
|
« Last Edit: May 27, 2012, 05:03:17 AM by -El Diablo »
|
Logged
|
|
|
|
|
-El Diablo
|
 |
« Reply #11 on: May 27, 2012, 05:51:51 AM » |
|
Fixed the isssuse, check my branch out for the fix.
|
|
|
|
|
Logged
|
|
|
|
|