Author Topic: Simple mod question on building the AIWarExternalCode.dll  (Read 7568 times)

Offline rogerbacon

  • Newbie Mark II
  • *
  • Posts: 11
Simple mod question on building the AIWarExternalCode.dll
« on: April 29, 2020, 11:41:05 am »
I made a simple change in Hacking_GrantShipLine.GetCanBeHacked to allow MobileSupportFleetFlagship fleets to hack ARS. I compiled and the code went into AI War 2\GameData\ModdableLogicDLLs. However the change does not show up. I even tried a simple change to the rejection text to see if my change was showing up but I stil saw teh default text for the rejection message.

Is there something else I have to do? Manually move the DLL? Build in release mode? Anything?

Offline Draco18s

  • Resident Velociraptor
  • Core Member Mark V
  • *****
  • Posts: 4,251
Re: Simple mod question on building the AIWarExternalCode.dll
« Reply #1 on: April 29, 2020, 02:30:47 pm »
I'm unsure as to the extent of what modifications can actually be made with the external project (I've only messed with mapgen).

But to answer this part:
Is there something else I have to do? Manually move the DLL? Build in release mode? Anything?
Nope, just do a clean build and it should load up just fine.

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: Simple mod question on building the AIWarExternalCode.dll
« Reply #2 on: April 29, 2020, 08:57:48 pm »
Go look through your steam install for all the copies of the external data DLL and make sure they are replaced by the new copy you compiled.

Offline rogerbacon

  • Newbie Mark II
  • *
  • Posts: 11
Re: Simple mod question on building the AIWarExternalCode.dll
« Reply #3 on: April 29, 2020, 09:12:45 pm »
Go look through your steam install for all the copies of the external data DLL and make sure they are replaced by the new copy you compiled.

That was it. Thanks.
For others reading this, there is a second copy located at AI War 2\ReliableDLLStorage\ArcenDLLs. That needs to be manually copied over. The modding tutorial didn't show that. It was probably changed at some point and the video wasn't updated.

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: Simple mod question on building the AIWarExternalCode.dll
« Reply #4 on: April 29, 2020, 11:52:10 pm »
The tutorial videos are extremely out of date at this point, unfortunately

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Simple mod question on building the AIWarExternalCode.dll
« Reply #5 on: May 05, 2020, 09:58:55 am »
Yep, sorry about that.

The game does only read from AI War 2\GameData\ModdableLogicDLLs during runtime.  However, the extra copy in AI War 2\ReliableDLLStorage\ArcenDLLs is what is compiled-against.  It would be how your external visual would be compiled against your regular external one.  If you made a change that vis requires, then that would cause basically the main external to compile, but not vis. And that's probably what happened in your case.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!