Menu
 

[MUA1] The Outsider's Guide To Modding

Started by Outsider, September 07, 2019, 09:59PM

Previous topic - Next topic
September 21, 2019, 02:28AM #15 Last Edit: September 21, 2019, 02:40AM by BlackHand13
I decided to set his scale_factor to 0.85, as 0.8 still made him too small.

Although, for some reason, his basic attacks were working fine but not his powers.. I managed to fix it by deleting this from the top of his talents file (puck.engb)

=>  talent {
   fightstyle = true ;
   name = fightstyle_puck ;
      level {
      }

   }

That fixed the power issue, now they are working well, see here
http://www.mediafire.com/view/pd2rhv53sdpgza2/Marvel0016.png/file

BUT now, his normal combat attacks don't work... I'm probably missing something.

Well, I added back the talent line up there in his talents file and now everything works well, both powers and basic attacks.

Everyone, if you've made it this far in the modding lessons, then give yourself credit. You now already know more about modding than most. These past six lessons help make up the basics that one needs to learn in order to create their own mod.

Admittedly, it may take a little while before I can release the next lesson as I've been very busy lately. Plus, now the lessons will get more technical -- focusing on details that make up the character's powers. But don't worry -- I will break them down so it's easy to learn. I will try to release the 7th lesson sometime this week.

In the meantime, practice... practice... practice on the first six lessons until you feel that you understand it and got it down. The more you do it, the less intimidating it is, and the easier it gets.


September 27, 2019, 02:13AM #17 Last Edit: September 13, 2020, 06:15AM by Outsider
Lesson 7: Coding Basics


Alright, brace yourselves -- now it gets more technical. Now we get into the heart of what makes a mod... the coding. There are two main files associated with every playable mod: The talents file and the powerstyle file. Both of which are .engb files that make the mod unique from all others. This is the very thing that intimidates a lot of people from wanting to mod because a lot of detail goes into it. But, once you understand how it works, it gets easier. For this set of lessons, we will use the files of a character that hasn't been modded all that much -- :spiderwoman: Spider-Woman.

(1) Go into your game's data/talents folder and locate "spiderwoman.engb" (not .xmlb or .itab -- not important), right-click that file and copy it. Then paste it on your mod project folder. Now, go into your game's data/powerstyles folder and locate "ps_spiderwoman.engb" (not .xmlb or .itab -- again, not important), right-click that file and copy it. Then paste it on your mod project folder.

(2) Using XLMBCUI, decompile spiderwoman.engb, then hit edit. You will see inside her talents file. Save that as a Notepad .txt file. (Save it as "Spider-Woman Talents.") Now do the same to ps_spiderwoman.engb. (Save it as "Spider-Woman Powers.") Now you can delete the .engb files and the .xml files from your mod project folder, as we are not changing the files. We are only using the text files to research how the coding within the files work.






OK. Now open both the Spider-Woman Talents text file and move it to the left of your screen. Open the Spider-Woman Powers file, and move it the right of your screen, so that they are placed side-by-side. This is to give you a great visual of just how coding works, as you can't add or copy powers until you know exactly how it works. And, what you do to one side will affect the other. I will break down how this works, so don't get intimidated.

At the talents file, the very first line says this...

XMLB talents {

And at the powerstyles file, the very first line says this...

XMLB PowerStyle {
cansteal = true ;
iconfile = textures/ui/spiderwoman_icons.png ;

These are how the files start. The only thing you can change is the part that I've placed in bold, as that refers to what a character's icon set was named as. Remember what you named your character's icons back at the package files? This must be named the exact same thing for it to work correctly. The rest must be left alone. (NOTE: I honestly have no idea what the "cansteal = true" part means, so if anyone knows, feel free to inform. To my knowledge, Nick Fury's powerstyle file doesn't have that, and he works fine, so it may not be necessary.)

You'll notice on her talents file that she has radiation immunity. This refers to the custom talents that I mentioned during the herostat lesson, but let's skip that one for now. But notice that every entry on the talents file starts with talent { and every entry on the powerstyle file starts with FightMove { ? That's how all entries for powers and passives start. Take note of how the spacing is done and the placement of the opening and closing brackets. This is very important because if those are off, the entry will not work and may take all entries after to be thrown off.

Now you'll see on the talents file that her next entry says "Venom Blast." This is her first power. Now, on the powerstyle file, click Ctrl + F to Find. Type "name = power1" and hit Enter. It will take you to the coding for her first power there. I want to show you how it works on both files, side by side.

Let's break down the entry for her first power to see what each mean.


   talent {
   descname = Venom Blast ;
   description = Shoots a bioelectric beam that will pierce multiple enemies if fully charged.  $PT_CHARGE ;
   descshort = Beam ;
   icon = 0 ;
   icon_texture = textures/ui/spiderwoman_icons.png ;
   name = spdwm_power1 ;
   power = power1 ;


descname = The name for the character's power, which can be named whatever you want.
description = A description of what the character's power does.
descshort = The category that the power falls under. Options are usually Melee, Projectile, Radial, Beam, Charge, Blast, Area of Effect, Trap, Special, and the one I invented - Counter. (There is also Boost and Xtreme, but those are used for specific cases.)
icon = The icon number from the character's icon set that is associated to this power.
icon_texture = The icon set that the icon is coming from. To make sure it works properly, do not use more than one icon set for powers.
name = The internal name of the power that the game will recognize.
power = Another internal name that the game recognizes for this power. Both "name" and "power" are important.

Now let's look at that same power on the powerstyle file and see what they mean there...


   FightMove {
   aitype = beam ;
   animenum = ea_power1 ;
   icon = 0 ;
   is_power = true ;
   lockangles = true ;
   name = power1 ;
   powerup_tag = spidwm_p1 ;
   priority = 5 ;


aitype = The kind of power that the game's AI will recognize it as. Options are melee, beam, projectile, blast, and buff (meaning boost). However, this is not required for all powers.
animenum = The animation that the character will use while performing the power. This is very important, so you must make sure you have the right animation sets for your character to pull it off.
icon = The icon number from the character's icon set that is associated to this power. As you can see, it must match the number in the talents file.
is_power = This tells the game that this attack is a power attack, as opposed to basic melee attacks.
lockangles = Honestly, I'm not sure what this is exactly, but I tend to leave it there.
name = The exact same thing that you named the power in the talents file.
powerup_tag = A specific tag that you connected to the power, making for passives with that power. Not required, is cool for some powerups.
priority = Usually, this is either the number 5, or you can put uninterruptable, which means that while your character is performing the power, it cannot be interrupted by enemy attacks.






Are you with me so far? If that was already too much for you, take some time to digest all that and let it marinate. Remember that there is no rush to learn all of this. Learn at your own pace. If you are ready, then let's continue. Go back to the talents file. Next on that same power, you will see this...


      talentvalues {
         talentvalue {
         level = 1 ;
         name = spdwm_p1_req ;
         value = 1 ;
         }

         talentvalue {
         level = 5 ;
         name = spdwm_p1_req ;
         value = 13 ;
         }

         talentvalue {
         level = 6 ;
         name = spdwm_p1_req ;
         value = 16 ;
         }

         talentvalue {
         level = 9 ;
         name = spdwm_p1_req ;
         value = 25 ;
         }

         talentvalue {
         level = 10 ;
         name = spdwm_p1_req ;
         value = 28 ;
         }

         talentvalue {
         level = 14 ;
         name = spdwm_p1_req ;
         value = 52 ;
         }

         talentvalue {
         level = 15 ;
         name = spdwm_p1_req ;
         value = 72 ;
         }


Notice how the names there end with "req"? Those are the requirements for the power, at different levels. The value refers to the XP level a character must get to add skill points to this power. So, the game uses these values to determine how characters unlock their powers and and when they can add skill points to them. For that reason, they should be untouched. Now look at the powerstyle file. The next thing you'll see is this...

      require {
      cat = skill ;
      item = spdwm_power1 ;
      level = 1 ;
      }

Notice how the item there is the exact same thing as the name over at the talents file? That's what the requirements are for. But not to confuse you, I wouldn't name the name as "spdwm_power1" -- I would name it "spdwm_p1" as it matches "spdwm_p1_req" but without the req part. Makes it easy to remember. Also notice that the level here will be the same number as the value you placed at the talents file. Now it is important to note this: By default, a character's first power is unlocked at the start of the game and always at level 1. Remember during the herostat, you listed "character_p1" as one of the talents? That was for the first power, ensuring that it's unlocked at the start of the game.

Depending on what value/level the power is, the requirement numbers are different, and it is best not to change them. More on that later on.





Next on the talents file, you'll see these...


         talentvalue {
         level = 1 ;
         name = spdwm_p1_pwr ;
         value = 7 ;
         }

         talentvalue {
         level = 5 ;
         name = spdwm_p1_pwr ;
         value = 15 ;
         }

         talentvalue {
         level = 6 ;
         name = spdwm_p1_pwr ;
         value = 17 ;
         }

         talentvalue {
         level = 9 ;
         name = spdwm_p1_pwr ;
         value = 22 ;
         }

         talentvalue {
         level = 10 ;
         name = spdwm_p1_pwr ;
         value = 24 ;
         }

         talentvalue {
         level = 14 ;
         name = spdwm_p1_pwr ;
         value = 37 ;
         }

         talentvalue {
         level = 15 ;
         name = spdwm_p1_pwr ;
         value = 47 ;
         }


Notice how the names there end with "pwr"? These determine the energy cost for this power, at different levels. See how the level numbers here are the same as the requirement numbers I showed you? This is why they should be untouched. The value here refers to the energy cost for this power at each level. Now look at the powerstyle file. The next thing you'll see is this...

      trigger {
      name = powerusage ;
      powerusage = %spdwm_p1_pwr ;
      time = 0 ;
      }

In here, powerusage refers to energy cost, dating back to the value you placed in the talents file, and time refers to when exactly during the power should the game take the energy required for this power. OK, go back to her talents file, and view the next ones...


         talentvalue {
         level = 1 ;
         name = spdwm_p1_dmg ;
         value = 17 19 ;
         value_charged_scale = 2.0 ;
         }

         talentvalue {
         level = 5 ;
         name = spdwm_p1_dmg ;
         value = 58 64 ;
         value_charged_scale = 2.0 ;
         }

         talentvalue {
         level = 6 ;
         name = spdwm_p1_dmg ;
         value = 78 86 ;
         value_charged_scale = 2.0 ;
         }

         talentvalue {
         level = 9 ;
         name = spdwm_p1_dmg ;
         value = 109 120 ;
         value_charged_scale = 2.0 ;
         }

         talentvalue {
         level = 10 ;
         name = spdwm_p1_dmg ;
         value = 139 154 ;
         value_charged_scale = 2.0 ;
         }

         talentvalue {
         level = 14 ;
         name = spdwm_p1_dmg ;
         value = 221 244 ;
         value_charged_scale = 2.0 ;
         }

         talentvalue {
         level = 15 ;
         name = spdwm_p1_dmg ;
         value = 319 353 ;
         value_charged_scale = 2.0 ;
         }

      }


Notice how the names there end with "dmg"? These determine the amount of damage that this power will inflict on enemies, at different levels. Once again, the level numbers here are the same as the requirement numbers from before. The value here refers to the the amount of damage this power will inflict at each level. The space between them means that it's a range between the two numbers. Don't go overboard with the damage numbers -- it's only the first power. Finally, value_charged_scale refers to the percentage that damage will increase by if the power is charged. In Spider-Woman's case, it will take twice as much damage if charged. Now look at the powerstyle file. Hit Ctrl + F, type in "damage =" and press Enter. You will see this:

     damage = %spdwm_p1_dmg ;

This refers to the damage numbers that you set inside the talents file. Now, let's keep going along in the talents file. Next are these...


      level {
      description = %spdwm_p1_dmg $DMG_ENERGY\n%spdwm_p1_pwr $EP ;
         tier {
         cost = 1 ;
         count = 5 ;
         }

         tier {
         cost = 2 ;
         count = 4 ;
         }

         tier {
         cost = 3 ;
         count = 1 ;
         }

         tier {
         cost = 3 ;
         count = 4 ;
         difficulty = hard ;
         }

         tier {
         cost = 4 ;
         count = 1 ;
         difficulty = hard ;
         }

         require {
         cat = level ;
         level = %spdwm_p1_req ;
         }

      }

   }


In here, the description tells the player how much damage the power will inflict, then how much energy it will cost. Information connected to the values you placed would be put here. Notice in Spider-Woman's case you see "$DMG_ENERGY" there... this refers to the damage type that is inflicted on the enemy. More on that in a future lesson. The tiers you are seeing refer to how much skill points are required to strengthen the power as your character levels up. Some will be placed with the difficulty at hard, meaning that it cannot be leveled up to that tier if playing the game at normal or easy. You can also see at the end, that the require level is named the exact same thing as the requirements named earlier. That's why it's so important that they must be identical. Otherwise, the game won't recognize it.

(LESSON CONTINUES IN NEXT POST)


September 27, 2019, 02:14AM #18 Last Edit: September 06, 2024, 08:14AM by Outsider




REQUIREMENTS & TIERS
Now, earlier I mentioned how requirement numbers differ depending on the power, as does the tiers. You can look at Spider-Woman's talents file as a reference, but I will list them in (hopefully) an easy way. These are important to ensure that the character's powers level up as correctly as all others do.

Requirement Level (Requirement Value)
1st Power: 1 (1), 5 (13), 6 (16), 9 (25), 10 (28), 14 (52), 15 (72) -- Unlocked at start of game, level 1.
2nd Power: 1 (5), 5 (14), 6 (17), 9 (26), 10 (29), 14 (53), 15 (73) -- Unlocked at level 5.
3rd Power: 1 (10), 3 (13), 4 (16), 7 (25), 8 (28),  12 (52), 13 (72) -- Unlocked at level 10.
4th Power: 1 (17),  4(26), 5 (29), 9 (53), 10 (73) -- Unlocked at level 17.
5th Power: 1 (20), 3 (26), 4 (29), 8 (53), 9 (73) -- Unlocked at level 20.
1st Boost: 1 (2), 5 (14), 6 (17), 9 (26), 10 (29), 14 (53), 15 (73) -- Unlocked at level 2.
2nd Boost: 1 (14), 2 (17), 5 (26), 6 (29), 10 (53), 11 (73) -- Unlocked at level 14.
Xtreme: 1 (10), 8 (45) -- Unlocked at level 10.

Tier Cost (Tier Count)
1st Power: 1 (5), 2 (4), 3 (1), 3 (4) Difficulty Hard, 4 (1) Difficulty Hard
2nd Power: 1 (5), 2 (4), 3 (1), 3 (4) Difficulty Hard, 4 (1) Difficulty Hard
3rd Power: 1 (3), 2 (4), 3 (1), 3 (4) Difficulty Hard, 4 (1) Difficulty Hard
4th Power: 2 (4), 3 (1), 3 (4) Difficulty Hard, 4 (1) Difficulty Hard
5th Power: 2 (3), 3 (1), 3 (4) Difficulty Hard, 4 (1) Difficulty Hard
1st Boost: 1 (5), 2 (4), 3 (1), 3 (4) Difficulty Hard, 4 (1) Difficulty Hard
2nd Boost: 1 (1), 2 (4), 3 (1), 3 (4) Difficulty Hard, 4 (1) Difficulty Hard
Xtreme: 2 (1), 0 (7)

This is the standard for mods, as characters on average have a moveset of 5 powers, 2 boosts, and an Xtreme (8 total). However, the values change a little if a character has more than 8 powers total. If you want your mod to have the maximum of 10, then use the following.

Requirement Level (Requirement Value)
1st Power: 1 (1), 5 (13), 6 (16), 9 (25), 10 (28), 14 (52), 15 (72) -- Unlocked at start of game, level 1.
2nd Power: 1 (5), 5 (14), 6 (17), 9 (26), 10 (29), 14 (53), 15 (73) -- Unlocked at level 5.
3rd Power: 1 (10), 3 (13), 4 (16), 7 (25), 8 (28),  12 (52), 13 (72) -- Unlocked at level 10.
4th Power: 1 (15), 2 (18), 5 (27), 6 (30), 10 (53), 11 (73) -- Unlocked at level 15.
5th Power: 1 (17),  4(26), 5 (29), 9 (53), 10 (73) -- Unlocked at level 17.
6th Power: 1 (20), 3 (26), 4 (29), 8 (53), 9 (73) -- Unlocked at level 20.
7th Power (if any): 1 (23), 2 (26), 3 (29), 7 (53), 8 (73) -- Unlocked at level 23.
1st Boost: 1 (2), 5 (14), 6 (17), 9 (26), 10 (29), 14 (53), 15 (73) -- Unlocked at level 2.
2nd Boost: 1 (7), 4 (14), 5 (17), 8 (26), 9 (29), 13 (53), 14 (73) -- Unlocked at level 7. Only use if character has three boosts.
3rd Boost (if any): 1 (14), 2 (17), 5 (26), 6 (29), 10 (53), 11 (73) -- Unlocked at level 14.
Xtreme: 1 (10), 8 (45) -- Unlocked at level 10.

Tier Cost (Tier Count)
1st Power: 1 (5), 2 (4), 3 (1), 3 (4) Difficulty Hard, 4 (1) Difficulty Hard
2nd Power: 1 (5), 2 (4), 3 (1), 3 (4) Difficulty Hard, 4 (1) Difficulty Hard
3rd Power: 1 (3), 2 (4), 3 (1), 3 (4) Difficulty Hard, 4 (1) Difficulty Hard
4th Power: 1 (1), 2 (4), 3 (1), 3 (4) Difficulty Hard, 4 (1) Difficulty Hard
5th Power: 2 (4), 3 (1), 3 (4) Difficulty Hard, 4 (1) Difficulty Hard
6th Power: 2 (3), 3 (1), 3 (4) Difficulty Hard, 4 (1) Difficulty Hard
7th Power (if any): 2 (2), 3 (1), 3 (4) Difficulty Hard, 4 (1) Difficulty Hard
1st Boost: 1 (5), 2 (4), 3 (1), 3 (4) Difficulty Hard, 4 (1) Difficulty Hard
2nd Boost: 1 (4), 2 (4), 3 (1), 3 (4) Difficulty Hard, 4 (1) Difficulty Hard -- Only use if character has three boosts.
3rd Boost (if any): 1 (1), 2 (4), 3 (1), 3 (4) Difficulty Hard, 4 (1) Difficulty Hard
Xtreme: 2 (1), 0 (7)

If you are confused by this, you can copy vanilla mods' talent entries, as they are already set up. Damage and energy costs follow this as well. This is another reason why I keep talent and powerstyle data for all mods as Notepad text files.

IMPORTANT NOTE:
The maximum amount of total powers that a mod can have is 10. This is because some players play the game with a keyboard, and any more than 10 will cause their games to crash.






BOLTONS
Boltons, which as noted before are separate objects that a character can hold such as a weapon or device, can be set up through events to make set-ups easier. Observe what was done for :cable2: Cable below.

   event {
   bolt = Bip01 R Hand ;
   boltslot = ebolton_clawright ;
   inherit = bolton ;
   model = models/weapons/cable_gun ;
   name = draw_gun1 ;
   }

   event {
   boltslot = ebolton_clawleft ;
   critical = true ;
   inherit = bolton ;
   name = draw_gun2 ;
   removebolton = true ;
   }

   event {
   bolt = Bip01 Spine2 ;
   boltslot = ebolton_clawleft ;
   inherit = bolton ;
   model = models/weapons/cable_gun_back ;
   name = holster_gun1 ;
   }

   event {
   boltslot = ebolton_clawright ;
   critical = true ;
   inherit = bolton ;
   name = holster_gun2 ;
   removebolton = true ;
   }

The "model" shows what model is being used for the event, and "boltslot" shows what limb position it's attached to, which is slightly different than "bolt" which refers to the limb itself. "ebolton_clawright" usually refers to a character's right hand, and "ebolton_clawleft" usually refers to the left hand. There are also "ebolton_weapon" and ebolton_altweapon" which refers to the right hand and left hand respectively as well. However, these are also used for in-game weapons that characters can pick up, so it's best to use "clawright" and "clawleft." Some weapons can be placed on someone's back if the bolton if aligned correctly, such as Cable's "cable_gun_back" bolton. Events can be named whatever you want.

Once the events are set up, you can then trigger those event anytime you want in any Fightmove by placing the event name. For example, in Cable's case, it would be....

      trigger {
      name = draw_gun1 ;
      time = 0 ;
      }
(to summon the bolton)

      trigger {
      name = holster_gun1 ;
      time = 0 ;
      }
(to remove the bolton)


SKIN SEGMENTS
Similarly, skin segments, which are objects that are a part of some particular skins, can also be set up through events. For example, let's see what was done with :deadpool: Deadpool's skin segments.

   event {
   inherit = skinsegment ;
   name = hide_swords ;
   show = false ;
   show2 = false ;
   skinsegment = sword_r_hand ;
   skinsegment2 = sword_l_hand ;
   }

   event {
   inherit = skinsegment ;
   name = show_swords ;
   show = true ;
   show2 = true ;
   skinsegment = sword_r_hand ;
   skinsegment2 = sword_l_hand ;
   }

The coding is different, and you can link two skin segments together for a single event. You can also make it so it shows one skin segment (show = true) and hides the other (show2 = false). If it's only one skin segment, you can remove the "show2" and "skinsegment2" parts. You must use the correct names of the skin segments that the skins come with. Otherwise, it won't work.

Now just like bolton events, once the skin segment events are set up, you can then trigger those events anytime you want in any Fightmove by placing the event name. For example, in Deadpool's case, it would be....

      trigger {
      name = show_swords ;
      time = 0 ;
      }
(to summon the skin segments)

      trigger {
      name = holster_gun1 ;
      time = 0 ;
      }
(to remove the skin segments)





Lesson Takeaway:
-What you do in the talents file should reflect the powerstyle file. They go hand-in-hand.
-The character's first power must be unlocked and have one skill point in it at the start of the game.
-Do not go overboard with the values. Having early powers that are too damaging will make the game too easy, and high power costs mean will drain your character's energy too quickly. Save it for the more destructive powers that should be unlocked at higher XP levels.
-Try to keep the requirement values and tier values the same, so that they level up correctly.


October 13, 2019, 09:00PM #19 Last Edit: September 13, 2020, 06:08AM by Outsider
Lesson 8: Passives


OK, so now comes the part that involves coding, but is much easier. There are permanent powerups that costs SHIELD points to increase -- these are called passives. Usually there are three for every skin/costume that the character has. For this lesson, we will continue using :spiderwoman: Spider-Woman. Passives only appear in the talents file, and are listed that the bottom of the talents data, usually after the Xtreme. So now, open Spider-Woman's talents file, and hit Ctrl + Find. Type "spdwm_outfit13" and press Enter.

You should see the Defense passive. All skins have this one particularly, but all passives are written as like below. Now let's look at this in detail to see what each line means...


   talent {
   descname = Defense ;
   description = Increases $DR. ;
   icon = 22 ;
   icon_texture = textures/ui/talent_icons.png ;
   name = spdwm_outfit13 ;
   skin = 0 ;
   type = passive ;
      talentvalues {
         talentvalue {
         level = 1 ;
         name = spdwm_outfit13_dr ;
         value = 1 ;
         }

         talentvalue {
         level = 9 ;
         name = spdwm_outfit13_dr ;
         value = 9 ;
         }

      }

      level {
      count = 9 ;
      description = +%spdwm_outfit13_dr $DR ;
         powerup {
         life = -1 ;
            affecter {
            attribute = defense_rating ;
            level = %spdwm_outfit13_dr ;
            }

         }

      }

   }


descname = The name of the passive.
description = A brief explanation of what the passive does.
icon = The number of the icon that is being used.
icon_texture = The icons file that the icon is coming from. Usually, "talent_icons" are used for passives, but character icons can be used as well.
name = The internal name for the passive. Because this defense passive is the third of her first costume, it ends with "13." More on that below.
skin = The number of the skin that the passive is for. (0 = Character's 1st skin, 1 = 2nd skin, 2 = 3rd skin, 3 = 4th skin)

Please note that only the first four skins can have passives. Every skin has three passives, with Defense usually being the third one. So, the internal name is usually this...

1st skin, 1st passive = character_outfit11
1st skin, 2nd passive = character_outfit12
1st skin, 3rd passive = character_outfit13 (Usually Defense)

2nd skin, 1st passive = character_outfit21
2nd skin, 2nd passive = character_outfit22
2nd skin, 3rd passive = character_outfit23 (Usually Defense)

3rd skin, 1st passive = character_outfit31
3rd skin, 2nd passive = character_outfit32
3rd skin, 3rd passive = character_outfit33 (Usually Defense)

4th skin, 1st passive = character_outfit41
4th skin, 2nd passive = character_outfit42
4th skin, 3rd passive = character_outfit43 (Usually Defense)

It should also be noted that for passives, you shouldn't spell out the whole name of the character. For example, Spider-Woman uses the abbreviation "spdwm" for her passives. Sometimes, passives won't work if the spelling is too long, so limit it to five letters. Also, do not use the same name as another character, or they will cause clashes. For instance, :magneto: Magneto uses the abbreviation "mag" for his passives. So, :magma: Magma cannot use the same abbreviation "mag" for her passives, as doing so will cause a clash if they are on the same team -- one will have the passive, and the other won't. So, Magma uses her whole name "magma" for her passives because it's short enough. This way, there are no clashes. So, when you are working on a character, use an abbreviation that no one else is using. If you are unsure, check the mods that have the same starting letters and see what they are using so you don't use the same abbreviation.






Now let's look further into the passive...

      talentvalues {
         talentvalue {
         level = 1 ;
         name = spdwm_outfit13_dr ;
         value = 1 ;
         }

         talentvalue {
         level = 9 ;
         name = spdwm_outfit13_dr ;
         value = 9 ;
         }

      }

Notice that the talent values only go up to 9? That's because 9 is the maximum amount of level that the passive can go to. Can you go higher? Yes, but it's not recommended because remember that you have to spend SHIELD credits to increase the passive. Now let's look further to where it says "powerup."

         powerup {
         life = -1 ;
            affecter {
            attribute = defense_rating ;
            level = %spdwm_outfit13_dr ;
            }

This is the actual powerup that makes up the passive -- in this case, defense_rating. The level listed here is the same as the name listed in the talent values shown before, but with a percent sign (%) in front of it, so make sure they match. Notice that the life is set at -1? That means it's permanent.








There are many, many passives besides Defense. Here is a list I've compiled to make it extremely easy. It showcases all of the passive types known:

https://marvelmods.com/forum/index.php/topic,10953.0.html


DID YOU KNOW?:
This passives collection is how I choose which ones I want without opening multiple talent files. You can do this too if you wish to, but I find this method very easy.






Passives mostly use the "talent_icons" and each icon is connected to a passive. Here is a list of icons in the "talent_icons" file.

ICON   PASSIVE
0          Power Damage
1          Critical Chance
2          (Gold Fist Icon)
3          (Gold Wing Icon)
4          (Star Icon)
5          Melee Damage
6          Experience
7          Bleed Damage
8          Point Blank
9          Dodge
10        Momentum Boost
11        (Awful Leaping Man in Blue)
12        Body Boost
13        Boost Stats
14        Health Per Kill
15        Energy Per Kill
16        Resistance Boost
17        Add Damage Type (Left & Right Arrows)
18        Skill Boost
19        Reflect Melee
20        Max Health
21        Max Energy
22        Defense
23        Resurrection
24        Focus Boost
25        Striking Boost
26       (Shield with Lightning Icon)
27       (Shield with Brain Icon)
28       (Shield with Radiation Icon)
29       Leadership
30       Health Regen
31       Energy Regen
32       (Two Beams Colliding Icon)
44      (1 Icon)
45      (2 Icon)
46      (3 Icon)
47      (4 Icon)
48      (Tooth in Blood Icon)
49      (Gold Hand Icon)
50      (Small Baseball Bat Icon)
51      (POW Icon)
52      (Yellow Fist Going Up Icon)
53      (Blue Block Breaking Icon)
54      (Money Bag Icon)
55      (Yin & Yang Red & Blue Icon)
56      (2 Blue Balls and Plus Sign Icon)
57      (Blue Skull Icon)

ALL OTHER NUMBERS ARE BLANK.






Now notice that Spider-Woman has a passive that no one else has -- Bio-Energy Mastery. Here's how it looks.


   talent {
   descname = Bio Energy Mastery ;
   description = Increases $DMG_ENERGY done by all attacks. ;
   icon = 8 ;
   icon_texture = textures/ui/spiderwoman_icons.png ;
   name = spdwm_outfit12 ;
   skin = 0 ;
   type = passive ;
      talentvalues {
         talentvalue {
         level = 1 ;
         name = spdwm_outfit12_pct ;
         value = 1.03 ;
         }

         talentvalue {
         level = 9 ;
         name = spdwm_outfit12_pct ;
         value = 1.15 ;
         }

      }

      level {
      count = 9 ;
      description = %spdwm_outfit12_pct:s $DMG_ENERGY ;
         powerup {
         life = -1 ;
            affecter {
            affect_type = scale ;
            attribute = atk_damage ;
            level = %spdwm_outfit12_pct ;
            scope_damage = dmg_energy ;
            }

         }

      }

   }


In this one, she is using her own icons rather than the generic talent icons I showed you above. You can do that if you wish to. In the powerup, she connected her atk_damage (attack damage that you inflict on enemies) to a particular damage type: radiation damage. Scope refers to a given category that the passive is connected to. With this in mind, you can create custom passives for your character that no one else may have.






CUSTOM TALENTS

Now remember when I mentioned how :ghostr: Ghost Rider had fire immunity? Well, that is a custom talent. These are not passives, so you do not need to pay SHIELD points. They can use the same powerups as passives can, and they too are permanently attached to a character. For example, scroll all the way up in Spider-Woman's talents file. You'll see this...


   talent {
   descname = Radiation Immunity ;
   description = 100% Immune to $DMG_RADIATION. ;
   name = spdwm_resist ;
   type = ability ;
      level {
      count = 1 ;
         powerup {
         life = -1 ;
            affecter {
            affect_type = scale ;
            attribute = def_damage_scope ;
            damagetype = dmg_radiation ;
            level = 0 ;
            }

         }

      }

   }


That is her custom talent that makes her immune to radiation damage, which is a result of her powers. She forever has this, so no need to level it up. This means that radiation attacks against her are useless and she'll incur no damage at all. Likewise, the same powerups you see in passives and the like can also be set up as a custom talent -- provided that your character has the powers or skills to warrant this.

Whenever setting up a custom talent, pay close attention to the name of the talent. In her case, it was called "spdwm_resist." Now look in her herostat. At the near bottom, you'll see this...

      talent {
      level = 1 ;
      name = spdwm_resist ;
      }

Notice that the name there matches the name in her talents file. This is important, as if it's not on the herostat, then the custom talent will not work. BTW, if Spider-Woman's herostat doesn't have the above entry for some reason, then go ahead and add it. It's a mistake on the developer's part -- she should have this.







Lesson Takeaway:
-Only the first four skins can have passives. Defense is one of them by default.
-Do not use the same abbreviation as another character, or it will clash.
-You can create all kinds of passives for your character, but don't go overboard.
-When naming custom talents, make sure the talent is also listed at your character's herostat, or it won't work.
-View the talents files of various characters. Then copy and paste the passives you want.


November 11, 2019, 12:30AM #20 Last Edit: April 18, 2024, 01:13PM by Outsider
Lesson 9: Boost Coding

Now that you have your talents file set up for the most part, you have to set up your powers at the powerstyle file. The easiest way to do this is to copy the coding from one of the official characters (by opening that character's powerstyle file via QuickBatch or XMLBCUI, then copying the power you want), then pasting it to your character's powerstyle file. But this lesson will show you to customize it to your liking.

For this lesson, let's continue with :spiderwoman: Spider-Woman's files. Look at her talents file and scroll down -- you will eventually see that she has two powers that appear different from other powers. These are called Boosts. They are powerups specific to that character that uses passives (see previous lesson) except that it costs energy instead of SHIELD points, and that it lasts for a certain amount of time. Usual mods carry two, while very few mods have three. In Spider-Woman's case, you will see that she has two. One of them is called "Attract," and down further is the other "Metabolic Aura." Now open her powerstyle file, hit Ctrl + F and type "name = power6" and hit Enter. It'll take you to it. Power 6 is her first boost, Attract. The coding for it is below. I will break it down to help make you understand what the "triggers" in the coding means. My notes for them will be in Royal Blue and isn't part of the coding.





   FightMove {
   aicanuse = false ;
   aitype = buff ;
   animenum = ea_power6 ;
   combotextfinisher = Cloud ;
   combotextstarter = Pheromone ;
   icon = 5 ;
   is_power = true ;
   lockangles = true ;
   lockspeed = true ;
   name = power6 ;
   priority = 5 ;


"aicanuse" refers to whether an AI-controlled hero can use the power or not.
"aitype" refers to what kind of power it is. Boosts that only help the hero who summoned it are called "buffself" while boosts that help the entire team are called "buff."
"animenum" refers to what animation is being used.
"combotextfinisher" = We'll skip that for now.
"combotextstarter" = We'll skip that for now.
"icon" refers to what icon from the character's icon file is being used.
"is_power" refers to whether the move is a power or not. If it's not, this line is not there.
"lockangles" = Not sure what this means, actually.
"lockspeed" = Not sure what this means, either.
"name" refers to the name of the power that the game recognizes it as.
"priority" refers to whether the power can be interrupted by enemy attacks or not. The options are usually "5" or "uninterruptable."


      require {
      cat = skill ;
      item = spdwm_power6 ;
      level = 1 ;
      }

This is the requirement that the game recognizes will unlock this boost.

      trigger {
      effect = char/spidwm/p6_power ;
      fxlevel = 1 ;
      name = effect ;
      time = 0.13 ;
      }

This trigger is for an effect, as seen by the "name." The "effect" displays the effect from the game that is being used. The "time" tells the game when between 0 and 0.99 to display this effect. "fxlevel" refers to the level of the effect, if there is more than one level. More on effects in a future lesson.

      trigger {
      bolt = Bip01 L Hand ;
      effect = char/spidwm/p6_power ;
      fxlevel = 2 ;
      name = effect ;
      time = 0.13 ;
      }

Same trigger for an effect, but also has "bolt," which refers to a certain body part where the effect is coming from. In this case, her left hand.

      trigger {
      bolt = Bip01 R Hand ;
      effect = char/spidwm/p6_power ;
      fxlevel = 2 ;
      name = effect ;
      time = 0.13 ;
      }

Same effect trigger as the previous, but uses her right hand as the "bolt." Notice that the same "time" is used, so all of these effects will appear at the same time.

      trigger {
      effect = char/spidwm/p6_power ;
      fxlevel = 3 ;
      name = effect ;
      time = 0.59 ;
      }

Same effect trigger as the previous ones, but the "time" is different, so it will appear at a later time than the previous effects. The "fxlevel" is different, but more than that in a different lesson.

      trigger {
      name = powerusage ;
      next_eventtag = 1 ;
      powerusage = %spdwm_p6_pwr ;
      time = 0.59 ;
      }

This is the powerusage trigger, but this can be connected to the actual boost, making this trigger unnecessary. I'll show you what I mean later. Also, notice that "next_eventtag = 1" is used? Take a look at the next one...

      trigger {
      name = sound ;
      next_eventtag = 2 ;
      sound = char/spidwm_m/p6_power ;
      tag = 1 ;
      time = -1 ;
      }

This is the sound trigger, means that a sound will heard at this time. "tag" refers to the "next_eventtag" from the previous trigger, which was 1. This is so they don't they don't need to write the "time" again, which is why "time" is listed as -1. It will appear at the same time as the previous trigger. However, this code can be connected to another and doesn't need to be separated. More on that later. Plus, don't be confused -- the "next_eventtag" is not required for the power to work. Don't worry about effects or sounds for now.

      trigger {
      life = %spdwm_p6_lif ;
      name = powerup ;
      next_eventtag = 3 ;
      tag = 2 ;
      time = -1 ;
         special_fx {
         effect = char/spidwm/p6_power ;
         fxlevel = 4 ;
         how_used = primary ;
         }

         special_fx {
         effect = char/spidwm/p6_power ;
         fxlevel = 5 ;
         how_used = deactivation ;
         }

         affecter {
         attribute = resist_last_hit_major_type ;
         level = 0.5 ;
         }

      }

This is the powerup trigger which creates the actual boost.
"life" is to the duration that the boost will last. This refers to the values placed from the talents file.
"name" refers to what the trigger is. This one must be "powerup" for it to work.

Now pay close attention. Do you see that "special_fx" and "affecter" are three spaces after the powerup, with their own brackets? That's because these coding parts are under the powerup coding. "special_fx" refers to the effects that appear during the boost. "affecter" refers to the actual powerup that makes up the boost. In Spider-Woman's case, the affecter is "resist_last_major_hit_type" but it can be any passive that you want, such as damage increase, speed increase, reduce power cost, health regen, etc. Whatever you choose, it is placed here.


      trigger {
      arc = 180 ;
      damage = 0 ;
      damagetype = dmg_energy ;
      maxrange = 144 ;
      name = taunt ;
      powerusage = 0 ;
      tag = 3 ;
      time = -1 ;
      }

This is a damage trigger to set up the boost. It is connected to the previous triggers, so a "tag" is there referring to it and the "time" is -1. "arc" refers to the radius around the character that the trigger hits. The "name" is a taunt because it takes no damage, which is also why "damage" is at 0. Really, "damage" and "powerusage" don't need to be there.

      chain {
      action = Idle ;
      result = idle ;
      }

   }

This is the chain that brings the character back to the idle animation once you've activated the boost.






Now, notice when I said that some entries were not necessary? Well, they could have written the coding easier to condense it. (1) You can combine effect and sound triggers if they are to appear at the same time. Observe below -- I will take two triggers together and combine them.

      trigger {
      effect = char/spidwm/p6_power ;
      fxlevel = 3 ;
      name = effect_sound ;
      sound = char/spidwm_m/p6_power ;
      time = 0.59 ;
      }

See that? I combined two triggers into one, and got rid of the "next_eventtag" and "tag" parts, as it's not necessary. The main thing needed to do this is to change the "name" to effect_sound. (2) You can add the powerusage to the powerup trigger, so that a separate powerusage trigger isn't necessary. Observe...

      trigger {
      life = %spdwm_p6_lif ;
      name = powerup ;
      powerusage = %spdwm_p6_pwr ;
      time =0.59 ;
         special_fx {
         effect = char/spidwm/p6_power ;
         fxlevel = 4 ;
         how_used = primary ;
         }

         special_fx {
         effect = char/spidwm/p6_power ;
         fxlevel = 5 ;
         how_used = deactivation ;
         }

         affecter {
         attribute = resist_last_hit_major_type ;
         level = 0.5 ;
         }

      }

Notice that I added the powerusage to it, got rid of the tag and next_eventtag, and changed the time back to 0.59. Condensing the triggers can really help with space when adding multiple coding triggers. It's less confusing.

Feel free to change the affecter to whatever you wish to try out different powerups with your character. Now, let's look at Spider-Woman's second boost coding...

   FightMove {
   aicanuse = false ;
   aitype = buff ;
   animenum = ea_power7 ;
   icon = 6 ;
   is_power = true ;
   lockangles = true ;
   name = power7 ;
   priority = 5 ;
      require {
      cat = skill ;
      item = spdwm_power7 ;
      level = 1 ;
      }

      trigger {
      effect = char/spidwm/p7_power ;
      fxlevel = 1 ;
      name = effect ;
      time = 0 ;
      }

      trigger {
      effect = char/spidwm/p7_power ;
      fxlevel = 2 ;
      name = effect ;
      time = 0.8 ;
      }

      trigger {
      name = powerusage ;
      next_eventtag = 1 ;
      powerusage = %spdwm_p7_pwr ;
      time = 0.8 ;
      }

      trigger {
      name = sound ;
      next_eventtag = 2 ;
      sound = char/spidwm_m/p7_power ;
      tag = 1 ;
      time = -1 ;
      }

      trigger {
      life = %spdwm_p7_lif ;
      name = powerup ;
      share_life = 1 ;
      share_radius = 80 ;
      tag = 2 ;
      time = -1 ;
         affecter {
         attribute = health_regen_pct ;
         level = %spdwm_p7_hlth ;
         }

         special_fx {
         effect = char/spidwm/p7_power ;
         fxlevel = 3 ;
         how_used = primary ;
         }

         special_fx {
         effect = char/spidwm/p7_power ;
         fxlevel = 3 ;
         how_used = deactivation ;
         }

      }

      chain {
      action = Idle ;
      result = idle ;
      }

   }

As you can see, it's done pretty much the same way. But focus on the affecter. The attribute is different -- it says "health_regen_pct" which focuses on healing. And notice above it, it uses "share_radius," which refers to how large the radius around Spider-Woman that allies need to be within so that they can be affected by her boost. Not all powerups have this, but if you want the boost to work this way, then use it. The attributes can be different, and can perform different boosts. Here are some, but not all:

ATTRIBUTES
atk_damage: Amount of damage the character can inflict on enemies. 1 = 100% (normal damage), 0.5 = 50% (half the damage), 1.5 = 150% (twice the damage). You can add "scope_powers = true" for only power damage, or add "scope_non_powers = true" for only melee attacks.
def_damage: Amount of resistance to enemy attacks. 1 = 100% (no resistance), 0.5 = 50% (more resistance), 1.5 = 150% (less resistance), 0 = 0% (invincible).
def_damage_scope: Amount of resistance to a certain damage type. 1 = 100% (no resistance), 0.5 = +50% resistance, 1.5 = -50% resistance, 0 = 0% (immune).
def_dodge = Amount of chance that you can dodge/evade attacks. By default, characters can't dodge. 1.1 = +10% evasion chance, 0.5 = -50% evasion chance.
move: Amount of movement speed. 1 = 100% (normal speed), 0.5 = -50% speed, 1.5 = +50% speed.
move_attack: Amount of attack speed. 1 = 100% (normal speed), 0.5 = -50% speed, 1.5 = +50% speed.
power_cost: Amount of energy spent for powers: 1 = 100% (normal EP cost), 0.5 = 50% (less EP cost), 1.5 = 150% (more EP cost)
strength: Amount of striking in the stats screen. 1 = +1 point to striking, 3 = +3 points to striking.
body: Amount of body in the stats screen. 1 = +1 point to body, 3 = +3 points to body.
mind: Amount of focus in the stats screen. 1 = +1 point to focus, 3 = +3 points to focus.
traits: Amount of striking, body & focus in the stats screen. 1 = +1 point to stats, 3 = +3 points to stats.
defense_rating: Amount of defense in the stats screen. 1 = +1 point to defense, 3 = +3 points to defense.
xp: Amount of experience the characters gains. 1 = 100% (normal xp), 0.5 = 50% (-50% xp), 1.2 = 120% (+20% xp) 
momentum: Amount of momentum building up for Xtreme powers. 1 = 100% (normal rate), 0.5 = 50% (slower rate), 1.5 = 150% (faster rate)
health_regen_pct: Amount of health regenerated per second. By default, characters cannot regenerate health, so 0.2 = +20% health regen.
energy_regen_pct: Amount of energy regenerated per second. By default, characters cannot regenerate health, so 0.2 = +20% health regen.
atk_critical: Amount of chance for critical damage. 0 = 0% (no chance), 1 = 100% (certain critical, but that's OP), 0.15 = 15% (15% chance).
health_per_kill: Amount of health you gain for every enemy taken out. 6 = +6 health per kill.
energy_per_kill: Amount of energy you gain for every enemy taken out. 6 = +6 energy per kill.

One other important thing: If you want to set up a boost where your character sets it up, and your teammates are also powered up from it, then add this to the powerup trigger...

      trigger {
      apply_ally = all ;
      life = %spdwm_p6_lif ;
      name = powerup ;
      powerusage = %spdwm_p6_pwr ;
      time =0.59 ;

If you do that, everyone will benefit from the boost, not just your character. Allies will not suffer power costs. Personally, I let heroes have boosts that power up everyone, while villains are more likely to power up only themselves. Figure out what personality your character is like and customize boosts to fit your character.




RENDER FX

While I was working on Chameleon of Mortal Kombat, I found out the various effects that cover the entire character's body. These are called renderfx effects. I've listed them here because you can add them to boosts. First, let me tell you what each one does.

burning: orange shade (slightly red)
chilled: blue shade
cloaked: black shade (semi-transparent)
cloaked_no_tint: semi-transparent
enraged: dark red shade
fading: barely anything at all
invisible: not visible at all
invulnerable: purple shade
metalfreeze: gray shade, barely noticeable
pain1: white shade (disappears when hit)
pain2: red shade (disappears when hit)
radiated: green shade
radiation: green shade, same as radiated
regen: yellow shade, same as minions
xtreme_fb: skin gets brighter

OK, so have you noticed if you freeze an enemy as :iceman: Iceman, the enemy's whole body is shaded blue? It's using "chilled." Observe...

   event {
   class = freeze ;
   inherit = powerup ;
   name = freeze_powerup ;
   no_shatter_on_damage = true ;
   renderfx = chilled ;
   shatter_on_finisher = true ;
   sound1 = char/iceman_m/p2_impact ;
   sound2 = char/iceman_m/p2_explode ;
   user1 = 2 ;
      special_fx {
      bolt = Bip01 Spine2 ;
      effect = char/iceman/special_chilled ;
      fxlevel = 1 ;
      how_used = primary ;
      never_cycle = true ;
      }

      special_fx {
      effect = char/iceman/special_frozen ;
      fxlevel = 3 ;
      how_used = primary ;
      never_cycle = true ;
      }

      special_fx {
      effect = char/iceman/special_frozen ;
      fxlevel = 2 ;
      how_used = custom ;
      tag = 1 ;
      }

   }

You see? Enemies that have a specific powerup attached to them use these as well. You can add a render fx to any boost to cover an enemy or even your character in a certain color shade. However, for it to work on your character, its skin has to have "Generate Global Color" enabled. Otherwise, its skin will just appear pitch black instead. To do that, go to this link (https://marvelmods.com/forum/index.php/topic,10809.msg200108.html#msg200108) and go to where it says "Global Color Fix."





Lesson Takeaway:
-Practice with different passives in the powerup triggers to set up different boosts.
-Remember that boost values refer to the numbers you placed in the the character's talents file.
-You can combine certain triggers to condense the coding and make it less messy.
-Add "apply_ally = all" to allow your teammates to be powered up by the same boost as your character.
-If you get confused by the effect and sound triggers, practice without them. However, you must keep "special_fx" and "affecter" to test out the boost.
-Don't attempt attack powers or Xtreme coding until you've mastered boosts, as they are the easiest of coding powers.


January 13, 2020, 12:47AM #21 Last Edit: July 26, 2022, 10:32AM by Outsider
Lesson 10: Power Coding (Melee)

Sorry it's been awhile since my last lesson, but I've been crazy busy. Anyway, onto the lesson. You're in the powerstyle file for your character, and you've just done the boosts. Now you need to do attack powers. This type of coding has many different categories. For this lesson, I'll show you how to do one of the relatively easier ones -- melee powers.

What is melee? It's the type of powers that are used up at close range to the enemy using various punches and kicks, or attacks with knives, swords, claws, and other close range weapons. Characters who focus on martial arts, or are brutes with super strength tend to have powers in this category.

For this lesson, we will look at :pman: Luke Cage. In particular, we will look at his first power -- the Power Jab. Open his powerstyle file, hit Ctrl + F to Find, type "name = power1" and press Enter. You'll run into the coding for it. Now, you'll notice as you scroll down that he has an initial, a "power1_loop" which is a loop, and a "power1_release" which is a release. All three parts are needed only if you want the move to be a charged move. More on that later. For now, let's look at the release part below.


   FightMove {
   aitype = melee ;
   animenum = ea_power1_end ;
   combotextfinisher = Jab ;
   combotextstarter = Impervious ;
   icon = 0 ;
   is_power = true ;
   lockangles = true ;
   name = power1_release ;
   powerup_tag = lukeca_p1 ;
   priority = 5 ;
      trigger {
      charge_type = stop ;
      critical = true ;
      name = charge ;
      time = 0 ;
      }

      trigger {
      life = 0.2 ;
      movement = 0 ;
      name = slide ;
      targetdistance = 90 ;
      targetradius = 50 ;
      time = 0 ;
      }

      trigger {
      bolt = Bip01 R Hand ;
      effect = char/lukeca/p1_power ;
      fxlevel = 3 ;
      name = effect_sound ;
      sound = char/lukeca_m/p1_power ;
      time = 0.14 ;
      }

      trigger {
      critical = true ;
      loop_type = stop ;
      name = sound ;
      sound = char/lukeca_m/p1_charge ;
      time = 0.14 ;
      }

      trigger {
      critical = true ;
      name = powerup ;
      remove_tag = lukeca_p1_link ;
      time = 0.21 ;
      }

      trigger {
      arc = 65 ;
      damage = %lukec_p1_dmg ;
      damagemods_require_charge = true ;
      damagescale = none ;
      knockback = %lukec_p1_kb ;
      maxrange = 72 ;
      name = punch ;
      time = 0.21 ;
         damageMod {
         name = dmgmod_auto_knockback ;
         }

         damageMod {
         name = dmgmod_ground ;
         }

      }

      chain {
      action = Idle ;
      result = idle ;
      }

   }


I know it looks confusing, but by now, you know what some of those terms mean. So I'll break down the terms that weren't covered in the previous lesson.

"combotextfinisher" refers to the term used at the end if this attack power is used alongside another character's power in a combo. It can be named whatever you want. For example, the combo text finisher for this power is "Jab." So if this power connects with another character's power in a combo attack, you will see on the screen a special text that reads "Jab" at the end.

"combotextstarter" refers to the term used at the beginning if this attack power is used alongside another character's power in a combo. It can also be named whatever you want. For example, the combo text finisher for this power is "Impervious." So if this power connects with another character's power in a combo attack, you will see on the screen a special text that reads "Impervious" at the beginning.

Now let's look at a different trigger...

      trigger {
      life = 0.2 ;
      movement = 0 ;
      name = slide ;
      targetdistance = 90 ;
      targetradius = 50 ;
      time = 0 ;
      }

Slide allows a character to move forward as a move or power is being done. You can increase the movement that the character slides towards the enemy.

      trigger {
      bolt = Bip01 R Hand ;
      effect = char/lukeca/p1_power ;
      fxlevel = 3 ;
      name = effect_sound ;
      sound = char/lukeca_m/p1_power ;
      time = 0.14 ;
      }

This is an effects trigger, but we will discuss effects in a future lesson. Now the coding below is the actual power itself.

      trigger {
      arc = 65 ;
      damage = %lukec_p1_dmg ;
      damagemods_require_charge = true ;
      damagescale = none ;
      knockback = %lukec_p1_kb ;
      maxrange = 72 ;
      name = punch ;
      time = 0.21 ;
         damageMod {
         name = dmgmod_auto_knockback ;
         }

         damageMod {
         name = dmgmod_ground ;
         }

      }

arc is the angled range of attack that can connect with the enemy. The higher that number, the wider the range.
damage obviously is the amount of damage that is inflicted upon an enemy if the power connects. It connects to the numeric value that you placed in the character's talents file.
damagemods_require_charge refers to exactly that, but it's not necessary really, as moves will take damage without this line.
damagescale refers to the level by which enemies can take damage by the power. Usually I only see "none" or "1", so this line doesn't matter all that much.
damagetype refers to the kind of damage that the enemy will take upon being attacked. There are many different damage types in the game. You don't see that here, but it's good to know about. More on that later.
knockback refers to the amount of distance that a character will be knocked back upon getting hit by the power. The higher the number, the greater the knockback.
maxrange is the amount of distance away from the enemy that the power will connect. Close range powers like melee are usually 72 or less.
name refers to the internal type of attack that the power uses. In this case, it's "punch" referring to a melee attack. "Kick" or "punch_heavy" can be used as well. This tells the game what kind of attack it is.
powerusage refers to how much of the character's energy meter will be depleted upon using this power. You don't see it here in this case because it's elsewhere, but it's mandatory for all powers.
time refers to when the attack takes place during the animation.


Now notice underneath it says "damagemod" followed by "name = dmgmod_?????" OK, so these are dmgmod properties that you can connect to any power. There are quite a few of these. Some examples include:

dmgmod_popup = the enemy will launch upward once the power connects.
dmgmod_ground = the power will harm enemies that are also on the ground.
dmgmod_auto_knockback = the enemy will be blasted back and down far once the power connects. This works along with the "knockback" value.
dmgmod_stun = the enemy will be stunned once the power connects.
dmgmod_unblockable = the enemy cannot block the incoming attack. I don't think this works on bosses, however.
dmgmod_no_atk_roll = (same as unblockable from what I hear.)
dmgmod_ignore_def = the enemy's defense is useless against this power. I don't think this works on bosses, however.
dmgmod_trip = the enemy will trip and fall once the power connects.

Here are some more dmgmod properties, found by BLaw and Teancum. Unsure what they mean, but some seem obvious:

dmgmod_no_protection
dmgmod_no_on_damage
dmgmod_touch_o_death
dmgmod_no_hiteffect
dmgmod_forcepain
dmgmod_pierce
dmgmod_teleport
dmgmod_no_pain
dmgmod_ai_no_hero_dmg
dmgmod_environment
dmgmod_no_text
dmgmod_kill
dmgmod_ignore_dist
dmgmod_weapon
dmgmod_ground
dmgmod_weld
dmgmod_energize
dmgmod_critical
dmgmod_ground_only
dmgmod_drain_battery
dmgmod_extinguish
dmgmod_immobilize
dmgmod_drain
dmgmod_no_actors
dmgmod_no_damage
dmgmod_none






CHARGING POWERS

So now that you've learned the basics of melee powers, you can create a melee power. But I'm sure that when playing MUA, you've noticed that some have the option of charging the move for more damage by holding down the button. This is called charging. It's not required, but for some powers (like beam attacks), it looks cool and offers for more damage output. The coding is a bit complicated, though, so bare with me. We saw the release part of the power. Let's look at the initial and the loop.



   FightMove {
   aitype = melee ;
   animenum = ea_power1 ;
   icon = 0 ;
   is_power = true ;
   name = power1 ;
   noautoaim = true ;
   powerup_tag = lukeca_p1 ;
   priority = 5 ;
   startchaintime = 0.55 ;
   turnrate = 0.5 ;
      require {
      cat = skill ;
      item = lukec_p1 ;
      level = 1 ;
      }

      trigger {
      button = samepowerhold ;
      name = button_hint ;
      time = 0 ;
      }

      trigger {
      loop_timeout = 2 ;
      loop_type = start ;
      name = sound ;
      sound = char/lukeca_m/p1_charge ;
      time = 0 ;
      }

      trigger {
      charge = 0 ;
      charge_time = 1.0 ;
      charged_eventtag = 100 ;
      name = charge ;
      time = 0 ;
      }

      trigger {
      bolt = Bip01 R Hand ;
      effect = char/lukeca/p1_power ;
      fxlevel = 2 ;
      name = effect_sound ;
      sound = common/melee/kb_charge_done ;
      tag = 100 ;
      time = -1 ;
      }

      trigger {
      fx_chargeable = true ;
      life = -1 ;
      name = powerup ;
      powerusage = %lukec_p1_pwr ;
      tag_name = lukeca_p1_link ;
      time = 0 ;
         special_fx {
         bolt = Bip01 R Hand ;
         effect = char/lukeca/p1_power ;
         fxlevel = 1 ;
         how_used = primary ;
         never_cycle = true ;
         }

      }

      chain {
      action = Idle ;
      result = power1_release ;
      }

      chain {
      action = samepowerhold ;
      result = power1_loop ;
      }

   }

   FightMove {
   aitype = melee ;
   always_target = true ;
   animenum = ea_power1_loop ;
   icon = 0 ;
   is_power = true ;
   lockchaining = false ;
   locktransitionangles = true ;
   name = power1_loop ;
   noautoaim = true ;
   powerup_tag = lukeca_p1 ;
   priority = 5 ;
   turnrate = 0.5 ;
      trigger {
      button = samepowerhold ;
      name = button_hint ;
      time = 0 ;
      }

      chain {
      action = Idle ;
      result = power1_release ;
      }

      chain {
      action = samepowerhold ;
      result = power1_loop ;
      }

   }


The initial is set up just like most powers, even with the requirement seen. But there are some codings unique to it. Observe.

      trigger {
      button = samepowerhold ;
      name = button_hint ;
      time = 0 ;
      }

That is a button hint. It tells the person playing to do a special thing with the controller buttons (or computer keys) during the power. In this case, "samepowerhold" means that the player should hold down the same button that was used to activate the power. This is to set up the charge.

      trigger {
      loop_timeout = 2 ;
      loop_type = start ;
      name = sound ;
      sound = char/lukeca_m/p1_charge ;
      time = 0 ;
      }

That is a sound coding to begin a loop for the charge, but we'll go into sounds in a future lesson.

      trigger {
      charge = 0 ;
      charge_time = 1.0 ;
      charged_eventtag = 100 ;
      name = charge ;
      time = 0 ;
      }

This is the charge coding. This is needed for charging to occur during the power. Under "charge_time," 1.0 is standard. The "charged_eventtag" refers to what happens when the player has charged up the power enough. The number there must match the command.

      trigger {
      bolt = Bip01 R Hand ;
      effect = char/lukeca/p1_power ;
      fxlevel = 2 ;
      name = effect_sound ;
      sound = common/melee/kb_charge_done ;
      tag = 100 ;
      time = -1 ;
      }

That is the effect_sound trigger that the "charged_eventtag = 100 ;" was referring to in the previous coding.

      trigger {
      fx_chargeable = true ;
      life = -1 ;
      name = powerup ;
      powerusage = %lukec_p1_pwr ;
      tag_name = lukeca_p1_link ;
      time = 0 ;
         special_fx {
         bolt = Bip01 R Hand ;
         effect = char/lukeca/p1_power ;
         fxlevel = 1 ;
         how_used = primary ;
         never_cycle = true ;
         }

      }

This is the powerup that happens during the charging. This is one place that you can place the powerusage. "fx_chargeable" just means that the effects are chargeable as well. See the part I highlighted in blue? Pay attention to that -- it is the same link that was seen in the release part of the power's coding. This powerup begins at the initial, continues during the loop, and ends at the release.

      chain {
      action = Idle ;
      result = power1_release ;
      }

      chain {
      action = samepowerhold ;
      result = power1_loop ;
      }

   }

That is the chain command that I showed you in a previous lesson. The "samepowerhold" function (meaning if the player holds down the same power button) will lead them to the loop portion of the power. Idle means that you've released the power button, so the power will be released. Got it? OK, now let's look at the loop part of the coding...

   FightMove {
   aitype = melee ;
   always_target = true ;
   animenum = ea_power1_loop ;
   icon = 0 ;
   is_power = true ;
   lockchaining = false ;
   locktransitionangles = true ;
   name = power1_loop ;
   noautoaim = true ;
   powerup_tag = lukeca_p1 ;
   priority = 5 ;
   turnrate = 0.5 ;
      trigger {
      button = samepowerhold ;
      name = button_hint ;
      time = 0 ;
      }

      chain {
      action = Idle ;
      result = power1_release ;
      }

      chain {
      action = samepowerhold ;
      result = power1_loop ;
      }

   }

Notice that there's not much here except the chain commands. But the animation used here keeps the power alive while the player keeps holding down the button. After that is the release part that you saw earlier. That's where you saw this trigger...

      trigger {
      critical = true ;
      name = powerup ;
      remove_tag = lukeca_p1_link ;
      time = 0.21 ;
      }

That is telling the game that the powerup mentioned in the initial can end now, so these are important. Charging can connect to various power types, not just melee. You can practice how to connect charging commands to your powers by using coding that is supplied in vanilla in-game mods.






DAMAGE TYPES

There are different damage types that any power can use. I'll explain what they mean, but most are self-explanatory.

:capamer: dmg_physical = Suffers from physical damage, such as from punches, kicks, and melee attacks. One of the most common in MUA.
:stark: dmg_energy = Suffers from energy damage, such as from lasers and energy projectiles. One of the most common in MUA.
:humant: dmg_fire = Suffers from fire damage.
:iceman: dmg_cold = Suffers from cold damage.
:electro: dmg_electricity = Suffers from electric damage.
:storm: dmg_wind =  Suffers from wind damage.
:hulk_icon: dmg_radiation = Suffers from radiation damage.
:wolverine: dmg_blade = Suffers from damage that came from something sharp like a sword, knife, or claws.
:psylocke: dmg_mental = Suffers from mental damage.
:juggernaut: dmg_crushing = Suffers from damage resulting from being crushed.
:magneto: dmg_magnetic =  Suffers from magnetic damage. Usually, exclusive to Magneto.
:phoenix: dmg_telekinesis = Suffers from telekinetic damage.
:nightcrawler: dmg_teleport = Suffers from damage resulting for a teleporting attack.
:hawkeye: dmg_bleed = Suffers from bleeding after an attack, such as getting impaled by an arrow.
:thor: dmg_elemental = Suffers from elemental damage. This one isn't used all that often.
:ultron: dmg_metal = Suffers from damage coming from a metal object. Very rare - not used often.
:punisher_logo: dmg_direct = I honestly don't know what this one refers to, as it's very rare and not used often. So I personally use it for characters with guns or various firearms.
:scarletw: dmg_special = I honestly don't know what this one refers to, as it's very rare and not used often. So I personally use it for characters related to magic.

For those wondering, damage types can't be created, so we can't create ones like dmg_water, dmg_light, dmg_dark, or dmg_web sadly.






Lesson Takeaway:
-Practice with melee powers as they are relatively easier to create then other power types.
-Learn the various damage types to see what your power connects to.
-Adding a charge command isn't required, but makes some powers look better. Don't attempt until you feel comfortable.
-Remember the numbers you placed for tags here, and the values you placed in the talents file. They all connect.


January 29, 2020, 01:06AM #22 Last Edit: June 20, 2020, 08:56PM by Outsider
Lesson 11: Power Coding (Radial)

Did you find melee powers easy to create? If you did, then you're in for a treat. For in this lesson, I will show you another kind of attack power that is relatively easy to create -- radial powers.

What is radial? It's the type of powers that can inflict damage on all enemies within a given radius (the invisible circle around your character). These powers are very popular because they can hit multiple enemies at one time, so they are good for crowd control. Almost every character mod - vanilla or created, has at least one radial attack power. Or their Xtreme attack is a radial power, but we'll go into Xtreme powers in a future lesson.

For this lesson, we will continue looking at :pman: Luke Cage. In particular, we will look at his fifth power -- the Drill Bit. Open his powerstyle file, hit Ctrl + F to Find, type "name = power5" and press Enter. You'll run into the coding for it. Now, let's look at the coding below.


   FightMove {
   animenum = ea_power5 ;
   combotextfinisher = Slam ;
   combotextstarter = Punishing ;
   icon = 4 ;
   is_power = true ;
   lockangles = true ;
   name = power5 ;
   priority = 5 ;
      require {
      cat = skill ;
      item = lukec_p5 ;
      level = 1 ;
      }

      trigger {
      name = sound ;
      sound = char/lukeca_m/p5_charge ;
      time = 0 ;
      }

      trigger {
      effect = char/lukeca/p5_power ;
      fxlevel = 1 ;
      name = effect ;
      time = 0.13 ;
      }

      trigger {
      bolt = Bip01 Pelvis ;
      effect = char/lukeca/p5_power ;
      fxlevel = 2 ;
      name = effect ;
      time = 0.13 ;
      }

      trigger {
      effect = char/lukeca/p5_power ;
      fxlevel = 3 ;
      name = effect_sound ;
      sound = char/lukeca_m/p5_power ;
      time = 0.38 ;
      }

      trigger {
      damage = %lukec_p5_dmg ;
      knockback = 245 ;
      maxrange = 72 ;
      name = radial ;
      powerusage = %lukec_p5_pwr ;
      tiles = true ;
      time = 0.38 ;
         damagemod {
         name = dmgmod_ground ;
         }

      }

      trigger {
      damage = %lukec_p5_dmg ;
      damagescale = none ;
      name = punch ;
      time = 0.65 ;
      }

      trigger {
      effect = char/lukeca/p5_power ;
      fxlevel = 1 ;
      name = effect ;
      time = 0.75 ;
      }

      chain {
      action = Idle ;
      result = idle ;
      }

   }


Most of what you're seeing there was discussed in the previous lesson. We won't go into effects or sounds -- that's for lessons later on. Being a modder is about pacing yourself, because there is a lot to do -- as I'm sure you've noticed by now. So, there is really only one thing to look into -- the coding of the power itself, which are these:

      trigger {
      damage = %lukec_p5_dmg ;
      knockback = 245 ;
      maxrange = 72 ;
      name = radial ;
      powerusage = %lukec_p5_pwr ;
      tiles = true ;
      time = 0.38 ;
         damagemod {
         name = dmgmod_ground ;
         }

      }

      trigger {
      damage = %lukec_p5_dmg ;
      damagescale = none ;
      name = punch ;
      time = 0.65 ;
      }

Let's look at the first one of these triggers, as the second is really just a follow-up to it. As you can see, the terms there are mostly the same as the melee power coding that you've learned in the previous lesson. But I'll be nice and mention them again.

damage: The amount of damage inflicted on enemies if the power makes contact.
knockback: The amount of distance that an enemy will be thrown back from the impact of the power contact.

maxrange: The amount of distance that the radial power can connect away from the character triggering it. This is very important for radial powers, because the larger that number, the larger the radius (invisible circle around the character) that the power will connect. For example, the maxrange for this power is 72. So that means that only enemies within close range will feel the impact of this power. Enemies a good distance away will not be affected. Likewise, if the maxrange is 300, then multiple enemies even from a good distance away will still get hit by the radial power. Usually, 150 is a decent range for radial powers. 72 is good for melee powers, while 300 is more for Xtreme powers.

name: The name of the power. It must be called "radial" so that the computer knows what kind of power it is.
powerusage: The value of energy that will be depleted from using this power. The value is determined by the number you placed in the talents file for this power.
tiles: Honestly, I'm unsure. Not important.

time: The time where the damage will take place. This value coincides with the animation that you used for this power. For example, Luke Cage jumps up, then lands himself to the ground, causing the impact. You want to make sure the right animation is used, and to time the power correctly. This takes trial and error. You can save and play the game with it to try it out. For Luke, around the 0.38 mark, he landed on the ground, so the power impact is correctly set up. Line up the time of the power with the animation you chose.


Notice that the second coding there says "punch" as the name. This is just a follow-up. Not many radial powers have a follow-up attack, so don't focus on that too much.





STATUS ALIMENTS

Now suppose you want to create a radial power, but not to cause damage, but rather to inflict a certain debuff on enemies? You can do that, too. Observe...

      trigger {
      damage = 0 ;
      knockback = 245 ;
      maxrange = 72 ;
      name = radial ;
      powerusage = %lukec_p5_pwr ;
      tiles = true ;
      time = 0.38 ;
      victimeventtag = 11 ;
      }

See what I did there? I lowered the damage to zero because I only care about what happens to enemies after they are hit by it. I don't want it to take initial damage. Of course, you can have it take initial damage if you wish to.

I then added a victimeventtag which is "victim event tag." This allows something (usually a status aliment) to happen to the enemy when the power connects. This is when you can use various powerups to be used as detriments (or debuffs as they call it) to enemies. They can range from disabling their powers, slowing down their speed, or whatever. In the case below, see what I did:

      trigger {
      life = 10 ;
      name = powerup ;
      tag = 11 ;
      time = -1 ;
         special_fx {
         effect = char/lukeca/p6_power ;
         fxlevel = 3 ;
         how_used = primary ;
         }

         affecter {
         affect_type = scale ;
         attribute = atk_damage ;
         level = 0.5 ;
         }

      }

Can you read what that coding means? It means that for the next 10 seconds (life), enemies hit by that power will have their attack damage (atk_damage) lowered by 50% (0.5). Notice the "tag = 11" part? That connects to the victim event tag I placed in the radial power. You MUST have that for it to work. You also MUST have the time of the powerup to be "-1" because there is no time. It only happens when an enemy is hit by the radial power. You can always change the duration of the debuff and the value of the attribute affected. For some characters, some boosts they have are actually debuffs against enemies, such as :blade: Blade's Flash Bomb. Also note that other attack powers, such as melee powers can use victim event tags as well. Here are some status aliments (debuffs) you can connect to a victim event tag:

         affecter {
         attribute = nullify ;
         level = 1 ;
         }

         special_fx {
         bolt = Bip01 Head ;
         effect = base/powerup/pu_nullified ;
         }

This will shut down enemy power attacks.

         affecter {
         attribute = fear ;
         level = 1 ;
         }

         special_fx {
         bolt = Bip01 Head ;
         effect = base/powerup/pu_fear ;
         how_used = primary ;
         }

This will have enemies running away terrified.

         affecter {
         attribute = team_switch ;
         level = 1 ;
         }

         special_fx {
         bolt = Bip01 Head ;
         effect = base/powerup/pu_converted ;
         }

This will convert enemies to your team.

         affecter {
         affect_type = scale ;
         attribute = def_damage ;
         level = 1.5 ;
         }

This will increase the overall damage enemies take by 50%. You can change the level value.

         affecter {
         affect_type = scale ;
         attribute = def_damage_scope ;
         damagetype = dmg_fire ;
         level = 1.5 ;
         }

This will make enemies 50% more vulnerable to fire damage. You can change the level value and/or the damage type.

         affecter {
         affect_type = scale ;
         attribute = move ;
         level = 0.5 ;
         }

         affecter {
         affect_type = scale ;
         attribute = move_attack ;
         level = 0.5 ;
         }

This will lower enemies' movement speed and attack speed down to 50%. You can change the level value.

      trigger {
      life = %character_p1_lif ;
      name = powerup ;
      shared_tag = shared_stunned ;
      tag = 1 ;
      time = -1 ;
      }

This will stun enemies for a certain period of time. You can add effects to it.

      trigger {
      class = freeze ;
      die_on_critical = false ;
      life = %character_p1_lif ;
      name = powerup ;
      no_shatter_on_damage = true ;
      tag = 1 ;
      time = -1 ;
      }

This will freeze enemies in place. This will have no ice or stone effect, however -- that would have to be added.

      trigger {
      arc = 180 ;
      damage = 0 ;
      damagetype = dmg_physical ;
      maxrange = 144 ;
      name = taunt ;
      powerusage = %character_p1_pwr ;
      time = 0.4 ;
      victimeventtag = 1 ;
      }

Similar to a radial attack, it causes enemies to come to your location, forced to fight melee.

There are likely more status aliments you can use, or you can create one by reversing the value of a passive (mentioned in a previous lesson), making the possibilities even more various.





MULTIPLE RADIAL DAMAGE

Now suppose instead of a debuff, you do want the radial power to inflict initial damage, but at more than one time? You can do that, too. Observe.

First, replace the word trigger in the radial power coding with the word event, and remove the time and powerstyle from it. Then add "inherit = radial" to it.

      event {
      damage = %lukec_p5_dmg ;
      inherit = radial ;
      knockback = 245 ;
      maxrange = 72 ;
      name = big_blast ;
         damagemod {
         name = dmgmod_ground ;
         }

      }

By doing this you are creating an event for the game to reference your radial power to. The "inherit" part in this case is basically you telling the game, "No matter what the "name" of the power is, you should know that it's a radial power." Because of that, now you can name it whatever you want. I named it "big_blast." Why did I rename it? You'll find out in a bit. You'll notice that I've also removed "maxrange" from it. You'll see why next.

Second, add these triggers...

      trigger {
      index = 1 ;
      maxrange = 72 ;
      name = big_blast ;
      powerusage = %lukec_p5_pwr ;
      time = 0.38 ;
      }

      trigger {
      index = 2 ;
      maxrange = 125 ;
      name = big_blast ;
      time = 0.44 ;
      }

      trigger {
      index = 3 ;
      maxrange = 170 ;
      name = big_blast ;
      time = 0.5 ;
      }

      trigger {
      index = 4 ;
      maxrange = 200 ;
      name = big_blast ;
      time = 0.56 ;
      }

Can you understand what those triggers mean? Let's break it down. First, notice that the name of them all is "big_blast," referencing back to the event that you created. So the game knows that all big_blast triggers have the properties of that event.

Next, notice that the maxrange (radius) increases with every blast. This means that the range of the radial attack grows gradually. That's why I removed the maxrange from the event. If I kept it there, all big_blast triggers would have the same maxrange. Of course, you can keep them at the same range if you wish to. Only keep at the event what you don't plan to change for individual triggers.

Also, notice that the powerusage is only at the first trigger of the big_blast. That's why I removed the powerusage from the event. If I kept it there, all big_blast triggers will deplete energy from the character. Not exactly ideal.

And, notice that the time changes with each big_blast trigger. That coincides with the maxrange, so that means that while the initial radial power won't reach enemies a good distance away, a follow-up blast will.

Finally, notice that I added something called "index". This allows for multiple damage. The indexes here equal 4. This means that enemies will get hit up to four times, provided that they are in range of the attacks. If the index isn't there, then enemies that got hit by the first blast will not be harmed by the following blasts. Very important to remember. You can increase the maxrange and number of indexes as much as you wish, but don't make a power too powerful, because that will make the game too easy -- especially against boss villains.


There are many ways you can change radial powers to do what you want them to do. Take this lesson and practice. Trial and error will happen, but practice makes perfect.






Lesson Takeaway:
-Practice with radial powers as they are relatively easier to create then other power types.
-You must add a victim event tag to a power if the enemy is to suffer a status aliment after getting hit by the power. All power types can use this.
-Remember when creating events to only keep values that you don't plan to change in individual triggers that the event will reference.
-Time your attack power with the animation that you chose for it. Otherwise, it won't look right.
-Indexes allow for multiple damage. Use only when necessary, and align them with effects.


Morning modders! I've been requested to give show you my almost skin ready mod. I do feel I should say this tho since it will be spoiling a surprise: please don't steal this mod from me. If you want to work on it DM me and we can do it together. I promise I'll give you credit. That being said, I hope we can all learn from this.

Herostat:
   stats {
   ailevel = 1 ;
   autospend = support ;
   body = 9 ;
   characteranims = 243_Santiago ;
   charactername = Santiago ;
   level = 1 ;
   menulocation = XXXX ;
   mind = 6 ;
   name = Santiago ;
   playable = true ;
   powerstyle = ps_Santiago ;
   scriptlevel = 3 ;
   skin = 24309 ;
   skin_01_name = Classic ;
   skin_02 = 10 ;
   skin_02_name = Sarge ;
   skin_03 = 11 ;
   skin_03_name = Armor ;
   skin_04 = 12 ;
   skin_04_name = Detective ;
   sounddir = Santiago_m ;
   strength = 7 ;
   team = hero ;
   textureicon = 5 ;
      talent {
      level = 1 ;
      name = Santiago_p1 ;
      }

      talent {
      level = 1 ;
      name = fightstyle_default ;
      }

      talent {
      level = 1 ;
      name = block ;
      }

      talent {
      level = 1 ;
      name = might ;
      }

      talent {
      level = 1 ;
      name = melee_moves ;
      }

   }

nc.package:
   actorskin {
   filename = 24309 ;
   }

   actoranimdb {
   filename = 243_Santiago ;
   }

   texture {
   filename = textures/ui/Santiago_icons ;
   }

   xml_talents {
   filename = data/talents/Santiago ;
   }

   model {
   filename = HUD/hud_head_24309 ;
   }

}

package:
   actorskin {
   filename = 24309 ;
   }

   actoranimdb {
   filename = interact_Santiago_victim ;
   }

   actoranimdb {
   filename = 243_Santiago_4_combat ;
   }

   actoranimdb {
   filename = 243_Santiago ;
   }

   texture {
   filename = textures/ui/Santiago_icons ;
   }

   xml_talents {
   filename = data/talents/Santiago ;
   }

   model {
   filename = HUD/hud_head_24309 ;
   }

   fightstyle {
   filename = data/fightstyles/interact_Santiago_victim ;
   }

   fightstyle {
   filename = data/powerstyles/ps_Santiago ;
   }

}

Check out my Emporium🥳! (all my voice mods are here):  https://marvelmods.com/forum/index.php/topic,10845.msg198383.html#msg198383
And the Village🤪! (my voice workbench): https://marvelmods.com/forum/index.php/topic,10636.msg196523.html#msg196523

January 30, 2020, 12:10PM #24 Last Edit: January 30, 2020, 12:12PM by Outsider
Alright, class. So I wanted Jonnydragon88 to showcase the following, as he asked me to see if they were good, and I wanted to help everyone learn.

OK, so right below is the herostat that Jonnydragon88 made for his upcoming custom character, Santiago. Yes, there are a couple of things wrong with it. I will place them RED.

   stats {
   ailevel = 1 ;
   autospend = support ;
   body = 9 ;
   characteranims = 243_Santiago ;
   charactername = Santiago ;
   level = 1 ;
   menulocation = XXXX ;
   mind = 6 ;
   name = Santiago ;
   playable = true ;
   powerstyle = ps_Santiago ;
   scriptlevel = 3 ;
   skin = 24309 ;
   skin_01_name = Classic ;
   skin_02 = 10 ;
   skin_02_name = Sarge ;
   skin_03 = 11 ;
   skin_03_name = Armor ;
   skin_04 = 12 ;
   skin_04_name = Detective ;
   sounddir = Santiago_m ;
   strength = 7 ;
   team = hero ;
   textureicon = 5 ;
      talent {
      level = 1 ;
      name = Santiago_p1 ;
      }

      talent {
      level = 1 ;
      name = fightstyle_default ;
      }

      talent {
      level = 1 ;
      name = block ;
      }

      talent {
      level = 1 ;
      name = might ;
      }

      talent {
      level = 1 ;
      name = melee_moves ;
      }

   }

So, why are those wrong? Here's why... This upcoming mod was not registered with the CCC. Had he registered it, I could have added it in and told him not to use those skin numbers (24309-24312). Why? Because they will clash with BlackHand13's upcoming mod of Puck. You'll see that here: https://marvelmods.com/forum/index.php/topic,10705.msg196435.html#msg196435. It would have caused a clash.

See, this is why it's so important to view and register with the CCC -- it's the very first lesson here. It will eliminate potential clashes from happening. So, how to fix it? Well, if you look at the CCC, you'll see that #243 have both Heimdall and the upcoming Puck. So Santiago would have to use skin numbers that they are not using. (Puck is using 24313 as well.) Santiago should use skin numbers 24314 and higher to avoid a clash. You'll see the changes in BLUE.


   stats {
   ailevel = 1 ;
   autospend = support ;
   body = 9 ;
   characteranims = 243_Santiago ;
   charactername = Santiago ;
   level = 1 ;
   menulocation = XXXX ;
   mind = 6 ;
   name = Santiago ;
   playable = true ;
   powerstyle = ps_Santiago ;
   scriptlevel = 3 ;
   skin = 24314 ;
   skin_01_name = Classic ;
   skin_02 = 15 ;
   skin_02_name = Sarge ;
   skin_03 = 16 ;
   skin_03_name = Armor ;
   skin_04 = 17 ;
   skin_04_name = Detective ;
   sounddir = santia_m ;
   strength = 7 ;
   team = hero ;
   textureicon = 5 ;
      talent {
      level = 1 ;
      name = Santiago_p1 ;
      }

      talent {
      level = 1 ;
      name = fightstyle_default ;
      }

      talent {
      level = 1 ;
      name = block ;
      }

      talent {
      level = 1 ;
      name = might ;
      }

      talent {
      level = 1 ;
      name = melee_moves ;
      }

   }

Notice that I also changed the "sounddir" from Santiago_m to santia_m? That's because sound files only work at 7 letters or less, so "Santiago" is too many letters so it won't work. "santia" however, will work. And it doesn't need to be in capital letters, either. It's alright that no one knew about this, because sounds were going to be covered in a future lesson.





OK, so now that we know what skin numbers Santiago can use, we now need to change the package file coding to match them. Observe.

nc.package:
   actorskin {
   filename = 24314 ;
   }

   actoranimdb {
   filename = 243_santiago ;
   }

   texture {
   filename = textures/ui/santiago_icons ;
   }

   xml_talents {
   filename = data/talents/santiago ;
   }

   model {
   filename = HUD/hud_head_24314 ;
   }

}

package:
   actorskin {
   filename = 24314 ;
   }

   actoranimdb {
   filename = interact_santiago_victim ;
   }

   actoranimdb {
   filename = 243_santiago_4_combat ;
   }

   actoranimdb {
   filename = 243_santiago ;
   }

   texture {
   filename = textures/ui/santiago_icons ;
   }

   xml_talents {
   filename = data/talents/santiago ;
   }

   model {
   filename = HUD/hud_head_24314 ;
   }

   fightstyle {
   filename = data/fightstyles/interact_santiago_victim ;
   }

   fightstyle {
   filename = data/powerstyles/ps_santiago ;
   }

}




Everything else he did was done correctly. So remember class, always register with the CCC before attempting any mod. It will save you a lot of time. If you need a refresher on that first lesson, click here: https://marvelmods.com/forum/index.php/topic,10705.msg196372.html#msg196372.




February 09, 2020, 12:25AM #25 Last Edit: June 20, 2020, 08:57PM by Outsider
Lesson 12: Power Coding (Charge)

So, in this lesson, I will introduce another kind of attack power -- charging powers. Don't mistake this for any power that you can charge, which you've learned earlier. This is different.

What is charging? It's the type of powers where a character rushes forward, delivering damage to enemies as he/she moves. Usually, you hold the button and the character keeps running. :juggernaut: Juggernaut's Headcrush is an great example of this. Characters with brute strength or those who focus on fighting skill tend to use powers like these.

For this lesson, we will look at :captainamerica2: Captain America. He has a power called the Shield Charge (or if you have my booster, the Charging Star) that is a charging power. Open his powerstyle file, hit Ctrl + F to Find, type "name = power4" and press Enter. You'll run into the coding for it. Now, let's look at the coding below.


   FightMove {
   aireusetime = 8 ;
   aitype = melee ;
   animenum = ea_power4 ;
   combotextfinisher = Charge ;
   combotextstarter = Avenging ;
   energypersecond = %captam_p4_pwr ;
   handler = ch_charge_move ;
   icon = 3 ;
   is_power = true ;
   lockchaining = true ;
   locktransitionangles = true ;
   name = power4 ;
   noautoaim = true ;
   powerup_tag = captam_shield ;
   priority = 5 ;
   startchaintime = 0.2 ;
   turnrate = 0.4 ;
      require {
      cat = skill ;
      item = captam_p4 ;
      level = 1 ;
      }

      trigger {
      name = unlock_loop_chaining ;
      }

      trigger {
      name = kill_shield ;
      time = 0 ;
      type = ce_destroy_personal_proj ;
      }

      trigger {
      name = shield_show ;
      time = 0 ;
      }

      trigger {
      button = samepowerhold ;
      name = button_hint ;
      time = 0 ;
      }

      trigger {
      name = powerusage ;
      only_non_looped = true ;
      powerusage = %captam_p4_pwr ;
      time = 0 ;
      }

      trigger {
      arc = 180 ;
      damage = %captam_p4_dmg ;
      damagescale = none ;
      knockback = 120 ;
      name = punch ;
      tag = 1 ;
      tiles = true ;
      time = -1 ;
         damageMod {
         name = dmgmod_ground ;
         }

         damageMod {
         name = dmgmod_auto_knockback ;
         }

      }

      trigger {
      life = -1 ;
      name = powerup ;
      remove_on_node_end = true ;
      time = 0 ;
         affecter {
         affect_type = scale ;
         attribute = def_damage ;
         level = 0 ;
         }

         special_fx {
         bolt = Bip01 Spine2 ;
         effect = char/captam/p4_power ;
         fxlevel = 1 ;
         how_used = primary ;
         }

         special_fx {
         bolt = Bip01 Spine2 ;
         effect = char/captam/p4_blast ;
         how_used = primary ;
         }

         special_fx {
         effect = char/captam/p4_power ;
         fxlevel = 3 ;
         how_used = primary ;
         }

      }

      trigger {
      name = sound ;
      sound = char/captam_m/p4_power ;
      time = 0 ;
      }

      chain {
      action = samepowerhold ;
      result = power4 ;
      }

      chain {
      action = touch ;
      result = power4_break ;
      }

      chain {
      action = idle ;
      result = fastballland ;
      }

   }

   FightMove {
   animenum = ea_idle ;
   is_power = true ;
   lockangles = true ;
   lockspeed = true ;
   locktransitionangles = true ;
   name = power4_break ;
   noautoaim = true ;
   playspeed = 10 ;
   priority = 5 ;
      chain {
      action = idle ;
      result = idle ;
      }

   }


As you can see, there are two coding parts to this type of power. Most of this was already covered in previous lessons, so let's break down the first coding part into sections, so as not to overwhelm you all. Pay attention to the parts in BLUE, which wasn't covered.

   FightMove {
   aireusetime = 8 ;
   aitype = melee ;
   animenum = ea_power4 ;
   combotextfinisher = Charge ;
   combotextstarter = Avenging ;
   energypersecond = %captam_p4_pwr ;
   handler = ch_charge_move ;
   icon = 3 ;
   is_power = true ;
   lockchaining = true ;
   locktransitionangles = true ;
   name = power4 ;
   noautoaim = true ;
   powerup_tag = captam_shield ;
   priority = 5 ;
   startchaintime = 0.2 ;
   turnrate = 0.4 ;

energypersecond is the same as "powerusage" where it will drain a certain amount of energy from the character, except per second. So while you're holding the power button, energy will gradually deplete. When the character has no more energy, the charging move stops.

handler tells the computer what kind of attack this is. Depending on what the handler is, it can change certain properties or commands. A little hard to explain, but essential for a charging power.

turnrate is how much the character can turn or steer during the power. So while the player is holding the power button for the charging power, he/she can have the character turn towards another enemy during it. No turnrate means that the character can only move straight forward.

      require {
      cat = skill ;
      item = captam_p4 ;
      level = 1 ;
      }

The requirement, as you know by now.

      trigger {
      name = unlock_loop_chaining ;
      }

      trigger {
      name = kill_shield ;
      time = 0 ;
      type = ce_destroy_personal_proj ;
      }

These two parts -- "unlock_loop_chaining" and "kill_shield" are not really important. Charging powers will work without them.

      trigger {
      name = shield_show ;
      time = 0 ;
      }

This is just skinsegment or bolton coding for Captain America. We've covered this in a previous lesson.

      trigger {
      button = samepowerhold ;
      name = button_hint ;
      time = 0 ;
      }

      trigger {
      name = powerusage ;
      only_non_looped = true ;
      powerusage = %captam_p4_pwr ;
      time = 0 ;
      }

This means that the powerusage will only be depleted initially. That's why it says "only_non_looped." Then as the move continues, energy is depleted per second, as mentioned in the coding earlier.

      trigger {
      arc = 180 ;
      damage = %captam_p4_dmg ;
      damagescale = none ;
      knockback = 120 ;
      name = punch ;
      tag = 1 ;
      tiles = true ;
      time = -1 ;
         damageMod {
         name = dmgmod_ground ;
         }

         damageMod {
         name = dmgmod_auto_knockback ;
         }

      }

Take a look at this part... this is the damage part of the power. Notice that it says "time = -1" ? That's because the damage inflicted to enemies will be constant or ongoing for as long as they hit by that power.

      trigger {
      life = -1 ;
      name = powerup ;
      remove_on_node_end = true ;
      time = 0 ;
         affecter {
         affect_type = scale ;
         attribute = def_damage ;
         level = 0 ;
         }

         special_fx {
         bolt = Bip01 Spine2 ;
         effect = char/captam/p4_power ;
         fxlevel = 1 ;
         how_used = primary ;
         }

         special_fx {
         bolt = Bip01 Spine2 ;
         effect = char/captam/p4_blast ;
         how_used = primary ;
         }

         special_fx {
         effect = char/captam/p4_power ;
         fxlevel = 3 ;
         how_used = primary ;
         }

      }

This is the powerup that features mostly effects that cover the character as the power is being done. From my booster, I've purposely added "def_damage" so that he can't take damage during it.

      trigger {
      name = sound ;
      sound = char/captam_m/p4_power ;
      time = 0 ;
      }

      chain {
      action = samepowerhold ;
      result = power4 ;
      }

      chain {
      action = touch ;
      result = power4_break ;

      }

      chain {
      action = idle ;
      result = fastballland ;
      }

touch is what happens when the charging power runs into a wall or structure. When this happens, you can set a result there. I usually place "idle" there, but in this case, "power4_break" is there. This refers to the second coding entry that you see below. "Fastballland" refers to a command special to the "Fastball Special." I'm sure you all know what that is. In this case, it means that Cap will roll when the charging power is done.


   FightMove {
   animenum = ea_idle ;
   is_power = true ;
   lockangles = true ;
   lockspeed = true ;
   locktransitionangles = true ;
   name = power4_break ;
   noautoaim = true ;
   playspeed = 10 ;
   priority = 5 ;
      chain {
      action = idle ;
      result = idle ;
      }

   }

This is the second coding entry that this move uses, but if you use "idle" under the touch action, then this entry is not necessary. The "animenum" here reads "ea_idle," so it does the same thing as idle itself, making this entry redundant.


That's pretty much it. Charging powers are very easy to do. All you have to do is follow the coding above, adjust it to your character's values, and pick a good animation that allows for charging powers. Not just any animation will do, it has to be an ongoing animation. Try them out but pace yourself.






Lesson Takeaway:
-Practice with charging powers as they are relatively easier to create then other power types.
-Damage is constant, so the same should be said for energy cost per second. Add turnrate for turning or steering.
-Avoid redundant coding entries if a default coding entry does the same thing.
-Choose a running or sliding animation for this kind of power. Otherwise, it will look silly.
-Use powerups to add boosts and effects to your character during it, if you wish to. Not a requirement, but a bonus.



February 12, 2020, 01:16PM #26 Last Edit: July 10, 2020, 01:34PM by Outsider
Lesson 13: Power Coding (Beam)

Now let's get to the more flashier powers. This lesson introduces one kind of power that is normally seen -- beam powers. Not too difficult to do once you know what it's meant to do. 

What are beams? It's the type of powers where a character fires a laser-like power usually from his/her hands, head, or chest, delivering damage to enemies from a far distance away. In some cases, you can charge them (mentioned in a previous lesson) to have the character hold before firing to take even more damage.

For this lesson, we will look at :iceman: Iceman. He has a power called the Ice Beam which shows how this type of power works. Open his powerstyle file, hit Ctrl + F to Find, type "name = power5" and press Enter. You'll run into the coding for it. Now, let's look at the coding below.


   FightMove {
   aireusetime = 4 ;
   aitype = beam ;
   animenum = ea_power5 ;
   combotextfinisher = Ice ;
   combotextstarter = Bitter ;
   icon = 4 ;
   lockangles = true ;
   name = power5 ;
   powerup_tag = ice_power2 ;
   priority = 5 ;
      require {
      cat = skill ;
      item = iceman_p5 ;
      level = 1 ;
      }

      trigger {
      bolt = Bip01 R Hand ;
      effect = char/iceman/p5_charge ;
      name = effect_sound ;
      sound = char/iceman_m/p3_charge ;
      time = 0 ;
      }

      trigger {
      bolt = Bip01 L Hand ;
      effect = char/iceman/p5_charge ;
      name = effect ;
      time = 0 ;
      }

      trigger {
      name = sound ;
      sound = char/iceman_m/p5_impact ;
      time = 0.5 ;
      }

      trigger {
      attack_bone_angles = 0 0 0 ;
      attack_bone_pos = 22 -4 39 ;
      beambolt = Bip01 R Hand ;
      beameffect = char/iceman/p5_power ;
      damage = %iceman_p5_dmg ;
      damagetype = dmg_cold ;
      fxlevel = 1 ;
      hiteffect = char/iceman/p5_impact ;
      inherit = beam ;
      maxrange = 500 ;
      name = freeze_fx ;
      powerusage = %iceman_p5_pwr ;
      radius = 0 ;
      spawneffect = char/iceman/p5_shot ;
      tag = 3 ;
      time = 0.5 ;
      victimeventtag = 20 ;
         damageMod {
         name = dmgmod_environment ;
         }

         damageMod {
         name = dmgmod_extinguish ;
         }

      }

      trigger {
      die_on_critical = true ;
      life = %iceman_p5_lif ;
      name = freeze_powerup ;
      tag = 20 ;
      time = -1 ;
         powerup {
         life = 2 ;
         name = chill_powerup ;
            affecter {
            affect_type = scale ;
            attribute = move ;
            level = 0.3 ;
            }

         }

      }

      chain {
      action = Idle ;
      result = idle ;
      }

   }


Most beam powers only need one fightmove (coding entry) unless you want to add a charge to it. The Ice Beam doesn't have charging, so it's only one coding entry. Again, I'll show it to you in sections to make it easy to understand. Pay special attention to the parts in BLUE, which wasn't covered.

   FightMove {
   aireusetime = 4 ;
   aitype = beam ;
   animenum = ea_power5 ;
   combotextfinisher = Ice ;
   combotextstarter = Bitter ;
   icon = 4 ;
   lockangles = true ;
   name = power5 ;
   powerup_tag = ice_power2 ;
   priority = 5 ;
      require {
      cat = skill ;
      item = iceman_p5 ;
      level = 1 ;
      }

aireusetime = Not sure, but I believe that is the number of seconds that the game's AI will take before attempting to use that power again if the AI is controlling the character.
Notice that the aitype says "beam." That tells the game's internal computer that the power is a beam attack. Some beams' aitype will say "beamanyrange," which implies that the beam will reach any enemy, even if they are above or below the character.


      trigger {
      bolt = Bip01 R Hand ;
      effect = char/iceman/p5_charge ;
      name = effect_sound ;
      sound = char/iceman_m/p3_charge ;
      time = 0 ;
      }

      trigger {
      bolt = Bip01 L Hand ;
      effect = char/iceman/p5_charge ;
      name = effect ;
      time = 0 ;
      }

      trigger {
      name = sound ;
      sound = char/iceman_m/p5_impact ;
      time = 0.5 ;
      }

Effect and sound coding entries. I will discuss those in future lessons, as you must understand how effects and sounds work before attempting them.

      trigger {
      attack_bone_angles = 0 0 0 ;
      attack_bone_pos = 22 -4 39 ;
      beambolt = Bip01 R Hand ;
      beameffect = char/iceman/p5_power ;

      damage = %iceman_p5_dmg ;
      damagetype = dmg_cold ;
      fxlevel = 1 ;
      hiteffect = char/iceman/p5_impact ;
      inherit = beam ;
      maxrange = 500 ;
      name = freeze_fx ;
      powerusage = %iceman_p5_pwr ;
      radius = 0 ;
      spawneffect = char/iceman/p5_shot ;
      tag = 3 ;
      time = 0.5 ;
      victimeventtag = 20 ;
         damageMod {
         name = dmgmod_environment ;
         }

         damageMod {
         name = dmgmod_extinguish ;
         }

      }

OK, this is the actual coding entry for the beam. Some of the terms you should know:
attack_bone_angles and attack_bone_pos determines where from the body part that the beam is firing from. I usuall don't bother with these, as without them, it still fires from a good position.
beambolt works just like bolt where you tell the game what body part is the beam firing from.
beameffect is the effect used for the beam. Obviously not just any effect will do -- any beam effect will do and you can just recolor & resize it. More on that in a future lesson.
hiteffect is the effect that you see when the beam hits an enemy. This can be done with any kind of power, not just beams.
Note that with beams. the maxrange is 500 or higher, as it is meant to hit enemies from a distance.
spawneffect is when an extra effect is released when the beam is activated. This usually only applies to constant beams, which I'll explain in a little bit.
By the way, you see that the name is freeze_fx. Again, remember that as long as you have inherit followed by what kind of power it is (in this case, beam), the name can be whatever you want.

      trigger {
      die_on_critical = true ;
      life = %iceman_p5_lif ;
      name = freeze_powerup ;
      tag = 20 ;
      time = -1 ;
         powerup {
         life = 2 ;
         name = chill_powerup ;
            affecter {
            affect_type = scale ;
            attribute = move ;
            level = 0.3 ;
            }

         }

      }

This is the status aliment that happens when an enemy is hit by the beam, pertaining to an event listed in the powerstyle file. Mentioned in a previous lesson.

      chain {
      action = Idle ;
      result = idle ;
      }

   }




So now you have an idea of how beam coding works. But what if you don't want the beam to hit just one enemy? What if you want the beam to hit multiple targets in the way? Simple. Just add what I will place in VIOLET...

      trigger {
      attack_bone_angles = 0 0 0 ;
      attack_bone_pos = 22 -4 39 ;
      beambolt = Bip01 R Hand ;
      beameffect = char/iceman/p5_power ;
      damage = %iceman_p5_dmg ;
      damagetype = dmg_cold ;
      fxlevel = 1 ;
      hiteffect = char/iceman/p5_impact ;
      inherit = beam ;
      maxrange = 500 ;
      name = freeze_fx ;
      pierce = true ;
      powerusage = %iceman_p5_pwr ;
      radius = 0 ;
      spawneffect = char/iceman/p5_shot ;
      tag = 3 ;
      time = 0.5 ;
      victimeventtag = 20 ;
         damageMod {
         name = dmgmod_environment ;
         }

         damageMod {
         name = dmgmod_extinguish ;
         }

      }

   }

pierce is quite literally that. It allows a beam to pierce through and hit multiple enemies, provided that they are in the beam's range. This is considered a special function, so it's usually used after a character charges up a beam power.





CONSTANT BEAM POWERS

There are some beam attacks where the character holds position and fires constantly to hit targets multiple times instead of just once. These are called constant beam powers. For this, let's look at :humant: Human Torch. He has a power called the Flame Thrower, which is a constant beam power. Open his powerstyle file, hit Ctrl + F to Find, type "name = power1" and press Enter. You'll run into the coding for it. Now, let's look at the coding below.


   FightMove {
   animenum = ea_power1 ;
   icon = 0 ;
   is_power = true ;
   lockangles = true ;
   name = power1 ;
   noautoaim = true ;
   powerup_tag = humant_ranged ;
   priority = 5 ;
   startchaintime = 0.7 ;
   turnrate = 0.4 ;
      require {
      cat = skill ;
      item = humant_p1 ;
      level = 1 ;
      }

      trigger {
      failtag = 100 ;
      is_flying = true ;
      name = filter ;
      time = 0 ;
      }

      trigger {
      name = FlameOn ;
      tag = 100 ;
      time = 0 ;
      }

      trigger {
      critical = true ;
      name = FlameOff ;
      time = -1 ;
      }

      trigger {
      name = sound ;
      sound = char/humant_m/p1_charge ;
      time = 0 ;
      }

      trigger {
      name = powerusage ;
      powerusage = %humant_p1_pwr ;
      time = 0 ;
      }

      chain {
      action = Idle ;
      result = power1_loop ;
      }

   }

   FightMove {
   aitype = projectile ;
   always_target = true ;
   animenum = ea_power1_loop ;
   combotextfinisher = Barrage ;
   combotextstarter = Flaring ;
   energypersecond = %humant_p1_pwr ;
   icon = 0 ;
   is_power = true ;
   lockangles = false ;
   lockchaining = true ;
   lockspeed = true ;
   locktransitionangles = true ;
   name = power1_loop ;
   noautoaim = true ;
   powerup_tag = humant_ranged ;
   priority = 5 ;
   target_only_actors = true ;
   turnrate = 0.35 ;
      event {
      attack_bone_angles = 0 0 0 ;
      attack_bone_pos = 19 0 56 ;
      beambolt = Bip01 R Hand ;
      damage = 0 ;
      damagetype = dmg_fire ;
      fxlevel = 1 ;
      hiteffect = char/humant/p1_impact ;
      inherit = beam ;
      maxrange = 150 ;
      name = flame_dmg ;
      pierce = true ;
      radius = 24 ;
      spawneffect = char/humant/p1_power ;
      victimeventtag = 100 ;
         damagemod {
         name = dmgmod_no_damage ;
         }

      }

      trigger {
      filteractor = true ;
      name = filter ;
      passtag = 101 ;
      tag = 100 ;
      time = -1 ;
      }

      trigger {
      class = harming ;
      damage = %humant_p1_dmg ;
      damagetype = dmg_fire ;
      life = 3 ;
      name = powerup ;
      next_eventtag = 102 ;
      tag = 101 ;
      time = -1 ;
         special_fx {
         bolt = Bip01 Pelvis ;
         effect = char/humant/p1_aura ;
         fxlevel = 1 ;
         how_used = primary ;
         }

         damageMod {
         remove = dmgmod_no_pain ;
         }

      }

      trigger {
      damage = %humant_p1_dmg ;
      damagetype = dmg_fire ;
      name = hitme ;
      tag = 102 ;
      time = -1 ;
      type = ce_atk_self ;
      }

      trigger {
      button = samepowerhold ;
      name = button_hint ;
      time = 0 ;
      }

      trigger {
      loop_timeout = 2 ;
      loop_type = start ;
      manual_loop_timer = 0.2 ;
      name = sound ;
      sound = char/humant_m/p1_loop ;
      time = 1 ;
      }

      trigger {
      index = 1 ;
      name = flame_dmg ;
      time = 0.15 ;
      }

      trigger {
      index = 2 ;
      name = flame_dmg ;
      time = 0.3 ;
      }

      trigger {
      index = 3 ;
      name = flame_dmg ;
      time = 0.45 ;
      }

      trigger {
      index = 4 ;
      name = flame_dmg ;
      time = 0.6 ;
      }

      trigger {
      index = 5 ;
      name = flame_dmg ;
      time = 0.75 ;
      }

      trigger {
      index = 6 ;
      name = flame_dmg ;
      time = 0.9 ;
      }

      trigger {
      critical = true ;
      name = FlameOff ;
      time = -1 ;
      }

      chain {
      action = samepowerhold ;
      result = power1_loop ;
      }

      chain {
      action = idle ;
      result = power1_end ;
      }

   }

   FightMove {
   animenum = ea_power1_end ;
   icon = 0 ;
   is_power = true ;
   lockspeed = false ;
   locktransitionangles = false ;
   name = power1_end ;
   noautoaim = true ;
   turnrate = 0.4 ;
      trigger {
      loop_type = stop ;
      name = sound ;
      sound = char/humant_m/p1_loop ;
      time = 0 ;
      }

      trigger {
      failtag = 100 ;
      is_flying = true ;
      name = filter ;
      time = 0 ;
      }

      trigger {
      critical = true ;
      name = FlameOff ;
      tag = 100 ;
      time = -1 ;
      }

      chain {
      action = Idle ;
      result = idle ;
      }

   }


There are three coding entries (fightmoves) here. We will focus on only the power1_loop one, since that is where the attack coding is. Again, let's break it down into sections so you all can understand it. The parts in BLUE weren't covered.

   FightMove {
   aitype = projectile ;
   always_target = true ;
   animenum = ea_power1_loop ;
   combotextfinisher = Barrage ;
   combotextstarter = Flaring ;
   energypersecond = %humant_p1_pwr ;
   icon = 0 ;
   is_power = true ;
   lockangles = false ;
   lockchaining = true ;
   lockspeed = true ;
   locktransitionangles = true ;
   name = power1_loop ;
   noautoaim = true ;
   powerup_tag = humant_ranged ;
   priority = 5 ;
   target_only_actors = true ;
   turnrate = 0.35 ;

By now, you know most of those terms mean. Even though the aitype says "projectile," you will see in a bit that it is actually a beam attack.
For constant beam powers, make sure that the animation you choose is a holding animation, meaning that the character will stay in that pose as players hold down the power button.
target_only_actors means that the power will not destroy objects, only enemies. This piece is not needed for Mental powers obviously, because objects do not have minds of their own.


      event {
      attack_bone_angles = 0 0 0 ;
      attack_bone_pos = 19 0 56 ;
      beambolt = Bip01 R Hand ;
      damage = 0 ;
      damagetype = dmg_fire ;
      fxlevel = 1 ;
      hiteffect = char/humant/p1_impact ;
      inherit = beam ;
      maxrange = 150 ;
      name = flame_dmg ;
      pierce = true ;
      radius = 24 ;
      spawneffect = char/humant/p1_power ;
      victimeventtag = 100 ;
         damagemod {
         name = dmgmod_no_damage ;
         }

      }

This the actual damage coding entry, but notice it is listed as an event, not a trigger. This is so you only have to write this once instead of multiple times, since this is a constant beam attack. That's why you don't see "time" there. You may also wonder why the damagemod (dmgmod) says "no_damage." That is because of the victimeventtag, which connects to the coding below.
Pay close attention that name of the power is called "flame_dmg." You'll see why later on...


      trigger {
      filteractor = true ;
      name = filter ;
      passtag = 101 ;
      tag = 100 ;
      time = -1 ;
      }

This is saying to the game, "Is the target that the power is hitting alive? If so, go to the passtag."

      trigger {
      class = harming ;
      damage = %humant_p1_dmg ;
      damagetype = dmg_fire ;
      life = 3 ;
      name = powerup ;
      next_eventtag = 102 ;
      tag = 101 ;
      time = -1 ;
         special_fx {
         bolt = Bip01 Pelvis ;
         effect = char/humant/p1_aura ;
         fxlevel = 1 ;
         how_used = primary ;
         }

         damageMod {
         remove = dmgmod_no_pain ;
         }

      }

      trigger {
      damage = %humant_p1_dmg ;
      damagetype = dmg_fire ;
      name = hitme ;
      tag = 102 ;
      time = -1 ;
      type = ce_atk_self ;
      }

These two are the status aliments that occurs when an actor (living enemy) gets hit by that power. class = harming in this case says that the enemy will get burned on fire for a time.

      trigger {
      button = samepowerhold ;
      name = button_hint ;
      time = 0 ;
      }

The button hint, as discussed before.

      trigger {
      loop_timeout = 2 ;
      loop_type = start ;
      manual_loop_timer = 0.2 ;
      name = sound ;
      sound = char/humant_m/p1_loop ;
      time = 1 ;
      }

The sound coding for when the constant beam power activates. More on sounds in a future lesson.

      trigger {
      index = 1 ;
      name = flame_dmg ;
      time = 0.15 ;
      }

      trigger {
      index = 2 ;
      name = flame_dmg ;
      time = 0.3 ;
      }

      trigger {
      index = 3 ;
      name = flame_dmg ;
      time = 0.45 ;
      }

      trigger {
      index = 4 ;
      name = flame_dmg ;
      time = 0.6 ;
      }

      trigger {
      index = 5 ;
      name = flame_dmg ;
      time = 0.75 ;
      }

      trigger {
      index = 6 ;
      name = flame_dmg ;
      time = 0.9 ;
      }

Remember that the event we saw before was called "flame_dmg?"  Well, here it is again, except now you don't have to write all of that again, because these indexed entries all connect to that event. index means that each one will cause damage. This means that when the character fires the power, an enemy can suffer damage multiple times -- hence, the constant part of the beam attack. In this case, six times.

      trigger {
      critical = true ;
      name = FlameOff ;
      time = -1 ;
      }

      chain {
      action = samepowerhold ;
      result = power1_loop ;
      }

      chain {
      action = idle ;
      result = power1_end ;
      }

   }

That just about does it. Beam powers can be fun to create as long as you have the right animations and effects for them. Practice and try them out with the comfort of knowing that you don't have to go up close to hit enemies with them.






Lesson Takeaway:
-Beam powers attack from a distance. Have correct animations and effects for them.
-Maximum range should be 500 and higher. They can be charged for more damage and for the pierce entry.
-Hit effects and status aliments can connect to a beam power easily.
-You must have a holding animation and indexed entries for constant beam powers.
-You can make beams to hit enemies from above and below you, and only harm living enemies if you wish.


February 22, 2020, 11:33PM #27 Last Edit: June 20, 2020, 08:57PM by Outsider
Lesson 14: Power Coding (Projectile)

This next kind of attack power is one of the harder ones, so brace yourself. It's projectile powers, and it's not as simple as the others you've seen.

What are projectiles? It's the type of powers where a character throws a ball/sphere of an energy type, or an object at an enemy. It can range from fireballs and energy blasts to rockets/missiles and bombs. Many mods have at least one projectile attack, so it's important to know how to do these. Unlike other attack powers, though, projectiles need an extra file for them to work. These are called entities. I'll show you why this is important, as you simply cannot create a projectile power without it.

For this lesson, we will look at  :strange: Dr. Strange. His first power are the Mystic Bolts, which are projectiles. First, open his powerstyle file, and let's look at the first event entry...

   event {
   actorbolt = Bip01 L Hand ;
   attacktype = projectile ;
   count = 1 ;
   damage = %drstr_p1_dmg ;
   damagescale = none ;
   entity = MysticBolt ;
   filename = ents_drstr ;
   fulltargeting = true ;
   inherit = projectile ;
   maxrange = 500 ;
   name = MysticBolt ;
   speed = 1000 ;
   targetable = true ;
   }

This is the actual coding for the projectile power. (Note that because it's an event, it can be placed anywhere in the powerstyle, versus trigger, which has to be inside the fightmove of the power, and must have a time. Now, I'll explain some of the terms you're seeing here.

actorbolt: Where of the body that the projectile is firing/shooting from.
count: Quantity/number of the projectile. If this is not here, it will be 1. You can make it as many as you want or you can set a value connected to your character's talents file.
entity: The name of the entity that you named inside the entities file. More on that in a bit.
filename: The entities file that the entity came from. More on that in a bit.
fulltargeting: Honestly not sure what this does, but put it there anyway.
maxrange: The range that the projectile can travel before fading away.
speed: The speed of the projectile. The higher this value, the faster the projectile will move.
spread: This one is not present here, but if added, it will spread out the number of projectiles thrown. For example, if the count is 3, and the spread is 70 let's say, then the projectiles will spread out -- one to the left, one to the center, and one to the right.
targetable: See "fulltargeting."



So now that you've seen the coding for the projectile, hit Ctrl + F to Find, type "name = power1" and press Enter. You'll run into the rest of the coding for it. Let's look at it below.

   FightMove {
   aitype = projectile ;
   animenum = ea_power1 ;
   icon = 0 ;
   is_power = true ;
   name = power1 ;
   noautoaim = true ;
   powerup_tag = DrS_MagicAttack ;
   priority = 5 ;
      require {
      cat = skill ;
      item = drstr_p1 ;
      level = 1 ;
      }

      trigger {
      name = powerusage ;
      powerusage = %drstr_p1_pwr ;
      time = -1 ;
      }

      chain {
      action = Idle ;
      result = power1_looping ;
      }

   }

This is the set-up for his projectile power. Notice that powerusage has the time at "-1," which means that the player can't do it without the powerusage at whatever value you set, but no energy will be taken at that time.

   FightMove {
   aitype = projectile ;
   animenum = ea_power1_loop ;
   combotextfinisher = Missile ;
   combotextstarter = Mystic ;
   icon = 0 ;
   is_power = true ;
   name = power1_looping ;
   noautoaim = true ;
   powerup_tag = DrS_MagicAttack ;
   priority = 5 ;
   startchaintime = 0.99 ;
      trigger {
      name = powerusage ;
      powerusage = %drstr_p1_pwr ;
      time = 0 ;
      }

      trigger {
      button = samepowerclick ;
      name = hint ;
      time = 0.231 ;
      type = ce_power_button_hint ;
      }

The button hint, which will be displayed as the player is using the power. This one, "samepowerclick" tells the player to keep pressing the power button, which will keep firing the projectile.

      trigger {
      actorbolt = Bip01 R Hand ;
      attack_bone_angles = 0 0 0 ;
      attack_bone_pos = 19 -13 52 ;
      name = MysticBolt ;
      time = 0.25 ;
      }

This refers to the event we saw earlier, "MysticBolt." That's why you don't have to write all of it again.

      trigger {
      name = sound ;
      sound = char/drstr_m/p1_fire ;
      time = 0.25 ;
      }

      trigger {
      actorbolt = Bip01 L Hand ;
      attack_bone_angles = 0 0 0 ;
      attack_bone_pos = 28 2 37 ;
      name = MysticBolt ;
      time = 0.88 ;
      }

As you can see, the coding shows that Dr. Strange will fire two projectiles. If the player presses the power button again, he will fire two more, costing energy again.

      trigger {
      name = sound ;
      sound = char/drstr_m/p1_fire ;
      time = 0.88 ;
      }

      chain {
      action = Idle ;
      result = power1_end ;
      }

      chain {
      action = samepowerclick ;
      result = power1_looping ;
      }

   }

   FightMove {
   aitype = projectile ;
   animenum = ea_power1_end ;
   icon = 0 ;
   is_power = true ;
   name = power1_end ;
   noautoaim = true ;
   powerup_tag = DrS_MagicAttack ;
   priority = 5 ;
      chain {
      action = Idle ;
      result = idle ;
      }

   }

These entries are necessary due to the animation that was used to fire the projectiles.





ENTITIES FILE

So, as I said before, you must have an entities file to create a projectile power. So, go to your game's data folder, then go to the entities folder. See all of those files? Those are the entities files for every mod that uses at least one. Notice that they end with the extension ".xmlb" which means that if you open (decompile) one of them, edit what you want, then close (compile) it using XLMBCUI, you won't have to change the extensions. To create an entities file, just copy one of them, paste it where you are doing your modding, and rename it to "ents_character." Whatever you name this file must be the same as the filename in the projectile coding mentioned above. Otherwise, it won't work.

Now, earlier you saw that Dr. Strange's entities file is named "ents_drstr," as that was the filename. If you look inside, you'll see that one of his entries there is this...

   entity {
   classname = projectileent ;
   deatheffect = char/drstr/p1_impact ;
   deathsound = char/drstr_m/p1_impact ;
   dieoncontact = true ;
   fxlevel = 1 ;
   health = 1 ;
   lifetime = 3 ;
   loopfx = char/drstr/p1_power ;
   loopfxstarton = true ;
   mass = 30 ;
   name = MysticBolt ;
   nogravity = true ;
   radius = 1 ;
   randompickups = false ;
   spawneffect = char/drstr/p1_charge ;
   stopprojectile = false ;
   }


See that the name there is MysticBolt? That refers to the entity mentioned earlier. They also must be exactly the same, or it will not work. Now let's go through the terms.

classname: The type of projectile. Most of the time, it's "projectileent," but it can be others. More on that in a bit.
deatheffect: The effect made when the projectile hits an enemy or a wall.
deathsound: The sound made when the projectile hits an enemy or a wall.
dieoncontact: This means that the projectile will be destroyed when it hits an enemy or wall. If you put "false," it will keep going.
fxlevel: This refers to the effects being used. More on effects in a future lesson.
health: This is the health of the projectile. See, once fired, shot, or released, the projectile takes a life of its own. So, if the health is low, it can be nullified by another projectile. If the health is high, another projectile won't be strong enough to nullify it and it will keep moving.
lifetime: This details how many seconds the projectile will last before it fades away.
loopfx: This refers to the effect that creates the projectile. This is why you must have the right kind of effect for the entity.
loopfxstarton: I think this means that the effect starts right away, which goes without saying.
mass: The weight or heaviness of the projectile. Not sure why this one is important, quite frankly.
name: The name of the entity. Whatever you put here must match the name on the projectile coding.
nogravity: This means literally that. If you put "true," then the projectile will fly forward continuously. If you put "false," then the projectile will fall to the ground once thrown.
radius: The radius of the projectile, but not its effect. If this value is high, then the projectile may die when trying to go through a doorway. If it's low, then you can shoot it through a doorway, and it will keep going.
randompickups: Not sure what this does or means, but just leave it there.
spawneffect: I think this is the effect that appears when the projectile first fires.
stopprojectile: See "randompickups."





HOMING PROJECTILES

Now let's say you want the projectile to follow the enemy instead of just going straight. It only takes two simple changes. Note them in VIOLET.

   entity {
   classname = guidedprojectileent ;
   deatheffect = char/drstr/p1_impact ;
   deathsound = char/drstr_m/p1_impact ;
   dieoncontact = true ;
   fxlevel = 1 ;
   health = 1 ;
   hometarget = true ;
   lifetime = 3 ;
   loopfx = char/drstr/p1_power ;
   loopfxstarton = true ;
   mass = 30 ;
   name = MysticBolt ;
   nogravity = true ;
   radius = 1 ;
   randompickups = false ;
   spawneffect = char/drstr/p1_charge ;
   stopprojectile = false ;
   }

Adding those values will allow the projectile to be "heat-seeking" and follow the nearest enemy until it makes contact with them.







EXPLOSIVE PROJECTILES

Now you know how to create a fireball or energy projectile kind of power. But what if you wanted to create a missile or bomb instead? Let's look at :nfury: Nick Fury. His fourth power is the frag, which is an entity. So look again at the entities folder. Nick Fury's entities file is "ents_nickfury," and if you look inside, you'll see only one entity, which is this:

   entity {
   animstarton = false ;
   bounce = 0.001 ;
   classname = projectileent ;
   contactcountdown = 1.6 ;
   deatheffect = base/material/explode/exp_generic_lrg ;
   deathsound = char/fury_m/p4_explode ;
   dieoncontact = false ;
   friction = 30 ;
   fxlevel = 1 ;
   health = 50 ;
   lifetime = 10 ;
   mass = 30 ;
   model = models/bolton/nickfury_mine ;
   name = nickfury_p4_grenade ;
   nocollide = true ;
   postanimlife = 2 ;
   radius = 12 ;
   randompickups = false ;
   speed = 300 ;
   stophero = false ;
   stopprojectile = false ;
   }

As you can see, the terms are nearly the same as Dr. Strange's that I showed you earlier. But there are a few differences. Observe...

animstarton: Unsure what this is. May not be necessary.
bounce: The value and amount of times that the projectile will bounce once it hits the ground.
contactcountdown: The number of seconds before the entity explodes and cause damage. This is why the deatheffect and deathsound should resemble an explosion.
dieoncontact: Make this one "true" if it's something like a missile or rocket, and "false" if it's a bomb.
friction: Not sure what this does.
model: The object used for the explosive. Use a model from your game's models folder to create it.
nocollide This means that the projectile will not react with an enemy while being thrown. Good for bombs.
postanimlife: Animations that the object does once it hits the ground or after it's shot.
stophero: See "animstarton."

Notice that you don't see "nogravity" there. That means it does have gravity. So when Fury throws it, it will land on the ground. If you want to create missiles instead of bombs, then "nogravity" must equal true, but should still explode on impact.

So, now open Nick Fury's powerstyle file, hit Ctrl + F to Find, type "name = power4" and hit Enter. You'll run into the coding for this power. Let's take a look, as I break down what they mean.

   FightMove {
   aitype = projectile ;
   animenum = ea_power4 ;
   combotextfinisher = Shrapnel ;
   combotextstarter = Disintegration ;
   icon = 3 ;
   is_power = true ;
   lockangles = true ;
   name = power4 ;
   priority = 5 ;
      require {
      cat = skill ;
      item = nickf_p4 ;
      level = 1 ;
      }

      trigger {
      name = powerusage ;
      powerusage = %nickf_p4_pwr ;
      time = 0 ;
      }

      trigger {
      bolt = Bip01 R Hand ;
      effect = char/fury/p4_power ;
      fxlevel = 1 ;
      name = effect ;
      time = 0.22 ;
      }

      trigger {
      name = sound ;
      sound = char/fury_m/p4_charge ;
      time = 0.49 ;
      }

By now, you know what these entries mean. Don't worry about effects and sounds -- that's for future lessons.

      trigger {
      actorbolt = Bip01 R Hand ;
      attack_bone_angles = 0 0 0 ;
      attack_bone_pos = 30 2 58 ;
      attacktype = blast ;
      damage = 1 ;
      damagetype = dmg_fire ;
      entity = nickfury_p4_grenade ;
      explodedamage = %nickf_p4_dmg ;
      explodedamagemod = dmgmod_auto_knockback ;
      explodedamagetype = dmg_physical ;
      exploderadius = 96 ;
      filename = ents_nickfury ;
      name = projectile ;
      speed = 350 ;
      time = 0.49 ;
      }

OK, this is the actual coding for the projectile. This is similar to the first coding entry you saw at the beginning of the lesson. Notice that is written as a trigger instead of an event, and has a time. That means it's intended to only happen once. And once again, the entity you see there matches the name of the entity at the entities file. The new terms you're seeing are:

explodedamage: The amount of damage that the explosion will cause. That is why damage is listed at 1, as the REAL damage takes place in the explosion.
explodedamagemod: Remember the "damagemod" codes I showed you such as "dmgmod_auto_knockback," and "dmgmod_popup"? Well, this works the same way, except it happens when the explosion happens.
explodedamagetype: The damage type that the explosion will inflict on enemies.
exploderadius: The radius that the explosion will hit enemies. The higher the radius, the wider the area where the explosion will inflict damage. Bombs usually have a radius of 90-150.

Note that you can also put explodeknockback, which is the amount of distance enemies will get knocked back after hit by the explosion. Also note that explosions will not harm the player nor his/her allies.



      chain {
      action = idle ;
      result = idle ;
      }

   }

Projectile powers are a bit more difficult than others, but they can make for some really cool powers. Take a look at some entities, and experiment.


SPECIAL NOTE:
Entities files are not just for projectiles, you know. They are also good for vehicles, such as Ghost Rider's motorcycle and Arcade's bumper car. Coding like that, though, is far more complex. I would just look at what they did, and mimic it if you want your character to drive a vehicle.






Lesson Takeaway:
-Projectile powers require an entities file to work. This is unavoidable, so learn it as best as you can.
-The filename of the coding must match the name of the entity file, and the entity listed in the coding must match the name of the entity in the entities file.
-Pick effects, sounds, and models (if any) to best resemble what you want the projectile to do.
-Homing projectiles and bombs or missiles are possible as well, if the coding is correct.
-Once you know what the terms in the coding entries mean, you can then customize your projectiles in a variety of ways.


February 25, 2020, 11:59PM #28 Last Edit: June 20, 2020, 08:58PM by Outsider
Lesson 15: Xtreme Coding

Ah yes, that ever-so-important attack power known as the Xtreme. This lesson teaches you how to create an Xtreme attack for your character. And don't worry -- it's easier than you think.

What are Xtreme powers? It's your character's most devastating, over-the-top attack power. Unlike other powers, it does not use energy. Instead, you have to gain full momentum to be able to use it. Xtreme powers unlock at level 10. All characters typically have just one Xtreme power. Very rare does a character have two.

For this lesson, we will look at three kinds of Xtreme powers, using :thor: Thor, :stark: Iron Man, and :moonk: Moon Knight respectively. So, open up Thor's powerstyle file (ps_thor.engb), hit Ctrl + F to Find, type "team_xtreme" and hit Enter. You'll find the coding for it. Do the same for ps_ironman.engb, and ps_moonknight.engb. Now let's look at the first coding entry for Moon Knight's Xtreme.


   FightMove {
   animenum = ea_idle1 ;
   blendtime = 0 ;
   handler = ch_team_xtreme ;
   icon = 7 ;
   is_power = true ;
   lockangles = true ;
   lockchaining = false ;
   lockspeed = true ;
   name = team_xtreme ;
   playspeed = 10 ;
   priority = uninterruptable ;
      require {
      cat = skill ;
      item = moonk_p8 ;
      level = 1 ;
      }

      require {
      cat = xtreme ;
      level = 1 ;
      }

      trigger {
      name = xtreme_start ;
      only_non_looped = true ;
      team_xtreme = 2 ;
      time = 0 ;
      }

      chain {
      action = idle ;
      result = team_xtreme ;
      }

      chain {
      action = special ;
      result = power8 ;
      }

   }


See that? That is how EVERY Xtreme power starts. They all have this, so this MUST be the first coding entry for all Xtreme powers. Let's look closer at what each means.

   FightMove {
   animenum = ea_idle1 ;
   blendtime = 0 ;
   handler = ch_team_xtreme ;
   icon = 7 ;
   is_power = true ;
   lockangles = true ;
   lockchaining = false ;
   lockspeed = true ;
   name = team_xtreme ;
   playspeed = 10 ;
   priority = uninterruptable ;

This is the introduction to the Xtreme coding. The name is always called "team_xtreme," as this is the brief pause that sets up the Xtreme power. See, in Xtreme powers, it is an event that darkens the lights and slows down the game on purpose to indicate that something big is about to happen. Because the game is slowing down, we need the playspeed at 10. Lower playspeed will cause the pause to delay, so keep this one at 10. The handler MUST be "ch_team_xtreme" as it lets the game know that this is an Xtreme power. Also, the animenum (animation) should be ea_idle1. You can put another animation there, but why?

      require {
      cat = skill ;
      item = moonk_p8 ;
      level = 1 ;
      }

      require {
      cat = xtreme ;
      level = 1 ;
      }

These are the requirements, as you know. But this time, the Xtreme requirement is there as well. This is telling the game that your character cannot perform this power normally, and requires a full momentum bar to work. Keep this here.

      trigger {
      name = xtreme_start ;
      only_non_looped = true ;
      team_xtreme = 2 ;
      time = 0 ;
      }

This is the xtreme_start, telling the game computer to start the Xtreme. I am uncertain what only_non_looped = true means, honestly, but keep that there. As for "team_xtreme = 2 ;" I can tell you that number placed there does not matter, so just put any number 1-9.

      chain {
      action = idle ;
      result = team_xtreme ;
      }

      chain {
      action = special ;
      result = power8 ;
      }

   }

This is the chain. Don't worry that team_xtreme is under the idle action -- it will not repeat that pause. It will go right into the special action, which is your character's Xtreme.

Now, take a look at the first coding energy for Iron Man's Xtreme... See? It's pretty much the same. Now look at the first coding energy for Thor's Xtreme... Again, it's the same. Except one thing was added there...

      trigger {
      name = xtreme_start ;
      next_eventtag = 1 ;
      only_non_looped = true ;
      team_xtreme = 7 ;
      time = 0 ;
      }

      trigger {
      apply_ally = true ;
      heal_type = energy ;
      name = heal ;
      percent = %thor_p9_hlt ;
      tag = 1 ;
      time = -1 ;
      type = ce_heal ;
      }


Thor's Xtreme has it where it will also restore energy to each of your character's team. You can place a powerup there if you wish. :captainamerica2: Captain America and :pman: Luke Cage have powerups during an Xtreme that boosts their team. Experiment with that.





Now, let's go to Thor's Xtreme and scroll down to the next coding entry, which will be his actual Xtreme power. Thor's is an example of a Radial Xtreme, which is the most common kind. Again, I will show you what each mean.

   FightMove {
   animenum = ea_power9 ;
   combotextfinisher = Wrath ;
   icon = 8 ;
   is_power = true ;
   lockangles = true ;
   lockspeed = true ;
   name = power9 ;
   playspeed = 10 ;
   powerup_tag = ghost_p9 ;
   priority = uninterruptable ;
   takeimpactdamage = false ;

This is the beginning of his actual coding for it. For Xtreme powers, usually the priority is uninterruptable. And again, the playspeed is at 10. Here, you can lower the number to make the move for more dramatic effect, but don't make it too slow.

Notice the part in red? That is an error -- as that relates to :ghostr: Ghost Rider, not Thor.


      trigger {
      name = hammer_powerup ;
      time = 0 ;
      }

This is a trigger that connects to an event in Thor's powerstyle file. Yes, you can connect events to here.

      trigger {
      always = true ;
      name = camera_override ;
      time = 0 ;
      }

All Xtreme powers have this entry, so keep this here. It tells the computer to focus the game's camera on the character performing the Xtreme.

      trigger {
      description = Attack ;
      name = team_xtreme_msg ;
      time = 0 ;
      title = Wrath of the Gods ;
      }

This is the Xtreme message -- the words that are displayed on the bottom of the screen, showcasing the name of the character's Xtreme. In Thor's case, it's called "Wrath of the Gods." That's why it's named that under title. Whatever you named your character's Xtreme in their talents file should also be named here.

      trigger {
      name = hammer_hand_show ;
      time = 0.1 ;
      }

      trigger {
      name = hammer_back_hide ;
      time = 0.1 ;
      }

More event triggers related to Thor particularly.

      trigger {
      name = sound ;
      sound = char/thor_m/p9_charge ;
      time = 0.2 ;
      }

      trigger {
      effect = char/thor/p8_power ;
      fxlevel = 1 ;
      name = effect ;
      time = 0.158 ;
      }

      trigger {
      effect = char/thor/p9_power ;
      fxlevel = 2 ;
      name = effect ;
      time = 0.289 ;
      }

      trigger {
      name = sound ;
      sound = char/thor_m/p2_impact ;
      time = 0.605 ;
      }

These are effects and sounds triggers. Will be covered in future lessons.

      trigger {
      name = velocity ;
      time = 0.52 ;
      up = -40000 ;
      }

This is a special coding entry called velocity. It allows a character to move in a certain direction with the player doing anything. In Thor's case, he has the velocity going up, but at a negative value for some reason.

      trigger {
      effect = char/thor/p9_impact ;
      fxlevel = 1 ;
      name = effect ;
      time = 0.605 ;
      }

      trigger {
      damage = %thor_p9_dmg ;
      damagetype = dmg_electricity ;
      knockback = 40 ;
      maxrange = 600 ;
      name = radial ;
      offset = 65 ;
      tiles = true ;
      time = 0.605 ;
         damagemod {
         name = dmgmod_auto_knockback ;
         }

         damagemod {
         name = dmgmod_ground ;
         }

      }

This is the actual coding entry for the damage of the Xtreme. As you can see, it's set up just like any other radial power, except there is no powerusage, because it's not supposed to deplete energy. Don't worry about "offset" or "tiles" -- not important. Notice that the effect entry before this has the time listed at 0.605? That's because the effect happens just as the damage happens, at the same time of 0.605.

However, there is an error here, shown in red. The maxrange is listed at 600 -- that is far too much, even for an Xtreme. The usual is 300-350, with the highest being 400, which is rare.


      trigger {
      critical = true ;
      name = hammer_to_back ;
      time = 0.92 ;
      }

Another event trigger connected to Thor exclusively.

      trigger {
      critical = true ;
      end = true ;
      name = xtreme_start ;
      time = 0.75 ;
      }

This is where the Xtreme ends, so this is also very important. It tells the game to end the Xtreme moment, so the lights get bright again, and the game's speed returns to normal. It is a MUST to have this at the end of any Xtreme.

      chain {
      action = Idle ;
      result = idle ;
      }

   }

The ending chain.

Does everyone got that? That is usually how the radial Xtreme works. Fairly easy stuff.





Now, let's look at Iron Man's Xtreme, as maybe you don't want a radial attack. Iron Man's is an example of an Area of Effect Xtreme, where attacks happen only where enemies are standing within range. Let's look at the coding. Above the required "team_xtreme" coding entry, you'll see this...

   event {
   damage = %ironman_p8_dmg ;
   damagelevel = 2 ;
   damagetype = dmg_energy ;
   enemynumber = 0 ;
   fxlevel = 1 ;
   hiteffect = char/iron/p8_impact ;
   inherit = blast ;
   maxrange = 300 ;
   name = strike_impact ;
   radius = 60 ;
   random = true ;
      damagemod {
      name = dmgmod_popup ;
      }

   }

See, it was turned from a trigger to an event because it's going to happen more than once. Oh, and don't worry that the enemynumber is 0. It's standard for moves like these. Now, scroll down past the required "team_xtreme" coding, to look at the coding below.

   FightMove {
   animenum = ea_power8 ;
   blendtime = 0 ;
   combotextfinisher = Retribution ;
   icon = 9 ;
   is_power = true ;
   lockangles = true ;
   lockspeed = true ;
   name = power8 ;
   playspeed = 10 ;
   priority = uninterruptable ;
      trigger {
      always = true ;
      name = camera_override ;
      time = 0 ;
      }

      trigger {
      description = Air Strike ;
      name = team_xtreme_msg ;
      time = 0 ;
      title = Air Strike ;
      }

Again, the setup for the Xtreme coding, followed by the camera_override, and the Xtreme message. Iron Man's Xtreme is called "Air Strike." It only needs to say that in the TITLE, not the description. The description doesn't matter.

      trigger {
      name = sound ;
      sound = char/iron_m/p8_charge ;
      time = 0 ;
      }

      trigger {
      bolt = Bip01 L Toe0 ;
      effect = char/iron/p8_power ;
      fxlevel = 1 ;
      name = effect_sound ;
      time = 0.25 ;
      }

      trigger {
      bolt = Bip01 R Toe0 ;
      effect = char/iron/p8_power ;
      fxlevel = 1 ;
      name = effect ;
      time = 0.25 ;
      }

      trigger {
      effect = char/iron/p8_power ;
      fxlevel = 2 ;
      name = effect ;
      time = 0.25 ;
      }

      trigger {
      bolt = Bip01 Spine2 ;
      effect = char/iron/p8_power ;
      fxlevel = 3 ;
      name = effect ;
      time = 0.46 ;
      }

      trigger {
      bolt = Bip01 Spine2 ;
      effect = char/iron/p8_power ;
      fxlevel = 3 ;
      name = effect ;
      time = 0.48 ;
      }

      trigger {
      bolt = Bip01 Spine2 ;
      effect = char/iron/p8_power ;
      fxlevel = 3 ;
      name = effect ;
      time = 0.5 ;
      }

      trigger {
      bolt = Bip01 Spine2 ;
      effect = char/iron/p8_power ;
      fxlevel = 3 ;
      name = effect ;
      time = 0.52 ;
      }

      trigger {
      bolt = Bip01 Spine2 ;
      effect = char/iron/p8_power ;
      fxlevel = 3 ;
      name = effect ;
      time = 0.54 ;
      }

      trigger {
      bolt = Bip01 Spine2 ;
      effect = char/iron/p8_power ;
      fxlevel = 3 ;
      name = effect ;
      time = 0.56 ;
      }

      trigger {
      bolt = Bip01 Spine2 ;
      effect = char/iron/p8_power ;
      fxlevel = 3 ;
      name = effect ;
      time = 0.58 ;
      }

      trigger {
      bolt = Bip01 Spine2 ;
      effect = char/iron/p8_power ;
      fxlevel = 3 ;
      name = effect ;
      time = 0.6 ;
      }

      trigger {
      bolt = Bip01 Spine2 ;
      effect = char/iron/p8_power ;
      fxlevel = 3 ;
      name = effect ;
      time = 0.62 ;
      }

      trigger {
      bolt = Bip01 Spine2 ;
      effect = char/iron/p8_power ;
      fxlevel = 3 ;
      name = effect ;
      time = 0.64 ;
      }

      trigger {
      effect = char/iron/p8_power ;
      fxlevel = 4 ;
      name = effect_sound ;
      sound = char/iron_m/p8_bomb ;
      time = 0.7 ;
      }

These are all effects and sounds triggers. They are designed to move along with the Xtreme.

      trigger {
      enemynumber = 0 ;
      name = strike_impact ;
      time = 0.7 ;
      }

      trigger {
      enemynumber = 1 ;
      name = strike_impact ;
      time = 0.715 ;
      }

      trigger {
      enemynumber = 2 ;
      name = strike_impact ;
      time = 0.73 ;
      }

      trigger {
      enemynumber = 3 ;
      name = strike_impact ;
      time = 0.745 ;
      }

      trigger {
      enemynumber = 4 ;
      name = strike_impact ;
      time = 0.76 ;
      }

      trigger {
      enemynumber = 5 ;
      name = strike_impact ;
      time = 0.775 ;
      }

      trigger {
      enemynumber = 6 ;
      name = strike_impact ;
      time = 0.79 ;
      }

      trigger {
      enemynumber = 7 ;
      name = strike_impact ;
      time = 0.805 ;
      }

      trigger {
      enemynumber = 8 ;
      name = strike_impact ;
      time = 0.82 ;
      }

      trigger {
      enemynumber = 9 ;
      name = strike_impact ;
      time = 0.835 ;
      }

These entries connect to the event you saw before, because it's happening multiple times. enemynumber refers to the number of enemies there, to which they will each get hit by the power. This is why you see that in each entry here, the enemy number and the time are increasing, creating a sequence of attack.

      trigger {
      effect = char/iron/p8_power ;
      fxlevel = 5 ;
      name = effect ;
      time = 0.803 ;
      }

      trigger {
      critical = true ;
      end = true ;
      name = xtreme_start ;
      time = 0.85 ;
      }

Again, the ending to the Xtreme. Very important. "critical = true" is right indeed.

      chain {
      action = idle ;
      result = idle ;
      }

   }


And there you go. See how it works? Once you know how regular attack powers work, you can understand how Xtreme powers work. You just have to have the additional coding entries that are only for Xtreme powers.

(CONTINUES IN NEXT POST)


Here's one more. Let's look at Moon Knight's Xtreme, as that is an example of a Projectile Xtreme. It is the most damaging kind of Xtreme, because numerous projectiles are bouncing off the walls and can hit enemies from all directions. Because of that, the damage for each is usually lower than other Xtreme powers.

   FightMove {
   animenum = ea_power8 ;
   combotextfinisher = Devastation ;
   is_power = true ;
   lockangles = true ;
   lockspeed = true ;
   name = power8 ;
   playspeed = 10 ;
   priority = uninterruptable ;
      trigger {
      name = skin22_powerup ;
      time = 0 ;
      }

Again, the setup for the Xtreme coding, followed by something pertaining to an event set up for Moon Knight.

      trigger {
      always = true ;
      name = camera_override ;
      time = 0 ;
      }

The required camera_override entry.

      trigger {
      bolt = Bip01 L Hand ;
      effect = char/moonk/p8_power ;
      fxlevel = 1 ;
      name = effect ;
      time = 0 ;
      }

      trigger {
      bolt = Bip01 R Hand ;
      effect = char/moonk/p8_power ;
      fxlevel = 1 ;
      name = effect ;
      time = 0 ;
      }

      trigger {
      effect = char/moonk/p8_power ;
      fxlevel = 2 ;
      name = effect ;
      time = 0 ;
      }

Effects entries.

      trigger {
      description = !BADFILE:@HERO_MOOONKNIGHT@TEAM_XTREME_MSG ;
      name = team_xtreme_msg ;
      time = 0 ;
      title = Lunar Eclipse ;
      }

The Xtreme message coding. I don't know why all that fluff was placed in the description, but again, that doesn't matter. All that matters is what is listed under title. And in Moon Knight's case, his Xtreme is called the Lunar Eclipse. Hence, that's the title.

      trigger {
      name = sound ;
      sound = char/moon_m/xtreme_launch ;
      time = 0.3 ;
      }

      event {
      attacktype = projectile ;
      damage = %moonk_p8_dmg ;
      damagescale = none ;
      damagetype = dmg_energy ;
      entity = moonk_p8_proj ;
      filename = ents_moonknight ;
      inherit = projectile ;
      maxinstances = 8 ;
      name = p8_proj ;
      pierce = true ;
      speed = 1500 ;
      useboltangles = true ;
      }

A sound entry, then the actual damage coding. Once again, it was written as an event because it's going to happen multiple times. Remember the previous lesson about projectiles and entities? This Xtreme uses projectiles -- that's why you see entity and filename there.

      trigger {
      actorbolt = Bip01 R Hand ;
      angoffset = 0 0 0 ;
      attack_bone_pos = 5 -20 43 ;
      index = 1 ;
      name = p8_proj ;
      time = 0.315 ;
      }

      trigger {
      actorbolt = Bip01 L Hand ;
      angoffset = 0 0 -135 ;
      attack_bone_pos = -33 -6 45 ;
      index = 2 ;
      name = p8_proj ;
      time = 0.33 ;
      }

      trigger {
      actorbolt = Bip01 L Hand ;
      angoffset = 0 0 -45 ;
      attack_bone_pos = -13 -23 45 ;
      index = 3 ;
      name = p8_proj ;
      time = 0.36 ;
      }

      trigger {
      actorbolt = Bip01 R Hand ;
      angoffset = 0 0 135 ;
      attack_bone_pos = 1 22 44 ;
      index = 4 ;
      name = p8_proj ;
      time = 0.37 ;
      }

      trigger {
      actorbolt = Bip01 R Hand ;
      angoffset = 0 0 -90 ;
      attack_bone_pos = -9 -19 42 ;
      index = 5 ;
      name = p8_proj ;
      time = 0.44 ;
      }

      trigger {
      actorbolt = Bip01 L Hand ;
      angoffset = 0 0 90 ;
      attack_bone_pos = 8 20 45 ;
      index = 6 ;
      name = p8_proj ;
      time = 0.45 ;
      }

      trigger {
      actorbolt = Bip01 L Hand ;
      angoffset = 0 0 180 ;
      attack_bone_pos = -5 16 44 ;
      index = 7 ;
      name = p8_proj ;
      time = 0.48 ;
      }

      trigger {
      actorbolt = Bip01 R Hand ;
      angoffset = 0 0 45 ;
      attack_bone_pos = 32 12 42 ;
      index = 8 ;
      name = p8_proj ;
      time = 0.5 ;
      }

These are triggers connected to the event you just saw, creating an attack sequence. And remember, index means that each projectile can damage the enemy..

      trigger {
      critical = true ;
      end = true ;
      name = xtreme_start ;
      time = 0.75 ;
      }

The all-important ending of the Xtreme power. A must-have.

      chain {
      action = Idle ;
      result = idle ;
      }

   }

Hopefully by now, you got the jest of how Xtreme powers work. There are other kinds of Xtreme powers as well. View the Xtreme powers of various official characters and modded characters, and decide what you'd like your character to do. Then customize it to your liking.






Lesson Takeaway:
-Xtreme powers cost no energy, so remove the powerusage if it's there.
-Use grand over-the-top effects to create an Xtreme. And pick the right animation because the game slows down during it.
-Always have the xtreme_start, camera_override, Xtreme message, and the Xtreme ending entries. The Xtreme message has the TITLE of your character's Xtreme.
-Keep the maxrange at 300-350, with the maximum at 400.
-Events can be placed if boltons or skin segments are involved, and if an attack is to happen multiple times.