Fallout 2 mod Is the script aibkdor.int used in maps other than arcaves.map?

banjo_oz

First time out of the vault
Just wondering if anyone super familiar with modding the game can answer this:

Is the script "aibkdor" used anywhere else in the game except on the door you blow up in the Temple of Trials at the start of the game? I wanted to ask since I am currently editing that script for a mod and suddenly worried it might be used elsewhere too!

Also, is there any way to "scan" for script usage on maps without loading them one at a time in the mapper?
 
It's only used in the temple.

If you open a map and press the I key, it will show you the placed scripts / objects. However, there is a limit of how many are displayed and on higher resolution it'll be easily too much.
 
It's only used in the temple.

If you open a map and press the I key, it will show you the placed scripts / objects. However, there is a limit of how many are displayed and on higher resolution it'll be easily too much.
Thanks so much! I hoped that was the case. Appreciate the quick reply. Having fun learning basic scripting/modding and suddenly got hit with that worry.

Yeah, I can display the scripts on a map (thanks for explaining why the ones shown seemed to be random though, I wondered why) but that means opening *every* map. Was just hoping there was a way to get a list of "this script is used on the following maps: x, x, x, x" but I was expecting there wasn't.
 
Nah, there isn't. These scripts all have a specific prefix which tells you in what location they are used. In this case, ai means "arroyo, item" (usable objects, etc), ac means "arroyo, critter" and so on. Generic scripts which could be used anywhere all start with z... though that much should be obvious, considering the script files are sorted in these folders by default.
 
Nah, there isn't. These scripts all have a specific prefix which tells you in what location they are used. In this case, ai means "arroyo, item" (usable objects, etc), ac means "arroyo, critter" and so on. Generic scripts which could be used anywhere all start with z... though that much should be obvious, considering the script files are sorted in these folders by default.
Thanks, that makes sense. I figured out they were often named after their areas, but didn't know that the "i" and "c" stand for item, critter, etc. Very helpful.

Not really related but I didn't want to start a new thread... can you tell me if calling something like "critter_dmg(self_obj, 100, 6)" in a dialog node should also trigger all the "destroy_p_proc" stuff in their script? I made a node that blows up the critter talking, but I notice I don't get the karma hit for killing a "good" critter even though they are set up that way. Killing them normally by just attacking gives the correct karma hit. I tried to fix it by adding "destroy_object(self_obj)" after the damage but that just crashes the game (possibly it's trying to destroy the same critter - itself - twice?). Adding "inc_good_critter" to the same node does nothing either. I feel I'm missing something obvious.

EDIT: correction, calling "inc_good_critter" or even setting the global variable for good critter kills manually causes the game to crash when you enter the main Arroyo village map.

My node code:
set_local_var(LVAR_Defeated, 1);
set_local_var(LVAR_Start_Trial, 2);
set_map_var(MVAR_Passed_Fighting, Fighting_Finished);
set_global_var(GVAR_START_ARROYO_TRIAL, TRIAL_CHEAT);
set_global_var(GVAR_DUMAR_STATUS, 1);
inc_general_rep(REP_BONUS_ARROYO_TRIAL_FIGHT_BOMB);
end_dialogue;
float_msg(self_obj, message_str(749, 354), 8);
explosion(13728, 2, 0);
critter_dmg(self_obj, 100, 6);

... but can't get it to increment "a good critter was killed" no matter where I put the needed lines. :( (REP_BONUS_ARROYO_TRIAL_FIGHT_BOMB = 40 incidentally)
 
Last edited:
destroy_object(x) will delete the object.
You could call the destroy_p_proc before killing the critter. However, the inc_good_critter macro is usable everywhere, not just in the destroy procedure.
 
destroy_object(x) will delete the object.
You could call the destroy_p_proc before killing the critter. However, the inc_good_critter macro is usable everywhere, not just in the destroy procedure.
Thanks for the help!

That was to be my workaround (blow them up and also call inc_good_critter) but I can't get it to work.

Why would inc_good_critter not do anything when I use it (no ";" after it, according to the sfall script editor) in the posted code?

set_local_var(LVAR_Defeated, 1);
set_local_var(LVAR_Start_Trial, 2);
set_map_var(MVAR_Passed_Fighting, Fighting_Finished);
set_global_var(GVAR_START_ARROYO_TRIAL, TRIAL_CHEAT);
set_global_var(GVAR_DUMAR_STATUS, 1);
inc_general_rep(REP_BONUS_ARROYO_TRIAL_FIGHT_BOMB);
inc_good_critter
end_dialogue;
float_msg(self_obj, message_str(749, 354), 8);
explosion(13728, 2, 0);
critter_dmg(self_obj, 100, 6);

Probably not helpful without all the code, but that's all I'm adding and it does nothing (no karma notification or changes it should generate, just the ones from inc_general_rep. Setting the global value for the number of good critters killed manually (via "set_global_var(GVAR_GOOD_MONSTER, (GVAR_GOOD_MONSTER + 1));") instead of the inc_good_critter line causes the game to crash but *only* when entering the next map, which had me baffled (only thing I can think of is that it doesn't like the math, maybe the global variable isn't set to anything yet since it's the start of the game?!).

I did notice that command/script order very much matters; doing "inc_general_rep" after "end_dialog" crashed the game as did doing anything after "critter_dmg" (more understandable, because I assume killing it stops the scripts?).
 
(via "set_global_var(GVAR_GOOD_MONSTER, (GVAR_GOOD_MONSTER + 1));")

Well, this line is wrong. It should be
Code:
set_global_var(GVAR_GOOD_MONSTER, global_var(GVAR_GOOD_MONSTER) + 1);

If you look at the inc_good_critter macro definition, you will see that there is a (source_obj == dude_obj) condition. That means, this code will only run if the source (trigger of the kill / procedure) is the player, which in your dialog case doesn't happen.

By the way, once the critter is dead, the script will stop running. So whatever you will add after the kill won't run anymore.
 
Well, this line is wrong. It should be
Code:
set_global_var(GVAR_GOOD_MONSTER, global_var(GVAR_GOOD_MONSTER) + 1);

If you look at the inc_good_critter macro definition, you will see that there is a (source_obj == dude_obj) condition. That means, this code will only run if the source (trigger of the kill / procedure) is the player, which in your dialog case doesn't happen.

By the way, once the critter is dead, the script will stop running. So whatever you will add after the kill won't run anymore.
Doh! That explains why that gvar command caused crashing (it was probably setting the value to a string and thus went nuts when the next map tried to check it?). Thanks, it works now.

Yup, I replicated the contents of the inc_good_critter macro in my script and it seems to work (right karma hit and no crash on map load).

I really appreciate your help! It's fun learning to mod a game I love so much yet was previously almost unmoddable (back in the early 2000s anyway), and it seems the tools are finally at a level that it's not as hard as it once was... but I'm definitely still learning a lot of this stuff!

One final question: blowing up an NPC via a script like this obviously doesn't increment the players "kills" count (since the script killed them, not the player). What is the code to manually increment a player's kill count for a certain type (say, "Men" or "Robots")?
 
You can use sfall's mod_kill_counter(TYPE, amount) function. The defines of kill types are in define.h (KILL_TYPE_*), and the amount is how many you want to increase/decrease.
For example, to increase the kill count of robots by 2: mod_kill_counter(KILL_TYPE_robot_kills, 2)
 
Last edited:
You can use sfall's mod_kill_count(TYPE, amount) function. The defines of kill types are in define.h (KILL_TYPE_*), and the amount is how many you want to increase/decrease.
For example, to increase the kill count of robots by 2: mod_kill_count(KILL_TYPE_robot_kills, 2)
Thanks heaps! That works great (though I think the macro should be "mod_kill_counter", right?).
 
Back
Top