Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Call To Power II > CtP2-Creation/AI/Mods/Scenarios > GoodMod: The Mod of Goods
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!

bottom of page
  
Author
Thread   
Pages (4): [ 1   2   3   4   ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:15
Post  Old Post 09-05-2004 20:57 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#91 Report this post to a moderator
Lose 30 kilos (of popups)

quote:
Originally posted by Maquiladora
Martin is there any way i can add a second good on Tundra terrain? Youve got one good on tundra (Caribou) but i want another good with different bonuses to the Caribou, is there a way without writing more code to generate a second good on tundra?

and if there isnt another way, can you tell me how to modify goods.slc to put it in


To just add a good you just need to modify some text files no new slic is needed, but if you want also a terrain bonus slic is needed.

You need to modify the following files:

To add a good at all:

goods.txt for the good itsself
terrain.txt to add the good to a certain kind of terrain
gl_str.txt to give the new good a name
uniticon.txt to to give the good some images and some text for the Great Libary, note that the GlHidden flag for CTP2 v1.1 does not work
Great_Libary.txt for some description
goodsID.txt I am not sure if this is really needed because the sprite indeces in this file are redundant and dublicated with the ones on Goods.txt, however I modified it for GoodMod

To add a terrain bonus you need to modify:

tileimp.txt to modify the tileimprovement that gives the terrain boni for the good
Goods.slc to write some code that places the according tileimps on the tiles with the goods.

Well GM1_goods.txt should be self explaining just search for "Caribou" and you find an outcommented entry, right below it. You just have to uncomment it and modify it to your needs. Basicly the entry should look like the one for the Caribou. With the exception of the field Probability. The probability of all goods that can appear on a terrain type should be at maximum 1. So the entry there is ok, but can be changed if you don't like the ratio of 1/3 to 2/3. Actual you see 0.5 and 0.25, but as the total probability is not 1 but 0.75 you get to these values.

GM1_terrain.txt is just an uncommenting job in the according terrain.

Well you have to do something in GM1_gl_str.txt but just copy 'n' paste 'n' modify the text of the according good you find there.

For GM1_uniticon.txt: You might have nothing to do except of modification, of an existing entry, everything should be there, and if not it is just again copy 'n' paste 'n' modify.

GM1_Great_Libary.txt: Here I am sure the entry is there but just needs to be filled with some life.

GM1_goodsID.txt: Well if it is necessary then you just need to modify one number.

GM1_tileimp.txt: You need to find this entry:

TILEIMP_LAND_GOOD_TWO

There you need to add an terrain effect for tundra.

GM1_Goods.slc: Here is the most complicate part, but I think I make it easy:

First rename MG_CreateGoodImprovement2 to MG_CreateGoodImprovement and remove or rename the orignal MG_CreateGoodImprovement. However I thought the first function would be faster, but I doubt that there is a difference.

Now find this piece of code in the file:

code:
elseif (HasGood(MGGoodLoc)==36) {//TERRAIN_TUNDRA_GOOD_ONE // Caribou Event:CreateImprovement(MGPlayer, MGGoodLoc, MGTileImpLandGood1, 0); }


Copy it and paste it directly under the original version.

Replace in the duplicate the 36 by 37 and replace MGTileImpLandGood1 by MGTileImpLandGood2 note the 2 at the end. Then you have to increment by one all the numbers in that line in the following entries:
code:
elseif (HasGood(MGGoodLoc)==36)


That should it be, note that you cannot load a savegame that you saved before this modification with this modification. If you try it the game crashs.

-Martin

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:15
  Old Post 09-05-2004 21:20 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#92 Report this post to a moderator
Support Apolyton, buy Call to Power 2

Thanks Martin, it was only the SLIC i was worried about, and i thought it would be easier just to ask you Ill give it a go and get back to you.

I read that Peter is trying to incorporate the good bonuses into the sourcecode which is excellent too, but as MP is still very buggy in the sourcecode, your mod is a "good" alternative

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:15
  Old Post 10-05-2004 15:50 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#93 Report this post to a moderator
Get a bigger avatar today!

Worked first time, thanks

E is offline E
King
July 24,2005 Ctp2 Tiles in sig!
May 1999
time: 21:15
  Old Post 29-09-2004 22:54 Visit E's homepage!
Edit/Delete Message Reply w/Quote
#94 Report this post to a moderator
Support Apolyton

Martin

I was trying to read the code and it loolks like the imps create a good, but you have it preset to randomly add new goods. I was think is it possible to make the SLIC so that the #3 and #4 goods that you added are not randomly placed but instead appear after an adavnce is reached?

2) is it possible to edit imps so that certain imps can only be built on certain goods (new ones probably)

3) make it so the player can only build a few good improvements? (I'm thinking about planting cotton instead of it appearing)

thanks, I might have more questions


PS have you looked into the code to see how more goods can be added like the hard coded ones?

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:15
Post  Old Post 30-09-2004 02:02 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#95 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

quote:
Originally posted by E
I was trying to read the code and it loolks like the imps create a good, but you have it preset to randomly add new goods. I was think is it possible to make the SLIC so that the #3 and #4 goods that you added are not randomly placed but instead appear after an adavnce is reached?


Actual the tile improvements only improve the good tile by providing their food/prod/gold boni to that tile with the good on it. So you have first to prevent the game from placing the goods on the map, I think there was something about the probability, or you could remove the good via slic, and then place another one. And later you can place goods of that type you removed. For that you need this specific good place function added by The Big MC to our version of the game.

quote:
Originally posted by E
2) is it possible to edit imps so that certain imps can only be built on certain goods (new ones probably)

You would need to check whether the terrain has a good and if not to stop the player from placing it if not.

[QUOTE] Originally posted by E
3) make it so the player can only build a few good improvements? (I'm thinking about planting cotton instead of it appearing)


You would need to count the good improvements of each type you have and prevent the player from placing these improvements via slic, if there are too many of them or they are too close, etc...

And of course for these kind of improvements you need to find empty spots in the button bank.

And another ugly side effect is that the GUI suggerate that the improvement can be placed, but nevertheless the slic doesn't allow to place it. And of course the AI.

quote:
Originally posted by E
PS have you looked into the code to see how more goods can be added like the hard coded ones?


Which hard encoded goods? There are no hard encoded goods, there is just a limit of 4 goods per terrain type. And of course this can be increased. And there is no need to look it up in the code to come to this statement.

-Martin

E is offline E
King
July 24,2005 Ctp2 Tiles in sig!
May 1999
time: 21:15
  Old Post 01-10-2004 01:01 Visit E's homepage!
Edit/Delete Message Reply w/Quote
#96 Report this post to a moderator
Get a bigger avatar today!

Thanks Martin, I THINK I understand everything.

So the improvement only add a bonus to the good, not the good itself...

As for:
2) is it possible to edit imps so that certain imps can only be built on certain goods (new ones probably)

You would need to check whether the terrain has a good and if not to stop the player from placing it if not.

I guess i have to use Hasgood function ahnd then block it, so I'll llok for slic to help with that. BUt does the hasgood with getdistance slic allow me to:

Find a tile with a good then find the nearest city (using get distance of 2) then (using ATG elephant code) allow only that city to make units if advance is available ?

Or even more complex find a good, allow tile improvement, then get distance (say two tiles) and allow only specific units to be built?

I'll try to find code to match this but if you can think of any that may help this please let me know.

 
Pages (4): [ 1   2   3   4   ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:15.
Apolyton Time is 00:15.
    top of page
Rate This Thread:
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0355 seconds (88.38% PHP - 11.62% MySQL) with 30 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net