Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v18 : EPA spore plant issues #87

Closed
Question2 opened this issue Jan 12, 2021 · 3 comments
Closed

v18 : EPA spore plant issues #87

Question2 opened this issue Jan 12, 2021 · 3 comments
Assignees

Comments

@Question2
Copy link

Question2 commented Jan 12, 2021

Taken from epac8.ssl :

procedure map_enter_p_proc begin
   variable item;
   if (map_first_run) then begin
      item:=create_object(PID_PLANT_SPIKE,0,0);
      add_mult_objs_to_inven(self_obj,item,10);
   end
end

The EPA spore plants are supposed to use the special plant spike which is proto id 583. PID_PLANT_SPIKE refers to the vanilla plant spike. The EPA plant spike is not defined in ITEMPID.H either so I had to define it there :

#define PID_PLANT_SPIKE_EPA                (583)
procedure critter_p_proc begin
   if not self_obj then return;
   if self_can_see_dude then attack(dude_obj);
end

This has no range limitation which is potentially problematic because they are stationery. Not really an issue with the low perception though, since the plants are practically blind and cant see the player till they get extremely close. But this raises another issue with the perception. Are they supposed to have the same perception as regular spore plants, which is a perception of 2? Even with a starting sneak skill of 19%, I can often sneak within 2 hexes of an EPA spore plant before they notice me (depending on their facing). This seems rather silly, but at the same time it does allow the player to use the plant spray properly.

Combat with a spore plant also tends to end after only one round of combat when attacked at ranges of 8+ hexes. I'm not sure what is causing this. It might have to do with their extremely low perception.

Using the plant spray doesn't award xp either, nor does it play the melted animation. Not sure why its not playing the animation though, it just creates a regular spore plant corpse which is weird because it happens instantly without the "falling down" animation that is used when the spore plant dies normally.

SLOT08.zip

Save in EPA if you want to use to test.

EPA spore plants also have the "talk" flag checked in their protos which should be removed.

@Question2
Copy link
Author

Following is the fixes that I did for epac8.ssl (excluding ITEMPID.H) :

procedure critter_p_proc begin
   if not self_obj then return;
   if ((self_can_see_dude) and (tile_distance_objs(self_obj,dude_obj) <= 16)) then
      attack(dude_obj);
end
procedure map_enter_p_proc begin
   variable item;
   if (map_first_run) then begin
      item:=create_object(PID_PLANT_SPIKE_EPA,0,0);
      add_mult_objs_to_inven(self_obj,item,20);
   end
end
procedure use_obj_on_p_proc begin
   //variable sound1;
   if ((obj_pid(obj_being_used_with) == PID_PLANT_SPRAY)) then begin
      inc_global_var(GVAR_KILL_EPAPLANTS);
      if (global_var(GVAR_KILL_EPAPLANTS) >= 26) then begin
        display_msg(mstr(100));
      end
      if (self_pid == PID_EPA_SPORE_PLANT) then begin
         give_xp(150);
      end
      if (self_pid == PID_RED_SPORE_PLANT) then begin
         give_xp(200);
      end
      if (self_pid == PID_GIANT_SPORE_PLANT) then begin
         give_xp(350);
      end
      kill_critter(self_obj, ANIM_melted_to_nothing_sf);
   end
end

@Question2
Copy link
Author

Another issue with the EPA spore plants : the ones on level 6 behind the force field have the wrong script, they have the ecplant script which is used for random encounter spore plants. They should have the epac8 script.

@burner1024
Copy link
Member

Can't make the animation work:

      reg_anim_clear(self_obj);
      reg_anim_begin();
         reg_anim_animate(self_obj,ANIM_fall_front,-1);
      reg_anim_end();

doesn't do anything, as well as couple of other animation codes.
@NovaRain any idea?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants