Patching a user-made addon.

General feedback and discussion of the game.

Moderators: Forum Moderators, Developers

Post Reply
7ytd765789
Posts: 10
Joined: May 18th, 2018, 12:19 pm

Patching a user-made addon.

Post by 7ytd765789 » July 20th, 2018, 1:59 pm

So my brother was playing an addon campaign called Way of Dragon (on tBfW 1.12.6) and ran into an issue in the second scenario, on hard mode. I have fixed the issue, and used Git to make a patch file out of my change. What do I do now?
(Note, the addon hasn't been updated since 2015, it might be unmaintained. If so, what can I do?)
The patch, as produced by the command

Code: Select all

git format-patch HEAD~1

Code: Select all

From ab882c7818edae575781ec08d14a996e5daabd45 Mon Sep 17 00:00:00 2001
From: John Matthew Narofsky <7ytd765789@gmail.com>
Date: Fri, 20 Jul 2018 08:39:30 -0500
Subject: [PATCH] Fixed: On Hard difficulty, scenario 01AncientDamnation fails
 to load. It was because side 5 was omitted via an ifdef NORMAL while side 6
 was included, via an ifdef HARD. I have duplicated the side 5 definition
 inside the ifdef HARD, so that side 5 is declared before side 6 is.

---
 scenarios/01AncientDamnation.cfg | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/scenarios/01AncientDamnation.cfg b/scenarios/01AncientDamnation.cfg
index edf95ae..a6be762 100644
--- a/scenarios/01AncientDamnation.cfg
+++ b/scenarios/01AncientDamnation.cfg
@@ -123,6 +123,18 @@
     [/side]
 #endif
 #ifdef HARD
+	[side]
+        side=5
+        controller=ai
+        type=Blood Bat
+        id=BatKing3
+        canrecruit=yes
+	recruit=Vampire Bat
+        team_name=Undead
+        user_team_name=_"Undead"
+        {GOLD 12 24 36}
+	{INCOME 1 2 3}
+    [/side]
     [side]
         side=6
         controller=ai
-- 
2.17.1

User avatar
Ravana
Moderator
Posts: 1850
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Patching a user-made addon.

Post by Ravana » July 20th, 2018, 2:02 pm

If its author is inactive, you can port it to 1.14.

7ytd765789
Posts: 10
Joined: May 18th, 2018, 12:19 pm

Re: Patching a user-made addon.

Post by 7ytd765789 » July 20th, 2018, 2:14 pm

I guess I'll give it a shot. I'll post here with results.

7ytd765789
Posts: 10
Joined: May 18th, 2018, 12:19 pm

Re: Patching a user-made addon.

Post by 7ytd765789 » July 21st, 2018, 7:39 pm

Okay then. It appears to work under 1.14, so I've uploaded it to that addon server. I'll be maintaining it in this git repository: https://github.com/JohnMatthewNarofsky/way-of-dragon

Can-ned_Food
Posts: 204
Joined: December 17th, 2015, 10:27 pm

Re: Patching a user-made addon.

Post by Can-ned_Food » July 28th, 2018, 5:21 pm

Maybe you already did all this, but here is what I do in such situations:
  1. Make local patches and comments for the minimal changes necessary.
  2. Search for the message board topic devoted to the add–on.
    If it has one, post my patch or comments there. Elsewise, I don't make one.
  3. Send the author a PM if they have an account on the message board.
  4. Copy the add–on or make a fork with its version control system if available.
  5. If they don't reply in a resonable amount of time — a few weeks or a few days, depending on the time since they were last active on the message board, — then I apply my patch and other desired changes to my copy.
  6. Upload the new version of the add–on. Mention the original authors above my name.
  7. Send a second PM to the author notifying them of the new add–on.
If I completely disassembled pieces of someone else's add–on for inclusion in one of my own, then the procedure is somewhat different. Sometimes I write a scenario for a bare map, or rewrite a scenario, or develop my own [modification] with designs taken from another.

Post Reply