Jump to content

Colin

Member
  • Posts

    30
  • Joined

  • Last visited

Everything posted by Colin

  1. I've been searching through the javadoc but was not able to find the info I'm looking for. Is it possible on registered onPlayerDeath event to get the zombie object that will be re-animated (after IsoDeadBody i assume)? Specifically I'd like to set the zombie type.
  2. Hi there, I'm currently nearing completion of a mod, but I would like to add 1 last thing. I need to be able to store a "rating" value for each player. I am testing with player:getModData(), but these values seem to be assigned to the actual character. When the player creates a new character, these variables are gone. If someone can point me in the right direction
  3. Thanks guys, this will do the job for now --// --// Clear all skills and xp --// Author: Colin J.D. Stewart | Updated: 15.08.2022 --// local function clearSkills(player) local pl = PerkFactory.PerkList; local xp = player:getXp(); for i = 0, pl:size()-1 do local pk = pl:get(i):getType(); player:level0(pk); --// Thanks Hugo Qwerty xp:setXPToLevel(pk, player:getPerkLevel(pk)); --//Thanks Tchernobill xp:setPerkBoost(pk, 0); xp:getMultiplierMap():remove(pk); end; end;
  4. Great, level0 is ideal if curLevel > 0 then player:level0(pk); end; However, it still does not clear the xp boosts, the api docs don't have much info filled unfortunately.... Once I get home later tonight I will check through all the apis for what I need. Thanks.
  5. Temporarily I have written the following function to perform more or less what I want. --// --// Clear all skills and xp --// Author: Colin J.D. Stewart | Updated: 14.08.2022 --// local function clearSkillLevels(player) local pl = PerkFactory.PerkList; local xp = player:getXp(); for i = 0, pl:size()-1 do local info = pl:get(i); local pk = info:getType(); local curLevel = player:getPerkLevel(pk); if curLevel > 0 then for i = curLevel, 0, -1 do player:LoseLevel(pk); end; end; xp:setXPToLevel(pk, player:getPerkLevel(pk)); end; end; If there is no better way, then if someone can point me in right direction to also clear xp boosts for each skill. Thanks.
  6. I'd like to reset character skill levels and xp through lua. I have found the function LoseLevel, but this would require lots of checking current level and various other wasteful calls. Is it possible to do a full reset of skill levels? Or will I need to build a custom function to run through all skills. -Colin
  7. Oh, great will check it out, thanks
  8. I have some ideas for a game-mode I plan to build, but one of the things I need is a server config that forces the client to bypass character selection screen (ideally with a Lua event for programmatically generating character). -Colin
  9. I had a feeling there would be no way to bypass it, I guess bypassing character creation needs to be a feature request Thank you
  10. Hi there, First off, long time player, I haven't posted in a very long time and i've never bothered with modding really.... (which I plan to start, I come from a modding Arma 3 etc), so greetings to everyone! My question and first plan is.... is it possible to bypass the character creation, obtain the survivor object and programmatically assign traits etc? Kind Regards,
  11. Actually it would be better to do this as an interval check, this will it will be more accurate and will not take up too many cycles. Basically on tick cycle, keep track of ms passed and every ~1 minute, do the check, since it should only be making changes if you are hanging around dead bodies anyway, if you're running along and there is a pile of bodies close by, it is no big deal but if you're hanging around them for several hours, this is another story!
  12. I am not asking for this feature, I just mentioned it would have been a good addition to the game
  13. Speak for yourself, regardless, I am not specifically stating this for electric vehicles, but for other potential items that would exist outside the predefined date..... as a procedural game content creator, game developer and programming language developer, I know exactly how much work it is developing features that require procedural generation or replacement.... creating new layouts for buildings is not hundreds of hours of work but instead days of planning and coordination, with some ideas between the current devs, I'm pretty sure they can do it...... (whether they would want to is a complete different story) buildings already can be pre-burned, so placing "invisible plots" for buildings that did not exist before and replacement buildings would not be difficult at all since they have already built the necessary tools.....
  14. I think it most definitely would be worth it (much more than vehicles), and it would not take much extra work to add in some additional items that are only spawned when the start date was > than item "introduction" date.
  15. That comparison is a bit over the top.... I think there is nothing wrong with a bit modern realism. Personally I'm not fond of cars in the game, since 90% of cars would have been taken out of the cities to escape, and most would be drained of fuel by the time u even find them.... bicycles would have been a better form of transport.
  16. Why not add it as a possibility? when you start a sandbox or server you can set the start date, if the start date is > 2010 or whatever, add electric vehicles in the spawn tables. Same goes for some other goodies that could be included, solar panels etc.
  17. I don't think this would quite fit the game.... however I do agree a little..... I think the problem is that you can die 1000 times and always recreate the same character..... I think there should be a multiplayer option that enforces random character starts, this way when they die they lose their character.... Imagine you get a random character with strong trait and good fitness.... you die, you respawn as another random with overweight obese.... that would suck, so it would make players really try NOT to die if they really want to keep their character... this worked very well with State of Decay, when you died and you took control of another member of the group, it sucked that the character you had came to like died, they had specific traits that you get used to, but if you are able to create a character with same traits over and over it takes away from the need to survive (because you can always get back to where you were)
  18. Does your torch have propane left? Edited: Nevermind, just seen you can barracade with metal sheets.
  19. Colin

    Swing State

    I agree with above ^ numerous times there have been hordes and with a pistol i have missed every shot.... even standing inches away from the zombie.... even the most useless of people could "accidently" shoot one of them... and at inches away is almost impossible to miss.....
  20. What????? When did this happen?? I must try this out. Thanks.
  21. Very cool idea, I like the idea of a working sink after water is off.... this could also make electrical skill more important as you would need to connect a pump inside of the barrel that will pump the water into a filter system and then to your tap! The filter system could be built with "plumbing" and "electrical" skill and would require maintenance to continue to filter the water. Not to mention a generator after the power goes out.
  22. Bug: Able to place objects over the compost bin. Related bug: Not able to pick up compost bin.
  23. Although I'm primarily an Assembly coder, I decided to give a shot making a very simple proof of concept lua script for testing, however I have zero experience with the PZ API and having a little difficulty finding the documentation for the API to perform tile/IsoObject destruction, currently I am testing with object:RemoveTileObject(floortile) which seems to work, however, it does not replicate over MP/network or remain permanent, there are a few other problems with the API so far but as a test bed to see how it would work I think it is fine. If anyone can tell me how to get RemoveTileObject to replicate on network, please do, I am very short on time at the moment, but if I solve this problem and make a few further adjustments I will post the script/mod as my first of hopefully many PZ mods.
  24. Probably, if a tile is "unstable", it should also use the lowest quality sprite, even if you have level 10... so if you build a tile outside of the possible range, it will use a level 1 floor sprite, this will give users a chance to think about whether it is safe to step on. There is also the possibility that it could instead receive damage as you walk on it and play a "creaking" sound, with enough time to turn back before it collapses.
×
×
  • Create New...