Difference between revisions of "AI War 2:Modding Sub-Nodes Of Entities"
X4000Chris (talk | contribs) (Created page with " === Metal_Flow === This entry is required for ships that self-build (that you directly place), and would look like this: <metal_flow purpose="SelfConstruction" throughput="...") |
|||
(One intermediate revision by one other user not shown) | |||
Line 4: | Line 4: | ||
This entry is required for ships that self-build (that you directly place), and would look like this: | This entry is required for ships that self-build (that you directly place), and would look like this: | ||
− | <metal_flow purpose="SelfConstruction" throughput="500"/> | + | <metal_flow purpose="SelfConstruction" throughput="500"/> |
That's the basic throughput speed for things that are building themselves, which defines how much metal is spent per second by that entity constructing itself. Without that entry, self-building units '''will not build'''! They'll just sit there at 0% health. | That's the basic throughput speed for things that are building themselves, which defines how much metal is spent per second by that entity constructing itself. Without that entry, self-building units '''will not build'''! They'll just sit there at 0% health. | ||
+ | |||
+ | EDIT: It might be useful to describe the difference between creating a unit with or without SelfConstruction in the C# | ||
For ships that have an assist_range, they are likely a rebuilder, able to claim ships, or some form of engineer. A rebuilder would have an entry like this, as one example: | For ships that have an assist_range, they are likely a rebuilder, able to claim ships, or some form of engineer. A rebuilder would have an entry like this, as one example: | ||
− | <metal_flow purpose="RebuildingRemains" throughput="100" increase_per_mark_level="0"/> | + | <metal_flow purpose="RebuildingRemains" throughput="100" increase_per_mark_level="0"/> |
Without that entry, the rebuilder won't actually be a rebuilder. A single ship can be a rebuilder and an engineer, if you wish, by simply defining metal flows for all those purposes. You can mix and match any metal flow purposes on any ship. | Without that entry, the rebuilder won't actually be a rebuilder. A single ship can be a rebuilder and an engineer, if you wish, by simply defining metal flows for all those purposes. You can mix and match any metal flow purposes on any ship. | ||
Line 16: | Line 18: | ||
Still looking at the example above, the amount of throughput defined determines how much metal is spent, per second, on doing rebuilding by one of these ships. You can have that increase on higher marks by setting the increase_per_mark_level to something larger than zero. Such as: | Still looking at the example above, the amount of throughput defined determines how much metal is spent, per second, on doing rebuilding by one of these ships. You can have that increase on higher marks by setting the increase_per_mark_level to something larger than zero. Such as: | ||
− | <metal_flow purpose="RebuildingRemains" throughput="100" increase_per_mark_level="25"/> | + | <metal_flow purpose="RebuildingRemains" throughput="100" increase_per_mark_level="25"/> |
With that, mark 1 (or markless) would be 100 throughput, mark 2 would be 125, etc. | With that, mark 1 (or markless) would be 100 throughput, mark 2 would be 125, etc. | ||
Line 22: | Line 24: | ||
You can even have it not able to rebuild at lower marks by setting throughput to be 0 or negative, and then setting increase_per_mark_level to be a positive number. Such as this: | You can even have it not able to rebuild at lower marks by setting throughput to be 0 or negative, and then setting increase_per_mark_level to be a positive number. Such as this: | ||
− | <metal_flow purpose="RebuildingRemains" throughput="-100" increase_per_mark_level="50" ignore_when_zero_or_negative="true"/> | + | <metal_flow purpose="RebuildingRemains" throughput="-100" increase_per_mark_level="50" ignore_when_zero_or_negative="true"/> |
With that node, at Mark 4 it would have a throughput of 50 and actually become a rebuilder. At mark 5 it would be a stronger rebuilder with a throughput of 100, etc. Below mark 4 it wouldn't be a rebuilder at all. THAT said, please note the addition of the ignore_when_zero_or_negative="true" If that were not present, then at marks 1 and 2 it would actually PAY you 100 and then 50 metal per second to rebuild things, and then at mark 3 it would stop being a rebuilder, and at mark 4 it would start charging you 50 per second to rebuild. Not at all what you want! So make sure that ignore_when_zero_or_negative="true" is on if you're making something a latent metal_flow user of whatever sort. | With that node, at Mark 4 it would have a throughput of 50 and actually become a rebuilder. At mark 5 it would be a stronger rebuilder with a throughput of 100, etc. Below mark 4 it wouldn't be a rebuilder at all. THAT said, please note the addition of the ignore_when_zero_or_negative="true" If that were not present, then at marks 1 and 2 it would actually PAY you 100 and then 50 metal per second to rebuild things, and then at mark 3 it would stop being a rebuilder, and at mark 4 it would start charging you 50 per second to rebuild. Not at all what you want! So make sure that ignore_when_zero_or_negative="true" is on if you're making something a latent metal_flow user of whatever sort. | ||
The attributes throughput, increase_per_mark_level, and ignore_when_zero_or_negative work the same on all metal_flow nodes. | The attributes throughput, increase_per_mark_level, and ignore_when_zero_or_negative work the same on all metal_flow nodes. |
Latest revision as of 20:38, 10 August 2018
Metal_Flow
This entry is required for ships that self-build (that you directly place), and would look like this:
<metal_flow purpose="SelfConstruction" throughput="500"/>
That's the basic throughput speed for things that are building themselves, which defines how much metal is spent per second by that entity constructing itself. Without that entry, self-building units will not build! They'll just sit there at 0% health.
EDIT: It might be useful to describe the difference between creating a unit with or without SelfConstruction in the C#
For ships that have an assist_range, they are likely a rebuilder, able to claim ships, or some form of engineer. A rebuilder would have an entry like this, as one example:
<metal_flow purpose="RebuildingRemains" throughput="100" increase_per_mark_level="0"/>
Without that entry, the rebuilder won't actually be a rebuilder. A single ship can be a rebuilder and an engineer, if you wish, by simply defining metal flows for all those purposes. You can mix and match any metal flow purposes on any ship.
Still looking at the example above, the amount of throughput defined determines how much metal is spent, per second, on doing rebuilding by one of these ships. You can have that increase on higher marks by setting the increase_per_mark_level to something larger than zero. Such as:
<metal_flow purpose="RebuildingRemains" throughput="100" increase_per_mark_level="25"/>
With that, mark 1 (or markless) would be 100 throughput, mark 2 would be 125, etc.
You can even have it not able to rebuild at lower marks by setting throughput to be 0 or negative, and then setting increase_per_mark_level to be a positive number. Such as this:
<metal_flow purpose="RebuildingRemains" throughput="-100" increase_per_mark_level="50" ignore_when_zero_or_negative="true"/>
With that node, at Mark 4 it would have a throughput of 50 and actually become a rebuilder. At mark 5 it would be a stronger rebuilder with a throughput of 100, etc. Below mark 4 it wouldn't be a rebuilder at all. THAT said, please note the addition of the ignore_when_zero_or_negative="true" If that were not present, then at marks 1 and 2 it would actually PAY you 100 and then 50 metal per second to rebuild things, and then at mark 3 it would stop being a rebuilder, and at mark 4 it would start charging you 50 per second to rebuild. Not at all what you want! So make sure that ignore_when_zero_or_negative="true" is on if you're making something a latent metal_flow user of whatever sort.
The attributes throughput, increase_per_mark_level, and ignore_when_zero_or_negative work the same on all metal_flow nodes.