Empire Deluxe Combined Edition

Empire Deluxe Combined Edition

View Stats:
 This topic has been pinned, so it's probably important
Compiling DLLs
Long ago I swore I would never try scripting. No Way, You can't make me. Well, that ship sailed. Then I swore I'd never learn any programming. Nope, not me. Well, I got tired of fighting ants Named 'George Washington' and such, 'Sun Tzu' was not far off but come on. I needed 'monster' names. To get those I need to edit and recompile a
Last night I downloaded and installed:
Step 1) 'Visual Studio 2015 Community Edition' from Microsoft. (free for Windows 10)
http://download.cnet.com/Visual-Studio-Community-2015/3000-2212_4-76440611.html
You did what? I can visualize Mark shaking his head even as I type this. ☻

Step 2) Watch videos on Youtube to learn about compiling DLLs. OK, (Links to follow)
https://www.youtube.com/watch?v=uosiigQT17A

Step 3) Determine which one DLL you need to edit / compile.

Step 4) Research, aka, 'Ask Questions'

Question 1)
What DLL do I need to edit /re-compile to add / change names of the generals?

Notes / Disclaimers / Warnings
---
Mark and I are not responsible for supporting anything to do with this process. I will do my best once I know what I am doing. As of 18.04.07 I know nothing.
Mark and I are not responsible for your system crashing.
---
Be careful!
Make backups!
Murphy was an Optimist.
---
I am just starting out.
I do not know what I am doing.
I am fully prepared to reinstall the game if I screw something up. You should be too.
< >
Showing 1-15 of 32 comments
CPWilly  [developer] Apr 7 @ 10:31am 
That is a rough, rough tutorial. I would be wary of it because a lot goes unexplained "cut htis", press that", etc.

(more to come)
CPWilly  [developer] Apr 7 @ 11:08am 
So I would recommend that you start by downloading and compiling the "EDCECommon" source code ONLY. This way there will be no code needed for you to change, just need to have a successful compile to make a DLL. You will need that DLL to build your AI code anyway.
CPWilly  [developer] Apr 7 @ 11:17am 
Making C# DLLs is actually called making an "Assembly".

So here are some steps:
- Open the developer
-Do New Project
-At the top set the ".NET Framework" to version 2.0, this is a Unity thing
-You are given a choice of project types, select "Class Library"
-Set The Lib name as EmpireCommon <== This MUST be the name
-Set the file folder location
-Set the solution name to EmpireCommon
-Delete the "Class1" object It automatically created.

(more to come)
Last edited by CPWilly; Apr 9 @ 8:10pm
CPWilly  [developer] Apr 7 @ 11:35am 
-Then in the EmpireCommon directory, unzipp the "com" directory in the zip file to that location.
-The in the "Project" Menu make sure the option "Show All Files" is enabled. You should see the "com" directory in the project. (It will look white).
Completely open out the com directory structure, select ALL of the *.cs files, and then right click -> "Include In Project". The files included should not longer be white, but have the green C# logo. There are some 50 odd files, so you may have to do a couple of passes to make sure you have added every file.

Then do "Buid" -> Build Solution.

If you see errors, you missed adding something to the project. If at the lower left it says build succeeded, then you built it. Look in the EmpireCommon/bin/Debug directory for the dll you built.


EDIT: "Show All Files" is in the Project Menu
2nd EDIT: Changed the name to "EmpireCommon" as this is required.
Last edited by CPWilly; Apr 9 @ 8:11pm
CPWilly  [developer] Apr 7 @ 11:36am 
I have the Visual 2010 Pro compiler, but I suspect the instructions are the same. When you get to this step and have successfully built your first DLL, let me know, and we will proceed to an AI build.

--Mark
Last edited by CPWilly; Apr 7 @ 11:36am
@Mark, Thanks you! I didn't want to ask but I am very happy you provided that. Hopefully more than me and another gentleman I know / have met will begin this exploration.
I ran the 'Build > Build Project'
"Build Successful"
I checked the 'bin' folder and found ' EDCECommon.exe '- 7kb along with 2 other files which I no longer remember.
No 'Dll's were present

After looking around a bit I:
* Deleted the results in the 'bin' folder
* Closed VS
* Opened VS and loaded 'EDCECommon.shi'
These files / sizes were in the folder:
C:\Users\Steve\Documents\Visual Studio 2015\Projects\EDCECommon\EDCECommon\bin\Debug
* EDCECommon.exe - 7kb
* EDCECommon.pdb - 20kb
* EDCECommon.vshost.exe - 22kb
* EDCECommon.vshost.exe.manifest - 1kb

Running 'EDCECommon.exe' generated 'Form1'
Running 'EDCECommon.vshost.exe' um, Not sure what it did.

Just loaded VS
Ran, Build > Rebuild Solution
It updated
* EDCECommon.exe - 7kb
* EDCECommon.pdb - 20kb
To the current time.
No 'DLL's

Speculation
* I placed the 'com' directory incorrectly. Where does it go? Under 'Visual Studio' program folder or under 'Documents'?
* I'm using the wrong version of the compiler

I am prepared to do a 'scorched Earth', (deleting all folders / files and starting over Monday. It is possible I missed something the first time through.

As always, thanks for your help.
Steve
CPWilly  [developer] Apr 8 @ 10:30am 
LOL, this is my fault. I left off that when selecting a new project, you are given options. you want to choose "Class Library". (You made an executable).

So you can delete the project you did, start all over with a new one and make that selection. I will edit the instructions above.
Last edited by CPWilly; Apr 8 @ 10:32am
Thanks! Did I ever mention that one of my jobs I once held was 'QA'? ☻ Yes, really.
Heading off to work.
I'll try again Monday.
CPWilly  [developer] Apr 8 @ 1:48pm 
Well, if you built an exe, you should be able to build the dll! So we are close to the next step.
I have an option:
"Class Library"
or
"Class Library Portable"
(for: iOS, Android, Windows)
I'm going with 'Portable' as 'Trial and Error' works for me '☻"
(A couple minutes later)
I now have:
EDCECommon.dll - 4kb
EDCECommon.pdb - 8kb

Based on the size of the Dll I'm thinking I did something wrong. Possibly placed the 'com' folder in the wrong place?
Found my mistake,
(More Comming)
CPWilly  [developer] Apr 9 @ 1:14pm 
the one I build comes out to ~94KB.
Yes. Mine does now. ☻
Mistakes Made, (by me):
* Misread Instructions
* Misinterpreted Instructions, (not your fault)
* Mis-Applied Instructions
Sollution:
Trial and Error ☻

So, now ready, (I hope) for next step.
Thanks again.
< >
Showing 1-15 of 32 comments
Per page: 15 30 50