• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Depositing resource colours...

Status
Not open for further replies.
Level 11
Joined
Aug 24, 2009
Messages
706
You know when your worker deposits gold to your hall, and it says +10 in yellow, and when it deposits lumber, it says +10 in green. I know that its capacity to carry will effect the number, but how do i change the colour?
 
Level 7
Joined
May 28, 2009
Messages
241
It might be lurking in the gameplay inteface (or perhaps even constants).

If you were so adventurous to find it. Write a colour code around it eg:
|cffffffff10|r - white
|cffff00aa10|r - might be purple-ish

There a post somewhere that includes colour codes
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
You need to create a text-file called "war3mapMisc.txt", then you can insert any of these values:
[Misc]

// gold text data
GoldTextColor=255,255,220,0
GoldTextVelocity=0,0.03,100
GoldTextLifetime=2
GoldTextFadeStart=1

// lumber text data
LumberTextColor=255,128,128,255
LumberTextVelocity=0,0.03,100
LumberTextLifetime=2
LumberTextFadeStart=1

// bounty text data
BountyTextColor=255,255,220,0
BountyTextVelocity=0,0.03,100
BountyTextLifetime=3
BountyTextFadeStart=2

// missile 'miss' text tag data
MissTextColor=255,255,0,0
MissTextVelocity=0,0.03,100
MissTextLifetime=3
MissTextFadeStart=1

// CriticalStrike text tag data
CriticalStrikeTextColor=255,255,0,0
CriticalStrikeTextVelocity=0,0.04,100
CriticalStrikeTextLifetime=5
CriticalStrikeTextFadeStart=2

// ManaBurn text tag data
ManaBurnTextColor=255,82,82,255
ManaBurnTextVelocity=0,0.04,100
ManaBurnTextLifetime=5
ManaBurnTextFadeStart=2

// CriticalStrike text tag data
BashTextColor=255,0,0,255
BashTextVelocity=0,0.04,100
BashTextLifetime=5
BashTextFadeStart=2

ActiveButtonColor=255,75,150,255

StrAttackBonus=1.0
AgiAttackSpeedBonus=0.01
AgiDefenseBase=0.0
StrRegenBonus=0.03
StrHitPointBonus=18.0
AgiDefenseBonus=0.1
StrHitPointBonus=15.0
AgiDefenseBase=-4.0
AgiMoveBonus=0.01
IntManaBonus=3.0
MaxHeroLevel=50
MaxUnitLevel=100
HeroFactorXP=175,150,125,100,85,65
GlobalExperience=0
HeroAwakenLifeFactor=1.0
HeroAwakenManaFactor=1.0
HeroMaxAwakenCostGold=0
HeroMaxAwakenCostLumber=0
HeroMaxReviveCostGold=0
HeroMaxReviveTime=75.0
HeroReviveManaFactor=1.0
HeroReviveManaStart=0
NeedHeroXPFormulaA=1.04
NeedHeroXPFormulaB=15.0
NeedHeroXPFormulaC=1.2
GrantNormalXPFormulaC=0.0
GrantNormalXPFormulaB=0.0
GrantNormalXPFormulaA=0.0
GrantHeroXPFormulaC=0.0
GrantHeroXPFormulaA=0.0
SummonedKillFactor=0.0
HeroExpRange=0.0
BuildingKillsGiveExp=0
AwakenBaseFactor=0.0
AwakenLevelFactor=0.0
AwakenBaseLumberFactor=0.0
AwakenLumberLevelFactor=0.0
PawnItemRate=0.5
PawnItemRange=150.0
InvisSpeed=0.8
MinBldgSpeed=0.0
MinUnitSpeed=0.0
MaxBldgSpeed=500.0
MaxUnitSpeed=522.0
AwakenMaxFactor=0.0
MoveSpeedBonusesStack=0
GrantHeroXP=25,50,75,100,125,150,175,200,225,250,275,300,325,350,325,350,375,400,425,450,475,500
NeedHeroXP=100
MaxGuardDistance=100000.0
GuardDistance=100000.0
MaxUnitLevel=50
DamageBonusHero=1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00
DamageBonusMagic=1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00
DamageBonusNormal=1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00
DamageBonusPierce=1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00
DamageBonusSiege=1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00
DamageBonusSpells=1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00
EtherealDamageBonus=0.00,0.00,0.00,1.66,0.00,1.66,0.00
DamageBonusChaos=1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00
IntRegenBonus=0.03
AgiDefenseBonus=0.1
DefenseArmor=0.03
MissDamageReduction=0.25
ChanceToMiss=0.66
FrostMoveSpeedDecrease=0.33
FrostAttackSpeedDecrease=0.15
SpellCastRangeBuffer=150.0
FollowRange=125.0
UpkeepUsage=300
CallForHelp=0.0
AttackNotifyRange=100000.0
FoodCeiling=500
BurrowedUnitsBestowAuras=1
FlyingHeroesBestowAuras=1
IllusionsBestowAuras=1
InvisibleUnitsBestowAuras=1
AnimatedUnitsBestowAuras=1
InvisibleUnitsBestowAuras=1
IllusionsCanRestoreLife=1
IllusionsGetAttackSpeedBonus=1
IllusionsGetMoveSpeedBonus=1
IllusionsGetDefenseBonus=1
IllusionsGetAttackBonus=1
IllusionsCanRestoreMana=1
IllusionsGetAutocast=1
PolymorphedUnitsBestowAuras=1
ReactionDelay=0.0
BoneDecayTime=40.0
CanDeactivateWindWalk=1
TradingIncSmall=50
TradingIncLarge=500
CreepCallForHelp=0.0
DisplayEnemyInventory=0
FollowRange=100.0
GoldMineMaxGold=5000000
ReviveBaseFactor=0.0
ReviveLevelFactor=0.0
ReviveMaxFactor=0.0
ReviveMaxTimeFactor=0.0
ReviveTimeFactor=0.0
GuardDistance=900.0
MaxGuardDistance=1500.0

[QuestIndicatorTimeout]
QuestIndicatorTimeout=10

[CameraMargins]
// Defines the distance (in cells) between the camera bounds and
// the playable map edge
left=4
right=4
top=2
bottom=2

[UnpathableMargins]
// Defines the default number of unpathable cells to add to each map edge
left=6
right=6
top=8
bottom=4

[DefaultZFog]
Style=0
Start=20000
End=50000
Density=0
Color=0,0,0,0

[TerrainZFog]
Style=0
Start=3000
End=5000
Density=0.5
Color=255,0,0,0

[MenuZFog]
Style=0
Start=100
End=5500
Density=1
Color=255,11,20,11

[TutorialZFog]
Style=0
Start=0
End=2000
Density=0.5
Color=255,0,51,77

[HumanZFog]
Style=0
Start=0
End=9000
Density=0.5
Color=255,77,77,51

[OrcZFog]
Style=0
Start=0
End=2950
Density=0.5
Color=255,77,51,0

[UndeadZFog]
Style=0
Start=0
End=8000
Density=0.5
Color=255,0,51,51

[NightElfZFog]
Style=0
Start=0
End=1600
Density=0.5
Color=255,51,77,128

[Terrain]
// terrain parameters

// Maximum slope in degrees, (86+ will disable slope limits)
MaxSlope=50

// Global height limits
// 0 = low ground, each cliff level = 128
MaxHeight=1536
MinHeight=-128

[FlyerMap]
// Radius, in pathing cells, to search for maximum height
MaximizeRadius=6
// Number of times to halve map size
SmoothLevels=3

[Sound]
Attenuation=3.0
MinDist=1200
MaxDist=20000
MusicFadeRate=16
MusicFadeInterval=500

[Light]
// Vector from light to world
Direction=0.3,0.3,-0.25

[SelectionCircle]
// Defines different textures to be used based on selection circle size.
// The Size## value defines the largest size which uses the given textures.
// Note that the last size does not need a Size## value since anything bigger
// than the next size down uses it.
NumSizes=3
Size00=100
Texture00=ReplaceableTextures\Selection\SelectionCircleSmall
TextureDotted00=ReplaceableTextures\Selection\SelectionCircleSmallDotted

Size01=300
Texture01=ReplaceableTextures\Selection\SelectionCircleMed
TextureDotted01=ReplaceableTextures\Selection\SelectionCircleMedDotted

Texture02=ReplaceableTextures\Selection\SelectionCircleLarge
TextureDotted02=ReplaceableTextures\Selection\SelectionCircleLargeDotted

// This value is multiplied by the SLK scale field to get the circle size
ScaleFactor=72

// This value is added to the selection circle height
// when on walkable doodads.
// Note: this is also applied to shadow images
ImageWalkableZOffset=15

// Colors
ColorFriend=255,0,255,0
ColorNeutral=255,255,255,0
ColorEnemy=255,255,0,0
AllyOffset=0.2

[Blight]
Texture=TerrainArt\Blight\Blight
PuffModel=Environment\BlightDoodad\BlightDoodad.mdl
PuffDuration=3000 // Duration of a puff, in milliseconds
PuffInterval=2500 // Interval between checks for new puffs, in milliseconds
PuffChance=0.7 // Chance for a vertex to create a puff (per interval), in percent

// Dirt Chance Table
// Specifies the chance (in percent) that a neighboring vertex will be changed to dirt
// when a vertex is blighted. Due to symmetry, only five unique values are needed
// for a 2 vertex radius. The the upper right quadrant of the table is:
//
// s2 sd d2
// s1 d1 sd
// cn s1 s2
//
// where 'cn' is the center vertex, 's' means "straight", 'd' means "diagonal".
// Note that the chance for 'cn' is always 100%, and not listed here.
//

DCT_s1=5
DCT_s2=10
DCT_sd=15
DCT_d1=5
DCT_d2=20

[Water]
// Depth-based colors
// The water plane is vertex colored based on the water "depth": the distance
// from the water plane to the ground. These values define the colors for two
// distinct ranges: "shallow" (MinDepth to DeepLevel) and "deep" (DeepLevel to MaxDepth).
// where the color is found by interpolating between the corresponding colors given
// in TerrainArt/Water.slk.
//

MinDepth=10
DeepLevel=64
MaxDepth=72

// DeepLevelPathing defines the depth below which water
// is considered "deep" for pathing and placement rules.

DeepLevelPathing=52

// WavesDepth defines the depth that terrain vertices need to be below the
// water before they will be considered "under" water for wave generation

WavesDepth=25

[FogOfWar]
FoggedTerrain=170,16,16,32
BlackMaskedTerrain=255,0,0,0
DarkMaskedTerrain=230,0,0,0
BoundaryTerrain=230,0,0,0
FoggedBoundaryTerrain=170,16,16,32
FoggedObject=255,64,64,96
BlackMaskedObject=255,0,0,0
DarkMaskedObject=255,32,32,48
BoundaryObject=255,0,0,0
FoggedBoundaryObject=255,64,64,96
ShadowImageColor=170,0,0,0

FogColorPlayer=255,255,255,255
FogColorAlly=255,255,255,0
FogColorEnemy=255,255,0,0
FogColorResource=255,32,128,128
FogColorItem=255,240,240,0
FogColorHero=255,255,255,128
FogColorDestructable=255,0,160,128
FogColorCreepAllied=255,255,120,0
FogColorBlackMaskAlpha=0
FogColorDarkMaskAlpha=40
FogColorFogMaskAlpha=128
FogColorVisibleAlpha=255
FogColorBlightMask=0,63,63,64

[Minimap]
MinimapColorBorder=255,60,60,70

[TargetingColors]
TargetLightColor=180,0,255,0
SelTargetColor=255,240,200,0

[Glue]
ControlFadeDuration=0.25
CustomLoadTimerDuration=10.0

[InfoPanel]
MeleeRangeMax=128
SpeedVerySlow=300 // lower bound, everything below this is "very slow"
SpeedSlow=350
SpeedAverage=400
SpeedFast=450 // upper bound, everything above this is "very fast"
AttackVerySlow=2 // upper bound, everything above this is "very slow"
AttackSlow=1
AttackAverage=0.7
AttackFast=0.5 // lower bound, everything below this is "very fast"

[Occlusion]
MarkImage=ReplaceableTextures\Occlusion\OcclusionMark
MarkColor=255,255,0,255
OccluderColor=128,255,255,255
OccluderFadeTime=300 // Time to fade to OccluderColor, in milliseconds
BuildingsOcclude=0

[PlacementAlpha]
PlacementAlpha=200

[PingColor]
PingColor=255,0,255,0
PingAttackColor=255,255,0,0
PingAdvisorColor=255,255,255,0


Note1: Do not add all these values in the text-file, only pick out the ones you need!
Note 2: that all values set in "Gameplay Constants" will be erased, unless you add them in the text-file as well!
Note 3: when imported in your map, the file name must be "war3mapMisc.txt".

I know it's a huge list, but pressing CTRL + F might help you find the correct values ^^
Note that this is the entire list (including ping color, attack/movement speed values. fog of war etc...).
I did not test all values, so do not expect them all to work properly (I did remove some values, like battle.net tiers: how many wins you needed for a specific tier, since that does not work xD).

Damn, I've thinking a very long time about a tutorial that includes all this import text-stuff (to change loading screen text, command button tooltips, font and colors like this), maybe I should really create one sooner or later...
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Thanks for your help, ill try this on a test map now.
I actually thought that you can change resource colours ingame though.
Couldn't you do this with triggers as well?
Hm, I guess that could be possible, yes.

Info:

Basically we need to check when a unit (peasant) is returning recourses, but I have yet to find out a way to detect when a peasant returns his resources
However: from the moment he returns resources, his order would be changed to 'harvest', it's possible to detect this.
With a little bit of filtering, we can then try to find out whether he will mine gold next or return to a tree and base the color off that.

Another important value would be that you need to calculate the difference in resources between before and after the deposit (since lumber carried can vary).

Try this out:

  • Resources
    • Events
      • Unit - a unit Is issued an order targeting an object
    • Conditions
      • (String((Issued order))) Equal to harvest
    • Actions
      • Set TempLoc = (Position of (Triggering unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Target unit of issued order)) Equal to Gold Mine
        • Then - Actions
          • Floating Text - Create floating text that reads (+ + (String((((Owner of (Triggering unit)) Current gold) - Gold[(Player number of (Owner of (Triggering unit)))])))) at TempLoc with Z offset 0.00, using font size 10.00, color (R1%, G1%, B1%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 52.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
          • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
          • Set Gold[(Player number of (Owner of (Triggering unit)))] = ((Owner of (Triggering unit)) Current gold)
        • Else - Actions
          • Floating Text - Create floating text that reads (+ + (String((((Owner of (Triggering unit)) Current lumber) - Lumber[(Player number of (Owner of (Triggering unit)))])))) at TempLoc with Z offset 0.00, using font size 10.00, color (R2%, G2%, B2%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 52.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
          • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
          • Set Lumber[(Player number of (Owner of (Triggering unit)))] = ((Owner of (Triggering unit)) Current lumber)
      • Custom script: call RemoveLocation(udg_TempLoc)
  • R1/2, G1/2 and B1/2 are real variables.
  • TempLoc is a location variable.
  • Gold and Lumber are integer variables with array.
Edit: oh yeah, don't forget the "+" at the start of the floating text, it doesn't really show in the trigger, but it's pretty important to me xD (otherwise it shows as "10" instead of "+10").

Took me a while to fix all these issues though >.>
Anyway: you should still remove the standard resource message, this can only be done with the text-file I gave you.

It's a lot of work, but well, be happy: this is the first time that I've seen resource messages change in-game xD
 
Level 11
Joined
Aug 24, 2009
Messages
706
The resource colours worked perfectly, but i did find small problems in other fields: you can't choose your race in scenario > player properties, etc...

Update: I found a way to do this safely.

Step 1: Work on your map as usual and save it.
Step 2: Use RMPQEx to extract the war3mapmisc.txt from your map (this will have only the game constants you modified)
Step 3: Add these lines to the bottom and change RGB values accordingly:

[Misc]

// gold text data
GoldTextColor=255,255,120,0
GoldTextVelocity=0,0.03,100
GoldTextLifetime=2
GoldTextFadeStart=1

// lumber text data
LumberTextColor=255,30,144,255
LumberTextVelocity=0,0.03,100
LumberTextLifetime=2
LumberTextFadeStart=1

// bounty text data
BountyTextColor=255,255,120,0
BountyTextVelocity=0,0.03,100
BountyTextLifetime=3
BountyTextFadeStart=2

Note that gold text data in wc3 appears the same colour as bounty text data, but you can change it.

Step 4: Import war3mapmisc.txt before the final version and before protect your map.

This will give you all the fields you modified in constants and will save the hassle of cnp'ing your values.

Don't forget to save an extra copy of your map before step four.

OFF-TOPIC:

My map is very original and i don't think many mappers touched on similar ideas/units/buildings/spells/items like i do. If you are dieing to know what it is go ahead and ask me.

Me or you should do a tutorial on this because many people go through their map without knowing how to change easy stuff that makes your map look more professional.
 
Last edited:
Level 28
Joined
Jan 26, 2007
Messages
4,789
The resource colours worked perfectly, but i did find small problems in other fields: you can't choose your race in scenario > player properties, etc...

Update: I found a way to do this safely.

Step 1: Work on your map as usual and save it.
Step 2: Use RMPQEx to extract the war3mapmisc.txt from your map (this will have only the game constants you modified)
Step 3: Add these lines to the bottom and change RGB values accordingly:

[Misc]

// gold text data
GoldTextColor=255,255,120,0
GoldTextVelocity=0,0.03,100
GoldTextLifetime=2
GoldTextFadeStart=1

// lumber text data
LumberTextColor=255,30,144,255
LumberTextVelocity=0,0.03,100
LumberTextLifetime=2
LumberTextFadeStart=1

// bounty text data
BountyTextColor=255,255,120,0
BountyTextVelocity=0,0.03,100
BountyTextLifetime=3
BountyTextFadeStart=2

Note that gold text data in wc3 appears the same colour as bounty text data, but you can change it.

Step 4: Import war3mapmisc.txt before the final version and before protect your map.

This will give you all the fields you modified in constants and will save the hassle of cnp'ing your values.

Don't forget to save an extra copy of your map before step four.

OFF-TOPIC:

My map is very original and i don't think many mappers touched on similar ideas/units/buildings/spells/items like i do. If you are dieing to know what it is go ahead and ask me.

Me or you should do a tutorial on this because many people go through their map without knowing how to change easy stuff that makes your map look more professional.

Isn't that basically what I said, with the exception of the MPQ extractor? xD
Well, whatever... you can do it that way too (I find my way easier, since I don't use the "Scenario -> gameplay constants/game interface" anymore nowadays: the notepad file is a lot easier to edit and maintain + it has a lot more options.
I did add your problem as a "note" in one of my previous posts though ( + the solution).

I think I'll create the tutorial once I find a nice title for it.
Since it addresses a lot of points, some that 'do not exist' in the regular world editor, I can't really think of a global title (changing resource colors, changing attack/movement speed factors, etc).
 
Status
Not open for further replies.
Top