Page 17 of 20 FirstFirst ... 71516171819 ... LastLast
Results 241 to 255 of 287

Thread: Coppi MOD - New features

  1. #241
    Tracker
    Join Date
    Sep 2014
    Location
    Denmark
    Posts
    153
    Rep Power
    0
    I cant get unlockall to work.
    Is it possible to fix that.
    Keep on the great work.

    Update:

    Sorry, was using the wrong version 3.4, now using version 3.5.
    Last edited by kimila; 09-09-2017 at 10:59 AM.

  2. #242
    Zombie Hunter
    Join Date
    Sep 2016
    Location
    NL - Tilburg
    Posts
    393
    Rep Power
    1
    Quote Originally Posted by Mirakle View Post
    Hi Guys hi Coppy,

    many thanx for the update! Can that be that the P1 and the P2 Command got not the right position. I have the feeling that allways my position is taken with + or - 1 block to the left or the right. Befor it was exact my position now i have to trie many times to get a wall on the right position. Sometimes i get 2 blocks width walls to.

    I allways target te block in his center but the wall spawns on a other position.

    Got anyoe else this problem?

    Greets Mira
    Replace all occurrences of ep.position.x (y and z) with ep.GetPosition().x (and y and z)

    Cheers

  3. #243
    Tracker djkrose's Avatar
    Join Date
    Apr 2014
    Posts
    154
    Rep Power
    1
    Quote Originally Posted by Prisma501 View Post
    Replace all occurrences of ep.position.x (y and z) with ep.GetPosition().x (and y and z)

    Cheers
    Ehhm...

    Code:
    public Vector3 GetPosition()
    {
      return this.position;
    }

  4. #244
    Colony Founder Spectral Force's Avatar
    Join Date
    Jul 2016
    Location
    The land between two rivers.
    Posts
    1,326
    Rep Power
    1
    Fixed my issue, it was user error... derp.
    Last edited by Spectral Force; 09-21-2017 at 02:10 PM.

  5. #245
    Survivor Cernwn's Avatar
    Join Date
    Oct 2016
    Location
    Pacific Standard Time zone, USA
    Posts
    82
    Rep Power
    0
    TeleportEntity not working at all - unknown command.

    Nevermind, "telee <entity id> <my id> <rot>" worked for moving a trader to my location. Mod needs more documentation imho.
    Last edited by Cernwn; 09-25-2017 at 02:23 AM.

  6. #246
    Refugee
    Join Date
    Sep 2015
    Posts
    27
    Rep Power
    0
    Quote Originally Posted by djkrose View Post
    Ehhm...

    Code:
    public Vector3 GetPosition()
    {
      return this.position;
    }
    Can anyone explain this better? I'm having the same issue with block alignment being off by 1 in two directions when setting player location to render, copy, or fill an area. Thank you

  7. #247
    Colony Founder StompyNZ's Avatar
    Join Date
    Apr 2015
    Posts
    3,589
    Rep Power
    1
    Quote Originally Posted by Weavil View Post
    Can anyone explain this better? I'm having the same issue with block alignment being off by 1 in two directions when setting player location to render, copy, or fill an area. Thank you
    DjK was pointing out that GetPosition returned this.position, therefore are identical.

    The issue arises in how coppi creates the int based location from floats.

    https://stackoverflow.com/questions/...o-int-vs-floor

    he calls new Vector3i(x,y,z) with x,y,z being floats. That method then casts to int, rather than doing Math.floor. Casting a negative int moves towards 0, .floor on a negative moves away from 0.

  8. #248
    Tracker djkrose's Avatar
    Join Date
    Apr 2014
    Posts
    154
    Rep Power
    1
    Quote Originally Posted by StompyNZ View Post
    DjK was pointing out that GetPosition returned this.position, therefore are identical.

    The issue arises in how coppi creates the int based location from floats.

    https://stackoverflow.com/questions/...o-int-vs-floor

    he calls new Vector3i(x,y,z) with x,y,z being floats. That method then casts to int, rather than doing Math.floor. Casting a negative int moves towards 0, .floor on a negative moves away from 0.
    Exactly right.

    Unfortunately, even the F3 debug mode is showing wrong position values on negative numbers. - Its not how the game actually calculates; just the display shows it wrong.

    I use this extension in my mod:

    Code:
        internal static class Vector3Extensions
        {
            public static Vector3i ToVector3i(this Vector3 pos)
            {
                // Do NOT use "new Vector3i(Vector3 v)", because it calculates incorrectly by just casting to int, which rounds UP on negative numbers.
                return new Vector3i((int) Math.Floor(pos.x), (int) Math.Floor(pos.y), (int) Math.Floor(pos.z));
            }
        }
    Usage:
    Vector3i pos = player.position.ToVector3i();

    Btw, both bc-pos and dj-pos commands show the correct position for comparison.

    djk

  9. #249
    Refugee
    Join Date
    Jul 2017
    Posts
    16
    Rep Power
    0
    Where can i find the older versions of Coppi's additions?

  10. #250
    Scavenger
    Join Date
    Jun 2017
    Posts
    42
    Rep Power
    0
    Thanks a bunch this is some great work.!

    Quote Originally Posted by danilocoppi View Post

    Download the file at compilated/CoppisAdditions_2.3.zip, extract it to your server`s folder:
    ...steamapps/common/7 Days to Die Dedicated Server/Mods/
    I'm trying to install it and when I place it in ...Steam\steamapps\common\7 Days to Die Dedicated Server\Mods\
    it doesn't show in the version?

    If I place it in Steam\steamapps\common\7 Days To Die\Mods\
    it shows the version but HELP command doesn't show the commands?

    what am I doing wrong?

  11. #251
    Tracker freakii's Avatar
    Join Date
    Feb 2015
    Location
    Las Vegas, NV
    Posts
    213
    Rep Power
    0
    hello, not sure if this is caused by Coppi's or not so I'll just post it here.

    Coppi's version is being used: 3.6
    Game version: Alpha 16.3 Stable
    Allocs versions: Command Extensions=14; Common Functions=16; webmap=22

    Server was running fine before I started testing out "pblock". No "nullref" prior.

    Since I have started using pblock, regardless of distance from location of this command being used; I have been getting nullrefs pop up while killing zombies. Majority of the indications occur while they are killed mid-stride.

    Here is a snippet from the log:
    (Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

    2017-10-13T17:45:24 3204.776 INF Executing command 'pblock steel 175 1 175 0' from client 76561198158797101

    (Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

    2017-10-13T17:45:24 3204.779 INF Error in PrefabFillBlock.Run: System.NullReferenceException: Object reference not set to an instance of an object
    at AllocsFixes.CustomCommands.PrefabFillBlock.showLis tOfBlocks (System.String blockName) [0x00000] in <filename unknown>:0
    at AllocsFixes.CustomCommands.PrefabFillBlock.Execute (System.Collections.Generic.List`1 _params, CommandSenderInfo _senderInfo) [0x00000] in <filename unknown>:0



    Again, those messages appear after zombies are killed usually in mid-stride, not one particular zombie. Meaning a horde of 25 will throw at least one, maximum of 3 (usually not the zombie sometimes it will throw festering corpse, while others could be cheerleader, I've had a few thrown for different radiated zombies at different times).

    What have I done so far?
    Stop Server
    Delete Region Files of Map that I used 'pblock'- I use this command away from player areas for this very reason
    Start Server
    Join Server


    This is a minor nuisance; but one to be mentioned. On going even after reset of region files. If this is in the wrong thread, I'll copy to correct location.

    Thanks!
    Last edited by freakii; 10-14-2017 at 09:33 PM. Reason: additional information

  12. #252
    Refugee
    Join Date
    Aug 2014
    Posts
    13
    Rep Power
    0
    Is there a way to spawn a prefab and set so sleepers spawn as well?

    There are plenty of prefabs that have static spawners but when i use the command to spawn a prefab, its fully empity.

  13. #253
    Tracker djkrose's Avatar
    Join Date
    Apr 2014
    Posts
    154
    Rep Power
    1
    Quote Originally Posted by [xTC]Moon View Post
    Is there a way to spawn a prefab and set so sleepers spawn as well?

    There are plenty of prefabs that have static spawners but when i use the command to spawn a prefab, its fully empity.
    I think you are mistaken. The internal import method that every mod is using takes care of static spawners, so all mods should support that. Recently, I imported the strip club a few times and it also created the static spawners. I checked the game data to be sure. In fact, it creates the spawners *on top* of already existing ones, so when you import some prefab multiple times with slightly shifted positions, you have created a lot of sleeper spawns. I had to remove some of the spawners manually ("scriptually").

    There is a cool-down though, so it's likely that te sleepers won't come immediately after import. But they will come.

    djk

    Edit: If you have my ScriptingMod, it contains a script that lists all static spawners in the current chunk. It's basically just:

    var pos = global.player.GetBlockPosition();
    var chunk = GameManager.Instance.World.GetChunkFromWorldPos(po s);
    var spawners = chunk.GetSleeperVolumes();
    console.log("Chunk has " + count + " sleeper volumes.");

    Last edited by djkrose; 10-15-2017 at 10:21 PM.

  14. #254
    Refugee
    Join Date
    Aug 2014
    Posts
    13
    Rep Power
    0
    Quote Originally Posted by djkrose View Post
    I think you are mistaken. The internal import method that every mod is using takes care of static spawners, so all mods should support that. Recently, I imported the strip club a few times and it also created the static spawners. I checked the game data to be sure. In fact, it creates the spawners *on top* of already existing ones, so when you import some prefab multiple times with slightly shifted positions, you have created a lot of sleeper spawns. I had to remove some of the spawners manually ("scriptually").

    There is a cool-down though, so it's likely that te sleepers won't come immediately after import. But they will come.

    djk

    Edit: If you have my ScriptingMod, it contains a script that lists all static spawners in the current chunk. It's basically just:

    var pos = global.player.GetBlockPosition();
    var chunk = GameManager.Instance.World.GetChunkFromWorldPos(po s);
    var spawners = chunk.GetSleeperVolumes();
    console.log("Chunk has " + count + " sleeper volumes.");

    This is weird, i spawned the oldies village prefab but i cant find a single zombie or spawner inside. I didnt add the prefab to the rgwmixer though. I simply added the prefab files to the prefab folder and manually spawned.

    What i'm trying to do is creating a mega customized city on my server like a "starting" point with shops,trading points etc.

  15. #255
    Colony Founder StompyNZ's Avatar
    Join Date
    Apr 2015
    Posts
    3,589
    Rep Power
    1
    Quote Originally Posted by freakii View Post
    hello, not sure if this is caused by Coppi's or not so I'll just post it here.

    ...

    Since I have started using pblock, regardless of distance from location of this command being used; I have been getting nullrefs pop up while killing zombies. Majority of the indications occur while they are killed mid-stride.
    There's a logic bug in coppis code causing that error:

    Code:
            public void showListOfBlocks(String blockName)
            {
                SdtdConsole.Instance.Output("blockName:" + blockName);
                blockName = blockName.ToLower();
                foreach (Block block in Block.list)
                {
                    if (blockName == "*" || (block != null && block.GetBlockName() != null && block.GetBlockName().ToLower().Contains(blockName)))
                    {
                        SdtdConsole.Instance.Output("BlockID:" + block.blockID + "   Name:" + block.GetBlockName());
                    }
                }
            }
    Bits in red are the problem.

    if name is *, then it skips the null check then tries to access .BlockID on a null (when it hits block id 17 in vanilla which doesnt exist)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •