Jump to content

Asilar

Member
  • Posts

    19
  • Joined

  • Last visited

Everything posted by Asilar

  1. Thanks for the answer ! I can't wait to see those in action
  2. This is doable Tiax. I do it very often in the mod I'm working on. You have to use ModData and item:setToolTip(). I can give you some code and/or help you if you want, just ping me on discord.
  3. This is nice ! Is it for real ? I mean, does the "cliffs" blocks passage ? Is it "real" height or optic illusion due to perspective and Isometric 3D ?
  4. In the Modding forums. I don't want to upload it on youtube because it's raw and only a demo clip of some WIP features for mods.
  5. You can use TileZed to look inside a .pack file. You can also use it to make your own .pack files. You can also exctract the pngs from a .pack file. But, you cannot modify a .pack file. It's in UI2.pack that you can find the cardashboard image.
  6. I think it's because there is a special state about that general electricity. getSandboxOptions():getElecShutModifier() then you can compare with getGameTime():getWorldAgeHours() You also could check in the Sewing Machine mod, there are some code that checks for power if I remember well.
  7. Hi, Sorry, I am struggling with forum tags. How can I insert a spoiler/hidden content ? Thanks a lot.
  8. Hi, I think what you are looking for is hidden in java code. Digging a little in the code, I found stuff in : zombie/iso/weather. For example, il zombie/iso/weather/ClimateManager.class I found this : (I don't know how to add a hidden/spoiler thing, sorry...) public float getAirMass() { return this.airMass; } public float getAirMassDaily() { return this.airMassDaily; } public float getAirMassTemperature() { return this.airMassTemperature; } public float getDayLightStrength() { return this.dayLightStrength.finalValue; } public float getNightStrength() { return this.nightStrength.finalValue; } public float getDayMeanTemperature() { return this.currentDay.season.getDayMeanTemperature(); } public float getTemperature() { return this.temperature.finalValue; } public float getBaseTemperature() { return this.baseTemperature; } public float getSnowStrength() { return this.snowStrength; } public boolean getPrecipitationIsSnow() { return this.precipitationIsSnow.finalValue; } public float getPrecipitationIntensity() { return this.precipitationIntensity.finalValue; } public float getFogIntensity() { return this.fogIntensity.finalValue; } public float getWindIntensity() { return this.windIntensity.finalValue; } public float getWindAngleIntensity() { return this.windAngleIntensity.finalValue; } public float getWindPower() { return this.windPower; } public float getWindspeedKph() { return this.windPower * 120.0F; } public float getCloudIntensity() { return this.cloudIntensity.finalValue; } public float getAmbient() { return this.ambient.finalValue; } public float getViewDistance() { return this.viewDistance.finalValue; } public boolean isRaining() { return (getPrecipitationIntensity() > 0.0F && !getPrecipitationIsSnow()); } public float getRainIntensity() { return isRaining() ? getPrecipitationIntensity() : 0.0F; } Hope it will help !
  9. Hi, Would it be possible to have a function that return the full date without having to rebuild it from ground ? And also a function that calculate time past between 2 dates without having to rebuild the whole gregorian calendar functions ? Thanks a lot for the great job !
  10. Hi, I struggle to embed a video into a post on those forums. It's not a Youtube vidéo but a mp4 I uploaded and shared in google drive. I can have a html tag with <iframes></iframes> but it doesn't work at all. Any hint? Thanks a lot !
  11. Hi, I'm working on a set of functions that can generate Quests. For now it uses some RNG to generate random Quests. It's tweakable to build custom Quests with fixed values defined by the modders. My first iteration of this "Random Quest Generator" is running. Here is a little demo clip to see what it does for now (41Mb) : https://drive.google.com/file/d/11uXFuHrCPEpgODd1QGSfo4AxYPlzNQy1/preview The first type of quest is "Kill X Zombies" to get a reward. I want to thanks a lot FueledByOCHD who helped me a lot to debug and code. I will accept any advice and ideas to improve the mod, go further and add more features (I already have a few in mind and planned). I'm also very interested in your thoughts & critisism. I am in great demand for : - locations that would be nice to ask players to go for delivery quests, - locations that would be nice to send the players to get their rewards, - balancing numbers between quest requirements (what the quests asks for) and rewards (what it gives the players) You can contact me in PM or on Discord (I'm on the official PZ discord server).
  12. I think you also need to define how much quantity of your drainable you want to drain in the recipe itself. Example : recipe Make Cake Batter { Bowl, Flour=2, Butter;15, Sugar=3, Egg/WildEggs, Yeast, Milk, Result:CakeBatter, NeedToBeLearn:true, Time:50.0, Category:Cooking, OnGiveXP:Give10CookingXP, } Sugar & Flour are drainables : item Sugar { Weight = 1, Type = Drainable, UseWhileEquipped = FALSE, UseDelta = 0.16, DisplayName = Sugar, Icon = Sugar, EvolvedRecipe = HotDrink:1, } So my assumption is that it will drain : UseDelta x number in the recipe. Example here : the Sugar will be drained for 0.16 x 3 = 0.48 units. Did you dug into java code to find the drainable java code and figure our how it works ?
  13. Did you try to set the item type as "Drainable" in the item definition ? And add also Usedelta and set it up ? Like that : item CandleLit { LightDistance = 3, Weight = 0.2, Type = Drainable, TorchCone = FALSE, UseDelta = 0.003, LightStrength = 0.6, DisplayName = Lit Candle, ActivatedItem = TRUE, Icon = CandleLit, cantBeConsolided = TRUE, }
  14. Hi, It seems to me that you lack a map.info file at least (and maybe a spawnlocation.lua too). Dunno if it's the bug tho.
  15. Did you dig in the vanilla java & lua files to try to find the code relative to backpacks ? Because as it's the same feature you are looking for, maybe finding the code for backpacks would help you to figure it out for player inventory ?
  16. Asilar

    Body temperature

    Hi, Can you try to add some debug lines ? print( self.character:getBodyDamage():getTemperature() ) for example, to check in the console.txt what it returns. Also, are you sure that Temperature is under bodyDamage ? Isn't it under Stats ? Also, are you sure that you have to assign value in the parenthesis of the function ? Did you try something like : self.character:getBodyDamage():setTemperature() = YourValue Also, you should visit the PZ Modding discord channel on the PZ official discord.
  17. I correct myself : there is also a setMaxWeightBase() function, so you should start with : getPlayer():setMaxWeightBase() = 2 But I guess you have to mess up with OnCreatePlayer event, and I don't know how to handle that, sorry.
  18. It is hardcoded in IsoGameCharacter.class file. BaseMaxWeight = 8. And then there is the STR carry capacity bonus. There is a function that is setMaxWeight(). So maybe in a function (called at creation of character with an event ?) you could change it : getPlayer():setMaxWeight() = 2 ? Or something like that... Better coders will help you with that I guess
  19. Hi, What it does When you call the function, it checks where the player is and compare it to specific coordinates you set up. It returns a boolean. What for ? This function main purpose is to check if the player is where you want to allow him/her to craft a defined recipe. Can I use it in my own mod ? We share the code for the coders community, feel free to use ! But please leave the credits. How I use it ? All is explained in the .lua file with the credits in the first lines. If you have trouble using it, feel free to ask here or in PM. The coords you set up are the global coords of the world map (not the local coords of the cell you are in). Who coded that ? This one is my own code, debugged by Yossitaru ! Other credits No other credits this time. Location_Condition_to_craft.lua
  20. Asilar

    Modify Item

    Did you checked if your function is ever started ? With a print("UpgradePropaneTank function entered") for example. Also, did you tried setReplaceOnDeplete'"Base.EmptyTank") ?
  21. First, thanks a lot for this amazing tool ! I red the WordZed documentation and watched the video tutorial, and there is still 1 or 2 things I don't know how to do. First, there are several different types : Radio, Television, Military, Emergency, Amateur, Bandit. I understood that some radios can have a preset channel in it depending of it's type. But when you look at the radio/television tiles and item definitions : in the .tiles you can only define your object as "Radio" or "Television". And in the Item description (in /scripts/items_radio.txt of base game), the only argument that differs is "IsHighTier=TRUE or FALSE" (and also frequencies delta). I don't know what this argument IsHighTier defines. Is it for Military only, or Emergency too ? I think Radio = can include Radio channels, Military = can include Military channels. Amateur, I don't if it's for HAM items (which are defined in items_radio.txt) or Makeshifts items. Maybe both ? Maybe none ? My aim is to create a radio channel that broadcast a specific message. And I would like that an item I created have it on preset. Is it doable or am I going too far ?
  22. Hi, With alibuyuktatli we managed to create a fake helicopter function. What it does When you call the function, it simulate an Helicopter by calling the sound, faking arrival/hovering/leaving with incremental/decremental sound volume, and using addSound command to call the zombies around. The Fake Helicopter function needs a (player) argument, so you can call the Helicopter right on top of chosen player ! What for ? For example, if you call this function in a OnCreate function in a recipe, the crafting of the recipe will call this fake Helicopter on the player who crafted the recipe (and not at a random player location). Here is a demo of the function in a video : https://drive.google.com/file/d/1dwrieE7Archble93cpB--_8zS1JC-JT6/view?usp=sharing In this video, the function is called with an OnCreate function added in the custom recipe. Can I use it in my own mod ? We share the code for the coders community, feel free to use ! But please leave the credits. How I use it ? All is explained in the .lua file with the credits in the first lines. If you have trouble using it, feel free to ask here or in PM. Who coded that ? All credits of the code to alibuyuktatli ! Other credits Some of the icons/spites you can see in the video are used with the courtesy of Hydrocraft Mod. fakeheli.lua
×
×
  • Create New...