Are you, in fact, a pregnant lady who lives in the apartment next door to Superdeath's parents? - Commodore

Create an account  

 
Planetfall PBEM Tech Thread

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.
Blog | EitB | PF2 | PBEM 37 | PBEM 45G | RBDG1
Reply

What does one actually do with a hacked DLL?
EitB 25 - Perpentach
Occasional mapmaker

Reply

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.
Reply

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.
Reply

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.

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.

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.
Blog | EitB | PF2 | PBEM 37 | PBEM 45G | RBDG1
Reply

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:

  1. Copy the hacked DLL into your \Planetfall\Assets\ Folder. Don't forget to make a copy!
  2. Open the pitboss client for planetfall and load the game.
  3. Save the game
  4. Open the Game as a PBEM as you would regularly
  5. Ping the map as Selrahc to gain memetics
  6. Save the Game
  7. Restore the old DLL file
  8. Open the pitboss client for Planetfall and load the game
  9. Save the game
  10. Open the game as PBEM
  11. Play the rest of the turns.
Blog | EitB | PF2 | PBEM 37 | PBEM 45G | RBDG1
Reply

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.

I was mistaken though, the Ping code is just renamed and in another part of the dll.

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.
Blog | EitB | PF2 | PBEM 37 | PBEM 45G | RBDG1
Reply

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

Reply

Mardoc Wrote: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.

Played & Sent back to you Mardoc. I had edited my last post w/ instructions, sorry.
Blog | EitB | PF2 | PBEM 37 | PBEM 45G | RBDG1
Reply

Also, it really just worked through PBEM the whole time replacing the .dll as you go? lol wow.
Blog | EitB | PF2 | PBEM 37 | PBEM 45G | RBDG1
Reply



Forum Jump: