Fallout 2 mod FO2 Engine Tweaks (Sfall)

DForge said:
You mean, by the classical rename proto 315 to proto 314 and put in data folder and so on?

Or something else? Sorry, I'm really poor in modding. Do you have any particular script in mind?
No, I mean via script. i.e. the files in the folder named 'scripts'.

In the script of each party member, check if the player is over a certain level, and if they are set_critter_extra_stat away to your hearts content. You can even throw in a float_msg(self_obj, message_str(...)) to add to the authenticity if you like.
 
Timeslip said:
>Added new hook scripts hs_findtarget and hs_useobjon
Any procedure can be hookscripted, right? If so, could you also add a hook for description_p_proc? This would allow getting detailed descriptions of any object in game.

Timeslip said:
>Added an option to give npcs a second chance to spend left over ap at the end of their combat round
That's cool :ok: No more rounds wasted on finishing off a half-dead ant. Are you planning to further improve combat AI?

DForge said:
Hey Timeslip,

have you finally figured out the level 6 NPC bug? It's still a pain in the butt for us party maniacs and we still have to switch protos every time we install F2, which is annoying at best.
Why don't you edit party.txt and remove one of their intermediate levels instead? That's how I did, since it doesn't matter much how many levels a party member had when he reached his last one.
 
B-2Admirer said:
Any procedure can be hookscripted, right? If so, could you also add a hook for description_p_proc? This would allow getting detailed descriptions of any object in game.
Dare I ask, what on earth for? :?

B-2Admirer said:
Why don't you edit party.txt and remove one of their intermediate levels instead? That's how I did, since it doesn't matter much how many levels a party member had when he reached his last one.
Removing one of the intermediate levels is exactly what we're trying to avoid.
 
Timeslip said:
No, I mean via script. i.e. the files in the folder named 'scripts'.

In the script of each party member, check if the player is over a certain level, and if they are set_critter_extra_stat away to your hearts content. You can even throw in a float_msg(self_obj, message_str(...)) to add to the authenticity if you like.

That is brilliant (would it be possible to script "X has gained in some abilities" to the info screen to appear as well?). Too bad I suck too much in scripting to do it, but it's nice to know there is a near-legit method of fixing the bug. Would be nice if killap included it in Restoration Project 1.3



B-2Admirer said:
Why don't you edit party.txt and remove one of their intermediate levels instead? That's how I did, since it doesn't matter much how many levels a party member had when he reached his last one.

Doesn't it just change the pid and not the actual proto file to be loaded? Also that's the deal, to have them all and not remove one of them ;)
 
A really great job with the last version of sfall, Timeslip. Thanks for the hard work.

I was wondering if there is/could be a way to read and modify local vars of an existing object outside its own script, without exporting/importing variables between the scripts. The idea would be to read (and modify) local_var(X) of an object Y from a global script, or any other script.


Also, it is me or the function use_obj_on_obj() doesn't work on global scripts? Am I missing something?


Thanks.
 
Timeslip said:
B-2Admirer said:
Any procedure can be hookscripted, right? If so, could you also add a hook for description_p_proc? This would allow getting detailed descriptions of any object in game.
Dare I ask, what on earth for? :?
Could be useful for many things, for example it could enhance gameplay by informing the player what type of damage an enemy is most vulnerable to, so that the player could decide which weapon he would use...

DForge said:
Doesn't it just change the pid and not the actual proto file to be loaded?
What do you mean? Each PID has only one proto file associated with it, so if you change PID the proto file to be loaded is also giong to be chaged.
 
2.0b is out. The control all party members option is now slightly better behaved, but I haven't got the transparent bubble to move around automatically yet, and you may have to switch hands and back before the targeting cursor works properly. You can access the inventory menu, but the frm it displays will be wrong, and if you switch weapon, your frm in game wont update unless you switch hands and back.

That's probably the last release I'll be making for a while. I'm going on a fallout modding hiatus. :salute: (I will be working on my summoner mod a bit though, for anyone who still plays that.)

pelicano said:
I was wondering if there is/could be a way to read and modify local vars of an existing object outside its own script, without exporting/importing variables between the scripts. The idea would be to read (and modify) local_var(X) of an object Y from a global script, or any other script.
Probably. I already have a get_script function, and I know how fallout gets local variables from scripts, so it shouldn't be too hard to put the two together. The only limitation is that you'll probably have to access the local variables by index rather than name.

pelicano said:
Also, it is me or the function use_obj_on_obj() doesn't work on global scripts? Am I missing something?
If you're missing anything, it's probably set_self. :P

B-2Admirer said:
Could be useful for many things, for example it could enhance gameplay by informing the player what type of damage an enemy is most vulnerable to, so that the player could decide which weapon he would use...
oh, ok. You meant you wanted to set extra description text, not read it then. I could probably manage that.
 
Timeslip said:
Probably. I already have a get_script function, and I know how fallout gets local variables from scripts, so it shouldn't be too hard to put the two together. The only limitation is that you'll probably have to access the local variables by index rather than name.

Awesome! It's no big deal to get the variables by idex, I expected that much. The only problem lies in the scripts design itself, as many scripts use a local var named, say LVAR_Hostile, but in different indexes so they are different local variables :crazy:

Timeslip said:
If you're missing anything, it's probably set_self. :P

That's what I thought at first but I still missing something else. I made a quick global script to test it with no positive results. Is there something wrong in it?

Code:
procedure start;

variable down;

procedure start begin
variable oNpc;
variable oHealing_item;

  if(game_loaded) then begin
    set_global_script_repeat(1);
    oNpc := 0;
    oHealing_item := 0;
  end

  if(key_pressed(11)) then begin	// 0: TEST
    if(not down)then begin
      down:=1;
      oNpc := party_member_obj(16777305); // Cassidy
      if(oNpc)then begin
        oHealing_item := obj_carrying_pid_obj(oNpc,40); // stimpak
        if(oHealing_item)then begin
          float_msg(oNpc,"Item: "+obj_name(oHealing_item),0);
          //set_self(oNpc);
          //drop_obj(oHealing_item);
          set_self(oNpc);
          use_obj_on_obj(oHealing_item,self_obj);
        end
      end
    end
  end else begin
    down := 0;
  end
end
Upon pressing the key 0 (from the keyboard), the script will check if Cassidy is in the party and if he's carrying a stimpak. Then he's supposed to use it on himself. The drop_obj stuff is commented but it works fine. The use_obj_on_obj line is the only thing not triggering. Trying use_obj_on_obj(oHealing_item,dude_obj) didn't work either.

Sorry for the bother.
 
pelicano said:
Code:
          set_self(oNpc);
          use_obj_on_obj(oHealing_item,self_obj);
That wont work as written, because self_obj and use_obj_on_obj both require a 'self', and set_self only works for the immediately following function call. In that snippet, the self_obj function will act as if the script is attached to oNpc, but then use_obj_on_obj wont.

This should work better:
Code:
          set_self(oNpc);
          use_obj_on_obj(oHealing_item,oNpc);
although if replacing self_obj with dude_obj didn't work for you then there might be another problem.
 
Timeslip said:
This should work better:
Code:
          set_self(oNpc);
          use_obj_on_obj(oHealing_item,oNpc);
although if replacing self_obj with dude_obj didn't work for you then there might be another problem.

Ah, I should have mentioned that that code actually crashes the game...
 
pelicano said:
Ah, I should have mentioned that that code actually crashes the game...
Oh, that's not good. At least it's doing something though. ;)

It may be that use_obj_on_obj tries to get the self object twice, and set_self will cause sfall to only provide it the first time. I may need to make a longer lived version of set_self, or maybe use_obj_on_obj wont work from a global script even with a self object.

Edit: No, it doesn't. The only other thing I can suggest is to set_self something that isn't a critter, which will cause fallout to call _obj_use_item_on instead of _action_use_an_item_on_object internally. That has more change of working from a global script, but of course means that the critter wont animate.
 
I have a next question. :)

I know it is possible to edit / add new perks now. But is it also possible to edit the traits in the character creation screen? Replacing or adjusting them? I would like to change some stuff like gifted or finesse, etc.
 
Timeslip said:
In the script of each party member, check if the player is over a certain level, and if they are set_critter_extra_stat away to your hearts content. You can even throw in a float_msg(self_obj, message_str(...)) to add to the authenticity if you like.

I honestly tried to make it work but I can't figure out certain commands.

What I'm trying to do is put a procedure (is the order of procedures important? where should I put it in the list?) that does the following:

If the player reaches certain level (what's the command for this?):
- NPC stats are changed according to level 6 proto (That's a long list though because there is a lot of skills, DR/DTs and stats/action points/etc to modify... How to set critter's extra stat for plasma threshold, for instance?
- Float message is displayed (that one is easy)
- The game throws in a "XXX gained in some new abilities) (No clue how to do this)

Guys, I won't ask you to do it for me, but can you give me the commands? (unless someone feels like updating the four NPC scripts with the commands I listed above and uploading them somewhere... once we get it to work it should be included in killap's RP anyway since this is the way it was intended to be by game creators)
 
v2b has an annoyance(not realy bug,it doesnt affect anything other visual) the ac displayed on the main screen is stuck at -239 in my game,asked mib88 to verify it,in char screen it displays the correct ac

Nirran
 
Nirran said:
v2b has an annoyance(not realy bug,it doesnt affect anything other visual) the ac displayed on the main screen is stuck at -239 in my game,asked mib88 to verify it,in char screen it displays the correct ac
Redownloading should fix it. Forgetful old me left some debugging code in there again. :( (That one was to speed up testing of the control party members mode. Sitting around waiting for the ac counter to flick through every time I skipped a turn was getting annoying.)
 
ah ok,thanks timeslip,for your mod your attention,everything,take as long as you need to regain interest in fo2 :)

Nirran

edit : btw decompiler link leads to 404

edit : nope,still has the debug ac
 
Nirran said:
edit : nope,still has the debug ac
argg, I noticed the problem, tried to compile a fixed version before anyone noticed, and then reuploaded the old bugged copy.

That means the broken copy was up until about 2 mins ago. Anyone who's downloaded it will need to redownload.
 
Hi Timeslip,
Just letting you know that I sent you a PM regarding an update to the Appearance mod. No fantastic hurry if your currently working on other things.
 
Back
Top