Fo2: Encounters & Team number function

Muttie

Still Mildly Glowing
Modder
[EDIT: I decided to remove my rubbish and replace it with a summary.]

Team_num function of worldmap.txt:
An option to assign encounters a “team_num=<#>”.
It seems as if an encounter (EDIT: proto) assigns every critter without a script a default team number. The “team_num” function allows to replace that default team-number with another.

That means I could add “script-less” dogs to an encounter and use the team_num function to put them on the same team as some of the “scripted” critters. For example, team_num=45 would ally the script-less dogs with script 256 (Raiders). However, this does not fix their “passive” status in any way or form, they only react to their team attacking or being attacked (in this case 45) and their team reacts to them being attacked (i.e. they are fully part of team 45).

This could be useful with critters who don't need a script to function properly. Like a single dog in a group of travellers.

But first of all it seems to be a fail-safe that makes sure every critter of an encounter is on the same team. However, useful that is...

(Note: The only time this is ever used (possibly for a reason) is in the first prototype encounter [Encounter: Raiders] of Fo2's worldmap.txt. That was the one I was playing around with to learn how things work.)
 
Last edited:
I then tested some more and it seems another feature of this (team_num) use is that it needs a proto that has no script assigned to it.

I think it's more likely that the script assigned to the critter is already setting a team number. So you might set it in worldmap.txt, but the script will set it to something else.
It's probably better to make simple scripts for the script-less critters, simply so it will keep attacking and the player can't lame himself out of a fight.

the humans can be fixed by adding them to scripts.lst/scrname.msg
The thing with scrname.msg is that you then can't use that script anymore for other critters - the names will always be overridden. So you better be really, really sure that it isn't used by other critters as well.
 
Yes... but didn't I say that...? I think I did.

Maybe. You write many words, maybe you should shorten your thoughts. :>

Still, if you want to fix all “AND” encounters in Fo2 that's about 50+ new scripts, basically a script for every combination of “AND” encounter there is.

Why? Make them all attack by default and assign the same team number. Then give everyone the same script.

The team number means nothing unless it's set to 0 (player team). They can all have team number 1 as far as the game cares. If you are in combat with team x, team x will attack. So just put them all into the same team and done.

However, what I meant was that it (apparently) works to create a “script” let's call it “Desperado.int” without actually creating a script, just an entry in scrname.msg (i.e. at the end of the list add a new number, new name etc). And then assign this new “empty” script to every critter you want the game to call “Desperado” when looked at or hit in combat or attacks etc.

Well this is stupid, don't do this. I can already feel this fucking up some shit in the game somewhere. Besides, if you already add a fake script, might as well just add a real script.

I think you're thinking way too much about this. As far as I can see, what's important is:
1. All enemies attack the player
2. All enemies are in the same team

Both these things are easily achieved. Make a generic "hostile critter" script without look and description procedure - this script makes the critter always attacks the player on sight. Now put all hostile critters from the encounter into the same team. Done.

If you want to give them all custom names that override the generic critter name, you'll have to make a new script for each.
 
Last edited:
Yep.
Part of the problem is that I'm trying to figure it out while talking about it.
Summarizing requires knowledge and control over the topic, which I don't have.
Nvm. I think I learned a little.
Besides, it doesn't matter that much, I just found that function to allign unscripted critters with a team number and I thought it's better than what Fo2/RP2.3.3 encounters are at the moment.
But, eventually there seems to be no other way than to create a new script for most encounters (especially for those that have talking critters). Allthough a good chunck may be simplified with a generic "hostile critter" script.
 
Back
Top