Jump to content

Umbrella

Members
  • Content Count

    168
  • Joined

  • Last visited

Community Reputation

3 Neutral

About Umbrella

  • Rank
    Tracker

Recent Profile Visitors

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

  1. Umbrella

    ZomBiome

    Thanks a lot, LoicLVT ! These errors were xml parsing errors not finding the correct class in the mod. The most probable explanation is that I messed up my commits on github when I removed some unused code. Did you use the a18 version ? No problem about the log file, it was empty because the errors occured long before starting the Zombiome routines. Also, I wonder: what is the difference between setting up a server and starting a MP game on steam ? I guess I need to learn server if I want to debug MP correctly. Is there a tutorial on the forums ? Can I use it to emulate multiple players connecting to the game, using only my single machine ?
  2. Hello, In my mod Zombiome (https://community.7daystodie.com/topic/20269-zombiome/), each client / player starts a local coroutine that, amongst others, create new entities. It may be quite intense (peaking at 1 entity /seconds / client), depending on the biome effect. Entities are created with int entityClassID = EntityClass.FromString(entityName); Entity entity = EntityFactory.CreateEntity(entityClassID, pos); entity.SetSpawnerSource(EnumSpawnerSource.Dynamic); GameManager.Instance.World.SpawnEntityInWorld(entity); CreateEntity() will increment a counter to create the id of the new entity (EntityFactory.nextEntityID ++). As I understand, this sends some NetPackage message (and creates some local entity object), but the entity is not available right away (via World.GetEntity(entityId)). I need to wait for the callback of the netpackage to be executed before seeing the entity in the world. Fine for synchronization. No problem for a single player. Now, I wonder what happens in multiplayer: - The nextEntityID counter is only local. So if multiple clients simultaneously spam entities (before getting the message of the other player), they end up using the same entityId in their request (while each wants to create a separate one). - I do not see a different initializer of nextEntityID (like 0 for player 0, 1e6 for player 1,...) that could ensure the range of entity ids are different for each client. - I do not know how the game handles multiple entity creation requests with the same id, but I have observed some de-synchronization in zombiome, where each player would only see the entities it created, not the one from the other players (not 100% sure as there were a few bugs happening before, sounds like a good suspect though). So I wonder how does the game solves this issue when it creates entities. If the id range are the same on each client, the only answer that makes sense to me is "Only the main player spawns entities, and it does so at other player's location too" 1) Can someone confirm that ? If that's the case, how does the game determine if the local player is the main player ? Bonus questions: 2) After creating entity, if I want my code to interact with it (eg buff, move), I will wait/loop until the entity becomes available (World.GetEntity(entityId) != null), and then interact. Even in single player, I have already seen the following: the loop wait for 2 second and finds the entity (first time when World.GetEntity(entityId) != null), but a few seconds later, the entity is no longer in the World. I suspect EnumSpawnerSource.Dynamic to drop the entity because it is too far away from player, so I changed to Static, but I wonder: - Is it the correct approach ? - Should each client wait for previous entity to be in world before requesting to spawn the next one ? Thank you in advance !
  3. Umbrella

    ZomBiome

    Hi, That would be nice. Thank you very much for the test, LoicLVT. Can you also see the log file "\Mods\zb_err.txt" ?
  4. Umbrella

    ZomBiome

    A few improvments available for A19: - Changed graphical particles that were no longer working in a19 (biome projectile, ghost size increased) - Added sounds to Ground motions. - 1 new Biome activity @doughphunghus: thank you for your encouragements. I've updated download links.
  5. Umbrella

    New Mod List Project

    ZomBiome : https://community.7daystodie.com/topic/20269-zombiome/
  6. Umbrella

    Zombiome A19

    Hello, I updated ZomBiome to A19, see https://community.7daystodie.com/topic/20269-zombiome/ The A19 version is located in the same git folder, in 7Dmods/ZombiomeA19/ Current limitations specific to A19: - The smoke color no longer depends on biome for freeze, blind, poison ... - Pesty warning with particle isOnFire (already happens without Zombiome in A19) - Tested less intensively Please refer to the initial Zombiome thread for more details.
  7. Umbrella

    DMT Modding Tool

    (deleted - found the doc I needed myself, sorry)
  8. Hi, This thread is for players to report issues with my brand new mod, Zombiome (see Don't disappoint me, I hope to see hundreds of issues
  9. Umbrella

    ZomBiome

    Umbrella proudly presents, With a big thank to the forums' community - to all of you that help, answer questions and provide great tutorials ! ZomBiome It is not dead ! Behold survivors ! Mother Hearth has been soiled long enough by these nasty Zombies ... it can stand no more. Its revolt has started, and biomes won't make a distinction between the livings and the undeads. Apocalypse is upon us ... let's hope it is fun Mod Features The world has permanent random activity, structured by biomes and geographic areas. Most are apocalyptic natural disasters. A few of them are more "supernatural". Biome Activity includes Gameplay hints: Current status : experimental - I need feedback SP : Playable MP : probably too buggy Important Warnings to players - It can mess up your saves. Duplicate your savefile or start a new one ! - It could break at any release (tested through A18.2/4). The A19 version is also available (less tested). - It is not yet balanced, and performances are not optimized. - Errors are still too frequent in multiplayer. I wasn't able to test MP much. - Expect that any container could be destroyed in a second (content vanishes) . Emergency manual - You can check if Zombiome is running by looking at the logged messages in the console (F1) : "ZombiomeManager update 1+...". If it failed to start for any reason, run command "zb start". - In case of error / crash, feel free to share the log file .../Mods/zb_err.txt. I created a special thread for that : Please add these info: worldseed, worldsize, MP/SP, short description Installation ZomBiome is distributed under a BSD 2 License 1) Install DMT Tools I just noted an issue with DMT 2.x. Please use DMT 1.x while I investigate it. 2) Download or clone Zombiome: https://github.com/Umbrella7D/7Dmods Pick either folder Zombiome (for A18) or ZombiomeA19 3) Use DMT to build Zombiome Implementation details That could be of interest to other modders. Should be extracted in a "utils" mod: - Insert block (move existing block up or down). Eject entities that otherwise would be stuck. - Move entities (player or zombie) "manually". Does not (yet) check for collisions, so used sparingly. - Use a ghost (a mere Zombie made passive unkillable and invisible) as a controler for thrown items (actually mere dropped itemstack) to have biome-controled projectiles (controler=player would give xp). - Use ghost to attach particle and buff triggers. - Explore surface hexes around player to detect decorations. - Transform decorations to projectile and vice versa. - New blocks: waters (boiling/evaporating/freezing), slime, freezing stalagmites. - New buffs (20+) for Zombiome effects
  10. Hello, I use harmony to patch GameManager.PlayerSpawnedInWorld, in order to start a global coroutine of mine when the player joins the game. This works very well when I am alone in my game. But I tested my mod with a friend, and there is an issue. The routine starts on his computer when he creates the game, but does not start on my computer when I join his game. Both of us have build the game with the DMT tools applying the patch. So I wonder : are Harmony patches applied when I join an already running game ? Does each player needs to build the game with the tool ? Thank you !
  11. Umbrella

    DMT Modding Tool

    Hi Hal9000, thank you. I understand and agree with your answer. But still: The problem is that each of my file (in the same mod, each implementing IHarmony and requiring someone to call PatchAll once) then needs to make assumption on other file. If I remove PatchAll from one patch, I assume another single patch will apply PatchAll. From a design perspective, it does not make much sens. From a practical perspective, whenever you remove/add some patch to your harmony folder, you need to check for the single call. Agreed, but honestly 99% of modders want to apply each of their patch once. What I suggest is the DMT tool to have an extra method PatchAllOnce, so exotic use cases can do whatever they were doing before, but most users can just call PatchAllOnce() in each of their patch and no longer worry about if it's already done, or what happens when they remove a patch file. Could you add this extra method to the tool ? I know I will use it for every mod I make (and I still have found no use case where I would not) public static class Harmonys { private static bool Applied = false; public static void ApplyOnce(HarmonyInstance harmony, Assembly assembly, Type patch) { /* Important: the call to Assembly.GetExecutingAssembly() need be done by the caller TODO: check method is patched when skipping ? */ Debug.Log(String.Format("Harmonys.ApplyOnce {0} -> {1}", patch.ToString(), Applied)); if (Applied) return; Debug.Log(String.Format("Harmonys.Applying {0}", patch.ToString())); harmony.PatchAll(assembly); Applied = true; } }
  12. Hi, I can no longer see the graphical effect of ring of fire (from the dev item) since A18.4. Is that also the case for you ? Thank you. Sorry, just noticed I was in the wrong section. How can I move my own post ?
  13. Umbrella

    DMT Modding Tool

    Hello, I use 3 IHarmony patches. Each one calls harmony.PatchAll() in its Start() method. As a consequence, all 3 patches are applied 3 times ! How can I make sure all 3 patches only get applied once ? Should I call harmony.PatchAll() a single time (but how to ensure all patches have been seen) ? Is there a Patch() method that would apply the current IHarmony and not the other ones ? Thank you ! The call to PatchAll() is: var harmony = HarmonyInstance.Create(GetType().ToString()); harmony.PatchAll(Assembly.GetExecutingAssembly()); Edit: - Using harmony.Patch(original, null, new HarmonyMathod(postfix)); did not apply the patch. - Using a global bool flag to ensure PatchAll is called once does the trick. - I checked that the problem only occurs within one mod. Calling PatchAll from one mod does not reapply patches in other mods. Using a global bool flag like I did is enough only because the problem does not happen cross-mod. I feel the single-call check should be moved to the DMT library, because other users might run into the same mistake (Am I the only one tricked here ?). I can't see a use case where we want to apply patches multiple times (even then, it could be 2 different methods).
  14. The sound is indeed based on explosion.particleindex, so no easy way for me to keep the initial molotov unaltered. It seems that removing molotov_explode2 is enough.
  15. Thanks a lot Robeloto ! How does the game connects the molotov item with the SoudDataNode ? Is it through some hard-coded connection from the explosion.particleindex to the sound node, or is there a xml property somewhere ? I ask because I would like to change the sound of a custom molotov item, not the base one. Do you mean it exists in all "/molotov_exploden" (n=1,2,3) ? Removing molotov_explode1 is not enough ?
×
×
  • Create New...