Platy's Peculiar Pleasant Posh Python

Xyth, please start a SVN, is better for follow your changes and learn with you too.

A few people have suggested that. I have no idea how to setup or use a SVN but I'll look into it once the next version of HR (1.21) is finished. Might force me to be a bit more focussed in my development, I have a habit of working on too many things at once and losing track.
 
War Machines

Features:
Captures Naval, Air, Nukes Stationed in Cities, 20% Chance
Captured Units start at level 1





Notes
1) This works differently from the common capture modcomp out there, because those stationed in cities only trigger onCombatResults once when they died in bulk, so if you use the common one, you at most capture one of them.

2) There is a reason why the codes are split in 2 parts, don't ask me to explain.

3) Currently, it is set to retain Unit Type of captured unit, although of course it can be adjusted to be Unit Type based on capturing civ.
This means capturing a East Indianman now will still retain as East Indianman rather than convert to normal type.

4) Again, I set it to reset to level 1, rather than keep its promotions, adjust yourself if you want.
 
@Those sending requests via P.M.
Next time just type here or mod components request thread...

There are requests which:
1) I don't wish to do because
A) I disagree with the idea
B) Too performance taxing
C) I don't do repeative works
D) Not in the mood

2) Not possible via python

So others may take up your requests, since some require SDK for instance.
 
Unique Background

Features:
Displays different background based on Civilization chosen





Notes:
1) Displays default Civ IV background if there isn't a unique one defined.
2) I only bothered to make one Corporation Screen as an example. Apply it to other screens yourself.
3) I made the panels transparent but it is up to you if you want to keep the solid blue ones.
 
NICE. I will absolutely use that background one. Do you know off the top of your head what the size and/or aspect ratio of the images should be to avoid distortion? Or does it say in the code?
 
The BTS one uses 1024 x 512 so I simply follow it.
Although I am quite bewildered at that ratio.
Seldom see a monitor screen 2:1
 
Mercernaries

Features:
Purchase Units with Gold instantly

Since there isn't any screenshot available for the old one by Lopez, so I design it on my own from scratch.



Select the mercernary you wish to hire from a list of available units similar to what that city can build.
Resource pre-requisites are ignored, since you hire them, not train them.

Amateur:
Cost: 2x Production Cost
Starts with 2 XP

Standard:
Cost: 3x Production Cost
Starts with 5 XP + Mercernary Promotion
Spoiler :



Elite:
Cost: 5x Production Cost
Starts with 10 XP + Elite Promotion
Spoiler :



GrandMaster:
Cost: 10x Production Cost
Starts with 20 XP + Grandmaster Promotion
Spoiler :





Select the City you want the mercernary to arrive at, and there is a zoom to city button as well.
Mercernaries spawn with a random name.
No limit to how many you can hire, so long as you can afford.

No A.I. involved yet.
 
My bigger interest is setting some restrictions rather than as long as you can afford.
Currently the only restriction in place is 90% culture so you cannot hire in a newly conquered city.
When the base design is done, then I will bother with a.i
 
Hey, I have an idea. In my mod, I add some military civics, and after merging your Mercenaries Mod, I suggest that this component can only be activated by some civics like voluntary army, levy or something like that. If you have a professional army, then it will be disabled.:king:

However, I see no reason why a newly-conquered city cannot hire mercenaries.:rolleyes:You know, these guys are only motivated by money. :ar15:As long as you have the green, they'll flood in in no time.:cool:
 
Hello, platyping, I'm trying to use your Unique Background component cause I think it's a great idea, however, I have no idea how I can apply it to all the other advisor screens and the civilopedia and when I try to edit one, when I start a game there is no interface only the map. Could you help me? Thanks!
Also:Would it be possible to create something in python to have civ unique/specific Dawn of Man popups?
 
Mercernaries

No A.I. involved yet.

When i worked on the "python" side of this modcomp, it was OK, but it didnt work out something was wrong with it (might want to see python thread for this).

Anyways, i also talked to The Lopez on this to re-make it when he came back the 2nd time, and then he disappeared again :mad::mad:, but anyways, he SAID "It would have to be completely REDONE from scratch from the ground up, because it doesnt work correctly" for some reason in BtS??:dunno:

I personally want this in C2C, this is a GREAT modcomp, IMPO (when its done correctly, that is!!)
 
Updates

1) National Units and Team Units allowed as Mercernaries.
World Units are still disabled for obvious reasons.
NT and UT are still bounded by their respective limitations

2) Added Gold Trading as requirement to access Mercernaries.
Not possible to hire someone when you cannot pay them.

3) Added Connection to Capital as 2nd requirement beside 90% Culture
@Aloha
The 90% Culture is required to stop players from hiring directly in newly conquered cities.
Imagine I just conquer a city, and the next turn it is flooded with 100 mercernaries.

4) Added a simple promotion for Amateurs as well.

@SO
I didn't bother to look into Lopez's python, since there isn't even a screenshot available and the download seems to be for pre 3.19 BTS, so no point looking at how it is supposed to be implemented.
Anyway, no point looking at it when you already know it has problems.
Thus, beside the mod name, actually nothing is from the mod :D

@CivCiv
1) Unique DOM is already available, although it just changes the DOM text.
2) gc.getGame().getActivePlayer() is defined differently in different screens, so that was why it may cause a problem to you, if you simply C&P to other screens.
Rewrote that part slightly to allow C&P blindly.
Added Financial Screen as well for comparison.

Always activate python exceptions before telling me it doesn't work, since I cannot possibly know why without seeing any error messages or screenshots.
 

Attachments

  • Civ4ScreenShot0000.JPG
    Civ4ScreenShot0000.JPG
    114.3 KB · Views: 328
  • Civ4ScreenShot0001.JPG
    Civ4ScreenShot0001.JPG
    76.2 KB · Views: 307
  • Civ4ScreenShot0002.JPG
    Civ4ScreenShot0002.JPG
    112.9 KB · Views: 309
@SO
I didn't bother to look into Lopez's python, since there isn't even a screenshot available and the download seems to be for pre 3.19 BTS, so no point looking at how it is supposed to be implemented.
Anyway, no point looking at it when you already know it has problems.
Thus, beside the mod name, actually nothing is from the mod

OK i understand, BUT at least could you use those btns, yours are mainly for Fantasy:rolleyes: type mods, NO offense.
 
@Aloha
The 90% Culture is required to stop players from hiring directly in newly conquered cities.
Imagine I just conquer a city, and the next turn it is flooded with 100 mercenaries.

Not possible. You'll be lucky if you can afford 10+ mercenaries:D. Most classical era mercenaries cost around 200:gold:, which means 10 of them will cost 2000+:gold:. I mean where can you collect such a large sum of money in classical times. Even if you have, would it be wise to spend it all at once on the mercenaries?

When you enter the modern era, hiring a ridiculously high number of mercenaries is still not likely. Since a Numidian Cavalry costs 250:gold:, I guess a tank would at least cost you 2500:gold:. Hiring 20+ mercenary tanks might be a nightmare for your economy.:mischief:
 
Basic A.I. implemented

A.I. will start hiring 1 Mercernary each turn in their capital when they have too much surplus cash (10 times > GrandMaster Cost).

The surplus cash limit is set so they will still have plenty of spare cash to do other more important things, such as upgrading units, rushing wonders.

Thus, they will only hire 1 GrandMaster Mercernary each turn, when they can afford more than 10 of that type.

There will be more A.I. in future during war times, but during peace times, this is the basic A.I. for them to slowly build up their forces while not depleting their treasury significantly.

@SO
Not at all interested.
Whoever not happy with the Art, Promotion Effects, Promotion Names, Random Names etc can edit themselves since those are just XML. :rolleyes:
I only bother with the python codes.

@Aloha
Ignoring ICBM, the highest cost is Missile Cruiser @ 260 Hammers, or Modern Armor @ 240 Hammers.
An Amateur MA will just cost 480 Gold.
With a decent economy system, you can definitely earn > 2000 GPT if you are not running at 100% Science/Culture/Espionage
Nobody said you must hire Grandmaster ones.

The idea is that players should be encouraged to train rather than to buy, which is why
1) At End Game, GrandMaster 20 XP will look miserable compared to a trained unit
2) Promotions are decent, but not too strong, in fact only Grandmaster one has anything to do with combat.
 

Attachments

  • Civ4ScreenShot0003.JPG
    Civ4ScreenShot0003.JPG
    165.5 KB · Views: 312
  • Civ4ScreenShot0004.JPG
    Civ4ScreenShot0004.JPG
    170.3 KB · Views: 301
So I have added the screens to the victory conditions and civilopedia screens successfully.
However I copy pasted the same to the religion, civics, espionage, foreign, military, religion and without success but without python errors. The same with the info screen but with errors.
 

Attachments

  • Civ4ScreenShot0843.JPG
    Civ4ScreenShot0843.JPG
    99.2 KB · Views: 331
  • Civ4ScreenShot0844.JPG
    Civ4ScreenShot0844.JPG
    77.5 KB · Views: 328
Look at the original code in that screen.
The thing about firaxis screens is they like to name things randomly.
So the name of the background widget may be something else in another screen.
Just compare it with the original code and it should not be difficult.
Already off computer so can't be bothered to check
 
@SO
Not at all interested.
Whoever not happy with the Art, Promotion Effects, Promotion Names, Random Names etc can edit themselves since those are just XML. :rolleyes:
I only bother with the python codes.

I didnt look yet, sorry, so its like the modcomp i made, "mercenaries" modcomp, strictly python based??
 
Hard to tell if it is similar when there isn't a screenshot to illustrate how it is meant to work.
I am certainly the lazy type who can't be bothered to read one whole essay of explanation without a single picture to illustrate
 
Top Bottom