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 > Warcraft III Modding > Developer's Corner > Triggers & Scripts
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 02-20-2010, 07:49 PM   #1
Anachron
User
 
Anachron's Avatar
 
Join Date: Mar 2009
Posts: 1,079

Anachron will become famous soon enough (51)Anachron will become famous soon enough (51)

Default Need help with External Scripts.

Hello folks!

I've released my inventory system here.
How it looks



People really like it, but what I don't like, I don't know how to generate scripts that automatically generate destructables.

Can anyone create the script for the destructables I've created in that map?
You will surely get credit in the map and I would be really happy.

Thanks in advance,
Anachron
__________________
CustomInventory [Discussion - Download] - Got Directors Cut!
CustomMissle [Discussion - [Download (not yet)] - In development!
Other systems [Spawn System] [Move System] [CustomBar] [SpellBar]

Last edited by Anachron : 02-20-2010 at 07:50 PM.
Anachron is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 02-20-2010, 11:21 PM   #2
Ammorth
I blink, therefore I am.
 
Ammorth's Avatar
 
Join Date: Sep 2006
Posts: 1,812

Submissions (10)

Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)

Default

Collapse JASS:
scope CIGenDestructibles
// set this to true to generate the object data
// setting this to false will not generate data and therefore will speed up save times
// you can change anything between CI_GEN_START and CI_GEN_END.
// only call the CI_GEN textmacros between CI_GEN_START and CI_GEN_END
// CI_GEN_SLOT can be used by the user to generate custom destructibles for their items
//! runtextmacro CI_GEN_START("true")

//! runtextmacro CI_GEN_SLOT("it02", "(Clarity Potion)", "ReplaceableTextures\\CommandButtons\\BTNPotionOfClarity.blp")
//! runtextmacro CI_GEN_SLOT("coat", "(Claws of Attack)", "ReplaceableTextures\\CommandButtons\\BTNClawsOfAttack.blp")
//! runtextmacro CI_GEN_SLOT("it01", "(Healing Potion)", "ReplaceableTextures\\CommandButtons\\BTNPotionGreenSmall.blp")
//! runtextmacro CI_GEN_SLOT("it04", "(Hood of Cunning)", "ReplaceableTextures\\CommandButtons\\BTNHoodOfCunning.blp")
//! runtextmacro CI_GEN_SLOT("it03", "(Shaman Claw)", "ReplaceableTextures\\CommandButtons\\BTNShamanMaster.blp")

//! runtextmacro CI_GEN_BORDER("cwbt", "#CW (Bottom)", "CustomWindow\\borderD.mdl")
//! runtextmacro CI_GEN_BORDER("cwld", "#CW (Corner Left Down)", "CustomWindow\\cornerDL.mdl")
//! runtextmacro CI_GEN_BORDER("cwlu", "#CW (Corner Left Up)", "CustomWindow\\cornerUL.mdl")
//! runtextmacro CI_GEN_BORDER("cwrd", "#CW (Corner Right Down)", "CustomWindow\\cornerDR.mdl")
//! runtextmacro CI_GEN_BORDER("cwru", "#CW (Corner Right Up)", "CustomWindow\\cornerUR.mdl")
//! runtextmacro CI_GEN_BORDER("cwlf", "#CW (Left)", "CustomWindow\\borderL.mdl")
//! runtextmacro CI_GEN_BORDER("cwrg", "#CW (Right)", "CustomWindow\\borderR.mdl")
//! runtextmacro CI_GEN_BORDER("cwup", "#CW (Top)", "CustomWindow\\borderU.mdl")

//! runtextmacro CI_GEN_SLOT("cwcc", "#CW (Cancel)", "ReplaceableTextures\\CommandButtons\\BTNCancel.blp")
//! runtextmacro CI_GEN_SLOT("cwds", "#CW (Dissselect)", "UI\\Widgets\\Console\\Human\\CommandButton\\human-multipleselection-heroglow.blp")
//! runtextmacro CI_GEN_SLOT("cwdp", "#CW (Drop Item)", "ReplaceableTextures\\CommandButtons\\BTNPickUpItem.blp")
//! runtextmacro CI_GEN_SLOT("cwit", "#CW (Item Slot)", "ReplaceableTextures\\CommandButtonsDisabled\\DISBTNPickUpItem.blp")
//! runtextmacro CI_GEN_SLOT("cwsf", "#CW (Item Slot Full)", "ReplaceableTextures\\CommandButtons\\BTNDustOfAppearance.blp")

//! runtextmacro CI_GEN_SLOT("ciam", "[Amulet Slot]", "ReplaceableTextures\\CommandButtonsDisabled\\DISBTNAmulet.blp")
//! runtextmacro CI_GEN_SLOT("cibt", "[Boots Slot]", "ReplaceableTextures\\CommandButtonsDisabled\\DISBTNBoots.blp")
//! runtextmacro CI_GEN_SLOT("cigv", "[Glove Slot]", "ReplaceableTextures\\CommandButtonsDisabled\\DISBTNGauntletsOfOgrePower.blp")
//! runtextmacro CI_GEN_SLOT("cihn", "[Hand Slot]", "ReplaceableTextures\\CommandButtonsDisabled\\DISBTNGlove.blp")
//! runtextmacro CI_GEN_SLOT("cihd", "[Helmet Slot]", "ReplaceableTextures\\CommandButtonsDisabled\\DISBTNHoodOfCunning.blp")
//! runtextmacro CI_GEN_SLOT("cimn", "[Main Slot]", "ReplaceableTextures\\CommandButtonsDisabled\\DISBTNImprovedMoonArmor.blp")
//! runtextmacro CI_GEN_SLOT("cimc", "[Misc Slot]", "ReplaceableTextures\\CommandButtonsDisabled\\DISBTNBelt.blp")
//! runtextmacro CI_GEN_SLOT("cirg", "[Ring Slot]", "ReplaceableTextures\\CommandButtonsDisabled\\DISBTNGoldRing.blp")
//! runtextmacro CI_GEN_SLOT("cish", "[Shoulder Slot]", "ReplaceableTextures\\CommandButtonsDisabled\\DISBTNLeatherUpgradeTwo.blp")
//! runtextmacro CI_GEN_SLOT("citr", "[Trouser Slot]", "ReplaceableTextures\\CommandButtonsDisabled\\DISBTNDustOfAppearance.blp")

//! runtextmacro CI_GEN_SPECIAL("cwsl", "#CW (Selector)", "CustomWindow\\selector.mdl")

//! runtextmacro CI_GEN_END()

// these textmacros below generate an LUA file through vJass to send to ObjectMerger
// don't change these unless you know what you are doing.

//! textmacro CI_GEN_START takes DO_GEN
    //! externalblock extension=lua ObjectMerger $FILENAME$
    //! i if "$DO_GEN$" == "true" then
    //! i setobjecttype("destructables")
//! endtextmacro

//! textmacro CI_GEN_END
    //! i end
    //! endexternalblock
//! endtextmacro

//! textmacro CI_GEN_SPECIAL takes RAWCODE, NAME, MODEL
    //! i createobject("YTlb", "$RAWCODE$")
    //! i makechange(current, "bfxr", 180.00)
    //! i makechange(current, "bfil", "$MODEL$")
    //! i makechange(current, "boch", 0.00)
    //! i makechange(current, "bshd", "")
    //! i makechange(current, "btar", "")
    //! i makechange(current, "bcpr", 0)
    //! i makechange(current, "bmas", 10.0)
    //! i makechange(current, "bmis", 0.10)
    //! i makechange(current, "bcpd", 0)
    //! i makechange(current, "buch", 0)
    //! i makechange(current, "bptx", none)
    //! i makechange(current, "bsuf", "$NAME$")
    //! i makechange(current, "bnam", " ")
//! endtextmacro

//! textmacro CI_GEN_SLOT takes RAWCODE, NAME, TEXTURE
    //! i createobject("YTlb", "$RAWCODE$")
    //! i makechange(current, "bfxr", 180.00)
    //! i makechange(current, "bfil", "CustomWindow\\IconBase.mdl")
    //! i makechange(current, "boch", 0.00)
    //! i makechange(current, "btxf", "$TEXTURE$")
    //! i makechange(current, "btxi", 32)
    //! i makechange(current, "bshd", "")
    //! i makechange(current, "btar", "")
    //! i makechange(current, "bcpr", 0)
    //! i makechange(current, "bmas", 10.0)
    //! i makechange(current, "bmis", 0.10)
    //! i makechange(current, "bcpd", 0)
    //! i makechange(current, "buch", 0)
    //! i makechange(current, "bptx", none)
    //! i makechange(current, "bsuf", "$NAME$")
    //! i makechange(current, "bnam", " ")
//! endtextmacro
    
//! textmacro CI_GEN_BORDER takes RAWCODE, NAME, MODEL
    //! i createobject("YTlb", "$RAWCODE$")
    //! i makechange(current, "bfxr", 0.00)
    //! i makechange(current, "bfil", "$MODEL$")
    //! i makechange(current, "boch", 0.00)
    //! i makechange(current, "btxf", "UI\\Widgets\\EscMenu\\Human\\human-options-menu-border.blp")
    //! i makechange(current, "btxi", 32)
    //! i makechange(current, "bshd", "")
    //! i makechange(current, "btar", "")
    //! i makechange(current, "bcpr", 0)
    //! i makechange(current, "bmas", 10.0)
    //! i makechange(current, "bmis", 0.10)
    //! i makechange(current, "bcpd", 0)
    //! i makechange(current, "buch", 0)
    //! i makechange(current, "bptx", none)
    //! i makechange(current, "bsuf", "$NAME$")
    //! i makechange(current, "bnam", " ")
//! endtextmacro

endscope

Copy and paste into a trigger.

Aswell, you should remove the shadows and fogging from the inventory models. This stops them from changing blue/orange from the omnient light (night and day). I was bored so I did them for you aswell. See the attachments.

A couple of other suggestions (although some of these have already been noted on the hive):

- You should include text for the special buttons to explain what they are (head slot, cancel, drop item, etc).
- If you make the items a player picks up consumable and consumed on pickup (think tomes), you can allow units to pickup items with all 6 slots occupied. Then, if there is a problem you can re-create the item (as if it wasn't picked up). The plus-side is you can use all 6 slots for potions. The downside is potions would need both a dummy item (the one that is picked up) and the item in thier inventory. If you allow to drop from the wc3 inventory (potions) you can detect that and replace the dropped item with its dummy item counter-part.
Attached Files
File Type: mdx borderD.mdx (1.5 KB, 15 views)
File Type: mdx borderL.mdx (1.5 KB, 12 views)
File Type: mdx borderR.mdx (1.5 KB, 12 views)
File Type: mdx borderU.mdx (1.5 KB, 15 views)
File Type: mdx central.mdx (2.2 KB, 11 views)
File Type: mdx cornerDL.mdx (1.8 KB, 10 views)
File Type: mdx cornerDR.mdx (1.8 KB, 12 views)
File Type: mdx cornerUL.mdx (1.8 KB, 12 views)
File Type: mdx cornerUR.mdx (1.8 KB, 11 views)
File Type: mdx empinv.MDX (2.2 KB, 11 views)
File Type: mdx IconBase.mdx (2.4 KB, 13 views)
__________________

Last edited by Ammorth : 02-20-2010 at 11:47 PM.
Ammorth is offline   Reply With Quote
Old 02-20-2010, 11:25 PM   #3
Anachron
User
 
Anachron's Avatar
 
Join Date: Mar 2009
Posts: 1,079

Anachron will become famous soon enough (51)Anachron will become famous soon enough (51)

Default

Thanks a lot, you did test this, right? :)
__________________
CustomInventory [Discussion - Download] - Got Directors Cut!
CustomMissle [Discussion - [Download (not yet)] - In development!
Other systems [Spawn System] [Move System] [CustomBar] [SpellBar]
Anachron is offline   Reply With Quote
Old 02-20-2010, 11:30 PM   #4
Ammorth
I blink, therefore I am.
 
Ammorth's Avatar
 
Join Date: Sep 2006
Posts: 1,812

Submissions (10)

Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)

Default

Yes, I downloaded version W, saved and test-mapped. Everything turned out the same.

1 other thing I was going to add to suggestions is to generate the UI at a location (instead of pre-placing it). Just tell the user the point they pick should be of certain size and flat. It makes it easier to copy this to their map as now the object data is generated automatically.
__________________
Ammorth is offline   Reply With Quote
Old 02-20-2010, 11:31 PM   #5
Anachron
User
 
Anachron's Avatar
 
Join Date: Mar 2009
Posts: 1,079

Anachron will become famous soon enough (51)Anachron will become famous soon enough (51)

Default

Yes, that was exactly what I was trying to do. Really big thanks, you saved me a lot of work.
Where did you learn how to make that anyway?
__________________
CustomInventory [Discussion - Download] - Got Directors Cut!
CustomMissle [Discussion - [Download (not yet)] - In development!
Other systems [Spawn System] [Move System] [CustomBar] [SpellBar]
Anachron is offline   Reply With Quote
Old 02-20-2010, 11:34 PM   #6
Ammorth
I blink, therefore I am.
 
Ammorth's Avatar
 
Join Date: Sep 2006
Posts: 1,812

Submissions (10)

Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)

Default

hmm, I picked up the basics while setting up the PAS object merger lines. And then with the help of Earth-Fury on IRC and the bonusmod object merger shit, I did this.

Its kinda nice, cause now that I know how, I can do it for myself whenever I want =D
__________________

Last edited by Ammorth : 02-20-2010 at 11:35 PM.
Ammorth is offline   Reply With Quote
Old 02-20-2010, 11:38 PM   #7
Anachron
User
 
Anachron's Avatar
 
Join Date: Mar 2009
Posts: 1,079

Anachron will become famous soon enough (51)Anachron will become famous soon enough (51)

Default

Quote:
Originally Posted by Ammorth
hmm, I picked up the basics while setting up the PAS object merger lines. And then with the help of Earth-Fury on IRC and the bonusmod object merger shit, I did this.

Its kinda nice, cause now that I know how, I can do it for myself whenever I want =D
Yeah, that basically what I want too^^

Quote:
- You should include text for the special buttons to explain what they are (head slot, cancel, drop item, etc).
Yeah, nice idea, thanks.

Quote:
- If you make the items a player picks up consumable and consumed on pickup (think tomes), you can allow units to pickup items with all 6 slots occupied. Then, if there is a problem you can re-create the item (as if it wasn't picked up). The plus-side is you can use all 6 slots for potions. The downside is potions would need both a dummy item (the one that is picked up) and the item in thier inventory. If you allow to drop from the wc3 inventory (potions) you can detect that and replace the dropped item with its dummy item counter-part.
Yeah, I am afraid of the downside. Currently I wanna have it like that, and the Powerup module doesnt work correctly. So I have to use atleast 5 slots for now, while slots-1 slots can only be used.

Edit: Omg, I say year to often.
Edit2: Alright, released the new version. Thanks again, Ammorth!

Ps.) This may be offtopic, but do you think its good enough for wc3c.net too?
__________________
CustomInventory [Discussion - Download] - Got Directors Cut!
CustomMissle [Discussion - [Download (not yet)] - In development!
Other systems [Spawn System] [Move System] [CustomBar] [SpellBar]

Last edited by Anachron : 02-20-2010 at 11:46 PM.
Anachron is offline   Reply With Quote
Old 02-20-2010, 11:41 PM   #8
Ammorth
I blink, therefore I am.
 
Ammorth's Avatar
 
Join Date: Sep 2006
Posts: 1,812

Submissions (10)

Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)

Default

I think I might have 1-2 rawcodes wrong... give me a minute.

yep, Corner Right should be cwrg not cwlr

updated the script posted above to reflect this.
__________________

Last edited by Ammorth : 02-20-2010 at 11:48 PM.
Ammorth is offline   Reply With Quote
Old 02-20-2010, 11:52 PM   #9
Anachron
User
 
Anachron's Avatar
 
Join Date: Mar 2009
Posts: 1,079

Anachron will become famous soon enough (51)Anachron will become famous soon enough (51)

Default

Alright looks fine. Can you please answer my question on last post too?
__________________
CustomInventory [Discussion - Download] - Got Directors Cut!
CustomMissle [Discussion - [Download (not yet)] - In development!
Other systems [Spawn System] [Move System] [CustomBar] [SpellBar]
Anachron is offline   Reply With Quote
Old 02-21-2010, 12:01 AM   #10
Ammorth
I blink, therefore I am.
 
Ammorth's Avatar
 
Join Date: Sep 2006
Posts: 1,812

Submissions (10)

Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)

Default

I couldn't see why not. If it is customizable enough, I would assume it would become a system (assuming the code is up to par, which I didn't look at). Even if it doesn't, the feedback you would gain (both for the code and for the system in general) would help polish it even more.
__________________

Last edited by Ammorth : 02-21-2010 at 12:01 AM.
Ammorth is offline   Reply With Quote
Old 02-21-2010, 12:05 AM   #11
Anachron
User
 
Anachron's Avatar
 
Join Date: Mar 2009
Posts: 1,079

Anachron will become famous soon enough (51)Anachron will become famous soon enough (51)

Default

Yes, and I only used stuff from wc3c.net, so it really could be approved.
But I guess I have to many librarys that are not approved by me in that inventory ):
__________________
CustomInventory [Discussion - Download] - Got Directors Cut!
CustomMissle [Discussion - [Download (not yet)] - In development!
Other systems [Spawn System] [Move System] [CustomBar] [SpellBar]
Anachron is offline   Reply With Quote
Old 02-21-2010, 12:10 AM   #12
Troll-Brain
User
 
Join Date: Oct 2006
Posts: 1,490

Submissions (1)

Troll-Brain has a spectacular aura about (134)

Default

I suppose it doesn't handle cooldowns of item abilities ?
At least not in the native way.
__________________
Cool != Useful
Troll-Brain is offline   Reply With Quote
Old 02-21-2010, 12:17 AM   #13
Anachron
User
 
Anachron's Avatar
 
Join Date: Mar 2009
Posts: 1,079

Anachron will become famous soon enough (51)Anachron will become famous soon enough (51)

Default

It does.
__________________
CustomInventory [Discussion - Download] - Got Directors Cut!
CustomMissle [Discussion - [Download (not yet)] - In development!
Other systems [Spawn System] [Move System] [CustomBar] [SpellBar]
Anachron is offline   Reply With Quote
Old 02-21-2010, 10:23 AM   #14
Troll-Brain
User
 
Join Date: Oct 2006
Posts: 1,490

Submissions (1)

Troll-Brain has a spectacular aura about (134)

Default

I mean, we don't have the cooldown image on the item when the item is on the big inventory, right ?
__________________
Cool != Useful
Troll-Brain is offline   Reply With Quote
Old 02-21-2010, 11:53 AM   #15
Anachron
User
 
Anachron's Avatar
 
Join Date: Mar 2009
Posts: 1,079

Anachron will become famous soon enough (51)Anachron will become famous soon enough (51)

Default

No, not yet. Is it that big deal anyway?
__________________
CustomInventory [Discussion - Download] - Got Directors Cut!
CustomMissle [Discussion - [Download (not yet)] - In development!
Other systems [Spawn System] [Move System] [CustomBar] [SpellBar]
Anachron 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 12:10 PM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

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