Jump to content

Breaking Changes following 22379


Stan`
 Share

Recommended Posts

Hello everyone,

Following https://trac.wildfiregames.com/changeset/22379 there will be some changes needed for those of you who have mods modifying templates. I believe that's most of you.

Before rP22379 a typical attack component was defined like this: 

  <Attack>
    <Ranged>
      <Hack>0.0</Hack>
      <Pierce>12.0</Pierce>
      <Crush>0.0</Crush>
      <MaxRange>72.0</MaxRange>
      <MinRange>0.0</MinRange>
      <PrepareTime>1200</PrepareTime>
      <RepeatTime>2000</RepeatTime>
      <Delay>0</Delay>
      <Projectile>
        <Speed>75.0</Speed>
        <Spread>1.5</Spread>
        <Gravity>9.81</Gravity>
        <LaunchPoint y="3"/>
      </Projectile>
      <PreferredClasses datatype="tokens">Human</PreferredClasses>
      <RangeOverlay>
        <LineTexture>outline_border.png</LineTexture>
        <LineTextureMask>outline_border_mask.png</LineTextureMask>
        <LineThickness>0.175</LineThickness>
      </RangeOverlay>
    </Ranged>
  </Attack>

Now you have to wrap Hack, Pierce, Crush (but not Capture !) into a Damage Tag

  <Attack>
    <Ranged>
      <Damage>
        <Hack>0.0</Hack>
        <Pierce>12.0</Pierce>
        <Crush>0.0</Crush>
      </Damage>
      <MaxRange>72.0</MaxRange>
      <MinRange>0.0</MinRange>
      <PrepareTime>1200</PrepareTime>
      <RepeatTime>2000</RepeatTime>
      <Delay>0</Delay>
      <Projectile>
        <Speed>75.0</Speed>
        <Spread>1.5</Spread>
        <Gravity>9.81</Gravity>
        <LaunchPoint y="3"/>
      </Projectile>
      <PreferredClasses datatype="tokens">Human</PreferredClasses>
      <RangeOverlay>
        <LineTexture>outline_border.png</LineTexture>
        <LineTextureMask>outline_border_mask.png</LineTextureMask>
        <LineThickness>0.175</LineThickness>
      </RangeOverlay>
    </Ranged>
  </Attack>

Also note this will be breaking auras and technologies as well.

{
    "type": "range",
    "radius": 50,
    "affects": [
        "Soldier"
    ],
    "modifications": [
        {
            "value": "Attack/Melee/Crush",
            "multiply": 1.20
        },
        {
            "value": "Attack/Ranged/Hack",
            "multiply": 1.20
        }
    ],
    "auraName": "Religious Fervor",
    "auraDescription": "+20% attack damage for soldiers.",
    "overlayIcon": "art/textures/ui/session/auras/attack_bonus.png"
}

Will become

{
    "type": "range",
    "radius": 50,
    "affects": [
        "Soldier"
    ],
    "modifications": [
        {
            "value": "Attack/Melee/Damage/Crush",
            "multiply": 1.20
        },
        {
            "value": "Attack/Ranged/Damage/Hack",
            "multiply": 1.20
        }
    ],
    "auraName": "Religious Fervor",
    "auraDescription": "+20% attack damage for soldiers.",
    "overlayIcon": "art/textures/ui/session/auras/attack_bonus.png"
}

 

{
    "genericName": "Close Combat Cavalry Training",
    "specificName": {
        "mace": "Xyston",
        "spart": "Xyston",
        "athen": "Xyston",
        "sele": "Xyston",
        "ptol": "Xyston",
        "rome": "Hasta"
    },
    "description": "Training increases melee attack.",
    "cost": {
        "food": 500,
        "wood": 750,
        "stone": 0,
        "metal": 350
    },
    "requirements": {
        "tech": "phase_town"
    },
    "requirementsTooltip": "Unlocked in Town Phase.",
    "icon": "horse_trainer.png",
    "researchTime": 40,
    "tooltip": "+20% melee cavalry attack.",
    "modifications": [
        {
            "value": "Attack/Melee/Hack",
            "multiply": 1.2
        },
        {
            "value": "Attack/Melee/Pierce",
            "multiply": 1.2
        },
        {
            "value": "Attack/Melee/Crush",
            "multiply": 1.2
        }
    ],
    "affects": [
        "Cavalry Melee"
    ],
    "soundComplete": "interface/alarm/alarm_upgradearmory.xml"
}

Becomes

{
    "genericName": "Close Combat Cavalry Training",
    "specificName": {
        "mace": "Xyston",
        "spart": "Xyston",
        "athen": "Xyston",
        "sele": "Xyston",
        "ptol": "Xyston",
        "rome": "Hasta"
    },
    "description": "Training increases melee attack.",
    "cost": {
        "food": 500,
        "wood": 750,
        "stone": 0,
        "metal": 350
    },
    "requirements": {
        "tech": "phase_town"
    },
    "requirementsTooltip": "Unlocked in Town Phase.",
    "icon": "horse_trainer.png",
    "researchTime": 40,
    "tooltip": "+20% melee cavalry attack.",
    "modifications": [
        {
            "value": "Attack/Melee/Damage/Hack",
            "multiply": 1.2
        },
        {
            "value": "Attack/Melee/Damage/Pierce",
            "multiply": 1.2
        },
        {
            "value": "Attack/Melee/Damage/Crush",
            "multiply": 1.2
        }
    ],
    "affects": [
        "Cavalry Melee"
    ],
    "soundComplete": "interface/alarm/alarm_upgradearmory.xml"
}

This change will then allow any modder to add different types of attack to his mod. One currently has hack, pierce, crush, and could add, magic, fire etc... following https://code.wildfiregames.com/D1938

 

 

Sorry for the inconvenience and Happy modding :) You can answer this thread if you need further details

  • Like 6
Link to comment
Share on other sites

@Stan`found some problems: 1. When farmers and riders hunt wild deer, they will not chase the prey when they reach half or run in another direction. It seems that they can't find the prey. When the prey is shot, the rider will not automatically get the food. He needs to give instructions again to get the food. 2. Wild animals can only stay where they are. They can't walk.

Link to comment
Share on other sites

1 minute ago, gameboy said:

@Stan`found some problems: 1. When farmers and riders hunt wild deer, they will not chase the prey when they reach half or run in another direction. It seems that they can't find the prey. When the prey is shot, the rider will not automatically get the food. He needs to give instructions again to get the food. 2. Wild animals can only stay where they are. They can't walk.

Not related :) Those bugs were already reported to @wraitii I believe.

Link to comment
Share on other sites

1 hour ago, gameboy said:

Really?  I don't seem to feel that wraitii is paying attention to these problems. They really need him to solve them. If you are free now, please tell him.

Hey @gameboy

I am working on these issues, and uploading diffs regularly. They will be fixed, don't worry.

Thanks for reporting them anyways :) 

  • Like 1
  • Thanks 2
  • Haha 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...