[Religion and Revolution]: Mod Development

Status
Not open for further replies.
@lethiel:
If you just want to change the building requirements for buildings, then all you need to do is change Assets\XML\Buildings\CIV4BuildingInfos.xml
You will need to change BuildingClassNeededs, but if you look at the existing buildings, you should be able to figure it out with minimal computer skills. Any text editor should do (personally I use notepad++)

No need to recompile to do that. Just restart the game and clear the cache if needed.
 
@lethiel:
If you just want to change the building requirements for buildings, then all you need to do is change Assets\XML\Buildings\CIV4BuildingInfos.xml
You will need to change BuildingClassNeededs, but if you look at the existing buildings, you should be able to figure it out with minimal computer skills. Any text editor should do (personally I use notepad++)

No need to recompile to do that. Just restart the game and clear the cache if needed.

Thanks for the hint. :)

Attached is the change for any fellow newbies who might be interested and don't want to go through the code themselves.
[Train station is locked untill government palace.]
Just replace file with the one described above of the same name. (tested it to work, 1.9).
 

Attachments

Problem is also the whole game develops too fast. WOI was finnished by 1698 for my last couple of games with normal game speed.
Really? What difficulty and map size do you play at? When I play gigantic at conquistador, it takes me atleast 1750 to be at par with the king.
 
Really? What difficulty and map size do you play at? When I play gigantic at conquistador, it takes me atleast 1750 to be at par with the king.

This is probably not the treat to discuss tactics.
I play at revolutionairy usually with huge map. Gigantic map causes my 7 years old pc to to choke (and I find huge map fine).
You don't need to be at par with the king. (Isn't it impossible when he keeps makin units out of empty air?) 1/10 to 1/5 army size will do with good infrastructure, tactics and xp.
 
This is probably not the treat to discuss tactics.
Yeah but I prefer to not reply in a different thread. As to when to declare independence, I try to keep the game immersive and not declare independence until my forces are atleast half the king's forces. (are real colonists so brave to declare war against an overpowering king?)
 
@team and modmodders:
There is a new revision available in SVN.

Spoiler :

Today I went through my modding storage of unfinished protoypes and material I have collected.
(Trying to clean up my hard drive.)

Just when I wanted to push the button to delete all of it, it felt like breaking my heart to throw away all the effort I had already invested. :cry:

So I took a look at it again and finished at least this tiny DLL-Diplo-Event.
(It still had a tiny bug which was quite easy to find at second look.)

I am really not sure, if I will finish anything else or not.
(Maybe I will finally get over it and succeed deleting all of it, so it doesn't come back haunting me.)

Yeah, I know I am "retired", so don't say anything. :)


Stealing Immigrants

Occassionally you will get the chance to steal an immigrant from another (randomly chosen) Colonial Powers for a good price.
(The logic will pick a unit that is available in Europe of that Colonial Power.)

The immigrant will then appear in your own European harbour.

However, you will not know in advance what kind of immigrant you will get.
So if you are lucky you will get something like a Statesman and if you have bad luck you will only get something like a Criminal.

Also, there is a chance that this will get noticed by that Colonial Power and negatively affect your relations to it a tiny bit.

Of course there are also a lof of conditions checked so the player will not get that DLL-Diplo-Event in some strange combination.
(But none of them is really important to know for the player.)

And of course like all DLL-Diplo-Events it can be balanced in XML.

Nothing spectacular.
Still hope you will like it. :)
 

Attachments

  • Civ4ScreenShot0002.JPG
    Civ4ScreenShot0002.JPG
    151.1 KB · Views: 366
  • Civ4ScreenShot0004.JPG
    Civ4ScreenShot0004.JPG
    142.5 KB · Views: 299
  • Civ4ScreenShot0005.JPG
    Civ4ScreenShot0005.JPG
    143.9 KB · Views: 281
Yea, cool lil' Event! :D

I'm glad you did not press the delete button of your data crypt yet - Everybody here is pleased, I guess, if a "retired" guy called Ray is haunted once more by some spooky, half-finished features... :crazyeye:
 
I already told Schmiddie, that I will try to finish another one of my protoypes:

Health / Medical Care

Large City Populations will result in decreasing City Health.

To counter that effect there will be Profession "Healer", Specialist "Promoted Doctor" and Buildings "Medical Office", "Village Hospital" and "City Hospital" which can "produce" Health (a Yield).

So City Health is a value "stored" at the city that can rise to a max of +25 or decrease to a min of -25.
(It is influenced by the negative Health from huge Population and positive Health from Healers which are generated every round.)

City Health will affect:

  • Birthrate (actually the growth threshold)
  • Productivity
  • Healing rate of stationed troops

Of course the will be AI code for this feature.
And of course the feature will have balancing variables in XML.
And of course I will try to program this feature in a performant way.

I try to keep the concept straight forward and uncomplicated.

Spoiler :

I will not mess around with unimportant factors like Terrain or Bonus Ressources.

I will not have additional Yields like "Medical Herbs" and "Medicine" as I did in my original prototype / concept which even dates back to RWL.

All of that stuff would not make the feature better to my opinion.
It would simply be more complex without any benefit to gameplay.


Basic idea:
If you want to keep up (or even increase) productivity of your (big) cities, you will need to provide medical care.
(But the feature should still not become too complex or even tedious.)

---

Schmiddie already assured me, that he will take care of the graphics that are needed.
Thanks. :thumbsup:
 
Sounds great!

I suggest we could use this one as surgeon/doctor(uses the servant animation):

Spoiler :
attachment.php


Furthermore I will change the unitgraphic of the master vintager. I suggest this model (uses the master-distiller animation):

Spoiler :
attachment.php

What do you think?
 

Attachments

  • vintager.jpg
    vintager.jpg
    154 KB · Views: 500
  • surgeon.jpg
    surgeon.jpg
    163.4 KB · Views: 518
I am done with DLL programming of Health / Medical Care.
(Well, I could not test it yet without all the rest of the feature, but it compiled without problems and I believe I thought about everything.)

Once I get the graphics, I still have to:

1) Create all the missing XML (Yield, Specialist, Profession, Buildings)
2) Adjust GameFonts
3) Adjust CityScreen to display CityHealth (and CityHealthChange per round) and the new buildings
4) Write Pedia entries (for the stuff under 1 )
5) Do some intensive testing (and optimizations)

@Schmiddie:
Don't worry, there is no need to hurry with the graphics. :)
I can do all of that next weekend (or in 2 weeks) as well.
 
One more great little feature, Ray! And the graphics from Schmiddie are great as well! :)

It's very nice to see you guys both still working on RaR from time to time. :clap: :worship:
 
Health / Medical Care (as described here) is more or less finished now.
(It is uploaded SVN and will be available to community with next release.)

There are still a few English texts missing for Pedia.
(They will be created within the next weeks.)

Schmiddie even already created aweseome Achievments. :)
(Needless to say, that I love the other graphics he created for this feature as well.)

More Detailled Explanation:

1. Health / City Health

Huge City Population generates negative Health every round.
Medical Doctors can generate positive Health every round (in Medical Buildings).

Both factors are summed up / stored to City Health.
(Which can rise or fall to a maximum/minimum value of +10 / -25)

2. Effects

City Health will directly affect:
  • Productivity of the city
  • Population Growth of the city (food growht threshold)
  • Healing rate of troops stationed in that city

3. Balancing

All formulas can be balanced in XML.

Negative Health:

Population < 12 --> no negative Health from Pop
Population = 12 --> -1 negative Health from Pop
Population = 15 --> -2 negative Health from Pop
...

Positive Health:

Simply depends on

1) Level of the Medical Building
2) Amount of Workers employed as "Healers"
3) Healers being Specialists (Renowned Doctor) or not

Generally current balancing has been made in a way that gigantic cities with good growth and productivity are possible if you simply take a little care of supplying medical care.
If you don't, productivity and growth will suffer ...

4. Other Aspects

A) If there is no negative Health or positive Health generated, City Health will balance back to 0 again.

So heavily ill cities are also able to recover back to normal by themselves.
On the other hand, you cannot simply build up huge City, then move your Medics to another city and hope that health will stay that high.

B) AI will not get any problems with this feature.

It is not affected by negative Health from Population but if its cities get big enough, it will try to build Medical Buildings and employ Medics to increase City Health.

-----------

Actually the feature is not that difficult to understand, once you try it out. :)
It is quite easy to figure out how many medical doctors you will need to keep your cities healthy.

Edit:
Positive (upper max value) City Health has been limitted to 10. (And thus the additional positive effects on productivity, birthrate, heal rate +10%)
(Explanation above has been adjusted.)

Edit 2:
Threshold for City Population before negatively affecting City Health has been increased to 12.
(Explanation above has been adjusted.)
 

Attachments

  • Civ4ScreenShot0001.JPG
    Civ4ScreenShot0001.JPG
    346.5 KB · Views: 249
  • Civ4ScreenShot0002.JPG
    Civ4ScreenShot0002.JPG
    356.8 KB · Views: 257
  • Civ4ScreenShot0003.JPG
    Civ4ScreenShot0003.JPG
    308.2 KB · Views: 287
In the BlueMod released in 2008, a feature was added in order to get more freedom with the camera in pressing ctrl+arrow or shift+arrow.

discovering-new-world-1000px.jpg


Here's how it works:
  • ctrl+right: rotate angle of 45° right (no restriction)
  • shift+right: rotate angle of 15° right (no restriction)
  • ctrl+left: rotate angle of 45° left (no restriction)
  • shift+left: rotate angle of 15° left (no restriction)
  • ctrl+up or shift+up: rise vertical angle of 5° (max 90°)
  • ctrl+down or shift+down: lower vertical angle of 5° (min 20°)
  • ctrl+home: reset to default view

It's a nice little feature that could be easily added in RaR (If people aren't interested they wouldn't be forced to use anyway).

This only requests a few new lines in that file: "Assets/Python/CvEventManager.py"
On line 226, here's the code to add:

Code:
			#Custom Camera Controls

			if (theKey == int(InputTypes.KB_LEFT)):
				if self.bCtrl:
						CyCamera().SetBaseTurn(CyCamera().GetBaseTurn() - 45.0)
						return 1
				elif self.bShift:
						CyCamera().SetBaseTurn(CyCamera().GetBaseTurn() - 15.0)
						return 1
			
			elif (theKey == int(InputTypes.KB_RIGHT)):
					if self.bCtrl:
							CyCamera().SetBaseTurn(CyCamera().GetBaseTurn() + 45.0)
							return 1
					elif self.bShift:
							CyCamera().SetBaseTurn(CyCamera().GetBaseTurn() + 15.0)
							return 1

			elif (theKey == int(InputTypes.KB_UP)):
					if (self.bCtrl or self.bShift) and CyCamera().GetBasePitch() > -45:
						CyCamera().SetBasePitch(CyCamera().GetBasePitch() - 5.0)
						return 1

			elif (theKey == int(InputTypes.KB_DOWN)):
					if (self.bCtrl or self.bShift) and CyCamera().GetBasePitch() < 20:
						CyCamera().SetBasePitch(CyCamera().GetBasePitch() + 5.0)
						return 1

			elif (theKey == int(InputTypes.KB_HOME) and self.bCtrl):
						CyCamera().SetBaseTurn(0)
						CyCamera().SetBasePitch(0)
						return 1

			#End Custom Camera Controls


Here's a copy of the edited "CvEventManager.py" file. I've played long hours with it and it seems bug free.
 

Attachments

Very nice feature, I was missing large cities having a drawback/limitation like they had in the original colonization from 1994. However I like this implementation way better with it being linked to a seperate resource and not to the already almighty liberty bell production.

But will it be possible to remove the positive bonus from health with xml configuring and only retain a malus with negative health?
I ask because for my taste there are already way to many %-age based bonuses that create resources out of thin air (nothing that a bit of xml tweaking cant fix of course) so i dont think the ability to boost production by another 25% (especially if assuming it not only affects food production) is required.
 
Status
Not open for further replies.
Back
Top Bottom