Trying to add holy blood in Lex Talionis

Hi, I’m working on a project in Lex Talionis and I want to use a custom field called Holy_blood (like in Genealogy of the Holy War). I used the Unit Editor to add that field to all my units, with values ​​like ‘Hanon’, ‘None’, etc.
I’m trying to access the field in a global_event, with something like:
if;unit.get_field(‘holy_blood’) == ‘Hanon’
Alert;{unit.name} has holy blood of Hanon
End

But I get this error:
event_processor: ‘NoneType’ object has no attribute ‘get_field’

I also tried using unit.holy_blood, but that gave me an error unless all units had the field (which I already checked).
Is there a secure way to access custom unit fields in global events?
Am I doing something wrong?

“‘NoneType’ object has no attribute ‘get_field’” means it’s not recognizing the unit as a unit object. Which kind of event (which trigger) are you using? “unit” may not be an available parameter.

A screenshot of the event could probably help a lot.


Everyone has holy blood (even the bosses)


and this event global, It seems that holy blood does not exist, because I always get the alert

the field is holy_blood, not holy_blood_hanon

you got ambushed by a typo

That, and it would need quotation marks. So your if statement would be
if;unit.get_field(‘holy_blood’) == ‘Hanon’
Like you said in your first post

I already tried it but I still get the same error, I even tried just searching for a specific unit, and nothing

What does the entire window for the event look like? There might be something wrong with which trigger you’re using for the event itself

The trigger is “none”, maybe I’m doing everything wrong

How are you calling the event? Because yeah, None as the trigger wont do anything because literally nothing is triggering it. Unless youre calling it from an item or skill which it sounds like it isnt the case
Follow up question is what exactly are you checking holy blood for? If its for a skill or item effects or something, you might not even need to set up an event depending on what you want to end up doing
(Also, may i also recommend joining the LT-Maker discord? You’ll be able to get in touch easier with more LT users and probably get faster responses)

1 Like

Check if the engine can check if someone has holy blood (regardless of which it is)

That is very vague tbh.
Still, the best way to check if your if statment is working is to just put in the if statment in the intro event of the DEBUG level (its the one with the level_start trigger) and see if it triggers by accessing the level with the Test Current Level option
Like i said, what you describe is very vague, so im not really sure how to help beyond that
I guess my next follow up question is this: once the game detects a unit has holy blood, what do you want the game to do with that information? Like, is this for displaying in the status menu? Something regarding growth rates and/or base stats? Just checking for holy blood doesnt tell me what you want to do with that specifically

Why “very vague”? (I’ve been using the engine again for a month now, there are things I don’t remember.)Before adding exclusive abilities, weapons, and maybe growth bonuses, I think I should see if the engine know that “holy blood” exists.(Later I moved the event to the debug chapter)
Answering your question, yes, something similar to how holy blood works in FE4 (growth rates and/or base stats, etc.)

It was vague because i didnt know what you were trying to do beyond the check.
And with how you’re trying to implement it, maybe using tags would make things easier? Like, have skills and items be only accessible to units with the correct holy blood tag. For example, by having the Eval Available item component on a weapon, you could put in something like ‘Hanon’ in unit.tags to check if that unit has that tag
You can do this with the growths and bases as well. Just have those be skills with the proper bonuses that would check for the proper tags

I will try adding labels later and see if it works.

1 Like

I tried with labels, but it still shows up as “none type” (I’m going to have nightmares with the none type)

what did you type for your if statement? because it should be something like

'HolyBlood' in unit.tags

to check if the unit has the tag HolyBlood

I tried with “if;unit.tags and ‘holy_Hanon’” “if;unit.tags ‘holy_Hanon’” “if unit.tags and ‘holy_Hanon’ in unit.tags”

yeah, it would be in the format from my last post, that’s probably why it’s not working so:

if;'HolyBlood' in unit.tags

just to be more clear

The same thing happens to me, at this point I wonder if it’s because of the engine version I have.

what does the event look like? (screenshots REALLY help for this sort of thing for like EVERY step of trying to debug the problem)