| General | Hosted Sites | Civ5 | CivRev | Civ4Col | Civ4 | Civ3 | Civ2 | Civ1 | Misc | Marketplace |
![]() |
|
|
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. |
|
|||||||
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Emperor
Join Date: May 2006
Location: Middle of Cyberspace
Posts: 1,554
|
BtS MODing Info
In this thread I will list new MODing info for BtS such as new functions and things of importance to MODers. Feel free to post your findings.
Multi-Buildings: To start with there is a new XML Global Define called CITY_MAX_NUM_BUILDINGS. This new define allows you to limit how many buildings a city can build. So let's say you set it to 5. Now all of your cities can build 5 of any building. Now for the really cool part, if you have 5 court houses in the city it should give you the effects of 5 court houses not 1. ![]() Now because of this there is no longer a setHasRealBuilding or a isHasRealBuilding function. Instead they have setNumRealBuildings and getNumRealBuildings. These functions both take the building type index and setNumRealBuildings takes an integer value as the second value, this second value tells the game that you want so many buildings. So code like this: Code:
pCity.setNumRealBuildings(gc.getInfoTypeForString("BUILDING_COURTHOUSE", 5)
![]() New Civs: Now we can create a new civ with the CyGame().addPlayer function! This function takes 4 arguments. They are, eNewPlayer, eNewTeam ( a team type index), eLeader (a leader type index, and eCiv (a civ type index). As far as I can tell you could use this function to change a players civ, leader, and team by setting eNewPlayer to a value that is equal to the index of the player you want to change. Here is some code to show what I mean: Code:
iPlayer = 0 ## In single player this is the human player
iCiv = CyGlobalContext().getInfoTypeForString("CIVILIZATION_AMERICA")
iLeader = CyGlobalContext().getInfoTypeForString("LEADER_WASHINGTON")
iTeam = 0
CyGame().addPlayer(iPlayer, iTeam, iLeader, iCiv)
Creating New Units: I noticed while helping out with some stuff that the code to create a unit in python has been changed. It used to be: Code:
CyUnit initUnit(UnitType iIndex, INT iX, INT iY, UnitAIType eUnitAI) Code:
CyUnit initUnit(UnitType iIndex, INT iX, INT iY, UnitAIType eUnitAI, DirectionType eDirection) Oh, so everyone knows putting DirectionTypes.DIRECTION_SOUT in the eDirection spot works. And if anyone cares the direction types are: DirectionTypes.NO_DIRECTION DirectionTypes.DIRECTION_NORTH DirectionTypes.DIRECTION_NORTHEAST DirectionTypes.DIRECTION_EAST DirectionTypes.DIRECTION_SOUTHEAST DirectionTypes.DIRECTION_SOUTH DirectionTypes.DIRECTION_SOUTHWEST DirectionTypes.DIRECTION_WEST DirectionTypes.DIRECTION_NORTHWEST DirectionTypes.NUM_DIRECTION_TYPES Python API for BtS is here.
__________________
I'm Updating My MOD COMPs![]() Last edited by Zebra 9; Aug 17, 2007 at 03:37 PM. |
|
|
|
|
|
#2 |
|
Emperor
Join Date: May 2006
Location: Middle of Cyberspace
Posts: 1,554
|
Reserved for future.
__________________
I'm Updating My MOD COMPs![]() |
|
|
|
|
|
#3 |
|
Emperor
Join Date: May 2006
Location: Middle of Cyberspace
Posts: 1,554
|
Another reserved just in case.
__________________
I'm Updating My MOD COMPs![]() |
|
|
|
|
|
#4 |
|
Emperor
Join Date: May 2006
Location: Middle of Cyberspace
Posts: 1,554
|
Added a new tid bit.
__________________
I'm Updating My MOD COMPs![]() |
|
|
|
|
|
#5 |
|
King
Join Date: Jan 2006
Posts: 737
|
So that's how they did the multiple building thing in Final Frontier. Sweet!
__________________
Unit Statistics Mod - Kill list, damage counter and more. Keep track of your units and find out which one of them is the best! CivMail - A small e-Mail client for Civ4 |
|
|
|
|
|
#6 |
|
Emperor
Join Date: May 2006
Location: Middle of Cyberspace
Posts: 1,554
|
I thought that was what it was for, but I wasn't sure.
__________________
I'm Updating My MOD COMPs![]() |
|
|
|
|
|
#7 |
|
Emperor
Join Date: May 2006
Location: Middle of Cyberspace
Posts: 1,554
|
Bump
![]() Added a new tid bit.
__________________
I'm Updating My MOD COMPs![]() |
|
|
|
|
|
#8 |
|
Heretic
Join Date: Sep 2005
Posts: 321
|
Which tidbit would that be? (it's helpful if you tell us what you've changed somewhere
)
__________________
Addendum: This is simply my opinion, and should not be taken as an attack or lible against any person. Use of basic reasoning skills and logic is recommended when reading my posts. No emotional inflection should be read into my posts, nor should any attitude, positive or negative, be inferred from my posts. |
|
|
|
|
|
#9 |
|
Emperor
Join Date: May 2006
Location: Middle of Cyberspace
Posts: 1,554
|
The last one, it's about unit creation in python.
__________________
I'm Updating My MOD COMPs![]() |
|
|
|
|
|
#10 | |
|
King
Join Date: Jan 2006
Posts: 737
|
I was most interested in this:
Quote:
__________________
Unit Statistics Mod - Kill list, damage counter and more. Keep track of your units and find out which one of them is the best! CivMail - A small e-Mail client for Civ4 |
|
|
|
|
|
|
#11 |
|
Emperor
Join Date: May 2006
Location: Middle of Cyberspace
Posts: 1,554
|
I'm hoping to have that API done by friday next week.
Yea if I quite playing the game I might be able to finish it.
__________________
I'm Updating My MOD COMPs![]() |
|
|
|
|
|
#12 |
|
www.sporedum.net
|
Can anyone explain to me how to make modulars, not just in mumble jumple.
|
|
|
|
|
|
#13 |
|
Emperor
Join Date: May 2006
Location: Middle of Cyberspace
Posts: 1,554
|
You mean modular XML? I have no clue how to do that.
![]() ![]() ![]() ![]() ![]() 1000th Post!!!![]() ![]() ![]() ![]() ![]()
__________________
I'm Updating My MOD COMPs![]() |
|
|
|
|
|
#14 |
|
www.sporedum.net
|
Yeah, Kael didn't explain it well. I'll just have to do it myself...
|
|
|
|
|
|
#15 | |
|
Caveman2Cosmos Modder
|
Quote:
__________________
Caveman 2 CosmosCaveman2Cosmos Forum: Project and Mod Development Forum HERE |
|
|
|
|
![]() |
| Bookmarks |
|
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [BTS] Song of the Moon Info Center | frenchman | Civ4 - Song of the Moon | 22 | Sep 10, 2010 09:48 PM |
| BTS Building Info that's been bugging me. | Genv [FP] | Civ4 - General Discussions | 2 | Apr 30, 2008 08:25 PM |
| BTS screen info | Red Dwarf Devil | Civ4 - General Discussions | 0 | Aug 23, 2007 02:49 AM |
| RFC: BtS info? | SkippyT | Civ4 - Rhye's and Fall of Civilization | 15 | Jul 20, 2007 06:00 PM |