UGO
Civilization Fanatics' Center  

Welcome to Civilization Fanatics' Center.

You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support.

Go Back   Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > Civ4 - Project & Mod Development > Civ4 - Fall from Heaven > FfH2 Modmods, Scenarios, and Maps

Notices

Reply
 
Thread Tools
Old Sep 19, 2009, 02:07 PM   #1
Tholal
Warlord
 
Join Date: May 2009
Posts: 135
[MOD] Militia Promotions (minor mod)

This is a very simple mod whose purpose is to add a little bit of flavor to the basic troops via semi-random, terrain-based promotions. In short, there is a small chance that a newly built unit will gain an extra, free promotion on creation based on the type of terrain around the building city.

This mod is compatible with FfH2 0.41g. Current version of this mod is 0.2


UPDATE NOTES:
Version 0.2
* Changed icon for Cliff Walker promotion
* Fixed check for Hell terrain so that it looks for all four types of Hell terrain
* Added the possibility to acquire the amphibious promotion based on number of Shore tiles next to the city
* Slightly increased chance for these promotions to appear

Download Militia Promotions mod

DETAILS:

This mod checks the terrain around the building city everytime a unit is built as long as the unit is alive, is not a hero, and is not a settler or worker. There is a small chance that the unit will receive a bonus, terrain-oriented promotion based on the current terrain around the city.

Three of the possible promotions are already existing ones:
Winterborn - Based on number of Snow and Tundra tiles (Illians and Doviello are excluded from this check)
Demon-slaying - Based on the number of Hell terrain tiles (Infernal are excluded from this check)
Amphibious - Based on the number of Shore tiles
And three are brand new:
Cliff Walker - Based on the number of Hills and Peak tiles
+10% attack and defense in hills

Sand Devil - Based on the number of Sand tiles
+10% attack and defense in desert

Tree Warden - Based on the number of Forest, Ancient Forest and Jungle tiles (both elven civs have reduced chance to receive this promotion)
+10% attack and defense in Forest, Ancient Forest and Jungle

It is possible (though extremely unlikely) for a single unit to get all six promotions if they have at least one tile that fits into each category around their city.


This mod includes edits to the following files:
CvEventManager.py
CIV4PromotionInfos.xml
CIV4GameText_FFH2.xml
You should make backups of these three files prior to installing the Militia Promotions mod.

This mod also includes three new promotion icons. These should be placed in the the FFH folder under Art\Interface\Buttons\Promotions (Note: you'll probably have to create this folder)
himalayas.dds - Taken from this graphics pack. Used for the Cliff Walker promotion
markofthescorpion.dds - Taken from the Age of Ice scenario. Used for the Sand Devil promotion
shamrock.dds - Taken from this graphics pack. Used for the Tree Warden promotion

This mod was mostly created as a self-lesson on how to modify the python files. As such, I mainly just cut and pasted codes from different parts of the file and tweaked it to do what I wanted. So I would love to hear any comments on the code. Am I doing anything wrong? Is there a better way to handle the terrain and promotion checks? Did I miss something important?

I would love to hear any gameplay feedback and I'm willing to continue updating and tweaking this mod if there is any interest in it.

(code snippets removed for the moment)

STILL TO DO:
* Come up a better, non-linear formula
* Change base chance to a variable to enable easier future adjustments
* Icons for new promotions (I'm still not happy with the ones I have)
* Localization
* Installer

Last edited by Tholal; Oct 05, 2009 at 10:51 PM. Reason: updated to 0.2
Tholal is offline   Reply With Quote
Old Sep 19, 2009, 03:57 PM   #2
[to_xp]Gekko
WM junkie
 
[to_xp]Gekko's Avatar
 
Join Date: Dec 2005
Location: Seyda Neen, Vvardenfell
Posts: 4,582
nice idea and very interesting mechanic!
__________________
Shadows entertain the unwashed masses
Scholars explain their numb reactions
I don't even know if I can ever find Truth
But I'm sure it won't come from following You
[to_xp]Gekko is offline   Reply With Quote
Old Sep 22, 2009, 04:08 PM   #3
cyther
Lord of the Dance
 
cyther's Avatar
 
Join Date: Jun 2008
Location: Fane of Lessers
Posts: 963
Very cool. Could I use it in the next version of Rise of Darkness?
__________________
Rise of Darkness Do you dare to enter the Wild? Rise of Darkness Plus
Member: Fallen Ages - A Journey through the Ages
FFH (Download) (Forum) (Wiki)

"*Applause.* Aye, there you go! The floor is yours! Please, don't hurt anyone. Too much. Unless it'd be funny."-KillerClowns
cyther is offline   Reply With Quote
Old Sep 22, 2009, 06:46 PM   #4
Tholal
Warlord
 
Join Date: May 2009
Posts: 135
Quote:
Originally Posted by cyther View Post
Very cool. Could I use it in the next version of Rise of Darkness?
Certainly! Unless otherwise stated, I consider anything I post here to be public domain. And the code is pretty simple and self-contained, so it should be relatively easy to modify/tweak.
Tholal is offline   Reply With Quote
Old Oct 05, 2009, 07:24 AM   #5
Sephi
Emperor
 
Join Date: Jan 2009
Posts: 1,586
Tholal, I read you plan an update for this. Any ETA on this?
__________________
Fall From Heaven 2
- The three words why Civ V isn't needed. It's that awesome.
Wildmana

If your Enemies won't kill you, nature will.
A Fall From Heaven 2 mod including BUG, Denevs FFHBUG, FFH Better AI, Pirates, Wild mana Guardians, lots of new Gameoptions and much more
Sephi is offline   Reply With Quote
Old Oct 05, 2009, 04:48 PM   #6
Tholal
Warlord
 
Join Date: May 2009
Posts: 135
Quote:
Originally Posted by Sephi View Post
Tholal, I read you plan an update for this. Any ETA on this?
Yeah. I updated the code this weekend but haven't tested it much. I'll try and do that tonight. Nothing major. Here are the planned updates:

* New icon for the Cliff Walker promotion
* Updated the check for Hell terrain to include all 4 types
* Added check for shoreline (chance to grant amphibious promotion)
* Slightly increased chance for promotions to be granted
Tholal is offline   Reply With Quote
Old Oct 05, 2009, 10:51 PM   #7
Tholal
Warlord
 
Join Date: May 2009
Posts: 135
Updated to version 0.2 See first post for details.
Tholal is offline   Reply With Quote
Old Oct 06, 2009, 04:37 AM   #8
Sephi
Emperor
 
Join Date: Jan 2009
Posts: 1,586
great! Thanks
__________________
Fall From Heaven 2
- The three words why Civ V isn't needed. It's that awesome.
Wildmana

If your Enemies won't kill you, nature will.
A Fall From Heaven 2 mod including BUG, Denevs FFHBUG, FFH Better AI, Pirates, Wild mana Guardians, lots of new Gameoptions and much more
Sephi is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > Civ4 - Project & Mod Development > Civ4 - Fall from Heaven > FfH2 Modmods, Scenarios, and Maps > Militia Promotions (minor mod)

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Small mod altering units and promotions Vorpal+5 Civ4Col - Creation & Customization 5 Dec 03, 2008 07:35 AM
New mod request: Naval promotions Nishdog Civ4 - Creation & Customization 5 Sep 11, 2007 12:47 AM
Can I mod FfH2 promotions? marioflag Civ4 - Fall from Heaven 8 Jan 19, 2007 07:50 AM
IDEA: Can anyone make a militia mod? arv Civ4 - Creation & Customization 3 Nov 08, 2006 02:33 AM
Potential Mod idea: "Militia" units Figaro Civ3 - Creation & Customization 13 Feb 11, 2005 01:22 AM



All times are GMT -6. The time now is 09:11 AM.


Powered by vBulletin®
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
This site is copyright © 2000 - 2009, Civilization Fanatics' Center.
Support CFC: Amazon.com | EB Games | Amazon UK | Amazon DE | Amazon CA | Amazon FR