Klokreations

You are not connected. Please login or register

Ultimate FEXP Scripting Tutorial

View previous topic View next topic Go down  Message [Page 1 of 1]

1 Ultimate FEXP Scripting Tutorial on Thu May 05, 2011 9:15 pm

Klokinator

avatar
Admin
This topic has a LOT of information to cover, but I think when it gets some serious momentum behind it, it's going to shatter all myths that hacking FE is even a viable alternative to FEXP game creation. I've taken a very deep look inside the scripts and believe me, hacking has NOTHING on FEXP. (Except text editing which is a bit of a pain, but meh)

System Config Script:
Let's start with the first script that's easily editable: System Config.

Here are all of the editable options (aside from really advanced stuff)

Teams = 4. This really doesn't need to be modified unless you have something planned that needs more than four teams, which is... approximately nothing. :\
Player Team = 1. Leave this be.

Enemy Team = 2. Same.

TEAM_GROUPS = [[1,3],[2],[4]] ... This could be modified and maybe provide for multiplayer options. I'll make a cool suggestion to Bwd about the fourth team's default use. Kickass.

MAIN_CHARACTER = [1] This is COOL. Want more than one character to be able to seize? Like James and Jessica in the Phoenix Saga, this can be edited easily to allow for multiple lord seizing configurations. I have other uses planned for this too Very Happy If you want to add more characters, change it like this: [1, 2, 34] where the number = actor ID.

LOSS_ON_DEATH = [1, 26, 41] # The player loses if these actors die as allies

HP_COUNTER_VALUES = 2 # Number places to show for HP in battle

MAX_HP_ROWS = 2 # Rows of HP ticks in combat

HP_TABS_PER_ROW = 50 # HP ticks per row in the combat HP gauge

MAX_STAT = 30 # The highest number any non-HP stat should reach. I'm going to fuck with this and see where the limits reach Very Happy Incidenatlly, even if you set this number to more than 30, you still have to adjust individual class stat maxes. Yeah.

LCK_CAP = 30 # The default Luck cap

LVL_CAP = 20 # Max level

TIER0_LVL_CAP = 10 # Max level for tier 0s, if they exist. To set a class to tier zero, go to the class section of the database and edit their tier number to 0. Simple.

PROMOTION_LVL = 10 # Minimum level to promote

LEVEL_UP_PROMOTION = [0] # Tiers that can promote through leveling. If you want to make it FE9/10ish, set this to [0, 1] which allows for auto level promoting. SWEET HUH??

DBL_ATK_SPD = 4 # Attack speed over the opponent needed to double attack. Hehe, self explanatory eh? Wonder what modifying this could lead to?

NUM_ITEMS = 5 # Number of items each unit can hold. You just got excited didn't you? Now we can have FE5 style 7 items per unit features!!

SUPPLY_STORAGE = 150 # The amount of items that can be kept in supply. Wait, didn't Merlinus have a limit of 100?

WEAPON_TYPES = 10 # The number of weapon types

PHYSICAL_TYPES = 4 # The number of physical weapon types

MAGICAL_TYPES = 6 # The number of magical weapon types

ANIMA_TYPES = [5, 6, 7] # Weapon types that are kinds of Anima

DARK_TYPE = 9 # The element type for dark magic

STAFF_TYPE = 10 # The element type for staves

WPNLVL_THRESHOLDS = [0,1,31,71,121,181,251] # The min to move up in wpn lvl. This is another exciting editable feature Very Happy

WPNLVL_LETTERS = ['-','E','D','C','B','A','S'] # The weapon level letters

ONE_S_RANK = true # Determines if only one weapon type can reach max. Unfortunately, this affects ALL classes, not just one, though Bw will likely include a way for one or more specific classes to have multiple S rank weapons while the othe classes only have one.

SUPPORT_TOTAL = 5 # Total number of supports one unit can have. This opens up possibilities! Very Happy

SUPPORT_LETTERS = ['-','C','B','A'] # The support level letters

ALLOW_UNEQUIP = false # Determines if the player can unequip units' weapons. This is something that I would never have thought of, peronally. Not you can EASILY unarm a unit and use them as a meatshield, if this is set to True!

FIRST_CLASS_TYPE_ID = 29 # Element ID of the first class type

CLASS_TYPES = 9 # Number of class types (should all follow the first one)

CRIT_MULT = 3 # Multiplier to damage on a critical hit

EFFECT_MULT = 3 # Multiplier to weapon mgt when effective against target

ALTERNATE_EFFECT = {49 => 2} # Element IDs for alternate effective multipliers

CANNOT_SELL_TAG = 50 # Element ID for items that can't be sold

CURSE_RATE = 1 # Chance for cursed weapon to backfire with full luck. Currently it equals 1%. You can modify this.

LOW_HEALTH_RATE = 0.25 # Threshold for low health for AI planning. This is a 25% threshold.

NAME_DELIMITER = '_' # The character used to separate names from versions

MESSAGE_LINES = 3 # The number of lines text boxes have

EMOTION_COUNT = 3 # Default number of emotions for face sprite sheets

BATTLE_EMOTE_COUNT = 4 # Number of emotions for battle faces

FACE_COUNT = 6 # The number of faces that can be onscreen. This too, is really exciting!

FACE_TONE = true # Controls whether screen tones affect face sprites

UNIT_TONE_PERCENT = 50 # Controls the degree to which tone affects units

GENERIC_FACES = true # Determines if generic units have face sprites. This is for the images that you'd normally see for generic enemies in the GBA games.

STATUS_FACE_SIZE = [80, 72] # The size in pixels of faces on the status screen

MINI_FACE_SIZE = [32, 32] # The size in pixels of faces on unit info

BATTLE_FACE_SIZE = [106, 28] # The size in pixels of faces in battle

EYES_FACE_SIZE = [32, 16] # The size in pixels of the eyes block

MOUTH_FACE_SIZE = [32, 16] # The size in pixels of the mouth block
^ALL OF THOSE OPTIONS ARE WAY AWESOME!

SCREEN_WIDTH = 320 # The width of the screen
SCREEN_HEIGHT = 192 # The height of the screen
###SCREEN_WIDTH = 40*16 # The width of the screen
###SCREEN_HEIGHT = 25*16 # The height of the screen
MAX_SCROLL_SPEED = 64 # the most the screen can scroll in pixels per frame

^Set the default size of the game window, then use the zoom feature to modify the zoom further! :O

WEAPON_TYPE_NAMES = ['', 'Sword', 'Lance', 'Axe', 'Bow',
'Fire', 'Thund', 'Wind', 'Light', 'Dark', 'Staff']
Guns instead of Bows, anyone?

DEFAULT_SETTINGS = {
'zoom' => 3,
'frame rate' => 60,
'xp input' => 1,

See that zoom option on line 78? That does NOT affect playtesting, only the actual game file when zipped.

Go to line 136.

# Sets up game zoom
$zoom = (($DEBUG and !$BTEST) ? 3 : settings['zoom'])

Edit that number (I set mine to three, obviously) to something between 1 and 4, preferably. Any bigger and you'd better have a movie theater for a PC screen!
How to recolor units!:

So you want to recolor your units like I have done with Jessica right?

(Note that it is a WIP)

Go to "Recolor List EX" in the scripts section. There, you can easily recolor units. But how is this done?

Open up a new paint image. Go to the edit colors option, and there you will be able to select any hue of colors that you wish. Let's say I choose the color green, like for Jessica's pants.





See the Red Green and Blue box in the second image? Those are the values you need for whatever color you select. Let's look into that Recolor List EX script now.

Code:
COUNTRY_COLORS = {
    'Bern' => {
        :main1 => [56, 16, 128], # Main color
        :main2 => [80, 32, 160],
        :main3 => [112, 48, 184],
        :main4 => [160, 72, 248],
        :main5 => [208, 144, 224],
        :main6 => [232, 216, 248],
        :scnd1 => [112, 80, 32], # Secondary
        :scnd2 => [200, 152, 32],
        :scnd3 => [248, 216, 56],
        :scnd4 => [248, 240, 136],
        :tert1 => [80, 88, 96], # Tertiary
        :tert2 => [136, 144, 144],
        :tert3 => [192, 200, 200],
        :hair1 => [176, 96, 16], # Hair
        :hair2 => [232, 160, 48],
        :hair3 => [248, 192, 112],
        :flap1 => [184, 144, 32], # General flap/Paladin shield
        :drag1 => [104, 64, 40], # Dragon
        :drag2 => [184, 112, 48],
        :drag3 => [224, 168, 80],
        :drag4 => [232, 208, 152],
        :trim1 => [144, 80, 16], # Trim for Sorc/Wizard/etc
        :trim2 => [240, 160, 48],
        :trim3 => [248, 240, 48],

This is what you'll need to edit. All those random numbers are RGB. (Red Green Blue) in that order. Note that what I'm referring to now is the country colors. Whenever you fight a unit that has Bern in the name, their units will all be colored this color by default.

Cool huh?

What about individual characters? Let's use Pent as an example.
Code:
    when '40_0' # Male Mage
      case name
      when 'Pent'
        case color
        when 0; return [80, 48, 120] # Cloak
        when 1; return [136, 88, 192]
        when 2; return [208, 176, 240]
        when 3; return [112, 112, 176] # Shirt
        when 4; return [168, 184, 224]
        when 5; return [200, 224, 232]
        when 6; return [144, 152, 168] # Pants
        when 7; return [224, 224, 232]
        when 8; return [104, 104, 200] # Hair
        when 9; return [160, 192, 248]
        end
        when 'Jessica'
        case color
        when 0; return [0, 0, 98] # Cloak
        when 1; return [0, 0, 119]
        when 2; return [0, 0, 204]
        when 3; return [255, 255, 0] # Shirt
        when 4; return [200, 200, 0]
        when 5; return [111, 224, 12]
        when 6; return [77, 224, 24] # Pants
        when 7; return [20, 231, 47]
        when 8; return [0, 0, 160] # Hair
        when 9; return [0, 0, 125]
        end

You can compare Pent to Jessica like so. Pent has a grayish pallette, Jessica's is (currently) Green and Blue. (I will be removing the green because... it looks like crap... >.>)

All you have to do to edit a unit's pallette is follow the easy outlines above and read Bwd's instructions carefully, and modify as desired! Simple!

http://klokreations.forumotion.com

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum