Simple Python Things

The discussion about the changes in your mod should probably be transferred elsewhere ^^.
Oh, and afterwards: No pedia pages anymore please. I don't like them, and the custom code is with these many changes pretty unmaintainable.


So:
- extra pedia page for world units is done (...that might be the only exception; if anyone is interested in it, I'll release that separately)
- Can't change language civic is done (that's pretty easy).

-> the bonus based on civic could be done here, because since it doesn't change, the bonus can be given on the first contact.

@screens for new techs: Are they now in? Because if I put that code now in and give it to you, you'll probably get a problem if you try to take it out.




:gripe: and my office chair just broke :gripe:, nearly fell backwards off the chair :gripe:.
 
The discussion about the changes in your mod should probably be transferred elsewhere ^^.
Oh, and afterwards: No pedia pages anymore please. I don't like them, and the custom code is with these many changes pretty unmaintainable.


So:
- extra pedia page for world units is done (...that might be the only exception; if anyone is interested in it, I'll release that separately)
- Can't change language civic is done (that's pretty easy).

-> the bonus based on civic could be done here, because since it doesn't change, the bonus can be given on the first contact.

@screens for new techs: Are they now in? Because if I put that code now in and give it to you, you'll probably get a problem if you try to take it out.




:gripe: and my office chair just broke :gripe:, nearly fell backwards off the chair :gripe:.
Just bring the discussion to my thread if you please, and thats fine i will probably attempt to make another page again might need some advice, but i can probably figure it out, for the other things thanks:D

and what screens for new techs?
 
Can you make a wonder that gives a free unit when it is built?
I looked everywhere, but found no way to do this...
 
Is one unit not maybe a bit weak?
What about this wonder by tsentom ;)?

It is the strongest unit in the game (Rohan's Rise) with 22 strength...
The next strongest has 8 strength... :)
Still, can you do it, or will I be able to adapt this?
EDIT: Maybe you could make it so every 10 turns or so, it checks if it is alive, and if it isn't it gives a new one.
 
Adaption should be possible...er...whatever.
Attached a simple version.
With that .zip, you'll receive a swordsman if you build the oracle, and every 10 turns it's checked if the owner of the oracle has still a swordsman. If not, you'll receive a new one in your capital.
For merging: There are 2 parts in the CvEventManger. Please also note the differences between unit/unitclass and building/buildingclass.
 

Attachments

Adaption should be possible...er...whatever.
Attached a simple version.
With that .zip, you'll receive a swordsman if you build the oracle, and every 10 turns it's checked if the owner of the oracle has still a swordsman. If not, you'll receive a new one in your capital.
For merging: There are 2 parts in the CvEventManger. Please also note the differences between unit/unitclass and building/buildingclass.

Thanks. I'm gonna test this :D
EDIT: Worked. Thanks again. :)
 
Couple requets:cool:
1st: Being able to recycle modern ships, it can be an option for when you have a ship in a city with a recycling center, you can recycle it, which deletes the movement and it adds gold
2nd: Because you have done promotions before i think it would be easy, promotions for settler, when a settler is built it gets one free promotion so you decide whats in your city, a couple ideas:
-New city automatically becomes capital
-Population bonus
-Cultural bonus
-Free building X, or y, etc
-Free military unit when built
-Religion/Corporation spread when built
-Route built between cities
-happiness bonus
-Healthy bonus
-No cost to have city
-Automatically become colony
Put a lot since im sure some wont work so hopefully some will
 
1) could be done, but only for the human, so it's not really nice.

2) Besides the routes and no costs for the city everything else could be done (...I think).
I guess the capital and colony options would nothing which should be allowed for the AI, because that would need too much insight into the actual AI decisions.

But to say that, I'll probably not do anything this week. Somehow a bit burned out at the moment (but in general) :sad:.


------------
Reuploaded the barbar hunter promotion. Fixed a typo which made the whole thing nonfunctional (...that happens if you make changes without testing them...). Thanks to hrochland for discovering this bug :).
 
1) could be done, but only for the human, so it's not really nice.

2) Besides the routes and no costs for the city everything else could be done (...I think).
I guess the capital and colony options would nothing which should be allowed for the AI, because that would need too much insight into the actual AI decisions.

But to say that, I'll probably not do anything this week. Somehow a bit burned out at the moment (but in general) :sad:.


------------
Reuploaded the barbar hunter promotion. Fixed a typo which made the whole thing nonfunctional (...that happens if you make changes without testing them...). Thanks to hrochland for discovering this bug :).
Well hope you find your fire again:lol:;)

But anytime you got time, i would love to have it in my mod but its not really key to gameplay, just thought it would be something i would enjoy as well as something that would benefit many other mods
 
If you do plan to pursue the settler idea, thought you should know ik theres a modcomp that does this already, but instead splits it into different units (ex. architech gives bonus in building). So thought if you wanted to do that, you could steal those codes it would porbably be easier. Again no rush not something i need to see, just think it would be a cool modcomp id add
 
A request: Alert Message for Pillaging Roads.

I saw this code in ROMAND:

Code:
/************************************************************************************************/
/* Afforess	                  Start		 09/13/10                                               */
/*                                                                                              */
/*  Alert Player of Pillaged Routes                                                             */
/************************************************************************************************/
		if (pPlot->isOwned())
		{
			//	A pillage implies a source of danger even if we can't see it
			GET_PLAYER(pPlot->getOwnerINLINE()).addPlotDangerSource(pPlot, 100);

			szBuffer = gDLL->getText("TXT_KEY_MISC_IMP_DESTROYED", GC.getRouteInfo(eTempRoute).getTextKeyWide(), getNameKey(), getVisualCivAdjective(pPlot->getTeam()));
			gDLL->getInterfaceIFace()->addMessage(pPlot->getOwnerINLINE(), false, GC.getEVENT_MESSAGE_TIME(), szBuffer, "AS2D_PILLAGED", MESSAGE_TYPE_INFO, getButton(), (ColorTypes)GC.getInfoTypeForString("COLOR_RED"), pPlot->getX_INLINE(), pPlot->getY_INLINE(), true, true);
		}
/************************************************************************************************/
/* Afforess	                     END                                                            */
/************************************************************************************************/

But I think that gets better in Python, thanks to this component:

[XML+Python] Wonders destroyed/captured messages

http://forums.civfanatics.com/downloads.php?do=file&id=13250
 
That's actually quite simple, probably not more than 5 lines of code.
I'm rather surprised that such a message is not already ingame, because you get messages if improvements are destroyed. Do you want it to look the same like the mentioned messages?
 
Any objections against using the original text?
It would then display "Your improvement road was destroyed", so the "improvement" is wrong in there, but you'd not have to worry about the translation for other languages.

What you call the original text?
Can you not change the phrase in English through the xml?
 
What you call the original text?

The one which is used by the game for improvements ^^.

Can you not change the phrase in English through the xml?

Oh sure, but why go with only one language if you can have 5 :)?
And I've seen that the word for improvement is apparently only used in german, so I'll just do that.

but something is not working with the current code (...10 lines, and I have no clue where the error is...I should never say "that's easy"), might take til tomorrow (because I have now also some other stuff to do).
 
but something is not working with the current code (...10 lines, and I have no clue where the error is...I should never say "that's easy"), might take til tomorrow (because I have now also some other stuff to do).

If I can help somehow just let me know.
 
Back
Top Bottom