xzjv
Community Developer
- Joined
- Mar 17, 2014
- Messages
- 1,243
- Reaction score
- 46
Getting started guide for people interested in fixing broken bounties or adding new ones.
Get set up
Using a proper coding tool is not required, you can do it in notepad. But i strongly recommend you use Visual Studio with Resharper.
Visual studio can be obtained for free here: https://www.visualstudio.com/en-us/products/free-developer-offers-vs.aspx
If you're going to be doing a lot of work with SVN i recommend TortoiseSVN https://tortoisesvn.net/
Grab the source
Developer Trunk SVN:
https://www.assembla.com/spaces/bulba-s-adventurer/subversion/source/HEAD/trunk
Configure Solution
Make sure you can build, if not then first check that the references are all up to date, remove DemonBuddy.exe and re-add them from a DB directory. Check the build script and update if necessary where it will be copying the build to.
1. Find the Bounty you're after or create a new entry.
The bounty 'profiles' so to speak are located in the file. Game\Quests\BountyDataFactory.cs
Most of them are defined fairly simply. An entry looks like this
Note: Some bounties you might not be able to find because they are created as a 'DynamicBounty' which just means that parts of the bounty change every time you see them. These are listed by Id in the 'DynamicBountyDirectory' at the top of BountyDataFactory.cs. There are four bounties currently using this system, they are: CursedShrines, BoundShaman, BlackKingsLegacy and PlagueOfBurrowers. Essentially they are run from a generic template that can handle the variable aspects.
Note: you can dump all quests to find quest-ids by having DB open and pressing CTRL+5 while the Diablo3 window has focus. The info will show up in the DB log window.
2. Editing a Bounty
The Coroutines property contains the logic that will get run while on the bounty. The easiest way to put these together is use the buttons on the Adventurer tab in DB main window to generate them while walking yourself through completing the bounty manually.
For example this is making a bounty for "Kill Demonika the Wicked.'
Log Shows "new MoveToMapMarkerCoroutine(346230, 79401, 236772676),"
In this case it's a specific monster that needs to be killed, so the marker will take you to it.
Then the bounty also requires to kill X units in the level. So...
Log Shows "new ClearLevelAreaCoroutine(346230),"
The final Bounty looks like this.
Note: The button 'EnterLevelArea' will require that you be close to the portal before it will log the information.
Regarding Waypoints:
In most cases the waypoint is figured out automagically, if it's not getting it correct. You can add a property "WaypointLevelAreaId" with the levelAreaId after using the waypoint from the map. This method allows the waypoint numbers to change whenever a new area is added or moved without having to update hundreds of hardcoded waypoint numbers.
3. Testing a Bounty
You will need to make sure that the bounty is working by running it many times and watching the bot. To do that, add the questId to a profile with a RunBounty tag. This lets you keep recreating games and run only the specific bounties you want.
Get set up
Using a proper coding tool is not required, you can do it in notepad. But i strongly recommend you use Visual Studio with Resharper.
Visual studio can be obtained for free here: https://www.visualstudio.com/en-us/products/free-developer-offers-vs.aspx
If you're going to be doing a lot of work with SVN i recommend TortoiseSVN https://tortoisesvn.net/
Grab the source
Developer Trunk SVN:
https://www.assembla.com/spaces/bulba-s-adventurer/subversion/source/HEAD/trunk
Configure Solution
Make sure you can build, if not then first check that the references are all up to date, remove DemonBuddy.exe and re-add them from a DB directory. Check the build script and update if necessary where it will be copying the build to.
1. Find the Bounty you're after or create a new entry.
The bounty 'profiles' so to speak are located in the file. Game\Quests\BountyDataFactory.cs
Most of them are defined fairly simply. An entry looks like this
Code:
// A2 - Clear the Eastern Channel (433005)
Bounties.Add(new BountyData
{
QuestId = 433005,
Act = Act.A2,
WorldId = 433001,
QuestType = BountyQuestType.ClearZone,
Coroutines = new List<ISubroutine>
{
new EnterLevelAreaCoroutine (433005, 59486, 432997, 1037011047, 176007),
new EnterLevelAreaCoroutine (433005, 432997, 433001, 1037011048, 176007, true),
new ClearLevelAreaCoroutine (433005)
}
});
- There are quite a few so the best way is to search/find through the file using the Id or the name of the bounty you want.
- There are many bounties that are commented out, this is almost always because they were bugged and failing a lot.
Note: Some bounties you might not be able to find because they are created as a 'DynamicBounty' which just means that parts of the bounty change every time you see them. These are listed by Id in the 'DynamicBountyDirectory' at the top of BountyDataFactory.cs. There are four bounties currently using this system, they are: CursedShrines, BoundShaman, BlackKingsLegacy and PlagueOfBurrowers. Essentially they are run from a generic template that can handle the variable aspects.
Note: you can dump all quests to find quest-ids by having DB open and pressing CTRL+5 while the Diablo3 window has focus. The info will show up in the DB log window.
2. Editing a Bounty
The Coroutines property contains the logic that will get run while on the bounty. The easiest way to put these together is use the buttons on the Adventurer tab in DB main window to generate them while walking yourself through completing the bounty manually.
For example this is making a bounty for "Kill Demonika the Wicked.'
- Go to the bounty area "Tower of the Damned Level 1"
- Go to Adventurer Tab,
- Click "MoveToMapMarker" button.
Log Shows "new MoveToMapMarkerCoroutine(346230, 79401, 236772676),"
In this case it's a specific monster that needs to be killed, so the marker will take you to it.
Then the bounty also requires to kill X units in the level. So...
- Click "ClearLevelArea" button.
Log Shows "new ClearLevelAreaCoroutine(346230),"
The final Bounty looks like this.
Code:
// A3 - Kill Demonika the Wicked (346230)
Bounties.Add(new BountyData
{
QuestId = 346230,
Act = Act.A3,
WorldId = 79401,
QuestType = BountyQuestType.KillMonster,
Coroutines = new List<ISubroutine>
{
new KillUniqueMonsterCoroutine (346230,79401, 220783, 236772676),
new ClearLevelAreaCoroutine (346230)
}
});
Note: The button 'EnterLevelArea' will require that you be close to the portal before it will log the information.
Regarding Waypoints:
In most cases the waypoint is figured out automagically, if it's not getting it correct. You can add a property "WaypointLevelAreaId" with the levelAreaId after using the waypoint from the map. This method allows the waypoint numbers to change whenever a new area is added or moved without having to update hundreds of hardcoded waypoint numbers.
3. Testing a Bounty
You will need to make sure that the bounty is working by running it many times and watching the bot. To do that, add the questId to a profile with a RunBounty tag. This lets you keep recreating games and run only the specific bounties you want.
Code:
<Profile>
<Name>Adventurer Specific Bounty</Name>
<KillMonsters>True</KillMonsters>
<PickupLoot>True</PickupLoot>
<GameParams act="OpenWorld" resumeFromSave="False" isPrivate="True" numGames="1" />
<Order>
<RunBounty questId="359116"/>
<RunBounty questId="448270"/>
<RunBounty questId="346184"/>
<LeaveGame reason="Done"/>
</Order>
</Profile>