Quick Modding Questions Thread

Short answer: No.
Long answer: Yes, but you'd in most cases need C++ abilites and quite some time.

4 has already been done, see here.
Thought we also had 2, but can't find it :think:.

Number 2 was being worked on by The_Lopez (He called it 'Resource Stockpiling)before he left, I intend to make my own version.

By the way, almost(?) anything is possible in SDK.
 
Where's the Victoria Leaderhead so I can do the LH tutorial on her? I can't find her in my files.
Never mind - got her
 
Question to model makers:

Since I am totally new to this, before I go and dive into all the tutorials about model making, there are some base questions I would like to ask, so I understand base principles:

1. Models and Weapons - I often see people like to swap weapons on units - is this a complex thing to do? Does this boils down to something like take model A and weapon B and attached it "here"? Or does it still require full knowledge of model editing? (I have no art talent, so the only thing I can possible model would be a square box :D )

2. Models and Animations - I often see many models using animations of other model. Same as above, can ANY unit be potentially be attached to any animation? Say can tell Pikeman to use Marine attack animation, and then expect Pikeman in game to attempt to "shoot" with their pikes, instead of attacking in melee? Or I am totally out of line here? Again, how complex editing something like this is?

I don't need a full guide, I am pretty sure I will find it in the tutorials here, just baseline understanding of things.

thanks!
 
I have no clue (I also suck at art). But whatever the answers to your questions are, TELL ME TOO!
 
We have tutorials for both, for 1 see either here or here (no idea how good the first one works), for 2 see here.

Swapping weapons is AFAIK not *that* complicated. But the main work is at first to get used to the programs.

Changing animations...short explanation about the background:
Every unit has a skeleton inside. This skeleton is attached to different parts of the units, so the leg bone is attached to the leg, etc. And every bone has a special name, and there are animation instructions defined to the bone names in other files.
If you really want to change the animations, then you have to rip the skeleton out of a unit and paste another one in, and attach it to the right parts. Then this unit can use the other animations. That's what the tutorial does.
There are also the rare cases where 2 skeletons have the same bone names. Then it's directly possible to attach other animations to this unit.
e.g. the spearman and the christian missionary have the same bone names. It needs only a few modifications to make the christian missionary stab someone to death with his cross. But that's in general not really often possible, you'll probably have to test a lot of different things. For the needed modifications take a look in here.

Number 2 was being worked on by The_Lopez (He called it 'Resource Stockpiling)before he left, I intend to make my own version.

Aaah, i knew it. Thanks for refreshing my memory :).
 
Hi, hope this is the correct thread .. i am working on a mini Mod and i would like to take some of the "buttons" from existing *.dds files (eg. Warlords_Atlas_1.dds) and create a new .dds file which has all the buttons for my mini Mod .. i have a couple of .dds viewers so i know where the individual images are but i can't figure how to extract a single image from the "atlas" .. any suggestions??
 
I just have one easy question: In what XML-file or maybe other place can I set game years per turn?
 
Hi, hope this is the correct thread .. i am working on a mini Mod and i would like to take some of the "buttons" from existing *.dds files (eg. Warlords_Atlas_1.dds) and create a new .dds file which has all the buttons for my mini Mod .. i have a couple of .dds viewers so i know where the individual images are but i can't figure how to extract a single image from the "atlas" .. any suggestions??

If you're using GIMP or Paint.net then you should be able to just cut them out.

I just have one easy question: In what XML-file or maybe other place can I set game years per turn?

XML\GameInfo\GameSpeedInfo
 
how exactly read month and turn increments?
like 186month and 100 turns?

:yup: like that.
But everything which is bigger than a year, should consist of total years.
So 186 months would not work (17.5 years), but 180 or 192 months would.
 
I'm trying to write some code in CvTeam.cpp that uses the following from CvCity:

if (pLoopCity-> plotDistance(getX_INLINE(), getY_INLINE(), pCapital->getX_INLINE(), pCapital->getY_INLINE() .....

which hopefully does what I want it to. But compiling the dll I get errors like

error C2039: 'plotDistance' : is not a member of 'CvCity'

and

error C2227: left of '->getX_INLINE' must point to class/struct/union

Is there something simple I'm missing? What must I do in order to use these functions/arguments in CvTeam?

Thanks
 
:yup: like that.
But everything which is bigger than a year, should consist of total years.
So 186 months would not work (17.5 years), but 180 or 192 months would.

actually what I meant, is that I don't understand how to read it :blush:
I have taken that line directly out of the file for marathon game speed... (180 and 100 that is)
I presume that it means something like: do 180 months in 100 turns?
but then final entry is month 1, turns 156? now I am confused
I know that as you get closer to modern times, the game starts incrementing by less and less number of year per turn, just don't understand how to translate that into what I see in he file
 
Oh, it's exactly the same like you read there ;).

Short example from marathon:
PHP:
				<GameTurnInfo>
					<iMonthIncrement>180</iMonthIncrement>
					<iTurnsPerIncrement>100</iTurnsPerIncrement>
				</GameTurnInfo>
				<GameTurnInfo>
					<iMonthIncrement>120</iMonthIncrement>
					<iTurnsPerIncrement>300</iTurnsPerIncrement>
				</GameTurnInfo>
				<GameTurnInfo>
					<iMonthIncrement>60</iMonthIncrement>
					<iTurnsPerIncrement>170</iTurnsPerIncrement>
				</GameTurnInfo>

This part here says, that if you play marathon, you will first play
- 100 rounds, with increments of 180 months/15 years
- After these 100 rounds, you'll play 300 rounds with 120 months/12 years
- Afterwards, you'll play 170 rounds with 60 months/5 years
 
I'm trying to write some code in CvTeam.cpp that uses the following from CvCity:

if (pLoopCity-> plotDistance(getX_INLINE(), getY_INLINE(), pCapital->getX_INLINE(), pCapital->getY_INLINE() .....

which hopefully does what I want it to. But compiling the dll I get errors like

error C2039: 'plotDistance' : is not a member of 'CvCity'

and

error C2227: left of '->getX_INLINE' must point to class/struct/union

Is there something simple I'm missing? What must I do in order to use these functions/arguments in CvTeam?

Thanks

plotDistance is a member of CvPlot I believe. Try this:

if (pLoopCity.getPlot()->plotDistance(getX_INLINE(), getY_INLINE(), pCapital->getX_INLINE(), pCapital->getY_INLINE() .....

Or it might be a member of CvMap, in which case use GC.getMapINLINE(). Check both classes to see which one it's in.
 
I'm trying to write some code in CvTeam.cpp that uses the following from CvCity:

if (pLoopCity-> plotDistance(getX_INLINE(), getY_INLINE(), pCapital->getX_INLINE(), pCapital->getY_INLINE() .....

which hopefully does what I want it to. But compiling the dll I get errors like

error C2039: 'plotDistance' : is not a member of 'CvCity'

and

error C2227: left of '->getX_INLINE' must point to class/struct/union

Is there something simple I'm missing? What must I do in order to use these functions/arguments in CvTeam?

Here is an example of using plotDistance in some code I wrote recently:

if(... || (plotDistance(pLoopPlot->getX_INLINE(), pLoopPlot->getY_INLINE(), pNearestCity->getX_INLINE(), pNearestCity->getY_INLINE()) < 11))

I did a quick check and plotDistance is actually in CvGameCoreUtils.h which most of the .cpp files #include so you can call it. For your case I think your code should look something like this:

if (plotDistance(pLoopCity->getX_INLINE(), pLoopCity->getY_INLINE(), pCapital->getX_INLINE(), pCapital->getY_INLINE() .....
 
In the SDK and Python, how would I set up some part of the game to be able to take input from a player? (As in, adding a new type of action, adding city or unit buttons, etc.)
 
In the SDK and Python, how would I set up some part of the game to be able to take input from a player? (As in, adding a new type of action, adding city or unit buttons, etc.)

Popup? There's a guide for that around here.
 
more questions for you guys :)
I just downloaded a remake for paratrooper model to turn it into a firebat. It comes with some additional effect files which suppose to allow it to "through flame", I added the unit alright, but I don't know how to attach new effect to it???
I searched forum for effect adding tutorial, but could not find it...

Also, I am looking for some simple guide on how to control unit fighting sounds - like where is it controlled which sound file is played when it fires its weapon?

thanks!
 
In the SDK and Python, how would I set up some part of the game to be able to take input from a player? (As in, adding a new type of action, adding city or unit buttons, etc.)

It depends on what you want it to do. The tricky part is to get the AI to use it.

You may be able to do it via Python, as per the How To Make Python Action Buttons tutorial. This includes some stuff showing how you might get the AI to use the new functionality.

Or you can modify the DLL, an example of which is in the [SDK HOW TO] Add new missions for units tutorial. This does not include anything to get the AI to use the new mission.
 
Back
Top Bottom