Snaitf's Great General

I want to make slave unit who you can draft if you have slavery. I want to add him options:
- sacrifice +30 culture
- hurry building +30 production
- join city 2 or 3 hammers & +1 unhapiness
- build slave market 1 unhapiness, 25% production, 1 unhealthiness (one per city) gets obsoleted with emancipation
 
Snaitf said:
Ok, I changed the bonuses due to many requests, read 1st post for changes, re-posted...

Snaitf can you post guide how you mod phyton CvMainInterface.py ?

I want to make slave unit who you can draft if you have slavery. I want to add him options:
- sacrifice +30 culture
- hurry building +30 production
- join city 2 or 3 hammers & +1 unhapiness (phyton info is need for this)
- build slave market 1 unhapiness, 25% production, 1 unhealthiness (one per city) gets obsoleted with emancipation
 
great work.. just some questions.

most importantly... DOES THE AI UNDERSTAND THE CONECPT?!

secondly. you mentioned that buildings are rebalanced. could you post an updated civlopedia to reflect changes (inlcuding adding info about the great general). that would be great

great mod!
 
LittleRedPoint said:
Snaitf can you post guide how you mod phyton CvMainInterface.py ?

I want to make slave unit who you can draft if you have slavery. I want to add him options:
- sacrifice +30 culture
- hurry building +30 production
- join city 2 or 3 hammers & +1 unhapiness (phyton info is need for this)
- build slave market 1 unhapiness, 25% production, 1 unhealthiness (one per city) gets obsoleted with emancipation


I'm no guide writer, but if you download my mod and look at the files, ALL the changes are within comment blocks either:

<!-- Start Modification Block -->

for the XML files

or

## Start Modification Block ##

for the PY file
 
hIdDeN_eViL said:
great work.. just some questions.

most importantly... DOES THE AI UNDERSTAND THE CONECPT?!

secondly. you mentioned that buildings are rebalanced. could you post an updated civlopedia to reflect changes (inlcuding adding info about the great general). that would be great

great mod!

I'm pretty sure the AI understands it, I think the AI picks the specialist that would benefit them most at the time, this makes another one available. And since I have seen the AI using Great Generals while play-testing, me-thinks it's ok...

As far as the civlopedia, it's at the very bottom of my to-do list since you can get all the info you need by mouse-overing the buttons. and the stats that display in the pedia are drawn from the game, not hard coded, it's mostly there, just not the verbose paragraph descriptions...
 
Snaitf said:
I'm pretty sure the AI understands it, I think the AI picks the specialist that would benefit them most at the time, this makes another one available. And since I have seen the AI using Great Generals while play-testing, me-thinks it's ok...

As far as the civlopedia, it's at the very bottom of my to-do list since you can get all the info you need by mouse-overing the buttons. and the stats that display in the pedia are drawn from the game, not hard coded, it's mostly there, just not the verbose paragraph descriptions...

righteo . thats cool. this mods goin into my customassets. thx
 
Snaitf said:
...as far as specialists granting exp, that would have to be done with py editing instead of just xml editing and could be exploited. If I do that, it would only be the super specialist.
I see the unbalance now. Theres nothing to prevent a player from assigning a ton of Soldier Specialists and cranking out mega-elite units. I agree that limiting the exp bonus to the Super Specialist is best.

Keep up the good works Snaitf
 
Snaitf said:
I'm pretty sure the AI understands it, I think the AI picks the specialist that would benefit them most at the time, this makes another one available. And since I have seen the AI using Great Generals while play-testing, me-thinks it's ok...

As far as the civlopedia, it's at the very bottom of my to-do list since you can get all the info you need by mouse-overing the buttons. and the stats that display in the pedia are drawn from the game, not hard coded, it's mostly there, just not the verbose paragraph descriptions...

So, does that mean when you have an automated city, it can/will(when it thinks its necessary) select soldier as a specialist?
 
I think it would if the automation was set to maximize production ~ because of the production bonus.
 
Thats why it would work soooo much better if it simply reduced the time of unit builds-as it should!!! Shame that it does not seem possible yet!

Yours,
Aussie_Lurker.
 
There is something I would love to add to the soldier specialist, but haven't yet been able figure out how. I want each soldier to give a %defence bonus to the city, say 5% per soldier. Maybe to balance this out I'd take away the commerce bonus and just have them give 1 hammer + 5% defence.

I think this idea would be great for realism, as it would represent your citizens taking up arms in defense of their own city in an emergency. The downside being, over a long siege if you had to keep it up, the enemy could potentially starve out cities. I wonder if the AI would use it though.

Also, I'd love to figure out how to make the great generals give a temporary promotion to every unit in a stack. I've been looking at Bhruic's Realfort mod to see how he created a python script that allows the fort to give a bonus to units only while the unit is sitting in the fort, or attacking from it. I'm not too familiar with python yet though and am not having much luck.
 
JohnSearle said:
Just finished playing a few hours with your mod... and I must say, great work!

THANKS! :D

Stuporstar said:
There is something I would love to add to the soldier specialist, but haven't yet been able figure out how. I want each soldier to give a %defence bonus to the city, say 5% per soldier. Maybe to balance this out I'd take away the commerce bonus and just have them give 1 hammer + 5% defence.

I think this idea would be great for realism, as it would represent your citizens taking up arms in defense of their own city in an emergency. The downside being, over a long siege if you had to keep it up, the enemy could potentially starve out cities. I wonder if the AI would use it though.

Also, I'd love to figure out how to make the great generals give a temporary promotion to every unit in a stack. I've been looking at Bhruic's Realfort mod to see how he created a python script that allows the fort to give a bonus to units only while the unit is sitting in the fort, or attacking from it. I'm not too familiar with python yet though and am not having much luck.

I unfortunately haven't been able to figure these out either :confused: Guess we'll just have t wait for the SDK :sad:
 
As another suggestion to give the great general its own flavor...

... perhaps the super specialist should add +20% defence to a city, like walls, or culture?
 
dh_epic said:
As another suggestion to give the great general its own flavor...

... perhaps the super specialist should add +20% defence to a city, like walls, or culture?

If I can figure out how to add the 5% defense bonus to a soldier, I'll definitely add a larger percent bonus to the super specialist. I'm not sure what would be a good balance though, anywhere from 10%-25%. What do other people think about this?
 
Nah, in my opinion, MeteorPunch, Armies truly sucked @$$-even if the AI made use of them, they still would have sucked @$$. IMO, having an MGL produce a Military Academy, or getting you a military technology or granting you a bonus to unit XP and unit build times are far better abilities to possess-it merely remains to be seen if it can be done.
Perhaps a python script saying something along the lines of

'if Specialist=<Soldier>; unittypeA, unittypeB.... build rate=Y*0.9' Not truly knowing the python code, though, I am not sure how it would really read.

Yours,
Aussie_Lurker.
 
Snaitf said:
I unfortunately haven't been able to figure these out either :confused: Guess we'll just have t wait for the SDK :sad:

I think it's entirely possible to do using XML and Python and I'm determined to figure out how. The defense bonus for soldier specialists *should* be the easiest, since the same bonus already exists for buildings. I just have to figure out where in the XML schema I need to add the element <idefensebonus> (or whatever the tag it was), and then figure out how to get the python to recognize it. I'm not sure if I can get the python script for the defense bonus tag to cross over from one XML shema to another, or if I need to redirect it or just copy it into the python script that reads the particular schema I need. I'm still just learning python so it's probably going to take me a while to figure this all out.

As for the unit stack promotions for a Great General in the field, I'm sure I can convert Bhruic's absolutely brilliant fort mod to be able to do this...once I figure out how he did it. :crazyeye:
 
Hi im new to the boards and this Great General idea really caught my eye. I have a few ideas to throw out there that may or may not be good.

1. Why do soldiers and great generals give +gold bonus? If anything they should take away money. I like the idea of giving +1 XP to units but i also see how it can be misused. one way i can see to fix this is to simply take away all other bonuses, meaning no +gold or +prod. if people want to mass the soldiers they would then have to cut their military production. That still leaves the problem of nearly completing a unit then making soldiers however. Maybe let barrack have a soldier allowance of 2, castle of 1. i would also think about giving a +culture to encourage getting soldiers after a take over.

2. I like the military academy but isnt the academy something unique to the G scientist. A few other ideas i have are

a. +4-5 XP all across the board to every unit you control

b. Create 1 free unit the "Draft" command would create for each barracks you control. or a set ammount of units (5?)that start with 10XP

c. Military Reform: upg 2 units in each city free of charge, or cut
upg cost by 1/2 for X turns

3. The super specialist isnt bad as it is but my previous Q about +gold still appliies. maybe let the specialist give something like +2hammer +2XP +6culture. Its not stepping on any of the other super specialists toes and it gives him a flavor of his own, and hes not bad either.

4. I think barracks should give +1GPP for the general up until Gunpowder or Nationalism. reasoning is the definition of a great general changed with the invention of the firearm. warfare became based on better teamwork than individual effort so soldiers had less opportunity to stand out. there most definatly are exceptions (Napoleon first to come to mind) but generally this happened. I also think Castle, Heroic Epic, National Epic(maybe?), Scotland Yard, Westpoint, and Pentagon should give +GPP

Unfortunatly i have no XML or Python skills so i dont know if this stuff can be done but i thought id at least share it. :)
 
Stuporstar said:
Also, I'd love to figure out how to make the great generals give a temporary promotion to every unit in a stack. I've been looking at Bhruic's Realfort mod to see how he created a python script that allows the fort to give a bonus to units only while the unit is sitting in the fort, or attacking from it. I'm not too familiar with python yet though and am not having much luck.

Snaitf said:
I unfortunately haven't been able to figure these out either :confused: Guess we'll just have t wait for the SDK :sad:
This shouldn't be too hard to do should it?

I'm going to go have a go! (Although the AI won't be able to handle it, that much I can tell you already)

I won't be able to test it myself (not at home), but I can post up the code, and one of you guys can do it for me!

EDIT: Ok! Done!

The way I've done it is quite crude, but it was the simplest and most effecive I could think of at this time of night. It SHOULD all work. I read it through 3 times for errors.

Basically, if you shove this into the same folder as the main mod, it will give a "General" promotion to any unit on the same square as the general. Default for the promotion gives +25% combat, and uses the Combat I icon.

If you like, I can make a similar script to add a small amount to units around the general.
 

Attachments

Back
Top Bottom