Ok, so we use this system to "aim":
aim = self.main_effect["aim"]
point = aim.get("point", "center")
anchor = aim.get("anchor", (0.5, 0.5))
xo = aim.get("xo", 0)
yo = aim.get("yo", 0)
This is how you defined new attacks:
SimpleSkill(u"Soul Blade", menu_pos=0, range=3, attributes=['melee'], effect=20, multiplier=1.2, vitality_cost=20, desc="Projects a huge blade made from the user's soul energy towards the target.",
main_effect={"gfx": Transform("soul_sword", zoom=1.1), "sfx": "content/sfx/sound/be/soul_sword.mp3", "duration": 0.5, "aim": {"point": "bc", "anchor": (1.0, 1.0), "xo": -80}},
target_sprite_damage_effect={"gfx": "shake", "initial_pause": .3, "duration": .5},
target_death_effect={"gfx": "dissolve", "initial_pause": .5, "duration": .5})
This is the part that's important in main effects gfx context:
"aim": {"point": "bc", "anchor": (1.0, 1.0), "xo": -80}}
Reason why it is:
Most attack, especially the once that come from RPG Maker, are very plain and look exactly the same from both sides. Attacks like our Meteor (which you could have used for example), Same thing in the Ice element or Fist Of Bethel (strongest Earth Skill) are different (same counts for stuff like Arrows and FireBalls but they are setup to do the right thing by default). If you just play them like simple attack, they will look ok from the left but will look really bad from the right... It will look as if they are being from the left, just like if your party used them! Also if you used xoffset, it will work against you.
First, let me explain what the positioning means:
"point": "bc"Point is where you aim the attack! Related to the target sprite. bc means bottom center... Other options are:
center: center of the charcters image
tc: top center of the characters image
bc: bottom center of the characters image
fc: front center (Special per row instruction (for offset) applies)
You'd usually use one of the top 3. This gives you a position of a point you aim at.
"xo": -80This, can be used to offset the position as it is often required. yo is the other option for vertical offsets. It's all in pixels.
"anchor": (1.0, 1.0)This is simple Ren'Py's anchor:
https://www.renpy.org/doc/html/style_properties.html#style-property-xanchorOnce you got a point from two setting above, you can specify how the attack displayable (doesn't matter if it's a simple image, webm, animation or anything else) should be anchored to that image! So for example (.5, .5) will land it middle of the displayable dead on the point, your setting will land bottom, right corner of the displayable on the point and etc.
As you can imagine, for stuff like simple attacks, best setting would be:
"aim": {"point": "center", "anchor": (.5, .5)}
Like: Pick the dead center of a sprite and put the put the middle of the attack sprite right on top of it.
A lot depends in the displayable you're using, often it will require special offsets, sometimes it won't. So it's simple for simple attack... what we do with those "special" cases like Meteor is this:
Extra argument is added to the main gfx dict (not to the aim one):
SimpleSkill("Meteor", menu_pos=12, attributes=['magic', 'fire'], effect=100, multiplier=6.0, mp_cost=15, range=4, true_pierce=True, type="se", desc="Summons flaming fragments of meteor.",
attacker_effects={"gfx": "orb", "sfx": "default"},
main_effect={"gfx": Transform('cataclysm_sideways', xzoom=-1), "sfx": "content/sfx/sound/be/fire8.mp3", "duration": 1.8, "aim": {"point": "bc", "anchor": (0.5, 0.1), "xo": 150, "yo": -370}, "hflip": True}, ...
"hflip": TrueWhat it does is the following:
- It will horizontally flip the attack displayable (once again, no matter what it is).
- It will reverse horizontal offset ("xo").
With such attacks, you can never use anything other than: "anchor": (
0.5, xx), because we do not reverse anchors. There should also be no good case when you need to use anything other than it because you can use offset property.
This is for SimpleSkill class...
Other classes:
ArealSkill: Instead of using gfx effect per character, we use one large effect to over the entire field. Point of aim will always be the dead center making "point" utterly useless.
P2P_Skill: Basically fireball, it follows it's own rules and flips the attack automatically.
ArrowsSkill: Similar with a couple of extras.
ATL_ArealSkill: This one is complex (and simple if you know ATL:
https://www.renpy.org/doc/html/atl.html). Instead of using preset attacks, ATL is used to create the entire animation sequence. Main effect dict takes extra k/v pairs: right_args and left_args which will be passed to ATL function depending on which side the attack is coming from. We have two such skills: Water Blast and Ice Storm.
ATL_ArealSkill(u"Water Blast", menu_pos=13, attributes=['magic', 'water', 'inevitable'], effect=200, multiplier=10.0, mp_cost=30, piercing=True, range=6, type="all_enemies",
desc="Hits the taget with a massive water blast!",
attacker_effects={"gfx": "orb", "sfx": "default"},
main_effect={"atl": water_combined, "predict": ["water_attack", "water_wave"], "left_args": [1.8, -300], "right_args": [-1.8, 300], "sfx": "content/sfx/sound/be/water7.mp3", "duration": 1.6},
target_sprite_damage_effect={"gfx": "shake", "initial_pause": 0.6, "duration": 0.9},
target_damage_effect={"gfx": "battle_bounce", "initial_pause": 1.6},
target_death_effect={"gfx": "dissolve", "initial_pause": 1.0, "duration": 0.5})
image water_wave = FilmStrip('content/gfx/be/filmstrips/water_wave.png', (531, 213), (3, 3), 0.15, include_frames=range(7), loop=False)
image water_attack:
"content/gfx/be/animations/water_attack/00.png"
pause 0.1
"content/gfx/be/animations/water_attack/01.png"
pause 0.1
"content/gfx/be/animations/water_attack/02.png"
pause 0.1
"content/gfx/be/animations/water_attack/03.png"
pause 0.1
"content/gfx/be/animations/water_attack/04.png"
pause 0.1
"content/gfx/be/animations/water_attack/05.png"
pause 0.1
"content/gfx/be/animations/water_attack/06.png"
pause 0.1
"content/gfx/be/animations/water_attack/07.png"
pause 0.1
"content/gfx/be/animations/water_attack/08.png"
pause 0.1
Null()
transform water_combined(xz, xo):
# It's prolly a better design to work with the displayable directly using contains instead of replacing them with parallel...
contains:
"water_attack"
xalign 0.5
ypos 600
yanchor 1.0
contains:
pause 0.6
"water_wave"
xalign 0.5
ypos 650
yanchor 1.0
xzoom xz
xoffset xo
yzoom 1.8
You prolly want to play around with one of these attacks to see what's what or don't use this one.
FullScreenCenteredArealSkill: This one is simple, just show the attack displayable over the whole screen

===>>>
I'll fix two of your attacks and push so you have an example, you can tweak the others later.