I am SO close, but need a bit of help...

I know, isn't it cool that EmperorFool did that? Now events can have pictures! Imagine FFH2 events with pictures...that'd be sweet...

I didn't learn to do anything though, sadly. I just don't know any C++, and I don't understand SDK at all! :) I'm just excited that this is possible, and that it's almost done!
 
Okay, since you have it compiling, try this out:

CvInfos.h:

Code:
	DllExport int getNumWorldNews() const;

	[B]DllExport const TCHAR* getEventArt() const;				// Exposed to Python[/B]
	DllExport bool isSinglePlayer() const;				// Exposed to Python

...

	std::vector<CvWString> m_aszWorldNews;

	[B]CvString m_szEventArt;[/B]
	bool m_bSinglePlayer;

CvInfos.cpp:

Code:
int CvEventTriggerInfo::getNumCorporationsRequired() const
{
	return (int)m_aiCorporationsRequired.size();
}

[B]const TCHAR* CvEventTriggerInfo::getEventArt() const
{
	if (m_szEventArt.empty())
	{
		return NULL;
	}
	
	return m_szEventArt;
}[/B]

bool CvEventTriggerInfo::isSinglePlayer() const
{
	return m_bSinglePlayer;
}

...

	[B]stream->ReadString(m_szEventArt);[/B]
	stream->Read(&m_bSinglePlayer);

...

	[B]stream->WriteString(m_szEventArt);[/B]
	stream->Write(m_bSinglePlayer);

...

	[B]pXML->GetChildXmlValByName(m_szEventArt, "EventArt");[/B]
	pXML->GetChildXmlValByName(&m_bSinglePlayer, "bSinglePlayer");

CvDLLButtonPoipup.cpp:

Code:
	CvEventTriggerInfo& kTrigger = GC.getEventTriggerInfo(pTriggeredData->m_eTrigger);
	
[B]	if (kTrigger.getEventArt())
	{
		gDLL->getInterfaceIFace()->popupAddDDS(pPopup, kTrigger.getEventArt());
	}[/B]
	
	gDLL->getInterfaceIFace()->popupSetBodyString(pPopup, pTriggeredData->m_szText);

Give this a shot and report back with any errors you get as I haven't even run this through the compiler, let alone tested it in-game.
 
It's building now...

I'd like to take this opportunity to thank you again for all the incredible work you've done for me. I hope you're not getting tired of the thanks, but I am so grateful for your help! I mean, it's not even really help, you've just plain done it for me because there is no way I could've done it myself. I don't even know what you did; it may as well be Chinese to me! :)

I'll let you know what errors (if any) it comes up with.
 
Ok, it compiled with no errors! So great coding! :)

I'm off to try it ingame...
 
Ok, tried it ingame, and I've hit a snag...and it really doesn't make any sense!

It doesn't matter what I enter in the <EventArt/> tag, it just shows the rebelbase.dds. I can't even fathom why that would be; I have several .dds files in that same folder, and I've tied one to another event using the new tag. But whenever any event is triggered, it shows the rebelbase.dds pic.
 
:lol::crazyeye:

I am a total newb! I forgot to replace the old GameCore with the new one! :) Works like a charm!

Once again, thank you a million times over, EmperorFool! I am truly not worthy!

:bowdown:
 
Glad it worked. :goodjob: I just like to see the virtual smile on your face. :D Post some more screenies of new art when you can!
 
Don't forget to comment the code, then upload the commented source code files that you changed. This is a very functional modcomp, you should release it to the community in the modcomp forums (and upload the Source Code to the database).

Standard convention for commenting code is this:

Code:
//Start NameofModder/Component
Code Fu...
//End NameofModder/Component

That way if people wish to include your modcomp in theirs, they can just search for you name/component, and cut and paste the code you've written when merging. For the XML files that require altering you generally don't need to comment, as it's obvious, but the altered XML needs to be included along with the source code.
 
Don't forget to comment the code, then upload the commented source code files that you changed. This is a very functional modcomp, you should release it to the community in the modcomp forums (and upload the Source Code to the database).

Standard convention for commenting code is this:

Code:
//Start NameofModder/Component
Code Fu...
//End NameofModder/Component

That way if people wish to include your modcomp in theirs, they can just search for you name/component, and cut and paste the code you've written when merging. For the XML files that require altering you generally don't need to comment, as it's obvious, but the altered XML needs to be included along with the source code.

That sounds like a great idea...but I don't know what you're talking about! :confused:

I understand uploading the source code (the changed .h and .cpp files, right?), but I don't know what a modcomp is, or where those forums are or how to post the changes...to sum up, I really don't know much! :) This is my first upload, so you'll have to bear with me...

If it helps, here is the link to the current source code download: http://forums.civfanatics.com/downloads.php?do=file&id=11942
 
Top Bottom