Marcio2

Villager
Member
Joined
Jan 18, 2014
Messages
12
Reaction score
0
First Language
French
Primarily Uses
Hello !

I searched somebody to do this, but nobody around me had enough knowledges about the XAS 0.6 of Moghunter to do it. Maybe around here can help ? What I want is maybe a bit complicated.

What I want is that when an ennemi is looking on Up or Down direction that he throws no attack. I only want the ennemi able to attack when he is looking left and right a bit like in a Beat'em up game. I need this because to make the game more alive I let the ennemies walking with random route sometimes and if the hero comes around and the ennemy is looking up and he uses it's attack command he will attack the hero. The hero walks only on left and right direction like in a beat'em up and that's the main reason I want the ennemies are not able to attack him from down and up positions. (the ennemies must still be able to launch an attack from a far position if he is looking left or right too)

But in the same time I need a way to create an exception if I need to do like an ennemy trap who is looking down and up to be able to launch an attack. (this case will then happen rarely in the game).

If somebody can help me it would be great. Thanks for reading me. ;)

Link of the script if needed : https://atelierrgss.wordpress.com/rgss3-xiderowg-action-system-xas/
 

Marcio2

Villager
Member
Joined
Jan 18, 2014
Messages
12
Reaction score
0
First Language
French
Primarily Uses
It's been 15 days and no answer. Somebody can tell me if it's really something really hard to do or near impossible or can I still have a chance to find someone who is able to do it ? xD If it's too difficult I can just give up the idea. ^^'
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
6,173
Reaction score
7,393
First Language
Indonesian
Primarily Uses
RMVXA
It's been 15 days and no answer. Somebody can tell me if it's really something really hard to do or near impossible or can I still have a chance to find someone who is able to do it ? xD If it's too difficult I can just give up the idea. ^^'
As far as I know, few to none actually use XAS in VXAce. They use popular Falcao ABS for some reasons. Besides studying action battle script from someone could be very daunting (and personally, I think mog's script structure is nightmare). I'd say it's near impossible at this point. You might attract some people with money though (but you need to have 30 meaningful posts before you could post something related to money here).
 

Marcio2

Villager
Member
Joined
Jan 18, 2014
Messages
12
Reaction score
0
First Language
French
Primarily Uses
Oh okey.

I tought it was maybe possible to create something that just avoid to use the "shoot" command when an ennemy is turned in the up or down direction. I didn't knew for the money, thanks for the advice, but I don't want to create useless posts too xD. Maybe a saviour will appear to save me xD.

Thanks for the answer @TheoAllen !
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,551
Reaction score
8,159
First Language
German
Primarily Uses
RMMV
The problem here is that ABS-type scripts are the most complex ones to write or understand.
It usually takes an experienced scripter one or two years to write an ABS-script like XAS or Pearl, and anyone modifying it needs to understand it first. And gaining that understanding of the script is only a bit faster than writing it, so unless you find someone who already does this (small chance as said above) you're asking someone to spend at least one or two months of his free time learning the script before he can start to write that modification.

People usually don't spent two months of their free time without getting something in return. If Ace were still the current maker, you might have had a chance finding someone for the challenge of learning how to do that, but all the scripters have already moved on to MV and JavaScript.
That means unless you either pay something or offer something else in return (skill trade), your chances are extremely low.
 

TakeHomeTheCup

Veteran
Veteran
Joined
Oct 15, 2013
Messages
245
Reaction score
463
First Language
English
Primarily Uses
So the enemies can't use throw or shoot if they are looking up or down? Is that it?
 

Marcio2

Villager
Member
Joined
Jan 18, 2014
Messages
12
Reaction score
0
First Language
French
Primarily Uses
Thanks @Andar for the explanation. I understand that a lot of people are not anymore on VX Ace. I was hoping finding somebody who knew XAS very well. I tought it was more famous than this. ^^

@TakeHomeTheCup Yes the objective is really to make like it was a beat'em up game where ennemies can only attack you when they are looking left and right. If they attack you looking Up and Down it's not cool, because the hero moves only from left to right like in a beat'em up. ^^ We have to have the possibility to make an exception if needed, because some "enemies" are trap objects (like a canon who is looking down or up for example). If it is too complicated like Andar told it don't break your head on this too much. :/
 

TakeHomeTheCup

Veteran
Veteran
Joined
Oct 15, 2013
Messages
245
Reaction score
463
First Language
English
Primarily Uses
Can't you just limit the movement of those enemies to the left and right?
Sorry. I'm having a hard time understanding how this would work.
 

Marcio2

Villager
Member
Joined
Jan 18, 2014
Messages
12
Reaction score
0
First Language
French
Primarily Uses
@TakeHomeTheCup Not really, because we have to let them making a random move route when the player is not nearby and come near the player when he is nearby and then they can be anywhere. :/
 

TakeHomeTheCup

Veteran
Veteran
Joined
Oct 15, 2013
Messages
245
Reaction score
463
First Language
English
Primarily Uses
Try inserting this under the XAS Script:
Code:
module XAS_ACTION
  def shoot(action_id = 0)
      return if action_id == 0
      skill = $data_skills[action_id]
      return false if self.battler.is_a?(Game_Enemy) && self.direction == 8 || self.direction == 2
      return unless can_shoot?(skill)
      execute_user_effects(skill)
      execute_call_event(action_id)    
      self.action_attachment(action_id)
      execute_set_pose(action_id)
  end
end
Whenever shoot is called, if the user is an enemy, and they are facing up or down, it won't shoot.
 

Marcio2

Villager
Member
Joined
Jan 18, 2014
Messages
12
Reaction score
0
First Language
French
Primarily Uses
@TakeHomeTheCup I tried it and it seems to work really fine ! You're the hero of the day ! =D
I will review it better to see if I don't find any problems of performance or bug. ;)

You think it's possible to make a way to make ennemies who avoid this ? I made some traps (canons) who are looking down and that throw fireballs that the hero have to walk little by little to avoid them, but they are now desactivated with the script ahah ^^
 

TakeHomeTheCup

Veteran
Veteran
Joined
Oct 15, 2013
Messages
245
Reaction score
463
First Language
English
Primarily Uses
Try this instead then:
Code:
module XAS_ACTION
  def shoot(action_id = 0)
      return if action_id == 0
      skill = $data_skills[action_id]
      return unless can_shoot?(skill)
      if self.battler.is_a?(Game_Enemy)
        unless self.battler.enemy.note =~ /<Enable Shoot Up>/
          return if self.direction == 8 || self.direction == 2
        end
      end
      execute_user_effects(skill)
      execute_call_event(action_id)     
      self.action_attachment(action_id)
      execute_set_pose(action_id)
  end
end

For enemies that you want to be able to shoot in any direction, put this into its notes: <Enable Shoot Up>
 

Marcio2

Villager
Member
Joined
Jan 18, 2014
Messages
12
Reaction score
0
First Language
French
Primarily Uses
Great thanks a lot !!! I'll try all this and will make a some tests to see if everything is okey ! I think I'll have to move all the sound effects that i've put just before the shoot actions to the tools/skill map events because if I don't this the sound will display even if the ennemy don't attack when looking up or down. It will give a lot of work but i'm happy xD
 

Marcio2

Villager
Member
Joined
Jan 18, 2014
Messages
12
Reaction score
0
First Language
French
Primarily Uses
@TakeHomeTheCup I tried and seems to work without any kind of drop performance or bug for the moment, the traps are working too really well ! I'll keep making tests until the end of the game, and I'll keep you update !

The only little issue I had (who is not a problem from the script himself) is that I had in various Bosses things like "@animation_id = 165" (scripts in event routes) just before an attack to make a prettier animation or making like a warning to tell the player a huge attack will come for him to be prepared to evade, and now they do them when looking up or down even if there is no attack xD. If there is a way to put that this function is desactivated too when the ennemy is looking up or down in the script could be really great. (and one notetag like in the previous to make an exception for some ocasions)

One more time thanks a lot for your help !
 
Last edited:

TakeHomeTheCup

Veteran
Veteran
Joined
Oct 15, 2013
Messages
245
Reaction score
463
First Language
English
Primarily Uses
I can try to implement that, but I'm really not sure how well it would work.
It might interfere with normally playing animations on those enemies.
 

Marcio2

Villager
Member
Joined
Jan 18, 2014
Messages
12
Reaction score
0
First Language
French
Primarily Uses
@TakeHomeTheCup oh okey. Don't do it then I'll do it one by one and change some things. ;) Thanks a lot I'll keep you update !
 

Latest Threads

Latest Profile Posts

here's another RPG Maker remake idea: "Plumbers Don't Wear Ties". I'll salute to whomever does this
I won't finish it today, I only will have time to work on that next Saturday, what a shame... :(
I made something for @LittenDev [as he requested]
It's been a weird while. I've been so torn down that even playing video games has been something I avoided. But I shouldn't forget two things. One, I love RPG Maker for a reason. Two, only way to eat an elephant is a bite at a time.

Forum statistics

Threads
111,388
Messages
1,060,743
Members
144,732
Latest member
Jamie1976
Top