Specialists - several questions

PPQ_Purple

Purple Cube (retired)
Joined
Oct 11, 2008
Messages
5,762
I have several question about joined super specialists (like joined great merchants/artists...) using FFH2 as a coding base.

1. How do I make a JSS add ,:), or

2. How to make a civic manipulate the yealds of JSS in these same areas.

3. How to make a building manipulate the yealds of JSS in these same areas.

4. How to limit the number of a perticular type of JSS with python. Basicly I need a fixed max cap per city, and the ability to change it with buildings. (E.G. Max 3 great merchant super specialists per city, increased by 1 with market, increased by 1 with bank - to reach a maximum of 5)
 
This will need to be done in the SDK. To start, track how a specialist (settled specialists are merely specialists of a GREAT_FOO type) adds yields. The tricky part will be altering the functions on CvCity that calculate good/badHealth and happiness to account for specialists.

You also need to modify CvSpecialistInfo and the XML. That's probably the best place to start since it's a lot more straight-forward. Of course, knowing that you might want to modify CvCity to just use the specialists hammer yield change as the happiness change so you can leave the easy code for the end, once you've figured out that you can do the hard part.
 
I had the same idea for a slave.
He would give the city bonuses, but if you changed from using the slavery civic, he would start producing rampant unhapynes.
 
First of all, you need to define new tags in Civ4SpecialistInfos.xml, Civ4CivicInfos.xml and Civ4BuildingInfos.xml that defines how many those thing you want your specialist to produce, and how civic and buildings would influence it.

Then, in CvCity familiar yourself with the following functions: unhappyLevel(), happyLevel(), goodHealth(), badHealth(), search the sdk to see how these functions are called

Then, in CvCity modify processSpecialist(), processBuilding(), in CvPlayer modify processCivics(), to actually make the changes.

This idea is harder to code than it first looks like, so good luck!
 
Thanks, shall check it out. I have a lot of experiance in programing, so this should be fun.
 
I was thnking of doing that, but I have yet to learn how to unpack/open SDK and make my own DLL witch I would need to do for this.
If anyone could drop me a note or turtorial on that part, and I will be ready to go.
Also, everyone still keep posting your ideas on how to do it and how to make it compatable with things like FFH2. I need all the input I can get.
 
FFH2 has its own DLL, so you'll need to release two sets of files/DLLs to support regular BTS and FFH2. The SDK files are included in BTS. There are tutorials in this forum for compiling the DLL. I landed on using VC++ 2005 Express with the makefile.
 
Thanks for that. I have had to stop working on it due to colledge work but I was hoping someone would take up the challenge.

Is it modular?
 
Thanks for that. I have had to stop working on it due to colledge work but I was hoping someone would take up the challenge.

Is it modular?

Well, it is an SDK mod, so in the sense that it can be added to another mod by incorporating the sources, then yes, it is modular. But can it be dragged-and-dropped into the modules folder? No, unfortunately not...
 
Top Bottom