Why the hell cant l change the effects of "fearless" trait?
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.
- AxalaraFlame
- Posts: 690
- Joined: December 4th, 2011, 1:07 pm
- Location: Pasadina, Caltech
Why the hell cant l change the effects of "fearless" trait?
Could someone help me about this? l searched over all codes but my efforts are vain. Why cant l find it?
Re: Why the hell cant l change the effects of "fearless" tra
Because the effects of that trait are hardcoded, i.e. in the source code (written in C++).
Co-Creator of The Fellowship of the Clay (BfW 1.10) ~~ Maintainer of the German Code of Conduct
How to isolate problematic WML code ~~ WML error messages and their reasons
How to isolate problematic WML code ~~ WML error messages and their reasons
- AxalaraFlame
- Posts: 690
- Joined: December 4th, 2011, 1:07 pm
- Location: Pasadina, Caltech
Re: Why the hell cant l change the effects of "fearless" tra
how can l decipher it? it should not be too hard
Re: Why the hell cant l change the effects of "fearless" tra
I'm not sure what you mean with "decipher" - it's part of the game engine, and you'd need some advanced C++ programming knowledge to mess around with it.
I don't know what you want to do with the fearless trait, so I don't know whether there're WML/Lua workarounds possible.
I don't know what you want to do with the fearless trait, so I don't know whether there're WML/Lua workarounds possible.
Co-Creator of The Fellowship of the Clay (BfW 1.10) ~~ Maintainer of the German Code of Conduct
How to isolate problematic WML code ~~ WML error messages and their reasons
How to isolate problematic WML code ~~ WML error messages and their reasons
- AxalaraFlame
- Posts: 690
- Joined: December 4th, 2011, 1:07 pm
- Location: Pasadina, Caltech
Re: Why the hell cant l change the effects of "fearless" tra
well, l want to make an ability and define its effect as the same as "fearless" trait; thus, a unit can become fearless in a certain level, without having to had this trait inherently.
and decipher means decode
and decipher means decode
- Drakefriend
- Posts: 436
- Joined: September 27th, 2009, 12:57 pm
- Location: Wandering from one world to another
- Contact:
Re: Why the hell cant l change the effects of "fearless" tra
As far as I know, if you want a unit to have a trait x automaticly, you write "TRAIT_X_MUSTHAVE" into the cfg. If ypu level into unit with an obligatory trait, it is added besides the preexisting traits. as is the case with liches (two from human + Undead from undead). So you probably do not need to modify the trait.
After far too long an absence, I have returned.
According to the quiz 100% Silver Mage (85% Archmage, 75% Shyde, 67% Flameheart and Ancient Wose,58% Assassin, Troll Warrior and Berserker). And my top score is exactly how I see myself.
According to the quiz 100% Silver Mage (85% Archmage, 75% Shyde, 67% Flameheart and Ancient Wose,58% Assassin, Troll Warrior and Berserker). And my top score is exactly how I see myself.
- AxalaraFlame
- Posts: 690
- Joined: December 4th, 2011, 1:07 pm
- Location: Pasadina, Caltech
Re: Why the hell cant l change the effects of "fearless" tra
oh my! really? if that, l will test it this saturday. recently l am really busy.
my idea is: paladin shall be fearless
my idea is: paladin shall be fearless
- AxalaraFlame
- Posts: 690
- Joined: December 4th, 2011, 1:07 pm
- Location: Pasadina, Caltech
Re: Why the hell cant l change the effects of "fearless" tra
oh guys l got problems again: a trait can not be added to a kind of unit at a certain level. Traits are inherent, which means l can make a inherently fearless paladin by recruiting him, but l can't make a knight level up to be a fearless paladin
Re: Why the hell cant l change the effects of "fearless" tra
I believe you can include traits in a unit's .cfg file, in which case all units of that type, regardless of where they come from will have the trait.
You can also use [modify_unit] to assign traits.
You can also use [modify_unit] to assign traits.
Nothing is true; everything is permissible.
- AxalaraFlame
- Posts: 690
- Joined: December 4th, 2011, 1:07 pm
- Location: Pasadina, Caltech
Re: Why the hell cant l change the effects of "fearless" tra
Yep l know how to change those stuff and know how [modify] sentense works, but that is used in campaigns and for temporary adjustments; a units still can't get an additional trait when leveled up something.
But there is an exception: lich. lich has three traits because when an adept leveled up a lich, its race got transfered and got inherent "undead" trait. For paladins and other units l wanna expand, this adjustment is juts useless
But there is an exception: lich. lich has three traits because when an adept leveled up a lich, its race got transfered and got inherent "undead" trait. For paladins and other units l wanna expand, this adjustment is juts useless
- Alarantalara
- Art Contributor
- Posts: 786
- Joined: April 23rd, 2010, 8:17 pm
- Location: Canada
Re: Why the hell cant l change the effects of "fearless" tra
If you want a unit type to always have a trait, then add the trait to its unit_type definition and make sure it is marked as "availability=musthave"
Conveniently, there is already a macro for the fearless trait: TRAIT_FEARLESS_MUSTHAVE
Also, moved to WML workshop
Conveniently, there is already a macro for the fearless trait: TRAIT_FEARLESS_MUSTHAVE
Also, moved to WML workshop
- AxalaraFlame
- Posts: 690
- Joined: December 4th, 2011, 1:07 pm
- Location: Pasadina, Caltech
Re: Why the hell cant l change the effects of "fearless" tra
sorry, l dont really get your point. can u explain that futher with details? l am only a player who know a little about those stuff
Re: Why the hell cant l change the effects of "fearless" tra
Try putting
{TRAIT_FEARLESS_MUSTHAVE}
in the unit's [unit_type]
tag.- AxalaraFlame
- Posts: 690
- Joined: December 4th, 2011, 1:07 pm
- Location: Pasadina, Caltech
Re: Why the hell cant l change the effects of "fearless" tra
Yes I tried it, but l still can't level a knight (with two normal traits) to a paladin withnthree traits. This effect is just like the effect to bats, {must_have_feral}. They can be conscripted but not leveled up to be someone.
Re: Why the hell cant l change the effects of "fearless" tra
You could try creating a custom race, used only for the Paladin unit, which is identical to human except with three traits (including the compulsory Fearless)
Alternatively, give the Paladin a modified version of the Illuminate ability, which affects only himself and works only at night (thus eliminating the night-time penalty, but not affecting adjacent units or providing any benefit at other times of day). Functionally this is the same as Fearless, except that it is implemented as an ability rather than a trait.
I haven't tested this so it may not work like it's supposed to, but it looks right to me.
Alternatively, give the Paladin a modified version of the Illuminate ability, which affects only himself and works only at night (thus eliminating the night-time penalty, but not affecting adjacent units or providing any benefit at other times of day). Functionally this is the same as Fearless, except that it is implemented as an ability rather than a trait.
Code: Select all
#define FEARLESS_PALADIN_HACK
[illuminates]
id=fearless_hack
value=25
max_value=25
cumulative=no
name= _ "fearless"
female_name= _ "female^fearless"
description= _ "Fearless:
This unit does not receive a damage penalty for fighting at night."
affect_self=yes
[filter_self]
[filter_location]
time_of_day=chaotic
[/filter_location]
[/filter_self]
affect_adjacent=no
[/illuminates]
#enddef
Nothing is true; everything is permissible.