Posted: Sat Mar 19, 2016 3:54 pm Post subject:
Global Tint or fog [RA2/YR]
Subject description: V 1.0?
Tint or Fog
RULES:
Code:
---Add in BuildingsType list:
xxx=AMBIENTE_M
---Add in animations list
xxx=COLOR_VERDE
;>>>>>>>>>>>>>>>>>>>
[AMBIENTE_M]
Name=Tinte del Mapa
Image=AMBIENTE_VERDE ; for easy change of the color for each map
Insignificant=yes
Selectable=no
InvisibleInGame=yes
Strength=6000
Armor=wood
TechLevel=-1
Nominal=yes
Sight=0
Points=30
Power=0
Crewed=yes
Explosion=
MaxDebris=1
ThreatPosed=0
DamageParticleSystems=SparkSys,LGSparkSys
Powered=true
Important:
1.- insert the file "agbiente_m.shp" in a Mix file for the see the file in editor.
2.- caution with the ramps...
3.- for more colors, only change the color of the "CGLOR_VERDE.shp" or make a new palette (better) and change inside of the map file:
[COLOR_VERDE]
NewTheater=yes ;redundant
Normalized=yes ;useless
LoopStart=0 ;useless
LoopEnd=7 ;wrong (has only 2 frames)
LoopCount=-1 ;redundant
Rate=280 ;bad value, because it causes unnecessary stress for the engine
Layer=air
Shadow=no ;yet you gave the SHP a second shadow frame
DemandLoad=true
Translucency=50
better would be
[COLOR_VERDE]
Start=0
End=0
Rate=0 ;the game will never change the frame, thus always play the first one (no need for any frame cycle and frame loading, thus better performance)
Layer=air
DemandLoad=true
Translucency=50
and then give the SHP only 1 single frame
Start and End can be also removed as 0 is their default value.
Though you could create 1 SHP with different colors on different frames and then just set for example Start=0 for green fog, Start=1 for brown fog, Start=2 for red etc.
So the game has to load only 1 SHP for all the different fog effects.
Though using this on a bigger map causes a lot of lag due to the many big transparent anims.
I wouldn't advise using such a logic. At least not for a global map effect.
Better make the image with an irregular shape (like a cloud) using a dither effect on the border for a small fade out effect.
Then place this fog effect only on a few selected places. _________________ SHP Artist of Twisted Insurrection: Nod buildings
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum