Dr_Cox1911 Posted June 18, 2016 Share Posted June 18, 2016 (edited) Greetings, I was looking into the Last Stand shop system the last couple of hours and "built" a version for SP/MP. It´s not really a mod written by me, mora straight copy from RJ´s code. Hope it´s OK RJ What´s the mod for? Coxis Shop gives you money for each zed killed. With said money you can then buy gear/skills. Quick look: Spoiler Video: Does this work in MP/Splitscreen? I´ve tested it with dedicated server and it worked, hosting through the main game is not support currently. I didn´t had the chance to test it in splitscreen, but it should give both players money when one of them kills a zombie. What language is supported? The mod currently supports german and english. Can I configure the items/skills available? As of version 1.2.0 yes, you can! Atleast for the items, skills are not configurable just now. Apart from the items you can set the amount a player receives and on what probability. If you use the mod in MP the settings made on the server will be transmitted to the client upon connecting. After you have changed something you need to restart the server. Here is a short description on how to configure the mod: Spoiler Shipped with the mod comes a file named „CoxisShopSettings.ini“. If you downloaded the mod through github you should find it in „Zomboid\mods\CoxisShop“, if you got it from the Steam workshop its located under „Steam\steamapps\workshop\content\108600\786594784\mods\CoxisShop“. The file is structured like a normal ini-file, that means there are sections (indicated with []) and keys with values (under the sections) Let´s have a look at the section „[BASIC]“. It has the keys „amount“ and „random“. The value from „amount“ is per default 20, which means: When a player kills a zombie he will get 20 money. The key „random“ is responsibly for the randomisation. The higher the number the less likely the player will receive money after he killed a zombie. Setting the value to zero will give the player the money after every kill, 100 and he will never get it, 50 on the other hand is a 50/50 chance. Now on to the other sections. They work pretty much all the same, so I will only describe the „[WEAPONS]“ section. Each key is an item in the shop, the value (the part after the =) is the prize of it. The key has to be the scriptname of the item, you can find those in „Steam\steamapps\common\ProjectZomboid\media\scripts“. Don´t forget the module (look at the top of the file). You can also add items from mods. You can add as many items as you want. Can I improve the mod? Of course you can! The mod is available on Github, please feel free to extend the mod, just keep in mind to share the changes with everyone. Changelog: Spoiler ### Version 1.4.2 - skills above 10 aren´t listed anymore ### Version 1.4.1 - removed debug prints from ISCoxisShopPanelSkills - skillcosts are now rounded to whole numbers ### Version 1.4.0 - skills are now definable in ini - skill "goldbonus" removed for now ### Version 1.3.0 - bugfix: integrated LuaNet to get rid of the "all players earn money in MP"-bug - dialog informing the player that the settings aren´t loaded yet - bugfix: new character after player died in MP is fixed now (proper reinit) - definable shop key in the game options (thanks to blindcoder) - player starts now with 0 money instead of 100 ### Version 1.2.0 - definable settings within the "CoxisShopSettings.ini" - define the amount of money gained - define the randomness of money gain (not the amount is random, but you won´t get money after each zombie kill) - define the items available in the shop (with prize setting aswell) - now need the mod "CoxisUtils" to work ("CoxisUtils" reads the ini-file) - new section "food/drink" ### Version 1.1.0 - support for dedicated server MP (Coop not working) ### Version 1.0.0 - basic functionalitiy like the shop from challenge had - only SP Link to Github) DOWNLOAD WORKSHOP DOWNLOAD (CoxisUtil) Edited February 6, 2017 by Dr_Cox1911 v1.4.2 Snakeman, Jack Bower, Bughunter66 and 3 others 6 Link to comment Share on other sites More sharing options...
ProjectSky Posted June 20, 2016 Share Posted June 20, 2016 A great MOD But do not work in multiplayer Link to comment Share on other sites More sharing options...
Dr_Cox1911 Posted June 28, 2016 Author Share Posted June 28, 2016 Sorry for the late reply. Did you get any errors when testing it in MP? I´ve currently no testserver up&running but will setup one the next couple of days and give the mod in MP a go. What I forgot to mention: This version has is still WIP, so to test things you can cheat money in with the "L" key. Link to comment Share on other sites More sharing options...
Dr_Cox1911 Posted October 24, 2016 Author Share Posted October 24, 2016 (edited) Sorry for not looking back at this sooner. I just finished the new version with dedicated multiplayer support. Servers hosted from the main game don´t work, sorry for that. I didn´t test splitscreen either. EDIT: Just uploaded the mod to the steam workshop, but beware! If you download from github the debug-function to add money is activated (press "L"), downloaded from steam workshop and you won´t be able to debug it! Edited October 24, 2016 by Dr_Cox1911 added to steam workshop Link to comment Share on other sites More sharing options...
Dr_Cox1911 Posted October 30, 2016 Author Share Posted October 30, 2016 (edited) Pushed a new version (only to git at the moment) The debug flag is false for right now. Changes: Spoiler ### Version 1.2.0 - definable settings within the "CoxisShopSettings.ini" - define the amount of money gained - define the randomness of money gain (not the amount is random, but you won´t get money after each zombie kill) - define the items available in the shop (with prize setting aswell) - now need the mod "CoxisUtils" to work ("CoxisUtils" reads the ini-file) - new section "food/drink" I need some input from you guys, what items (and the according prizes) would you like to see in the default settings ini? Of course you can alter this ini to your liking, but shipping with a decent one right of the bat would be necessary I think. Edited October 30, 2016 by Dr_Cox1911 Link to comment Share on other sites More sharing options...
ProjectSky Posted October 30, 2016 Share Posted October 30, 2016 Awesome Link to comment Share on other sites More sharing options...
justcrow Posted October 30, 2016 Share Posted October 30, 2016 Good work Can we subscribe this updated mod and play in MP in steam workshop now? And I'm wondering how to set the option, the amount of money to gain and random money Link to comment Share on other sites More sharing options...
Dr_Cox1911 Posted October 30, 2016 Author Share Posted October 30, 2016 Added the link to CoxisUtil to the first post. Sorry for the additional mod that this is requiring now, but I think I will need the CoxisUtil for more of my mods in the future @justcrow I will give detailed instructions on how to alter the settings in time, just need to write it. After I´m done writing I will update the Steam release as well. As you guys might have noticed: The skills are still the same (=old system). Will migrate them to the new one for the next version, until then you won´t be able to define the skills available in the ini. Link to comment Share on other sites More sharing options...
justcrow Posted October 30, 2016 Share Posted October 30, 2016 (edited) 6 minutes ago, Dr_Cox1911 said: Added the link to CoxisUtil to the first post. Sorry for the additional mod that this is requiring now, but I think I will need the CoxisUtil for more of my mods in the future @justcrow I will give detailed instructions on how to alter the settings in time, just need to write it. After I´m done writing I will update the Steam release as well. As you guys might have noticed: The skills are still the same (=old system). Will migrate them to the new one for the next version, until then you won´t be able to define the skills available in the ini. oops! Sorry about that. I understood. Thank you Doc! Edited October 30, 2016 by justcrow Link to comment Share on other sites More sharing options...
Dr_Cox1911 Posted October 30, 2016 Author Share Posted October 30, 2016 (edited) Just added in a short description on how to alter the settings (see the first post). The skills will be defined pretty much the same as the items, I have this structure in mind: [SKILLS] Perks.Woodwork=600 I also plan on increasing the cost each level the player wants to buy, e.g. carpentry lvl 3 will cost more than lvl 2. This all is planned for 1.3. Edited October 30, 2016 by Dr_Cox1911 Link to comment Share on other sites More sharing options...
justcrow Posted October 30, 2016 Share Posted October 30, 2016 I'm waiting for the updated version to come in the steam workshop As soon as it is updated, I will play it. Hurrah! Link to comment Share on other sites More sharing options...
Dr_Cox1911 Posted November 1, 2016 Author Share Posted November 1, 2016 @Sky_Orc_Mm I just looked at this weird overflow issue you posted on discord. Unfortunately I can´t seem to preproduce it, here is a screen of the shop on my end: I tried altering the length and unless I stress it to extreme lengths it works on my end. Will push this version to Steam workshop now after altering the default CoxisShopSettings.ini a bit, but will further investigate this error. Is it OK with you to release the chinese translation to the workshop? Link to comment Share on other sites More sharing options...
ProjectSky Posted November 1, 2016 Share Posted November 1, 2016 (edited) 24 minutes ago, Dr_Cox1911 said: I just looked at this weird overflow issue you posted on discord. Nope. I edited the ISCoxisShop.lua file by adding a few new buttons that you can try this version. It should reproduce the problems I mentioned. CoxisShop(edit).zip Edited November 1, 2016 by Sky_Orc_Mm file error. Link to comment Share on other sites More sharing options...
justcrow Posted November 1, 2016 Share Posted November 1, 2016 Great work Link to comment Share on other sites More sharing options...
justcrow Posted November 1, 2016 Share Posted November 1, 2016 @Dr_Cox1911 : Could you please answer my question ? I asked many times but nobody did. The question is, the money piled up by users could be initialized after death? Link to comment Share on other sites More sharing options...
Dr_Cox1911 Posted November 1, 2016 Author Share Posted November 1, 2016 It is re-initialized upon death (which means: 100) Link to comment Share on other sites More sharing options...
justcrow Posted November 1, 2016 Share Posted November 1, 2016 1 minute ago, Dr_Cox1911 said: It is re-initialized upon death (which means: 100) Oh, you mean every player start with 100 money or 100% loss? Link to comment Share on other sites More sharing options...
Dr_Cox1911 Posted November 1, 2016 Author Share Posted November 1, 2016 (edited) Every player starts with 100 money (this value can´t be changed right now, will put this on the todo list for 1.3). After death you will start again with 100 money. All money you earned is lost when the player dies. Edited November 1, 2016 by Dr_Cox1911 Link to comment Share on other sites More sharing options...
justcrow Posted November 1, 2016 Share Posted November 1, 2016 (edited) 13 minutes ago, Dr_Cox1911 said: Every player starts with 100 money (this value can´t be changed right now, will put this on the todo list for 1.3). After death you will start again with 100 money. All money you earned is lost when the player dies. Thank you for a quick answer. Well, getting with 100 makes a easy start, I think. In MP, users can buy 100-money valued items(if there are in the server)and die on purpose to do the same thing or they can make lots of accounts to do the same thing. For example If the 9mmbullets are 100 in the server, 5times death on purpose gives them lots of bullets from start. Before death, they could drop the items that they bought with 100 and repeat. Starting with 0 must be done as soon as possible Edited November 1, 2016 by justcrow Link to comment Share on other sites More sharing options...
justcrow Posted November 1, 2016 Share Posted November 1, 2016 oops! Pressing key "O" causes "number in the red box" in the bottom right and never shows up the shop. Why is that? Link to comment Share on other sites More sharing options...
Dr_Cox1911 Posted November 1, 2016 Author Share Posted November 1, 2016 Can´t tell without the console.txt. Did you load the mod "CoxisUtil" as well? Link to comment Share on other sites More sharing options...
justcrow Posted November 1, 2016 Share Posted November 1, 2016 8 minutes ago, Dr_Cox1911 said: Can´t tell without the console.txt. Did you load the mod "CoxisUtil" as well? oh, yes! thank you It works perfectly! Link to comment Share on other sites More sharing options...
justcrow Posted November 1, 2016 Share Posted November 1, 2016 another problem happend. Why is the money increased with nothing to do. I just stood on the ground and could see the money raised. That other users kill zombies could cause this problem? I think shop system may share with all players. Link to comment Share on other sites More sharing options...
justcrow Posted November 2, 2016 Share Posted November 2, 2016 (edited) Red box pops up whenever pressing "O" key. Yesterday it happened for a while and then it worked after a few minutes. But following day, the red box happened again pressing "O" key. Here is console message. Any problem? attempted index: setEnable of non-table: null ----------------------------------------- STACK TRACE ----------------------------------------- function: reloadButtons -- file: ISCoxisShopPanel.lua line # 137 function: reloadButtons -- file: ISCoxisShop.lua line # 69 function: showUpgradeScreen -- file: CoxisShop.lua line # 58 function: onKeyPressed -- file: CoxisShop.lua line # 94 java.lang.RuntimeException: attempted index: setEnable of non-table: null at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1549) at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:623) 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.pcallvoid(KahluaThread.java:1672) at se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:53) at se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:81) at zombie.Lua.Event.trigger(Event.java:37) at zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:83) at zombie.input.GameKeyboard.update(GameKeyboard.java:48) at zombie.GameWindow.logic(GameWindow.java:571) at zombie.GameWindow.run(GameWindow.java:1233) at zombie.GameWindow.maina(GameWindow.java:1015) at zombie.gameStates.MainScreenState.main(MainScreenState.java:177) ----------------------------------------- STACK TRACE ----------------------------------------- function: reloadButtons -- file: ISCoxisShopPanel.lua line # 137 function: reloadButtons -- file: ISCoxisShop.lua line # 69 function: showUpgradeScreen -- file: CoxisShop.lua line # 58 function: onKeyPressed -- file: CoxisShop.lua line # 94 Edited November 2, 2016 by justcrow Link to comment Share on other sites More sharing options...
Dr_Cox1911 Posted November 3, 2016 Author Share Posted November 3, 2016 @justcrow Is the shop window working for anybody? Any errors on the server side? If there are no errors on the server than the players are pressing "o" to quickly after joining the server. It takes a short while to receive the settings. Could you check the server for any errors and tell the players with problems to wait a minute after joining before opening the shop? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now