|
|
#1 |
|
STARCRAFT II OMFG
|
A template for making recipes.. its automated so you dont have to create a trigger for each recipe to add/remove the items, etc.
Works with advanced inventory systems (modify the abstract functions), it also supports charge based recipes. Read the "Info" trigger on how to implement and use. UPDATE 1.3: - Uses latest CSCache (thus requiring JASSHelper) - Should be a lot easier to implement now. - Removed common functions; they are named differently so that they don't cause conflicts. UPDATE: 1.1: - Fixes pool leak - Saves recipe data to gamecache for later use. UPDATE 1.2 - Fixed some display bug Last edited by shadow1500 : 01-30-2007 at 08:24 PM. |
|
|
|
| Sponsored Links - Login to hide this ad! |
|
|
|
|
#3 |
|
Oh for the sake of fudge
Respected User
|
Good stuff, but there is probably a bunch of optimizations.
__________________ JASS:// Read recipe data from ability. loop set cur = GetAbilityEffectById(abilId,EFFECT_TYPE_TARGET,x) exitwhen cur==last set last = cur if SubString(cur,0,1)=="r" then set hav_Item[x] = CreatePool() set req_Count[x] = S2I(SubString(cur,2,4)) set req_Item[x] = GetInteger(SubString(cur,5,StringLength(cur))) set reqsNum = reqsNum + 1 elseif SubString(cur,0,1)=="g" then set got_Item = GetInteger(SubString(cur,2,StringLength(cur))) endif set x = x + 1 endloop Might it not be better here to save the values? for future use of the item-type? I dunno, maybe I am way off base, but it would kill future needs to do that substringing. Anyway, good stuff here.*Thumbs up* |
|
|
|
|
|
#4 |
|
STARCRAFT II OMFG
|
Hm, yes, it will probably be faster. Now I noticed that I am also leaking pools
. Version 1.1 coming soon to fix problems...EDIT: Updated. Last edited by shadow1500 : 09-15-2006 at 07:48 PM. |
|
|
|
|
|
#5 |
|
STARCRAFT II OMFG
|
bump
|
|
|
|
|
|
#6 |
|
SpeakerGames.com
|
Zomg, how did i not see this before!
__________________"Click the link to dl" Testing now. EDIT: I like it loads, very easy to use, code is easy to CnP, and it seems good. Goodjob on it! Last edited by The)TideHunter( : 09-20-2006 at 07:53 PM. |
|
|
|
|
|
#7 | |
|
STARCRAFT II OMFG
|
Quote:
but the bump was for a mod review... Its easy to CnP yes.. the problem comes with creating the recipes, since you need to know rawcodes for each ingridient/result, and also must create 2 abilities and 1 item for each recipe. |
|
|
|
|
|
|
#8 |
|
User
|
Wasn't this the kind of recipe system that was going to go into ToB O? Very nice, by the way.
__________________ |
|
|
|
|
|
#9 |
|
Nonchalant
Respected User
|
There is no need to bump resource submissions. It's not like there are multiple pages and they might get lost. Order is of no significance either, so bumping can only serve to advertise.
__________________Checking it out now. Edit: There is no need to null handle-type variables which are passed as arguements to a function. Pretty basic thing, so approved otherwise. Last edited by blu_da_noob : 09-22-2006 at 04:59 PM. |
|
|
|
|
|
#10 | ||
|
STARCRAFT II OMFG
|
Quote:
Quote:
Anyway thanks for the approval. Last edited by shadow1500 : 09-22-2006 at 05:16 PM. |
||
|
|
|
|
|
#11 | |
|
Nonchalant
Respected User
|
Quote:
I almost always review older resources before newer ones, unless I have a reason not to. But that is beside the point, I was just mentioning that bumping in resource submissions is pointless and effectively spam. |
|
|
|
|
|
|
#12 |
|
Concepter & Writer
Join Date: Mar 2006
Posts: 473
![]()
|
I finally got around to test it for real shadow :D It's great! Though some flashy effects when the items are created would be nice ;) Is it possible to make effects on the items as well? I mean, when the two items are combined, could there be a small duration with a golden "flash" around the new created item?
__________________ |
|
|
|
|
|
#13 |
|
User
Join Date: Aug 2004
Posts: 59
|
I have an error when implimenting your system.
Expected a name (error) set i = I2Item(PoolGetItem(hav_Item[x],y)) Do you know what this means or how to get around it? |
|
|
|
|
|
#14 |
|
STARCRAFT II OMFG
|
You're probably missing the I2Item function, make sure you have it in your map.
|
|
|
|
|
|
#15 |
|
User
Join Date: Nov 2006
Posts: 5
|
im having trouble implimenting this system ... everytime i copy it into my WE and save my WE crashes but only if CSCache and recipe system are enabled ... and now i cant enable them .
please help |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
|
Donate |