• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

unmerged(96727)

First Lieutenant
8 Badges
Apr 11, 2008
209
0
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Deus Vult
  • Europa Universalis III Complete
  • Hearts of Iron III
  • Heir to the Throne
  • Iron Cross
  • Victoria: Revolutions
FIXED - found the bug, put a comment tag at end of national_provinces section, in front of the closing '}'

Still would be good to have a scenario checker

=========
=========
Can anyone see a problem with this file? An inc scenario file.

I made some kind of change which made the game now not start. It freezes during "Reading scenario" part of loading.

Replacing it with the backed up original colombia.inc allows me to load previous games but not start new games.


Is there a scenario file checking tool?


Code:
##############################
# Country definition for COL #
##############################

province =
{ id         = 803
  anti_air   = 2
  air_base   = { size = 1 current_size = 1 }
  naval_base = { size = 2 current_size = 2 }
}              # Barranquilla
province = { id = 813 anti_air = 2 } # Bogotá

#####################
# Country main data #
#####################

country =
{ tag                    = COL
  # Resource Reserves
  energy                 = 1000
  metal                  = 1000
  rare_materials         = 500
  oil                    = 500
  supplies               = 500
  money                  = 10
  manpower               = 28
  capital                = 813
  transports             = 10
  escorts                = 2
  policy =
  { date              = { year = 0 month = january day = 0 }
    democratic        = 4
    political_left    = 5
    free_market       = 8
    freedom           = 6
    professional_army = 5
    defense_lobby     = 5
    interventionism   = 4
  }
  nationalprovinces      = { 803 812 813 890 867 819 868
 539 
 540 
 758 
 759 
 760 
 802 
 804 
 810 
 811 
 869 
 870 
 888 
 889 
 892 
 893 
 894 
 814 
 815 
 817 
 818
 757
 755 ##lost 1921 mexican provinces
 756 ##lost 1921 mexican provinces }
  ownedprovinces         = { 803 812 813 890 867 819 868 
 539 
 540 
 758 
 759 
 760 
 802 
 804 
 810 
 811 
 869 
 870 
 888 
 889 
 892 
 893 
 894 
 814 
 815 
 817 
 818
 757 }
  controlledprovinces    = { 803 812 813 890 867 819 868 
 539 
 540 
 758 
 759 
 760 
 802 
 804 
 810 
 811 
 869 
 870 
 888 
 889 
 892 
 893 
 894 
 814 
 815 
 817 
 818
 757 }
  # ROTW Minor Tech '36
  # Group D 1936 techs
  # ######################
  # GW fighter
  techapps               = { 4010 2150 2290 2300 2310 1010 1190 1110 2450 2460 2510 5010 5080 5090 5190 3010 

8050 
##remove doctrine: 6210 6300
##added
5050 5020 5310 ## basic machine tools mechanized agriculture census tabulating
1020 1200 ## basic infantry cavalry
2010 2020 ## great war tank tankette
3020 3030 ## basic destroyers
3400 3410 3420 ## medium submarines
3320 ## great war carrier
3070 3080 ## early light cruisers
3130 3140 3150 ## basic heavy cruisers
3190 3200 ## early battle cruisers
3250 3260 ## early battleships
4020 4130 ## early fighter bomber
6010 6020 ## superior firepower doctrine
8010 ## decisive battle doctrine
9010 9020 ## flying circus doctrine
}
  diplomacy =
  { relation = { tag = ARG value = 10 }
    relation = { tag = BOL value = 1 }
    relation = { tag = BRA value = 10 }
    relation = { tag = CHL value = 15 }
    relation = { tag = ECU value = 20 }
    relation = { tag = GER value = -20 }
    relation = { tag = PAN value = 50 }
    relation = { tag = PAR value = 10 }
    relation = { tag = PRU value = -35 }
    relation = { tag = URU value = 10 }
    relation = { tag = USA value = 75 }
    relation = { tag = VEN value = 20 }
    relation = { tag = JAP value = 40 }
  }
  headofstate            = { type = 9 id = 37001 }
  headofgovernment       = { type = 9 id = 37002 }
  foreignminister        = { type = 9 id = 37003 }
  armamentminister       = { type = 9 id = 37004 }
  ministerofsecurity     = { type = 9 id = 37005 }
  ministerofintelligence = { type = 9 id = 37006 }
  chiefofstaff           = { type = 9 id = 37007 }
  chiefofarmy            = { type = 9 id = 37008 }
  chiefofnavy            = { type = 9 id = 37009 }
  chiefofair             = { type = 9 id = 37010 }
  landunit =
  { id       = { type = 23000 id = 40 }
    name     = "Ejercito de Colombia"
    location = 813
    division =
    { id       = { type = 23000 id = 4000 }
      name     = "1a División"
      strength = 80
      type     = infantry
      model    = 0
      extra    = anti_air
    }
    division =
    { id       = { type = 23000 id = 4001 }
      name     = "1a Brigada de Caballería 'Montería'"
      strength = 80
      type     = cavalry
      model    = 0
    }
  }
  navalunit =
  { id       = { type = 23000 id = 4002 }
    name     = "Armada de Colombia"
    location = 803
    base     = 803
    division =
    { id    = { type = 23000 id = 4003 }
      name  = "1a Flotilla de Torpedillos"
      type  = destroyer
      model = 0
    }
  }
}
 
Last edited:
When I need to find mistakes I use notepad ++ and select language "C" then it will show it in different coloures etc. so it is a lot easier to find mistakes.

But yes, a debugger would be nice.
 
If you use Notepad++ you may even consider a small modification and adding syntax-specific keywords and features. I created it one day for Hoi2. It's still not anything close to autocompletion in terms of usability but it's easier to spot problems with keywords and comments are appropriately colored in all situations.

To do this, do menu Start -> Run, type "%appdata%" and OK -> then open "Notepad++" folder and edit "userDefineLang.xml" with a text editor. There, replace all the contents or add following <UserLang name="PI_HoI2" ext="txt"> section:

Code:
<NotepadPlus>
    <UserLang name="PI_HoI2" ext="txt">
        <Settings>
            <Global caseIgnored="yes" />
            <TreatAsSymbol comment="no" commentLine="yes" />
            <Prefix words1="no" words2="no" words3="no" words4="no" />
        </Settings>
        <KeywordLists>
            <Keywords name="Delimiters">&quot;00&quot;00</Keywords>
            <Keywords name="Folder+">{</Keywords>
            <Keywords name="Folder-">}</Keywords>
            <Keywords name="Operators">=</Keywords>
            <Keywords name="Comment">1 2 0#</Keywords>
            <Keywords name="Words1">event id random country persistent inventions date offset deathdate hour day month year trigger name desc picture style action_a ai_chance command action_b action_c action_d difficulty flag local_flag headofstate headofgovernment foreignminister armamentminister ministerofsecurity ministerofintelligence chiefofstaff chiefofarmy chiefofnavy chiefofair incabinet minister leader government ideology exists major ai atwar war under_attack attack ispuppet puppet owned control alliance access non_aggression trade guarantee domestic belligerence can_change_policy relation lost_VP lost_national lost_IC axis allies comintern vp range technology is_tech_active energy metal rare_materials oil supplies manpower dissent money escortpool convoypool division_exists division_in_province army nuke land_percentage naval_percentage air_percentage garrison intel_diff province_revoltrisk setflag clrflag local_setflag local_clrflag regime_falls inherit addcore removecore secedeprovince control capital civil_war belligerence set_domestic change_policy independence leave_alliance relation set_relation peace end_puppet end_mastery make_puppet coup_nation end_access end_non_aggression non_aggression end_trades end_guarantee sleepteam waketeam sleepminister sleepleader wakeleader set_leader_skill allow_dig_in build_division add_corps activate_division add_division remove_division damage_division disorg_division delete_unit switch_allegiance scrap_model lock_division unlock_division new_model activate_unit_type deactivate_unit_type research_sabotaged deactivate activate info_may_cause steal_tech gain_tech resource oilpool metalpool energypool rarematerialspool money manpowerpool relative_manpower province_manpower free_ic free_oil free_supplies free_money free_metal free_energy free_rare_material free_transport free_convoy free_manpower add_prov_resource allow_building construct allow_convoy_escorts transport_pool escort_pool convoy peacetime_ic_mod tc_mod tc_occupied_mod attrition_mod supply_dist_mod repair_mod research_mod building_prod_mod convoy_prod_mod radar_eff enable_task task_efficiency max_positioning min_positioning province_keypoints ai extra_tc vp songs sleepevent max_reactor_size abomb_production double_nuke_prod gas_attack gas_protection revolt ai_prepare_war start_pattern add_to_pattern end_pattern set_ground counterattack assault encirclement ambush delay tactical_withdrawal breakthrough hq_supply_eff sce_frequency nuclear_carrier missile_carrier minisub_bonus surprise intelligence army_detection AA_batteries industrial_multiplier industrial_modifer province data</Keywords>
            <Keywords name="Words2">OR AND NOT</Keywords>
            <Keywords name="Words3">communist fascist democratic raining snowing storm blizzard clear muddy winter flying_bomb flying_rocket submarine soft_attack hard_attack ground_defense air_attack air_defense build_cost build_time manpower speed max_organization transport_weight supply_consumption fuel_consumption speed_cap_art speed_cap_eng speed_cap_at speed_cap_aa air_attack strategic_attack tactical_attack naval_attack air_defense build_cost build_time manpower speed surface_detection air detection transport_capacity supply_consumption fuel_consumption range naval_attack air_attack shore_attack naval_defense air_defense build_cost build_time manpower speed surface_detection air detection visibility transport_capacity supply_consumption fuel_consumption range desert_attack desert_defense mountain_attack mountain_defense hill_attack hill_defense forest_attack forest_defense swamp_attack swamp_defense urban_attack urban_defense river_attack shore_attack paradrop_attack desert_move mountain_move hill_move forest_move swamp_move urban_move river_crossing frozen_attack frozen_defense snow_attack snow_defense blizzard_attack blizzard_defense rain_attack rain_defense storm_attack storm_defense muddy_attack muddy_defense frozen_move snow_move blizzard_move rain_move storm_move muddy_move snow_attack rain_attack interceptor escort multi_role strategic_bomber tactical_bomber torpedo_plane snow_move blizzard_move rain_move storm_move transport_plane battleship cruiser destroyer carrier submarine transports energy_to_oil oil_to_rare_materials total supplies nazi fascist paternal_autocrat social_conservative market_liberal social_liberal social_democrat left_wing_radical leninist stalinist democratic political_left free_market freedom professional_army defense_lobby interventionism oil metal energy rare_materials supplies money manpower attack rebase strat_redeploy support_attack support_defense reserves anti_partisan_duty air_superiority ground_attack runway_cratering installation_strike interdiction naval_strike port_strike logistical_strike strategic_bombardment air_supply airborne_assault convoy_raiding asw naval_interdiction shore_bombardment amphibous_assault sea_transport naval_combat_patrol ic coastal_fort land_fort flak infrastructure air_base naval_base radar_station nuclear_reactor rocket_test</Keywords>
            <Keywords name="Words4">which value when where type</Keywords>
        </KeywordLists>
        <Styles>
            <WordsStyle name="DEFAULT" styleID="11" fgColor="000000" bgColor="FFFFFF" fontName="Consolas" fontStyle="0" fontSize="8" />
            <WordsStyle name="FOLDEROPEN" styleID="12" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="8" />
            <WordsStyle name="FOLDERCLOSE" styleID="13" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="1" />
            <WordsStyle name="KEYWORD1" styleID="5" fgColor="000080" bgColor="FFFFFF" fontName="" fontStyle="1" />
            <WordsStyle name="KEYWORD2" styleID="6" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="1" />
            <WordsStyle name="KEYWORD3" styleID="7" fgColor="0080C0" bgColor="FFFFFF" fontName="" fontStyle="0" />
            <WordsStyle name="KEYWORD4" styleID="8" fgColor="800000" bgColor="FFFFFF" fontName="" fontStyle="1" />
            <WordsStyle name="COMMENT" styleID="1" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" />
            <WordsStyle name="COMMENT LINE" styleID="2" fgColor="004000" bgColor="FFFFFF" fontName="" fontStyle="0" />
            <WordsStyle name="NUMBER" styleID="4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
            <WordsStyle name="OPERATOR" styleID="10" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
            <WordsStyle name="DELIMINER1" styleID="14" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="2" />
            <WordsStyle name="DELIMINER2" styleID="15" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
            <WordsStyle name="DELIMINER3" styleID="16" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
        </Styles>
    </UserLang>
</NotepadPlus>

Then restart Notepad++. You may fully customize it further from Notepad++'s interface: menu View -> User defined language.