MKich
Member
- Reaction score
- 6
My "idea" is to add the recruitment costs to /interface.php?func=get_unit_info
This will result in every unit having 3 additional tags:
<wood>50</wood>
<stone>30</stone>
<iron>10</iron>
The result should look like this
Currently it looks like this
Why?
It is a QOL Feature for script developers to not have to hard code those values.
Also in case the costs will change in future tools that use them will continue to work correctly
This was actually part of the world data a long time ago, but got removed (most likely by accident since it is not mentioned in the release notes). Based on my research it got removed in version 8.97 (I came to that conclusion, because on 2. September 2017 I got the first mention about a tool not working (since 4 days) and after examination found out that this was due to a change in world data - The only update I could find in the Changelog was V8.97 that released in 25. august 2017)
This will result in every unit having 3 additional tags:
<wood>50</wood>
<stone>30</stone>
<iron>10</iron>
The result should look like this
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<config>
<spear>
<build_time>510</build_time>
<wood>50</wood>
<stone>30</stone>
<iron>10</iron>
<pop>1</pop>
<speed>18.000000000504</speed>
<attack>10</attack>
<defense>15</defense>
<defense_cavalry>45</defense_cavalry>
<defense_archer>20</defense_archer>
<carry>25</carry>
</spear>
<sword>
<build_time>750</build_time>
<wood>30</wood>
<stone>30</stone>
<iron>70</iron>
<pop>1</pop>
<speed>21.999999999296</speed>
<attack>25</attack>
<defense>50</defense>
<defense_cavalry>25</defense_cavalry>
<defense_archer>40</defense_archer>
<carry>15</carry>
</sword>
<axe>
<build_time>660</build_time>
<wood>60</wood>
<stone>30</stone>
<iron>40</iron>
<pop>1</pop>
<speed>18.000000000504</speed>
<attack>40</attack>
<defense>10</defense>
<defense_cavalry>5</defense_cavalry>
<defense_archer>10</defense_archer>
<carry>10</carry>
</axe>
<spy>
<build_time>450</build_time>
<wood>50</wood>
<stone>50</stone>
<iron>20</iron>
<pop>2</pop>
<speed>8.99999999928</speed>
<attack>0</attack>
<defense>2</defense>
<defense_cavalry>1</defense_cavalry>
<defense_archer>2</defense_archer>
<carry>0</carry>
</spy>
<light>
<build_time>900</build_time>
<wood>125</wood>
<stone>100</stone>
<iron>250</iron>
<pop>4</pop>
<speed>9.999999998</speed>
<attack>130</attack>
<defense>30</defense>
<defense_cavalry>40</defense_cavalry>
<defense_archer>30</defense_archer>
<carry>80</carry>
</light>
<heavy>
<build_time>1800</build_time>
<wood>200</wood>
<stone>150</stone>
<iron>600</iron>
<pop>6</pop>
<speed>11.0000000011</speed>
<attack>150</attack>
<defense>200</defense>
<defense_cavalry>80</defense_cavalry>
<defense_archer>180</defense_archer>
<carry>50</carry>
</heavy>
<ram>
<build_time>2400</build_time>
<wood>300</wood>
<stone>200</stone>
<iron>200</iron>
<pop>5</pop>
<speed>29.9999999976</speed>
<attack>2</attack>
<defense>20</defense>
<defense_cavalry>50</defense_cavalry>
<defense_archer>20</defense_archer>
<carry>0</carry>
</ram>
<catapult>
<build_time>3600</build_time>
<wood>320</wood>
<stone>400</stone>
<iron>100</iron>
<pop>8</pop>
<speed>29.9999999976</speed>
<attack>100</attack>
<defense>100</defense>
<defense_cavalry>50</defense_cavalry>
<defense_archer>100</defense_archer>
<carry>0</carry>
</catapult>
<snob>
<build_time>9000</build_time>
<wood>28000</wood>
<stone>30000</stone>
<iron>25000</iron>
<pop>100</pop>
<speed>34.9999999993</speed>
<attack>30</attack>
<defense>100</defense>
<defense_cavalry>50</defense_cavalry>
<defense_archer>100</defense_archer>
<carry>0</carry>
</snob>
</config>
Currently it looks like this
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<config>
<spear>
<build_time>510</build_time>
<pop>1</pop>
<speed>18.000000000504</speed>
<attack>10</attack>
<defense>15</defense>
<defense_cavalry>45</defense_cavalry>
<defense_archer>20</defense_archer>
<carry>25</carry>
</spear>
<sword>
<build_time>750</build_time>
<pop>1</pop>
<speed>21.999999999296</speed>
<attack>25</attack>
<defense>50</defense>
<defense_cavalry>25</defense_cavalry>
<defense_archer>40</defense_archer>
<carry>15</carry>
</sword>
<axe>
<build_time>660</build_time>
<pop>1</pop>
<speed>18.000000000504</speed>
<attack>40</attack>
<defense>10</defense>
<defense_cavalry>5</defense_cavalry>
<defense_archer>10</defense_archer>
<carry>10</carry>
</axe>
<spy>
<build_time>450</build_time>
<pop>2</pop>
<speed>8.99999999928</speed>
<attack>0</attack>
<defense>2</defense>
<defense_cavalry>1</defense_cavalry>
<defense_archer>2</defense_archer>
<carry>0</carry>
</spy>
<light>
<build_time>900</build_time>
<pop>4</pop>
<speed>9.999999998</speed>
<attack>130</attack>
<defense>30</defense>
<defense_cavalry>40</defense_cavalry>
<defense_archer>30</defense_archer>
<carry>80</carry>
</light>
<heavy>
<build_time>1800</build_time>
<pop>6</pop>
<speed>11.0000000011</speed>
<attack>150</attack>
<defense>200</defense>
<defense_cavalry>80</defense_cavalry>
<defense_archer>180</defense_archer>
<carry>50</carry>
</heavy>
<ram>
<build_time>2400</build_time>
<pop>5</pop>
<speed>29.9999999976</speed>
<attack>2</attack>
<defense>20</defense>
<defense_cavalry>50</defense_cavalry>
<defense_archer>20</defense_archer>
<carry>0</carry>
</ram>
<catapult>
<build_time>3600</build_time>
<pop>8</pop>
<speed>29.9999999976</speed>
<attack>100</attack>
<defense>100</defense>
<defense_cavalry>50</defense_cavalry>
<defense_archer>100</defense_archer>
<carry>0</carry>
</catapult>
<snob>
<build_time>9000</build_time>
<pop>100</pop>
<speed>34.9999999993</speed>
<attack>30</attack>
<defense>100</defense>
<defense_cavalry>50</defense_cavalry>
<defense_archer>100</defense_archer>
<carry>0</carry>
</snob>
</config>
Why?
It is a QOL Feature for script developers to not have to hard code those values.
Also in case the costs will change in future tools that use them will continue to work correctly
This was actually part of the world data a long time ago, but got removed (most likely by accident since it is not mentioned in the release notes). Based on my research it got removed in version 8.97 (I came to that conclusion, because on 2. September 2017 I got the first mention about a tool not working (since 4 days) and after examination found out that this was due to a change in world data - The only update I could find in the Changelog was V8.97 that released in 25. august 2017)