![]() |
#1 | |
User
Join Date: Mar 2009
Posts: 1,079
![]() ![]() |
![]() Hello folks!
__________________I've released my inventory system here.
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 Last edited by Anachron : 02-20-2010 at 07:50 PM. |
|
![]() |
![]() |
Sponsored Links - Login to hide this ad! |
|
![]() |
#2 |
I blink, therefore I am.
Join Date: Sep 2006
Posts: 1,812
![]() ![]() ![]() ![]() |
![]() ![]() 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. Last edited by Ammorth : 02-20-2010 at 11:47 PM. |
![]() |
![]() |
![]() |
#3 |
User
Join Date: Mar 2009
Posts: 1,079
![]() ![]() |
![]() Thanks a lot, you did test this, right? :)
__________________ |
![]() |
![]() |
![]() |
#4 |
I blink, therefore I am.
Join Date: Sep 2006
Posts: 1,812
![]() ![]() ![]() ![]() |
![]() 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. |
![]() |
![]() |
![]() |
#5 |
User
Join Date: Mar 2009
Posts: 1,079
![]() ![]() |
![]() 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? |
![]() |
![]() |
![]() |
#6 |
I blink, therefore I am.
Join Date: Sep 2006
Posts: 1,812
![]() ![]() ![]() ![]() |
![]() 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. |
![]() |
![]() |
![]() |
#7 | |||
User
Join Date: Mar 2009
Posts: 1,079
![]() ![]() |
![]() Quote:
Quote:
Quote:
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? Last edited by Anachron : 02-20-2010 at 11:46 PM. |
|||
![]() |
![]() |
![]() |
#8 |
I blink, therefore I am.
Join Date: Sep 2006
Posts: 1,812
![]() ![]() ![]() ![]() |
![]() 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. |
![]() |
![]() |
![]() |
#9 |
User
Join Date: Mar 2009
Posts: 1,079
![]() ![]() |
![]() Alright looks fine. Can you please answer my question on last post too?
__________________ |
![]() |
![]() |
![]() |
#10 |
I blink, therefore I am.
Join Date: Sep 2006
Posts: 1,812
![]() ![]() ![]() ![]() |
![]() 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. |
![]() |
![]() |
![]() |
#11 |
User
Join Date: Mar 2009
Posts: 1,079
![]() ![]() |
![]() 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 ): |
![]() |
![]() |
![]() |
#12 |
User
Join Date: Oct 2006
Posts: 1,490
![]() |
![]() I suppose it doesn't handle cooldowns of item abilities ?
__________________At least not in the native way. |
![]() |
![]() |
![]() |
#13 |
User
Join Date: Mar 2009
Posts: 1,079
![]() ![]() |
![]() It does.
__________________ |
![]() |
![]() |
![]() |
#14 |
User
Join Date: Oct 2006
Posts: 1,490
![]() |
![]() I mean, we don't have the cooldown image on the item when the item is on the big inventory, right ?
__________________ |
![]() |
![]() |
![]() |
#15 |
User
Join Date: Mar 2009
Posts: 1,079
![]() ![]() |
![]() No, not yet. Is it that big deal anyway?
__________________ |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
|