Bobchillingworth
Unregistered
On a related note: T-hawk, can you please save us & give Selrahc his tech?
Posts: 491
Threads: 3
Joined: Jun 2012
Sareln Wrote:Hey Maniac, another bug for you; I actually know the solution to this one. It appears that when you build the Unity Library in PBEM, you don't get your free tech & a message telling you you already grabbed your free tech. I ran into a similar problem in EitB, it came in with some code from the unofficial patch that set a flag when someone got granted a free tech and then cleared it when it granted the tech. The problem is, this flag isn't saved to the save-game, so in PBEM you never get a chance to pick before you get the default flag which says you get no Tech. Should be a 2 line fix.
I'll have a look at this and the stockpile energy bug in July, when I'm off work. Though if you could point me at the exact two lines, it would save time. :D
During a blitz, do you exchange saves, or do you play simultaneous?
Posts: 491
Threads: 3
Joined: Jun 2012
I've added the two lines.
Posts: 6,776
Threads: 131
Joined: Mar 2004
I'm away from my Civ computer for the next several days, and in any event it would take some startup time for me to get the Planetfall code base up and running to compile.
I'm hoping Maniac can help you, probably more easily than I can. My general approach for fixing things like this is to patch some code into a function such as CvPlayer::selectUnit, with a call to setHasTech. So with such a modified DLL in place, you can load the game and click any unit to get the tech applied.
Posts: 5,294
Threads: 59
Joined: Dec 2004
T-hawk Wrote:I'm away from my Civ computer for the next several days, and in any event it would take some startup time for me to get the Planetfall code base up and running to compile.
I'm hoping Maniac can help you, probably more easily than I can. My general approach for fixing things like this is to patch some code into a function such as CvPlayer::selectUnit, with a call to setHasTech. So with such a modified DLL in place, you can load the game and click any unit to get the tech applied.
Wait, when you .dll mod you get around the save-game checker?
Blog | EitB | PF2 | PBEM 37 | PBEM 45G | RBDG1
Posts: 5,294
Threads: 59
Joined: Dec 2004
Maniac Wrote:I've added the two lines.
Oh good. It was the m_bChoosingFreeTech variable yes?
So added lines:
pStream->Write(m_bChoosingFreeTech);
and
pStream->Read(m_bChoosingFreeTech);
Blog | EitB | PF2 | PBEM 37 | PBEM 45G | RBDG1
Posts: 491
Threads: 3
Joined: Jun 2012
My experience is that even simply changing the datestamp of a DLL, without changing any code, causes Civ4 to say the files have been modified.  I've tried after discovering a coding mistake involving invisibility in my own ongoing PBEM...  (fixed in v16c  )
Is it possible to play a PBEM turn as DirectIP or something for a couple turns? In that case the problem can be circumvented, no?
Posts: 491
Threads: 3
Joined: Jun 2012
Sareln Wrote:Oh good. It was the m_bChoosingFreeTech variable yes?
So added lines:
pStream->Write(m_bChoosingFreeTech);
and
pStream->Read(m_bChoosingFreeTech);
Those were lacking, yes. I don't really understand the choosingfreetech popup code though, so I can't say for sure if things are fixed.
Posts: 5,294
Threads: 59
Joined: Dec 2004
Maniac Wrote:Those were lacking, yes. I don't really understand the choosingfreetech popup code though, so I can't say for sure if things are fixed.
If it's the same set of code from EmperorFool from the Unofficial patch, that should fix it.
Blog | EitB | PF2 | PBEM 37 | PBEM 45G | RBDG1
Posts: 5,294
Threads: 59
Joined: Dec 2004
Blog | EitB | PF2 | PBEM 37 | PBEM 45G | RBDG1
|