News:

Rings of Reznor!

Main Menu

Summon Sidekick

Started by oktokels, March 17, 2021, 12:13:38 AM

Previous topic - Next topic

oktokels

Is it possible to summon a sidekick?
I'm trying to build a character that summons his sidekick when he is at lowerhealthpct 50.
The thing is, sidekick is an attribute that only works with private army, making the sidekick present since the beginning of the fight.
I want to summon just one character, and then stop. But my hero just keep spamming the summon.

to do this, i have tried 3 ways:

1) Add the line [summon(situation="alone"),] in his AI file
2) Give the summon a lot of hero points, so the hero can just afford one summon in the fight
3) Create second form of the hero that has private army, so when he is lowerhealthpct 50 he just switches to the new form

But neither of this solutions has satisfied me yet. Is there a more permanent and easy solution to do this?

Epimethee

What about using Russian Doll and Private Army?
FFX add-on for FFvsTTR at ffx.freedomforceforever.com

oktokels

Quote from: Epimethee on March 27, 2021, 01:31:45 PM
What about using Russian Doll and Private Army?
Hello Epimethee,
That's a really great idea, i have never used russian doll or even look at it before your suggestion. The only downside i see is that it requires a second form to work. I'm hoping to find something that does'nt need a second form.
I guess the solution i'm looking for is a way to stop the summon power in the m25AIfile, once the sidekick is summoned.
Thanks epithemee  :thumbup:

Epimethee

My pleasure, I hope you get something working to your satisfaction! :)

Out of curiosity, what would be the issue with the second form? (I initially tried to find other approaches, but they all required coding new Python functions.)
FFX add-on for FFvsTTR at ffx.freedomforceforever.com

oktokels

Quote from: Epimethee on March 31, 2021, 12:39:33 AMwhat would be the issue with the second form? (I initially tried to find other approaches, but they all required coding new Python functions.)

Usually when i go to the rumble room, i select watch mode, so i can see how the AI works. Just for fun, i select the characters randomly, and i hate when a second form is selected. I try to reduce the second forms of characters because of this, so, i build the second form only when there's no other way to do it. So, Ant-man, Emma Frost and others, cannonicaly have a second form in the comics, so i have no problem with these characters. Also, i'm kind of obssesed with this idea that i have, to have just one definitive version of all the dc/marvel characters....

Right now i'm working with batman, and i want him to summon the batmobile or the batwing when he is half his health. So, it really bugs me that of all the characters, is batman the one that has to have a second form to achieve this idea. But right now he is summoning two batmobiles, so it's no good.  :thumbdown: :thumbdown:

The script of the clone self attack, allows to write how many clones the character will make in the m25AI file. So, there must be a way to stop the character from summoning more minions, maybe by copying the script of the clone self attack. I need more knowledge to do this though.

Epimethee

If it,s only for use in AI files for watch-mode rumble room sessions, I think your first solution, "Add the line [summon(situation="alone"),] in his AI file", is the right approach. Maybe you could add a new situation? E.g., in the character's AI file:
[summon(situation="once"),]

In m25ai.py (back up the file first, of course), add the following lines before "def ST_panicked(char,target=None,param=None,param2=None):":
def ST_once(char, target=None, param=None, param2=None):
try:
return not Mission_GetAttr('%s_m25ai_once' % (char))
except:
Mission_SetAttr('%s_m25ai_once' % (char), 1)
return 1


Caveat emptor:

  • This "once" is shared by any use per character—if you have two lines using the "once" situation, only one of them will be used.
  • I haven't coded for FFX in fifteen years, so I may well have made a ridiculous error.
  • I never really got around to play around enough with the M25 side of FFX to understand it, so I'm just taking a guess here.
  • I don't have access to a PC with a working copy of FFvsTTR+FFX, so I can't validate what I just wrote.
FFX add-on for FFvsTTR at ffx.freedomforceforever.com

oktokels

Quote from: Epimethee on April 03, 2021, 03:09:29 PM
If it,s only for use in AI files for watch-mode rumble room sessions, I think your first solution, "Add the line [summon(situation="alone"),] in his AI file", is the right approach. Maybe you could add a new situation? E.g., in the character's AI file:
[summon(situation="once"),]

In m25ai.py (back up the file first, of course), add the following lines before "def ST_panicked(char,target=None,param=None,param2=None):":
def ST_once(char, target=None, param=None, param2=None):
try:
return not Mission_GetAttr('%s_m25ai_once' % (char))
except:
Mission_SetAttr('%s_m25ai_once' % (char), 1)
return 1


Caveat emptor:

  • This "once" is shared by any use per character—if you have two lines using the "once" situation, only one of them will be used.
  • I haven't coded for FFX in fifteen years, so I may well have made a ridiculous error.
  • I never really got around to play around enough with the M25 side of FFX to understand it, so I'm just taking a guess here.
  • I don't have access to a PC with a working copy of FFvsTTR+FFX, so I can't validate what I just wrote.

Fantastic Epithemee !! You gave me a lot of ideas and something to work with. Thank you   :thumbup: :thumbup: