Fallout 2 mod some guide required related to writing of my own mod..

gustarballs1983

Vault Fossil
Modder
As in thread, since I'm literally fresh to scripting, i have little knowledge on getting the Fo2 Syntax right (as I know neither of the programing languages) i just took things on a hunch, and would like someone to convert this to proper fallout syntax..

this would be a rope script in the section: use_object_on_p_proc

Code:
procedure use_obj_on_p_proc
begin
if combat_is_initialized then terminate_combat else if target_obj(not in(party_member_list ,0) and if (critter_state(target_obj) bwand CRITTER_IS_PRONE) then begin
if pid_item_rope qty<2 end else if pid_item_rope qty>=2 then destroy_mult_objs(pid_item_rope, 2) party_add(target_obj);
add_obj_to_inven(target_obj,pid_item_rope) critter_inven_obj(target_obj, INVEN_TYPE_RIGHT_HAND);
add_obj_to_inven(target_obj,pid_item_rope) critter_inven_obj(target_obj, INVEN_TYPE_LEFT_HAND);
end
if target_obj(is in(party_member_list,0) and
pid_item_rope is_not_in critter_inven_obj(target_obj, INVEN_TYPE_RIGHT_HAND) and or in critter_inven_obj(target_obj, INVEN_TYPE_LEFT_HAND) then set( target_obj) agression level 100%;
start combat
end

I would like to have this consultated with Fo2 scripting experts, i may in the future add to the script, so it may require further refining, all would be kept in the same thread.
oh yeah almst forgot to write what i wanted to achive:
after using rope on an unconsious ( yeah i used prone as there is no unconsious state according to what i know), the script would check if dude has at least two ropes. end script if not, or destroy two ropes and add the unconsious critter to dude's party. two ropes would then spawn on the unconsious critter, one in left hand slot one in right hand slot, and condition would be set so that when trying to remove the ropes from one the other or both handslots would turn the critter hostile, I'm trying to achive this from outside of a given critter script, as i want it to work on any given critter at least for now, for the sake of simplicity.
 
Last edited:
Your thing is really hard to read and understand. Doubt you will get much help with that. Not even your if-then's are closing corrctly and sometimes they are in a new line and sometimes they aren't.

This is what I have puzzled out of what you posted, but to make it work ingame or with whatever you want to use it, you'll have to learn how to write ssl.
Code:
procedure use_obj_on_p_proc begin
   if combat_is_initialized then begin // Combat would always end if you use anything on the object
      terminate_combat
   end
   else if target_obj(not in(party_member_list ,0) and (critter_state(target_obj) bwand CRITTER_IS_PRONE) then begin
      if pid_item_rope qty < 2 then // ???????
      if pid_item_rope qty>=2 then begin
         destroy_mult_objs(pid_item_rope, 2)
         party_add(target_obj);
         add_obj_to_inven(target_obj,pid_item_rope)
         critter_inven_obj(target_obj, INVEN_TYPE_RIGHT_HAND);
         add_obj_to_inven(target_obj,pid_item_rope)
         critter_inven_obj(target_obj, INVEN_TYPE_LEFT_HAND);
      end
      if target_obj(is in(party_member_list,0) and pid_item_rope is_not_in critter_inven_obj(target_obj, INVEN_TYPE_RIGHT_HAND) and or in critter_inven_obj(target_obj, INVEN_TYPE_LEFT_HAND) then begin
         set( target_obj) agression level 100%; // ????? what is this
         start combat
      end
   end
end

My advice is to start with something easier.
 
Your thing is really hard to read and understand. Doubt you will get much help with that. Not even your if-then's are closing corrctly and sometimes they are in a new line and sometimes they aren't.

This is what I have puzzled out of what you posted, but to make it work ingame or with whatever you want to use it, you'll have to learn how to write ssl.
Code:
procedure use_obj_on_p_proc begin
   if combat_is_initialized then begin // Combat would always end if you use anything on the object
      terminate_combat
   end
   else if target_obj(not in(party_member_list ,0) and (critter_state(target_obj) bwand CRITTER_IS_PRONE) then begin
      if pid_item_rope qty < 2 then //  then go to end since if dude has not enaugh rope this part of the script shouldn't launch
      if pid_item_rope qty>=2 then begin
         destroy_mult_objs(pid_item_rope, 2)
         party_add(target_obj);
         add_obj_to_inven(target_obj,pid_item_rope)
         critter_inven_obj(target_obj, INVEN_TYPE_RIGHT_HAND);
         add_obj_to_inven(target_obj,pid_item_rope)
         critter_inven_obj(target_obj, INVEN_TYPE_LEFT_HAND);
      end
      if target_obj(is in(party_member_list,0) and pid_item_rope is_not_in critter_inven_obj(target_obj, INVEN_TYPE_RIGHT_HAND) and or in critter_inven_obj(target_obj, INVEN_TYPE_LEFT_HAND) then begin
         set( target_obj) agression level 100%; // ????? what is this: this is to set agression level of the critter the rope was removed from either hand item slot ( if it was enslaved first)
         start combat
      end
   end
end

My advice is to start with something easier.

Yeah I should probably learn how to code and fallout syntax in general first :p
although I figured I'm too stupid to remember all that..
I have an idea to make a mod, and mimick on paper what i expect the script to perform ( although without correct syntax since duh no place to learn this or i'll just forget everything shortly afterwards, because I'm too dumb).

anyways thanks for initial response..
I actually hoped someone will translate my gibberish pseudocode into proper klingon academy syntax.
although as You've said it still is not 100% correct.

what i wanted from the code was:
if i make a critter unconsious ( i used prone since i know of no unconsious state in fallout scripts) and i use a rope on a critter, then if i have inly one rope nothing happens, but if i have two or more ropes, two get removed from dudes inventory, the unconsious critter gets added to my party, two ropes get added to the said enslaved critter's inventory and moved onto right&left hand item slots, from that point on forward, any removal of the ropes from either handslot causes the critter to full aggro the player and start combat..

this is for starters..

additionally I wanted the rope script to attach ( switch from any egsisting to a given one) script to the enslaved critter, which would replace it's original script, with a given custom script to allow basic control over the enslaved critter.
however this is for later, although i wanted to discuss that as well in this thread too only later.

it would be good if the enslaved critters would be added to party as *unlisted* a.k.a party members not counting towards party member limit, however that's a song of the future as well.. for now i just wanted to try the simplest possible stuff from the beginning.
 
Keep in mind that you can't just add anyone to your party and then travel the world. There are lots of limitations that can't be workarounded easily.

Someone else around here wanted to make a mod like that in the past, it of course didn't work out.
 
I bet it was me mentioning this back then and It was You putting my expectations to rest :p

However I'd like to have those limitations explained more perhaps we'll figure out some workarounds..

in worst case scenario the mod will require a full new game start in order to play, as certain key files will have to be edited, I think that's not a big deal..
 
Every party member needs a unique proto ID. Random critters from encounters all have the same proto ID, so the idea is already failing here.
 
Have You checked what happens when there are two or more party members with the same proto ID?
isn't the recent sfall fix to critters shering the same protoid not to bug out when using debuff meds on one critter so the effect won't be applied to all of them fixes most of the issues?
 
Drugs and party members is not the same thing. If multiple party members with the same proto ID spawn in a map, shit gets fucked up.
 
Back
Top