|
Post by michael34 on Oct 4, 2010 11:59:20 GMT
Hello PZK. Finally I've got the self-defending City Center, ask me if you want to know the code. What I most wish now is that the Russian CC can produce citizens. Look at what I've tried:
(dbtechtreenode.csv)
// NAME,DISPLAYNAME,TOOLTIP,EPOCH,SLOT,BRANCH,ICON,MENU,ROW,COLUMN,HOST,PRODUCE,UPGRADE,TIME,FOOD,WOOD,STONE,GOLD,TIN,IRON,SALTPETER,OIL,URANIUM,TECHPTS,TTCIV,PREREQUISITES,SPECFLAGS // ---------------------- EPOCH 1 ------------------------,,,,,,,,,,,,,,,,,,,,,,,,,, // UNITS AND UPGRADES,,,,,,,,,,,,,,,,,,,,,,,,,, Citizen,text_Citizen_name,,1,0,,,0,1,0,CityCenter,Citizen,,5,50,0,0,0,0,0,0,0,0,0,,[],(None) Citizen,text_Citizen_name,,1,0,,,0,1,0,RussianCityCenter,Citizen,,5,50,0,0,0,0,0,0,0,0,0,,[],(None) FishingShip,text_FishingShip_name,,1,0,,,0,1,0,Dock,FishingShip,FishingShipUpgradeEpoch1,0,0,0,0,0,0,0,0,0,0,0,,[],(None) HeavyInfantry1,text_HeavyInfantry1_01_name,,1,0,,,0,1,1,Barracks,HeavyInfantry1,HeavyInfantry1UpgradeEpoch1,0,0,0,0,0,0,0,0,0,0,0,,[],(None)
But the game crashes. Do you figure out how can i get it modded?? It will turn me crazy.
|
|
|
Post by PzK on Oct 4, 2010 19:58:24 GMT
Citizen,text_Citizen_name,,1,0,,,0,1,0,CityCenter,Citizen,,5,50,0,0,0,0,0,0,0,0,0,,[],(None) Citizen,text_Citizen_name,,1,0,,,0,1,0,RussianCityCenter,Citizen,,5,50,0,0,0,0,0,0,0,0,0,,[],(None)
I don't think you can you can just repeat this code with RussianCityCenter in. Perhaps thats why its crashing. Post the code of the self-defending city, might have something to do with that.
|
|
|
Post by michael34 on Oct 5, 2010 1:48:41 GMT
No, there have been long since i can't upgrade to Russian CC, the self-defensive cc i modded this week. Nevertheless, this is the code of the default city center:
//------------------------------------------------------------------------------------------------ // CITY CENTER - UNIT TYPE INFO //------------------------------------------------------------------------------------------------ UnitType CityCenter { parent = PlayerOrWorldBuilding properties { //rps = BuildingCombat hitpoints = 0 SizeX = 3 SizeY = 2.5 FootprintSizeX = 5 FootprintSizeY = 4.5 OffsetX = 0.75 OffsetY = 0.75 UndertextureSizeX = 3 UndertextureSizeY = 2 UndertextureOffsetX = -0.25 mass = 1 displayName = tx_utn_cityCenter_name DisplayNameScenEdit = tx_utn_cityCenter_sname VerboseTooltip = vtt_unit_CityCenter popCapacity = 200 requiredOpenSides = kBuildingOpenSides_PosX RallyPlacementFlags = ( Resources | University | Warehouse | Fortress | Tower | Terrain | CityCenter | ConstructionSite ) } sounds { } fullMapOverlay { sprite = spr_fullmap_center } abilities = [ ResourceDropoff { type = kResourceType_AllNaturalResource; } LOS { range = 0 } //Attack { latent = true; range = 4; reloadTime = 1; applyDamageTime = 0.5; damage = 20; missileName = "FireArrow"; angularRange = 360 } Garrison { garrisonType = UniWarehouseOilDerrickCityCenter; numOfSlots = 6; attackBonus = 4; resourceBonus = 0.05; // 2 percent more resource dropoff for each garrisoned UnitType rightClickToGarrison = 1; healPoints = 1; // 4 hit points heal every second for each UnitType GarrisonFlagModelName = "GarrisonFlag" } AreaEffectCity { CityRadius = 7.0 CityHealRate = 0.5 // per second CityCaptureResistance = 1.05 // scale up capture time effects = [ CityHeal CityResistCapture ] } Convertable { convertTimeModifier = 300.0; // garrisonedUnitModifier = 0.0; // 10% increase in capture time garrisonedUnitDamage = 0.0; // hitpoints subtracted from capturer per round per garrisoned unit damageRate = 0.0; // hitpoints subtracted from capture target hitpoints per round capture = 1; resourcesTransferred = [ { // percentage-based transfer from normal player resource = AllNaturalResource percentTransferred = 0.1 NativeTribesAmountTransferredMin = 0.0 NativeTribesAmountTransferredMax = 0.0 } { // amount-based transfer from native tribe resource = Food percentTransferred = 0.0 NativeTribesAmountTransferredMin = 200.0 NativeTribesAmountTransferredMax = 300.0 } { // amount-based transfer from native tribe resource = Wood percentTransferred = 0.0 NativeTribesAmountTransferredMin = 200.0 NativeTribesAmountTransferredMax = 300.0 } { // amount-based transfer from native tribe resource = Stone percentTransferred = 0.0 NativeTribesAmountTransferredMin = 200.0 NativeTribesAmountTransferredMax = 300.0 } { // amount-based transfer from native tribe resource = Gold percentTransferred = 0.0 NativeTribesAmountTransferredMin = 200.0 NativeTribesAmountTransferredMax = 300.0 } ] } Attack { range = 0; reloadTime = 6; applyDamageTime = 0.5; damage = 0; missileName = "FireArrow"; angularRange = 360; } ] }
//------------------------------------------------ // EPOCH 1 //------------------------------------------------ UpgradeSet CityCenterEpoch1Upgrade { upgrades = [ UpgradeUnitTypeFactor {UnitType = CityCenter; factor = CityRadius; method = Set; value = 7.0; upgradeChildren = 0;} UpgradeUnitTypeFactor {UnitType = CityCenter; factor = GarrisonSlots; method = Set; value = 5.0; upgradeChildren = 0;} ] }
//------------------------------------------------ // EPOCH 4 //------------------------------------------------ UpgradeSet CityCenterEpoch4Upgrade { upgrades = [ UpgradeUnitTypeFactor {UnitType = CityCenter; factor = CityRadius; method = Set; value = 8.0; upgradeChildren = 0;} UpgradeUnitTypeFactor {UnitType = CityCenter; factor = GarrisonSlots; method = Set; value = 5.0; upgradeChildren = 0;} UpgradeUnitTypeFactor {UnitType = CityCenter; factor = CityHealRate; method = Set; value = 2.0; upgradeChildren = 0;} ] }
//------------------------------------------------ // EPOCH 7 //------------------------------------------------ UpgradeSet CityCenterEpoch7Upgrade { upgrades = [ UpgradeUnitTypeFactor {UnitType = CityCenter; factor = CityRadius; method = Set; value = 9.0; upgradeChildren = 0;} UpgradeUnitTypeFactor {UnitType = CityCenter; factor = GarrisonSlots; method = Set; value = 5.0; upgradeChildren = 0;} UpgradeUnitTypeFactor {UnitType = CityCenter; factor = CityHealRate; method = Set; value = 2.5; upgradeChildren = 0;} ] } //------------------------------------------------ // EPOCH 10 //------------------------------------------------ UpgradeSet CityCenterEpoch10Upgrade { upgrades = [ UpgradeUnitTypeFactor {UnitType = CityCenter; factor = CityRadius; method = Set; value = 10.0; upgradeChildren = 0;} UpgradeUnitTypeFactor {UnitType = CityCenter; factor = GarrisonSlots; method = Set; value = 5.0; upgradeChildren = 0;} UpgradeUnitTypeFactor {UnitType = CityCenter; factor = CityHealRate; method = Set; value = 3.0; upgradeChildren = 0;} ] }
//------------------------------------------------ // EPOCH 13 //------------------------------------------------ UpgradeSet CityCenterEpoch13Upgrade { upgrades = [ UpgradeUnitTypeFactor {UnitType = CityCenter; factor = CityRadius; method = Set; value = 11.0; upgradeChildren = 0;} UpgradeUnitTypeFactor {UnitType = CityCenter; factor = GarrisonSlots; method = Set; value = 5.0; upgradeChildren = 0;} UpgradeUnitTypeFactor {UnitType = CityCenter; factor = CityHealRate; method = Set; value = 3.5; upgradeChildren = 0;} ] }
//------------------------------------------------------------------------------------------------ // CITY CENTER - VISUAL INFO //------------------------------------------------------------------------------------------------ //------------------------------------------------ // CITY CENTER - EPOCH 1 //------------------------------------------------ UnitModel CityCenter { Parent = BaseBuilding ForceScale = 0.03 DefaultModel = bld_citycenter1.NIF ChildNames = [ UnderCityCenter HugeGlow ExplSelectorBuild_Medium CityNameText ExplPartsStoneThatch ] UIRenderingParams { xOffset = 3.95 yOffset = 0.01 zOffset = 1.60 scale = 2.20 angle = 47.37 rotationSpeed = 0.00 pitch = 30.00 lightAngle = 30.00 lightPitch = 90.00 lightDiffuse = [50 50 45 255] lightSpecular = [0 0 0 255] lightAmbient = [40 40 40 255] } }
//------------------------------------------------ // CITY CENTER - EPOCH 4 //------------------------------------------------ UnitModel CityCenter_4 { Parent = BaseBuilding DefaultModel = bld_fort4.NIF ChildNames = [ UnderCityCenter HugeGlow ExplSelectorBuild_Medium CityNameText ExplPartsStone ] UIRenderingParams { xOffset = 3.95 yOffset = 0.52 zOffset = -0.36 scale = 2.20 angle = 47.37 rotationSpeed = 0.00 pitch = 30.00 lightAngle = 30.00 lightPitch = 90.00 lightDiffuse = [50 50 45 255] lightSpecular = [0 0 0 255] lightAmbient = [40 40 40 255] } }
//------------------------------------------------ // CITY CENTER - EPOCH 7 //------------------------------------------------ UnitModel CityCenter_7 { Parent = BaseBuilding ForceScale = 0.03 DefaultModel = bld_citycenter7.NIF ChildNames = [ UnderCityCenter HugeGlow ExplSelectorBuild_Medium CityNameText ExplPartsCityCenter7 ] UIRenderingParams { xOffset = 2.63 yOffset = 1.11 zOffset = -0.43 scale = 1.79 angle = 42.63 rotationSpeed = 0.00 pitch = 32.63 lightAngle = 30.00 lightPitch = 90.00 lightDiffuse = [50 50 45 255] lightSpecular = [0 0 0 255] lightAmbient = [40 40 40 255] } }
//------------------------------------------------ // CITY CENTER - EPOCH 10 //------------------------------------------------ UnitModel CityCenter_10 { Parent = BaseBuilding ForceScale = 0.03 DefaultModel = bld_citycenter10.NIF ChildNames = [ UnderCityCenter HugeGlow ExplSelectorBuild_Medium CityNameText ExplPartsStone ] UIRenderingParams { xOffset = 2.63 yOffset = 0.09 zOffset = -2.21 scale = 1.79 angle = 42.63 rotationSpeed = 0.00 pitch = 32.63 lightAngle = 30.00 lightPitch = 90.00 lightDiffuse = [50 50 45 255] lightSpecular = [0 0 0 255] lightAmbient = [40 40 40 255] } }
//------------------------------------------------ // CITY CENTER - EPOCH 13 //------------------------------------------------ UnitModel CityCenter_13 { Parent = BaseBuilding DefaultModel = bld_citycenter13.NIF ChildNames = [ UnderCityCenter HugeGlow ExplSelectorBuild_Medium CityNameText ExplPartsConcrete ] UIRenderingParams { xOffset = 2.63 yOffset = -0.41 zOffset = -0.51 scale = 1.79 angle = 42.63 rotationSpeed = 0.00 pitch = 32.63 lightAngle = 30.00 lightPitch = 90.00 lightDiffuse = [50 50 45 255] lightSpecular = [0 0 0 255] lightAmbient = [40 40 40 255] } }
|
|
|
Post by michael34 on Oct 5, 2010 1:54:41 GMT
And in db_techtreenode:
WarehouseUpgradeEpoch13,Warehouse,"""Building""",13,3000,5,0,0,0,35,0,100,0,0,0,0,0,0,0,tx_utn_warehouse_name,tx_utn_warehouse_pname,Warehouse_13,,icon_unit_warehouse_13,[0 0 0 0],0,0,vtt_unit_Warehouse,[Warehouse_select],[],[],[],[WarehouseEpoch13Garrison],All CityCenterUpgradeEpoch1,CityCenter,"""Building""",1,3000,3,1,7,5,50,0,300,300,0,0,0,0,0,0,tx_utn_cityCenter_name,tx_utn_cityCenter_pname,CityCenter,,icon_unit_citycenter_1,[0 0 0 0],0,0,vtt_unit_CityCenter,[CityCenter_select],[],[],[],[CityCenterEpoch1Upgrade TerritoryEpoch1Upgrade],All CityCenterUpgradeEpoch4,CityCenter,"""Building""",4,5000,3,1,7,5,50,0,300,300,0,0,0,0,0,0,tx_utn_cityCenter_name,tx_utn_cityCenter_pname,CityCenter_4,,icon_unit_citycenter_4,[0 0 0 0],0,0,vtt_unit_CityCenter,[CityCenter_select],[],[],[],[CityCenterEpoch4Upgrade TerritoryEpoch4Upgrade],All CityCenterUpgradeEpoch7,CityCenter,"""Building""",7,7000,3,1,7,5,50,0,300,300,0,0,0,0,0,0,tx_utn_cityCenter_name,tx_utn_cityCenter_pname,CityCenter_7,,icon_unit_citycenter_7,[0 0 0 0],0,0,vtt_unit_CityCenter,[CityCenter_select],[],[],[],[CityCenterEpoch7Upgrade TerritoryEpoch7Upgrade],All CityCenterUpgradeEpoch10,CityCenter,"""Building""",10,9000,3,1,7,5,50,0,300,300,0,0,0,0,0,0,tx_utn_cityCenter_name,tx_utn_cityCenter_pname,CityCenter_10,,icon_unit_citycenter_10,[0 0 0 0],0,0,vtt_unit_CityCenter,[CityCenter_select],[],[],[],[CityCenterEpoch10Upgrade TerritoryEpoch10Upgrade],All CityCenterUpgradeEpoch13,CityCenter,"""Building""",13,10000,3,1,7,5,50,0,300,300,0,0,0,0,0,0,tx_utn_cityCenter_name,tx_utn_cityCenter_pname,CityCenter_13,,icon_unit_citycenter_13,[0 0 0 0],0,0,vtt_unit_CityCenter,[CityCenter_select],[],[],[],[CityCenterEpoch13Upgrade TerritoryEpoch13Upgrade],All
RussianCityCenterUpgradeEpoch7,CityCenter,"""Building""",7,7000,3,0,7,5,50,0,300,300,0,0,0,0,0,0,tx_utn_ruscityCenter_name,tx_utn_ruscityCenter_pname,RussianCityCenter_7,,icon_unit_citycenter_7,[0 0 0 0],0,0,vtt_unit_rusCityCenter,[CityCenter_select],[],[],[],[RussianCityCenterEpoch7Upgrade TerritoryEpoch7Upgrade],Russian
RoadUpgradeEpoch1,Road,"""?""",1,100,0,0,0,0,3,0,0,1,0,0,0,0,0,0,tx_utn_Road_name,tx_utn_Road_pname,Road,UIRoad_1,icon_unit_road_1,[0 0 0 0],0,0,vtt_unit_Road,[],[],[],[],[],All
|
|
|
Post by michael34 on Oct 5, 2010 2:00:27 GMT
I think the problem is that Russian CC is an upgrade, not a unit. Some time ago I was able to upgrade the CC tu Russian CC from the editor itself. As a matter of fact, I CAN upgrade the CC when playing, but I want it to can be done in the editor in order to force the AI to build Russian CityCenters. Sorry if this all puzzles you.
|
|
|
Post by PzK on Oct 6, 2010 13:08:50 GMT
This looks like the defence code to me
//Attack { latent = true; range = 4; reloadTime = 1; applyDamageTime = 0.5; damage = 20; missileName = "FireArrow"; angularRange = 360 }
Is that all on the same line? Because with // at the start it won' t be executed.
|
|
|
Post by michael34 on Oct 6, 2010 15:44:57 GMT
No, I don't want that line activated, only too lazy for deleting lol. I HAVE the self-defencing CityCenter (if you are interested, I'll provide you the code). Now what I want is to activate the Russian CC so that I may force the AI (Russian or other) to create Russian CityCenters. When I am playing, in the UI there is a button that allows me upgrade my OWN citycenters into Russian CC, but I want to activate it for the AI in the Editor. Some time ago when double-clicking the CC there were a button that allowed upgrade to Russian, but now the button says "No upgrades available" Sorry I recognize I explain myself very badly in English. My CC automatically throws firearrows towards attacking troops, but i want play with default city centers against an AI that autobuilds Russian CityCenters. Sorry if abusing of your patience.
|
|
|
Post by michael34 on Oct 7, 2010 12:05:08 GMT
Sorry PZK if I have behaved too roughly with you in my answers. This game and its illogical modding turns me angry! And thanks for your help.
|
|
|
Post by PzK on Oct 7, 2010 14:43:36 GMT
Not at all, your questions/answers are fine. I'll get back to you to see if I can find anything.
|
|
|
Post by michael34 on Oct 7, 2010 16:52:00 GMT
Thanks PZK i'm perhaps too sensible to criticism or distrustful. I know it's easy quarrel with somebody yo talk to, but you cant see. well I has tried to copy the CC files in sdbtechtreenode.csv and db.upgradeunittypes and replace "CityCenter" for "RussianCityCenter", "tx_utn_rusCityCenter" and so on, but the game crashes. Please don't waste your spare time nor neglect your duties while helping me, I'm so whimsical lol. Thanks friend.
|
|
|
Post by michael34 on Oct 9, 2010 12:38:42 GMT
The Russian CC is an improvement, how can I force the code so that the AI can improve to Russian the CC from the edi¡tor? That is the question.
|
|
|
Post by PzK on Oct 9, 2010 21:17:53 GMT
Sorry but I can't help you on this one, abit out of my depth. Hope you find the solution soon.
|
|