| 09-04-2008, 09:32 AM | #1 | |
I've been working on a heavy modification to Vuen's Dungeon and Dragon's which was released in 2005. I have the .sql, and have been working on this map for a month, making substantial headway. Unfortunately I've been working alone, and it's been a long road. I know if I want this project to be finalized and released, I'll need those more skilled than I am. If I can get that, the release should be quick and easy. I come to WC3Campaigns knowing that the top skill lurks here, hoping to grab a bit of aid to add to the map credits. Quote:
Taken from my map submission at The Hive Workshop. As well, a piece of the 'skilladd code is provided in Jass tags. I'll explain why. I'm seeking well versed Jass coders and Trigger designers. The current Jass script for the 'skilladd function is ~8000 lines long, WAY too much. It causes medium lag, high load time, and has flaws such as over leveling causes the skill to stop working until you delevel it. What isn't shown is how I hide it from the game chat, the entirity of the code, and several other pieces. It's just a general idea. I'll provide the real code in entirity if I believe the person requesting it can help me, though the entire code shouldn't be necessary. So, the code is similar to SotDRP, but it's nowhere near as efficient. I really need someone to give me a better template for skill add. Any and all repetitive work I'll gladly do myself, while giving anyone willing to help me full credit. Along with credit, I'll also give you an unprotected version of the map should you wish to help me in any other way. I also could use spell makers, modelers, and texturers in that order. On top of that, I need BetA testers and trustworthy people willing to help me with the work that needs done. I'm quiet easy to work with, and will carry most all the work load. I'm capable of reducing file and model sizes, and many other various things. The map is looking to be very promising, and I have an excited community waiting to recieve it. I could see this edition stimulating the life of Vuen's D&D, and perhaps even allowing it to compete with SotDRP. So, contact me about helping, and we'll go from there. Below is the run down of the Jass script in simplified form. This is the best way to see how the 'skilladd function I have implemented works. JASS://This is where it actually adds the skill, levels it, etc. function AddDefend takes nothing returns nothing if IsUnitSelected(GetEnumUnit(), udg_TEMP_Player) then call UnitAddAbilityBJ( 'Adef', GetEnumUnit() ) endif endfunction function RemoveDefend takes nothing returns nothing if IsUnitSelected(GetEnumUnit(), udg_TEMP_Player) then call UnitRemoveAbilityBJ( 'Adef', GetEnumUnit() ) endif endfunction function LevelDefend takes nothing returns nothing if IsUnitSelected(GetEnumUnit(), udg_TEMP_Player) then call IncUnitAbilityLevelSwapped( 'Adef', GetEnumUnit() ) endif endfunction function DelevelDefend takes nothing returns nothing if IsUnitSelected(GetEnumUnit(), udg_TEMP_Player) then call DecUnitAbilityLevelSwapped( 'Adef', GetEnumUnit() ) endif endfunction //This recognizes the string you entered and decides what desired result you want done. function DoSkillAddHU takes integer id returns boolean local group grp local player pl local force fp local string str local string text local integer utype local integer i1 local integer i2 local integer array ratios set pl = ConvertedPlayer(id) if not(IsPlayerInForce(pl, udg_Force[2])) then //********************RETURN return false //not a command endif set fp = bj_FORCE_PLAYER[id-1] set str = StringCase(GetEventPlayerChatString(), false) if (str == "adddefend" or str == "'defend") then set udg_TEMP_Player = pl set grp = GetUnitsInRectAll(GetPlayableMapRect()) call ForGroupBJ( grp, function AddDefend ) call DestroyGroup(grp) call DebugCommand(str,id) elseif (str == "@defend" or str == "removedefend") then set udg_TEMP_Player = pl set grp = GetUnitsInRectAll(GetPlayableMapRect()) call ForGroupBJ( grp, function RemoveDefend ) call DestroyGroup(grp) call DebugCommand(str,id) elseif (str == "+defend" or str == "lvldefend") then set udg_TEMP_Player = pl set grp = GetUnitsInRectAll(GetPlayableMapRect()) call ForGroupBJ( grp, function LevelDefend ) call DestroyGroup(grp) call DebugCommand(str,id) elseif (str == "=defend" or str == "deleveldefend") then set udg_TEMP_Player = pl set grp = GetUnitsInRectAll(GetPlayableMapRect()) call ForGroupBJ( grp, function DelevelDefend ) call DestroyGroup(grp) call DebugCommand(str,id) endif //********************RETURN return true //is a command endfunction //Far above this is the actual chat functions which you cant see in this Jass Ask me if you need it and I'll add it. //Hides the string from DM chat elseif GetBooleanAnd(SubStringBJ(str,1,1) == "'" or SubStringBJ(str,1,1) == "+"or SubStringBJ(str,1,1) == "@"or SubStringBJ(str,1,1) == "=", IsPlayerInForce(pl, udg_Force[2])) then //Get rid of that pesky space people like to add if (SubStringBJ(str,2,2) == " ") then set text = SubStringBJ(str,3,StringLength(str)) else set text = SubStringBJ(str,2,StringLength(str)) endif if DoSkillAddHU(id) then endif I also need help with implementing a play animation function, and I created a play SFX function similar to this (Plays things like Explosion, Abolish Magic, Defend, etc.) but haven't been able to get it to work. This is what I'm looking at modding, and once complete the work will carry over to larger, more diversified maps. Be a part of this great project, and have your name recognized by Battle.net players and respected in the RP community! I'll likely change the name from VD&D TE to VD&D Grand Project. |
| 09-08-2008, 09:26 PM | #2 |
Erm, quite a while ago I did make a wave trigger, it was like the common spawn except after every X seconds it would create Y units to a building's rally point. Might be useful is DMs wanted some sort of wave attack, or AoS kind of quest. Although this is in GUI, it could easily be converted to JASS and then revamped. Sadly, I can't really help you anywhere else, besides testing (maybe a few triggers look over). Hoping for this project to succeed! |
| 09-09-2008, 03:34 AM | #3 |
Your add/remove/inc/dec system is horrible. I took the liberty of scripting you a cleaner and faster one. Uses Vexorian's Table library and of course vJass. JASS:scope skillManipulator initializer init globals StringTable cache endglobals private function SkillManipulate takes nothing returns nothing local string s = SubString(GetEventPlayerChatString(),8,10) local string skill = SubString(GetEventPlayerChatString(), 12, StringLength(GetEventPlayerChatString())) local player p = GetTriggerPlayer() if s == "add" then //Add a skill if cache[skill] != 0 then call UnitAddAbility(YourUnit,cache[skill]) endif elseif s == "rmv" then //Remove a skill if cache[skill] != 0 then call UnitRemoveAbility(YourUnit,cache[skill]) endif elseif s == "inc" then //Increase skill level if cache[skill] != 0 then call IncUnitAbilityLevel(YourUnit,cache[skill]) endif elseif s == "dec" then //Decrease skill level if cache[skill] != 0 then call DecUnitAbilityLevel(YourUnit,cache[skill]) endif endif endfunction private function initcache takes nothing returns nothing set cache = StringTable.create() //DECLARE ABILITIES AND THEIR CORRESPONDING CODE set cache["defend"] = 'Adef' // Adds/removes/whatever the defend ability when the player types "'skill add defend" set cache["mycustomskill"] = 'A000' //Adds/removes/whatever your ability when the player types "'skill add mycustomskill" endfunction private function init takes nothing returns nothing local trigger t = CreateTrigger() local integer i = 0 call initcache.execute() loop exitwhen i == 12 call TriggerRegisterPlayerChatEvent(t,Player(i),"'skill ",false) set i = i+1 endloop call TriggerAddAction(t,function SkillManipulate) endfunction endscope That's 52 lines of code, 1 line for each ability you declare(I will explain this later). That's quite an improvement from 8000+ lines isn't it. What it does is store integers(ability rawcodes) and label them with a corresponding name. Then a trigger detects if a player types " 'skill <operation> <ability label>" Where operation is "add" (add ability) / "rmv"(remove ability) / "inc" (increase level) / "dec" (decrease level) and ability label is the label of a stored ability rawcode. Oh don't forget, YourUnit is only an example, change it to whatever unit you want to manipulate. Tell me if something's wrong with the system. |
| 09-25-2008, 03:14 PM | #4 | |||
Woah, sorry about the long delay in a response. I'm far more active on Hiveworkshop.com. Because of the long delay I'll send a private message to you two. Alright, lets see. Quote:
Unfortunately, because I'm not too great at JASS, I'm having trouble grasping how to put it in my map. I'm more than willing to input all the repetitous raw code and manipulate it how I need to, but I can't do that until I, or someone else, figures out how it goes into the map. I'll provide the code for anyone to sample here, and even provide an open link to my map if someone wants to attempt it. Of course credit will be given generously and rep added. I won't be able to get to the 'skilladd coding until the final parts of my map if I'm doing it myself, which is unfortunate because it's the part of the map I was the most excited about. Quote:
--- Here's the code provided by Purple Poot: Quote:
The thread can be found here: http://www.hiveworkshop.com/forums/n...treply&t=97310 Unfortunately, the Manage Attachments wont allow me to upload the map for no apparent reason. So, I'll link you to the alternate on Hiveworkshop.com. http://www.hiveworkshop.com/forums/r...Dlist%26r%3D20 Just to warn you, if you edit the map and save without the .sql it will make the cliffs permanently passable. However, you can edit the code and send me the map and I can just copy + paste, or you can send me a .txt of the triggers, or I can send you the .sql. The .sql is more complicated, but it's up to you. |
| 09-26-2008, 10:50 AM | #6 |
PurplePoot's system only adds skills. Mine adds, removes, increments and decrements. :p |
| 09-27-2008, 04:06 PM | #7 |
Well, I am having a lot of trouble implementing purple poots system, and it does seem to overlook several keyfactors the map runs on. So, while implementing his system I'll also try implementing yours and see which runs better. I do like your system though, seems easier for me to use. I'll start implenting it now. I assume it requires it's own trigger? I do have one request on it though, if I may. Could you condense it or add it so that instead of a seperate inc/dec/add/remove it would be simply addinc/decrem. Like if the player types 'SUPERDEATHBOLT and they already have that skill, it simply levels up? I figure this would be far easier to thread rawcodes in to, and be more effiecent all around. I just wasn't sure how to do it at the time I made that code. However, I also see that you've fully looked at my code and have done your best to imitate it's function while improving on it, which is awesome and appreciated! :) and Anopob, thanks :3 I'll set it up whenever I can, and get it to work. The way it looks, an activate/deactivate switch shouldn't be hard. It looks very useful. Is Vexorian's Table library xe.04? I'm not sure where to find it. The first VD&D was made in pure World Editor. I think this is the first time JassNewGen has been used on it. The old system use to use: JASS:
set grp = GetUnitsInRectAll(GetPlayableMapRect())
call ForGroupBJ( grp, function DelevelDefend )
call DestroyGroup(grp)
call DebugCommand(str,id)
To choose the units to be modified, by modifying all units currently selected by the player. It's also how the system adds and removes things like HP/DAMAGE/Etc. It seems like it'd be easier for this system to also use some like that or that mimics it. I'm use to manipulating that coding, but not puting it in from the ground up, so bare with me. |
