• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Change Terrain type into another ingame and making it look like it is natural. (Like Blight)

Status
Not open for further replies.
Level 30
Joined
Mar 14, 2014
Messages
1,213
So i make it simple:

You know of the Blight ability of the undead buildings right?

Well i want to recreate that by using normal triggers and while still maintaining the original blight.

While i did make it to the point of making it like the blight the problem is that it isn't natural.

Here is a Picture of what i mean:

OutlandBlight.png

As you can see this isn't natural at all. I want it to look like the Blight does.

Which is like this:

Blight.PNG

So? Any help?
 
Level 18
Joined
Oct 17, 2012
Messages
847
  • INF Example
    • Events
    • Conditions
    • Actions
      • Custom script: local TerrainInfection this
      • -------- ---------------- ---------------- ---------------- --------
      • -------- ---------------- ---------------- ---------------- --------
      • -------- -------------------------------- ---------------- CONFIG BEGINS-------------------------------- ---------------- --------
      • -------- Where infection BEGINS --------
      • -------- ---------------- ---------------- ---------------- --------
      • Set INF_StartLocation = (Center of (Playable map area))
      • -------- ---------------- ---------------- ---------------- --------
      • -------- How FAR from START LOCATION does infection spread --------
      • -------- ---------------- ---------------- ---------------- --------
      • Set INF_Radius = 1000.00
      • -------- ---------------- ---------------- ---------------- --------
      • -------- The LIKELINESS of infecting nearby tiles --------
      • -------- Values must be between ZERO and ONE --------
      • -------- ---------------- ---------------- ---------------- --------
      • Set INF_Chance = 1.00
      • -------- ---------------- ---------------- ---------------- --------
      • -------- How OFTEN infection spreads --------
      • -------- ---------------- ---------------- ---------------- --------
      • Set INF_Interval = 1.00
      • -------- ---------------- ---------------- ---------------- --------
      • -------- Should infection spread DIAGONALLY or NOT --------
      • -------- ---------------- ---------------- ---------------- --------
      • Set INF_Diagonal = False
      • -------- ---------------- ---------------- ---------------- --------
      • -------- Terrain that SPREADS --------
      • -------- ---------------- ---------------- ---------------- --------
      • Set INF_TerrainType = Barrens - Pebbles
      • -------- -------------------------------- ---------------- END OF CONFIG -------------------------------- ---------------- --------
      • -------- ---------------- ---------------- ---------------- --------
      • -------- ---------------- ---------------- ---------------- --------
      • -------- -------------------------------- ---------------- START TERRAIN SPREADING -------------------------------- ---------------- --------
      • Custom script: set this = CreateTerrainInfection(udg_INF_TerrainType, GetLocationX(udg_INF_StartLocation), GetLocationY(udg_INF_StartLocation), udg_INF_Chance, udg_INF_Interval)
      • Custom script: set this.maxDistance = udg_INF_Radius
      • Custom script: set this.diagonal = udg_INF_Diagonal
      • -------- -------------------------------- ---------------- THE END OF SPREAD START -------------------------------- ---------------- --------
      • -------- ---------------- ---------------- ---------------- --------
      • -------- ---------------- ---------------- ---------------- --------
      • -------- -------------------------------- ---------------- EXTRA CONFIG -------------------------------- ---------------- --------
      • -------- ALLOW a terrain type to RESIST infection --------
      • -------- allow as MANY as you like for this SPECIFIC infection --------
      • -------- ---------------- ---------------- ---------------- --------
      • Set INF_EnableResistor = True
      • -------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------------- --------
      • Set INF_TerrainTypeResistor = Northrend - Snow
      • Custom script: call this.enableResistor( udg_INF_TerrainType, udg_INF_TerrainTypeResistor, udg_INF_EnableResistor)
      • -------- ---------------- ---------------- ---------------- --------
      • Set INF_TerrainTypeResistor = Northrend - Snow
      • Custom script: call this.enableResistor( udg_INF_TerrainType, udg_INF_TerrainTypeResistor, udg_INF_EnableResistor)
      • -------- ---------------- ---------------- ---------------- --------
      • -------- can also DISALLOW a PREVIOUSLY ALLOWED terrain type to RESIST infection --------
      • -------- ANY time in the FUTURE or NOW --------
      • -------- ---------------- ---------------- ---------------- --------
      • Set INF_EnableResistor = False
      • -------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------------- --------
      • Set INF_TerrainTypeResistor = Northrend - Snow
      • Custom script: call this.enableResistor( udg_INF_TerrainType, udg_INF_TerrainTypeResistor, udg_INF_EnableResistor)
      • -------- -------------------------------- ---------------- THE END OF EXTRA -------------------------------- ---------------- -------
 

Attachments

  • TI GUI Example.w3x
    48 KB · Views: 80
Level 30
Joined
Mar 14, 2014
Messages
1,213
Do you mind sending me the map? I have no clue how you have managed to bug out the tile blending like that and would like to investigate. It looks almost as if the tile type selected has solid boarder elements.

I can send you it, but it has a custom race in it which doesn't use any imported files, but uses a modified MPQ (I only added things) which has the files in it.

Which means that if you would open the map, then all the custom buildings except one wouldn't be visible along with some units.

Edit:
  • INF Example
    • Events
    • Conditions
    • Actions
      • Custom script: local TerrainInfection this
      • -------- ---------------- ---------------- ---------------- --------
      • -------- ---------------- ---------------- ---------------- --------
      • -------- -------------------------------- ---------------- CONFIG BEGINS-------------------------------- ---------------- --------
      • -------- Where infection BEGINS --------
      • -------- ---------------- ---------------- ---------------- --------
      • Set INF_StartLocation = (Center of (Playable map area))
      • -------- ---------------- ---------------- ---------------- --------
      • -------- How FAR from START LOCATION does infection spread --------
      • -------- ---------------- ---------------- ---------------- --------
      • Set INF_Radius = 1000.00
      • -------- ---------------- ---------------- ---------------- --------
      • -------- The LIKELINESS of infecting nearby tiles --------
      • -------- Values must be between ZERO and ONE --------
      • -------- ---------------- ---------------- ---------------- --------
      • Set INF_Chance = 1.00
      • -------- ---------------- ---------------- ---------------- --------
      • -------- How OFTEN infection spreads --------
      • -------- ---------------- ---------------- ---------------- --------
      • Set INF_Interval = 1.00
      • -------- ---------------- ---------------- ---------------- --------
      • -------- Should infection spread DIAGONALLY or NOT --------
      • -------- ---------------- ---------------- ---------------- --------
      • Set INF_Diagonal = False
      • -------- ---------------- ---------------- ---------------- --------
      • -------- Terrain that SPREADS --------
      • -------- ---------------- ---------------- ---------------- --------
      • Set INF_TerrainType = Barrens - Pebbles
      • -------- -------------------------------- ---------------- END OF CONFIG -------------------------------- ---------------- --------
      • -------- ---------------- ---------------- ---------------- --------
      • -------- ---------------- ---------------- ---------------- --------
      • -------- -------------------------------- ---------------- START TERRAIN SPREADING -------------------------------- ---------------- --------
      • Custom script: set this = CreateTerrainInfection(udg_INF_TerrainType, GetLocationX(udg_INF_StartLocation), GetLocationY(udg_INF_StartLocation), udg_INF_Chance, udg_INF_Interval)
      • Custom script: set this.maxDistance = udg_INF_Radius
      • Custom script: set this.diagonal = udg_INF_Diagonal
      • -------- -------------------------------- ---------------- THE END OF SPREAD START -------------------------------- ---------------- --------
      • -------- ---------------- ---------------- ---------------- --------
      • -------- ---------------- ---------------- ---------------- --------
      • -------- -------------------------------- ---------------- EXTRA CONFIG -------------------------------- ---------------- --------
      • -------- ALLOW a terrain type to RESIST infection --------
      • -------- allow as MANY as you like for this SPECIFIC infection --------
      • -------- ---------------- ---------------- ---------------- --------
      • Set INF_EnableResistor = True
      • -------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------------- --------
      • Set INF_TerrainTypeResistor = Northrend - Snow
      • Custom script: call this.enableResistor( udg_INF_TerrainType, udg_INF_TerrainTypeResistor, udg_INF_EnableResistor)
      • -------- ---------------- ---------------- ---------------- --------
      • Set INF_TerrainTypeResistor = Northrend - Snow
      • Custom script: call this.enableResistor( udg_INF_TerrainType, udg_INF_TerrainTypeResistor, udg_INF_EnableResistor)
      • -------- ---------------- ---------------- ---------------- --------
      • -------- can also DISALLOW a PREVIOUSLY ALLOWED terrain type to RESIST infection --------
      • -------- ANY time in the FUTURE or NOW --------
      • -------- ---------------- ---------------- ---------------- --------
      • Set INF_EnableResistor = False
      • -------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------------- --------
      • Set INF_TerrainTypeResistor = Northrend - Snow
      • Custom script: call this.enableResistor( udg_INF_TerrainType, udg_INF_TerrainTypeResistor, udg_INF_EnableResistor)
      • -------- -------------------------------- ---------------- THE END OF EXTRA -------------------------------- ---------------- -------

Thank you for translating it for me.


Edit 2:
Okay i experimented a bit:
1.This is the original Function, which look's like above:
  • Ground to Outland
    • Ereignisse
      • Einheit - A unit Vollendet den Bau
    • Bedingungen
      • (Unit-type of (Constructed structure)) Gleich Haupthaus (Magtheridon's Forces)
    • Aktionen
      • Umgebung - Change terrain type at (Position of (Constructed structure)) to Fremdland - Erde using variation -1 in an area of size 8 and shape Kreis
and this is the new trigger:

  • Ground to Outland
    • Ereignisse
      • Einheit - A unit Vollendet den Bau
    • Bedingungen
      • (Unit-type of (Constructed structure)) Gleich Haupthaus (Magtheridon's Forces)
    • Aktionen
      • Umgebung - Change terrain type at (Position of (Constructed structure)) to Fremdland - Helle Erde using variation -1 in an area of size 8 and shape Kreis
Which look's like this:

WC3ScrnShot_110917_181525_01.png

The Change is the tile in which the ground should change to.
The Problem is that the "Outland - Dirt" tile is marked as red.
The "Outland - Light/Bright Dirt" doesn't have the red box.

Explanation.PNG


So it isn't a trigger problem at all.
 
Last edited:
Level 18
Joined
Jun 13, 2016
Messages
580
AFAIK this is an issue with some tile types arising from the fact that not all terrain tiles have alpha in them.

When you change the order of tiles in WE, it determines the order in which they are drawn - so alphaless tiles are meant to be on the very bottom, and all the other tiles are painted over them. The alpha is used to create a nice border that you can see.

When there is no alpha in a tile, you have no border - and the offending tile simply overwrites whatever is underneath it.

When you add a tile in-game through triggers (that isn't already present in-game through WE), they become drawn on top of all other tiles - which causes this issue.

You can fix that by adding alpha to that tile, or using a different one.
 
Status
Not open for further replies.
Top