May 21, 2001, 13:20
|
#211
|
Emperor
Local Time: 11:00
Local Date: October 31, 2010
Join Date: Mar 1999
Location: Zwolle, The Netherlands
Posts: 6,737
|
quote:
Originally posted by janilxx on 05-21-2001 03:08 AM
I saw that there is now a file MM_const.txt. I have used modswapper and I saved medpack to be the used mod. Then I checked const.txt. AI_GOAL_TIME_SLICE, AI_MAX_TIME_SLICE and AI_TOTAL_TIME_SLICE values are not changed(increased) in const.txt. But in MM_const.txt they are increased. So how does modswapper work? If I start medpack using modswapper does it copy mm_const.txt over const.txt when I am strating game?
|
Modswapper will copy the MedMod's MM2_gamefile.txt over the original gamefile.txt. Gamefile.txt contains a list of all of CTP2's text files, so when you use Modswapper with MM2 it will use the MM2_ files instead of the original files.
I believe that I programmed Modswapper to copy the mod's gamefile.txt over the original every time you start it, but I'm not sure any more, so if you want to be safe, just start Modswapper, select original game and save&exit. Now if you change back to MedMod2 again it should certainly load the new files.
|
|
|
|
May 21, 2001, 20:34
|
#212
|
Emperor
Local Time: 20:00
Local Date: October 31, 2010
Join Date: Dec 2000
Posts: 3,944
|
Wes:
Can't email attachments out or receive, so I'll post the changes here. In my SLIC file, change the two following sections to what they are below. You'll get your embassies back.
Code:
|
///////////////////////////////////
// Create embassy routine
///////////////////////////////////
void_f DIP_EstablishEmbassyFunc(int_t recipient) {
int_t civ;
int_t civ2;
city_t tmpcity;
location_t tmploc;
unit_t tmpunit;
civ2 = recipient;
civ = player[0];
if(HasAdvance(civ, ID_ADVANCE_ARISTOCRACY) && IsPlayerAlive(civ2) && civ2 != 0 && !(AtWarWith(civ, civ2))) {
GetCityByIndex(civ2, 0, tmpcity);
if(CityIsValid(tmpcity)) {
GetRandomNeighbor(tmpcity.location, tmploc);
if(GetUnitsAtLocation(tmploc) == 0) {
if(TerrainType(tmploc) < 10 || TerrainType(tmploc) > 17) {
if(TerrainType(tmploc) != 23 && TerrainType(tmploc) != 24) {
CreateUnit(civ, UnitDB(UNIT_NOBLE), tmploc, 0, tmpunit);
Event: EstablishEmbassyUnit(tmpunit, tmpcity);
Event: DisbandUnit(tmpunit);
DIP_hasemb[(DIP_NumOfPlayers * civ) + civ2] = 1;
DIP_hademb[(DIP_NumOfPlayers * civ) + civ2] = 0;
}
}
}
}
}
}
///////////////////////////////////
// Check embassy routine
///////////////////////////////////
HandleEvent(BeginTurn) 'DIP_EmbassyCheck' pre {
int_t civ;
int_t civ2;
civ = player[0];
for(civ2 = 1; civ2 < DIP_NumOfPlayers; civ2 = civ2 + 1) {
if((AtWarWith(civ, civ2)) && DIP_hasemb[(DIP_NumOfPlayers * civ) + civ2] == 1) {
DIP_hasemb[(DIP_NumOfPlayers * civ) + civ2] = 0;
DIP_hademb[(DIP_NumOfPlayers * civ) + civ2] = 1;
}
if(DIP_hasemb[(DIP_NumOfPlayers * civ) + civ2] == 0 && DIP_hademb[(DIP_NumOfPlayers * civ) + civ2] == 1 && !(AtWarWith(civ, civ2))) {
DIP_EstablishEmbassyFunc(civ2);
}
}
} |
|
|
|
|
May 21, 2001, 22:56
|
#213
|
Chieftain
Local Time: 05:00
Local Date: October 31, 2010
Join Date: Nov 2000
Location: Seguin/Texas/usa
Posts: 70
|
Game ends to soon
Has anybody eles had the problem with this game, It ends to soon? I am on my third game and never get pass the modern age before it is time to pick a world leader.
I had an AI really get aggresive with me I took his city he took it back I took it again and he came and took it back again. There wasen't much left of it when I got it back the last time. Don't take the AIs for granite they will do the unexpected at times.
I broke alliance with two AIs ,they were keeping me in war all the time, and it did not change there regard for me in any way that I could see. I would expect it to really drop my regard with the world or that is how it should work.
If you have an alliance with a civ and they are at war with another civ, I notice that when you get a peace treaty with the second civ you can't get a alliance with them. It won't even show up on interface. Is this the way it is ment to work?
|
|
|
|
May 22, 2001, 00:56
|
#214
|
Warlord
Local Time: 05:00
Local Date: October 31, 2010
Join Date: Sep 2000
Location: Tampa, Florida
Posts: 117
|
Just some thoughts:
The settler on the mountain thing...I think it's OK for settlers to cross mountains. I will confess that I have not played MedMod for CTP2 yet but I did d/l it yesterday so I'm not exactly sure how the MM2 AI behaves, but I don't often see the AI in my games putting cities in the mountains. They do once in a while but I like that. Historically there are mountain cities and I like the feeling, when I go to war, that a mountain city is going to be tough to take. I (probably like many others who don't really post much about it) have customized my game for me and I like for geography to have a major role in the strategies of the game as it is played. So I use a huge map with the uniform/diverse slider set to max uniform. I get these gigantic mountain ranges and huge rainforests which I think is really cool and adds a new dimension to game play. Now given that I have also made jungle terrain have movementtype: Mountain (to me jungle has been as formidable to the spread of civilization as has mountains...no?) I would be afraid that if the settler unit did not have the ability to move across mountain terrain then if at the beginning of the game, an AI civ had their settler placed on such terrain then that unit would die and the civ would be gone. Jeez I'm a bit wordy. Anyway, it's a simple thing to change if you don't like it. If you guys did get Wes to change it then it would be one of the first things I'd change back for my personal use...but I wouldn't worry about it.
Regarding terraforming: you guys have convinced me. It should occur less often and later in the game. In tileimp.txt, the entries for the terraform tile improvements have an enabling advance. This may sound dumb but does that advance allow that sort of terrain to be terraformed into another type or does it allow you to terraform other types of terrain onto that type (in other words, when you get the enabling advance for grasslands does that mean you can now make grasslands or does it mean that grassland can now be made into something else)?
The thing with the captured spy staying next to the city occurs in the regular game also.
I have seen others post reports of large stacks of AI armies frozen in place because they cannot move past a city or another stack but I don't think I've ever seen this in a game. I have often seen AI stacks break down and reform, for what reason I don't know! I once even recall that I had a small stack of 3 running away from an AI stack of 8 or 9. We both had movement points of one so no problem getting away, right? Wrong. Three mounted units split from their stack and ran me down!
hexagonian and Alpha Wolf had a great thread going on changing AI behavior w/o SLIC but that thread just kind of died out. I've used several of their ideas and also a few I came up with myself and I *think* the game plays much better. If anyone wants to try to plug in my goals.txt and strategies.txt into their game or into MM2 and see if it makes a difference, email me at monoscat7@yahoo.com. The email addy above is dead btw. It should slide seamlessly into MM2 unless Wes added new government types then that might be a problem. Basically, beyond what hex and AW talked about (the thread is here: http://apolyton.net/forums/Forum44/HTML/000549.html check it out) I've also messed with lowering the force matching ratios a bit and (I think this made a big difference) I removed the "NeverSatisfied" flag from GOAL_RETREAT. It could just be my imagination but since removing that flag it seems that the AI fights back against my advancing forces instead of just running away to defend the rest of it's cities. It also seems to come back to try and recapture lost cities. At the very least I'd like to hear from some of you who remove that flag from the MM2 goals.txt file and see if it makes a palpable difference in AI behavior. If you've got the RAM (I had to go out and buy more), I'd also recommend lowering the costs of EVERYTHING (almost). I lowered most unit costs (not settlers or some special units though) 60-65% and building and wonders 30-40%, and also the support costs for units. You might think that the game would move too quickly but it doesn't. You just have lots and lots of units and the AI uses them more effectively IMO. For one thing, they grab all the goody huts especially if you play with over 10 civs. After 30 or 40 turns with 12+ civs there aren't any goody huts left.
Just some thoughts. I don't have a huge amount of time to play the game (and I really should be doing something else rather than typing this right now) but I hope to crank up MM2 this week and give it a test drive. I still have a dial up modem and since I've been working on my own thing I was waiting till it sounded like MM2 was about ready for public consumption before I made the big d/l.
|
|
|
|
May 22, 2001, 00:57
|
#215
|
Local Time: 04:00
Local Date: October 31, 2010
Join Date: Mar 2007
Location: Florence, Al., USA
Posts: 1,554
|
UPDATE ALERT: New text update available at http://home.student.utwente.nl/w.sni...mod2_texts.zip .
I am having some trouble with my website right now, so I have emailed the updates to Wouter, who has posted it as his site for the time being.
I will go over all the things included in the update, and then try and respond to the discussions in the thread.
Both Wouter and I have spent a lot of time over the weekend on the strategies and goals texts, to try and find the key to improving the AI's wartime behavior. Wouter wrote a script that informs you when an AI changes its PW percentage, and I have modified the strategies text so that you should get this message whenever an AI shifts from its default to one of the wartime strategies.
This is important: Seige is set to 35%, Attack to 34%, and Defense to 33%. Default strategies are set to between 20% and 30%.
I need you to take note of when the AIs shift strategies (they should adopt them immediately after war is declared, which has its own message), and which strategy they adopt.
I tried out a new game, and the AIs did not adopt wartime strategies when I declared war on everyone in the first few turns of the game. Apparently the start strategies overroad everything else. The AIs don't use the start strategies all that many rounds, however, so you should be able to tell what is happening during wartime in a normal game.
Wouter did some limited testing last night, and said that the AIs didn't stay in the wartime strategies more than a few rounds before going back to their standard settings. This could explain why the AIs never seem to conduct campaigns.
With the info Wouter supplied, I have made a number of changes to both the wartime and default strategies and to the goals themselves in goals.txt. I hope that these changes can produce notable effects to AI behavior. Specifically, I have made the settings for attack, seige and defend much closer to one another, to promote the selection of some armies for different types of goals. I also reduced the defend max-exec to half its cities, rather than all of them. I hope this frees up more units for attack. I also raised the value of pillage in the default settings.
Also, the goal Nuke_city was set to a max-evaluate and max-execute value of zero, and I have changed this. So, be prepared for the possibility of nuclear attack should you get that far in the game.
I raised the bonus of roads from 200 to 300. I don't know why the AIs are suddenly building fewer of them; it is not because they don't have enough PW. Maybe this will solve that problem.
In other areas...
1)Triremes were able to carry medium sized troops, and I deleted this ability. This was what had some of you confused about its abilities. Sorry. "Now" it can only carry unconventional units and Warrriors.
2)I kept Settlers' ability to move on mountains, but I deleted their ability to settle on them. I hope this works out well.
3)I added another sea transport to the build queues of the AIs, raising it to 3. Hopefully this will have the AIs able to move more troops.
4)Coracles now have no ZOC or martial law effect, nor do Troop ships.
5)I added the line restricting Clerics, Televangelists, Eco-Terrorists and Eco-Rangers to civs with specific government types, like they were originally. Another bug.
6)I lowered the effect of farmers, laborers and scientists from 30 to 20. I don't know why they were set so high.
7)I moved the removal of Forests and Jungles from Iron Working to Metal Working. I am going to leave the rest of the terraforming settings alone.
I think specialists are designed to be the primary way of making up for bad terrain, and since that is what the AI does, this topic is just not a priority for me.
8)I have adjusted the default map settings in const.txt to give a higher percentage of the land to continents; make the terrain less homogenous, or "clumpy"; increased the number of rivers; increased the number of mountain chains, but with a decrease in their size.
9)Previously, only the 3 to 5 most powerful units available to any civ were picked from when creating barbarians. I have widened this to the top 8 on the hardest level, dropping by one notch as you go down in settings (boring hordes is set to 3-10). This should give a better mix of barbarian units.
10)I lowered the distance bonus for caravans back to its original level. I don't know anything to do about the bug that lowers routes' values when you load saved games.
11)I added a new file "Diplomacy for Idiots", named after a long line of books in the US that attempt to explain technical things like computers to "non-technical" people. I will let you guess where this came from.
12)I added pics for each individual militia unit. They have the Ctp1 black background so that you can recognize them.
I still need a pic for the WWII scenario brown marine (the medpack II's Rifleman). Someone mentioned getting screen captures by using the print screen key, but this does not work for me.
Wouter is working on triggers to make the Bombard and Arquebusier Elite militia units, and another trigger to destroy enslaving units on turn 500 (1880 AD). The code to replace AI capitals is in this update.
I have checked out the AI civs in my games, and they all seem to have plenty of units, at least once you get into the Medieval period. I think the reason why they don't use them is in the strategy and goals settings.
"Also, Wes, you neatly sidestepped my comments about Catapult vs. Archer, by not addressing it at all. I won't let you slip past so easily! Why not have an archer track of development, and an artillery one?"
I addressed this when I said that I thought there were enough units in the mod, and that units like the Chariot or Horse Archer could be used for the archer track. We are still working on the big issues of war, and the AI can't be modified to use all the currently available units like it should.
P-man, I have checked out the subs thing, and they became available when I gave myself the radio advance. Electronics is Nuclear Fission in the game, and everything checks out right in the texts.
We will have to keep watch and see if the AIs are hurting themselves due to city limits. I never noticed the AIs making more than 10 or so cities before the reduced limits.
I will begin work on the GL soon, though I dread it at this point.
I have corrected the captured spy message, though now it simply says that you were unsuccessful. Whether or not the spy is captured is left to chance.
I also forgot to include Dale's embassy code, but I am expecting some new stuff from Wouter soon, so I will include it with the next update.
The retreat goal should never be executed unless there is absolutely nothing else to do with the units. Its value is negative 300,000. I assume that the negative means it is never carried out? I will set it to 0 anyway, and maybe this will have an effect.
Last edited by WesW; May 22, 2001 at 04:31.
|
|
|
|
May 22, 2001, 01:13
|
#216
|
Warlord
Local Time: 12:00
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Finland
Posts: 150
|
Savegame
I told you about my ally's noble in last post. It tried to establish embassy even it was not possible. He tried that many many many times and I suppose he tried that in every turn. Yesterday I loaded my game and the noble was gone. I have not seen the noble anymore. Savegame thing again?
I suppose there is some kind of checks in game load and those checks cause some weird results.
__________________
Jani
|
|
|
|
May 22, 2001, 02:00
|
#217
|
Warlord
Local Time: 12:00
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Finland
Posts: 150
|
for dummies
Quote:
|
Originally posted by WesW
11)I added a new file "Diplomacy for Idiots", named after a long line of books in the US that attempt to explain technical things like computers to "non-technical" people. I will let you guess where this came from.
|
The series is called "X for dummies" here in Finland and I checked it from Amazon.com and with search string "for idiots" I got only 9 results but with "for dummies" I got 1395 results.
Why I do feel that this post was irrelevant
__________________
Jani
|
|
|
|
May 22, 2001, 04:14
|
#218
|
Deity
Local Time: 12:00
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
|
Update posted: at my website, get them here.
If there are any problems, let me know. But Wes could have picked a more convenient moment to ask me to post this, so I don't know how soon I can help.
(Wow! This new BB system rocks! )
|
|
|
|
May 22, 2001, 04:39
|
#219
|
Local Time: 04:00
Local Date: October 31, 2010
Join Date: Mar 2007
Location: Florence, Al., USA
Posts: 1,554
|
You are right, Jani, it is Dummies instead of Idiots (like that is any better of a term ) It does go better with Diplomacy, however.
I forgot to mention that I think I corrected the Noble problem by adding a line to the Goals.txt that tells AIs not to try and establish and embassy when a civ has the Forbidden City.
Slaves are sent to the nearest city which can suppress a slave revolt.
Btw, I spent about all night tonight on the GL, and I think I am finished with everything except the new units, which will take another night. Here is the GL entry for the Medieval Pack II wonder.
[WONDER_MEDIEVAL_PACK_II_PREREQ]
Requires:
ATABASE_ADVANCES,ADVANCE_APOLYTON>Apolyton
Costs:
{WonderDB(Wonder[0]).ProductionCost} ATABASE_CONCEPTS,CONCEPT_PRODUCTION>Production
[END]
[WONDER_MEDIEVAL_PACK_II_STATISTICS]
Gives:
+3 happiness to host empire.
[END]
[WONDER_MEDIEVAL_PACK_II_GAMEPLAY]
The Medieval Pack II is the result of the hard work of many individuals for the purpose of improving our game-playing experiences. We hope that it brings you the same increased happiness that it has brought to us.
[END]
[WONDER_MEDIEVAL_PACK_II_HISTORICAL]
The Medieval Pack II continues and expands upon the work accomplished in the Medieval Pack I. With Call-to-Power 2's release in November of 2000, we set upon gathering info on the game's performance, and thinking up new ideas for the game. After months of play-testing, correcting flaws and inadequacies in the shipped version, and writing code to implement all the new ideas and game concepts, the result is what you are now playing: The Medieval Pack II- A Call to Arms.
Stay tuned for the Medieval Pack II- Crusade, coming soon to a website near you. (And yes, I am a big Babylon 5 fan.)
[END]
__________________
For Civ IV: The Medmod V v1.0.
For Medieval: Total War- The Medieval Mod IV v4.0.
The entire Medmod series is available at my Apolyton-hosted webpage.
Last edited by WesW; May 22, 2001 at 04:47.
|
|
|
|
May 22, 2001, 05:13
|
#220
|
Apolyton CS Co-Founder
Local Time: 12:00
Local Date: October 31, 2010
Join Date: Aug 1998
Location: Macedonia, Greece
Posts: 24,480
|
hey wes, what's the gl entry for the apolyton advance?
|
|
|
|
May 22, 2001, 05:15
|
#221
|
Warlord
Local Time: 12:00
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Finland
Posts: 150
|
I just corrected Locutus webpage url(url to zip worked fine)
Quote:
|
Originally posted by Locutus
update posted at my website
|
__________________
Jani
|
|
|
|
May 22, 2001, 07:06
|
#222
|
Warlord
Local Time: 12:00
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Finland
Posts: 150
|
Solution to odd sounds
I just read through Dale's embassycode and detected that embassy is created using code
CreateUnit(civ, UnitDB(UNIT_NOBLE), tmploc, 0, tmpunit);
Event: EstablishEmbassyUnit(tmpunit, tmpcity);
Event: DisbandUnit(tmpunit);
I have seen this kind of code once before and now I understood that many other things in game are possibly made in this way. And this is the reason why there is sometimes for example establish embassy hornsound even if I do not see the cause of the sound.
I suppose that sound can not be disabled in this kind of situations? Or could it be possible to change sound's volume in code like:
CreateUnit(civ, UnitDB(UNIT_NOBLE), tmploc, 0, tmpunit);
var SoundVolumeWas = GetSoundVolume();
SetSoundVolume( 0 );
Event: EstablishEmbassyUnit(tmpunit, tmpcity);
SetSoundVolume( SoundVolumeWas );
Event: DisbandUnit(tmpunit);
__________________
Jani
|
|
|
|
May 22, 2001, 11:49
|
#223
|
Warlord
Local Time: 10:00
Local Date: October 31, 2010
Join Date: Apr 2001
Posts: 127
|
Re: for dummies
Quote:
|
Originally posted by janilxx
The series is called "X for dummies" here in Finland and I checked it from Amazon.com and with search string "for idiots" I got only 9 results but with "for dummies" I got 1395 results.
Why I do feel that this post was irrelevant
|
Wes where do you live??? I have never heard of Any "Books for Idiots" in Houston, Texas. However it is also "X for dummies" here in America also.
|
|
|
|
May 22, 2001, 18:16
|
#224
|
Prince
Local Time: 10:00
Local Date: October 31, 2010
Join Date: Apr 1999
Location: of the Cookieville Minimum Security Orphanarium
Posts: 428
|
The series Wes is referring to is "The Complete Idiot's Guide to...", a competitor to the "...for Dummies" books. I think the pejoratives are too tame by far, and am looking to publish a series to enter the fray.
How about "Animal Husbandry for Pinheads"?
"Embalming for 'Tards"?
"The Freakin' Moron's Guide to Genital Piercing"?
BTW - again, great work Wes (and company.) When the mod is fully polished I'll buy CtP2 on eBay. Should get it for about $10 now. The other $40 I would have spent on the game (had I purchased it when it came out) will go to you (and Locutus and the others), because y'all deserve it.
|
|
|
|
May 22, 2001, 22:37
|
#225
|
Prince
Local Time: 05:00
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Florida, USA
Posts: 367
|
Great work Wes and compny!!
very well put abjera! Even though I bought CTP2 when it first came out, I am also going to send 30 or 40 dollars to them. I know everyone thinks that the mods should be free, and they should, but think about how much work Wes and the otehrs put into it! I know if I did that I would like it if someone acknowledged my contribution of time with something more than a hey thanks. So again, good work Wes and company!
__________________
DO, OR DO NOT, THERE IS NO TRY - Yoda
EAGLES MAY SOAR, BUT... WEASLES DON'T GET SUCKED INTO JET ENGINES - Unknown
AMBITION IS A POOR EXSCUSE FOR PEOPLE WHO ARE TOO STUPID TO BE LAZY - Unknown
|
|
|
|
May 22, 2001, 23:09
|
#226
|
King
Local Time: 05:00
Local Date: October 31, 2010
Join Date: Nov 2000
Location: Sunshine State, USA
Posts: 1,104
|
All Is Lookin Good!
Wes, great stuff ... great stuff!
Comments: I love the new settings for unhappiness and revolts, it makes conquest much more realistic. However, I have noticed that with the advance of Drama, the Entertainer Specialist makes conquest much easier, almost too easy. I think these specialist unbalance the game. My suggestion is to lower the strength of entertainers moderately. This way you can still use them to hold off a revolt, but you will need to rush buy happiness improvements if you want to keep the city. Please tell me what you think.
|
|
|
|
May 22, 2001, 23:20
|
#227
|
Warlord
Local Time: 10:00
Local Date: October 31, 2010
Join Date: Apr 2001
Posts: 127
|
Alright, I have a possible compromise for the terraforming issue. I do myself believe it absurdly unrealistic. I think a possible compromise would be to make terraforming outrageously expensive, lets say about 10 to 20 times the original costs???? Also terraforming should take 3 to 5 times longer then normal. This would reflect the fact that we can terraform today, its just that it would take a really long time and be REALLY expensive. Just a possible suggestion.
Now I have another question, I have to admit I havent tried medmod since alpha. Now I was just wondering if I were to start the game in its current beta, and I had a save game going, If there was to be an update, would my save game work? I think this may have been addressed before but I was just curios. See this is the only reason I have been waiting for the final version so I didnt have to worry about this issue(and also somewhat the fact that I didnt want to deal with gaemplay bugs).
|
|
|
|
May 22, 2001, 23:28
|
#228
|
Warlord
Local Time: 10:00
Local Date: October 31, 2010
Join Date: Apr 2001
Posts: 127
|
One more thing, I totally disaggree with not allowing settlers to settle on Mountains. I have had my most successful cities on mountains, but the main reason I built cities on them was for production, rather more importantly it made a great defensive position. The defensive positions of the mountains are very important to me, and would subtract alot from the gameplay with the option to settle on mountains removed..
|
|
|
|
May 22, 2001, 23:30
|
#229
|
Warlord
Local Time: 10:00
Local Date: October 31, 2010
Join Date: Apr 2001
Posts: 127
|
Quote:
|
Originally posted by janilxx
I just corrected Locutus webpage url(url to zip worked fine)
|
Gosh doggit, none of the darn links to locutus sites work, WesW's site isnt working to correctly either, but at least I can access it(the downloads just dont popup when I click on the files to downlaod). Well it looks like I am going to have to hold up on getting Med Pack II.
|
|
|
|
May 23, 2001, 03:15
|
#230
|
Warlord
Local Time: 12:00
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Finland
Posts: 150
|
I think I found other possible error situations from Dales code above:
Code:
|
1: if(CityIsValid(tmpcity)) {
2: GetRandomNeighbor(tmpcity.location, tmploc);
3: if(GetUnitsAtLocation(tmploc) == 0) {
4: if(TerrainType(tmploc) < 10 || TerrainType(tmploc) > 17) {
5: if(TerrainType(tmploc) != 23 && TerrainType(tmploc) != 24) {
6: CreateUnit(civ, UnitDB(UNIT_NOBLE), tmploc, 0, tmpunit);
7: Event: EstablishEmbassyUnit(tmpunit, tmpcity);
8: Event: DisbandUnit(tmpunit);
9: DIP_hasemb[(DIP_NumOfPlayers * civ) + civ2] = 1;
10: DIP_hademb[(DIP_NumOfPlayers * civ) + civ2] = 0;
11: } |
- - So in line 2 we will get random coordinate next to tmpcity.
- In line 3 we will check if there is no units and if there is no units we will continue
- But if there is units code continues without going to inner codelines. So the embassy is not established.
If there is some kind of looping codes you should use it like:
Code:
|
GetRandomNeighbor(tmpcity.location, tmploc);
while ( GetUnitsAtLocation(tmploc) > 0 ) {
GetRandomNeighbor(tmpcity.location, tmploc);
}
...code comes here only when GetUnitsAtLocation(tmploc) returns 0 (no units there) |
There is still a need to add some kind of
if(GetUnitsAtLocation(tmploc) == 0) {
after -while- because it might be possible that there is water or units in every neighbour coordinates of that city.
There might be many places in code where this is coded wrongly! And this might cause many bugs(reported or unreported).
__________________
Jani
Last edited by janilxx; May 23, 2001 at 04:39.
|
|
|
|
May 23, 2001, 03:47
|
#231
|
Emperor
Local Time: 20:00
Local Date: October 31, 2010
Join Date: Dec 2000
Posts: 3,944
|
Jani:
See the DIP_EmbassyCheck section..........
Code:
|
if(DIP_hasemb[(DIP_NumOfPlayers * civ) + civ2] == 0 && DIP_hademb[(DIP_NumOfPlayers * civ) + civ2] == 1 && !(AtWarWith(civ, civ2))) {
DIP_EstablishEmbassyFunc(civ2);
} |
From this, every turn it will check. If the code sees that the above is met, it runs the code you mentioned above. If it finds a unit like you mentioned and skips the inner code, then the condition I mentioned above is still met, as I stop the condition being met during that inner code. Therefore, in the check on the next turn the condition is met and the code you mentioned runs again.
I did it this way because some cities only have one square of land next to it. If a unit is on that square, I didn't want to penalise the AI by saying "Nah, now you CAN'T have an embassy with them" so I kept the condition valid so it'd check next turn when the unit has moved on. It is NOT wrong programming, just my style of programming.
Hope that explains it. Personally I don't like using "while" statements in any of my programming as it's possible to have a situation where "while" is ALWAYS valid. Infinite possiblity loop bug anyone?
|
|
|
|
May 23, 2001, 05:12
|
#232
|
Warlord
Local Time: 12:00
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Finland
Posts: 150
|
Dale:
I didn't know anything about DIPs
Your coding style is ok to me if it does not allow errors to appear
For example there should not be a possibility that some code is not executed even it should be.
I do not like while either
But ok here is a new solution:
Code:
|
boolean established = false;
//lets loop throug all cities
//(there might be a city with no land coordinate next to it)
for ( int i = 0; i < player.getCityCount(); i++ )
{
if ( !established ) //! = not
{
city_t tmpCity = getCity( player, getCity( j ) );
//lets loop through all coordinates next to city
for ( int j = 0; j < 8; j++ )
{
if ( !established ) //! = not
{
Coordinate c = getCoordinateNextToCity( tmpCity, j );
if ( c.hasUnits() == false && c.UnitCanBeHere( noble ) )
{
//create noble & establish embassy here
established = true;
}
}
}
}
} |
Maybe you can see from my code examples that I am strongly committed to Java language
__________________
Jani
|
|
|
|
May 23, 2001, 09:59
|
#233
|
Emperor
Local Time: 05:00
Local Date: October 31, 2010
Join Date: Jun 1999
Location: Smemperor
Posts: 3,405
|
Wes's text file are located at my site too. I don't have the room for the graphics/sprites though (20 mg limit)
http://www.mydocsonline.com
login: hexagonia
password: hextapul
__________________
Yes, let's be optimistic until we have reason to be otherwise...No, let's be pessimistic until we are forced to do otherwise...Maybe, let's be balanced until we are convinced to do otherwise. -- DrSpike, Skanky Burns, Shogun Gunner
...aisdhieort...dticcok...
|
|
|
|
May 23, 2001, 12:54
|
#234
|
Warlord
Local Time: 10:00
Local Date: October 31, 2010
Join Date: Apr 2001
Posts: 127
|
BUG FOUND!!!
Well its a minor bug albeit, but a bug nonetheless. In the empire screen when comparing goverments often times the wrong thing is red and the wrong thing is green. For example, when comparing CityState and Monarchy, Military support costs is Costly for CityState and Medium for Monarchy. Medium SHOULD BE green and CityState should be red, how ever the opposite (and incorrectly) is occuring. This is only one example and this is happening quite often. Another example is when comparing Monarchy to Tyranny for crime/corruption levels is High for monarchy and very high for Tryanny, however Very High is Green and High is red, and it should be the opposite.
Also when I build the Forbidden City Wonder the nobles camp next to my cities and keep tryign to establish embassies every turn. This is rather annoying.
I dont notice any pauses caused by goodyhuts except for 2 seconds.
Diplomacy is awsome. It is 5x better then previous. The AI is often making proposals to me, however the vast majority of the time its for map trades. Although I did have the AI ask me to stop researching something(in fact every Civ asked me on the same turn) ALot of the AI proposals are asked by all the Civs on 1 turn or at least 3 of the AI Civs in 1 turn. I dont know if this is a good or bad thing. But at least the AI is talking diplomatically. I havent paid attention to AI to AI diplomacy but I will check that out. However there are still alot of wars between the AI.
|
|
|
|
May 23, 2001, 16:00
|
#235
|
King
Local Time: 05:00
Local Date: October 31, 2010
Join Date: Nov 2000
Location: Sunshine State, USA
Posts: 1,104
|
Bug Report: Upon completing the London Exchange, I did not receive the Brokerage improvement in *any* of my cities. The Brokerage improvement was taken out of my build list, and did not appear in my inventory.
|
|
|
|
May 24, 2001, 01:15
|
#236
|
Local Time: 04:00
Local Date: October 31, 2010
Join Date: Mar 2007
Location: Florence, Al., USA
Posts: 1,554
|
Thanks for posting the update, David. Don (Skorpion59) emailed me today and said that he cannot access his site here either, so this may be a problem with all the hosted sites. Anyone know about octal, or something similar, and using 3-digit codes to change permission settings? Dan Q emailed me last week with new passwords and so-forth for the site. I have not been asked for the new password, and now the system does not seem to recognize me as the admin for the page.
Wouter, do you know what may be wrong with the Wonder code? The Brokerage has the aqueduct as a preq building. I don't know if this would cause a problem or not. I have not had any problems with the code, myself.
I have noticed the inconsistency with the government rankings. Most are the result of some changes I made to bring consistency to the numbering system used in the govern.txt. I will look into it, and either try and straighten it out, or note it in the readme.
Nice to see Adam back on the boards, and thanks for the compliments.
I guess I have finished with the GL. I added some new concepts to help everyone learn the mod, and added the building preqs for those buildings like the Bastion which require a Castle before they can be built.
I dug around in the Medpack I, and found some historical gls for some of the units. I also wrote up some basic gameplay descriptions to get us by until Charles submits his files. Other than the ones Charles has yet to send in, the GL is complete.
I changed the name of the Cannon to the Field Gun, to try and convey its role in the mod better. I added all the unit special abilities to the GL, and all the Elite units are denoted as such at the top of their file so that you can immediately tell what they are.
I need Wouter or some one to explain one of the terrain settings at the top of the const.txt to me. I have been trying to get a better mix of terrain, which I think I have succeeded in with one of the other settings. I would like to almost eliminate the Swamp terrain, and replace it with Grassland. This is where I am having problems, and I think the answer is in this block of code below:
"# Swamps are placed at humidity levels above what grass? works out to.
PERCENT_FOREST 20
PERCENT_GRASS 45 #WW from 40
PERCENT_PLAINS 30 #WW from 25
PERCENT_DESERT 10
PERCENT_WHITE 15 #WW from 20
PERCENT_BROWN 15 #WW from 20
TEMPERATURE_RANGE_ADJUST 60 # Adjust the temperature height map by negative this amount at the poles, positive at the equator, linear scale in between."
The word grass? in the comment above used to be forest. I think this was a typo that had me confused. I don't know the value range for this block, but I think that values above the highest number listed are made into Swamp. That is why I raised the value of Grassland and Plains.
I also don't know what the "TEMPERATURE_RANGE_ADJUST" is, so if someone could explain that as well it may help.
I have not had any game reports since the last update. What's going on with your games? I did something in the strategies.txt that mayhave messed up the AIs defense. Let me know if the AIs are losing a lot of cities to the barbs, and if they are not garrisoning their cities properly.
Like the Avatar? (I learned how to do a technical thingy by myself!)
__________________
For Civ IV: The Medmod V v1.0.
For Medieval: Total War- The Medieval Mod IV v4.0.
The entire Medmod series is available at my Apolyton-hosted webpage.
|
|
|
|
May 24, 2001, 01:44
|
#237
|
Warlord
Local Time: 12:00
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Finland
Posts: 150
|
I had some time to start new game again.
An idea came to my mind. If settlers are not allowed to walk on mountains and building cities is disabled that way. What if we have road there. Settlers should then be possible to walk there. But still there should not be a possibility to build city there(?). So building cities on mountains should be disabled so that when settler is trying to build city the terrain is checked and if it is mountain building is not allowed. And in my opinion settlers should have the possibility to walk on mountains. If there is nig mountainchain and player would like to settle to the other side of that chain it would not be possible if settler can not pass the mountains.
Centering screen. Have someone done something to that. It was awful! I am not sure have it been this awful before. I mean when you even see a very little part of the unit in the edge of the screen the screen is not centered. Could this be corrected?
I aimed to monarchy again. And I got it in 55 turns!!! I still think that this is too fast!!!! Ummm any reasons why I should not change my government to monarchy early?
I think I found a bug that is not related to MedPack. In Build Manager select item in current queue and then for example from units list. GL information is not changed anymore. (at least I got this bug once)
2110BC orange(evil genius): He had only one city where was spearmen militia and 1 spearmen unit. He had no other cities!!! I captured that(bye bye evil genius ). He was building wonder. Why was he doing wonder if he only had built one unit and had one city. And the year was 2110BC. I think that he started building wonder too early? Or what do you think. I usually play without building many wonders(almost not at all) so maybe I am not the correct person to criticize this. By the way he was in "normal" continent and had plenty of places where he had possibility to spread.
Addition to Wes: I have not seen other AIs yet(the year is still about 2000BC in my game)
__________________
Jani
|
|
|
|
May 24, 2001, 02:01
|
#238
|
King
Local Time: 05:00
Local Date: October 31, 2010
Join Date: Nov 2000
Location: Sunshine State, USA
Posts: 1,104
|
The avatar looks real nice Wes .
I will keep searching for bugs (Timeline Grits Teeth) , but for some reason there doesn't appear to be many . . . . Oh, wait a minute! I forgot, that is a good thing .
Last edited by Timeline; May 24, 2001 at 02:10.
|
|
|
|
May 24, 2001, 03:40
|
#239
|
King
Local Time: 10:00
Local Date: October 31, 2010
Join Date: Jan 2000
Location: Gone Fishin, Canada
Posts: 1,059
|
Wes,
The data you quote above is part of the map generator. Skorpion59 had this sorted ages ago: he's got customized settings for his map generator that produce vastly improved maps. (So have I, but I've never been able to get results as good as his.) Why don't you ask him for a copy of his Const.txt?
|
|
|
|
May 24, 2001, 08:08
|
#240
|
Warlord
Local Time: 10:00
Local Date: October 31, 2010
Join Date: Apr 2001
Posts: 127
|
Quote:
|
An idea came to my mind. If settlers are not allowed to walk on mountains and building cities is disabled that way. What if we have road there. Settlers should then be possible to walk there. But still there should not be a possibility to build city there(?). So building cities on mountains should be disabled so that when settler is trying to build city the terrain is checked and if it is mountain building is not allowed. And in my opinion settlers should have the possibility to walk on mountains. If there is nig mountainchain and player would like to settle to the other side of that chain it would not be possible if settler can not pass the mountains.
|
Actually Settlers ARE allowed to walk on mountains, however they are not allowed to build cities there.
|
|
|
|
Posting 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
|
|
|
All times are GMT -4. The time now is 06:00.
|
|