12 sided dice combat
-
I have some personal modifications to unit attack/defense that would require 12-sided dice for my own use. How do I go about editing an existing 6-sided dice map like "World War II v3 1941" to use 12 sided dice for combat?
-
@thephalanx1453 You have to make changes to the XML file for the game. There are a variety of things inside there that would need to be altered.
-
@Hepps I can change the attack/defense of the units in the xml, but how do I tell the game to use a 12-sided system? I don't see it in the .xml files.
-
@thephalanx1453 One of the very first lines in the XML defines the number of dice sides you are using.
-
@Hepps here is how it should be included at the beginning of the XML
<info name="Total World War: December 1941" version="2.7.7.2"/> <loader javaClass="games.strategy.triplea.TripleA"/> <triplea minimumVersion="1.7"/> <diceSides value="12"/> <map>
-
Thanks, I couldn't find that line in the entire file. The original file is as follows
<?xml version="1.0"?>
<!DOCTYPE game SYSTEM "game.dtd">
<game>
<info name="World War II v3 1941" version="1.7"/>
<loader javaClass="games.strategy.triplea.TripleA"/>
<triplea minimumVersion="1.7"/>
<map>
<!-- Territory Name Definitions -->
<territory name="Afghanistan"/>
<territory name="Alaska"/>
<territory name="Anglo-Egypt Sudan"/>
...
... -
@thephalanx1453 The dice sides property is only used if you are choosing to go with something other than 6. If it is not defined at the beginning of the XML it defaults to 6.
-
@Hepps Thanks again. How would I change the way tech dices work (hit on a 11 or 12 instead of on a 6), AA guns (hit on 1-2 instead of 1), and the technology buffs? These don't seem to be in the xmls.
-
@thephalanx1453 Most of what you are likely looking for is probably contained in the TWW XML.
-
TWW XML
I'm not sure where that is. Is it inside world_war_ii_v3-master.zip like the other ones?
-
@Hepps If you mean the same xml where you change the dice sides and edit the attack/defense/cost of units, then they're not there.
-
@thephalanx1453 He's referring to the game XML for Total World War: https://github.com/triplea-maps/total_world_war/blob/master/map/games/Total_World_War_Dec1941.xml
There is also the Pact of Steel 2 XML which is the "guide" for all map XML properties: https://github.com/triplea-maps/the_pact_of_steel/blob/master/map/games/pact_of_steel_2.xml
Those should show working examples of maps with more than 6 sided dice.
-
@redrum Ah, I got you, so there are a lot of "hidden" default xml values. Thank you very much.
-
@thephalanx1453 Yeah, many XML parameters are optional and have default values but Pact of Steel 2 should at least mention just about everything. If you have questions on certain parameters or can't get them to work just post questions here and folks should be able to help you out.
-
@redrum I'd like the War Bonds tech to still roll a d6 instead of a d12. I added the following attachment
<attachment name="techAbilityAttachment" attachTo="warBonds" javaClass="games.strategy.triplea.attachments.TechAbilityAttachment" type="technology"> <option name="warBondDiceSides" value="6"/> </attachment>
But with this entry added, War Bonds doesn't roll at all.
I did read the following but am unsure of what it means.
" Custom (Generic) Techs that name a hard coded tech (ie: we are changing the name of a hardcoded tech) may NOT have a tech ability attachment. If you want a tech ability attachment for your tech, either use a custom (generic) tech, or do not rename a hard coded tech. " -
@thephalanx1453 You also need the to set the property
warBondDiceNumber
to something:<attachment name="techAbilityAttachment" attachTo="warBonds" javaClass="games.strategy.triplea.attachments.TechAbilityAttachment" type="technology"> <option name="warBondDiceSides" value="6"/> <option name="warBondDiceNumber" value="1"/> </attachment>
Otherwise, it defaults to zero (at least in the current engine).
-
@thephalanx1453 said in 12 sided dice combat:
I did read the following but am unsure of what it means.
" Custom (Generic) Techs that name a hard coded tech (ie: we are changing the name of a hardcoded tech) may NOT have a tech ability attachment. If you want a tech ability attachment for your tech, either use a custom (generic) tech, or do not rename a hard coded tech. "It doesn't matter to you. That is just for flavour, if the basic names would not look right with the scenario. You have no need to rename, if you are making a WWII variant.
For example, if you were making a map with heroes riding dragons, you probably would want something like:
<techname name="Dragon_Riders" tech="paratroopers"/>
not to have to see "Paratroopers" in the Technology tab of something like Dragon War (but, in the case of Dragon War, I'd rather remove the Technology tab).
That is just saying that, if you do that, then you can't customise its abilities.
-
Thanks all.