Jump to content

francogp

Member
  • Posts

    200
  • Joined

  • Last visited

Everything posted by francogp

  1. You can simply do that on the MOD folder, with a new lua file dedicated to that. For example, in my new code, I detect your mod using this: if (getDir ~= nil ) then --load models but it's not too elegant (and safe)
  2. New version 0.2: Lots of new internal code. Now the mod does not override any vanilla Hydrocraft files. If you run this patch without ModelLoader, you will see default placeholders instead of 3d weapons. NOTE: If you have installed v0.1, you must DELETE all hydrocraft files and REINSTALL it again, before installing this patch.
  3. Think that its solved, I'm using Events.OnPreMapLoad., but don't know its fine
  4. Another "related" question. Is there a way to access this items, but only after scripts loading time?
  5. thanks! I tried to do that search with cortana... but it seems to fail :S
  6. I can't find any lua file using that ScriptManager
  7. Hello, Is there a way to access in a lua file an item introduced via script file (located on the script folder)? I need to access an item and modify a value without overriding it (improving future compatibilities).
  8. Hello, I just want to modify some variables on other mod script, from my mod, only if the other mod is loaded (I use a lua function to detect it) for example, a mod declare this in it's script folder (this is just an example): module Hydrocraft { imports { Base, farming } /************************ITEMS************************/ item HCCream { Type = Food, DisplayName = Cream, Weight = 0.1, ThirstChange = -5, DaysTotallyRotten = 7, DaysFresh = 4, Icon = HCCream, } And from MY mod, I want to change the "wheight" from 0.1 to 0.2, but ONLY if "item HCCream" is declared (loaded from some script). I don't want to have a loading failed because that mod is not present. So, my mod should be something like a mod for a mod, only if that mod is installed, otherwise skip that. Can I do that? NOTE: I don't want to override ALL the file, only THAT variable, so the mod will be compatible in the future.
  9. Yes, I already do that... I manage to "shrink" your script to 20 lines as a "basic" script. Now I use that. I will post it as an example for others...
  10. Sorry , I said it wrong. I mean the DOCUMENTATION, in the OP.
  11. can you reformat your instructions? the new forum destroy them
  12. Can you add a variable defined in your lua files so we can use something like "require ModelLoader" on our mods? because if you don't have ModelLoader, it would be easier to know what's is missing in the console log (the actual error is confusing)
  13. that error was with YOUR code... My code fix it that and improve the spawning algorithm using ORGM code
  14. They are 3D models, not 2D art... they should work just fine... BUT modelloader is not compatible yet with 34.x so....
  15. Like I said in the picture, those are SOME of the weapons in the picture, I "think" that I have it ALL in the mod (including different material version, like copper, iron, bronze, etc).
  16. Here, I rewrite all your Loading.lua to work perfectly using ORGM mod and their spawning algorithms. I tested it, it work fine! Loading.lua NEW content (replace ALL other content): require "ORGMDistribution" SSilencer = {} SSilencer.getSprites = function() getTexture("Item_Silencer.png"); end table.insert(CivModTable, "Silencer.Silencer"); table.insert(NonCivModTable, "Silencer.Silencer"); print ("* Silencer / Suppressor Mod Loaded"); Events.OnGameBoot.Add(SSilencer.getSprites);
  17. I create a "patch" for Hydrocraft, adding 3D models. I need testing, and help with the missing model weapons or textures! Hope to be added as official items and not as modded patch soon. Some examples: Link to the thread:
  18. Hello, I create a "patch" for hydrocraft 5.7, that include 3D weapons for the mod. I need help on debugging and testing. I create a lot of the models, but some of them are based on free/without licence files that I found online. If someone think that I can't use some specific model, LET ME KNOW. To cheat all the weapons, read the instructions (you can enable and disable the cheat mode via config files). Some examples (not all weapons are in the picture, but all of them are in the patch ): Required: I think that I finished ALL the weapons. Please test this patch and let me know if I forgot to pack some texture or something is missing. ** DOWNLOAD LINK ** How to install: Just unzip and replace your hydrocraft mod folder with the hydrocraft folder in the zip file. What did I change on original Hydrocraft files?: I only replace the WeaponSprite variable with my custom models (named exactly like their item): for example: all this variables are changed using lua code, in the file 3DWeaponInjector.lua. What files did I ADD?: lots of model and textures, and 2 lua scripts: - client / 3DWeaponLoader.lua: It load all the models on memory. - client / 3DWeaponLoaderCHEAT.lua: It contain a way yo cheat ALL the weapons for testing. To enable the CHEAT, edit the "local CHEAT_MODE = false" to "true", and then pressing the key END (ingame) and all the weapons will appear on your inventory. - server / 3DWeaponInjector.lua: Inject all the new WeaponSprite values using my 3d models instead of placeholder objects. This guarantee compatibilities with future Hydrocraft versions. Current "problems": - The longbow looks funny when walking (PZ modding limitations, not my fault) - All the FLAILS looks funny because I can't animate the CHAIN. - There's lots of official bugs on animations, for example, if you walk strafing with A or D using something similar to a pistol, the weapon turn to the right looking awful... or when you walk the weapon will be rotated to the right. I can't fix that, it's PZ devs job . - Maybe I forgot some weapon or some texture Changelog:
  19. You should use the ORGM spawn algorithm for this items, because inserting that object in the vanilla table with 0.1 prob... it will spawn almost every 10 zombies if you hace lucky or unlucky traits.
  20. @nolanri I get this error: Loading: C:/Users/franc/Zomboid/mods/ORGM Silencer/media/lua/server/Loading.lua ------------------------------------------------------------- attempted index: items of non-table: null ----------------------------------------- STACK TRACE ----------------------------------------- function: Loading.lua -- file: Loading.lua line # 19 java.lang.RuntimeException: attempted index: items of non-table: null at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1549) at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:473) at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163) at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1727) at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1642) at se.krka.kahlua.integration.LuaCaller.pcall(LuaCaller.java:63) at se.krka.kahlua.integration.LuaCaller.protectedCall(LuaCaller.java:77) at zombie.Lua.LuaManager.RunLua(LuaManager.java:630) at zombie.Lua.LuaManager.RunLua(LuaManager.java:576) at zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:460) at zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:381) at zombie.gameStates.GameLoadingState.enter(GameLoadingState.java:101) at zombie.gameStates.GameStateMachine.update(GameStateMachine.java:145) at zombie.GameWindow.logic(GameWindow.java:619) at zombie.GameWindow.run(GameWindow.java:1173) at zombie.GameWindow.maina(GameWindow.java:974) at zombie.gameStates.MainScreenState.main(MainScreenState.java:173) ----------------------------------------- STACK TRACE ----------------------------------------- function: Loading.lua -- file: Loading.lua line # 19 mar 08, 2016 6:51:51 PM zombie.Lua.LuaManager RunLua SEVERE: null mar 08, 2016 6:51:51 PM zombie.Lua.LuaManager RunLua SEVERE: null java.lang.RuntimeException: at se.krka.kahlua.vm.KahluaUtil.fail(KahluaUtil.java:91) at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:1285) at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163) at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1727) at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1642) at se.krka.kahlua.integration.LuaCaller.pcall(LuaCaller.java:63) at se.krka.kahlua.integration.LuaCaller.protectedCall(LuaCaller.java:77) at zombie.Lua.LuaManager.RunLua(LuaManager.java:630) at zombie.Lua.LuaManager.RunLua(LuaManager.java:576) at zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:460) at zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:381) at zombie.gameStates.GameLoadingState.enter(GameLoadingState.java:101) at zombie.gameStates.GameStateMachine.update(GameStateMachine.java:145) at zombie.GameWindow.logic(GameWindow.java:619) at zombie.GameWindow.run(GameWindow.java:1173) at zombie.GameWindow.maina(GameWindow.java:974) at zombie.gameStates.MainScreenState.main(MainScreenState.java:173)
  21. Can you disable the new food system on a already created map? is there a variable on a file that I can change to do that? (it's because I don't want to use that food feature until food mods are up to date to the task)
  22. according to a lot of threads that I read about the loot spawn probabilities, it seems there's a bug in the math... so I will create my own spawn algorithm, and I will give you the patch for your mod EDIT: here.. I rebuild all your lua script with a CUSTOM random loot algorithm https://www.dropbox.com/s/x3sxnaqv8xpodnq/USMilitaryGear.zip?dl=0 I kill 100 guys, and I get only 5 of your items. I think that its balanced. Tested on weapon shops too. I create a table similar to the oficial one. The code is very simple.
  23. did someone create a good code for this kind of custom item loot probabilities?
  24. Hi, Is there a way to program my custom drop, without modifying the vanilla tables/rolls, for my custom items? the problem is that with the perk "lucky" I can obtain VERY EASY my super rare MODED ITEMS on zombies (in 10 minutes I managed to get 1/4 of them with that perk, and in theory I should get one of them per month). I want to create RARE items, with probabilities lesser than the 0.1 imposed by the perk "lucky". I already tried to see other mods, but they got a VERY complicated and long code, without comments and I need the "basic code" to do that on my way.
  25. Please, make roof tiles as walls, not "intangible" tiles, I broke my legs lots of times because of that mechanic issue.
×
×
  • Create New...