The 3rd Age

Battle for the Galaxy

Battle for the Galaxy

Battle for the Galaxy seeks to change the land of Middle-earth into the vast Star Wars Galaxy.

Button for The 3rd AgeButton for The Dwarf HoldsButton for The Elven AllianceButton for Helm's Deep Last HopeButton for GothmogtheOrcButton for BFME+Button for The Four AgesButton for HDR HeadquartersButton for Middle Earth CenterButton for Project Perfect Mod

Become an affiliate!

   

Quick Lists

Top Rated Popular New Updated Last Comments Users

Register and log in to move these advertisements down

Beginner INI for Units

No Avatar

gonfidel

Category: Code
Level: Beginner
Created: Monday June 18, 2012 - 23:25
Updated: Tuesday February 12, 2013 - 20:26
Views: 15126
Summary: Understanding Basic Parts to an Object

Rating

Staff says

2.0

Members say

-

Average

2.0/5.0

1 vote

Page 1 2 3 4
And Last but not Least Modules. Modules are used to set unit health, add/remove timers, set the model and skin used as well as its animations, enable use of special ability, and set the amount of units in a horde, as well as their positions, makes a building gain resources, and even renders the unit invisible when still, like rangers, or mirkwood archers.

The first module I will show you is a health module.
              
Code

    Body = RespawnBody ModuleTag_RespawnBody ;RespawnBody is a catagory of module, and ModuleTag_RespawnBody is a name thought of by yourself
        CheerRadius             = EMOTION_CHEER_RADIUS
        MaxHealth         = ARAGORN_HEALTH ;
        PermanentlyKilledByFilter    = NONE        ;Who kills me permanently?
        DodgePercent         = HERO_DODGE_PERCENT    ;    
    End


The Statement Body, requires an end because it has sub-categories.
The Variable ARAGORN_HEALTH can be edited manually by typing in your own numbers like so
              
Code

    Body = RespawnBody ModuleTag_RespawnBody ;RespawnBody is a catagory of module, and ModuleTag_RespawnBody is a name thought of by yourself
        CheerRadius             = EMOTION_CHEER_RADIUS
        MaxHealth         = 19523
        PermanentlyKilledByFilter    = NONE        ;Who kills me permanently?
        DodgePercent         = HERO_DODGE_PERCENT    ;    
    End


This module is being written as it were in a mod though, when using modules in a map.ini file, you must us one of these 3 statements, AddModule, ReplaceModule, RemoveModule.

Since Aragorn already has a health module, if we would like to change his health in a map.ini we will have to replace module like so...
              
Code

ReplaceModule ModuleTag_RespawnBody ; Which Module are we replacing that already exists?
    Body = RespawnBody ModuleTag_NewRespawnBody ; This will be the new name of the module
        CheerRadius             = EMOTION_CHEER_RADIUS
        MaxHealth         = 19523
        PermanentlyKilledByFilter    = NONE        ;Who kills me permanently?
        DodgePercent         = HERO_DODGE_PERCENT    ;    
    End ; end body
End ; end ReplaceModule


When using AddModule, or ReplaceModule, you must have an end statement for the body/behavior and the ReplaceModule or AddModule.
(eg.)
              
Code

Object GondorAragorn

    ReplaceModule ModuleTag_RespawnUpdate
    Behavior = RespawnUpdate ModuleTag_NewRespawnUpdate
        DeathAnim                = DYING                ;Model condition to play when killed-to-respawn
        DeathFX                = FX_AragornDieToRespawn     ;FXList to play when killed-to-respawn
        DeathAnimationTime        = 3933                ;How long DeathAnim will take.
        InitialSpawnFX            = FX_AragornInitialSpawn    ;FXList to play when respawning.
        RespawnAnim                = LEVELED                ;Animation to play when respawning.
        RespawnFX                = FX_ResurrectionAragorn    ;FXList to play when respawning.
        RespawnAnimationTime        = 2000                ;Time it takes for respawn to play.
        AutoRespawnAtObjectFilter    = NONE +CASTLE_KEEP        ;Respawn at this location -- and at it's exit production point if possible.
        ButtonImage                = HIAragorn_res
        
        ;RespawnEntries determine the ruleset for how a character can be revived. Some units may automatically respawn, others
        ;may require a specific revive action performed on him. You can specify different values for each level... or use Level:Any
        RespawnRules =    AutoSpawn:No        Cost:10000        Time:60000        Health:100%        ;DEFAULT VALUES
        RespawnEntry =    Level:2                Cost:10000        Time:60000;60 seconds                    ; ;50% cost, 1x buildtime ;For other levels, only override what is different.
        RespawnEntry =    Level:3                Cost:10000        Time:60000;60 seconds
        RespawnEntry =    Level:4                Cost:10000        Time:60000;60 seconds
        RespawnEntry =    Level:5                Cost:10000        Time:120000;120 seconds                    ; ;65% cost, 2x buildtime
        RespawnEntry =    Level:6                Cost:10000        Time:120000;120 seconds
        RespawnEntry =    Level:7                Cost:10000        Time:120000;120 seconds
        RespawnEntry =    Level:8                Cost:10000        Time:180000 ;180 seconds                ; ;80% cost, 3x buildtime
        RespawnEntry =    Level:9                Cost:10000        Time:180000 ;180 seconds
        RespawnEntry =    Level:10            Cost:10000        Time:180000 ;180 seconds
    End; EndBehavior
    End; End ReplaceModule
End; End GondorAragorn



This Will change the respawn cost of aragorn to 10000 resources whenever you would like to rebuild him.
The time is measured in milliseconds(1/1000 of a second).

If you have any questions feel free to post, or PM me.

Comments

Display order: Newest first

Amonrath - Monday August 14, 2017 - 2:40

Hello, I'm a bit confused. Let's say I just wanted to make Heroes in general stronger. How would I do that? I change the armor values and health values of aragorn. But in game, they don't change at all. What should I do?

Go to top

 

"One site to rule them all, one site to find them,
one site to host them all, and on the network bind them."

 
8:37:48