@f1rpo thank you, those commits will definitely help. I combed through the whole "tutorials and reference" forum, and a lot of the SDK forum, and I have no idea what I was reading lol. Maybe if I have time I'll throw up my own little tutorial once I figure out how it all works.
@LPlate2 glad I...
Does anyone know where a tutorial for adding a new xml file to the SDK is? I was reading one just three days ago, but now I can't find where it was... :cry:
Ok this made me curious about what is actually going on here and I found out a bunch of stuff.
First of all, seems INTERFACEMODE_PYTHON_PICK_PLOT is not the one used for ranged attacks, for that type of interface you want the aptly-named INTERFACEMODE_RANGE_ATTACK. The other options appear to...
I've tinkered with this quite a bit actually. So, in CvUnit you have three methods governing range strikes; one that tells if you if the unit can rangestrike at all (canRangeStrike), one that tells you if a unit on pPlot can do a range strike at coordinates iX, iY (canRangeStrikeAt), and one for...
I saw a tutorial today about changing the color of the End Turn button (the green one near the minimap) via the civ4 theme files (.thm files, which are located in Resource, not Assets). You just have to find the right color variable and change its RGB values. I assume anything unaffected by...
Quick C++ / SDK question.
In a header file, declaring
std::vector<std::pair<int,int>> thing;
results in compilation errors "expected '>' but found '>>' ".
The rest of the Internet seems to think declaring std::vectors of std:: pairs is fine, but the compiler disagrees. Is Civ4's version of...
No worries, it's good not to overwhelm yourself right away :)
That is correct and it is in CvGlobals.h I think. MAX_NUM_PLAYERS? (I'm on my phone so I can't check for sure haha)
There is something unusual that happens with changing that number, where large numbers of civs slow things down...
Wooo!!
Btw for what it's worth, your religion / civics mod should be fairly straightforward if you follow Xienwolf's guide to add XML tags, then add something like <ForceReligion> to CivicInfos. Then in CvPlayer::canDoReligion() you could add something like this:
for (int i = 0; i < "number of...
Mmm this type can be tricky. Both Afforess and Leoreth (/edead) modified the same original Civ4 function. I like to approach these by figuring out what each one was adding and then making sure all their pieces get into my version.
Here is what the original does:
Loop through all unit infos...
I have only ever used "Debug" and "Release", but the really important difference is that "Debug" allows you to display assert messages when they are triggered in the SDK. Those come from lines like this:
default:
FAssert(false);
(pasted from some random place)
There are a bunch of...
Aha, I figured out what causes it!
If you have a map that has generated a coast with land surrounding that coast (a "lake" I think), and you place the new terrain on top of that coast, then the new plot looks like a 'depression'.
EDIT: So after some testing
Any coast tile placed through the...
I've been testing out a bunch of orlanth's terrian textures lately, and somehow ended up with the opposite of a hill (screenshot attached).
I'm in a vanilla mod with the only difference being the terrains I've added, which are all identical except for the 'detail' texture. I wasn't changing...
Unfortunately it looks like there is not a "canConvert" check exposed to CvGameUtils, which would allow you to tell the game whether or not a player is allowed to adopt a religion. (There is a mysterious "doReligion" call.)
However, there is a CyPlayer "convert" function you can use to change...
Follow up question. (In the process of redoing the events system and it seems to work fine so far.)
The need to keep a plot's memory very tight and small makes complete sense - but what about units? If I added an array of about 15 integers to every unit, is that something an array map could...
This is a super good idea, thank you! I'm going to switch it to that and see how it goes.
Best part is, I have been trying to figure out how to do a similar event system tied to each unit, and avoided doing it because it would make the mod yet more massive. This should let me do that too.
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.