Hydrosofista Posted July 6, 2021 Share Posted July 6, 2021 I looked at other mods to create my own. Works badly but enough for personal use. But me and my perfectionism hit the wall. I don't know what to do next. Im just new. require('NPCs/MainCreationMethods'); local function FancyItemsOSA(_player) local player = _player; local inv = player:getInventory(); inv:AddItems("Base.P226", 1); inv:AddItems("9mmClip",11); inv:AddItems("Bullets9mm",33); inv:AddItems("Screwdriver",1); inv:AddItems("Base.Suppressor_Pistol",1); inv:AddItem("Bag_ALICEpack_Army"); inv:AddItems("AlcoholBandage",10); inv:AddItems("Base.Antibiotics",10); inv:AddItems("Base.Bandaid",10); inv:AddItems("Base.Disinfectant",13); inv:AddItems("Base.Splint",5); inv:AddItems("Base.SutureNeedleHolder",10); inv:AddItems("Base.PillsAntiDep",5); inv:AddItems("Base.PillsBeta",5); inv:AddItems("Base.Pills",5); inv:AddItems("Base.PillsSleepingTablets",5); inv:AddItems("Base.PillsVitamins",5); inv:AddItems("Base.PeanutButter",9); inv:AddItems("Base.JuiceBox",30); inv:AddItems("Base.HolsterDouble",1); inv:AddItems("Base.Belt2",1); inv:AddItem("DigitalWatch2"); inv:AddItem("DigitalWatch"); end Events.OnNewGame.Add(FancyItemsOSA); I have a few problems, I have a problem to jump over: 1. How to make things immediately in the container? In a backpack? 2. What is the ID of the watch? 3. Can the magazines be immediately loaded and the silencer placed on the pistol? 4. How do I make a "Trait" out of it? Or another thing that will make Start-EQ easy to turn-on and turn-off. Link to comment Share on other sites More sharing options...
Hydrosofista Posted July 6, 2021 Author Share Posted July 6, 2021 I am smarter about new things! I am wiser that I am doing mods to mods and by choosing the trial and error method I managed to get the hang of packing items into backpacks. mod.info file: name=Fancy Items OSA poster=osa.png description= Adds EQ for start. id=FancyItemsOSA require=Brita FancyItemsOSA.lua file: require('NPCs/MainCreationMethods'); local function FancyItemsOSA(_player) local player = _player; local invi = player:getInventory(); local baga = player:getInventory():AddItem("Bag_ALICEpack_Army"); local bati = baga:getItemContainer(); player:setClothingItem_Back(baga); invi:AddItems("Base.P226", 1); invi:AddItems("9mmClip",11); invi:AddItems("Bullets9mm",33); invi:AddItems("Screwdriver",1); invi:AddItems("Base.Suppressor_Pistol",1); invi:AddItems("Base.HolsterDouble",1); invi:AddItems("HCFlashlighton",1); invi:AddItems("Katana",1); bati:AddItems("AlcoholBandage",10); bati:AddItems("Base.Antibiotics",10); bati:AddItems("Base.Bandaid",10); bati:AddItems("Base.Disinfectant",13); bati:AddItems("Base.Splint",5); bati:AddItems("Base.SutureNeedleHolder",10); bati:AddItems("Base.PillsAntiDep",5); bati:AddItems("Base.PillsBeta",5); bati:AddItems("Base.Pills",5); bati:AddItems("Base.PillsSleepingTablets",5); bati:AddItems("Base.PillsVitamins",5); bati:AddItems("Base.PeanutButter",9); bati:AddItems("Base.JuiceBox",30); end Events.OnNewGame.Add(FancyItemsOSA); It Work! One of the four steps has been achieved. I feel Progress. xD Link to comment Share on other sites More sharing options...
Hydrosofista Posted July 8, 2021 Author Share Posted July 8, 2021 Naw work as a trait. require('NPCs/MainCreationMethods'); local function initOsaTrait() TraitFactory.addTrait("Osa", "Fancy Osa Trait", -100, "This Give you some items for start", false); end local function FancyItemsOSA(_player) local player = _player; if player:HasTrait("Osa") then local invi = player:getInventory(); local baga = player:getInventory():AddItem("Bag_ALICEpack_Army"); local bati = baga:getItemContainer(); player:setClothingItem_Back(baga); invi:AddItems("Base.P226", 1); bati:AddItems("Base.JuiceBox",30); end end Events.OnGameBoot.Add(initOsaTrait); Events.OnNewGame.Add(FancyItemsOSA); Whatever I typed as id, the watch doesn't appear in the game. Link to comment Share on other sites More sharing options...
Hydrosofista Posted July 9, 2021 Author Share Posted July 9, 2021 Solved, but still digitalwatch do not apper. require('NPCs/MainCreationMethods'); local function initOsaTrait() TraitFactory.addTrait("Osa", "Fancy Osa Trait", -100, "This Give you some items for start", false); end local function FancyItemsOSA(_player) local player = _player; if player:HasTrait("Osa") then --clear inventory local invi = player:getInventory(); local baga = player:getInventory():AddItem("Bag_ALICEpack_Army"); local bati = baga:getItemContainer(); player:setClothingItem_Back(baga); AbandonedSoldier.clothes = {"Base.Shoes_ArmyBoots","Base.Trousers_CamoGreen","Base.Shirt_CamoGreen","Base.Hat_Army","Base.Jacket_ArmyCamoGreen"} for i , item in pairs(AbandonedSoldier.clothes) do clothes = bati:AddItem(item); end invi:AddItems("Base.EmptyPetrolCan",2); bati:AddItem("Base.Pistol"); bati:AddItem("Base.AssaultRifle"); for i = 1,9 do bati:AddItem("Base.556Clip"):setCurrentAmmoCount(30); bati:AddItem("Base.9mmClip"):setCurrentAmmoCount(15); end bati:AddItem("Base.HuntingKnife"); bati:AddItem("Base.Lighter"); bati:AddItems("Base.PeanutButter",4); bati:AddItems("Base.WaterBottleFull",4); bati:AddItem("Base.Belt2"); bati:AddItem("Base.HolsterDouble"); bati:AddItem("Base.AlarmClock2"); bati:AddItem("farming.Shovel"); bati:AddItem("Base.Laser"); bati:AddItem("Base.RedDot"); local baga = player:getInventory():AddItem("Base.Toolbox"); local bati = baga:getItemContainer(); player:setPrimaryHandItem(baga); bati:AddItem("Base.Jack"); bati:AddItem("Base.LugWrench"); bati:AddItem("Base.TirePump"); bati:AddItem("Base.Spanner"); bati:AddItem("Base.Torch"); bati:AddItem("Base.Crowbar"); bati:AddItem("Base.Screwdriver"); bati:AddItem("Base.Battery"); local baga = player:getInventory():AddItem("Base.FirstAidKit"); local bati = baga:getItemContainer(); player:setSecondaryHandItem(baga); bati:AddItems("AlcoholBandage",12); bati:AddItems("Base.Antibiotics",2); bati:AddItems("Base.Disinfectant",2); bati:AddItems("Base.PillsAntiDep",2); bati:AddItems("Base.PillsBeta",2); bati:AddItems("Base.Pills",2); bati:AddItems("Base.PillsSleepingTablets",2); bati:AddItems("Base.PillsVitamins",2); local baga = player:getInventory():AddItem("Base.Briefcase"); local bati = baga:getItemContainer(); bati:AddItem("Base.FiberglassStock"); bati:AddItem("Base.RecoilPad"); bati:AddItem("Base.AmmoStraps"); bati:AddItem("Base.Sling"); bati:AddItem("Base.x8Scope"); bati:AddItem("Base.Screwdriver"); for i = 1,9 do bati:AddItem("308Clip"):setCurrentAmmoCount(3); end end end Events.OnGameBoot.Add(initOsaTrait); Events.OnNewGame.Add(FancyItemsOSA); Link to comment Share on other sites More sharing options...
Josko Posted July 9, 2021 Share Posted July 9, 2021 For digital watch in B41 it's: WristWatch_Left_DigitalBlack WristWatch_Left_DigitalRed WristWatch_Left_DigitalMilitary WristWatch_Left_DigitalGold Link to comment Share on other sites More sharing options...
Hydrosofista Posted July 12, 2021 Author Share Posted July 12, 2021 I checked the PZwiki and the id list page. Where did you find the right ID? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now