GORIS SCRIPT fit the Non Helmet PA. Second Round!

Mr.Wolna

Vault Senior Citizen
I have look at Goris and his script. Its not the script, i think ist the engine because when i givee him an other script he took the robe still off.
And when i put the ocgoris.int to some other critter, mothing happens!


But i found some intresting lines in his script, they were take out by BIS, so i think first they make it throuth script and meaby later found a better choose with rhe engine(or its just the pro File i dont know). Im not a big script expert(just learning now :wink: ) but i think this code is correkt, i have tried out and it has no errors, but nothing happens! meaby some other dude can make to run it.
Because it will be very helpfull, for the without helmet PA MOd, which i will see ingame.


Ok here we go, i hope some taletndet coder wil give this a chance.

procedure combat_is_starting_p_proc begin
inc_local_var(LVAR_First_Combat);

if (self_visible) then
art_change_fid_num(self_obj, 100);
end

procedure combat_is_over_p_proc begin
if (self_visible) then
art_change_fid_num(self_obj, 99);
end
 
Who is this guy who makes the quick goris derobing mod? ART????
Is he on NMa or somebody knows him, i have a couple of questins to him! Somebody know something, where i can find this guy?
 
Mr.Wolna said:
...i have a couple of questins to him! Somebody know something, where i can find this guy?

That mod doesn't work like you think. All the creator of that mod did was cut frames (pictures) from the existing art. So, for example if 12 frames were used originally, he removed 6 of them, so the graphic would play faster. He (or she) did not do anything with the engine or the script.
 
ok my men helios is a very taletdet coder and he look at this, and he think its hardcoded by the engine. We llok for an other way to make this possibly.
 
Doesn't the script refuse to work with other critters because they don't have the animation frames?
 
The PID is 16777368. That mean it is 152 Critter Proto. This PID is hardcodet in fallout2.exe at 3 Points.
 
Damn. Is there another way?
I mean to add a script to a critter
so that it will play an animation at
a given point (ideally when combat
is initiated, or maybe when the critter
holster/draws a weapon) and then
use a different set of FRM's from
then on?
 
You must change the dude_obj Script or the Map Script. Theoretically this work should.
But I have no time for this at moment.
 
Does anyone know if the following commands actually work?

1) COMBAT_IS_INITIALIZED (its in the mapper doc but i can't seem to make it work)
2) procedure combat_is_starting_p_proc

???
 
Josan12 said:
COMBAT_IS_INITIALIZED (its in the mapper doc but i can't seem to make it work)
Yes, this works just fine.

use it like so:
Code:
if (combat_is_initialized) then begin
  //do combat related stuff
end else begin
  //do non combat related stuff
end

It just returns true or false depending on whether combat has begun.



Josan12 said:
procedure combat_is_starting_p_proc
I've never used this procedure before. Two scripts in the game have them defined but never use them. I'd say play around with it and see what happens. Based on its name, I'd assume it runs right before combat mode is officially started (ie a very small window of time). Not sure what one would want to do with it other than doing something quickly right before combat starts.
 
killap said:
Josan12 said:
COMBAT_IS_INITIALIZED (its in the mapper doc but i can't seem to make it work)
Yes, this works just fine.

use it like so:
Code:
if (combat_is_initialized) then begin
  //do combat related stuff
end else begin
  //do non combat related stuff
end

It just returns true or false depending on whether combat has begun.

Well i can't get it to work. Maybe someone can help:

Here's my code:

Code:
procedure critter_p_proc begin

      if (combat_is_initialized) then begin
      //if (self_visible) then
      reg_anim_clear(dude_obj);
   reg_anim_begin();
   reg_anim_animate_reverse(dude_obj, 37, -1);
   reg_anim_animate(dude_obj, ANIM_fall_back_sf, -1);
   reg_anim_end();
      //art_change_fid_num(self_obj, FID_NAPOWR);
      
      end
      end

Nothing happens when i initiate combat mode.

I did a test just to make sure the rest of my script is ok:

Code:
procedure critter_p_proc begin

      //if (combat_is_initialized) then begin
      //if (self_visible) then
      reg_anim_clear(dude_obj);
   reg_anim_begin();
   reg_anim_animate_reverse(dude_obj, 37, -1);
   reg_anim_animate(dude_obj, ANIM_fall_back_sf, -1);
   reg_anim_end();
      //art_change_fid_num(self_obj, FID_NAPOWR);
      
      //end
      end

And this worked as expected, i.e., made the dude try to play an animation every 0.1 second and 'freak out' (like i said, just a test to see if basic stuff is working)

Can anyone help?
 
Hmm...

Did you test that code in combat without the combat_is_initialized check? You said it worked, but did you test in combat?

I think critter_p_proc doesn't run during combat (I might be wrong though). I know combat_is_initialized works since I have used it dozens of times.

Try moving your code to procedure combat_p_proc and seeing if that works.

Code:
procedure combat_p_proc begin

      //if (combat_is_initialized) then begin
        //if (self_visible) then
        reg_anim_clear(dude_obj);
        reg_anim_begin();
        reg_anim_animate_reverse(dude_obj, 37, -1);
        reg_anim_animate(dude_obj, ANIM_fall_back_sf, -1);
        reg_anim_end();
        //art_change_fid_num(self_obj, FID_NAPOWR);
      //end
end
 
killap said:
Try moving your code to procedure combat_p_proc and seeing if that works.

Code:
procedure combat_p_proc begin

      //if (combat_is_initialized) then begin
        //if (self_visible) then
        reg_anim_clear(dude_obj);
        reg_anim_begin();
        reg_anim_animate_reverse(dude_obj, 37, -1);
        reg_anim_animate(dude_obj, ANIM_fall_back_sf, -1);
        reg_anim_end();
        //art_change_fid_num(self_obj, FID_NAPOWR);
      //end
end

Coincidentally, i actually just tried the exact code you wrote above! And nothing. Although - i don't know when the combat_p_proc is supposed to run. I entered the code above in obj_dude under combat_p_proc, entered combat mode and ... nothing. Essentially, my problem seems to be that i can't make any script do anything when i enter combat mode. Nothing. Nada.

I also tried this script as a simpler test:

Code:
procedure combat_p_proc begin
   if(combat_is_initialized) then begin
      terminate_combat;
   end
end

Again, nothing

What do you think, Killap?

EDIT: Okay okay - hold the press. I think i got it. I copied a fresh obj_dude.sll into my mapper folder and combat_procs seem to be working fine. I guess i screwed with my obj_dude script just too much :mrgreen:

So my question now is: does anyone have any experience of scripting animations in combat mode? Is it possible? If not, does anyone have an alternative suggestion?
 
So .... does anyone know if it's possible to script animations in combat mode? If not, can anyone see another way to solve my problem? :help:
 
I think the simplest way is to use Goris. We talk for a few months over that.

The start/end combat Goris animation is hardcodet but you can change it. The problem is that only one critter on a current map can use this.
The default engine values in dec for Goris:

critter_pid_combat_start(Address:4332410, value=152[+16777216])
critter_pid_combat_end(Address:4333513, value=152[+16777216])
critter_fid_in_combat(Address:4332590, value=100)
critter_fid_out_combat(Address:4333557, value=99)
critter_animation_prefix_combat_start(Address:4332619, value=6)
critter_animation_prefix_combat_end(Address:4332626, value=6)
 
Helios said:
The start/end combat Goris animation is hardcodet but you can change it. The problem is that only one critter on a current map can use this.

Yes, but this is a pretty crippling limitation because it means the player can't recruit Goris!!

If there is a way to script animations in-combat then this problem is solved!! Does anyone have experience of scripting animations in-combat?? Or using the COMBAT_IS_INITIALIZED command in any other proc than combat_proc?? And if it's not possible (from my tests it's not), is there a way to hack the engine to make it allow animation commands in-combat? Or make the command usable in another proc (for example, critter proc?)
 
I've used this before:

procedure combat_is_starting_p_proc begin
terminate_combatl;
end

Maybe just add something into there for whatever it is you are doing.[/quote]
 
I found a very simple solution :wink:

Code:
variable spec_ani;

procedure combat_p_proc begin
   if (spec_ani != 1) then begin
      //Combat begin animation
      anim(dude_obj, ANIM_magic_hands_middle, 0);
      spec_ani := 1;
      display_msg("combat start");
   end
end

procedure critter_p_proc begin
   if (not(combat_is_initialized)) and (spec_ani == 1) then begin
      //Combat end animation
      anim(dude_obj, ANIM_magic_hands_middle, 0);
      spec_ani := 0;
      display_msg("combat end");
   end
end

I looked a bit in the engine and this is the result, you can use "anim". It work in and after a combat.
 
Back
Top