Announcement

Collapse
No announcement yet.

DESIGN: Changing the units.txt layout

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

  • #16
    Originally posted by Gilgamensch
    The file by Fin Fahey is only partially 'useful'. Some files are covered some others aren't.

    And Access is even less known as Excel or similar.
    Yes, and it's for CtP1 too. But it can be modified and expanded if one would be interested in using it.

    It is just an example of something that DOES work. There are many others I'm sure.

    The reason why I suggested to move to csv is, that a lot of programs alow import/export of csv without any problem. CSV was/is a 'standard' transfer format, even for databases.
    It's not standard for 90% of PC users. CSV is non-standard for normal PC users, and a pain to edit unless you have a database program, which again, a lot of people don't.

    If you work in IT or related business you'll have no problems with it (assuming you're willing to use such software, which I for one am not, or only as an addition to curent system) but the strength of the CtP series is exactly that the majority of modmakers doesn't and is still capable of editing the game in amazing ways.

    Yes you can, but that would ultimitvly restrict it only to excel.
    Well, you're the one who's so keen on using Excel But if you want to make it useful for all programs, simply code it in PHP or some other external scripting language. But most database programs I've worked with (which granted aren't terribly large in number) can handle custom-formats fairly easily, so they wouldn't need it.

    don't really agree, have you ever tried to find units with certain values/restrictions ? Like which units are ignoring ZOC?
    That's really fairly easy, if you have a decent text editor and know how to use it. Doing that in Excel requires more extensive knowledge of the program than most Excel users I know have (and I'm not even counting the people who don't know Excel at all).

    I think everyone can learn in 2 minutes (even if via help) how to import/export a csv-file. So that sounds a bit off.
    It's not just the import, it's using a spreadsheet or database program. You're assuming everyone who uses PCs is as experienced as you are, which I can assure you is not the case. One simple example: my mom has worked with Excel every day for the past 3 years at least (probably longer) and followed several courses before she started to use it, but a simple thing such as sorting a row or column in alphabetical order I have to explain to her again and again every time she needs to do it. My dad and most of my mom's collegues are even worse. As simple as the tasks you describe are to you and me, for plenty of people they're pretty darn complicated...

    Modmaking should have a low threshold, which non-standard file formats and complicated editors such as your CSV and Excel combo and also e.g. Civ3 formats don't offer. There's a good reason why CtP2 is superior to that game (more than one actually ) and I'd like to keep it that way.

    CSV would not prevent people from being able to modify it with a text-editor.
    I'm sorry, but THIS:

    ##_UNIT_0;UNIT_ABOLITIONIST;{;Description;DESCRIPT
    ION_UNIT_ABOLITIONIST;DefaultIcon;ICON_UNIT_ABOLIT
    IONIST;DefaultSprite;SPRITE_ABOLITIONIST;Category;
    ;UNIT_CATEGORY_SPECIAL;Attack;0;Defense;10;ZBRange
    Attack;0;Firepower;1;Armor;1;MaxHP;10;ShieldCost;5
    40;PowerPoints;250;ShieldHunger;5;FoodHunger;0;Max
    MovePoints;300;VisionRange;1;EnableAdvance;ADVANCE
    _CLASSICAL_EDUCATION;ActiveDefenseRange;0;LossMove
    ToDmgNone;MaxFuel;0;IgnoreZOC;NoZoc;CanBeExpelled;
    CantCaptureCity;NoSlaves;IsSpecialForces;Civilian;
    SoundSelect1;SOUND_SELECT1_ABOLITIONIST;SoundSelec
    t2;SOUND_SELECT2_ABOLITIONIST;SoundMove;SOUND_MOVE
    _ABOLITIONIST;SoundAcknowledge;SOUND_ACKNOWLEDGE_A
    BOLITIONIST;SoundCantMove;SOUND_CANTMOVE_ABOLITION
    IST;SoundAttack;SOUND_ATTACK_ABOLITIONIST;SoundWor
    k;SOUND_WORK_ABOLITIONIST;SoundVictory;SOUND_VICTO
    RY_ABOLITIONIST;SoundDeath;SOUND_DEATH_ABOLITIONIS
    T;CanSee:;Standard;CanSee:;Stealth;MovementType:;L
    and;MovementType:;Mountain;Size:;Small;VisionClass
    :;Stealth;SlaveUprising;{;;;;Sound;SOUND_ID_SLAVE_
    UPRISING;;;;Effect;SPECEFFECT_SLAVE_UPRISING;};Und
    ergroundRailway;{;;;;Chance;0.75;;;;DeathChance;0. 5;;;;Sound;SOUND_ID_UNDERGROUND_RAILWAY;;;;Effect;
    SPECEFFECT_UNDERGROUND_RAILWAY;};};;
    is NOT reasonably editable in a text file. Especially not if you multiply that by 200, for every unit in the game.


    Don't get me wrong, I can certainly see the added value of a powerful database program to manage all that data and if the option was there, I would use it myself. But it should never be at the expense of more basic methods.
    Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

    Comment


    • #17
      My dad and most of my mom's collegues are even worse.
      This sounds scary!!!!!!!!!! Are we so advanced or ahm.........

      CSV is non-standard for normal PC users, and a pain to edit unless you have a database program, which again, a lot of people don't.
      Are we here really normal PC-users ?


      but the strength of the CtP series is exactly that the majority of modmakers doesn't and is still capable of editing the game in amazing ways.
      This wouldn't change.

      That's really fairly easy, if you have a decent text editor and know how to use it
      is NOT reasonably editable in a text file
      Contradiction in it's own ? If you have a decent text editor it doesn't matter how the file is structured. So this is a point against your opinion.
      Also the: if you know how to use it.

      Especially not if you multiply that by 200
      Why you think I thought of having it in csv. It wouldn't matter. If you want to modify 200 units to balance them better, it will be hell of a job to scroll all the time up and down to check & balance values. Like with the Armor values...............

      The only difference I am kind of proposing is to change it from vertical to horizontal, so where is the difference for modders? Or you never learned how to read a LINE ?

      OK, another thing what would be changed is that unused fields would be filled in (extra comma).

      CSV and Excel combo
      CSV not EXCEL. Excel is a tool to create CSV, like your favourite text-editor.......Jesus..............

      Comment


      • #18
        The only difference I am kind of proposing is to change it from vertical to horizontal, so where is the difference for modders? Or you never learned how to read a LINE ?
        Okay, let's put it this way: if you don't have Excel or whatever, in which of these two sections is it easier to see what the movement types of these 5 units are (sorry, the first isn't exactly CSV because I couldn't be arsed to convert it fully, but it's close enough):

        ## UNIT 0,UNIT_ABOLITIONIST {, Description DESCRIPTION_UNIT_ABOLITIONIST, DefaultIcon ICON_UNIT_ABOLITIONIST, DefaultSprite SPRITE_ABOLITIONIST, Category UNIT_CATEGORY_SPECIAL, Attack 0, Defense 10, ZBRangeAttack 0, Firepower 1, Armor 1, MaxHP 10, ShieldCost 540, PowerPoints 250, ShieldHunger 5, FoodHunger 0, MaxMovePoints 300, VisionRange 1, EnableAdvance ADVANCE_CLASSICAL_EDUCATION, ActiveDefenseRange 0, LossMoveToDmgNone, MaxFuel 0, IgnoreZOC, NoZoc, CanBeExpelled, CantCaptureCity, NoSlaves, IsSpecialForces, Civilian, SoundSelect1 SOUND_SELECT1_ABOLITIONIST, SoundSelect2 SOUND_SELECT2_ABOLITIONIST, SoundMove SOUND_MOVE_ABOLITIONIST, SoundAcknowledge SOUND_ACKNOWLEDGE_ABOLITIONIST, SoundCantMove SOUND_CANTMOVE_ABOLITIONIST, SoundAttack SOUND_ATTACK_ABOLITIONIST, SoundWork SOUND_WORK_ABOLITIONIST, SoundVictory SOUND_VICTORY_ABOLITIONIST, SoundDeath SOUND_DEATH_ABOLITIONIST,, CanSee: Standard, CanSee: Stealth, MovementType: Land, MovementType: Mountain, Size: Small, VisionClass: Stealth,, SlaveUprising {, Sound SOUND_ID_SLAVE_UPRISING, Effect SPECEFFECT_SLAVE_UPRISING, },, UndergroundRailway {, Chance 0.75, DeathChance 0.5, Sound SOUND_ID_UNDERGROUND_RAILWAY, Effect SPECEFFECT_UNDERGROUND_RAILWAY, },},,############################################# ###############,,##
        UNIT 1,UNIT_AIRCRAFT_CARRIER {, Description DESCRIPTION_UNIT_AIRCRAFT_CARRIER, DefaultIcon ICON_UNIT_AIRCRAFT_CARRIER, DefaultSprite SPRITE_AIRCRAFT_CARRIER, Category UNIT_CATEGORY_NAVAL, Attack 25, Defense 30, ZBRangeAttack 25, Firepower 1, Armor 1, MaxHP 10, ShieldCost 3000, PowerPoints 3000, ShieldHunger 30, FoodHunger 0, MaxMovePoints 400, VisionRange 3, EnableAdvance ADVANCE_NAVAL_AVIATION, BombRounds 10, BombardRange 1, ActiveDefenseRange 1, ActiveDefenseOnlyWhenCarryingEnablers, LossMoveToDmgNone, MaxFuel 0, CanExpel, CanPillage, CanPirate, CantCaptureCity, ExertsMartialLaw, DeathEffectsHappy, Explodes, SoundSelect1 SOUND_SELECT1_AIRCRAFT_CARRIER, SoundSelect2 SOUND_SELECT2_AIRCRAFT_CARRIER, SoundMove SOUND_MOVE_AIRCRAFT_CARRIER, SoundAcknowledge SOUND_ACKNOWLEDGE_AIRCRAFT_CARRIER, SoundCantMove SOUND_CANTMOVE_AIRCRAFT_CARRIER, SoundAttack SOUND_ATTACK_AIRCRAFT_CARRIER, SoundWork SOUND_WORK_AIRCRAFT_CARRIER, SoundVictory SOUND_VICTORY_AIRCRAFT_CARRIER, SoundDeath SOUND_DEATH_AIRCRAFT_CARRIER,, CanAttack: Sea, CanAttack: ShallowWater, CanCarry: MedAir, CanCarry: SmallAir, CanSee: Standard, Defend: Air, MovementType: Sea, MovementType: ShallowWater, Size: Large, VisionClass: Standard,, CanReform {, Sound SOUND_ID_REFORM_CITY, Effect SPECEFFECT_REFORMCITY, },, CargoData {, MaxCargo 5, Load SOUND_ID_AIRCRAFT_CARRIER_LOAD, Unload SOUND_ID_AIRCRAFT_CARRIER_UNLOAD, },},,############################################# ###############,,##
        UNIT 2,UNIT_ARCHER {, Description DESCRIPTION_UNIT_ARCHER, DefaultIcon ICON_UNIT_ARCHER, DefaultSprite SPRITE_ARCHER, Category UNIT_CATEGORY_RANGED, Attack 10, Defense 10, ZBRangeAttack 20, Firepower 1, Armor 1, MaxHP 10, ShieldCost 150, PowerPoints 100, ShieldHunger 1, FoodHunger 0, MaxMovePoints 100, VisionRange 2, EnableAdvance ADVANCE_BALLISTICS, ObsoleteAdvance ADVANCE_CANNON_MAKING, ActiveDefenseRange 0, LossMoveToDmgNone, MaxFuel 0, CanEntrench, CanExpel, CanPillage, CanPirate, ExertsMartialLaw, DeathEffectsHappy, SoundSelect1 SOUND_SELECT1_ARCHER, SoundSelect2 SOUND_SELECT2_ARCHER, SoundMove SOUND_MOVE_ARCHER, SoundAcknowledge SOUND_ACKNOWLEDGE_ARCHER, SoundCantMove SOUND_CANTMOVE_ARCHER, SoundAttack SOUND_ATTACK_ARCHER, SoundWork SOUND_WORK_ARCHER, SoundVictory SOUND_VICTORY_ARCHER, SoundDeath SOUND_DEATH_ARCHER,, CanAttack: Land, CanAttack: Mountain, CanSee: Standard, MovementType: Land, MovementType: Mountain, Size: Small, VisionClass: Standard,, CanReform {, Sound SOUND_ID_REFORM_CITY, Effect SPECEFFECT_REFORMCITY, },},,############################################# ###############,,##
        UNIT 3,UNIT_ARTILLERY {, Description DESCRIPTION_UNIT_ARTILLERY, DefaultIcon ICON_UNIT_ARTILLERY, DefaultSprite SPRITE_ARTILLERY, Category UNIT_CATEGORY_RANGED, Attack 10, Defense 20, ZBRangeAttack 70, Firepower 3, Armor 2, MaxHP 10, ShieldCost 1500, PowerPoints 1200, ShieldHunger 15, FoodHunger 0, MaxMovePoints 200, VisionRange 2, EnableAdvance ADVANCE_EXPLOSIVES, BombRounds 5, BombardRange 1, ActiveDefenseRange 0, LossMoveToDmgNone, MaxFuel 0, CanEntrench, CanExpel, CanPillage, CanPirate, ExertsMartialLaw, DeathEffectsHappy, Explodes, SoundSelect1 SOUND_SELECT1_ARTILLERY, SoundSelect2 SOUND_SELECT2_ARTILLERY, SoundMove SOUND_MOVE_ARTILLERY, SoundAcknowledge SOUND_ACKNOWLEDGE_ARTILLERY, SoundCantMove SOUND_CANTMOVE_ARTILLERY, SoundAttack SOUND_ATTACK_ARTILLERY, SoundWork SOUND_WORK_ARTILLERY, SoundVictory SOUND_VICTORY_ARTILLERY, SoundDeath SOUND_DEATH_ARTILLERY,, CanAttack: Air, CanAttack: Land, CanAttack: Mountain, CanBombard: Land, CanBombard: Mountain, CanBombard: Water, CanSee: Standard, MovementType: Land, MovementType: Mountain, Size: Medium, VisionClass: Standard,, CanReform {, Sound SOUND_ID_REFORM_CITY, Effect SPECEFFECT_REFORMCITY, },},,############################################# ###############,,##
        UNIT 4,UNIT_BATTLESHIP {, Description DESCRIPTION_UNIT_BATTLESHIP, DefaultIcon ICON_UNIT_BATTLESHIP, DefaultSprite SPRITE_BATTLESHIP, Category UNIT_CATEGORY_NAVAL, Attack 60, Defense 50, ZBRangeAttack 60, Firepower 4, Armor 3, MaxHP 10, ShieldCost 3500, PowerPoints 2000, ShieldHunger 35, FoodHunger 0, MaxMovePoints 500, VisionRange 3, EnableAdvance ADVANCE_ADV_NAVAL_TACTICS, BombRounds 5, BombardRange 1, ActiveDefenseRange 0, LossMoveToDmgNone, MaxFuel 0, CanExpel, CanPillage, CanPirate, CantCaptureCity, ExertsMartialLaw, DeathEffectsHappy, Explodes, SoundSelect1 SOUND_SELECT1_BATTLESHIP, SoundSelect2 SOUND_SELECT2_BATTLESHIP, SoundMove SOUND_MOVE_BATTLESHIP, SoundAcknowledge SOUND_ACKNOWLEDGE_BATTLESHIP, SoundCantMove SOUND_CANTMOVE_BATTLESHIP, SoundAttack SOUND_ATTACK_BATTLESHIP, SoundWork SOUND_WORK_BATTLESHIP, SoundVictory SOUND_VICTORY_BATTLESHIP, SoundDeath SOUND_DEATH_BATTLESHIP,, CanAttack: Sea, CanAttack: ShallowWater, CanBombard: Land, CanBombard: Mountain, CanBombard: Water, CanSee: Standard, MovementType: Sea, MovementType: ShallowWater, Size: Large, VisionClass: Standard,, CanReform {, Sound SOUND_ID_REFORM_CITY, Effect SPECEFFECT_REFORMCITY, },},,############################################# ###############,,##
        UNIT 5,UNIT_BOMBER {, Description DESCRIPTION_UNIT_BOMBER, DefaultIcon ICON_UNIT_BOMBER, DefaultSprite SPRITE_BOMBER, Category UNIT_CATEGORY_AERIAL, Attack 30, Defense 30, ZBRangeAttack 60, Firepower 3, Armor 2, MaxHP 10, ShieldCost 2250, PowerPoints 3000, ShieldHunger 22, FoodHunger 0, MaxMovePoints 1000, VisionRange 2, EnableAdvance ADVANCE_JET_PROPULSION, ObsoleteAdvance ADVANCE_ADVANCED_COMPOSITES, BombRounds 5, BombardRange 1, ActiveDefenseRange 0, LossMoveToDmgNone, NoFuelThenCrash, MaxFuel 5000, IgnoreZOC, NoZoc, CantCaptureCity, DeathEffectsHappy, Explodes, SoundSelect1 SOUND_SELECT1_BOMBER, SoundSelect2 SOUND_SELECT2_BOMBER, SoundMove SOUND_MOVE_BOMBER, SoundAcknowledge SOUND_ACKNOWLEDGE_BOMBER, SoundCantMove SOUND_CANTMOVE_BOMBER, SoundAttack SOUND_ATTACK_BOMBER, SoundWork SOUND_WORK_BOMBER, SoundVictory SOUND_VICTORY_BOMBER, SoundDeath SOUND_DEATH_BOMBER,, CanAttack: Air, CanAttack: Land, CanAttack: Mountain, CanAttack: Sea, CanAttack: ShallowWater, CanBombard: Land, CanBombard: Mountain, CanBombard: Water, CanCarry: SmallAir, CanSee: Standard, MovementType: Air, Size: Medium, VisionClass: Standard,, CargoData {, MaxCargo 1, Load SOUND_ID_BOMBER_LOAD, Unload SOUND_ID_BOMBER_UNLOAD, },},
        or

        ## UNIT 0
        UNIT_ABOLITIONIST {
        Description DESCRIPTION_UNIT_ABOLITIONIST
        DefaultIcon ICON_UNIT_ABOLITIONIST
        DefaultSprite SPRITE_ABOLITIONIST
        Category UNIT_CATEGORY_SPECIAL
        Attack 0
        Defense 10
        ZBRangeAttack 0
        Firepower 1
        Armor 1
        MaxHP 10
        ShieldCost 540
        PowerPoints 250
        ShieldHunger 5
        FoodHunger 0
        MaxMovePoints 300
        VisionRange 1
        EnableAdvance ADVANCE_CLASSICAL_EDUCATION
        ActiveDefenseRange 0
        LossMoveToDmgNone
        MaxFuel 0
        IgnoreZOC
        NoZoc
        CanBeExpelled
        CantCaptureCity
        NoSlaves
        IsSpecialForces
        Civilian
        SoundSelect1 SOUND_SELECT1_ABOLITIONIST
        SoundSelect2 SOUND_SELECT2_ABOLITIONIST
        SoundMove SOUND_MOVE_ABOLITIONIST
        SoundAcknowledge SOUND_ACKNOWLEDGE_ABOLITIONIST
        SoundCantMove SOUND_CANTMOVE_ABOLITIONIST
        SoundAttack SOUND_ATTACK_ABOLITIONIST
        SoundWork SOUND_WORK_ABOLITIONIST
        SoundVictory SOUND_VICTORY_ABOLITIONIST
        SoundDeath SOUND_DEATH_ABOLITIONIST

        CanSee: Standard
        CanSee: Stealth
        MovementType: Land
        MovementType: Mountain
        Size: Small
        VisionClass: Stealth

        SlaveUprising {
        Sound SOUND_ID_SLAVE_UPRISING
        Effect SPECEFFECT_SLAVE_UPRISING
        }

        UndergroundRailway {
        Chance 0.75
        DeathChance 0.5
        Sound SOUND_ID_UNDERGROUND_RAILWAY
        Effect SPECEFFECT_UNDERGROUND_RAILWAY
        }
        }

        ################################################## ##########

        ## UNIT 1
        UNIT_AIRCRAFT_CARRIER {
        Description DESCRIPTION_UNIT_AIRCRAFT_CARRIER
        DefaultIcon ICON_UNIT_AIRCRAFT_CARRIER
        DefaultSprite SPRITE_AIRCRAFT_CARRIER
        Category UNIT_CATEGORY_NAVAL
        Attack 25
        Defense 30
        ZBRangeAttack 25
        Firepower 1
        Armor 1
        MaxHP 10
        ShieldCost 3000
        PowerPoints 3000
        ShieldHunger 30
        FoodHunger 0
        MaxMovePoints 400
        VisionRange 3
        EnableAdvance ADVANCE_NAVAL_AVIATION
        BombRounds 10
        BombardRange 1
        ActiveDefenseRange 1
        ActiveDefenseOnlyWhenCarryingEnablers
        LossMoveToDmgNone
        MaxFuel 0
        CanExpel
        CanPillage
        CanPirate
        CantCaptureCity
        ExertsMartialLaw
        DeathEffectsHappy
        Explodes
        SoundSelect1 SOUND_SELECT1_AIRCRAFT_CARRIER
        SoundSelect2 SOUND_SELECT2_AIRCRAFT_CARRIER
        SoundMove SOUND_MOVE_AIRCRAFT_CARRIER
        SoundAcknowledge SOUND_ACKNOWLEDGE_AIRCRAFT_CARRIER
        SoundCantMove SOUND_CANTMOVE_AIRCRAFT_CARRIER
        SoundAttack SOUND_ATTACK_AIRCRAFT_CARRIER
        SoundWork SOUND_WORK_AIRCRAFT_CARRIER
        SoundVictory SOUND_VICTORY_AIRCRAFT_CARRIER
        SoundDeath SOUND_DEATH_AIRCRAFT_CARRIER

        CanAttack: Sea
        CanAttack: ShallowWater
        CanCarry: MedAir
        CanCarry: SmallAir
        CanSee: Standard
        Defend: Air
        MovementType: Sea
        MovementType: ShallowWater
        Size: Large
        VisionClass: Standard

        CanReform {
        Sound SOUND_ID_REFORM_CITY
        Effect SPECEFFECT_REFORMCITY
        }

        CargoData {
        MaxCargo 5
        Load SOUND_ID_AIRCRAFT_CARRIER_LOAD
        Unload SOUND_ID_AIRCRAFT_CARRIER_UNLOAD
        }
        }

        ################################################## ##########

        ## UNIT 2
        UNIT_ARCHER {
        Description DESCRIPTION_UNIT_ARCHER
        DefaultIcon ICON_UNIT_ARCHER
        DefaultSprite SPRITE_ARCHER
        Category UNIT_CATEGORY_RANGED
        Attack 10
        Defense 10
        ZBRangeAttack 20
        Firepower 1
        Armor 1
        MaxHP 10
        ShieldCost 150
        PowerPoints 100
        ShieldHunger 1
        FoodHunger 0
        MaxMovePoints 100
        VisionRange 2
        EnableAdvance ADVANCE_BALLISTICS
        ObsoleteAdvance ADVANCE_CANNON_MAKING
        ActiveDefenseRange 0
        LossMoveToDmgNone
        MaxFuel 0
        CanEntrench
        CanExpel
        CanPillage
        CanPirate
        ExertsMartialLaw
        DeathEffectsHappy
        SoundSelect1 SOUND_SELECT1_ARCHER
        SoundSelect2 SOUND_SELECT2_ARCHER
        SoundMove SOUND_MOVE_ARCHER
        SoundAcknowledge SOUND_ACKNOWLEDGE_ARCHER
        SoundCantMove SOUND_CANTMOVE_ARCHER
        SoundAttack SOUND_ATTACK_ARCHER
        SoundWork SOUND_WORK_ARCHER
        SoundVictory SOUND_VICTORY_ARCHER
        SoundDeath SOUND_DEATH_ARCHER

        CanAttack: Land
        CanAttack: Mountain
        CanSee: Standard
        MovementType: Land
        MovementType: Mountain
        Size: Small
        VisionClass: Standard

        CanReform {
        Sound SOUND_ID_REFORM_CITY
        Effect SPECEFFECT_REFORMCITY
        }
        }

        ################################################## ##########

        ## UNIT 3
        UNIT_ARTILLERY {
        Description DESCRIPTION_UNIT_ARTILLERY
        DefaultIcon ICON_UNIT_ARTILLERY
        DefaultSprite SPRITE_ARTILLERY
        Category UNIT_CATEGORY_RANGED
        Attack 10
        Defense 20
        ZBRangeAttack 70
        Firepower 3
        Armor 2
        MaxHP 10
        ShieldCost 1500
        PowerPoints 1200
        ShieldHunger 15
        FoodHunger 0
        MaxMovePoints 200
        VisionRange 2
        EnableAdvance ADVANCE_EXPLOSIVES
        BombRounds 5
        BombardRange 1
        ActiveDefenseRange 0
        LossMoveToDmgNone
        MaxFuel 0
        CanEntrench
        CanExpel
        CanPillage
        CanPirate
        ExertsMartialLaw
        DeathEffectsHappy
        Explodes
        SoundSelect1 SOUND_SELECT1_ARTILLERY
        SoundSelect2 SOUND_SELECT2_ARTILLERY
        SoundMove SOUND_MOVE_ARTILLERY
        SoundAcknowledge SOUND_ACKNOWLEDGE_ARTILLERY
        SoundCantMove SOUND_CANTMOVE_ARTILLERY
        SoundAttack SOUND_ATTACK_ARTILLERY
        SoundWork SOUND_WORK_ARTILLERY
        SoundVictory SOUND_VICTORY_ARTILLERY
        SoundDeath SOUND_DEATH_ARTILLERY

        CanAttack: Air
        CanAttack: Land
        CanAttack: Mountain
        CanBombard: Land
        CanBombard: Mountain
        CanBombard: Water
        CanSee: Standard
        MovementType: Land
        MovementType: Mountain
        Size: Medium
        VisionClass: Standard

        CanReform {
        Sound SOUND_ID_REFORM_CITY
        Effect SPECEFFECT_REFORMCITY
        }
        }

        ################################################## ##########

        ## UNIT 4
        UNIT_BATTLESHIP {
        Description DESCRIPTION_UNIT_BATTLESHIP
        DefaultIcon ICON_UNIT_BATTLESHIP
        DefaultSprite SPRITE_BATTLESHIP
        Category UNIT_CATEGORY_NAVAL
        Attack 60
        Defense 50
        ZBRangeAttack 60
        Firepower 4
        Armor 3
        MaxHP 10
        ShieldCost 3500
        PowerPoints 2000
        ShieldHunger 35
        FoodHunger 0
        MaxMovePoints 500
        VisionRange 3
        EnableAdvance ADVANCE_ADV_NAVAL_TACTICS
        BombRounds 5
        BombardRange 1
        ActiveDefenseRange 0
        LossMoveToDmgNone
        MaxFuel 0
        CanExpel
        CanPillage
        CanPirate
        CantCaptureCity
        ExertsMartialLaw
        DeathEffectsHappy
        Explodes
        SoundSelect1 SOUND_SELECT1_BATTLESHIP
        SoundSelect2 SOUND_SELECT2_BATTLESHIP
        SoundMove SOUND_MOVE_BATTLESHIP
        SoundAcknowledge SOUND_ACKNOWLEDGE_BATTLESHIP
        SoundCantMove SOUND_CANTMOVE_BATTLESHIP
        SoundAttack SOUND_ATTACK_BATTLESHIP
        SoundWork SOUND_WORK_BATTLESHIP
        SoundVictory SOUND_VICTORY_BATTLESHIP
        SoundDeath SOUND_DEATH_BATTLESHIP

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

        CanReform {
        Sound SOUND_ID_REFORM_CITY
        Effect SPECEFFECT_REFORMCITY
        }
        }

        ################################################## ##########

        ## UNIT 5
        UNIT_BOMBER {
        Description DESCRIPTION_UNIT_BOMBER
        DefaultIcon ICON_UNIT_BOMBER
        DefaultSprite SPRITE_BOMBER
        Category UNIT_CATEGORY_AERIAL
        Attack 30
        Defense 30
        ZBRangeAttack 60
        Firepower 3
        Armor 2
        MaxHP 10
        ShieldCost 2250
        PowerPoints 3000
        ShieldHunger 22
        FoodHunger 0
        MaxMovePoints 1000
        VisionRange 2
        EnableAdvance ADVANCE_JET_PROPULSION
        ObsoleteAdvance ADVANCE_ADVANCED_COMPOSITES
        BombRounds 5
        BombardRange 1
        ActiveDefenseRange 0
        LossMoveToDmgNone
        NoFuelThenCrash
        MaxFuel 5000
        IgnoreZOC
        NoZoc
        CantCaptureCity
        DeathEffectsHappy
        Explodes
        SoundSelect1 SOUND_SELECT1_BOMBER
        SoundSelect2 SOUND_SELECT2_BOMBER
        SoundMove SOUND_MOVE_BOMBER
        SoundAcknowledge SOUND_ACKNOWLEDGE_BOMBER
        SoundCantMove SOUND_CANTMOVE_BOMBER
        SoundAttack SOUND_ATTACK_BOMBER
        SoundWork SOUND_WORK_BOMBER
        SoundVictory SOUND_VICTORY_BOMBER
        SoundDeath SOUND_DEATH_BOMBER

        CanAttack: Air
        CanAttack: Land
        CanAttack: Mountain
        CanAttack: Sea
        CanAttack: ShallowWater
        CanBombard: Land
        CanBombard: Mountain
        CanBombard: Water
        CanCarry: SmallAir
        CanSee: Standard
        MovementType: Air
        Size: Medium
        VisionClass: Standard

        CargoData {
        MaxCargo 1
        Load SOUND_ID_BOMBER_LOAD
        Unload SOUND_ID_BOMBER_UNLOAD
        }
        }

        ################################################## ##########
        Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

        Comment


        • #19
          Shugar...........wrong key pressed.........

          OK, if you know your text-editor it doesn't really matter. For this somebody invented the search-function (Normally either F3 or CTRL-F) and you find it easily.

          So what?

          And taking your example:

          Now compare 10 units at the same time, what is easier? Importing it into Excel (or whatever) or scrolling through?

          Comment


          • #20
            Scrolling through... particularly when you can search for what you're looking for in a text editor.

            Comment


            • #21
              I'm not advocating such a change, but if you're going to change the text files into another format, then I would suggest that you use XML. That will be just as nice to look at - in fact I'm sure there are XML formatters around which can rearrange the content into your preffered scheme of indentation, etc. Also, XML should be well supported by just about anything you might want to import the data into (except possibly Excel...) and standard libraries are available for most programming languages (in particular we could use them in the CTP2 code itself).

              From writing CTPEd, I know that the present scheme is rather harder to parse naively than you might at first assume, but with the aid of a lexer generator (and even more so with the aid of a parser generator) it would be much easier. The biggest problem I encountered, however, is that there are a few files which do not fit into the general format, and CTPEd still doesn't support them for that reason. Standardising the format of those would be a very useful change.

              Comment


              • #22
                Gilg,

                Scrolling, no contest. I suspect you don't work with text files much...

                John,
                XML -- now that I could support
                Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                Comment


                • #23
                  J Bytheway,

                  Just checked
                  (except possibly Excel...)
                  No it does support it and it would be still readable for people like Locutus.

                  Standardising the format of those would be a very useful change.
                  That was another intention of mine as well.

                  Comment


                  • #24
                    I'd take a lot of convincing that we need to switch away from the existing set-up. For one thing:

                    Comment


                    • #25
                      Originally posted by Gilgamensch
                      OK, if you know your text-editor it doesn't really matter. For this somebody invented the search-function (Normally either F3 or CTRL-F) and you find it easily.
                      Year I have to use the search function to find something in the unit discription, instead of going through the entry and see oh that's there and finnally I added to my goods.txt comments and outcommented sections, so how do you preserve them with your format change?

                      Originally posted by Gilgamensch
                      Now compare 10 units at the same time, what is easier? Importing it into Excel (or whatever) or scrolling through?
                      And why you don't write a program that does the conversion forth and back for you?

                      And another thing you have to consider is that it is a lot of work to rewrite the existing parser then writing a program that does the forth and back conversion for.

                      And another note how do you convert something like this:

                      Code:
                      ## 42 ##########################################################
                      
                      TILEIMP_LAND_GOOD_TWO{
                         Icon ICON_GOOD_ARCTIC_MOUNTAIN_TWO
                         Tooltip TOOLTIP_TILEIMP_SELECT_FARM1_BUTTON
                         Statusbar STATUSBAR_TILEIMP_SELECT_TUNNEL_BUTTON
                         Sound SOUND_ID_ROAD_3
                         Level 4
                         Class:OceanATM
                         GLHidden
                      
                         ConstructionTiles 2
                         ConstructionTiles 2
                         ConstructionTiles 2
                      
                         CantBuildOn TERRAIN_WATER_BEACH
                         CantBuildOn TERRAIN_WATER_DEEP
                         CantBuildOn TERRAIN_WATER_KELP
                         CantBuildOn TERRAIN_WATER_REEF
                         CantBuildOn TERRAIN_WATER_RIFT
                         CantBuildOn TERRAIN_WATER_SHALLOW
                         CantBuildOn TERRAIN_WATER_SHELF
                         CantBuildOn TERRAIN_WATER_TRENCH
                         CantBuildOn TERRAIN_WATER_VOLCANO
                         CantBuildOn TERRAIN_TUNDRA #"????"
                         CantBuildOn TERRAIN_DEAD
                      
                         TerrainEffect {
                            Terrain TERRAIN_FOREST #"Bear"
                      
                            BonusFood 10
                            BonusGold 5
                            EnableAdvance ADVANCE_SUBNEURAL_ADS
                            ProductionCost 0
                            ProductionTime 10
                            TilesetIndex 2
                         }
                      
                        TerrainEffect {
                            Terrain TERRAIN_HILL #"Grapes"
                      
                            BonusFood 5
                            BonusGold 5
                            EnableAdvance ADVANCE_SUBNEURAL_ADS
                            ProductionCost 0
                            ProductionTime 10
                            TilesetIndex 2
                         }
                      
                        TerrainEffect {
                            Terrain TERRAIN_JUNGLE #"Jade"
                            Terrain TERRAIN_GRASSLAND #"Tobacco"
                      
                            BonusGold 10
                            EnableAdvance ADVANCE_SUBNEURAL_ADS
                            ProductionCost 0
                            ProductionTime 10
                            TilesetIndex 2
                         }
                      
                        TerrainEffect {
                            Terrain TERRAIN_SWAMP #"Rice"
                      
                            BonusFood 15
                            EnableAdvance ADVANCE_SUBNEURAL_ADS
                            ProductionCost 0
                            ProductionTime 10
                            TilesetIndex 2
                         }
                      
                        TerrainEffect {
                            Terrain TERRAIN_DESERT #"Oil"
                      
                            BonusProduction 15
                            BonusGold 10
                            EnableAdvance ADVANCE_SUBNEURAL_ADS
                            ProductionCost 0
                            ProductionTime 10
                            TilesetIndex 2
                         }
                      
                        TerrainEffect {
                            Terrain TERRAIN_PLAINS #"Elephant"
                      
                            BonusFood 20
                            BonusGold 10
                            EnableAdvance ADVANCE_SUBNEURAL_ADS
                            ProductionCost 0
                            ProductionTime 10
                            TilesetIndex 2
                         }
                      
                        TerrainEffect {
                            Terrain TERRAIN_WHITE_HILL #"Emeralds"
                            Terrain TERRAIN_MOUNTAIN #"Emeralds"
                      
                            BonusGold 15
                            EnableAdvance ADVANCE_SUBNEURAL_ADS
                            ProductionCost 0
                            ProductionTime 10
                            TilesetIndex 2
                         }
                      
                        TerrainEffect {
                            Terrain TERRAIN_WHITE_MOUNTAIN #"Diamonds"
                      
                            BonusGold 20
                            EnableAdvance ADVANCE_SUBNEURAL_ADS
                            ProductionCost 0
                            ProductionTime 10
                            TilesetIndex 2
                         }
                      
                        TerrainEffect {
                            Terrain TERRAIN_BROWN_HILL #"Silver"
                            Terrain TERRAIN_BROWN_MOUNTAIN #"Silver"
                      
                            BonusProduction 10
                            BonusGold 5
                            EnableAdvance ADVANCE_SUBNEURAL_ADS
                            ProductionCost 0
                            ProductionTime 10
                            TilesetIndex 2
                         }
                      
                        TerrainEffect {
                            Terrain TERRAIN_GLACIER #"Walrus"
                      
                            BonusFood 10
                            BonusProduction 5
                            EnableAdvance ADVANCE_SUBNEURAL_ADS
                            ProductionCost 0
                            ProductionTime 10
                            TilesetIndex 2
                         }
                      }
                      TerrainEffect is a free array you can have as much of them as terrains you have or even more, so how do you want to put it into your table?

                      Well finally a build in text file editor would be the solution, but that is rather near the bottom of our to do list.

                      -Martin
                      Civ2 military advisor: "No complaints, Sir!"

                      Comment


                      • #26
                        Re: DESIGN: Changing the units.txt layout

                        Originally posted by Gilgamensch
                        Hi all,

                        I was just trying to 'import' the units.txt-file into an excel-file to be able to have an easier overview over the different values. I did it because of the discussion in DESIGN: Armor and HP's. I must admit I am still having a headache to finish it.

                        My idea, which I would like to propose (and I would be willing to create it) is instead of having the till now structure in the units.txt file changing it to a more moder and user-friendly version, based on Excel.

                        So instead of really changing it by hand, we could do it via Excel. The changes for this to implement (me thinks) shall be easy.

                        The file shall be saved as csv, all entries ,even if empty would have a comma-delimiter, so making it easier to check afterwards. This would also allow to re-import into Excel, although I would suggest to have just one master-template (as I said I would be willing to create it, so that you would just select (like: Yes/no, or a value).


                        Your reason for the suggestion is good; your solution however is not. Using a 'tab' character to separate the value from the variable however would import into EXCEL very nicely with the variables in column A and the values in B, probably would not even break the file for the out-of-the-box game and still be editable in NOTEPAD.
                        ·Circuit·Boi·wannabe·
                        "Evil reptilian kitten-eater from another planet."
                        Call to Power 2 Source Code Project 2005.06.28 Apolyton Edition

                        Comment


                        • #27
                          Here are the excel formulas to get the result you want:

                          Import Units.txt into excel so that all the text from each line is in column A

                          put this formula in column B
                          =IF(ISERR(FIND(" ",TRIM(A1))),TRIM(A1),LEFT(TRIM(A1),FIND(" ",TRIM(A1))))

                          put this formula in column C
                          =IF(ISERR(FIND(" ",TRIM(A1))),"",MID(TRIM(A1),FIND(" ",TRIM(A1))+1,LEN(A1)))

                          QED.
                          ·Circuit·Boi·wannabe·
                          "Evil reptilian kitten-eater from another planet."
                          Call to Power 2 Source Code Project 2005.06.28 Apolyton Edition

                          Comment


                          • #28
                            Yup, the tab delimitated file works with the game with no problems, and imports into excel as two columns.
                            Attached Files
                            ·Circuit·Boi·wannabe·
                            "Evil reptilian kitten-eater from another planet."
                            Call to Power 2 Source Code Project 2005.06.28 Apolyton Edition

                            Comment


                            • #29
                              Originally posted by Flinx
                              Yup, the tab delimitated file works with the game with no problems, and imports into excel as two columns.
                              yup it works fine Flinx

                              Comment


                              • #30
                                It is not what I was really looking for.

                                I wanted to go a step further, than this. So can you can quickly sort it or modify it on a large scale. Not just having the two entries seperated.

                                Reason: easier to have an overview, easier to modify a lot of entries easily, easier to add new units, easier to compare, easier to sort.

                                Included is an xml-version, which you could import into like excel as well and is still usuable with a text-editor.



                                And Flinx: I was only getting errors with your formula.
                                Attached Files

                                Comment

                                Working...
                                X