TheLadiesOgre
Aspiring Codesmith
- Joined
- Jan 16, 2009
- Messages
- 505
TLOTags v0.40 (formerly Promotions DLL v0.2)
By: TheLadiesOgre
Patch Compatibility: v3.19
MP Compatible: ? (though I see no reason why not if all parties involved are using it)
Description:
This is a little project I've decided to do to gain more experience and familiarity with the SDK.
Currently all this does is add some tags (for Promotions, Terrain and Units) to the game. In essence, what I hope to
achieve with this is to allow anyone who can edit XML to be able to add most (if not all) of the phenomenal python
functionality made available by our community members without the fear of Whitespace.
Note: I have realized that Fall Further (and possibly FFH2 as well) uses the Heroic Strength Promotion, and so I apologize
for having missed that despite the fact that The_J told me it was not his concept (It has also come to my attention that
DPII's Conqueror's Delight also had an "Extra Strength" tag). I have also realized that several of the other tags here were
previously included in one form or another in Fall Further, I'm sorry for not having noted this earlier.
Installation Instructions:
1) Extract the "TLOTags Folder" into you "C\User... \BeyondtheSword\Mods" folder.
2) Start a fresh game
3) Load the mod and enjoy.
-----Notes for Modders-----
I have included the changed source files and ensured that they are unmistakably commented.
Search for "TheLadiesOgre" in the sources and "TLOTags" in the XML.
I've added new tags in the PromotionInfos.xml, files, they are detailed in the NewTags.txt (if you are
familiar with how XML and UnitSchemas work you can probably skip this file).
In the included Schema.xml files I have set my added tags to minOccurs="0".
**Note of Importance**
In the UnitSchema.xml file I have set nearly all of the tags for PromotionInfos.xml and UnitInfos.xml
to minOccurs="0". I have also "trimmed" the PromotionInfos.xml and UnitInfos.xml files. For those of you who are unaware
of how a "trimmed" XML file works I have included Xienwolf's walkthrough on editing trimmed XML files from "Mod-Modders
Guide to Fall Further" (it can be found in NewTags.txt)
-----Version History-----
--v0.40-- (Updated: 22.10.2009)
>Added Celebrity (new art for this as well as for Heroic Strength and others are a WIP)
>Added Demoralizer, Industry Espionage, Marauder, Roaming Bandit, Sneak and Thug (all with new custom button art by TLO)
>Added More New Tags (see NewTags.txt for details)
>Built on BBAI v0.81
>Removed Respawn II (as it was obsoleted by <bStackEffect>)
-----Credits and Thanks-----
*Castor_Troy: for the French Translation
*Cybah: for the German Translation
*DPII: I wouldn't have known to use the switch statement without seeing it in Conqueror's Delight
*EmperorFool: for assistance with questions
*JDog5000, Yakk and glider1: for BBAI
*Kael: for the PrereqCivic for Units
*Mechaerik: for the Button Art
*Moctezuma: for IDW
*The_J: for the awesome "Simple" Python things
*TheLopez: for the Readme.txt format
*Tsentom1: for his Python Promotions
*Xienwolf: for "An Idiot's Guide to Editing the DLL" and the FF Sources and all of the help
...If I've forgotten to credit you let me know and I'll rectify the situation
Download Here
By: TheLadiesOgre
Patch Compatibility: v3.19
MP Compatible: ? (though I see no reason why not if all parties involved are using it)
Description:
This is a little project I've decided to do to gain more experience and familiarity with the SDK.
Currently all this does is add some tags (for Promotions, Terrain and Units) to the game. In essence, what I hope to
achieve with this is to allow anyone who can edit XML to be able to add most (if not all) of the phenomenal python
functionality made available by our community members without the fear of Whitespace.
Note: I have realized that Fall Further (and possibly FFH2 as well) uses the Heroic Strength Promotion, and so I apologize
for having missed that despite the fact that The_J told me it was not his concept (It has also come to my attention that
DPII's Conqueror's Delight also had an "Extra Strength" tag). I have also realized that several of the other tags here were
previously included in one form or another in Fall Further, I'm sorry for not having noted this earlier.
Installation Instructions:
1) Extract the "TLOTags Folder" into you "C\User... \BeyondtheSword\Mods" folder.
2) Start a fresh game
3) Load the mod and enjoy.
-----Notes for Modders-----
I have included the changed source files and ensured that they are unmistakably commented.
Search for "TheLadiesOgre" in the sources and "TLOTags" in the XML.
I've added new tags in the PromotionInfos.xml, files, they are detailed in the NewTags.txt (if you are
familiar with how XML and UnitSchemas work you can probably skip this file).
In the included Schema.xml files I have set my added tags to minOccurs="0".
**Note of Importance**
In the UnitSchema.xml file I have set nearly all of the tags for PromotionInfos.xml and UnitInfos.xml
to minOccurs="0". I have also "trimmed" the PromotionInfos.xml and UnitInfos.xml files. For those of you who are unaware
of how a "trimmed" XML file works I have included Xienwolf's walkthrough on editing trimmed XML files from "Mod-Modders
Guide to Fall Further" (it can be found in NewTags.txt)
-----Version History-----
--v0.40-- (Updated: 22.10.2009)
>Added Celebrity (new art for this as well as for Heroic Strength and others are a WIP)
>Added Demoralizer, Industry Espionage, Marauder, Roaming Bandit, Sneak and Thug (all with new custom button art by TLO)
>Added More New Tags (see NewTags.txt for details)
>Built on BBAI v0.81
>Removed Respawn II (as it was obsoleted by <bStackEffect>)
Spoiler Version History Continued :
--v0.31-- (Updated: 30.09.2009)
>Added MarineParatrooper (by GarretSidzaka)
>Added New Custom Button Art for Advanced Airborne Combat Training, Airborne Combat Training, Airborne Combat Veteran, Field Surgeon, Field Hospital, Survivor I and Survivor II (by TheLadiesOgre)
>Added Some Colonization Promotions for use with new tags (Bomb I/II/III became Exploding Shot I/II/III <---potential to be ridiculous, in testing I wiped a stack of 31 enemy units with 2 mobile arty in one turn)
>Fixed Field Heal/Surgeon/Hospital Notification Bugginess (Thank you EF)
>Fixed Respawn/Survivor Bugginess (Thank you Xienwolf, Opera and EF)
--v0.3-- (Updated: 23.09.2009)
>Added AI_Autoplay v2.0 and Unofficial Patch v1.20
>Added Several New Tags (see NewTags.txt for details)
>Added The_J's Respawn Promotion
>Added Tsentom1's Survival Promotion
>Added New Promotions from Gedemons version of the Air Forces Mod for 3.13 (for use with some of the new tags)
>Split Skirmisher into two Promotions (Skirmisher and Strategic Withdrawl)
>Tweaked AI concerning Paradrops
--v0.2-- (Updated: 07.09.2009)
>Added Tsentom1's Field Medic Promotion (though it is slightly altered with additional button art by Mechaerik)
>Added Tsentom1's Skirmisher Promotion (though nerfed somewhat, no more Blitz/Skirmisher stack-wiping)
>Altered availability of Heroic Strength I (now available with Combat II)
>Spread out Heroic Strength into three promotions (with altered buttons courtesy of Mechaerik)
--v0.1-- (Released: 02.09.2009)
>Added Heroic Strength Promotion to Vanilla BTS DLL
>Added MarineParatrooper (by GarretSidzaka)
>Added New Custom Button Art for Advanced Airborne Combat Training, Airborne Combat Training, Airborne Combat Veteran, Field Surgeon, Field Hospital, Survivor I and Survivor II (by TheLadiesOgre)
>Added Some Colonization Promotions for use with new tags (Bomb I/II/III became Exploding Shot I/II/III <---potential to be ridiculous, in testing I wiped a stack of 31 enemy units with 2 mobile arty in one turn)
>Fixed Field Heal/Surgeon/Hospital Notification Bugginess (Thank you EF)
>Fixed Respawn/Survivor Bugginess (Thank you Xienwolf, Opera and EF)
--v0.3-- (Updated: 23.09.2009)
>Added AI_Autoplay v2.0 and Unofficial Patch v1.20
>Added Several New Tags (see NewTags.txt for details)
>Added The_J's Respawn Promotion
>Added Tsentom1's Survival Promotion
>Added New Promotions from Gedemons version of the Air Forces Mod for 3.13 (for use with some of the new tags)
>Split Skirmisher into two Promotions (Skirmisher and Strategic Withdrawl)
>Tweaked AI concerning Paradrops
--v0.2-- (Updated: 07.09.2009)
>Added Tsentom1's Field Medic Promotion (though it is slightly altered with additional button art by Mechaerik)
>Added Tsentom1's Skirmisher Promotion (though nerfed somewhat, no more Blitz/Skirmisher stack-wiping)
>Altered availability of Heroic Strength I (now available with Combat II)
>Spread out Heroic Strength into three promotions (with altered buttons courtesy of Mechaerik)
--v0.1-- (Released: 02.09.2009)
>Added Heroic Strength Promotion to Vanilla BTS DLL
Spoiler Future Version Projections :
-----Future Version Projections-----
--v0.5--
>Looking to focus on all things air and espionage-based
>Will be adding faichale's take on TSheep's SuperSpies (including JDogs AI rework as well as potentially a few other tweaks, I have some ideas...)
>Will be adding Native Promotions
>Will be adding AirLethality from MongooseSDK3.3
>Will be adding various promotions that haven't made it in yet (not necessarily new tags, just new promotions using the new tags)
--v0.6--
>Looking to focus on all things religious
>Will be adding religious combat promotions
>Will be adding The_J's Warriors of God
>Will be adding Tsentom1's Malleus Maleficarum
--v0.5--
>Looking to focus on all things air and espionage-based
>Will be adding faichale's take on TSheep's SuperSpies (including JDogs AI rework as well as potentially a few other tweaks, I have some ideas...)
>Will be adding Native Promotions
>Will be adding AirLethality from MongooseSDK3.3
>Will be adding various promotions that haven't made it in yet (not necessarily new tags, just new promotions using the new tags)
--v0.6--
>Looking to focus on all things religious
>Will be adding religious combat promotions
>Will be adding The_J's Warriors of God
>Will be adding Tsentom1's Malleus Maleficarum
-----Credits and Thanks-----
*Castor_Troy: for the French Translation
*Cybah: for the German Translation
*DPII: I wouldn't have known to use the switch statement without seeing it in Conqueror's Delight
*EmperorFool: for assistance with questions
*JDog5000, Yakk and glider1: for BBAI
*Kael: for the PrereqCivic for Units
*Mechaerik: for the Button Art
*Moctezuma: for IDW
*The_J: for the awesome "Simple" Python things
*TheLopez: for the Readme.txt format
*Tsentom1: for his Python Promotions
*Xienwolf: for "An Idiot's Guide to Editing the DLL" and the FF Sources and all of the help
...If I've forgotten to credit you let me know and I'll rectify the situation
Download Here
Spoiler NewTags.txt :
CVPromotionInfo
<bAutoAcquire>: If a unit possesses all of the prereqs for a promotion tagged with this, the unit will automatically recieve this promotion (however, they will not recieve the promotion until they have enough experience unless the promotion is also tagged <bNoXP> (i.e. the choice is forced unless also tagged <bNoXP>))
<bDefensiveVictoryMove>: If this is set to 1, whenever the unit wins while defending, they will gain one point of movement.*
<bFreeDrop>: If this is set to 1, paradropping does not act as an attack or cost any movement and the unit can drop onto FoW tiles. (In addition to being available with a promotion, I have also given this to Paratroopers by default)
<bIsMechOnly>: If this is set to 1, this promotion will only be offered to units which are <bMechanized>.
<bIsNoMechs>: If this is set to 1, this promotion will not be offered to units which are <bMechanized>.
<bMustMaintain>: If for any reason the prereqs for this promotion are no longer met, the unit will lose it.
<bNoXP>: This promotion is free (so long as the prereqs are met).
<bOffensiveVictoryMove>: If this is set to 1, whenever the unit wins while attacking, they will gain one point of movement.*
<bOneUp>: If this is set to 1, a unit that is given this promotion will get an "extra life".
<bPillageCulture>: If this is set to 1, the unit will pillage culture (ala IDW) whenever they pillage a tile.
<bPillageEspionage>: If this is set to 1, the unit will recieve espionage points (vs. the owner of the tile) whenever they pillage a tile.
<bPillageMarauder>: If this is set to 1, the unit will pillage twice (if possible) whenever they pillage a tile.
<bPillageOnMove>: If this is set to 1, the unit will pillage (free of charge concerning attack/movement) whenever they move to a new tile that is applicable.
<bPillageOnVictory>: If this is set to 1, the unit will recieve the profits of pillaging (though with no tile improvement loss) on a combat victory.
<bPillageResearch>: If this is set to 1, the unit will pillage research (toward their current research tech) whenever they pillage a tile.
<bStackEffect>: This promotion may be purchased as many times as the player sees fit.
<iAirCombatLimitChange>: Whatever number is entered here will be applied to the units Air Combat Limit.
<iCollateralDamageLimitChange>: Whatever number is entered here will be applied to the units Collateral Damage Limit.
<iCollateralDamageMaxUnitsChange>: Whatever number is entered here will be applied to the units Collateral Damage Max Units Limit.
<iCombatLimitChange>: Whatever number is entered here will be applied to the units Combat Limit (thus making it possible to kill with collateral damage if the % goes over 100%).
<iExtraDropRange>: Whatever number is entered here will be applied to the units drop range (thus giving units previously unable to paradrop the ability to do so; Note: Animations still needed).
<iExtraStrength>: Whatever number is entered here will be applied to the units base strength.
<iSurvivorChance>: Whatever number is entered here will be the chance that the unit has to survive a combat loss.
<iVictoryAdjacentHeal>: Whatever number is entered here will be the chance that the unit has to give one turn's worth of healing to all friendly units on an adjacent tile on a combat victory (offensive or defensive).
<iVictoryHeal>: Whatever number is entered here will be the chance that the unit has to heal (one turn's worth) on a combat victory.
<iVictoryStackHeal>: Whatever number is entered here will be the chance that the unit has to give one turn's worth of healing to all units on the same tile on a combat victory (offensive or defensive).
<PrereqCivic>: One of these civics is required to take this promotion (multiple entries may be made).
* I have not seen either of these give more than one point of movement per turn.
CvTerrainInfo
<bRequiresFlatlands>: Cloned from improvements, if this is set to 1 the terrain type will only be found on flatlands.
<iHealthPercent>: cloned from features, the number entered here will modify a city's healthiness (similar to jungles only now it is the actual terrain instead of the feature on the terrain).
<iTurnDamage>: cloned from features, the number entered here will be the damage that a unit takes per turn on this terrain (similar to fallout only as above)
**All new fields added to CvTerrainInfos currently default to 0**
CvUnitInfo
<bFreeDrop>: As noted above, this is also a unit tag which I have set to 1 for paratroopers by default.
<PrereqCivic>: This civic is required to train this unit.
How to edit a Trimmed XML File by Xienwolf
1: Use Notepad++
2: Right click on the TAB for the file you have opened
3: Select "Clone to Another View"
4: Welcome to split-screen view! You now see 2 copies of the same file, who cares?!
4.5: Make sure that you are split vertically (side-by-side) instead of Horizontally (I get the top!)
5: In one copy, focus on what you want to change/add
6: In the other copy, scroll down to "Test Promo" (actually, just search. As long as you include a space before/after any word, it searches very nicely to the commented name instead of the 5,000 other lines of code that use that word somehow...)
7: Now that you have the test promotion (all fields) right next to your change/addition, you can see the precise order required for all fields, and only use the ones which matter in some way!
8 (occasional): If your field requires sub-elements, and nothing else actually USES those subelements, open up the Schema file and pray that you understand how to read them (just encase the <> value you need subelements for in "" marks and you should get a result which lists what comes inside of it. You may have to also search for each of those for the REALLY nested entries...)
Yes, the trimmed XML can make adding things to the file a PITA, but it makes figuring out what the file actually DOES a lot quicker/easier in the end since you don't have to scroll through 500 cases of >0< or >NONE< and pray you don't overlook the >1< which is causing you issues...
<bAutoAcquire>: If a unit possesses all of the prereqs for a promotion tagged with this, the unit will automatically recieve this promotion (however, they will not recieve the promotion until they have enough experience unless the promotion is also tagged <bNoXP> (i.e. the choice is forced unless also tagged <bNoXP>))
<bDefensiveVictoryMove>: If this is set to 1, whenever the unit wins while defending, they will gain one point of movement.*
<bFreeDrop>: If this is set to 1, paradropping does not act as an attack or cost any movement and the unit can drop onto FoW tiles. (In addition to being available with a promotion, I have also given this to Paratroopers by default)
<bIsMechOnly>: If this is set to 1, this promotion will only be offered to units which are <bMechanized>.
<bIsNoMechs>: If this is set to 1, this promotion will not be offered to units which are <bMechanized>.
<bMustMaintain>: If for any reason the prereqs for this promotion are no longer met, the unit will lose it.
<bNoXP>: This promotion is free (so long as the prereqs are met).
<bOffensiveVictoryMove>: If this is set to 1, whenever the unit wins while attacking, they will gain one point of movement.*
<bOneUp>: If this is set to 1, a unit that is given this promotion will get an "extra life".
<bPillageCulture>: If this is set to 1, the unit will pillage culture (ala IDW) whenever they pillage a tile.
<bPillageEspionage>: If this is set to 1, the unit will recieve espionage points (vs. the owner of the tile) whenever they pillage a tile.
<bPillageMarauder>: If this is set to 1, the unit will pillage twice (if possible) whenever they pillage a tile.
<bPillageOnMove>: If this is set to 1, the unit will pillage (free of charge concerning attack/movement) whenever they move to a new tile that is applicable.
<bPillageOnVictory>: If this is set to 1, the unit will recieve the profits of pillaging (though with no tile improvement loss) on a combat victory.
<bPillageResearch>: If this is set to 1, the unit will pillage research (toward their current research tech) whenever they pillage a tile.
<bStackEffect>: This promotion may be purchased as many times as the player sees fit.
<iAirCombatLimitChange>: Whatever number is entered here will be applied to the units Air Combat Limit.
<iCollateralDamageLimitChange>: Whatever number is entered here will be applied to the units Collateral Damage Limit.
<iCollateralDamageMaxUnitsChange>: Whatever number is entered here will be applied to the units Collateral Damage Max Units Limit.
<iCombatLimitChange>: Whatever number is entered here will be applied to the units Combat Limit (thus making it possible to kill with collateral damage if the % goes over 100%).
<iExtraDropRange>: Whatever number is entered here will be applied to the units drop range (thus giving units previously unable to paradrop the ability to do so; Note: Animations still needed).
<iExtraStrength>: Whatever number is entered here will be applied to the units base strength.
<iSurvivorChance>: Whatever number is entered here will be the chance that the unit has to survive a combat loss.
<iVictoryAdjacentHeal>: Whatever number is entered here will be the chance that the unit has to give one turn's worth of healing to all friendly units on an adjacent tile on a combat victory (offensive or defensive).
<iVictoryHeal>: Whatever number is entered here will be the chance that the unit has to heal (one turn's worth) on a combat victory.
<iVictoryStackHeal>: Whatever number is entered here will be the chance that the unit has to give one turn's worth of healing to all units on the same tile on a combat victory (offensive or defensive).
<PrereqCivic>: One of these civics is required to take this promotion (multiple entries may be made).
* I have not seen either of these give more than one point of movement per turn.
CvTerrainInfo
<bRequiresFlatlands>: Cloned from improvements, if this is set to 1 the terrain type will only be found on flatlands.
<iHealthPercent>: cloned from features, the number entered here will modify a city's healthiness (similar to jungles only now it is the actual terrain instead of the feature on the terrain).
<iTurnDamage>: cloned from features, the number entered here will be the damage that a unit takes per turn on this terrain (similar to fallout only as above)
**All new fields added to CvTerrainInfos currently default to 0**
CvUnitInfo
<bFreeDrop>: As noted above, this is also a unit tag which I have set to 1 for paratroopers by default.
<PrereqCivic>: This civic is required to train this unit.
How to edit a Trimmed XML File by Xienwolf
1: Use Notepad++
2: Right click on the TAB for the file you have opened
3: Select "Clone to Another View"
4: Welcome to split-screen view! You now see 2 copies of the same file, who cares?!
4.5: Make sure that you are split vertically (side-by-side) instead of Horizontally (I get the top!)
5: In one copy, focus on what you want to change/add
6: In the other copy, scroll down to "Test Promo" (actually, just search. As long as you include a space before/after any word, it searches very nicely to the commented name instead of the 5,000 other lines of code that use that word somehow...)
7: Now that you have the test promotion (all fields) right next to your change/addition, you can see the precise order required for all fields, and only use the ones which matter in some way!
8 (occasional): If your field requires sub-elements, and nothing else actually USES those subelements, open up the Schema file and pray that you understand how to read them (just encase the <> value you need subelements for in "" marks and you should get a result which lists what comes inside of it. You may have to also search for each of those for the REALLY nested entries...)
Yes, the trimmed XML can make adding things to the file a PITA, but it makes figuring out what the file actually DOES a lot quicker/easier in the end since you don't have to scroll through 500 cases of >0< or >NONE< and pray you don't overlook the >1< which is causing you issues...