Sure, I just updated it to support multiplayer and hot seat. Let me know if it actually works; I usually default to not supporting it because I don't play multiplayer and have no ability to test.
Fair point. In this case it's not a regular "array" but a class called FFreeListTrashArray which uses a "node" struct which has an int for the index and a pointer to the data. I'm a little foggy on C++ memory allocation (obviously), but wouldn't that struct take up 8 bytes on the stack? I don't...
I've been working mostly in C++ and Lua for a while now. Currently hemming and hawing over integrating my AI planning algorithm into the DLL, mostly just as an example of what it can do (I've already integrated it into EQEmu). I've only made one Lua mod for Civ 5, but I'm comfortable enough with...
Someone else might correct me, but I don't think there's any specific limitation, so the limit would be the maximum size of the array used to store the units or cities divided by the size of CvUnit or CvCity. The maximum size limit should be the system's largest integer.
For reference for anyone who might find this thread while Googling a similar issue:
This whole thing resolved to being a non-issue. What was leading me astray was when I would attach to the process with breakpoints where my new class was being instantiated or used, it would appear in the IDE...
Ha, well, I did hear you guys say you have civs with art that have no code. I could definitely work on one of those. I was working on another project, but it's such a huge undertaking that I've been in analysis paralysis for a while now just trying to figure out where to even start.
Art is the main reason I've never even considered tackling making a new civ. The standard is so high that unless I had a great artist to contribute to my project, I would be the laughingstock of the mod community. So, thanks guys :P
I am able to get my new class instantiated in CvGlobals though, so that will do as a workaround for now. I'm still curious why I can't seem to get it to work in CvPlayer.
Sorry, I think I misread the replies and had kind of a dense moment here. I guess this post is honestly less about FNEW as you've made me realize it's just a macro whose literal only purpose is to call new, but about adding classes to the DLL. It doesn't seem to matter how I attempt to...
Right, I know that, I was pointing out exactly that: it doesn't matter if you pass it the default constructor explicitly. I'm still not getting an answer on why it doesn't seem to work either way.
That's odd because there are numerous calls in the DLL where it passes a default constructor to FNEW instead of just the type. For example, in CvAIOperation:
CvAIOperation* CvAIOperation::CreateOperation(AIOperationTypes eAIOperationType, PlayerTypes ePlayer)
{
switch(eAIOperationType)
{...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.