Fallout Tactics mod How to add randomized loot to random enctouners

Discussion in 'Fallout Tactics Modding' started by Bigwilleh, May 3, 2019.

  1. Bigwilleh

    Bigwilleh First time out of the vault

    28
    Apr 30, 2019
    Hello,

    Another thing I'd like to append to random encounters is some randomized bonus loot, and/or randomized kits on humanoid mobs.

    What I'd like to do is add a chance for raiders, reavers, beast lords etc. to occationally have things like medkits, doctor bags, repair kits, drugs, and alternate weapon loadouts beyond the normal 7.62 loadouts, with better chances of better loot in harder encounters.

    Since I'm playing with an open world mod that encourages a lot of exploration, I'd like to be able to reasonably keep myself stocked on basic combat supplies in doing so (since the game's pool of kits, drugs, and non-7.62 ammo is finite).

    Essentially, my question is can I implement this by editing the existing actors in the encounter draw pools, or do I have to implement this by adding completely new actors?

    -Bigwilleh
     
  2. nadeauhugo

    nadeauhugo Author of FOT mod THE SUM Modder

    460
    Mar 9, 2014
    I think you have two options here :

    1. Only edit random encounters tables. You change one of the loaded actors in the tables to have a very low chance of appearing : 2 to 5 % chance. Then you edit that actor to give him/her a medkit, for example. Once in a while, you will get a medkit from this particular actor. The downside is the player will always know there is a medkit when seeing that specific actor.

    2. Duplicate all actors and give them special items. Then edit the random encounters tables and duplicate all the actors with the new names, giving them a really small chance of appearing : 1 to 3 % chance. This way, most of the time when you have an actor he/she does not have the medkit, but sometimes one of the lot has a special item.
     
  3. Bigwilleh

    Bigwilleh First time out of the vault

    28
    Apr 30, 2019
    So in essence, no there isn't a way to add condititionals to the loot tables on the npcs entries in the editor, I do in fact have to make new entries.

    I can work with copy-pasta methodology, I would have just prefered a more elegant solution that would be easier to balance test.

    Thanks for the input.
     
  4. nadeauhugo

    nadeauhugo Author of FOT mod THE SUM Modder

    460
    Mar 9, 2014
    Yeah. When it comes to Fallout Tactics engine, there are not a lot of "elegant" solutions to be found. Maybe later when Melindil LUA codes will be more developped, but for now you must stick to copy-pasta methodology as you say, specially when trying to do global stuff, like new functions that apply to your whole mod. I did so much copy-paste when modding, I think I spent half my time doing this :P
     
  5. Bigwilleh

    Bigwilleh First time out of the vault

    28
    Apr 30, 2019
    Related inquiries about this:

    1. Do changes to campaign.txt in the core/tables folder apply on loading any game, or on starting a campaign? In particular, I just changed removed the dead robots from the reavers encounters because I was getting annoyed at encountering "reavers" and seeing nothing but 8 dead robots on what is supposed to be an 8 mob encounter, but when I restarted game and reloaded, first reaver encounter was one reaver and 7 dead robots.

    2. How does the "Non Lootable" field in the inventory field calculate? Ie, does it:

    • i) Subtract its number from the total pool, and whatever number is left is what you can loot if the result is positive
      ii) Roll a dice roll and the result removes loot based on the non lootable DC as it reads (ie non lootable of 100 means you can never loot the item)
      iii) Rolls a dice roll and the result removes loot based on the non lootable DC but inverse to how it reads since programmers have dyslexic moments too (ie non lootable of 0 means you can never loot the item)
      iv) Do something totally different that I haven't even conceived of
     
  6. nadeauhugo

    nadeauhugo Author of FOT mod THE SUM Modder

    460
    Mar 9, 2014
    Hi Bigwilleh,

    In fact, changing campaign.txt does nothing. You need to import campaign.txt data into the Campaign editor for it to apply to a campaign of your choice, usually bos.cam. Then, each new game done with that campaign will be updated.

    Secondly, the non lootable field do nothing of the sort, or iv :P. What it does is HIDE the number of items indicated from the inventory, preventing them being looted. NPC still have the number of items listed, they just don't show them when you loot. It can be useful to :

    1. Hide a certain amount of bullets from a NPC inventory. That NPC can shoot them, then the player only receive SOME bullets (the remaining bullets minus the non-lootable ones). You can also give some extra stimpacks to your NPC that way.

    You can also check the non-lootable option in the items entity editor. It is useful to :

    1. Remove an item entirely from your mod. It is not perfect, as if that type of item was placed on the ground, it will still be there, BUT it will not appear in your inventory when you grab it. BUT it will still be there, so it will weight some pounds... Be careful if you use that.

    2. Adding a 0 pound invisible tagged items to a character or NPC. These items will always stay in the inventory. You then can use triggers to identify an entity. Ex : A NPC with the item tag "mayor", or "slave". It is different from a tagname, as you can assign as many tag items as you want.
     
  7. Bigwilleh

    Bigwilleh First time out of the vault

    28
    Apr 30, 2019
    My presumption then would be this would apply only on starting up a new campaign, and doesn't do anything to a campaign in progress.

    Although I see now my wording wasn't great, thats essentially what I meant with outcome i) ;)

    Interesting ideas to work with. If I get ambitious enough to try to go in and fix up some exploits and/or broken triggers I found in the mod I'm playing (notably its way too easy to abuse drugs in some of the open world cities to obtain easy loot, and some rooms that trigger hostility break the game), I presume this is a good place to start looking.