As to getting the code to compile, umm, I cheated. I copied over my visual studio project files and make files from my EitB development folder. I had to edit my makefile to not auto-copy the dll, but after that everything went swimmingly. I also had to copy over the fastdep binary etc.
Planetfall PBEM Tech Thread
|
Heh, duh, it didn't work for me thanks to compiling a debug release. (That's never worked for me, the Boost library doesn't play right in debug mode.) A release build worked. And the tech got granted in a quick test by a single player game.
That said... calling this stuff from Python is a great idea if possible. Can the Python see CvTeam::setHasTech and other such functions? That would make this sort of stuff way way easier, to do it in interpreted Python with a text editor and skipping the whole C++ compilation step. Mardoc, with a hacked DLL, one overwrites the existing CvGameCoreDLL.dll file. That's either in Beyond the Sword\Assets for the base game, or in Assets underneath a mod folder. Then the custom code can run and do whatever it's meant to do.
I'll make some more detailed instructions when I get home tonight.
For now, Mardoc, could you please run through a half dozen turn cycles to confirm that it will work? Feel free to do anything you like during these shadow turns: declare war on everyone, change all builds to infirmaries, arrange all your units to form obscene words, etc. T-hawk Wrote:Heh, duh, it didn't work for me thanks to compiling a debug release. (That's never worked for me, the Boost library doesn't play right in debug mode.) A release build worked. And the tech got granted in a quick test by a single player game. The pitboss workaround doesn't check the python modules? Weird. CvTeam::setHasTech is definitely exposed to Python in EitB, not sure about base CIV but given that that's how the internet replacement wonder in FfH works, I assume it is. I was mistaken though, the Ping code is just renamed and in another part of the dll. Mardoc Wrote:What does one actually do with a hacked DLL? T-Hawk, correct me if I'm wrong, but I believe the steps are as follows:
Sareln Wrote:The pitboss workaround doesn't check the python modules? Weird. CvTeam::setHasTech is definitely exposed to Python in EitB, not sure about base CIV but given that that's how the internet replacement wonder in FfH works, I assume it is. Though if you wanted to be clever, to get this to work in python, I would tie into the "OnUnitSelected" event in Python... that function already has the player, so you can back out the player's team and grant the tech right there.
Eh, Pitboss was necessary? It seems to have worked just fine in PBEM mode.
Anyway, I've now gotten it to Sareln's T33, for which I have no instructions. OTOH...Sareln's around. Suppose you just play your own turn? PS - did test beyond this, Nicolae's T33 now ends.
EitB 25 - Perpentach
Occasional mapmaker Mardoc Wrote:Eh, Pitboss was necessary? It seems to have worked just fine in PBEM mode. Played & Sent back to you Mardoc. I had edited my last post w/ instructions, sorry. |