Arcen Games

General Category => AI War II => AI War II - Modding => Topic started by: keith.lamothe on August 01, 2017, 11:11:33 am

Title: Modding Tutorial Videos
Post by: keith.lamothe 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.
Title: Re: Modding Tutorial Videos
Post by: BadgerBadger 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)
Title: Re: Modding Tutorial Videos
Post by: keith.lamothe 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).
Title: Re: Modding Tutorial Videos
Post by: BadgerBadger 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. 
Title: Re: Modding Tutorial Videos
Post by: Cyborg on August 01, 2017, 07:30:03 pm
Thanks for doing these! Watching them now.
Title: Re: Modding Tutorial Videos
Post by: Cyborg 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.
Title: Re: Modding Tutorial Videos
Post by: keith.lamothe on August 02, 2017, 07:45:04 am
Very glad to hear it's working well :)
Title: Re: Modding Tutorial Videos
Post by: relmz32 on April 29, 2018, 04:29:51 am
sorry to bother, but are these videos up-to-date for current modding?
Title: Re: Modding Tutorial Videos
Post by: BadgerBadger 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.
Title: Re: Modding Tutorial Videos
Post by: swizzlewizzle 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.
Title: Re: Modding Tutorial Videos
Post by: BadgerBadger on March 02, 2020, 09:59:55 pm
Those videos are truly ancient, and are of steadily decreasing value over time.