• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

How to add double XP at night, but not on Bloodmoon night

I want to add double XP for non-Bloodmoon nights without effecting the xp on Bloodmoon nights.  I'm using the code below to double XP for nights (all props to DarkAoRaidenX), but I can't figure out how to exclude Bloodmoon nights.  I've tried to add a requirement for <requirement name="IsBloodMoon" operation="LT" value="1"/> and have tried to add a separate buff using <requirement name="IsBloodMoon" /> and perc_subtract = 2 (thinking this will divide the xp by 2, but not sure) but both gave me errors when I killed a zombie.  Any help/pointers is much appreciated.

buffs.xml

        <buff name="buffNightExpBoost" hidden="true">
            <stack_type value="ignore"/>
            <effect_group>
                <requirement name="IsNight"/>
                <passive_effect name="PlayerExpGain" operation="perc_add" value="2" tags="Kill" />
            </effect_group>
        </buff>






entityClasses.xml

Code:
    <append xpath="/entity_classes/entity_class[@name='playerMale']">
        <effect_group>
            <triggered_effect trigger="onSelfEnteredGame" action="AddBuff" target="self" buff="buffNightExpBoost"/>
            <triggered_effect trigger="onSelfRespawn" action="AddBuff" target="self" buff="buffNightExpBoost"/>
        </effect_group>  
    </append>
 
Last edited by a moderator:
Maybe try adding

<requirement name="!IsBloodMoon" />


to that buff effect group? The ! inverts it and would mean "Is not Bloodmoon". Not sure if it will work, but can try. :)

 
Do note that a bloodmoon check will cause NREs on clients in MP. Dont think that's been fixed yet by tfp.

 
Ah, that may be the problem, I'm updating a dedicated server and playing co-op with others.

Do you guys know if there is a different way to check for BloodMoon night that works with multiplayer?

 
Back
Top