Author Topic: Modding Tutorial Videos  (Read 32454 times)

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Modding Tutorial Videos
« on: August 01, 2017, 11:11:33 am »
Video request:

Modding workflow.
A few weeks later, but here it is:

AI War 2 - Modding Tutorial - Part 1 of 4 : Basic XML Modding (12 minutes)

Making a faster fighter, to show the basic process of an xml-only mod for AI War 2.

Software needed:
1) The game
2) A text editor


AI War 2 - Modding Tutorial - Part 2 of 4 : Basic C# Modding (5 Minutes)

Making maps seed with no warp gates, to show the basic process of a C# external code mod for AI War 2.

Software needed:
1) The game
2) A text editor
3) A C# Compiler ( https://www.visualstudio.com/downloads/ or http://www.monodevelop.com/download/ , for example)


AI War 2 - Modding Tutorial - Part 3 of 4 : Intermediate Modding (47 minutes)

Making ghosts pop out of nowhere to hunt and harass the player, to show how to use XML and C# modding to make a significant addition to the game.


AI War 2 - Modding Tutorial - Part 4 of 4 : Redistributable Mods (20 minutes)

Making a redistributable mod out of the Ghosts faction from part 3.
This is also the process to follow for mods you're doing for yourself and want to keep them around and not have them be stomped on by updates to the game.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: Modding Tutorial Videos
« Reply #1 on: August 01, 2017, 02:06:46 pm »
I'm really glad you gave that Pathfinder example. I was going to need to reimplement that function for myself since I didn't realize it existed!

I also wish these videos had existed before I did the Nanocaust, but on the plus side I had to figure it all out by trial and error (and a few questions you answered), which makes for great learning.

PS I guessed that the EntityData was null as soon as you hit the error


PPS What exactly was broken about the old build process? The old one put the DLLs in the Debug subdir, then you just had to copy it to the GameData/ModdableLogicDLLs directory (which was documented in the "How to mod" wiki page)
« Last Edit: August 01, 2017, 02:09:11 pm by BadgerBadger »

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Modding Tutorial Videos
« Reply #2 on: August 01, 2017, 02:13:38 pm »
PS I guessed that the EntityData was null as soon as you hit the error
Yea, I figured it could be null, I just didn't see from the error message how that would have caused the problem. I had just forgotten that in-the-wild stack traces cannot necessarily be fully trusted to tell you where the exception was actually thrown.

Quote
PPS What exactly was broken about the old build process? The old one put the DLLs in the Debug subdir, then you just had to copy it to the GameData/ModdableLogicDLLs directory (which was documented in the "How to mod" wiki page)
There was that, and the post-build step that called a build script that didn't exist in the steam copy. So nothing awful, but a significant impediment if you didn't know how to correct for the former and know that you ignore the latter (or remove the step).
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: Modding Tutorial Videos
« Reply #3 on: August 01, 2017, 02:19:16 pm »
Oh, there's another gotcha in the build process if you aren't using visual studio. You have to run the compilation from a process whose current working directory is ~/AIWar2/AIWarExternalCode/src due to the file globbing in the csproj. My compile script automagically changes my working directory for me, but it's really not obvious if you don't know what you are looking for. 

Offline Cyborg

  • Master Member Mark III
  • *****
  • Posts: 1,957
Re: Modding Tutorial Videos
« Reply #4 on: August 01, 2017, 07:30:03 pm »
Thanks for doing these! Watching them now.
Kahuna strategy guide:
http://www.arcengames.com/forums/index.php/topic,13369.0.html

Suggestions, bugs? Don't be lazy, give back:
http://www.arcengames.com/mantisbt/

Planetcracker. Believe it.

The stigma of hunger. http://wayw.re/Vi12BK

Offline Cyborg

  • Master Member Mark III
  • *****
  • Posts: 1,957
Re: Modding Tutorial Videos
« Reply #5 on: August 01, 2017, 08:18:15 pm »
I just built my first XML mod using Programmer's Notepad *and* C# mod using Visual Studio community edition and following along with the tutorials. Both are free software and painless to install.

That wasn't bad at all! I was off and running in mere minutes. I was expecting lots of, edit this flag, install these build files with these flagsā€¦ and you are really just double-clicking and directly into the code. Just wow. So clean.

Nice job.
Kahuna strategy guide:
http://www.arcengames.com/forums/index.php/topic,13369.0.html

Suggestions, bugs? Don't be lazy, give back:
http://www.arcengames.com/mantisbt/

Planetcracker. Believe it.

The stigma of hunger. http://wayw.re/Vi12BK

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Modding Tutorial Videos
« Reply #6 on: August 02, 2017, 07:45:04 am »
Very glad to hear it's working well :)
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline relmz32

  • Full Member Mark II
  • ***
  • Posts: 187
Re: Modding Tutorial Videos
« Reply #7 on: April 29, 2018, 04:29:51 am »
sorry to bother, but are these videos up-to-date for current modding?
A programmer had a problem. She thought to herself, "I know, I'll solve it with threads!". has Now problems. two she.

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: Modding Tutorial Videos
« Reply #8 on: April 29, 2018, 09:31:23 am »
I haven't watched those vids in some time, but I believe they are up to date enough. Some minor details have changed (for example, the WorldSide object is now a Faction object), but the principles are all sound. If you have any questions, feel free to ask.

If you are trying to do anything complex, note that pretty much all the minor factions are implemented entirely in external code (aka stuff that's accessible to modding), so I would strongly recommend looking at them for examples of how to do things. In every case there's an xml component and a C# component.

If you watch the videos and also check out some of the existing minor faction code then you should be in a good place to start.
« Last Edit: June 29, 2018, 12:23:45 am by BadgerBadger »

Offline swizzlewizzle

  • Newbie Mark III
  • *
  • Posts: 43
Re: Modding Tutorial Videos
« Reply #9 on: March 02, 2020, 09:09:07 pm »
Tutorial 4, regarding getting a mod that changes code in, needs to be updated.

Particularly, the part about adding a compile reference to all src files (**/*.cs) completely threw me off, and doesn't work. Instead, information needs to be added/ammended on how to reference the externalcode DLL instead.

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: Modding Tutorial Videos
« Reply #10 on: March 02, 2020, 09:59:55 pm »
Those videos are truly ancient, and are of steadily decreasing value over time.