[A16] XML changes & update necessities

Started by Thundercraft, December 14, 2016, 04:24:05 AM

Previous topic - Next topic

Thundercraft

I just thought that I would start a topic as a place to share observations about significant changes to XML with A16 and to discuss what is or isn't necessary to update a mod. Disclaimer: I'll freely admit that I'm no expert at modding. But I'll start:
  • With the introduction of the research tree, there are now <researchViewX> and <researchViewY> tags for <ResearchProjectDef>. (See the ResearchProjects_Tier?_Misc.xml files.) I have not yet tested how the game reacts if a mod lacks those.
  • For Hediffs, I've noticed that <bleeding> tags have been replaced with <bleedRate> tags.
  • Also, the way HediffComp classes are handled is different. It's now "HediffCompProperties", instead. For example, what used to be <comp><li><compClass>HediffComp_Disappears</compClass> is now done with
    <li Class="HediffCompProperties_Disappears">.
  • Items have <Mass> tags now, to indicate weight. Are these mandatory? Will the game throw an error or warning if an item lacks these?
  • For guns, <warmupTicks> tags have been replaced with <warmupTime>. (See Weapons_Guns.xml.) I'm not sure what the exchange rate is, but it seems warmupTime is typically around 1 or 2.
  • I've noticed <smeltable> tags on guns now.
  • I've noticed <Beauty> tags on guns. (A negative value, that is.)
  • I noticed that the <RangedWeapon_Cooldown> for several guns was increased. (I thought that might be noteworthy for efforts to balance mod weapons with vanilla.)
Also, it should be worth noting that the market value for several materials has been changed:

       gold = 10 (was 15)
   plasteel = 14 (was 27)
    uranium = 6 (was 5)
      cloth = 2.8 (was 1.5)
  synthread = 7 (was 11)
devilstrand = 10 (was 12)
hyperweave = 16 (was 45)
       wool = 3 (was 4)


I think any changes to the market value of materials should be important to modders because the ingredient costs and market values of modded items should probably reflect such changes.

Feedback? Have other observations on code changes or advice on updating for A16?
BTW: I just noticed that the XML Auto-Documentation Test Build topic has been updated for A16.

Edit (Only somewhat related):
Notable changes between A13 and A15 (useful for updating old mods):
  • "BuildingTall" is no longer valid for use with <altitudeLayer> tags. Must use "Building", instead.

RawCode

notepad++
plus
https://sourceforge.net/projects/npp-compare/

no need to "notice" anything, all and every change is highlighed for you

Thundercraft

Quote from: RawCode on December 14, 2016, 07:05:56 AM
...no need to "notice" anything, all and every change is highlighed for you

[sigh]  ::) That may be good advice. But I stand by my claim that there -is- a need to notice details like these. Using the right tools does not automatically fix our mods to work with A16. It can't magically tell us which tags have been retired or made obsolete, nor indicate which changes will impact a mod's game balance.

Actually, I do use Notepad++. But, mostly, I've been using WinMerge, which does a pretty good job of comparing two files and showing exactly what has changed between them. However, this is only meaningful if the two files are very similar, to the point of being almost identical.

For instance, using a compare tool to compare our mod's files with vanilla A16 files is only useful if our mod contains certain files that are nearly identical to a counterpart file in vanilla. But, from looking at the content of various mods, I think it's safe to say that this often not the case.

Yeah, I can compare vanilla A16 files with A15's vanilla counterpart files, to see what's changed. And that's exactly what I've been doing. But there's actually a whole lot that has been changed! And most of what was changed does not impact the process of updating a mod for A16. As such, trying to find little .XML details which would prevent an A15 mod from working in A16 feels like trying to find a needle in a haystack - which is why I started this topic.

Rant over, I wanted to share something else I found. When I tried to update a food mod to A16, I missed something and it generated this error:
QuoteXML error: <tastesRaw>true</tastesRaw> doesn't correspond to any field in type IngestibleProperties.

Apparently, <tastesRaw> tags are no longer valid. Looking through vanilla files (specifically, Items_Resource_RawPlant.xml), I think this is what is now being used instead:
<ingestible>
<preferability>RawBad</preferability>
<tasteThought>AteRawFood</tasteThought>
...

Plymouth


RawCode

well, running game single time will push all broken xml fields into log, you can't solve issues in advance without running game (or in case of time kind automated tool that perfectly possible) running game by someone else and harvesting required data for you.

Thundercraft

#5
I noticed that several aspects of Luciferium has changed in A16. The most obvious is probably that the price has gone up. The 'market value'  has been increased from 100 to 120. And it now has <doToGeneratedPawnIfAddicted> tags set to 'true'. And has been given a mass: <Mass>0.003</Mass> Also, it seems that rumors about Luciferium healing old people in A16 may be true as it has this new tag: <li Class="HediffCompProperties_HealOldWounds" />

Other changes
Consciousness buff: 0.10 (down from 0.25)
Moving buff: 0.05 (down from 0.25)
Sight buff: 0.15 (down from 0.20)
Hearing buff: none (down from 0.20)

As such, I wonder if Luciferium is ever worth using, considering the increased price and the terrible consequences. The withdrawal symptoms remain unchanged from A15.

Edit 1:
There are several changes in 'Items_Resource_Manufactured.xml', too. Aside from the new Chemfuel resource (and the addition of <Mass> tags everywhere), the <MedicalPotency> of medicine has be decreased from 1 to 0.70, and the <MedicalPotency> of herbal medicine was decreased from 0.75 to 0.40. That, and items which lacked <DeteriorationRate> tags now have them. With a <DeteriorationRate> of 2, glitterworld medicine will probably degrade rather rapidly. (And, personally, I don't like how components have a <DeteriorationRate> now.)

Edit 2:
I learned that the <plantsDestroyWithMe> tag (under <building>) is no longer valid as in A16 and will throw an error.

Thundercraft

When trying to update a mod with a mortar, I found these issues:
  • The <turretBurstWarmupTicks> tags are no longer valid. Mods must use <turretBurstwarmupTime> tags, instead. And this value is measured in seconds instead of ticks.
  • Similarly, the <turretBurstCooldownTicks> tags are no longer valid and mods must use <turretBurstCooldownTime>, instead. This is also measured in seconds instead of ticks.

skullywag

#7
This goes for all "ticks" based stuff, its now "time" weapon cooldowns etc have the same change as youve noted.

Also a big one people are missing is that worktomake is no longer uaed on buildings, worktobuild must be used. Or buildings take not ticks to build. Ive seen it a lot in mods.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

Thundercraft

#8
Thanks, skullywag! Those <worktomake> tags are definitely easy to miss if they don't even generate an error. (BTW: This must be a name change only as the values for <WorkToBuild> are exactly the same as for <worktomake>.)

Another discovery: In trying to update a mod with a bed, I learned that <Bed_HealTickInterval> tags are no longer valid. Instead, mods must use <bed_healPerDay> tags if they want their beds to heal colonists while sleeping. The values do not translate, either. But the vanilla bed has a value of "7", which is a good reference point, I guess.

Oh, and most furniture seems to have this:
<comps>
<li Class="CompProperties_RoomIdentifier">
<roomStat>Impressiveness</roomStat>
</li>
</comps>


I believe that all this does is tell the game that this building affects room impressiveness.

skullywag

Worktomake is still valid, its used for crafting items, worktobuild is only for buildings and building them.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

Thirite

Not sure if this is the right topic, but using the new xml field packAnimal will make the PawnRenderer class look for *Pack_*.png textures in the same directory as the pawn's textures and let that animal be used for hauling stuff in a caravan. Their carry weight seems to be based on body size.

eg: HorsePack_side.png holds a texture of a saddlebag that will overlay the Horse_side.png texture.