Jump to content

Maris

Member
  • Posts

    244
  • Joined

  • Last visited

Everything posted by Maris

  1. Please add API for custom moodles.
  2. How to reproduce: 1) I tested in multiplayer, but it may be a bug in singleplayer too. So start a coop server. 2) apply Garlic Poultice 3) stop server 4) start server again 5) Garlic Poultice disappeared.
  3. Is there a chance to know what type of zombie made a wound?
  4. Maris

    Cure Zombie Virus

    All I want is to prevent random death because of lag or misclick. Most servers that I know prefer to disable virus in settings. There still is chance to be eaten or die from poison, cold etc. But the virus makes the game more interesting. So the cure must exist. Let it be hard to find but it definetely must exist. Now I want it to be more like a quest. I'm looking on to the API and there is lack of features that I need. For example, I can't use function setInfectionLevel() because it doesn't work, so I can't manipulate the stage of infection. But thanks god I still can drop it to zero and set to "false". I'd like to have more events in API but it seems that I have to use OnTick or so... I'm going to make it as a non linear quest with a few possibilities of cure and even possibility of immunity to each type of virus. I need more detailed background story.
  5. Maris

    Cure Zombie Virus

    I have a few new ideas! Inspired by viral hepatitis, malaria, rabies virus, HIV, measles, poliomyelitis and ofc influenza virus. I'd like to make at least 2 types of virus: male virus and female virus. But it's a minimum that I want. May be more virus types and stages of immunity. What do you think how to make it more interesting?
  6. The mod from this topic is an exmaple. Raw blood -> cook -> can't drag cooked blood from oven to inventory (in multiplayer).
  7. Maris

    Cure Zombie Virus

    Once taken you can be cured once. Next time if you are bitten again, you should cure again. I built it from my mind. It's not too complicated but it based on background story that I came up with. But all I have from the API is ability to add items and recipes to the game and give them names and descriptions. If someone help me to spawn items in specific locations e.g. in the prison, I will make it more interesting. I spent a few days to figure out how to make random recipes (and it must work in multiplayer!). But even after that they have numbers in their names. It's not a big deal but I dunno how to fix that. Help is needed (again). By now my goal was to make it not easy to get and fun a bit. It won't break rules of the game because you can get it only in the middle or at the end of game session. You will reveal the recipe part by part.
  8. Maris

    Cure Zombie Virus

    Thank you for your suggestions. Now the recipe is random. And if you unlucky and one of the ingredient will be fresh apple for example, it will be difficult to get it in SP without respawning of items (but you can still use rotten apple using more complicated craft). Anyway even in MP craft is not easy because each ingredient has its own recipe, and these recipes are very rare.
  9. Exactly. I host local server (because there is admin panel and I can spawn items for testing). The bug exists for me. And if I stop the server and start again, raw uncooked CVZombieBlood appears again in the oven and I can cook it again with the same bug on dragging cooked blood to inventory. module CureVirus { ... item CVAntivirus { ... ReplaceOnCooked = CureVirus.CVAntivirusCooked, ... } ... } I could avoid using ReplaceOnCooked in scripts folder if there was something like Events.OnCooked.Add() or item:IsCooked() in lua.
  10. It's strange. Now I can't reproduce. It seems that I must restart game. I thought that loading main menu should reload all mods. Thank you. There remained one last annoying bug. I have no idea what it is. If you get CureVirus.CVZombieBlood, then cook it in oven, it become CVZombieBloodCooked. And then if you drag it to you inventory, it disappears! But if you drag it to the ground and then to inventory, all is ok.
  11. Maris

    Cure Zombie Virus

    Mod is published. In general it works. But I can't fix some bugs.
  12. I made a mod, but it doesn't work properly. It's very strange, because I made localization file properly and double checked it: ContextMenu_EN = { ContextMenu_Annotation = "Annotation", } But for some reason it doen't work. print("ContextMenu_Annotation" == getText("ContextMenu_Annotation")); --true! Can somebody explain what am I doing wrong? I was about to publish the mod but stucked on this issue. CureVirus.zip
  13. I think there is hidden formula. Because when my friends occasionally jump from window, they get fracture 50/50. But when I was jumping again and again on my test server, I loss only hp.
  14. All I want is to send unique number to all clients, so it will be the same for all users. For example, on the server: textureNumber = ZombRand(10); How can I send this value to client, so all users will see the same texture?
  15. Maris

    Spawn chances

    Okay, here is the part of game code which spawns items in containers: local alt = false; local itemname = nil; for m = 1, containerDist.rolls do for i, k in ipairs(containerDist.items) do if not alt then -- first we take the name of the item itemname = k; else -- next step is the random spawn part local lootModifier = ItemPicker.getLootModifier(itemname) or 0.6; if ZombRand(10000) <= ((((k*100) * lootModifier) + (zombieDensity * 10))) then -- make an item in the container of that type local item = ItemPicker.tryAddItemToContainer(bag:getItemContainer(), itemname); if not item then return end if instanceof(item, "Key") then item:takeKeyId(); item:setName("Key " .. item:getKeyId()); end item:setAutoAge(); end end alt = not alt; end end Variable lootModifier depends on game options: Abundant - 4 Common - 2 Normal - 1 Rare - 0.6 Extremely rare - 0.2 So spawn chance 100 (normal settings) should spawn an item always. 9999 < 100 * 100 * 1 zombieDensity variable may have value from 0 to 8. And 8 is equal to chance 0.8 So even if you set chance 0, real chance will be up to 0.8 (normal settings) depending on location. Minimum chance that you can set is 0.01. Ofc +0.8 from zombieDensity. So it will be minimum 0.81 if there are hords of zombies. Let's look what it means "0.81": By default it means 0.81% spawn chance of item for EACH ROLL. But usually we have few rolls in settings. May be 3-5. So real chance is 0.81 * 3 = 2.43% 0.81 * 5 = 4.05 Wow! Let me think a little. So I set Katana chance = 0.000000000000000000000000000000000000001. And suddenly if police storage is arounded by zombies I have 4% chance of Katana.... IN EACH CONTAINER. Wait a minute. How many containers are there? 10? So it's 40% of Katana............ I obviously miss something in this life......... Okay, you think that on extremely rare option in settings (0.2 modifier) it will be only 8% of Katana in a police storage. And ~12 times is needed to get Katana. But you are wrong! Look at the code again! lootModifier doesn't affect zombieDensity!! So it's still 40%!
  16. Maris

    Radnom recipe

    I figured out that I need following: Events.OnGameStart.Add(function() ...... end); But how can I access and change all my custom magazines? Or at least can I access item as soon as it appears in inventory or become visible in container?
  17. setTeachedRecipes(java.util.List<java.lang.String> teachedRecipes) For example, how to use this function? setTeachedRecipes({"Recipe 1", "Recipe 2"}) ?
  18. character:getBodyDamage():setInf(true); character:getBodyDamage():getBodyPart(BodyPartType['Head']):SetInfected(true) character:getBodyDamage():setInfectionLevel(50); --doesn't work I tried this code. But infection level starts from zero and growing, ignoring setInfectionLevel() whenever I use it.
  19. Maris

    Radnom recipe

    I want to make magazine with specific name which will give a random recipe. But it must give the same recipe each time and all other magazines of this type must give the same recipe. How can I do this?
  20. Maris

    Cure Zombie Virus

    Hello! Long story short we die A LOT because of bite or scratch. So I decided to make a mod with item which can cure the virus. Recipe: TOTALLY UNKNOWN until you research it in the game. It is uniqure recipe for each game session. Link to the mod: https://steamcommunity.com/sharedfiles/filedetails/?id=1576361194 Documentation: https://steamcommunity.com/workshop/filedetails/discussion/1576361194/1743353164096783517/ P.S. Actually I'd like to make good medicine mod. But it must be well designed. So there won't be many useless items. And existing items will be logical connected, preferring to use game items.
  21. Спасибо. Получается, что если не задавать подсказку, то рецепт переводится. Но при этом нет подсказки. Странная система. Это баг или фича?
  22. I don't understand what goes wrong... I created Tooltip_RU.txt file in media\lua\shared\Translate\RU but it's ignored. Also recipe name doesn't work too (not translated). CureVirus.zip
  23. Maris

    Spawn chances

    What exactly spawn chances mean? For example, I set 0.001 to my item for crates. Does it mean that each crate have a chance 0.001 that I will see my item in it?
×
×
  • Create New...