Announcement

Collapse
No announcement yet.

Need help with mod prob

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need help with mod prob

    Hey

    I'm working on a mod for personal use and when I try and load the scenario I get this error message:

    units.txt:2061:Unknown token

    Line 2061 is the second line below: UNIT_IRONCLAD {

    I don't see anything wrong with that line or with the entire unit section. Anybody see anything I missed?

    ## UNIT 35
    UNIT_IRONCLAD {
    Description DESCRIPTION_UNIT_IRONCLAD
    DefaultIcon ICON_UNIT_IRONCLAD
    DefaultSprite SPRITE_IRONCLAD
    Category UNIT_CATEGORY_NAVAL
    Attack 40
    Defense 30
    ZBRangeAttack 40
    Firepower 3
    Armor 3
    MaxHP 10
    ShieldCost 500
    PowerPoints 100
    ShieldHunger 5
    FoodHunger 0
    MaxMovePoints 300
    VisionRange 1
    EnableAdvance ADVANCE_MODERN_METALLURGY
    ObsoleteAdvance ADVANCE_ADV_NAVAL_TACTICS
    BombRounds 5
    BombardRange 1
    ActiveDefenseRange 0
    LossMoveToDmgNone
    MaxFuel 0
    IgnoreZOC
    NoZoc
    CanPillage
    CanPirate
    CantCaptureCity
    ExertsMartialLaw
    DeathEffectsHappy
    Explodes
    IsFlanker
    SoundSelect1 SOUND_SELECT1_IRONCLAD
    SoundSelect2 SOUND_SELECT2_IRONCLAD
    SoundMove SOUND_MOVE_IRONCLAD
    SoundAcknowledge SOUND_ACKNOWLEDGE_IRONCLAD
    SoundCantMove SOUND_CANTMOVE_IRONCLAD
    SoundAttack SOUND_ATTACK_IRONCLAD
    SoundWork SOUND_WORK_IRONCLAD
    SoundVictory SOUND_VICTORY_IRONCLAD
    SoundDeath SOUND_DEATH_IRONCLAD

    CanAttack: Sea
    CanAttack: ShallowWater
    CanBombard: Water
    CanSee: Standard
    MovementType: Sea
    MovementType: ShallowWater
    Size: Large
    VisionClass: Underwater

    CanReform {
    Sound SOUND_ID_REFORM_CITY
    Effect SPECEFFECT_REFORMCITY
    }
    }


    Made a couple of changes, changed the vision class and added the IgnoreZOC and NoZoc tags and removed CanExpel. Oh yeah, also added IsFlanker but I did that with several other units also. I can't figure it out. Any help?

    Btw, have Diplomod installed and also have the PWSlic and Frenzy SLIC in this scenario.

    Thanks in advance

  • #2
    It actually souns like the problem lies in uniticon.txt. It may be that there is a spelling error in the ICON_UNIT_IRONCLAD line, so when the game looks for ICON_UNIT_IRONCLAD, it can't find it, hence it says "unknown token".
    I hope this helps

    Ben
    Concrete, Abstract, or Squoingy?
    "I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis

    Comment


    • #3
      Description isn't used in the game, so DESCRIPTION_UNIT_IRONCLAD probably doens't exist. Replace it with DESCRIPTION_UNIT_WARRIOR or whatever and the problem should go away...
      Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

      Comment


      • #4
        I think it is more likely that the entry for the previous unit wasn't properly closed with a }. In that case the game would think that UNIT_IRONCLAD is a flag for the unit coming before it. This sort of problems in units.txt often result from non-matching numbers of left { and right } brackets.

        Edit: or Locutus may be right. I hadn't noticed that yet.
        [This message has been edited by Paul (edited February 05, 2001).]

        Comment


        • #5
          DESCRIPTIONS are in place and the ironclad decription is there. The lines may not be used as such, but they are in junk_str.txt.

          According to strings.txt the stuff in junk_str.txt is needed for the executable.


          Concrete, Abstract, or Squoingy?
          "I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis

          Comment


          • #6
            Paul, you are correct. The previous unit was missing a "}" Thanks very much!

            Now I've gotta go search out all the other bugs...like how many times I spelled "Mountain" as "Moutain."

            Comment

            Working...
            X