
Announcement
Collapse
No announcement yet.
Wonderful Reality
Collapse
X
-
and
This event was pursuing me since the beggining of the coding.
I am relief that the code is until futher testing bug free but i feel bad that i lost so much time in this event. When i should have tested the int_t variables in the first place.
Anyway, thanks Locutus. I feel much better now
Leave a comment:
-
D'oh, Pedrunn! If I had been able to follow this discussion more closely I could have told you ages ago how the CreateUnit event works. You don't really need the unit variable, it has no real value there (although it couldn't have hurt, I agree)! You should use the integers to find out if the unit is a Settler or similar, as I did in the old version of the Militia code:
Code:// if a settler type unit is built, update # of Militia units if needed HandleEvent(CreateUnit) 'MM2_MilitiaSettlerBuilt' post { // triggers if a unit is created city_t tmpCity; int_t tmpValue; tmpValue = value[0]; tmpCity = city[0]; if (CityIsValid(tmpCity)) { // and it was created from a city (no valid city means unit was created from ruin FE) if (tmpValue == UnitDB(UNIT_SETTLER) || tmpValue == UnitDB(UNIT_URBAN_PLANNER) || tmpValue == UnitDB(UNIT_SEA_ENGINEER)) { // and if unit is settler unit if (tmpCity.population > 0) { // and the city still exists (again not sure if needed) MM2_TryMilitia(tmpCity.population, tmpCity); // update Militias if needed } } } }
Leave a comment:
-
IW, I have just seen the pics you sent meI will find now a number to them in the til file.
I have just started the a new game with the cityX. The CreateUnit event didnt work out and the killPop wasnt triggered with this event. That really made me sad but I did some more testing with it and I found out that the CreateUnit does work. The problem is that there isnt a unit variable. if you take a good look in the database you will find that the unit_t variable is just to save the unit when it is used as a function
Code:CreateUnit(int_t
, location_t, city_t, int_t, int_t [, unit_t]) . This may lead to a small bug wich is reduce the a city improvement if a unit is created in a city and this city has a settler. But better than nothing. Yet I must think if the benefits are better than the bad part.
Note: A CreateUnit event without a unit variable? what were the CTP2 programmers thinkingLast edited by Pedrunn; August 21, 2002, 21:26.
Leave a comment:
-
yup. hopefully the tile file will be a separate download, to save space in every mod where it will be duplicated.
I've emailed the 7 pics off to Pedrunn. I used the Urgup cones, and a waterfall in the end for the sixth and seventh. It was easier than trying to sink a crater, raise a mountain, or pick out one tile in a jungle.
Let me know when it's ready! I have a need for it
Leave a comment:
-
Originally posted by Immortal Wombat
It needs one update, but I'm waiting until the tile file is public, so the update needs only to be text and code - next week.
Yes, they'll be in the Tile File, and I'll finish the code soon.Let me know when it's ready! I have a need for it.
Its in the readme, but for the Apolyton Pack, I think it is just APOL_tileimp.txt
Leave a comment:
-
Originally posted by Dale
Questions:
1- How stable/bug-free is the wonder code? (IE: Will there be any major patches to the code needed)
3- IW: Any plans to incorporate the other wonders we've been PMing about?
4- Let's just say I wanted to capture every third pop-growth point in a city via SLIC and use that pop-point for something else, what affect would your two codes have on this plan, and vice-versa?5- What files need modifying, or is it all in the readmes?
6- If I add another settler-type unit, say "Colonist", do I need to change anything in the two codes? (I'm assuming you've used functions like AddPop, RemovePop etc)
Leave a comment:
-
Originally posted by Pedrunn
For both of my codes i never got crashes with it. Even in the ealy version. And i test it really hard. with dozens of wonders built by one single city (for the wonder code) even the Great Wall placed over other wonders problem is fixed (its place is saved until it is not built). And city size up to 120 (maximum) at all ages having the placements placed with amazing precision. All bugs fixed here were caused wrong use of variables but i cant find any of them anymore so i dont think patch will be needed. In-game the code was a sucess. I already played 200 turs with dozens of other people slics (I am using at my unfinished mod). And not a problem at all. I am going to start a whole game testing tomorrow. If any problem appears i tell you.
The only problem that you may think is cities with the same owner squeezed together (this means a not perfect radius). This may cause placements of one city in the other oneExcellent. The same owner thing won't bother me if it occurs, as long as it's in my borders.
As for the wonders it wont affect nothing. but for the cities depends on what you mean by that. The city expasion is triggered by the MakePop event. When it happens the city checks the size of the city if it is a multiple of three it makes the city grow.
But i also use the KillPop event. When this event is triggered it check the size of the city if it is a multiple of three minus 1 it replaces a city improvements by a dead city one. KillCity, CreatePark are coverd killing all tiles around the city depending on its size. BuildUnit (settlers, Urban Planners and Sea engineers), PlagueCity, Slave RaidCity, UndergroundRailWay is also covered and creates a dead city. And nuke city also kill cities
improvements
Probably not. I added the BuildUnit event but i dont know if the reducing of the city is caused by this event (it seemed to be bugged before) or the KillPop one. But the if there is the need of an addition it willl be one line only.Excellent. *note to self* I could always just use the existing Settler and change its name.
Here is the draft of the read me for the cityX
Leave a comment:
-
All asnwers goes to my city expansion and wonder expansion.
Originally posted by Dale
Questions:
1- How stable/bug-free is the wonder code? (IE: Will there be any major patches to the code needed)
2- How stable/bug-free is the city expansion code? (IE: Will there be any major patches to the code needed)
The only problem that you may think is cities with the same owner squeezed together (this means a not perfect radius). This may cause placements of one city in the other one
Originally posted by Dale
4- Let's just say I wanted to capture every third pop-growth point in a city via SLIC and use that pop-point for something else, what affect would your two codes have on this plan, and vice-versa?
But i also use the KillPop event. When this event is triggered it check the size of the city if it is a multiple of three minus 1 it replaces a city improvements by a dead city one. KillCity, CreatePark are coverd killing all tiles around the city depending on its size. BuildUnit (settlers, Urban Planners and Sea engineers), PlagueCity, Slave RaidCity, UndergroundRailWay is also covered and creates a dead city. And nuke city also kill cities
improvements
Originally posted by Dale
5- What files need modifying, or is it all in the readmes?
tileimp.txt only. I plan to add some messages but so far only the tileimp.txt (of course the til file too).
6- If I add another settler-type unit, say "Colonist", do I need to change anything in the two codes? (I'm assuming you've used functions like AddPop, RemovePop etc)
I suppose that's enough at this point.
Those function arent in the code. RemovePop is only to prevent the cities to grow if there is no place to expand.
Here is the draft of the read me for the cityXAttached Files
Leave a comment:
-
IW & Pedrunn:
Congrats guys. Well done!
Questions:
1- How stable/bug-free is the wonder code? (IE: Will there be any major patches to the code needed)
2- How stable/bug-free is the city expansion code? (IE: Will there be any major patches to the code needed)
3- IW: Any plans to incorporate the other wonders we've been PMing about?
4- Let's just say I wanted to capture every third pop-growth point in a city via SLIC and use that pop-point for something else, what affect would your two codes have on this plan, and vice-versa?
5- What files need modifying, or is it all in the readmes?
6- If I add another settler-type unit, say "Colonist", do I need to change anything in the two codes? (I'm assuming you've used functions like AddPop, RemovePop etc)
I suppose that's enough at this point.
Leave a comment:
-
one left
Urgh, this is getting annoyingly complicated
There are 3 situations:
1/ Wonders only
2/ Both Codes
3/ City X only
1/ I've done it. It needs a bit of polishing, but its in the DB, and I'm happy with it, until the Tile File is done
2/ You've done it. The last code you posted (without the wonder creation code in it, please) is fine for this. Use the TileHasWonder with the 10 tile improvements I use in the wonder code - the default game. Then the pair of mods work in conjunction, over the default game.
3/ IMO, you need to make a different SLIC file - perhaps even make them different ModSwapper options, CityX with Wonders, and CityX without wonders - and make it so that the wonders are not even mentioned.
I don't *think* there is any conflict between the two codes, working over the default game. When the default version is complete, bug-free, and published; then make Wes, Dave, Martin, and Dale(?) aware of this, so that versions can be made for the 'big' mods.
I wanted you to really consider use the TileHasWonder function. it will make the combo setting up much easier.
Setting up mods on a thousand PCs ('Poly pack download count) is a house of cards. If too much relies on too much else, the whole thing screws up. Not everybody comes online every day to get the latest release
Leave a comment:
-
IW i am waiting your pictures for the apolyton tile file. I have already the read me. the only thing not ready yet is to teach how to use both of our codes together. For that i want to see your newer version of the wonder code.
I wanted you to really consider use the TileHasWonder function. it will make the combo setting up much easier.Last edited by Pedrunn; August 20, 2002, 14:05.
Leave a comment:
Leave a comment: