• 🏆 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!

[Solved] Acolyte corrupts trees

Status
Not open for further replies.
Yep, and the reason for that unit to be "undead race" is specifically because i want it to warp buildings in the "undead" fashion. I just didn't expect this glitch to happen.
You can make a dummy unit that repairs the building and remove it when construction finishes. With some workarounds it should be possible.
 

Wrda

Spell Reviewer
Level 26
Joined
Nov 18, 2012
Messages
1,887
Yep, and the reason for that unit to be "undead race" is specifically because i want it to warp buildings in the "undead" fashion. I just didn't expect this glitch to happen.
It isn't a glitch, that is a game mechanic... just like ghouls when harvesting trees they become blight.
There is no way to turn the tree to normal afaik.
 
Level 28
Joined
Feb 18, 2014
Messages
3,580
You could manually edit the tree model by replacing the Replaceable ID 31 texture with a normal tree texture or import a non-blighted version of that tree and change its path to something like : ReplaceableTextures\LordaeronTree\LordearonSummerTreeBlight.blp
 
Level 20
Joined
Nov 20, 2005
Messages
1,178
You could manually edit the tree model by replacing the Replaceable ID 31 texture with a normal tree texture or import a non-blighted version of that tree and change its path to something like : ReplaceableTextures\LordaeronTree\LordearonSummerTreeBlight.blp
i was also looking for the path to replace but couldn't find it so far. Is this the one?
 

Wrda

Spell Reviewer
Level 26
Joined
Nov 18, 2012
Messages
1,887
The Ghoul's ability is Harvest Lumber(Ghoul), i didn't know this would happen even with the common Harvest Lumber and Gold ability.
This is not about ghoul's ability, it is about the undead race. Just like if you move a peasant to undead race, it would have undead build style. Same thing with harvesting, trees will be blight with any undead race unit.
 
Level 28
Joined
Feb 18, 2014
Messages
3,580
i was also looking for the path to replace but couldn't find it so far. Is this the one?
This only works for the Lordaeron Tree model, if you want to use a different one then check in ReplaceableTextures folder to find the path. example :

ReplaceableTextures\AshenvaleTree\AshenTree.blp
ReplaceableTextures\AshenvaleTree\AshenTreeBlight.blp
 
Maybe you can do something with this.

  • Build Dummy
    • Events
      • Unit - A unit Begins construction
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Constructing structure)) Equal to Necropolis
          • (Unit-type of (Constructing structure)) Equal to Halls of the Dead
          • (Unit-type of (Constructing structure)) Equal to Black Citadel
          • (Unit-type of (Constructing structure)) Equal to Ziggurat
          • (Unit-type of (Constructing structure)) Equal to Spirit Tower
          • (Unit-type of (Constructing structure)) Equal to Nerubian Tower
          • (Unit-type of (Constructing structure)) Equal to Altar of Darkness
          • (Unit-type of (Constructing structure)) Equal to Crypt
          • (Unit-type of (Constructing structure)) Equal to Sacrificial Pit
          • (Unit-type of (Constructing structure)) Equal to Graveyard
          • (Unit-type of (Constructing structure)) Equal to Slaughterhouse
          • (Unit-type of (Constructing structure)) Equal to Temple of the Damned
          • (Unit-type of (Constructing structure)) Equal to Boneyard
          • (Unit-type of (Constructing structure)) Equal to Haunted Gold Mine
          • (Unit-type of (Constructing structure)) Equal to Tomb of Relics
    • Actions
      • Set ConstructingBuilding = (Constructing structure)
      • Set TempLoc = (Position of ConstructingBuilding)
      • Set TempGroup = (Units within 250.00 of TempLoc matching ((Unit-type of (Matching unit)) Equal to Acolyte))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is alive) Equal to True
            • Then - Actions
              • Unit - Remove Repair (Human) from (Picked unit)
            • Else - Actions
      • Unit - Create 1 RepairDummy for (Owner of (Triggering unit)) at TempLoc facing Default building facing degrees
      • Set ConstructionDummy = (Last created unit)
      • Custom script: call RemoveLocation (udg_TempLoc)
      • Countdown Timer - Start ConstructionTimer as a One-shot timer that will expire in 0.00 seconds


  • Construction Timer Expires
    • Events
      • Time - ConstructionTimer expires
    • Conditions
    • Actions
      • Unit - Order ConstructionDummy to Orc Peon - Repair ConstructingBuilding
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is alive) Equal to True
            • Then - Actions
              • Unit - Add Repair (Human) to (Picked unit)
            • Else - Actions
      • Custom script: call DestroyGroup (udg_TempGroup)


Just keep in mind that you have to remove the dummy somehow. I haven't thought of a smart way to do it because I don't know how to make stuff MUI.
 

Attachments

  • Construction.w3x
    24.7 KB · Views: 30
Last edited:
Level 6
Joined
Dec 31, 2017
Messages
138
If you are willing to keep blighted trees in the game, you can use something like this:
  • Town Hall
    • Events
      • Unit - A unit Begins construction
    • Conditions
      • (Unit-type of (Constructing structure)) Equal to Town Hall ++
    • Actions
      • Custom script: local real x
      • Custom script: local real y
      • Set Temp_Point = (Position of (Constructing structure))
      • Custom script: set x = GetLocationX (udg_Temp_Point)
      • Custom script: set y = GetLocationY (udg_Temp_Point)
      • Wait 0.00 seconds
      • Unit - Create 1 Dummy for (Owner of (Constructing structure)) at Temp_Point facing Default building facing degrees
      • Unit - Remove (Constructing structure) from the game
      • Unit - Add Build Town Hall (Dummy) to (Last created unit)
      • Custom script: call IssuePointOrderById (GetLastCreatedUnit(), 852619 , x, y)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_Temp_Point)
"Town Hall ++" is just a copy of "Town Hall" given to the worker instead.
Build Town Hall is ability based on "Build Tiny..." ability.

On the downside, it has lag that probably can't be dealt with (even if you relocate worker properly).
 
Last edited:
Level 20
Joined
Nov 20, 2005
Messages
1,178
If you are willing to keep blighted trees in the game, you can use something like this:
  • Town Hall
    • Events
      • Unit - A unit Begins construction
    • Conditions
      • (Unit-type of (Constructing structure)) Equal to Town Hall ++
    • Actions
      • Custom script: local real x
      • Custom script: local real y
      • Set Temp_Point = (Position of (Constructing structure))
      • Custom script: set x = GetLocationX (udg_Temp_Point)
      • Custom script: set y = GetLocationY (udg_Temp_Point)
      • Wait 0.00 seconds
      • Unit - Create 1 Dummy for (Owner of (Constructing structure)) at Temp_Point facing Default building facing degrees
      • Unit - Remove (Constructing structure) from the game
      • Unit - Add Build Town Hall (Dummy) to (Last created unit)
      • Custom script: call IssuePointOrderById (GetLastCreatedUnit(), 852619 , x, y)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_Temp_Point)
"Town Hall ++" is just a copy of "Town Hall" given to the worker instead.
Build Town Hall is ability based on "Build Tiny..." ability.

On the downside, it has lag that probably can't be dealt with (even if you relocate worker properly).
mmmmhhhhh!! thanks but i'll use the path replacement. Seems more fit with what i want to do.
 
Level 20
Joined
Nov 20, 2005
Messages
1,178
This only works for the Lordaeron Tree model, if you want to use a different one then check in ReplaceableTextures folder to find the path. example :

ReplaceableTextures\AshenvaleTree\AshenTree.blp
ReplaceableTextures\AshenvaleTree\AshenTreeBlight.blp
I managed to make it work, but in game it displays the tree with black squares around its branches, like something has gone wrong. Any tips?

EDIT: Sorry for double post.
 
Level 20
Joined
Nov 20, 2005
Messages
1,178
Maybe something is wrong with the path? I'm not really sure. What type of tree are trying to replace by the way?
The LordaeronSnowTree or something like that. I tracked down its path through Viewer, extracted it, jpg-ed it, tga-ed it, blp-ed it and reimported it in the editor with what seemed to be the blighted tree path in the viewer. The model displays correctly, but around its layers of leafs it's got black edged squares.
 
Level 39
Joined
Feb 27, 2007
Messages
5,013
I tracked down its path through Viewer, extracted it, jpg-ed it, tga-ed it, blp-ed it and reimported it in the editor with what seemed to be the blighted tree path in the viewer. The model displays correctly, but around its layers of leafs it's got black edged squares.
You lost the transparency (alpha) layer. Probably when you converted it to a JPG, or you used a TGA format that didn't have an alpha channel. Properly preserve that channel throughout the process and the black should disappear.
 
Level 20
Joined
Nov 20, 2005
Messages
1,178
Why would you do that exactly? You could've simply export it as it is, rename it to LordaeronSnowTreeBlight.blp, import it to your map and change the path to ReplaceableTextures\LordaeronTree\LordaeronSnowTreeBlight.blp and that's it.
Didn't seem to find any function to save it directly as blp? I only found extract BMP......

EDIT: I extracted the blp as bmp then just re-converted it to blp using, all from Viewer. It's working. The tree doesn't show any anomalies. Thank you, Warseeker!
For everyone that helped me with triggers, thank you very much too! But for what i need, the best and hassle-free solution for me was the blp overwriting. Problem solved.
 
Last edited:
Status
Not open for further replies.
Top