Jump to content

RegularX

Member
  • Posts

    379
  • Joined

  • Last visited

Community Answers

  1. RegularX's post in Help With Clothing was marked as the answer   
    I believe new clothing sprites are currently outside the ability to be modded.  If you mean a new item (without new graphics) - then that could be scripted.
  2. RegularX's post in Adding new professions in 2.9.9.17 was marked as the answer   
    You have to loop the spawn point in as well:
    http://theindiestone.com/forums/index.php/topic/1002-custom-professions/
  3. RegularX's post in getNumVisibleZombie/getNumChasingZombies was marked as the answer   
    It does indeed look like getVisible is just a wrapper/getter for getNumVisible.  Possibly shorthanded in the code at some point.
    My guess is that it works kinda like some of the stats setter, ie setPain, where you could set it but the engine will just reset it in short order anyway.  The biggest result of the number of visible zoms that I've seen is increasing panic (Tiger Blood in Xmod uses it to do the exact opposite) and it looks like the game is more or less constantly calculating it.
    I don't really know when/how ChasingZombies is set - if it's set by the AI then I suppose it's possible to subtract one from the other and obtain the number of non-visible ones that are chasing the player?  That seems way too simple to be true, though.
  4. RegularX's post in Ammo with delta values? was marked as the answer   
    You might look at the Xmod codebase (see the WIP forum).  I have two weapons which have completely different ammo schemes.  One is the SilverPistol which hooks into the ReloadManager, and the other is the SUPRGun - which is solar powered and so has its own ammo based on ModData for the item.  If you are doing a bow and arrow type thing, the former might be what you want ... the latter is more for a weapon which doesn't have a normal source of ammo (like arrows and bullets).
     
    As RoboMat said though - hooking into ReloadManager is non-trivial and requires Lua effort, though.
  5. RegularX's post in Trying to make a cure was marked as the answer   
    I'd let you peek at the Romero's Tonic in Xmod if it was anywhere ready for consumption.  But to get you down the right path:
     
    Look at how Bandages work in the current Lua files.  You'll need an item, you'll need to add a hook to the ItemContextMenu, you don't need but probably should have an TimedAction to show the player using the item (which is one thing I don't have in Xmod, but is in the SICmod code).
     
    Then if you want to cure infection, the easiest way is to:
    getPlayer():getBodyDamage():RestoreToFullHealth();Which removes damage and infection level for all body parts.  A more subtle approach (similar to how Disinfect works in SICmod) is:
    self.bodyPart:SetInfected(false);self.bodyPart:SetFakeInfected(false);self.character:getBodyDamage():setInf(false); self.character:getBodyDamage():setInfectionLevel(0);iow, you need to set infection level on any injured body part and the main body damage as well (AFAIK).
  6. RegularX's post in Custom Professions was marked as the answer   
    OK I think I got it:
     
    add require "NPCs/MainCreationMethods" to your professions lua Append the spawnPoint: XProfessions.DoSpawnPoint = function() print("Xmod:: Updating Spawn Points"); BaseGameCharacterDetails.spawnPoint.smartEmployee = {And then add the hook: Events.OnGameBoot.Add(XProfessions.DoSpawnPoint);  
    And I think that will add to the current definition without having to completely overwrite anything.  Both my custom profession and an old profession proceeded to get into the game.
  7. RegularX's post in Getting / Setting Player Status was marked as the answer   
    Well the issue seems to have been that I was modifying the infection in bodyDamage but not the bodyPart - and I think the infection update obviously checks the whole enchilada.  
×
×
  • Create New...