Jump to content

EFM (LUA Assistance Needed)


lance789

Recommended Posts

Before i ask for help i think i should give a brief understanding of the mod. The mod adds new foods and recipes to PZ with varying status ailments, also alters some existing items since i've read modded scripts overwrite existing vanilla items (or at least i hope its still doing this).

For example:

    item Biscuit        {            HungerChange        =    -10,            Type                =    Food,            DisplayName            =    Biscuit,            Weight                =    0.1,            IsCookable            =    False,            ThirstChange        =    5,            FatigueChange        =    1,            StressChange        =    -5,            BoredomChange        =    -5,            Icon                =    EFM_BLANK.png,            DaysFresh            =    2,            DaysTotallyRotten    =    5,        }                        recipe Make Biscuits                          {                            Dough,                            keep BakingPan,                            Butter,                            keep HuntingKnife/KitchenKnife/ButterKnife,                                                        Result:Biscuit=8,                            Time:30.0,                        }



With this, i have gotten pretty much all these working just fine (even though time between cooked/burnt is a bit wonky >.>'' ) but for the most part does work.However, there are some items i'm attempting to mod into the game that requires a bit more... data? Here is one of them:


For example:

[ Scrip Content ]    item ChickenRamenBowl        {            HungerChange        =    -20,            Type                =    Food,            DisplayName            =    Chicken Flavoured Ramen,            IsCookable            =    FALSE,            DaysTotallyRotten    =    7,            UnhappyChange        =    25,            FatigueChange        =    -15,            StressChange        =    -2.0,            Icon                =    EFM_BLANK,            ReplaceOnUse        =    Bowl/Fork,            DaysFresh            =    4,            BoredomChange        =    +4,        }                    recipe Make Ramen Chicken Flavor                        {                            ChickenRamenPot,                            Bowl=3,                            Fork=3,                            Result:ChickenRamenBowl=3,                            Time:20.0,                        }                    recipe Make Bowl of Ramen Chicken Flavor                        {                            RamenBowl,                            Chicken,                            keep KitchenKnife,                            Fork,                            Result:ChickenRamenBowl,                            Time:35.0,                        }[ LUA Content ]function ChickenRamenBowl_OnCreate (a, b, c, d, result)    player = getPlayer();    cookinglevel = player:getPerkLevel(Perks.Cooking);    if cookinglevel >= 3 then        result:setName("+Bowl of Chicken Ramen");        result:setHungChange(result:getHungChange()*1.5);    endend





With this item, i'm trying to incorporate a system that will call for the Player's perk level to either boost or reduce specific effects of using certain items, but there are several things i'm missing here. I need the code or file that contains data related to getPerkLevel and setHungChange... well more specifically, i need those for fatigue, stress, boredom, thirst, etc. Also, i need an example displaying how the code is used (so i'll understand how its to be used).

I've started a bit of an add on which should add several medical items to the game as well, like stimpacks, improved bandages, etc. So i will also be needing the code or file for whatever pertains to health regen, pain reduction, sick reduction, injury reduction (not an instant fix of limbs), and zombification reduction (not planning to write a cure, just something that can reduce the effects/stages of zombification depending on its current/min/max stages). Actually i'll need a reference of all these here in regards to the current/min/max stages or range in value. And while on the subject of new meds... i'm having a slight bit of trouble implementing evolved recipes.

If anyone can help me with this, or provide some actual written portion to this mod, i would very much appreciate it!

Those who've helped will be cited in mod!!!

note: my spelling sucks XP

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...