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 > Miscellaneous > Archive > CtP2-Creation/AI/Mods/Scenarios-Archive > Problem in GM1_Goods.slc (in Cradle 1.35)
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!

bottom of page
  
Author
Thread    < Last Thread     Next Thread > Post New Thread     Post A Reply
MrBaggins is offline MrBaggins
King

May 1999
time: 05:25
Post  Old Post 15-01-2003 18:19
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Problem in GM1_Goods.slc (in Cradle 1.35) Get a bigger avatar today!

After a pretty long hiatus, I've come back to see what the product of all the hard work on CtP2 mods have yielded, and thought I'd give Cradle a shot...

I've installed CtP2 (fresh install), The 1.11 patch, modswapper and Cradle 1.35. CRA_Goods.slc is GM1_Goods.slc v.1.6

I started checking out what could be done in the editor (using a 100x200 map.) I put some goods clustered together for a test. I had some issues with goods; when starting the scenario, not all of the new additional goods I placed have their associated underlying terrain improvements. The issue is reproducable. At first I thought it might be due to the number of goods on the map, however, I reproduced the problem on another map, which I started from scratch.

It seems to happen often when goods are placed close together (within a square.) Some or all of the goods may or may not be affected.

It can be easily reproduced if you start the editor with a small map, place a couple of 3x3 blocks of goods close to your start location, and start it as a scenario.

It can be worked around since its not necessarily a critical issue; you don't often need to place resources close together like that, but might want to in a scenario.

Any thoughts?

MrBaggins

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:25
  Old Post 15-01-2003 19:32 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Avatar Enlargement: We've got the solution

I think it's probably caused by the fact that the 'good' tile improvement placement only happens once, when the map is generated for the first time. When you place goods again afterwards, they do not get the tile improvements done underneath.

Try starting the scenario, then opening the chat window (press ' ), type /reloadslic, press enter...
Next turn, the tile improvements should be placed underneath the tiles.

MrBaggins is offline MrBaggins
King

May 1999
time: 05:25
  Old Post 15-01-2003 22:49
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

The code is being executed: the fresh map has the goods placed... is saved as a scenario, then started as a new game. The code in question is executed (I checked with a message box.) However it doesn't handle all cases.

Could it be that somehow the improvement is 'cut' before its finished, when the resources are grouped closely (and just hasn't been seen since its not been used in this situation before) I'm trying a few things with the code to see if I can come to a solution, but other peoples effort is appretiated.

MrBaggins

Peter Triggs is offline Peter Triggs
Prince
Gone Fishin, Canada
Jan 2000
time: 05:25
  Old Post 15-01-2003 23:27
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Remove this text

Next thing we know CD and Nordicus will be posting.

Good to see you again MrBaggins!

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:25
Post  Old Post 15-01-2003 23:35 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Increase the size of your Attachments

quote:
Originally posted by MrBaggins
Could it be that somehow the improvement is 'cut' before its finished, when the resources are grouped closely (and just hasn't been seen since its not been used in this situation before) I'm trying a few things with the code to see if I can come to a solution, but other peoples effort is appretiated.


That's not the problem all auxiliry tile improvements are cut before the good tile improvement is finished. The problem is that the auxiliry tile improvement is placed on a random neighbour terrain tile of the good and if there is a good then the good tile improvment is cut of with the auxiliry tile improvement.

To test this you could go to the MG_CutUnitImprovement event handler, there is CutImprovement event called, comment this line out and you should get a map with a lot of terrain owned by the Barbarians, and you should also find some of them on goods with the good improvement. The alternative would be to put the tile imps of your new goods manually on the map. They should be on the map if you create a scenario. But then you have to disable the good improvment process. That can be done by going to the MG_NewGoodImprovement event handler and find there these lines:

if (GetCurrentRound () == 0 ) {//&& player[0] == 1
elseif (GetCurrentRound () > 1) {//if someone reloads slic

by

if (GetCurrentRound () == -1 ) {//&& player[0] == 1
elseif (GetCurrentRound () > -1) {//if someone reloads slic

That has the effect the good improvement code is never executed in the scenario game (remember the tile imp locations should be saved with the map, so no need to put them again on the map). In the original scrip the good improvment process is only executed on turn 0, otherwise the code will be disabled. In the new version would be run the good improvement code on turn -1, as there is no turn -1 it is never executed, so that the elseif statement is always true and will disable the code.

I think it is possible to work out a sollution to improve the goods without the auxiliry improvement but this needs time that I don't have, unfortunatly.

-Martin

MrBaggins is offline MrBaggins
King

May 1999
time: 05:25
Lightbulb  Old Post 16-01-2003 00:22
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Lose 30 kilos (of popups)

Thanks for the feedback

I had a thought about a possible solution and it seems to work... although I'm going to test it out more.


I replaced the following four lines of "HandleEvent(BeginTurn)'MG_NewGoodImprovement'pre {"

code:
GetRandomNeighbor(MGGoodLoc, MGUnitLoc); CreateUnit(0, UnitDB(UNIT_BOMBER), MGUnitLoc, 1, MGGoodUnit); Event:CreateImprovement(0,MGUnitLoc, MGTestImp,0 ); Event: DisbandUnit(MGGoodUnit);


with

code:
for (k=0; k<=7 ; k=k+1) { GetNeighbor(MGGoodLoc, k, MGUnitLoc); if( HasGood(MGUnitLoc) == -1 ) { CreateUnit(0, UnitDB(UNIT_BOMBER), MGUnitLoc, 1, MGGoodUnit); Event:CreateImprovement(0,MGUnitLoc, MGTestImp,0 ); Event: DisbandUnit(MGGoodUnit); k=k+7; } }


you need to initialize k with
code:
int_t k;
in the header of the event.


Essentially, rather than randomly picking a neighbor square to place the unit and test tile imp on, it picks the first one without a good on.

I thought it might not work on a 3x3 grid of goods, but I was wrong... that seems to work ok too.

mrbaggins

Engineer_J is offline Engineer_J
Settler

Dec 2002
time: 05:25
  Old Post 16-01-2003 00:50
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Support Apolyton, buy Call to Power 2

Speaking of tile improvements, remind me it has been awhile since I looked at this, but in CTP2 do any goods add to the food a tile brings into the city? I know Civ 3 has wheat and CTP had this also (it is easier to see when you move citizens around). Just wondering.

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:25
Post  Old Post 16-01-2003 01:38 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Browse Apolyton AD-FREE

In the default CTP2 game no good gives a food, gold or production bonus for your city. This was possible in CTP1 but not in the default game, too. In CTP2 it was intended but because of bugs or unfinsihed work it doesn't work, therefore I have to use the workaround to place invisible Tile Improvements on the good tiles to add such a terrain bonus.

-Martin

Engineer_J is offline Engineer_J
Settler

Dec 2002
time: 05:25
  Old Post 16-01-2003 03:22
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Help yourself to an AD-FREE life

What mods have that feature and which goods do they effect? Can I see the bonus in the game someway easily?

MrBaggins is offline MrBaggins
King

May 1999
time: 05:25
  Old Post 16-01-2003 03:37
Edit/Delete Message Reply w/Quote
#10 Report this post to a moderator
Full PM-box? Change here!

GoodMod is basically what you are looking for. Its available as an addon to CityMod2, MedPack2 and the Apolyton Pack, and its also included in Cradle of Civilization.

Find what you need here

To discover what bonuses, just right click a square, or view the civilopedia entries for the trade goods.

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:25.
Apolyton Time is 00:25.
    top of page
Rate This Thread:
archivepost
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.0405 seconds (89.36% PHP - 10.64% MySQL) with 31 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