Advertisement
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

Notices

Reply
 
Thread Tools
Old Jul 27, 2007, 02:49 PM   #1
Zebra 9
Emperor
 
Zebra 9's Avatar
 
Join Date: May 2006
Location: Middle of Cyberspace
Posts: 1,554
Hammer 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)
will put five 5 court houses in the city. Again all 5 are fully operational and working.

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)
Now this should set playere 0 to team 0, with Washington as the leader of America. Now a few problems with this are that it will change the player color to an available color, so if the Americans are already in the game the new team will not get the American blue. Also I believe that it will change the player from human to AI (that could be bad).

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)
but has now been changed to
Code:
CyUnit initUnit(UnitType iIndex, INT iX, INT iY, UnitAIType eUnitAI, DirectionType eDirection)
I'm assuming the direction type was added for the After World scenario.
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.
Zebra 9 is offline   Reply With Quote
Old Jul 27, 2007, 02:55 PM   #2
Zebra 9
Emperor
 
Zebra 9's Avatar
 
Join Date: May 2006
Location: Middle of Cyberspace
Posts: 1,554
Reserved for future.
__________________
I'm Updating My MOD COMPs

Zebra 9 is offline   Reply With Quote
Old Jul 27, 2007, 02:56 PM   #3
Zebra 9
Emperor
 
Zebra 9's Avatar
 
Join Date: May 2006
Location: Middle of Cyberspace
Posts: 1,554
Another reserved just in case.
__________________
I'm Updating My MOD COMPs

Zebra 9 is offline   Reply With Quote
Old Jul 31, 2007, 10:05 AM   #4
Zebra 9
Emperor
 
Zebra 9's Avatar
 
Join Date: May 2006
Location: Middle of Cyberspace
Posts: 1,554
Added a new tid bit.
__________________
I'm Updating My MOD COMPs

Zebra 9 is offline   Reply With Quote
Old Jul 31, 2007, 10:53 AM   #5
Teg_Navanis
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
Teg_Navanis is offline   Reply With Quote
Old Aug 01, 2007, 08:22 AM   #6
Zebra 9
Emperor
 
Zebra 9's Avatar
 
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

Zebra 9 is offline   Reply With Quote
Old Aug 09, 2007, 03:29 PM   #7
Zebra 9
Emperor
 
Zebra 9's Avatar
 
Join Date: May 2006
Location: Middle of Cyberspace
Posts: 1,554
Bump
Added a new tid bit.
__________________
I'm Updating My MOD COMPs

Zebra 9 is offline   Reply With Quote
Old Aug 09, 2007, 03:36 PM   #8
JeBuS27
Heretic
 
JeBuS27's Avatar
 
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.
JeBuS27 is offline   Reply With Quote
Old Aug 09, 2007, 03:38 PM   #9
Zebra 9
Emperor
 
Zebra 9's Avatar
 
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

Zebra 9 is offline   Reply With Quote
Old Aug 09, 2007, 04:06 PM   #10
Teg_Navanis
King
 
Join Date: Jan 2006
Posts: 737
I was most interested in this:

Quote:
I'm still working on the API
__________________
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
Teg_Navanis is offline   Reply With Quote
Old Aug 09, 2007, 04:15 PM   #11
Zebra 9
Emperor
 
Zebra 9's Avatar
 
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

Zebra 9 is offline   Reply With Quote
Old Aug 10, 2007, 07:58 PM   #12
Ball Lightning
www.sporedum.net
 
Ball Lightning's Avatar
 
Join Date: Apr 2006
Location: Thunderstorm, Melbourne, Australia
Posts: 2,126
Images: 3
Can anyone explain to me how to make modulars, not just in mumble jumple.
Ball Lightning is offline   Reply With Quote
Old Aug 10, 2007, 08:02 PM   #13
Zebra 9
Emperor
 
Zebra 9's Avatar
 
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

Zebra 9 is offline   Reply With Quote
Old Aug 10, 2007, 08:09 PM   #14
Ball Lightning
www.sporedum.net
 
Ball Lightning's Avatar
 
Join Date: Apr 2006
Location: Thunderstorm, Melbourne, Australia
Posts: 2,126
Images: 3
Yeah, Kael didn't explain it well. I'll just have to do it myself...
Ball Lightning is offline   Reply With Quote
Old Aug 11, 2007, 02:03 AM   #15
strategyonly
Caveman2Cosmos Modder
 
strategyonly's Avatar
 
Join Date: Mar 2006
Location: MN
Posts: 14,241
Images: 5
Quote:
Originally Posted by Ball Lightning View Post
Can anyone explain to me how to make modulars, not just in mumble jumple.
I put how to do it in YOUR events thread for you.
__________________
Caveman 2 Cosmos updated 8 May 13, 2:00 a.m.
Caveman2Cosmos Forum: Project and Mod Development Forum HERE
strategyonly is offline   Reply With Quote
Old Aug 17, 2007, 03:38 PM   #16
Zebra 9
Emperor
 
Zebra 9's Avatar
 
Join Date: May 2006
Location: Middle of Cyberspace
Posts: 1,554
I have a first version of the BtS Python API here.
__________________
I'm Updating My MOD COMPs

Zebra 9 is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > BtS MODing Info

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


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


Advertisement

All times are GMT -6. The time now is 09:37 PM.


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