wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Resources > Code Resources > Samples
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 01-28-2009, 11:14 PM   #1
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,085

Submissions (19)

Anitarf has a brilliant future (888)Anitarf has a brilliant future (888)Anitarf has a brilliant future (888)Anitarf has a brilliant future (888)Anitarf has a brilliant future (888)Anitarf has a brilliant future (888)Anitarf has a brilliant future (888)Anitarf has a brilliant future (888)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default Limited Summon

Click image for larger version

Name:	S_LimitedSummon.jpg
Views:	730
Size:	12.2 KB
ID:	40071
Allows you to limit the number of summoned units of a type that a single caster can summon. A very simple spell that is more of a template upon which more complex summon spells can be built.

Requires LinkedList and Table.
Expand Spell Code:
Attached Files
File Type: w3x LimitedSummon.w3x (36.9 KB, 103 views)
__________________

Last edited by Anitarf : 08-04-2009 at 11:08 PM.
Anitarf is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 01-28-2009, 11:54 PM   #2
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,727

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

I don't actually like the implementation at all, really. In order to implement, you copy and paste this as many times as you have summoning skills you need to limit. That isn't even considering that there may be more code associated with the nature of the summon to begin with.

I think being able to register a spell raw id to the system that is then monitored would be substantially more useful and more modular. call RegisterSummonedUnitLimit(SUMMON_ID, SUMMON_SPELL_ID, KillEffect, KillEffectPath, SummonLimit). The only disadvantage to this that I can see is the inability to have the SummonLimit depend upon skill level. I think function interfaces might be able to solve that issue, though, if I got anything out of Vex's tutorial. :)

If you keep it like this, though, I think the only section of the resource database it would make sense is "Samples."
__________________

Last edited by Rising_Dusk : 01-28-2009 at 11:56 PM.
Rising_Dusk is offline   Reply With Quote
Old 01-29-2009, 12:26 AM   #3
akolyt0r
In Flames
 
akolyt0r's Avatar
 
Join Date: Jan 2006
Posts: 1,153

Submissions (3)

akolyt0r has a spectacular aura about (120)

Default

Quote:
Originally Posted by Rising_Dusk
I don't actually like the implementation at all, really. In order to implement, you copy and paste this as many times as you have summoning skills you need to limit. That isn't even considering that there may be more code associated with the nature of the summon to begin with.

...

If you keep it like this, though, I think the only section of the resource database it would make sense is "Samples."
Well i think that was anitarfs intention ...
Quote:
A very simple spell that is more of a template
__________________
akolyt0r is offline   Reply With Quote
Old 01-29-2009, 01:54 PM   #4
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,727

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Doesn't mean I have to like it or find it useful in this form. :p
__________________
Rising_Dusk is offline   Reply With Quote
Old 01-29-2009, 03:13 PM   #5
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

Quote:
I don't actually like the implementation at all, really. In order to implement, you copy and paste this as many times as you have summoning skills you need to limit. That isn't even considering that there may be more code associated with the nature of the summon to begin with.
And that's fine, isn't it?

Sure it could get into an actual system or stuff. But does it really have to?

Those structs must be private though.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 01-29-2009, 03:52 PM   #6
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,085

Submissions (19)

Anitarf has a brilliant future (888)Anitarf has a brilliant future (888)Anitarf has a brilliant future (888)Anitarf has a brilliant future (888)Anitarf has a brilliant future (888)Anitarf has a brilliant future (888)Anitarf has a brilliant future (888)Anitarf has a brilliant future (888)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

Quote:
Originally Posted by Rising_Dusk
I don't actually like the implementation at all, really. In order to implement, you copy and paste this as many times as you have summoning skills you need to limit. That isn't even considering that there may be more code associated with the nature of the summon to begin with.
That's kind of the point, a summon spell could have other effects that could make use of these data structures so it's better that they're available to the spell coder than if they're locked up in a system, it also makes the whole thing more flexible since it can be edited more on an individual basis (like a single limit on multiple unit types etc.; such features would otherwise considerably bloat a general system). Furthermore, a map is likely to have few summon spells that need this sort of limitations, so there shouldn't be too much duplication of code.
Quote:
If you keep it like this, though, I think the only section of the resource database it would make sense is "Samples."
As it was intended.

Quote:
Originally Posted by Vexorian
Those structs must be private though.
Yikes, indeed. Fixed.
__________________
Anitarf is offline   Reply With Quote
Old 01-29-2009, 07:49 PM   #7
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,727

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Quote:
Originally Posted by Vexorian
Sure it could get into an actual system or stuff. But does it really have to?
Notice I didn't say anything about it having to be changed, I just think it's silly like it is.

Anyways, Vex didn't say anything else exciting, and it looks okay to me, so I am going to approve it as a sample.
__________________
Rising_Dusk is offline   Reply With Quote
Old 01-30-2009, 02:39 AM   #8
ToukoAozaki
extends net.wc3c.Jasser
 
Join Date: Jun 2008
Posts: 336

Submissions (5)

ToukoAozaki will become famous soon enough (60)ToukoAozaki will become famous soon enough (60)ToukoAozaki will become famous soon enough (60)

Send a message via MSN to ToukoAozaki
Default

BTW if I implement such system, would it be approved? I just thought I could write a library in a way that would satisfy Dusk.

Last edited by ToukoAozaki : 01-30-2009 at 02:40 AM.
ToukoAozaki is offline   Reply With Quote
Old 01-30-2009, 04:36 AM   #9
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,727

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

I don't know, you'd basically just be copying his code with some wrapper overhead. It'd be kind of silly. Besides, I do see the use of having level-dependent summon counts. That's something you couldn't easily implement as a system. (Without some dumb struct based adjusting stuff)
__________________
Rising_Dusk is offline   Reply With Quote
Old 01-30-2009, 11:23 AM   #10
Matarael
User
 
Matarael's Avatar
 
Join Date: Oct 2006
Posts: 260

Submissions (2)

Matarael will become famous soon enough (49)Matarael will become famous soon enough (49)

Default

I haven't actually seen the uh... codes, but if this is what I think it is, I was really looking for a similar system (the one I finally made myself was a bit complicated and in GUI but it allowed for a level up in which more of the type of unit can be summoned at higher levels).

Would be great if someone made a simpler and better system for it.
Matarael is offline   Reply With Quote
Old 01-30-2009, 12:51 PM   #11
fX_
User
 
fX_'s Avatar
 
Join Date: Jan 2007
Posts: 528

Submissions (2)

fX_ will become famous soon enough (38)fX_ will become famous soon enough (38)

Default

The discourses in submission threads are particularly amusing. The people work/talk on the script together.
fX_ is offline   Reply With Quote
Old 01-31-2009, 12:08 PM   #12
ToukoAozaki
extends net.wc3c.Jasser
 
Join Date: Jun 2008
Posts: 336

Submissions (5)

ToukoAozaki will become famous soon enough (60)ToukoAozaki will become famous soon enough (60)ToukoAozaki will become famous soon enough (60)

Send a message via MSN to ToukoAozaki
Default

Quote:
Originally Posted by Rising_Dusk
I don't know, you'd basically just be copying his code with some wrapper overhead. It'd be kind of silly.

That might be true, as it would have some overhead for array lookup instead of constants. But I think this can be done with arrays and groups with functions, instead of structs; for this reason, I have little idea about performance difference.

Quote:
Besides, I do see the use of having level-dependent summon counts. That's something you couldn't easily implement as a system. (Without some dumb struct based adjusting stuff)
That only requires a single function interface for callback. :)


Still, I myself doubt writing a new one for this purpose would worth the efforts.
ToukoAozaki is offline   Reply With Quote
Old 08-04-2009, 11:09 PM   #13
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,085

Submissions (19)

Anitarf has a brilliant future (888)Anitarf has a brilliant future (888)Anitarf has a brilliant future (888)Anitarf has a brilliant future (888)Anitarf has a brilliant future (888)Anitarf has a brilliant future (888)Anitarf has a brilliant future (888)Anitarf has a brilliant future (888)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

The map has been updated to work with Warcraft patch 1.24 (a simple matter of updating Table to 3.0, the spell code wasn't changed).
__________________
Anitarf is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 08:25 AM.


Donate

Affiliates
The Hubb http://bylur.com - Warcraft, StarCraft, Diablo and DotA Blog & Forums The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2014, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services