NEO Scavenger Modding Documentation

117 posts / 0 new
Last post

2. Yeah, that is how I'm doing it right now. I was just hoping that this system could be more modular so that I don't have to repeat a lot of code.

Now for the hard part.

1. Okay. The way I do it right now is as follows.

The item is created with a aPossessConditions 200=1.
Condition 1 is a condition that does nothing except delaying everything for 1 turn and after that triggering condition 2.
Condition 2 triggers encounter 1.

After that if item is not equipped it should be deleted. The problem is that Encounter 1 doesn't see item that triggered it so I can't use bRemoveUsed and using nRemoveTreasureID deletes only equipped item.

Another problem is that player can leave hex before encounter is triggered. :/

Unless I am missing something obvious I don't see a way to fix it. Should I just scrap this idea altogether?

Hm, you may be trying to do something the game is not able to do.

aPossessConditions 200=1 should be fine. However, beware that leaving the hex will remove condition 1 again, because the item that added the condition gets removed from slot 200 when leaving the hex.

If you stay in the hex and end your turn, does the encounter trigger? If not, are there any aPreConditions set on the encounter that might block it?

For something like what you're doing, the best solution I found was the merga wraith corpse. It triggers an encounter immediately upon hitting the ground, and the corpse disappears after 1 turn (i.e. it degrades 100% per turn, or the triggered encounter removes it, one or the other).

There might be other ways of approaching it, though, depending on your goals.

Dan Fedor - Founder, Blue Bottle Games

Okay it seams that game doesn't support the thing I'm trying to do. :(

Any chance that someday we will be able to force equip items in encounter?

Also it seams that bNested>1< Treasuretables if used in recipe stops game from parsing that recipe(new content). Can somebody confirm it? I think it was possible before. New bug?

I think the only item I can force equip right now is the "crippled" item or skills/traits. "Crippled" is done behind the scenes as part of the injury system, and skills/traits are special cases, since they involve slots the player doesn't change after character creation.

I may add it some day (I think it's a good idea), but unless it is necessary for a plot encounter, it'll probably be secondary to any higher priority tasks.

As for bNested, are you sure the item isn't appearing inside another item? Or that "suppress" isn't set to be true? Kaaven and I did a lot of testing of treasures after the mod-merging change, and I'm pretty sure we had full soup cans within other containers.

Dan Fedor - Founder, Blue Bottle Games

Here is the link for a simple example. When I try to run a game whit it I get "Parsing recipe hints.row:1" error. If I remove bNested flag everything works okay. :/

I also remember doing it in previous version but now it refuses to work for me.

Quick question: is it possible yet to add new traits/disadvantages for player selection at the start of the game? I read somewhere here that character creation wasn't yet moddable in previous (pre-9922) versions, but I wasn't sure if it had been since fixed and wanted to ask before wasting ages trying to do something not yet possible. :)

My Mods:SaveMan|Fishing|Shouldered|Bottles

Its possible. You have to overwrite treasuretables 587 & 588.

@DnaJur, thanks for the sample data. It turned out to be an interesting special case!

It looks like there is a null pointer bug if the game has a recipe pointing to a bNested treasure. bNested is fine on its own, but recipes are special cases where the game tries to create their output treasure as the game is loading.

I've made some changes to the code so this treasure generation is deferred until after all data is loaded. It seems to bypass the bug you found, and will be in the next build.

Thanks again!

Dan Fedor - Founder, Blue Bottle Games

Spawning smartphone with a specific software seams to not work. (or I'm doing it wrong)

Spoiler: Highlight to view
<table name="treasuretable"> <column name="id">2</column> <column name="strName">SmartPhone</column> <column name="aTreasures">0:8.12x1x1,0:35.6x1x1-1</column> <column name="bNested">1</column> <column name="bSuppress">1</column> <column name="bIdentify">0</column> </table>

Gives you empty smartphone.

Spoiler: Highlight to view
<table name="treasuretable"> <column name="id">2</column> <column name="strName">SmartPhone</column> <column name="aTreasures">0:8.12x1x1,0:33.5x1x6,0:10.3x1x240</column> <column name="bNested">1</column> <column name="bSuppress">1</column> <column name="bIdentify">0</column> </table>

Works ok. (Smartphone with batteries and charges)

Another problem(more of exploit really) is that when looting cryo facility with skills you get damaged multitool but if you don't use skill while scavenging and instead use it from inside cryo facility, you get 100% multitool.(same goes for medic stuff)
Listing it as vLoot and making it scavenge encounter doesn't give you anything.

I don't understand why can we spawn only treasure quality ( 100% ) items in encounters and not loot quality ( random% )? It doesn't fundamentally change anything(probably), it's just strange.

Can I just totally delete the first encounter with the Dogman in the start of the game through the original .xml file? Because Mr.Pistol Whip asked me to transform the game where you play as a Melonhead. Can I also just somehow lock the ranged gun attacks for the character somehow because when I delete them (I knew this would happen) it gets stuck at Parsing creatures : Row 17. Thanks cus this will help me make the mod for the community.

I typed ze wrong name :( lol. I wanted sanjrang.

You can dot those things by using overwrite mod (mod "0"/zero).

To make it work, you have to copy all the encounters, which lead to the dogman encounter and remove all the "aResponses" that allow players to move into that part. Then you will have to edit the very first encounters, and remove any mentions of dogman being there, and add some way of safely exiting the Cryo Lab.

<--Mighty (mini)Mod of Doom-->
DeviantArt Gallery of MoD Sprites

Thanks it helped a lot.

I typed ze wrong name :( lol. I wanted sanjrang.

@DnaJur, this could be a bug in the charged items code. Software can't be manipulated in a device that's switched off, and maybe the loot system is struggling with that. I'll add that to my list.

As for weathered loot in encounters, it's likely something I've overlooked. Creatures and scavenge loot are weathered, but encounters are not. I'll add that to my wishlist, too.


Dan Fedor - Founder, Blue Bottle Games

How can I make my character have less attacks (Attacks only a Melonhead can do) ? Even I know I can't just delete them.

I typed ze wrong name :( lol. I wanted sanjrang.

You can try giving player condition 392 trough custom trait.

Thanks so much I never noticed this thanks a lot. I was trying to change everything to the story of a Melonhead.

I typed ze wrong name :( lol. I wanted sanjrang.

Is it possible to

1. change the status bars, and to
2. expand the status bars?

For example to add a status bar like joy. So if the player didn't get anything joyful to live for, like a warm meal or gummy bears or something like that he gets depressed and finally would commit suicide if he couldn't find a reason to live anymore.

In the current modding system it is not possible to add a new bar. But you can edit one of the existing ones - it would be a rather large piece of work, but you could re-name one, change all the things that affect it and create new relations for it to exist in.

For example, you could re-name thirst, all it's related conditions, into Happiness, then modify what they do and change what affects them. Inside the game file it would still be called Thirst, but in the game it would work like a Happiness bar.

<--Mighty (mini)Mod of Doom-->
DeviantArt Gallery of MoD Sprites

Great, thanks! I will give it a try. :)

Another question:
Is it possible to add another screen, similar to the vehicle screen, for example to make a follower screen for a person that follows you like a vehicle would and would carry stuff or maybe even help you in a battle.
You could then make battlemoves where you would need two people, like hold a guy and then hit him with the other or something similar.

No, it is not possible to add any new screens, bars, stats, etc. You can only edit existing stuff.

<--Mighty (mini)Mod of Doom-->
DeviantArt Gallery of MoD Sprites

Ok I have encountered some very strange behaviour when overwriting conditions.
My conditions are identical to those of the game but when in game they get applied constantly to the player and all other NPCs.

Could somebody explain how vChanceType and vUsConditions in battle moves work? Specifically these [A,B,C] constructions. A is obviously applied condition id but what are B and C for?

Also it seams that we have an simultaneous recipe limit of 10 which kind of suck.:(

OK, so first of all, the condition 301 (beaten to death while partying) lacks "bPermanent" (should be 1). That is causing auto-death at start.

Also, next one, condition 320 (died of smallpox) lacks anything in "vIDNext" info-field. All other have 0 in there, but I don't know if it does anything bad.

Now, point b - the whole construction of the battlemoves is described by Dan in the first post of this very topic. But fast reminder - it goes like this [nCondition,nCheckType,fChance]. Condition is obvious, nCheckType is the kind of "throw" it has to use:

1 =happens no matter what
2 =requires a melee attack roll to happen
3 =requires a ranged attack roll to happen
4 =requires a terrain trip roll to happen
5 =requires a terrain trip roll to happen (modified by next term, e.g. 2.0 is double chance)
6 =requires a morale check to happen
7 =requires a flat probability to happen (specified in next parameter)
8 =requires an escape check to happen

and nChance is... chance. Works like anywhere else: 1=100%, 0.5=50%, 0.01=1%, etc.

And what do you mean by simultaneous recipe limit?

EDIT: Also a word of warning (to save you some time figuring our what does not work) - there is a bug that makes overwritten attack moves not do any damage or carry conditions. Dan has a fix for this already and said that he will include it in the next build. So don't be surprised by that :D

<--Mighty (mini)Mod of Doom-->
DeviantArt Gallery of MoD Sprites

Still I think there is some problem with import code. All those condition are to the letter identical to the originals. After fixing 301 and 320 you constantly get random conditions as do other NPCs.

WOW am I blind or what?! I was sure OP post only spoke about encounters.
Thank you for the warning that was exactly the reason I was wondering about battle moves.(condition wasn't applying correctly):p

By simultaneous recipes I mean that in crafting window no matter how many possible results there are, only first 10 get displayed.For example, item with property 1 by itself can give 11 result in crafting but in crafting window only 10 of those will be displayed.(makes more sense now?)

Yup, there is still a problem it seems and it looks like a bug in mod loading. You can write a priv to Dan, describing the problem, with the link to this post and wait till he gets back.

<--Mighty (mini)Mod of Doom-->
DeviantArt Gallery of MoD Sprites

Yeah, been three years and still just ten outputs displayed.,,

Spoiler: Highlight to view
Lel, why would be there something interesing here? Keep surfing

Thanks for helping everyone out here, Kaaven!

That last issue with the constantly reapplying conditions sounds strange. It could be a bug. If it's still giving you trouble, feel free to PM me like Kaaven says!

Dan Fedor - Founder, Blue Bottle Games

I'm interested in how important proper nGroupID categorizing is?

In my mods I like to assign nGroupIDs more or less randomly.
But it seams certain nGroupIDs are handled differently than others. nGroupID 7 always is news paper even if you create your own item. nGroupID 8 always displays its monetary value (even if it's 0). nGroupID 12 probably is handled as camp site and 36 I presume always will be computer data.Don't know about 90.

Do I need to always make sure that weapons are in weapon id group and clothes are in clothes id group? (I don't have to do it, right? Because I hope I don't.)

If not posting a list of reserved nGroupIDs(those that are handled differently) somewhere in OP post would be extremely useful.

Also how skills and traits block each other?(Myopia<->Eagle Eye)Can it be moded? Can skill block another skill?

Update 2
Idk if this is a known bug.(probably is) Kaaven told that overwritten battle moves do not apply conditions or do damage. New battle moves do apply condition but they don't use namespaces.(e.g. [0:187,0,0] won't assign condition but [187,0,0] will)
As I said, I presume it's the same bug but no harm in making sure I guess.

nGroupID can be important for some item types, but most can be anything. I'll re-post this in the OP, but the nGroupIDs to watch out for are:

7, //headlines
8, //hardware
9, //recipe scrap
12, //camps
20, //crippled (e.g. blocks hands if arm crippled)
25, //terrain resource (e.g. forest, lake, power tap)
26, //camp fixture (e.g. HVAC, light)
36, //datafiles
90, //encounter item (e.g. cryo console, cryo window)
91, //skill
96, //trait
103 //scavenge location

weapons can be anything, as can clothes.

Skill/Trait blocking is unfortunately hard-coded at the moment.

And I'll make note of the namespace issue in battle moves, thanks!

Dan Fedor - Founder, Blue Bottle Games

With new AI encounter system how does AI chose his response in the encounter? Or he simply goes to the next encounter(eg ,=1x1x0x0x0 or another one that has no 412 pre condition)? What will happen if AI gets locked in a constant loop or has no exit from the encounter?

Also small bug. SetImmunity effect does not use namespaces(same as battlemoves before)(eg SetImmunity=0:N does not work but SetImmunity=N does).

Also shouldn't GUI Container 93.4 have aContentIDs 37?

Update #2
Ok judging by encounter 1730 AI simply "clicks" confirm(<column name="aResponses">=1743x1x0x0x0,=1731x1x0x0x0</column>) and then encounter is triggered based on pre conditions. Question about no exit encounter loops still stands.

Update #3
My specific bug with electronics still stands: click.(Use mechanic skill in crafting)
All data simply disappears from the device in 2 out of 3 cases.

Good question! The AI is always assumed to choose an empty response. So you'll want to make sure the encounter automatically goes to the next one, or quits. Loops would be bad :)

I've made a note to look into the SetImmunity issue. I may have forgotten to add it to the look-up table for the remapper. Ditto for the 93.4 item missing ID 37.

I'll also check out that crafting bug. I naively hoped the software fix I made would also fix that issue. Guess not!

Thanks for the heads-up!

Dan Fedor - Founder, Blue Bottle Games

Just an update: I was able to figure out the missing software issue. It was a problem with the phone sometimes missing charges in its default state, so the custom phone item couldn't add software when that was the case. I made some changes to the code so hardware items are always assumed to be "charged" during initialization, and only check for charge after items have been added.

As for 93.4 having aContentID 37, it turns out this is not necessary. 37 is a special item type that only works on the crafting screen, and is used to make sure items from the crafting screen don't accidentally end up in the "real" world.

The crafting screen uses copies of all the original items, so we can see them all in a flat list without disturbing container packing/organization, etc.

Dan Fedor - Founder, Blue Bottle Games

Okay than shouldn't gas mask filter be reassigned a different format type? Because right now it is 37 and gas mask without changeable filters does not make much sense.

Actually, you're right. I'm not sure what I was thinking, as 17 is the crafting ID, not 37. I've fixed that now, thanks!

Dan Fedor - Founder, Blue Bottle Games


So I've been rummaging around and trying out various configurations for conditions and I was changing the value of EncumberanceLimit for Trait: Strong. I would change it from 50 to 75 and notice that the status bar for encumbrance would say I'm unburdened but I would still have the burdened condition itself. Why is this?

Addendum: To elaborate a bit more, here's what I would do: I would enter the game and equip an amount of equipment such that both the bar and the condition monitor would say I am burdened, then I would save and exit the game. Then I would go into the xml file, change the value as above, save, then reenter the game. Where upon I would discover the aforementioned paradox. Now if I did the same above only this time unequip enough items such that I don't have the burdened condition, proceed with the same steps, then reenter, I would find that they two agree and things work as expected.

Thank you,

Hey Neal,

This sounds like a "stuck condition," which sometimes happens when you change game rules between saves, such as your first example. The trigger for removing the "burdened" condition is messed up by the change in encumbrance thresholds between saves.

In your second example, the change you made only worked coincidentally because you saved and loaded within the same encumbrance range. Usually, the best practice is to make any game rules changes before starting a new game, to avoid such save game issues.

Hope this helps!

Dan Fedor - Founder, Blue Bottle Games

I am currently working on a scavenge location for a forest and am using the forest shack as a base example for it.

I would like to increase the chances of finding a specific item in this hex like a backpack or rifle. But at the same time make it a hard scavenge location to find. Kind of like the plane wreckage.

Cannibal Family Picnic

I have some questions about Modding:

I took some time and make a little mod about cultivating...

So now i dont now how to set the size and make them edible, can you also explain me how to set how much there filling?

Found the food thing our myself, puh that was some work, but still not knows how the sizething work.

What do you exactly mean by size? How big is the item? If that's the case item is as big as it's image is - each "grid" in the inventory is 10x10 pixels in size. So an item that is 30x40 pixels (including empty background) will take 3x4 inventory grids.

For the Big UI setting, all the sizes are simply 200% bigger, so a grid is 20x20 pixels and items have to be 2x in size as well.

Does that answer your question?

<--Mighty (mini)Mod of Doom-->
DeviantArt Gallery of MoD Sprites

Completely, thanks.

I can't for the life of me figure out how the treasure table syntax works. Is the first number supposed to be the item ID x loot chance x number of items received? I can't seem to find any correlation between these numbers and the chance an item spawns.

It goes like this:

(item's "Group").(item's subGroup)x(chance to spawn)x(number to spawn)


item from group 78 (torso clothes), subGroup 8 (long hide coat), with 60% chance to drop (0.6=60%, 0.03=3%, 0.99=99%, 1.0=100%), and if it drops, there will be 1-3 of them.

Sometimes, treasure table might call another treasure table, which follows the same syntax, only instead of group and subgroup, you have treasure table ID.



25% chance for 1-3 items from treasure table 414.

<--Mighty (mini)Mod of Doom-->
DeviantArt Gallery of MoD Sprites

Wow, that's complicated. Not to mention the fact that there's a separate item ID in addition to the group ID and subGroup ID. I'm trying to repair Banjo's labels mod, which doesn't seem to have the pen as an item on any of the treasure tables.

Can you please please please update the documentation on that from posts etc?

Modding is complicated enough, without having to go through the entire forum to find one specific response to one specific question about what is actually quite a common case.

Additionally, further information on encounters, recipes, etc would be a good thing to add.

i can't apply a vUsPreConditions to a condition can i? like have a condition check to see if player has a condition before being applied?

OverHaul Mod
DevKit is an upgraded BBC mod.
Improve your mods.

hey there, just a players feedback not really into creating stuff but certainly wondering around seeing how things work in the game, but i digress.
I ran into trouble triggering the white lady encounter in the forest. no matter how many times i walked through she would not show up, I would get stomped and I would be sad.
I since then delved into the code with the knowledge you provided and found the condition for encountering the lady seems to never be granted anywhere in the code and therefore the encounter can never be triggered. I've since added the granting of this condition to some other random encounter and have since (after quite a few scums) encountered the white lady.

based on your formula one of the forest events has the encounter coded in and calculated but the encounter itself has the aPreCondition of being able to meet the white lady which, as I said, is not granted anywhere else in the code.

just got me into looking at the extensive code that this game has and it goes without saying that I'm impressed with it, stay awesome!

this is only vaguely related to the topic but may be important to someone to keep in mind that if you are going to aPreCondition something be sure to grant that condition at some point XD


huh when i seen a forest talking to me i got the hell outa there

OverHaul Mod
DevKit is an upgraded BBC mod.
Improve your mods.

How do the camp site values work? I wanted to change the exam room 17 values to be higher. I can't figure out how, since the bars on the campsite stats never change! What am I doing wrong?

Spoiler: Highlight to view
table name="camptypes"
column name="id">8</column
column name="strDesc">Exam Room 17</column
column name="vImageList">ItmScavengeCryo01.png</column
column name="aCapacities">34x26</column
column name="nTreasureID">163</column
column name="m_fAlertness">-0.9</column
column name="m_fVisibility">0.1</column
column name="WetTempAdjustMod">-15</column
column name="m_fHealPerHourMod">0.94</column
column name="fSleepQuality">-0.98</column
<table name="camptypes"> <column name="id">8</column> <column name="strDesc">Exam Room 17</column> <column name="vImageList">ItmScavengeCryo01.png</column> <column name="aCapacities">17x26</column> <column name="nTreasureID">163</column> <column name="m_fAlertness">0.3</column> <column name="m_fVisibility">-0.8</column> <column name="WetTempAdjustMod">-15</column> <column name="m_fHealPerHourMod">0.04</column> <column name="fSleepQuality">-0.18</column> </table>

aCapacities - size of the inventory grid (X x Y, so in this case 17 grids wide and 26 high)

nTreasureID - ID of a treasure table, which contains what items will be in this campsite (if any, for most places it will be 3, which means nothing)

m_fAlertness - base chance the player will wake up, if the NPC will come here while he sleeping here (0.3 means 30% [I think]).

m_fVisibility - how much the camp affects how visible the player is to the NPCs (-0.8 means -80%)

WetTempAdjustMod - a.k.a. shelter, how much the place protects from rain (max rain effect is 15 degrees Fahrenheit, so 0 means no protection and -15 means this place protects the player totally)

m_fHealPerHourMod - how staying here affects healing rate. +0.04 is actually very good (it's the same bonus as being Medic)

fSleepQuality - how sleeping here affects the chance to sleep without waking. Since the default is neutral (0), most places actually detract from that value (sleeping on the ground isn't cool, no matter where). The lesser the detraction, the more comfortable the floor is in here :D

<--Mighty (mini)Mod of Doom-->
DeviantArt Gallery of MoD Sprites

i think the recently added {hr} lines make it alittle more cluttered

OverHaul Mod
DevKit is an upgraded BBC mod.
Improve your mods.