Fog clearer to be removed in 1.15?

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
User avatar
Gwledig
Posts: 569
Joined: March 30th, 2009, 5:10 pm
Location: UK

Fog clearer to be removed in 1.15?

Post by Gwledig »

Hi I am nearing the end of the first major update of my MP mods for 1.14 and I notice in the logs, that fog clearer unit type is mentioned as being removed in 1.15

Code: Select all

20190713 12:29:01 error deprecation: Fog Clearer has been deprecated and will be removed in version 1.15.0.
I use the type fog clearer to create/recruit units on the fly in MP scenarios, so the unit type=fog clearer, I then apply a custom image to the recruit menu and to the actual unit's sprite/image e.g.

Code: Select all

message=_ "&"+"units/human-outlaws/outlaw+female-attack2.png~RC(magenta>red)"+"="+"Gunman - 1 Gold
and for the sprite

Code: Select all

overlays="units/human-outlaws/outlaw+female-attack2.png~RC(magenta>red)"
If you want to see a full recruit example -

Code: Select all

[option]
message=_ "&"+"units/human-outlaws/outlaw+female-attack2.png~RC(magenta>red)"+"="+"Gunman - 1 Gold
HP: 20
Rifle : discharge a ranged rifle weapon to destroy an enemy
Grenade: can cast a grenade (2 radius damage allies can be damaged)
10-2 Damage
7 Movement"
[command]
[if]
[variable]
name=gold
greater_than_equal_to=1
[/variable]
[then]
[gold]
amount=-1
side=$side_number
[/gold]
[unit]
role=Rifle
overlays="units/human-outlaws/outlaw+female-attack2.png~RC(magenta>red)"
unrenamable=yes
zoc=yes
level=1
description=A Pioneer citizen
type=Fog Clearer
name=Gunman
side=$side_number
x=$x1
y=$y1
random_traits=no
upkeep=loyal
race=human
flies=false
[/unit]
[object]
silent=yes
[filter]
x=$x1
y=$y1
[/filter]
[effect]
apply_to=remove_attacks
range=ranged
[/effect]
[effect]
apply_to=remove_attacks
range=melee
[/effect]
[effect]
apply_to=new_attack
range=melee
type=blade
description="blade"
icon="attacks/dagger-human.png"
damage=10
number=2
remove_Specials=backstab
remove_specials=berserk
remove_specials=charge
remove_specials=drain
remove_specials=firststrike
remove_specials=magical
remove_specials=marksman
remove_specials=plague
remove_specials=poison
remove_specials=slow
remove_specials=petrify
remove_specials=swarm

[/effect]
[effect]
apply_to=attack
[set_specials]
mode=append
{WEAPON_SPECIAL_BERSERK}
[/set_specials]
[/effect]
[effect]
apply_to=remove_ability
[abilities]
{ABILITY_EXTRA_HEAL}
{ABILITY_AMBUSH}
{ABILITY_CURES}
{ABILITY_HEALS}
{ABILITY_ILLUMINATES}
{ABILITY_LEADERSHIP_LEVEL_1}
{ABILITY_LEADERSHIP_LEVEL_2}
{ABILITY_LEADERSHIP_LEVEL_3}
{ABILITY_LEADERSHIP_LEVEL_4}
{ABILITY_LEADERSHIP_LEVEL_5}
{ABILITY_NIGHTSTALK}
{ABILITY_REGENERATES}
{ABILITY_SKIRMISHER}
{ABILITY_STEADFAST}
{ABILITY_SUBMERGE}
{ABILITY_TELEPORT}
[/abilities]
[/effect]
[effect]
apply_to=new_ability
[abilities]
{ABILITY_RANGED_RIFLE}
{ABILITY_RANGED_GRENADE}
[/abilities]
[/effect]
[effect]
apply_to=hitpoints
set_total=20
set=20
[/effect]
[effect]
apply_to=movement
set=7
[/effect]
[effect]
apply_to=resistance
replace=true
[resistance]
blade=100
[/resistance]
[/effect]
[effect]
apply_to=movement_costs
replace=yes
[movement_costs]
deep_water=100
shallow_water=3
reef=2
swamp_water=3
flat=1
sand=1
forest=2
hills=2
mountains=3
village=1
castle=1
ruin=1
cave=2
frozen=1
unwalkable=100
impassable=100
fungus=2
[/movement_costs]
[/effect]
[effect]
apply_to=defense
replace=yes
[defense]
shallow_water=80
reef=70
swamp_water=80
flat=60
sand=50
forest=50
hills=50
mountains=40
village=40
castle=40
cave=60
frozen=80
fungus=50
[/defense]
[/effect]
[effect]
apply_to=movement_costs
replace=yes
[movement_costs]
sand=1
frozen=1
[/movement_costs]
[/effect]
[effect]
apply_to=defense
replace=yes
[defense]
sand=50
frozen=60
[/defense]
[/effect]
[/object]
[store_unit]
[filter]
x=$x1
y=$y1
[/filter]
kill=yes
variable=tempstore
[/store_unit]
{VARIABLE tempstore.moves 1}
{VARIABLE tempstore.alignment neutral}
{VARIABLE tempstore.max_experience 1000}
[unstore_unit]
variable=tempstore
[/unstore_unit]
{CLEAR_VARIABLE tempstore}
[/then]
[else]
[message]
side_for=$side_number
message=_ "Insufficient Funds"
speaker=narrator
[/message]
[/else]
[/if]
[/command]
[/option]
So I was wondering does anyone know if fog clearer will be replaced with some other similar unit type? I'm guessing there may be another way of doing this, it's a long time since I started using fog clearer for these kind of units (about 2010 I think) so I'm a bit rusty on the alternative options I may have explored in the past but any ideas would be appreciated...
Maintainer of Conquest (Original Gameplay), Conquest+, Conquest+ Space/Ranged, Chaoz Battle of the Wizards, Lazersquad (squad game), WesCraft (building MP game)
User avatar
Ravana
Forum Moderator
Posts: 3004
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Fog clearer to be removed in 1.15?

Post by Ravana »

It will not be actually removed https://github.com/wesnoth/wesnoth/blob ... rer.cfg#L7
# important note:
# While this unit is no longer used for clearing fog since r53779 meaning it's no longer used in mainline at all,
# it would be a bad idea to remove it, since addon multiplayer scenarios may rely heavily on it. (Due to the fact that the wesnoth
# engine does not transfer units over the network.) I know at least one addon (mine) which would be broken heavily, so
# PLEASE DON'T DO THIS!
User avatar
Gwledig
Posts: 569
Joined: March 30th, 2009, 5:10 pm
Location: UK

Re: Fog clearer to be removed in 1.15?

Post by Gwledig »

Whilst I'm at it, does anyone know what is happening with [leadership] can we still use [leadership] in our own macros, or is the entire thing being removed as well as the {LEADERSHIP macro?
Maintainer of Conquest (Original Gameplay), Conquest+, Conquest+ Space/Ranged, Chaoz Battle of the Wizards, Lazersquad (squad game), WesCraft (building MP game)
User avatar
Gwledig
Posts: 569
Joined: March 30th, 2009, 5:10 pm
Location: UK

Re: Fog clearer to be removed in 1.15?

Post by Gwledig »

that's a relief thanks Ravana
Maintainer of Conquest (Original Gameplay), Conquest+, Conquest+ Space/Ranged, Chaoz Battle of the Wizards, Lazersquad (squad game), WesCraft (building MP game)
User avatar
Ravana
Forum Moderator
Posts: 3004
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Fog clearer to be removed in 1.15?

Post by Ravana »

Leadership change means that if you want to have leadership level different than unit level, you need custom [leadership] instead of using core macro.
User avatar
Gwledig
Posts: 569
Joined: March 30th, 2009, 5:10 pm
Location: UK

Re: Fog clearer to be removed in 1.15?

Post by Gwledig »

thanks Ravana I wasjust trying this and managed to get a custom one for each level... one more odd thing out of the log!
Maintainer of Conquest (Original Gameplay), Conquest+, Conquest+ Space/Ranged, Chaoz Battle of the Wizards, Lazersquad (squad game), WesCraft (building MP game)
Post Reply