ellipse=no
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.
Re: ellipse=no
It works great! I like the id, and how removing the object to make the ellipse come back, but I especially like this part:
Code: Select all
[filter_location]
formula=keep
[/filter_location]
Author of:
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
Re: ellipse=no
You can filter by type of terrain too, In case you only want to remove the ellipse in winter keeps, but not in summer keeps, for exampleHelmet wrote: ↑December 24th, 2022, 6:35 amIt works great! I like the id, and how removing the object to make the ellipse come back, but I especially like this part:
No keeping track of x,y, which is great, because I often move things around on a map.Code: Select all
[filter_location] formula=keep [/filter_location]
Re: ellipse=no
I tried filtering by type of terrain and it worked. Now the Snowman can have an ellipse in non-frozen enemy keeps, if I want to do that.
Thanks, Toranks.
Code: Select all
[filter]
id=MyLeader
[filter_location]
terrain=Kha # <-- Snowy Human Castle Keep
#formula=keep
[/filter_location]
[/filter]
Author of:
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
- Celtic_Minstrel
- Developer
- Posts: 2222
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: ellipse=no
Does
If that doesn't work you would have to list out all the possibilities, like
terrain=K*a
work? If it does, that would match any snowy keep, not just a human one. (Assuming the terrain codes are consistently assigned.) For example, a snowy encampment, or a snowy orcish keep, or a snowy elven keep.If that doesn't work you would have to list out all the possibilities, like
terrain=Kha,Kea,Koa,Kva
, etc.- Atreides
- Posts: 1075
- Joined: March 30th, 2019, 10:38 pm
- Location: On the 2nd story of the centre village of Merwuerdigliebe turning the lights on and off
Re: ellipse=no
I've run into this with the Lonely Era!Celtic_Minstrel wrote: ↑December 24th, 2022, 5:44 pm Doesterrain=K*a
work? If it does, that would match any snowy keep, not just a human one. (Assuming the terrain codes are consistently assigned.) For example, a snowy encampment, or a snowy orcish keep, or a snowy elven keep.
If that doesn't work you would have to list out all the possibilities, liketerrain=Kha,Kea,Koa,Kva
, etc.
This was my solution:
Code: Select all
[filter_location]
terrain={SNOW_ICE_TERRAIN}
# terrain=Aa,Aa^*,Ha,Ms,Ms^*,Ai,Rrc^Vhca,Ha^Vhha,K*a,C*a last 2 are wrong, wildcard doesn't work like that
[/filter_location]
Code: Select all
#define SNOW_ICE_TERRAIN
Rra^*,A*^*,*^Esa,*^Feta,*^Fpa,*^Fda,*^Fma,Ha*^*,Ms*^*,*^Voa,*^Vea,*^Vha,*^Vhca,*^Vhha,*^Vca,*^Vla,*^Vaa,Cea^*,Coa^*,Cha^*,Cva^*,Cfa^*,Kea^*,Koa^*,Kha^*,Kva^*,Kfa^* #enddef
Re: ellipse=no
Thanks.Celtic_Minstrel wrote: ↑December 24th, 2022, 5:44 pm Doesterrain=K*a
work? If it does, that would match any snowy keep, not just a human one.
terrain=K*a
does work! Nifty solution. Thanks for sharing it!
Author of:
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
Re: ellipse=no
This is my version:
terrain=A*,Ms*,Ha*,Cea^*,Coa^*,Cha^*,Cva^*,Cfa^*,Kea^*,Koa^*,Kha^*,Kva^*,Kfa^*,Rra^*,*^Esa,*^Fpa,*^Feta,*^Fda,*^Fma,*^Voa,*^Vea,*^Vha,*^Vhca,*^Vhha,*^Vca,*^Vla,*^Vaa
- Atreides
- Posts: 1075
- Joined: March 30th, 2019, 10:38 pm
- Location: On the 2nd story of the centre village of Merwuerdigliebe turning the lights on and off
Re: ellipse=no
It does??? I did this under 1.14 where it definitely did not work. Now I wonder if this was an undocumented change in 1.16.Helmet wrote: ↑December 24th, 2022, 8:27 pmThanks.Celtic_Minstrel wrote: ↑December 24th, 2022, 5:44 pm Doesterrain=K*a
work? If it does, that would match any snowy keep, not just a human one.terrain=K*a
does work!
Re: ellipse=no
Maybe check the document for 1.17 -- that's what I'm using.
Author of:
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
Re: ellipse=no
I noticed something unexpected.Celtic_Minstrel wrote: ↑December 24th, 2022, 5:45 am [*]I added an ID to your[object]
tag so it can be removed later.
[*]Instead of adding an object to put the ellipse back, this version removes the object that made the ellipse go away. using[remove_object]
. Since the default state is to have an ellipse (because the unit type definition says so), that'll cause the ellipse to come back.
[/list]
When my leader moves out of his keep, he loses his Leadership ability. The ability was given at unit creation within side WML.
Code: Select all
...
color=white
[abilities]
{ABILITY_LEADERSHIP}
[/abilities]
income=-2
...
I read about
[allow_undo]
in the Wiki. Is there a downside to using [allow_undo]
in this situation, to allow the Leader's move on/off his keep to be undone? It seems safe to me, but I thought I should ask. Also, how does one use [allow_undo]
?Author of:
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
- Atreides
- Posts: 1075
- Joined: March 30th, 2019, 10:38 pm
- Location: On the 2nd story of the centre village of Merwuerdigliebe turning the lights on and off
Re: ellipse=no
Ah, that seems to explain it. By coincidence I discovered last night that in 1.16
Code: Select all
terrain=*C*,*K*
Looks like an upgrade is coming in 1.18 if the beta version works differently.
- Celtic_Minstrel
- Developer
- Posts: 2222
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: ellipse=no
I haven't heard anything about changes to how terrain globs work, but it's possible something was changed that I don't know about, or even "by accident".
(Note: The
The correct way to add an ability in unit WML is to format it as an object:
You shouldn't add arbitrary things in unit WML like that, because they will disappear whenever the unit is rebuilt. Adding and removing an object is just one way that could happen – he would have also lost the ability if he simply levelled up (assuming he has an advancement).Helmet wrote: ↑December 26th, 2022, 8:49 pm When my leader moves out of his keep, he loses his Leadership ability. The ability was given at unit creation within side WML.
Code: Select all
... color=white [abilities] {ABILITY_LEADERSHIP} [/abilities] income=-2 ...
(Note: The
[side]
tag accepts unit WML which will describe the side leader, so even though it's in the [side]
tag, that code is still unit WML, not side WML.)The correct way to add an ability in unit WML is to format it as an object:
Code: Select all
[modifications]
[object]
[effect]
apply_to=new_ability
{ABILITY_LEADERSHIP}
[/effect]
[/object]
[/modifications]
Re: ellipse=no
Thanks for the explanation. I have a tendency to think that if something works, then it must be fine, but recently most of my mistakes have been writing code that seems to work, but actually causes weird problems that are difficult for me to debug.Celtic_Minstrel wrote: ↑December 26th, 2022, 10:44 pm The correct way to add an ability in unit WML is to...
Author of:
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.