1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

[R&F] Creating a new unit using existing animations, art, etc

Discussion in 'Mod Creation Help' started by Question, Mar 18, 2018.

  1. Question

    Question King

    Joined:
    Mar 12, 2008
    Messages:
    945
    Im trying to create more units for scouts to upgrade to as the gap between scout -> ranger -> spec ops is way too large.

    Using SQL I managd to insert all the existing gameplay data (or at least i think I did)...but I am not sure how to tell the game to use the existing scout art, icons, etc.

    So basically it will look exactly like the scout, but just with a different combat strength, etc.

    How do you tell the game to use the existing scout art, animations, etc for a new unit? Where is that defined? The create a new unit tutorial assumes you are making everything from scratch, and i am not doing that, i just want to tell the game to use the existing scout resources.

    Code:
    -- Explorer, Classical Scout
    
    INSERT OR REPLACE INTO Types (Type, Kind)
    VALUES    ('UNIT_EXPLORER', 'KIND_UNIT');
    
    INSERT OR REPLACE INTO UnitAiInfos (UnitType, AiType)
    VALUES    ('UNIT_EXPLORER', 'UNITAI_EXPLORE'),
    VALUES    ('UNIT_EXPLORER', 'UNITTYPE_LAND_COMBAT');
    
    
    INSERT OR REPLACE INTO TypeTags (Type, Tag)
    VALUES    ('UNIT_EXPLORER', 'CLASS_RECON'),
    VALUES    ('UNIT_EXPLORER', 'CLASS_REVEAL_STEALTH');
    
    INSERT OR REPLACE INTO Units (UnitType, Cost, BaseMoves, BaseSightRange, ZoneOfControl, Domain, Combat, FormationClass, PromotionClass, AdvisorType, Name, Description, PurchaseYield, PseudoYieldType)
    VALUES    ('UNIT_EXPLORER', '60', '2', '3', 'true', 'DOMAIN_LAND', '30', 'FORMATION_CLASS_LAND_COMBAT', 'PROMOTION_CLASS_RECON', 'ADVISOR_GENERIC', 'LOC_UNIT_EXPLORER_NAME', 'LOC_UNIT_EXPLORER_DESCRIPTION', 'YIELD_GOLD', 'PSEUDOYIELD_UNIT_EXPLORER');
    
    INSERT OR REPLACE INTO BaseGameText (Tag, Text)
    VALUES    ('LOC_UNITNAME_SUFFIX_EXPLORERS', 'Explorers'),
    VALUES    ('LOC_UNIT_EXPLORER_NAME', 'Explorer'),
    VALUES    ('LOC_UNIT_EXPLORER_DESCRIPTION', 'Fast-moving Classical era recon unit.');
    
    UPDATE UnitUpgrades
    SET    UpgradeUnit = UNIT_EXPLORER
    WHERE  UNIT  = 'UNIT_SCOUT';
     
  2. Zobtzler

    Zobtzler Chieftain

    Joined:
    Oct 21, 2017
    Messages:
    94
    Location:
    Sweden
    These tutorials are great to follow for when using existing models
    1, 2.
     

Share This Page