[Log in / Register]
| News | Chat | Pastebin | Donations | Tutorials | Rules | Forums |
| Maps | Skins | Icons | Models | Spells | Tools | Jass | Packs | Hosted Projects | Starcraft II Modding | Starcraft II Resources | Galaxy Wiki |
(Keeps Hive Alive)
Go Back   The Hive Workshop > Warcraft III Modding > JASS Resources


JASS Resources Find JASS code snippets and functions here or write your own and post it on the Submissions sub-forum.

Reply
 
Thread Tools
Old 01-04-2012, 10:11 PM   #31 (permalink)
Registered User kStiyl
Newb
 
kStiyl's Avatar
 
Join Date: Oct 2011
Posts: 167
kStiyl has little to show at this moment (29)kStiyl has little to show at this moment (29)kStiyl has little to show at this moment (29)
Quote:
Originally Posted by Nestharus View Post
Well, it'll be awhile before I look over everything and apply whatever needs to be applied, k?
Is this still in a usable state? I'm thinking of switching from T32 to CTL =)
kStiyl is offline   Reply With Quote
Old 01-04-2012, 11:09 PM   #32 (permalink)
Registered User Nestharus
User
 
Nestharus's Avatar
 
Join Date: Jul 2007
Posts: 4,986
Nestharus has much of which to be proud (959)Nestharus has much of which to be proud (959)Nestharus has much of which to be proud (959)Nestharus has much of which to be proud (959)
This is still in a usable state yes, and the debated updated doesn't break backwards compatibility.
Nestharus is offline   Reply With Quote
Old 01-05-2012, 02:10 PM   #33 (permalink)
Registered User Luorax
Invasion in Duskwood
 
Luorax's Avatar
 
Join Date: Aug 2009
Posts: 1,116
Luorax is just really nice (375)Luorax is just really nice (375)Luorax is just really nice (375)Luorax is just really nice (375)
Well, I honestly don't get why this overwrites "create" and "destroy" methods, and not "allocate"/"deallocate". Like 15 of my systems are based on the public version of those methods, I think I don't have to tell how painful it would be to edit the whole map. Well, if you add a "CTLP" (Constant Timer Loop Public") or "CTLX" module that's based on allocate and deallocate, and not on create and destroy, I might change a few systems; even tho' the API looks horrible and the code is like a plate of spaghetti, the extra speed I can gain (if I can... I'm not sure) might be useful.
__________________
Luorax is offline   Reply With Quote
Old 01-06-2012, 03:18 AM   #34 (permalink)
Forum Moderator Bribe
Keep it simple
 
Bribe's Avatar
Spells, Help Zones & JASS Moderator
 
Join Date: Sep 2009
Posts: 5,581
Bribe has much of which to be proud (1210)Bribe has much of which to be proud (1210)
PayPal Donor: This user has donated to The Hive. 
Use of create and destroy can be changed by modifying your own map to include a modified version of your resources or a modified version of this resource to fix the problem.

The API looks ugly at first but you get used to it and it actually is more readable once you are used to it. Though the updates I proposed will make the resource more user-friendly by cutting the number of required implementations in half.
__________________
How to post your triggers on the Hive Workshop.
JPAG - Bettering the cause of readable source code.

Bribe is offline   Reply With Quote
Old 01-06-2012, 03:29 PM   #35 (permalink)
Registered User Luorax
Invasion in Duskwood
 
Luorax's Avatar
 
Join Date: Aug 2009
Posts: 1,116
Luorax is just really nice (375)Luorax is just really nice (375)Luorax is just really nice (375)Luorax is just really nice (375)
Well, I don't really like modifying other peoples' resources, but I think I'll do it again till Nes decides to make the change I suggested.
__________________
Luorax is offline   Reply With Quote
Old 01-06-2012, 03:53 PM   #36 (permalink)
Forum Moderator Magtheridon96
Go away.
 
Magtheridon96's Avatar
Resource Moderator
 
Join Date: Dec 2008
Posts: 5,755
Magtheridon96 has a brilliant future (1891)Magtheridon96 has a brilliant future (1891)Magtheridon96 has a brilliant future (1891)Magtheridon96 has a brilliant future (1891)
Merit Badge - Level 0: This user has proven to be extremely valuable to the Warcraft III Modding Community. 
Quote:
Well, I don't really like modifying other peoples' resources
It's perfectly fine for ANY resource ^.^
I modified Bribe's ArrowKeyEvent and optimized it for Single-player :D (For a map I'm working on)
__________________
Magtheridon96 is offline   Reply With Quote
Old 01-08-2012, 02:10 AM   #37 (permalink)
Forum Moderator Bribe
Keep it simple
 
Bribe's Avatar
Spells, Help Zones & JASS Moderator
 
Join Date: Sep 2009
Posts: 5,581
Bribe has much of which to be proud (1210)Bribe has much of which to be proud (1210)
PayPal Donor: This user has donated to The Hive. 
Exactly mag. If a resource does something you do not want, and you know how to modify it to fit your own map, feel free to do so.
__________________
How to post your triggers on the Hive Workshop.
JPAG - Bettering the cause of readable source code.

Bribe is offline   Reply With Quote
Old 01-08-2012, 04:08 PM   #38 (permalink)
Registered User kStiyl
Newb
 
kStiyl's Avatar
 
Join Date: Oct 2011
Posts: 167
kStiyl has little to show at this moment (29)kStiyl has little to show at this moment (29)kStiyl has little to show at this moment (29)
Should I not use 2d arrays with CTL?
or make another integer within the struct?

struct 'number' seems to be provided by CTL... so i might go over 8191 with some of my variables
kStiyl is offline   Reply With Quote
Old 01-08-2012, 04:41 PM   #39 (permalink)
Forum Moderator Magtheridon96
Go away.
 
Magtheridon96's Avatar
Resource Moderator
 
Join Date: Dec 2008
Posts: 5,755
Magtheridon96 has a brilliant future (1891)Magtheridon96 has a brilliant future (1891)Magtheridon96 has a brilliant future (1891)Magtheridon96 has a brilliant future (1891)
Merit Badge - Level 0: This user has proven to be extremely valuable to the Warcraft III Modding Community. 
You can use 2D fake arrays:

twoDarray[index1 * sizeSlot2 + index2]

You'd have max indices of [8191/(sizeSlot2 + 1)] and [sizeSlot2 - 1]
__________________
Magtheridon96 is offline   Reply With Quote
Old 01-08-2012, 04:59 PM   #40 (permalink)
Registered User kStiyl
Newb
 
kStiyl's Avatar
 
Join Date: Oct 2011
Posts: 167
kStiyl has little to show at this moment (29)kStiyl has little to show at this moment (29)kStiyl has little to show at this moment (29)
Quote:
Originally Posted by Magtheridon96 View Post
You can use 2D fake arrays:

twoDarray[index1 * sizeSlot2 + index2]

You'd have max indices of [8191/(sizeSlot2 + 1)] and [sizeSlot2 - 1]
I don't understand you. If I do something like this

unit[this * 100 + index]

I wouldn't be able to use it once I have like 80 instances of CTL running

I usually use 2d arrays with using struct as first index but in this case
I was wondering if I should make an extra integer variable and use it as index, and if it's worth doing so because I would have to recycle those indexes and that would make an array inside an array

(or use CT32 i guess)
kStiyl is offline   Reply With Quote
Old 01-08-2012, 06:22 PM   #41 (permalink)
Forum Moderator Magtheridon96
Go away.
 
Magtheridon96's Avatar
Resource Moderator
 
Join Date: Dec 2008
Posts: 5,755
Magtheridon96 has a brilliant future (1891)Magtheridon96 has a brilliant future (1891)Magtheridon96 has a brilliant future (1891)Magtheridon96 has a brilliant future (1891)
Merit Badge - Level 0: This user has proven to be extremely valuable to the Warcraft III Modding Community. 
Quote:
I don't understand you. If I do something like this

unit[this * 100 + index]

I wouldn't be able to use it once I have like 80 instances of CTL running
Yes, that's true. (Unfortunately :/)
You could use a Table for the fake 2D array instead.

A Table would be fine unless you need to lookup a lot of data from it inside some loop that runs ~23000 times :P
__________________
Magtheridon96 is offline   Reply With Quote
Old 01-08-2012, 06:41 PM   #42 (permalink)
Registered User kStiyl
Newb
 
kStiyl's Avatar
 
Join Date: Oct 2011
Posts: 167
kStiyl has little to show at this moment (29)kStiyl has little to show at this moment (29)kStiyl has little to show at this moment (29)
Quote:
Originally Posted by Magtheridon96 View Post
Yes, that's true. (Unfortunately :/)
You could use a Table for the fake 2D array instead.

A Table would be fine unless you need to lookup a lot of data from it inside some loop that runs ~23000 times :P
I would probably use T32 if i have to use Table.. i thought hashtable was very slow
kStiyl is offline   Reply With Quote
Old 01-08-2012, 06:44 PM   #43 (permalink)
Registered User Luorax
Invasion in Duskwood
 
Luorax's Avatar
 
Join Date: Aug 2009
Posts: 1,116
Luorax is just really nice (375)Luorax is just really nice (375)Luorax is just really nice (375)Luorax is just really nice (375)
You should use dynamic arrays.
__________________
Luorax is offline   Reply With Quote
Old 01-08-2012, 08:09 PM   #44 (permalink)
Forum Moderator Magtheridon96
Go away.
 
Magtheridon96's Avatar
Resource Moderator
 
Join Date: Dec 2008
Posts: 5,755
Magtheridon96 has a brilliant future (1891)Magtheridon96 has a brilliant future (1891)Magtheridon96 has a brilliant future (1891)Magtheridon96 has a brilliant future (1891)
Merit Badge - Level 0: This user has proven to be extremely valuable to the Warcraft III Modding Community. 
You can go with my idea:
unit[index1 * 100 + index2]

Besides, when are you going to have more than 80 instances running with CTL?
(Unless it's a UnitIndexStruct)

If it is a UnitIndexStruct, a Table would be fine. (They aren't that slow)
__________________
Magtheridon96 is offline   Reply With Quote
Old 01-08-2012, 08:18 PM   #45 (permalink)
Registered User Dirac
Beware the Ides of March
 
Dirac's Avatar
 
Join Date: Jun 2011
Posts: 248
Dirac is on a distinguished road (84)Dirac is on a distinguished road (84)
With LinkedListModule the array dynamism is perfect (variable array sizes, just insert nodes into a list)
__________________
Check out my TD

Originally Posted by GetTriggerUnit-
"There should be a section in World Editor designated to Nestharus."
Dirac is offline   Reply With Quote
Reply

Bookmarks

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 12:30 PM.





Powered by vBulletin
Copyright 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.5.1 PL2
Copyright © Ralle