1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Depositing resource colours...

Discussion in 'World Editor Help Zone' started by Reaper51, Apr 21, 2010.

  1. Reaper51

    Reaper51

    Joined:
    Aug 24, 2009
    Messages:
    680
    Resources:
    2
    Maps:
    2
    Resources:
    2
    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?
     
  2. Masken

    Masken

    Joined:
    May 28, 2009
    Messages:
    226
    Resources:
    0
    Resources:
    0
    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
     
  3. Reaper51

    Reaper51

    Joined:
    Aug 24, 2009
    Messages:
    680
    Resources:
    2
    Maps:
    2
    Resources:
    2
    I know colour codes, but i didn't find it yet game constants/interface yet

    P.S. thx for spelling color, colour
     
  4. ap0calypse

    ap0calypse

    Joined:
    Jan 26, 2007
    Messages:
    4,780
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    You need to create a text-file called "war3mapMisc.txt", then you can insert any of these values:
    Misc Data
    [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...
     
  5. Reaper51

    Reaper51

    Joined:
    Aug 24, 2009
    Messages:
    680
    Resources:
    2
    Maps:
    2
    Resources:
    2
    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?
     
  6. ap0calypse

    ap0calypse

    Joined:
    Jan 26, 2007
    Messages:
    4,780
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    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:

    Trigger
    • 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
     
  7. Reaper51

    Reaper51

    Joined:
    Aug 24, 2009
    Messages:
    680
    Resources:
    2
    Maps:
    2
    Resources:
    2
    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: Apr 22, 2010
  8. ap0calypse

    ap0calypse

    Joined:
    Jan 26, 2007
    Messages:
    4,780
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    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).