| 04-19-2004, 02:03 AM | #1 |
Drag and Drop Spellbook version: A new version of the Drag and Drop project featuring now a drag and Drop Spellbook is finally out! Please give me comments on what you think about it. Its fairly easy to use. But I wouldn't call it a final release Unfortuantly I'm coming toa problem, you can use it to avoid cooldowns, I don't know how to detect if a cooldown spell is currently about to be removed. http://weaaddar.wc3campaigns.com/bag2.w3x Optimizations to Drag and Drop Backpack: Uses independant state variable of its own, so it doesn't rely on state (makes porting DT4a features easier) CLeaned up some poor code Fixed a bug which caused a function to crash a thread. (generally wouldn't mean a thing as this could only be called with a backpack before, now theres a chance it can't so this fixs it) |
| 04-20-2004, 11:51 PM | #2 |
Not bad weaaddar... I give ya props on 1337ness, but other than that, nothing special. I really like DT4a, that was really good. This is really good as well. If you don't mind, I'd like to give a review on this real quick... Please don't mind if I become ignorant :x Positive Review: Saves lots of work for people who want a system like this. The ability to easily add spells and store spells for later use is a real nice plus. I was intending to add this to my own RPG for mage-type classes. Other than that, this can be real useful to me if I knew how to edit your 1337 coding. Good work. Negative Review: Well, like I said in the positive, I would use it if I knew how to edit it ^^. The triggers are way to complex for me to understand, and it's not that I'm an idiot. And I think that applies for the even greater majority of the community. The only things I do not like about the system is that... You equip/add/use abilities by ... "dragging" and then dropping the spell/item you want into the... err ... cancel? button? I found that odd. Logically, it makes no sense, and I doubt many people actually read item descriptions. (I do, but trust me, many don't) |
| 04-21-2004, 01:08 AM | #3 |
Like most Object oriented programming this falls under the school of encapsulation. Whereby you really don't need to know how it works to use it. I agree, thats a major bummer for most programmers at first, but trust me when you start borrowing APIs you really stop caring why Direct 3d for instance allows me to draw polygons using the hardware accross a wide spectrum of video cards, you'll just be glad it exists. While this is a very limited application, and if you were so bold, you could try to decipher it, and you wouldn't have much difficulty. I find that this is by far much more easy to read then DT4a could have ever been. There are so many explicitly named functions, and less and less direct structure access like you'll see so frequently used in DT4a. And even when there is direct access the variables of the structures are named correctly, unlike DT4a where I just used horribly named LastIndex like a fiend and used return bug to save variables. I consider private triggers (event handling) a messy buisness, those really don't do the work. Almost all the work is done by other functions found in the 3 class. ORder is gigantic, but if you notice its not doing much other then calling other function I wrote. The private triggers really don't need to be understood to modify the action. Almost everything that needs to be modified will be done in one of the three "classes" triggers. The code is mostly only appearing complex because of its shear bulk. Almost all of it is very basic in design. However, as I said earlier, Its encapsulated for your sake. Knowing how the functionality work is just extra burden, and would cause you more grief then its worth to explain it. Anyway this one is lacking a tutorial or example of simple evocation so I'll add a quick one: First you must create a herostr object. There are two ways to do this. One you can let the automated herostr creator due it for you. (Give a unit a backpack 0.00 seconds into the game). Or two, use the CreateHerostr function and pass it a unit. Once thats done create a local string variable (i'll refer to it as s from here on) and store GetHerostr(the unit that this herostr encapsulates) in s. Now you'd call SetBook(s,CreateSpellBook()). THis creates a spellbook for the hero. Now that your herostr has a spellbook it will automatically add the spellbook ability to the hero. The spellbook ofcourse is useless if you add no spells to it. The next step is adding spells. Now you'd go: call AddSpell(GetBook(s), items id, abilities id) for each spell you want to add. Oddly enough, you can transfer spellbook between heroes. Heres an example usage. set s=GetBook(GetHeroStr(udg_MyPal)) call SetBook(GetHeroStr(udg_MyPal),"") call SetBook(GetHeroStr(udg_MyMage),s) But I doubt that will have much use. Now, I imagine most of this code could have been discovered, but here an example usage I have from the demo map found in the horribly named Untitled Trigger 001: Code:
Custom script: local string s
Custom script: set s=CreateHerostr(GetEnumUnit())
Custom script: call SetStatperLevel(s,6)
Custom script: call SetBook(s,CreateSpellBook())
Custom script: call AddSpell(GetBook(s),'ratc','AHav')
Custom script: call AddSpell(GetBook(s),'rat6','AHbn')
Custom script: call AddSpell(GetBook(s),'rat9','AHds')
Custom script: call AddSpell(GetBook(s),'rde1','AHbz')
Custom script: call AddSpell(GetBook(s),'hval','AHfs' )As far as why drag to cancel was used, originally I intended for spells to be able to straight cast from the item layout. Unfortuantly, I found out that spells don't share the cooldown of there ability form if they are located on items. So I hastly removed the ability to cast them, and now all you can do is drag them. I agree dragging to cancel does seem kind of stupid. (it made sense when there was no other way to add em) Again like all things under the drag and drop project it is beta. When the drag and drop project dies, you'll see the commented DT5 API. DT5 plans to incorporate both drag and drop project stuff and DT4a junk. I noticed a clinical mistake I made. Queue is fixed at four elements. I plan to fix that so you can determine how many spells. I'll also move the adding to clicking the ability itself. |
| 04-21-2004, 01:32 AM | #4 |
Its a great system. You dont have to know exactly what is going on under the hood, only figure out how to interface with it. If you want to change its internal workings you should/would have knowledge enough to do so. If you cant even figure out how to do it from an open source map, you cant be as smart as you think you are. |
| 04-24-2004, 01:03 AM | #5 |
New version of drag and Drop++: Updates include: Minor Code fixs: Removal of i2u,i2it function. All Getfunctions changed apropriately. Queue is no longer fixed to 4 elements Graphical/Minors update: Next Page now displays the current page number. SpellBook is fixed in a spot Spellbook and attributer can now coexist Spellbook adds spells changed from drag to cancel to clicking item http://weaaddar.wc3campaigns.com/bag2.w3x |
| 04-25-2004, 01:11 AM | #6 |
IT feels like double posting but it isn't! To go with the spellbook, I designed a new object. A scroll. Scrolls, are items when used, will teach a hero the spell they specify, if a hero has a spellbook. You can check out the latest version and play around with the whopping one scroll I made so far, there are many bug fixes in this version. Stability should be through the roof. http://weaaddar.wc3campaigns.com/bag2.w3x |
| 04-29-2004, 06:45 PM | #7 |
Tripple post or update, up to you really: D+D++ now has requirements for scrolls. Simmilar to the requirement line from DT4a, except instead of a unit type requirement, it now takes a classification. A classification is some integer value that you assign to a Hero, a hero can have as many classifications as you want. Scrolls also now have have a special effect and an effect duration field. Basically this is shown when your hero uses a scroll. Please try out the new version and tell me what you think or fi you find any bugs: http://weaaddar.wc3campaigns.com/bag2.w3x 1.15 req should be gone. |
| 04-30-2004, 01:40 AM | #8 |
4th post in a row, hey maybe one of you guys can show interest in it so I don't seem like a spammer: D+D++ now handles Cooldowns and Spells duration so you can't remove the spell that still cooling down. Any suggestion or bugs please report: http://weaaddar.wc3campaigns.com/bag2.w3x |
| 04-30-2004, 01:49 AM | #9 |
Thats cool, I used the system in one of aiurs beta maps. |
| 04-30-2004, 03:31 AM | #10 |
But you are spamming... And there is nothing to be interested in. |
| 04-30-2004, 05:27 PM | #11 |
Change it so that the cooldown of the spell does not prevent you from using the entire book. |
| 05-01-2004, 11:59 AM | #12 |
hmm sm1 said this might beable to help me and it kinda fits in im tryin to make it so wherever u click your unit attacks even on ground and when u drag the mouse while still holding the mouse down the unit attacks with wherever u r dragging the mouse if any1 can answer this itd be a great help and ud get credit in my new map(just tell me your wc3 name) :D |
| 05-01-2004, 01:49 PM | #13 |
Just use attackground, I have no idea how you expect items order of being dragged and dropped to have any palpable help to your scheme. |
| 05-27-2004, 03:44 PM | #14 |
Porb with this local gamecache bst=bs() what is the (Bst) and the (bs) item? unit? ability? variable? its the first error when you transfer all your trigger, etc in a map. FAST REPLY PLEASE! |
| 05-27-2004, 06:10 PM | #15 | |
Quote:
|
