Jump to content

ColKernel

Members
  • Content Count

    14
  • Joined

  • Last visited

Community Reputation

12 Neutral

About ColKernel

  • Rank
    Scavenger

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. ColKernel

    Editing loot spawns

    Hey @Guy Smiley. Have a look at this post on reddit: https://www.reddit.com/r/dayz/comments/9k42f9/changing_loot_spawn_rates_a_short_explanation_of/ In db\types.xml you can edit the respawn times and quantities for all the different loot objects.
  2. The Math.RandomInt(a, b) function returns a random integer between a and b, where b is exclusive. So Math.RandomInt(0, 2) returns 0 or 1. You have 3 cases in your example, so you want Math.RandomInt(0, 3), which will return 0, 1, or 2. Unfortunately, I do not know how to do this properly yet. In the FirefightersClass case with the M4: EntityAI sight = gun.GetInventory().CreateAttachment("M68Optic"); sight.GetInventory().CreateAttachment("Battery9V"); It works similarly for the PSO-1 scope.
  3. I did some testing and I cannot get player.LocalTakeEntityToHands(primary) to work. I found a workaround that seems to be working for me. In each of your player classes you need to replace the line where you create the gun EntityAI gun = player.GetInventory().CreateInInventory("AKM"); with these lines instead InventoryLocation handInventoryLocation = new InventoryLocation; handInventoryLocation.SetHands(player, null); EntityAI gun = player.GetInventory().SpawnItemOnLocation("AKM", handInventoryLocation, false); In each player class you need to replace the "AKM" with the gun you want. This will create the gun directly in the player's hands. Also you should probably delete the player.LocalTakeEntityToHands(primary) from the code. Hope this helps!
  4. Does this mean that your problem is solved?
  5. Well, that's the right sequence at least. How do your class functions look? For example, baikerClass? Is the primary weapon spawning in the inventory or not spawning at all?
  6. It's the sequencing again. Now you ask the player to take primary to hands before defining and creating primary. player.LocalTakeEntityToHands(primary); player.SetQuickBarEntityShortcut(primary, 0, true); should be after your switch block.
  7. Hey @mastaZz It's your code sequence. It's because you start with player.RemoveAllItems(); which will remove all clothing from the character. Then you create the rags and the character has to take them to the hands as there are no other inventory slots to put the rags in. I'm assuming that you're spawning in clothes when calling the player class in your switch block. Put your switch block right after RemoveAllItems before creating any other items.
  8. Hey @Quake Rocks As far as I know, the most direct way of editing the loot spawn rate is through the db\types.xml file inside the server mission folder. This is a config file for the central economy. There are a number of parameters for each item, including the approximate number on the map, the minimum number and the respawn time. As I just posted on the reddit (https://www.reddit.com/r/dayz/comments/9k42f9/changing_loot_spawn_rates_a_short_explanation_of/), I found an explanation of the parameters inside the scripts.pbo in 3_Game\gameplay.c: Hopefully this can help you.
  9. ColKernel

    Adjusting Food & Drink Levels

    Hey @Clint Baldwin, @XxFri3ndlyxX I think the right place to edit the rate of thirst and hunger is in 3_Game\PlayerConstants.c: To my knowledge, that would require the file to be edited both on the server and the client, so each player would need to download this "mod". Perhaps you can do it server side only, but I haven't tested that. EDIT: Just did a brief test and it seems to work perfectly fine to just edit this on the server side. So you can forget about my ramblings below... :) /* What you can do right now is to do an override in the mission file (the init.c on the server) by adding energy and water to each player for each server update. It's NOT a very efficient or good way of doing it, but based on 5 min. testing it works. It would go in the "class CustomMission: MissionServer" part of init.c and go something like this: Here I add a small amount to the player's water and energy for each update. It has the unintended effect of increasing water and energy when the player is idle. */
  10. ColKernel

    Spawning with Gear

    @The Classified Rebel I managed to spawn with an M4 and a powered M68 scope using code like this:
  11. ColKernel

    ADVICE AND GUIDANCE - POST TIPS HERE!

    @HEEROCKSS One way around it is to set the time acceleration to less than one in the server config file. E.g. serverTimeAcceleration=0.05; In this case, it should take 20 hours real time to let 1 hour game time pass. I haven't tested it thoroughly, though, but it shows up in the server list as 0.1x time acceleration.
  12. ColKernel

    Zombies not spawning regular

    Hey @mrwolv. If you also only encounter infected around your spawn point, then have a look at my post just above and perhaps try out my events.xml.
  13. ColKernel

    Zombies not spawning regular

    I messed around with the loot economy xml files and perhaps found some kind of a fix. In events.xml I noticed that the ambient animal "children" all had both max and min values, whereas the infected all had max=0. By changing the max to a value equal to or higher than the min, I've been able to have infected in more than one town. As an example for InfectedVillage: was changed into: I haven't done a lot of testing, but so far managed to spawn into Gorka, then run to Polana and Orlovets and see infected in both villages. On a second attempt, I spawned in Solnichniy, ran north to Nizhnoye and also found infected there. Perhaps it's more akin to treating the symptoms than actually fixing the issue, but it at least makes the server more fun! My current events.xml is here: https://www.dropbox.com/s/zywrb7swa1ezh6l/events.xml?dl=0. I'm sure the values can be optimized with further testing.
×