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 10-19-2008, 08:23 PM   #1
Toadcop
BuranX
 
Toadcop's Avatar
 
Join Date: Jul 2006
Posts: 1,886

Submissions (4)

Toadcop is just really nice (299)Toadcop is just really nice (299)

Approved Map: TcXSpell Making Session 10 Winner

Send a message via ICQ to Toadcop
Default DUSC - Texture Swapping In-Game

This demo shows the possibility to change units (models) texture in game to any desired other texture (!)

HOW IT DOES WORK ?

well ofc it's not simple at all. but this is waht you need to do it.
1) edit needed model via MDLVis or model editor and replace the desired texture with
Image "",
ReplaceableId 31,
it's very important cause otherwise it will not work.

2) the second step is to create destructables (trees) with needed "Art - Replaceable Texture File" (for example "Textures\Illidan.blp" ;) ) you will need this to change the texture.

3) you need to use (mode a bit before) the Nigth Elf (Mountain Giant) "War Club" ability. it's the keys for the texture change.

4) what now ? you will need to create the "trees" in game and also order the unit to use the ability on that "tree" so after cast
your unit will change the texture for the "Replaceable Texture" on the tree :P

well ofc it gives some limitations but you can do some work arounds.
1) attack index
2) number of attacks (but isn't actually a problem)
3) you unit will get upgrade animation tag... so for example town hall will get screwed...
4) ofc it's a spell cast so in cases where the unit cast point isn't 0 it will take some time to change the texture.
5) maybe some others...

To mention the original idea etc. is by 2008 Dron[XGM]
xD
well gl i hope you will find use for this ;)
Attached Images
File Type: jpg DUSC_0x01.jpg (380.7 KB, 2344 views)
File Type: jpg DUSC_0x02.jpg (371.1 KB, 1765 views)
Attached Files
File Type: w3x DUSC v1.0.w3x (1.05 MB, 1983 views)
__________________
Toadcop is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 10-19-2008, 08:29 PM   #2
Rising_Dusk
Obscurity, the Art


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

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

That's seriously badass. You have no idea how many awesome things this opens up for hero development. Mad props, no lie.
__________________
Rising_Dusk is offline   Reply With Quote
Old 10-19-2008, 08:32 PM   #3
Toadcop
BuranX
 
Toadcop's Avatar
 
Join Date: Jul 2006
Posts: 1,886

Submissions (4)

Toadcop is just really nice (299)Toadcop is just really nice (299)

Approved Map: TcXSpell Making Session 10 Winner

Send a message via ICQ to Toadcop
Default

well i know xD Dron should be blessed ^_^
__________________
Toadcop is offline   Reply With Quote
Old 10-19-2008, 08:38 PM   #4
Flame_Phoenix
retired coder | real ilfe
 
Flame_Phoenix's Avatar
 
Join Date: Mar 2007
Posts: 2,208

Submissions (10)

Flame_Phoenix has a spectacular aura about (90)Flame_Phoenix has a spectacular aura about (90)Flame_Phoenix has a spectacular aura about (90)Flame_Phoenix has a spectacular aura about (90)

Send a message via MSN to Flame_Phoenix
Default

Weerrmmmm why shouldn't people just use Morph ability to change a units model inside game ?

Anyway, I will now check map !
__________________
Check out my tutorials at:
1-Creating a Hero Tavern
2-Complete Icon Tutorial - ALL about Icons
3-Making a spell in vJass - Practice Session 1
Check out all my current spells at here
Finally, check my project:
Castle vs Castle Flame Edition
Flame_Phoenix is offline   Reply With Quote
Old 10-19-2008, 08:52 PM   #5
Anitarf
Procrastination Incarnate


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

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

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

Default

Very smart. It doesn't have many uses (since it only starts paying filesize dividends if you have three or more textures using the same model, and in how many maps does that happen?) but it is a very valuable discovery for the few maps that could use this.
__________________
Anitarf is offline   Reply With Quote
Old 10-19-2008, 08:53 PM   #6
Rising_Dusk
Obscurity, the Art


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

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

Because this allows having N>2 textures associated with a single model without constantly reimporting the model. This only saves space when there are more than 2 textures associated with a single model, but after that the amount it saves is silly.

I'm going to go ahead and approve this. To samples it goes. I also edited the thread title to tell a little more about what DUSC does.
__________________
Rising_Dusk is offline   Reply With Quote
Old 10-19-2008, 10:16 PM   #7
AnemicRoyalty
Moderator
 
AnemicRoyalty's Avatar


Texturing Moderator
Project Member: WotTH
 
Join Date: Dec 2006
Posts: 805

Submissions (23)

AnemicRoyalty is a name known to all (524)AnemicRoyalty is a name known to all (524)AnemicRoyalty is a name known to all (524)AnemicRoyalty is a name known to all (524)AnemicRoyalty is a name known to all (524)AnemicRoyalty is a name known to all (524)

Skinning Contest #14 WinnerSkinning Contest #15 WinnerHero Contest #2 - 1st Place

Default

Wow. I know nothing about code, but I know how incredibly valuable this system is. Always wanted something that could do this :D

+rep
AnemicRoyalty is offline   Reply With Quote
Old 10-19-2008, 10:32 PM   #8
Shade987
User
 
Shade987's Avatar
 
Join Date: Apr 2006
Posts: 501

Submissions (1)

Shade987 is on a distinguished road (19)

Default

Wow. This is just sweet.
__________________
Shade987 a.k.a. Phox a.k.a. Shadou Phox
Shade987 is offline   Reply With Quote
Old 10-19-2008, 10:52 PM   #9
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 thought the mpq compression reduces most of the file-size from redundant models?
Ammorth is offline   Reply With Quote
Old 10-19-2008, 10:57 PM   #10
Rising_Dusk
Obscurity, the Art


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

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

Squishing does that, but the MPQ has no way to associate two individually imported models with one another for compression's sake.
__________________
Rising_Dusk is offline   Reply With Quote
Old 10-19-2008, 11:23 PM   #11
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

When its creating it's dictionary, wouldn't most of the second model (minus the name and texture path) be redundant and become a dictionary reference?
Ammorth is offline   Reply With Quote
Old 10-19-2008, 11:29 PM   #12
Rising_Dusk
Obscurity, the Art


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

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

Hate and odium still each have two entries in the English dictionary even though they have the same contents. Analogies aside, the answer to your question is "I am pretty sure they don't."
__________________
Rising_Dusk is offline   Reply With Quote
Old 10-20-2008, 12:00 AM   #13
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 realize this is going off-topic, but I want to point out that it was not intended to be an analogy. zLib, the compression software used in .mpq files is based on DEFLATE, which uses a "dictionary" to store redundant data. for example:

Code:
"The program not only compresses, the program decompresses". - 57 chars

could be compressed into the following dictionary and output:

1 "he program " - 13 chars (including index)
2 "compresses" - 11 chars (including index)

"T1not only 2, t1de2" - 19 chars

input = 57 chars
output = 43 chars
compression = 75.4%

This is one of the basics that compression programs do. Look for patterns and stick the patterns into a library to reduce the size. If you were to think about a .mdl file and the amount of redundant data between 2 models with different paths, the data will mostly become dictionary references and the data will be compressed.
Ammorth is offline   Reply With Quote
Old 10-20-2008, 12:03 AM   #14
Rising_Dusk
Obscurity, the Art


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

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

Okay, great, so you know more about it than I do. Why the hell did you see fit to ask the question in the first place, then?
__________________
Rising_Dusk is offline   Reply With Quote
Old 10-20-2008, 12:22 AM   #15
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

Although an amazing hack, I just wanted to make sure I wasn't missing something.
Ammorth 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:08 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