Jump to content

s_f

Member
  • Content Count

    11
  • Joined

  • Last visited

Recent Profile Visitors

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

  1. Started work on a new module ItemWrapper which is to add additional functionalities non-intrusively around item types (note: NOT InventoryItem, but the item definition objects). The basic idea is to make it easy to query/find relations between items (and recipes) to hopefully achieve the following: 1) get rid of manual "compatibility patches" to support new items in other mods, by using general scripts to automatically find and include items that can be used by a mod instead. (e.g. giving new weapons with accompanying ammo to NPCs in an NPC mod) 2) allow pr
  2. Result of a recipe has to be multiplied with the "Count" of the result item's definition. e.g. for the above case, 556Bullets have a Count of 5 in the item definition item 556Bullets { Count = 5, Weight = 0.025, AlwaysWelcomeGift = TRUE, Type = Normal, DisplayName = .556 Ammo, DisplayCategory = Ammo, Icon = RifleAmmo308loose, MetalValue = 1, } item 556Box { Weight = 1, AlwaysWelcomeGift = TRUE, Type = Normal, DisplayName = Box of .556 Bullets, DisplayCate
  3. EDIT: Solution in next post. I noticed that the "count" required for packing/unpacking ammo boxes differs by a factor of 5. Why is this so? recipe Open Box of .556 Ammo { 556Box, Result:556Bullets=12, Sound:PutItemInBag, Time:5.0, } recipe Place .556 Ammo in Box { 556Bullets=60, Result:556Box, Sound:PutItemInBag, Time:5.0, }
  4. seems like the modding community (for scripting) is either not very active, or this forum isn't the place? If anybody know of a better place to get help on scripting, please give me the directions. It will be very much welcomed. Or it may seem that my foray into PZ modding have to be ended prematurely...
  5. s_f

    [idea] model for NPC AI

    Adding an example: Example: possible emergent behavior possibly achievable from above model: Scenario: Survivors before meeting zombies. - Hungry ones will try to find and eat food - Tired ones will rest (sit on ground, or nearby chairs) - Inhured ones will try to treat/bandage. Scenario: Survivors met with zombies. - All previous actions (from bnefore meeting zombies) are interrupted. - Cowardly ones may simply run away, while others will try to fight back while the odds are good. - But when the odds turns bad (more zombies approach), they may all try t
  6. --- TL;DR: imagined model for ai-related stuff meant to drive NPC (mods). Should be of interest only for mod developers related to NPC stuff. --- a (wip) simple conceptial model for NPC ai (for potential NPC mods) dumped for ideas exchange. Pls note that it is just a first attempt made over a short period of time by a relatively new player who does not understand the whole game system that well yet. So take it with a pinch of salt if something is not applicable (will appreciate feedback on those though) as it is mostly just a dump of ideas without much foll
  7. EDIT: nvm. solved it myself. The solution is as follows (for people who might need it) ---- -- Assume that we have a scriptItem we get from getSCcriptManager():getAllItems() local scriptItem = ... -- the way to access some properties/methods like MaxAmmo and MagazineType is to use the id to create an InventoryItem local item = InventoryItemFactory.CreateItem(scriptItem:getFullName()) -- then we can access those properties local magazineType = item:getMagazineType() local maxAmmo = item:getMaxAmmo() Hope this is useful for somebody ---- I supposed that ge
  8. Adding more info It seems that the file "recipecode.lua" cannot be found/required. I have the testing code in "shared", but the above file is in "server". How is the server, shared and client folders managed? I had thought that they will be overlapped wrt require, but is not sure how the code should be split. If I am writing something in shared (as a utility) that needs the above file, how can I access it?
  9. I am trying to look into a possibly better "standard" for manipulating items (adding/removing/changing etc) via items The aim is to allow mods to mesh better together without having to explicitly know each others content or list each other as explicit requirement (prob used to order how the scripts are "built" when the game starts) For item manipulations, I've broadly categorized into 3 categories (if anybody has ideas on improvement, please comment) 1. Item adding 2. Item manipulation/removing 3. analysis/mass processing (e.g. prepare lists of ite
  10. Basically, I wanted to try modding. But I wanted to keep my sanity as well. So as a way of digesting what I have learnt (PZ and lua), as well as a way of paving the possibility of actually creating/extending a content mod (I am very interested in NPC related ones btw), I've started to put together a "library" of "building blocks" of sort initially for my own use. But it was slow, especially when I am stopped by many points which cannot continue until somebody can help me (e.g. in forums). So I thought of maybe sharing my current work and idea, with some goals in mind
  11. Hi. Seeking help regarding a particular thing with recipes (via lua) The "[Recipe.GetAllItemTypes.*]" tags are often seen in vanilla recipes, which I assumed is a short hand for managing extensible list of tools that serve the same function (Hammer, CanOpener, Saw, Screwdriver). However, there seems to be only a few categories, and I am not sure how items are actually added to the list (I suspect it is the "Tags" definition in items scripts?) I've found seemingly related definitions in recipecode.lua and tried to access the functions, but failed. requiring the fi
×
×
  • Create New...